SparkFun Forums 

Where electronics enthusiasts find answers.

Questions &/or issues related to products in the Audio category should be posted in this forum.
By TsunamiQuestion
#204320
*sigh*

Was trying to update the post instead of posting again.

You can no longer edit or delete that post.

Super frustrating.


Here is the relevant supplied .ino Arduino code from https://github.com/robertsonics/Tsunami ... miDemo.ino.

void setup() {

// Serial monitor
Serial.begin(9600);

// Initialize the LED pin
pinMode(LED,OUTPUT);
digitalWrite(LED,gLedState);

// We should wait for the Tsunami to finish reset before trying to send
// commands.
delay(1000);

// Tsunami startup at 57600
tsunami.start();
delay(10);

Why does it startup serial at 9600 then report it is starting at 57600 in the comment and also in the user guide?

http://robertsonics.com/tsunami-user-guide/

The default baudrate is 57.6kbps, but this can be changed by placing the appropriate entry in the init file using the Configurator.

Also, the TXB0108 breakout board that Sparkfun sells is designed to drive capacitive loads of up to 70 pF. The output drivers of the TXB0108 have low DC drive strength. If pullup or pulldown resistors are connected externally to the data I/Os, their values must be kept higher than 50 kΩ to ensure that they do not contend with the output drivers of the TXB0108.

For the same reason, the TXB0108 should not be used in applications such as I2C or 1-Wire where an open-drain driver is connected on the bidirectional data I/O. For these applications, use a device from the TI TXS01xx series of level translators. Except Sparkfun doesn't sell any?

What's even more confusing though is that the hookup guide (https://learn.sparkfun.com/tutorials/tx ... okup-guide) seems to indicate that SPI is perfectly fine for this chip and SPI is much higher speed than I2C is. So one would generally assume that it would work with TTL or I2C data rates but that doesn't appear to be the case?

Sparkfun says: Depending on the high and low side voltages, the bandwidth on the individual signal channels can range from 20Mbps up to 100Mbps, making the TXB0104 suitable for higher speed signals such as SPI.

But Sparkfun doesn't specify that it is unsuitable for I2C or TTL? Can it not handle below 20 Mbps well? Can the Sparkfun TXB0108 based logic level converter be used with TTL and I2C or should we look for a different chipset based board? We located some that use TXS0102, TXS0104 and TXS0108 chips as well as PCA9306 ones that should also work with the Tsunami?
By robertsonics
#204424
Trying to get caught up here... This thread seems to contain a number of different topics which makes it a bit hard to follow. I'll address what appears to be the last Tsunami question:

The Tsunami Arduino Library initializes the port used to communicate with Tsunami at 57600bps. As the comment in the example sketch states, the Arduino debug serial port (which is different than the port being used for Tsunami) is initialized at 9600bps. They are two different ports, with two different functions.

The Tsunami firmware does not yet implement different baud rates, so all communication should be at 57600. Tsunami serial communication is TTL-level (3.3V) async serial, with 1 start bit, 1 stop bit, and no parity. The pinout is designed to mate directly to the SparkFun FTDI Basic 3.3V.

Hope this helps.
By TsunamiQuestion
#204428
Yes, that is very helpful. We are currently trying to determine how to send (and receive) commands to it directly through an Arduino as we continue testing. Was not planning on using a SparkFun FTDI Basic 3.3V though since that really seems to be more for connecting to a computer.

We figured we could connect it directly to an Arduino's Serial 0, Serial 1, Serial 2, etc using 3 wires in total? Is that not the case? We have been unable to locate any literature about how it communicates other than "serial" though the Arduino sketch seems to be at 57.6k if you read the comments in the code but that can still mean a whole host of different voltages, stop bits, communication rates, etc. We just haven't been able to locate any literature that speaks about the technical details at any length is all. At least not for the Tsunami specifically.

Since we are using a MEGA, we will need to use a 5V to 3.3V adapter. So we went with a PCA9306 2-bit Bidirectional I2C and SMBus Voltage-Level Translator Module as it's still unclear if some of the SPI suitable ones will even work at 57.6k bandwidth?

Assuming it's unlikely we can change the bandwidth but any chance we double the bandwidth with a future firmware update? Would that have any functional improvements?
By robertsonics
#204430
I think I've already provided the info regarding the serial connection in my previous reply. As with any async serial connection, you need to connect a common ground, TX->RX and RX->TX. I'm pretty sure my tutorial on serial communication with the WAV Trigger on my blog covers this. Not sure where the confusion lies.

If you're using an Arduino, you can either just use the library I've provided, or write your own code using the library's source code as a reference. In addition, the User Guide on my website provides the contents of each of the available commands in the Serial Protocol section.

Can you tell me why you think you need a serial baudrate faster than 57.6K? What are you going to be doing that needs to be faster than this? Keep in mind, if you send continuous traffic to the Tsunami or WAV Trigger as fast as the serial communication allows, even at 57.6K, you'ill overflow the receive buffer and lose commands. All of my products give priority to playing audio so as not to produce clicks or pops.
By TsunamiQuestion
#204440
Regarding the bandwidth, we don't know yet. We backburnered setting this up because we had to deal with several unrelated issues first. The documentation for the Tsunami is just a bit difficult to locate if you want to use an Arduino to connect to it directly. Some documentation is on Sparkfun, some is on your blog, some is under the WAV but not Tsunami postings, some is in the Arduino code which we had to dig for to locate. Just a suggestion to clean it up or add it to Sparkfun would have been helpful is all.

We also need to adapt it to use 3.3V TTL but until we transition to a 3.3V M4 board, we need to ensure we can talk to it properly at 57.6k serial TTL. Still somewhat unclear what 5v to 3.3v adapters are suitable and none that work for sure are called out, it just says adapter.

Lastly, the Metro library has been depreciated for a good while now as well. https://github.com/SofaPirate/Chrono is the latest revision. Any chance you will update the Tsunami code to use Chrono?
By TsunamiQuestion
#204775
I guess the person who created the board?

Also the forums have an error displayed at the top.

[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/captcha/plugins/qa.php on line 87: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/captcha/plugins/qa.php on line 104: count(): Parameter must be an array or an object that implements Countable
User avatar
By TS-Chris
#204788
Hi Tsunami.

If you're seeing errors or having trouble with the forums specifically, please PM TS-Feedback for those.

As far as changing the library goes, that's up to the library author. If they feel they need to make changes, they will but they likely won't be able to make custom changes for you.

You are free to make your own library or modify the existing one if you wish to do so. We actually encourage users to do that and share improved libraries with the community if you can make it better or add features that might be useful.
By robertsonics
#204791
To be clear, the WAV Trigger and Tsunami libraries themselves do not make use of Metro. Metro is only used in the example sketch as a means of spacing commands for the purposes of a demo. There are many ways to do this and I assume people will only use the example sketch as an example, and therefore don't feel it's necessary to update.