MP3 Trigger Board Wiring

Hello,

I am currently wiring up my MP3 Trigger Board, and powering it via the barrel plug. In this setup, there USB/EXT switch on the board provides an on/off switch.

I am trying to communicate to the MP3 Trigger Board via serial commands from an Arduino Mega. The Mega is also powered by barrel plug, so these two board should, in theory, share a common ground and power source. To connect from an output pin of the Mega to the Rx pin of the MP3 Trigger Board, what wires do I need to connect? Do I need to connect the ground to the common ground? Do I need to provide 5V from the Mega to the MP3 trigger board? Does the switch need to be in the Ext position to receive commands via serial?

Thanks!

Any help? Thanks!

Any help on this?

Howdy. It’s worth you looking at this hookup guide - https://learn.sparkfun.com/tutorials/mp … de-v24/all

Steve

Thanks Steve, I have been through it a few times but, while it does specifically describe Serial commands, it never suggests the proper wiring for Serial control. It remains unclear to me if, when using Serial commands connected from an external controller, it is required to provide 5V and GND to the FTDI header pins, or if you can simply connect the Rx and Tx pins and continue supplying 5V/GND using the barrel plug.

Wiring from a Mega powered via barrel jack to the MP3 trigger it should look like:

Mega pin MP3 Trigger pin off FTDI 6 pin header

5V > VCC - Regulated 5v of Mega should provide enough current to power the MP3 Trigger.

GND > GND

TX1 > RX

RX1 > TX - Optional if you want the Mega to listen for data from the MP3 Trigger.

Switch should be flipped to “USB”. The power LED on the MP3 Trigger should turn on if everything is hooked up properly.

Should do it. I recommend not using the hardware TX0 pin off of the Mega because if you leave this hooked up to the MP3 Trigger you could brick it when uploading a new sketch to the Mega.

Hope this helps.

While it’s written for the WAV Trigger, this post may be of some use:

https://robertsonics.com/2015/04/25/ard … -tutorial/

TS-John:
Wiring from a Mega powered via barrel jack to the MP3 trigger it should look like:

Mega pin MP3 Trigger pin off FTDI 6 pin header

5V > VCC - Regulated 5v of Mega should provide enough current to power the MP3 Trigger.

GND > GND

TX1 > RX

RX1 > TX - Optional if you want the Mega to listen for data from the MP3 Trigger.

Switch should be flipped to “USB”. The power LED on the MP3 Trigger should turn on if everything is hooked up properly.

Should do it. I recommend not using the hardware TX0 pin off of the Mega because if you leave this hooked up to the MP3 Trigger you could brick it when uploading a new sketch to the Mega.

Hope this helps.

Thanks for the reply. Two follow up questions
  1. Are you saying that you cannot power the MP3 Trigger Board via barrel plug while using the Tx and Rx pins?

  2. I realize that the hardware TX0 of the Mega is used during uploads, but what about this process could brick the MP3 Trigger?

robertsonics:
While it’s written for the WAV Trigger, this post may be of some use:

https://robertsonics.com/2015/04/25/ard … -tutorial/

Thanks! Helpful, but they still only connect the ground between the two boards here, is that actually necessary if they use a common ground via barrel plugs?

You will need a common ground between the two boards, in addition, you will need to connect the TX and RX pins from one board to the RX and TX pins on the other.

Wiring from a Mega powered via barrel jack to the MP3 trigger it should look like:
Mega pin MP3 Trigger pin off FTDI 6 pin header
5V > VCC - Regulated 5v of Mega should provide enough current to power the MP3 Trigger.
GND > GND
TX1 > RX
RX1 > TX - Optional if you want the Mega to listen for data from the MP3 Trigger.

