background image

connector. This sends 5V from the FTDI connector to the power input of the board, bypassing the
charge circuitry that limits the current. Once you do this, you'll be able to power the board from the
FTDI connector. Did we mention not to connect a Lipo battery to the board after you make this
modification?

Solder jumpers

There are several solder jumpers on the board that you can use to alter its behavior. You probably
won't need them, but they're there if you're ambitious.

I2C pullups (SJ1 and SJ2)

The TPA2016D2 amplifier chip has an I2C ("wire" library) interface that can be used to alter various
settings on the chip. This interface is connected to the ATmega328 and is also sent to trigger 2 and
trigger 3 in case you want to use external I2C sensors such as accelerometers, gyroscopes, etc.

In the example sketches, the I2C interface is normally disabled and generally shouldn't interfere
with the use of trigger 2 or trigger 3. However, if you'd like to absolutely separate trigger 2 and
trigger 3 from the amplifier chip and 4.7K pullup resistors, you can do so by cutting SJ1 and SJ2.

These jumpers are normally connected (there's a thin trace running between the pads). If you want
to sever the I2C connection to the amplifier, carefully cut the traces between the pads using a
hobby knife. If you'd like to restore the connection later, use a blob of solder to reconnect the two
pads.

Serial MIDI connection (SJ3)

SJ3 (on the bottom of the board) can be used to connect the serial RX line (trigger 5) to the serial
RX pin of the VS1053B audio decoder chip. This will let you send serial MIDI data directly from
trigger 5 to the audio decoder.

Please note

 that without changing this jumper, you can still play MIDI files from the SD card just

like any other audio file. This jumper is only useful if you have an external MIDI source such as a
keyboard that you might want to connect directly to the LilyPad MP3 Player.

Headphone jack speaker cutoff (SJ4 and SJ5)

Normally, when you plug headphones into the jack, the audio signal to the amplifier chip and
speakers will be interrupted by switches built into the jack. If you would rather have audio go to both
the headphone jack and amplifier, you can close solder jacks SJ4 and SJ5 on the bottom of the
board.

Even more headers

If you need more I/O than the five trigger pins, and you're not going to be using a rotary encoder,
you can take advantage of the unused rotary encoder connections in the center of the board. The

Page 22 of 28

Summary of Contents for LilyPad MP3

Page 1: ...ing the Board into Your Project Getting Started with the Player Sketch Hardware Details and Hacking Tips Troubleshooting Supported Audio Formats Writing Your Own Code Resources and Going Further Intro...

Page 2: ...LilyPad MP3 DEV 11013 49 95 4 Favorited Favorite 19 Wish List You can use the LilyPad MP3 Player to create all kinds of noisy projects your imagination is the only limit Page 2 of 28...

Page 3: ...of the following topics that will be covered in this tutorial if you are not comfortable with them already How to install an Arduino Library Battery Technologies Sewing with Conductive Thread Using G...

Page 4: ...pecific files when the input pins are grounded You can also add an optional rotary encoder and load the Player software to turn the board into a real audio player or evenwrite your own software using...

Page 5: ...6 pin 5V FTDI header to both recharge an attached Lipo battery and to reprogram the board if desired see this note about powering the board from USB And finally there is amicro SD card socket into wh...

Page 6: ...nctions such as serial ports that you can use to communicate with other devices in more complex projects The alternate functions are listed in the table below You ll also use the pins to connect to ex...

Page 7: ...erial monitoring will be disabled T5 Trigger 5 RX General purpose I O pin Arduino pin D0 You ll usually connect this through a switch to ground Can also be used as RX receive in a serial connection Do...

Page 8: ...akers will sound better than small ones so use the largest ones that your project will accommodate Don t worry that the speaker is marked 20 watts or higher that is just the maximum power that the spe...

Page 9: ...blem by translating the file into a different format using the audio software of your choice The LilyPad MP3 Player is washable but because conductive thread connections can be fragile we recommend wa...

Page 10: ...of audio formats including MP3 WAV WMA AAC MID etc 2 Rename the audio files on the micro SD card so that the first character of each filename is the number 1 to 5 corresponding to the trigger that you...

Page 11: ...wer to run the board so a battery or other external power source is required 6 Move the power switch to ON The red LED should light up 7 Wait a few seconds for the software to start up Now momentarily...

Page 12: ...t that control whether triggers can restart an already playing clip send debugging information to the serial monitor window etc You can easily change these settings if desired or make any other change...

Page 13: ...maging yourself or the board Switches You can certainly use hardware switches if you wish If you re doing a fabric project you may want to use a soft switch A soft switch acts just like its hardware c...

Page 14: ...ich is close to the 5V FTDI header Battery To keep the battery from flopping around and possibly breaking its wires we recommend sewing a little pocket to hold it snugly Don t sew it in permanently yo...

Page 15: ...k of the board to install the encoder Required Materials RGB Rotary Encoder Clear Plastic Knob Optional Soldering tools soldering tools i e soldering iron solder safety glasses etc A single cell 3 7V...

Page 16: ...ncoder s pins into the holes in the center of the LilyPad MP3 Player Note that it goes into the top side of the board the side with the silkscreen that indicates where the encoder goes Flip the board...

Page 17: ...That s it 2 Install the Arduino software If you haven t download and install the free Arduino IDE Integrated Deveopment Environment available from www arduino cc Follow the instructions there for you...

Page 18: ...Pad MP3 Player s power switch The red LED should light up Start the Arduino IDE and load the Player sketch from the LilyPad MP3 Player folder From the IDE s Tools Board menu select Arduino Pro or Pro...

Page 19: ...test out circuits and programming before committing to needle and thread 8 Plug a 3 7V single cell Lipo battery into the JST connector Note that a FTDI USB connection will not provide enough power to...

Page 20: ...Polymer battery SparkFun carries these inseveral sizes which translates into different run times It is recommended that you use a Lipo battery of at least 500mAh to match the default 500mA rate of the...

Page 21: ...andard 9090 ohm resistor so use the next larger standard size which would be 10k Before soldering on the new resistor remove the existing surface mount resistor within the white box You can remove it...

Page 22: ...trace running between the pads If you want to sever the I2C connection to the amplifier carefully cut the traces between the pads using a hobby knife If you d like to restore the connection later use...

Page 23: ...the SPI port in time for the next data transfer to take place If you don t the VS1053B will run out of buffered data and starve causing a gap or glitch in the playback See Bill s documentation for in...

Page 24: ...etch ensure that your filenames have one of the following extensions MP3 WAV MID MP4 WMA FLA OGG AAC Note that the VS1053 itself does not care what the filename is you can use any of those on any file...

Page 25: ...es we realized that the files contained an image of the album cover as part of the metadata Since this data is at the beginning of the file the VS1053 chip had to read through and ignore all the image...

Page 26: ...ndow size 64 4096 samples Sample rate 48 kHz max Bitrate 500 kbit s max AAC AAC MP4 M4A language bash Two channels max Sample rates from 8 kHz to 96 kHz rates 48 kHz are downsampled to 48 kHz Bitrates...

Page 27: ...e We ve included this code is in the examples directory You can download the LilyPad MP3 Player code from thegithub repository Clicking the ZIP button on that page will download the latest version You...

Page 28: ...torials Dungeons and Dragons Dice Gauntlet Using the LilyPad TinyTwinkle board For more MP3 related tutorials visit these links MP3 Player Shield Quickstart Guide Elevator TARDIS Office Door Castle Kn...

Reviews: