MP3 Trigger Sound System

The MP3Trigger setup is the easiest way to add sound to your droid and control it via the R2 Touch iPhone app.

Requirements

- a MP3Trigger boards are available from Sparkfun: https://www.sparkfun.com/products/11029

- The sound files: MP3TriggerFlashImage_1.2.zip

- A MicroSD or MicroSDHC card (a 1 or 2 Gb is enough, but I use an 8Gb) to put the unzipped sounds on

- A row of 0.1" header pins (4 pins long) to solder on the board

- An up to date version of the R2 Touch app (version 1.2 or higher) and a Master MarcDuino Board

Setting up the MP3Trigger board

Unzip and copy all the files (including the .txt file) from the MP3TriggerFlashImage_1.2.zip archive to your MicroSD card. The order you copy the files in is unimportant. However, the number and dash at the beginning of the names of the files are important - don't change the file names. The MarcDuino and R2 Touch use the number and dash to play the right file.

Set the USB - EXT switch to USB position (so the board can be powered by the MarcDuino).

Solder the 0.1" pin header to theMP3 board (see video below, which also shows how to hook up to the v1 boards).

Wiring depends on your MarcDuino version. Note that you do not need anything else (dome servos or MarcDuino slave) connected to your Master for the sound to work. You don't even need R2 Touch or a receiver connected, as it should start playing random sounds on its own by default.

Testing the Sounds

You can test if the sounds on the card have been installed and recognized properly by using the rocker switch on the MP3 Trigger. It should play sounds when you move the switch either way. If it does not play, there is a problem with your files, MicroHD card, or MP3Trigger.

When you power up the MarcDuino, the green LED on the MP3Trigger should blink a few times and you should hear the startup sound. If you don't hear the startup sound, there maybe a problem in the connection between your MarcDuino and the MP3Trigger.


Adding an Amplifier

The MP3Trigger can only drive earphones. For speaker sound, you'll need either an amplified speaker (the easiest), or use an amplifier board. Any good automotive amplifier should work. I have used this Sure 2x15W cheap one with good success:

http://www.parts-express.com/pe/showdetl.cfm?partnumber=320-330

A lot of people also use this conveniently packaged Lepai amplifier:

Lepai LP 2020TI Instruments TPA3118 Amplifier

Customizing the sounds

You will probably want to substitute the music files which are generic beep versions for the real ones which I cannot distribute because of copyright restrictions (I use instead a beep version of Star Wars, the Imperial March and Cantina). To replace them, keep the same file name and overwrite the file with your own MP3. If you want to add more sounds, add them in sequence in each bank using the naming scheme outlined below. Be very careful about replacing the startup sound. The software is calibrated to use the time during the startup sound. If you really have to change it, use one of approximately the same duration.

The sounds are triggered by the number prefix in the filename. You can call them anything you want, but the number prefix has to be right for it to play with the R2 Touch app. They are bunched in banks of 25, which correspond to the R2 Touch buttons. In practice, since there are only 22 keypad buttons in R2 Touch, you can only access the first 22 sounds of each bank:

Files named 001-xxx to 025-xxx: Generic Sounds (i.e. triggered by the "Gen" buttons on the R2-Touch app).
026-xxx to 050-xxx: Chatty Sounds
051-xxx to 075-xxx: Happy Sounds
076-xxx to 100-xxx: Sad Sounds
101-xxx to 125-xxx: Whistle Sounds
126-xxx to 150-xxx: Scream Sounds
151-xxx to 175-xxx: Leia Sounds
176-xxx to 200-xxx: Music Sounds
255-xxx: Startup Sound

You will be able to access additional sounds via the R2 Touch keyboard buttons. However for the 4 lower banks, additional sounds will not play using the auto modes (see below), which is limited to the original number of sounds that come with the flash image. If you want to use the random auto and bank modes with your custom sounds on the four lower banks, replace existing sound files instead.

Using R2 Touch Auto and Bank modes

The R2 Touch App can directly trigger any specific sound using the keypad buttons. It also has a Random Auto mode (the center round button), and a Bank mode (the outer circle buttons). Bank buttons behaves slightly differently depending on the sound bank, read below if you care about the details.

The keypad buttons work in conjunction with the numbering scheme explained above.

Press the circular bank buttons once to change the keypad to the appropriate bank.

For the Gen, Chat, Happy and Sad banks, pressing the circular "bank" button a second time (or pressing once more if the bank is already selected) will play the next sound in the bank. Use this to generate a random sound of the right "mood". Pressing repeatedly will cycle up to the number of bank sounds pre-loaded in the default flash image. It will not access added sounds unless you modify the MarcDuino code.

The 4 "special effect" banks (Whistle, Sing, Leia and Mus) behave differently. Pressing these bank buttons will always play the first sound in the bank. This is setup to guarantee quick access to four precise special effect sounds: a whistle, a scream, the long Leia message and the Cantina music. You can change these default sounds by replacing the the first sound file in the appropriate bank. Other sounds in these banks must be accessed via their specific keypad buttons.

The auto random mode is actuated by pressing the round Auto button in the center. It will play random sounds at random intervals. Only sounds from the first five banks (from Gen, up to and including "whistle") will be played (i.e. never from Sing, Leia or Music). It will also limit itself in each bank to the number of sounds that come in the default flash image, even if you add more sounds.