Sounds good for the MP3 trigger board but what about the Tsunami? The only documentation I was able to locate has the hookup guide (https://learn.sparkfun.com/tutorials/ts … -guide/all) and the WAV hookup guide (http://robertsonics.com/2015/04/25/ardu … -tutorial/) but that doesn’t allow for Rx commands like the Tsunami does and it runs at 5V, not 3.3V so hooking the Tsunami up like that would not be a good idea.

Trying to figure out the best way to convert a 5V Arduino into being able to send and receive simple commands to the Tsunami board and the documentation isn’t really easily locatable and it certainly isn’t in one place. Maybe consider putting it together a little bit better so one can more easily locate it?

https://github.com/robertsonics/Tsunami … al-Library sort of speaks to this a bit but also glosses over how to physically wire things up and also glosses over what type of level shifter is needed.

Digging even deeper into the actual Github Arduino INO file documentation notes there is at least a bit of information on how to actually wire up the Tsunami:

https://github.com/robertsonics/Tsunami … miDemo.ino

To use this sketch with an Arduino, you’ll need:
1) An Arduino with an operating voltage of 3.3V, *** NOT 5V ***!
2) Download and install the Metro library.
3) Connect 3 wires from the Arduino to the Tsunami’s serial connector:
Arduino Tsunami
======= =======
GND <------> GND
TXn <------> RX
RXn <------> TX

But do we need https://learn.sparkfun.com/tutorials/bi … -guide/all or something more like https://learn.sparkfun.com/tutorials/tx … okup-guide or https://www.sparkfun.com/products/14765 if we are using a 5V native Arduino?

It’s still unclear what type of “serial” the Tsunami even uses? TTL? RS232?

What kind of serial speeds is the Tsunami capable of using?

Lastly, the Metro library has been depreciated for a good while now as well. https://github.com/SofaPirate/Chrono is the latest revision.

Here is a quick list of common Arduino Serial port pinouts for reference.

https://www.arduino.cc/reference/en/lan … on/serial/

Note that on the Uno, Nano, Mini, and Mega, pins 0 and 1 are used for communication with the computer. Connecting anything to these pins can interfere with that communication, including causing failed uploads to the board. Also note that this serial appears to be TTL.

To use the serial pins to communicate with an external TTL serial device, connect the TX pin to your device’s RX pin, the RX to your device’s TX pin, and the ground of your Mega to your device’s ground.

Also note:

https://www.arduino.cc/en/pmwiki.php?n=Reference/Serial

The Arduino Mega has three additional serial ports: Serial1 on pins 19 (RX) and 18 (TX), Serial2 on pins 17 (RX) and 16 (TX), Serial3 on pins 15 (RX) and 14 (TX). To use these pins to communicate with your personal computer, you will need an additional USB-to-serial adaptor (sic), as they are not connected to the Mega’s USB-to-serial adaptor (sic). To use them to communicate with an external TTL serial device, connect the TX pin to your device’s RX pin, the RX to your device’s TX pin, and the ground of your Mega to your device’s ground.

https://learn.sparkfun.com/tutorials/se … munication

Minor typo there?

Hardware Implementation
We’ve covered asynchronous serial from a conceptual side. We know which wires we need. But how is serial communication actually implemented at a signal level? In a variety [of?] ways, actually.

If you see a typo or issue on a page on the SparkFun site, please PM TS-Feedback to let us know.

Thanks!

If you let us delete or edit messages, I could just delete it after it has been corrected? Not sure how we were supposed to know to PM TS-Feedback but that works too. Can you clarify some of the above questions about the TTL voltage level conversion. Trying to locate a suitable Sparkfun product but several of them have asterisks about ways they do and ways they do not work well and none of them seem to handle Serial TTL and SPI and I2C and higher speeds very well. Not even sure what the highest level speed the Tsunami supports, they seem to use 9600 in the examples but that may or may not be fast enough depending on what we are sending it.

Also, the https://learn.sparkfun.com/tutorials/ts … okup-guide page suggests using the https://www.sparkfun.com/products/11771 product? Unclear if that’s the best approach to take or not for use with the Tsunami or if the SparkFun Logic Level Converter - Bi-Directional BOB-12009 would be just as good?

http://robertsonics.com/tsunami-user-guide/ says that the Serial Baudrate: This sets the baudrate for the async serial port. This baudrate will remain in effect until the next power cycle. The default is 57.6kbps. but then why does the official supplied Arduino sketch use 9600 bps?

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?

Anyone? It says 2 or 3 days to hear back but it’s been five now with no response.

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.

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?

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.