Home
Adafruit Wave Shield Kit for Arduino User Guide
Contents
1. Tiel see eee eee 2 J ie n 3 o 2 gt e o e z gt gt a eeeeeeee 88 gt eeeeeeee se Seeeeeee 060 O gt We ll start with the four side tabs that are used to mechanically secure the card holder in place Heat up the metal tab and the pad the silver square beneath 1t for 3 seconds with a hot soldering iron then poke just a bit of solder in Do this for all three corners Once this is done you should not be able to lift the card holder Now go thru and solder the 8 leftmost pins that stick out from the holder The three rightmost pins are thinner and closer together so they are tougher to solder Luckily they are not used and you simply skip them although the photo shows them done Check that you have no solder bridges the pins should not be soldered to the metal body of the holder or to each other make uwavshield a 1 wf er LA Next we will solder all of the many resistors The 10K resistors R2 and R4 are first Form them into staples as shown left with a 100 ohm resistor then place them so they sit flat against the PCB in the correct locations Resistors don t have polarity so they can go in either way and work fine Once placed bend the leads out so the resistors dont fall out If you re using an NG Ardiuno replace R2 with a 1 0K 2 0K resistor p PITA fl D i Va 73 Ja E eee rs Je IL COSAS aiy 402 oH pe
2. Te a g f L 2 ld ia www robotshop com Adafruit Wave Shield User Guide RB Ada 04 Podac AAA A A 3 PAO cee SE o o o OE O A 4 Can this shield play MP3 files What about WMA Ogg AAC ee eccccccccceneeeeeees 4 WbDat sort ol audio can it play art sassateacieesiwaseawseieeaue 4 Wal docs 10 SONG IKE segren e E E EE EEEE erige 4 Can ts mola recon AUG l sece 4 What pins are USed DY the Shield escossoira renan Eare 4 A nn II PE mI dseuseysasen lt otelacecaventanehoctaeussyaaees 5 NOMA Ce A o E O O EE A 5 SD MMC card AAA o o O A 5 Tho microcontroller Arda 6 A e e E Gon 7 AO O A IP A 8 A o e e E A E 9 AS o PO oO IA 112 SP o o o on Zz A A OO OO 27 JA AA E ne ne eae ee eee 30 Option Use Ines us eroncs lll snde leon E itco 31 Y A O E OI 33 Option 3 Use Audacity ccccccccccssssssssseecccccesseeessseeeccceesseeeeseeeeeceesssaeeeseeseceeeesaags 33 Step 3 Start up Audacity and open the file occcccoonononcnnnnnnnnnnnononocnnonnnnnnnonnnos 34 Step 4 Split and Mix a stereo track ceceiies saison cetewses dls accinli lia cltc candiles 36 Sip ONY CFE 10 10 DIS AUTO serisine renien rend inadecuaci n 37 Step O Convert to 22 KIAZ OF lOS scans RUSIA EERE Nini 38 DEN 1 CAN LO SOU oir E a E E 38 RS A E DO E octet esta tat hues cesta eta astaetetohteeangss 39 Toubes ioone eB AG pct E E E 41 Getting Stack overflow errors oocccccnnonooocnccnnnnnnnnnnnnonnnnnnnnnnnonnnnnnnnnnnnnnnnnnnnannncnnnnnnnnnnnos 41 Get mor
3. they go in the right way The long lead is the positive lead make sure that goes into the hole marked with a as shown here If you re planning to stack another shield on top of this one you may want to bend the capacitors so they lay flat 92090606 TZ ETE DADOS oowoo 0 1 166g gt AN 1471 S tattoo Hoogl y 5 d gt bh DL DOTPUY E E RREAO ft e rm O 7 DES uy Next is the headphone jack It snaps into place right at the edge of the PCB 1au epehi Solder the jack in place You may want to clip the legs a little if you can so that it will sit better on the Arduino Next is the volume potentiometer TM1 This is an audio type 10K pot It will slip into place pretty easily 1604 EG OOO O 9 0 C 110 A Solder all 5 pins of the potentiometer Use plenty of solder so that it has a lot of mechanical strength 09 os aa os es as oa 2 3 6 2 gt gt e 2 Next break the 36 pin header strip into smaller sections so that the shield can be placed on the Arduino You can use pliers or diagonal cutters Clip off 2 6pin and 2 8pin pieces If you re using a Diecimila Arduino place the 6 and 8 pin headers into the female sockets If you have an NG Arduino you can place a 3 pin female header not included as shown which will let you use the reset button g Y Ni 90 Suny AEE ETON EY EEN es ME oss ATMEGAL60 20PU is ee aces ee ya o E ee ST
4. Converting audio to WAV format is very easy and is often the default format for many audio programs Files are stored as 8 3 name format and can only be placed in the root directory That means you can only have 512 files but they can be any size Ideas for what you can use it for Make a portable audio player Use the AT amp T text to speech site to make snippets of speech that you string together for a talking project like Talking temperature sensor Talking clock Interfaces for sight impared people Doorbell that plays a cool tune Jukebox music box that plays a song when its opened or a coin 1s inserted Security system that warns the intruder Audio looper for musical effects and performances Synthesizer with different sounds Really freaky halloween props that scream Display like a point of sale box that you can plug into to hear the message FAQs Can this shield play MP3 files What about WMA Ogg AAC No compressed audio requires either a specialized chip which is expensive or a very powerful chip The Arduino microcontroller can t uncompress MP3 on the fly and to keep the shield inexpensive no mp3 decoder chip is included What sort of audio can it play It can play uncompressed Wave files wav format This is a standard format and pretty much every audio program can convert your music or audio into wave format Make sure the sample rate is mono 22KHz or less and 16 bit or less What does it sou
5. Hz 16000 Hz 22050 Hz 44100 Hz 45000 Hz 96000 Hz Other Step 7 Prepare to export Check the Preferences menu item and select the File Formats tab Make sure the Uncompressed Export Format is WAV Microsoft 16 bit PCM Audacity Preferences Audio 1 0 Quality File Formats 5 pectrograms Directores Interface Keyboard Mouse When importing uncompressed audio files into Audacity f Read directly from the original file faster Uncompressed Export Format Awa Microsoft 16 bit PCM Wha Microsoft Signed 16 bit PLM OGG Export Setup UGG Quality 5 MP3 Export Setup MPS Library Version MPS exporting plugin not found Find Library Bit Rate Cancel You only have to do this once Step 8 Export Finally you re ready to export the file Select Export as WAV from the pulldown File Edit View Project Generate Effect Analyze Help New Ctrlt h Open Ctrl mn zj a Close Ctrl hy Save Project Chrl 5 Save Project 45 Recent Files PAAA 2 00 3 00 Export 45 WAY Export 45 MPS It may take a few seconds to convert and save the file Exporting the entire project as a Wis Microsoft file MED Remaining time 0 00 78 Cancel Finally check the file Properties It should be 16 bit mono 22KHz or less and PCM format 21 Hey Jude wav Properties Summary Property Audio Bit Rate 352kbps 4 Audio sample size 16 bit 4 Channel
6. that provides a nice power supply to run the SD card The regulator comes in a semi circular package so make sure it matches up with the silk screened image eeeeees y r 4 2 d o ah 0 0 Ol a gt ho pe AR o Ox y ea lor So hi gt Rlelele amp Sc ax lt o See a al 4q _ p EPE 8 e e eee do 4 An 10 shielc 1 0 shield vV KELEIER ed a oO Oo o o o o OSA FPS Ki FAL Pe FU eeeeee8 9 A Po dm e 1 A y aL gi Y ria PEUT E e EE EPEE SS 6 yv b 2222202 de dd P 44 eeertee TEELE AAA ath t A MS 8 OOOO ji 419 ly Y Fi S Turn the board over and solder clip the three leads Next 1s the reset button and the ICSP header These let you reset the Arduino manually and reprogram it directly with a AVR programmer The button will snap in it s symmetric so it goes in either way The header is also symmetric make sure the long end sticks up e a O DO 8 6 LIO gt 4 d gt gt ns LAA AL PIAR AA y sala eo oso 6 e b c 7 8 gt BA BIEAAIAOO e ee eur 0 1 1018 of 1 1g 644000 gt gt gt a C E E 04 Solder in both components Their leads are pretty short so you don t need to clip them Next are the three electrolytic capacitors C1 C4 and C9 Electrolytic capacitors are polarized so make sure
7. LWED OTC a MNN Cima gt u OUT Ay xe e i RE wate JA y i Va e i e z peg Z Ze Ze gt ee e iy 13 IN outnpay i 222 Fena 7 7 K x wt H sranmara ORS 19 DUST Idy o x i Place the shield PCB onto the Arduino so that all the holes match up with the header 4 LIA ah oh ah bal be JEJE SIE E An e eh A al i a Y Solder in each and every pin of header Next you can install the thumbwheel Use a 0 screwdriver Align the thumbwheel so it grabs the potentiometer and then gently screw it in place Ls 2O Otpry A Platys 5000 C po Y 7 3 J 3 N 2 a pa Pins 13 12 and 11 are used to talk to the SD card and can t be changed The rest of the pins however are more flexible Still for all the examples on the site we ll be using this wiring so it is suggested to just go with this You can use any sort of wire Solder the jumper wires in place Hooray you are done Now onto the user manual How to Use it Introduction The wave shield uses SD MMC cards They are extraordinarily popular sometimes even available in grocery stores They are used in MP3 players cameras audio recorders etc You can use any card that can store 32 MB to 1 0 GB A 1 gigabyte card can hold 380 minutes of uncompressed audio for the shield and costs 5 b You ll also need a way to read and write from the SD card So
8. SV they ll burn out amp die The voltage regulator used is the MCP1700 330 which can provide up to 250 mA of current There are 4 capacitors associated with the regulator C1 and C2 are the input capacitors they stabilize the 5V input C3 and C4 are the output capacitors they stabilize the 3 3V output There is a jumper that allows you to skip the regulator and use the built in 3 3V supply from the Arduino However it is not suggested as that supply is not guaranteed to provide the current necessary SD MMC card holder SD MMC cards are very popular small and inexpensive The card holder is what allows you to remove and replace the card easily They can be removed replaced thousands of times The top three pins are CD WP and COMMON_SW CD stands for card detect this is a mechanical switch that closes when the card is inserted WP stands for write protect this is a mechanical switch that closes when the card has the little side tab slid down to lock COMMON_ SW is the common connection for the two switches We simply connect this to ground Thus CD and WP will be grounded when active At the bottom are the power supplies There are 2 mechanical ground connections and a logic ground There is also the logic power connection connected to the 3 3v regulator In the middle are the data connections DAT1 and DAT2 are for advanced high speed SD card interfacing We don t do this so they are left disconnected DATA_OUT is the seri
9. al data out from the card which is connected to the SPI port of the Arduino DATA_IN is the input and SCLK is the clock input Since they must be 3 3V and the Arduino usually sends 5V data we use voltage dividers R2 R3 R4 and R5 to reduce the inputs down CS is the select line used to tell the MMC that we want to send it data This line is pulled low to ground when we want to send data to the card That means we need to make sure when we don t have anything connected the pin is pulled high to 3 3V We use R6 as the pull up and zener diode D1 to keep the voltage at 3 3V R1 allows the diode to bias properly when the Arduino pulls the pin high The microcontroller Arduino The library contains a bunch of specialized code The first part is a FAT16 library this is a set of functions that allow the chip to read the SD card locate files and read their contents The method it does this by is particularly detailed and you can read the SD MMC and FAT 16 manuals if you re interested Image stolen from Microsoft Take that Bill Once it opens a file and is ready to read it it looks through the first section of the file If it s a Wave file there will be all sorts of information stored in this header that will indicate the channels mono stereo etc bits per sample 8 to 32 sample rate ie 16KHz etc Basically the firmware verifies that it is mono channel 16 or less bits per sample and 22KHz or less sample rate Then it sets up the
10. audio interrupt that will go off sample rate times a second For example if its a 22KHz audio sample the interrupt will go off 22 000 times a second i Image from wikipedia The audio is encoded in PCM format This means pulse Code Modulation Lets say its a 16bit 22khz wave The audio waveform 1s sliced up 22 000 times a second and a corresponding value up to 16 bits from O to 65 635 is read from the waveform then that value is stored in the file Each sample is a unique value The file is not compressed This means the files are very large but the quality is very very good The SD card can provide 512 bytes at a time This is buffered inside the Arduino s RAM so that we have smooth playback Techinally its a double buffer which means we read 256 bytes and play 256 bytes then swap The audio interrupt picks one sample at a time and sends the data to the DAC digital analog converter DAC The DAC is a very simple device When you send it data it will convert that digital information back into an analog signal You ll notice it actually doesn t get the orignal waveform perfect The more bits of digital data the higher quality of audio reproduction CDs have 16 bits per sample While it would have been nice to have a 16 bit DAC the best option for this design was a 12 bit dac That s still quite good The microcontroller Arduino uses the DAC_CS chip select DAC_CLK data clock DAC_DI data and DAC_LATCH con
11. d in a loop This sketch is also included in the library PI party This example shows how to use the AT amp T text to speech website to speak the first 2640 digits of pi The number is stored in flash each digit is spoken one at a time Sample Code include include include include lt AF Wave h gt lt avr pgmspace h gt oil wave h AF Wave card Ple Es Wavefile wave FJ only one define redled 9 uint16_t samplerate void setup 4 Serial begin 9600 set up Serial library at 9600 bps Serial println Wave test panMode z OULTPUT pinMode 3 OUTPUT pinMode Ay OUTPUT sy panMode to OUTPUT pinMode redled OUTPUT 1 Leard inte cara 4 PUESTRIng ml Card ont Talled T return y ift card open_partition pu utstring AL NO partition o reuri if card open_filesys putstrang ni Couldn t open falesys 3 return if Card Open rootadrr tyy 4 PUEST Tang nil Couldn t Open due return putStr rng al Paes Tounds 7 LS void ls char namel 13 rnt ets tard reset dir puestring ni Paes Found while 1 ret card get_next_name_in_dir name if ret card reset dir return Serial println name tinto C tracknum 0 v id Loop 4 Pate E Dos dE char G Tamell I7 card reset_dir SCrolt through the tiles in the directory FOr 107 a lt tracknumt Le et A r card get_next_name_in_dir name IC eye 4 4 ran out of trac
12. e RAM amp lastra dedo laie nia ea doit bli del el ae dea lada 41 Generalna AAA A nn E 41 Sound sample crec 41 Dista audio Plans 41 PEDI AA o e ir oo e edt ncentateneacemameetune 41 A a a ee tren ar ae 42 Introduction The shield comes with an Arduino library for easy use simply drag uncompressed wave files onto the SD card and plug it in Then use the library to play audio when buttons are pressed or when a sensor goes off or when serial data is received etc Audio is played asynchronously as an interrupt so the Arduino can perform tasks while the audio is playing Can play any uncompressed 22KHz 16bit mono Wave wav files of any size While it isnt CD quality it is certainly good enough to play music have spoken word or audio effects Output is mono into L and R channels standard 3 5mm headphone jack and a connection for a speaker that is switched on when the headphones are unplugged Files are read off of FAT16 formatted SD MMC card Included library makes playing audio easy While the shield has been tested and works well here are some points to keep in mind The audio playback library uses 10K of flash so 1f you want to use an NG arduino you ll need to upgrade to an Atmegal68 chip About 600 bytes of SRAM are used to buffer the audio and keep track of file data so RAM heavy projects may not work well The shield can t play MP3 WMA Ogg or other compressed audio files It can only play uncompressed PCM WAV files
13. erera ipag Burnin a opRDPRJPQPoB o_____ a On CD insert Ask To impor CO import Using WAY Encoder Setting Custom Densitas 22 050 kHz 10 HE Mosa Sample Rate 22 056 kHz 13 Sample Sizes 16 bit rid Channels Mono Default Settings y Cancel Next find the files you want to convert Select Convert Selection to WAV from the menu Open Stream Subscribe to Podcast Convert Selection to WAV Convert ID3 Tags Consolidate Library Get Album Artwork Get CD Track Names Submit CO Track Names join CD Tracks Deauthorize Audible Account Option 2 Use SoX Option 3 Use Audacity If you dont have or don t want to use Tunes you can convert files one at a time with Audacity This is pretty easy You can use the free Audacity software available for windows linux or mac Grab it from the download page and install it on your computer Step 3 Start up Audacity and open the file Start up Audacity Audacity File Edit View Project Generate Effect Analyze Help L EA ED yyy ta l aa EE CCOO Project rate 44100 Cursor 0 00 000000 min sec Snap To Off y ee Select File gt Open and open the file In my case its an MP3 Select one or more audio files My Recent Documents Desktop My Documents K File name 21 Hey Jude mps My Network Files of type jal files 5 Places Open as read only 21 Hey Jude File Edit View Projec
14. ge the order of the tracks Now to mix From the menu select Project gt Quick Mix File Edit View Project Generate Effect Analyze Help I a Import Audio Ctrl I Es Import Labels ya K Import MIDI Import Raw Data 43 Edit IDS Tags Quick Mix 1 00 New Audio Track New Stereo Track Mew Label Track Mew Time Track 21 Hey Jud Y Mono 441 00Hz 32 bit float Mute Solo O Remove Tracks A few seconds later you have converted your stereo track to mono Step 5 Convert to 16 bit audio If your audio rate 1s higher than 16 bit you will want to downconvert it Click on the track title and select Set Sample Format gt 16 bit a ng yll Y A tbc NATA ed AUN Lia Me Mame Move Track Up Move Track Down la eS Wi aveF orn Waveform dB Pyne ll IT An ie alai al sde Liba ik ab ll u Spectrum Pitch EAC Mona Left Channel Right Channel Make Stereo Track Split Stereo Track Set Sample Format P ana Bo feet Rate 32 bit Float Pie steed ee dia FIA E E A Pees To ee tracks Step 6 Convert to 22 KHz or less Finally make sure the audio file will be saved as 22KHz If the the track label says 44KHz you will want to convert it At the bottom of the window there is a little button named Project rate Make sure this is 22KHz or less Project rate 22050 Cursor 0 00 000000 minsec a000 Hz 11025
15. in parallel for up to 200mA output at 5V This means it can provide 1 8 W into an Sohm speaker or 1 4 W into 4ohm speaker This isn t enough for a boom box but its good for headphones and small speakers The output is filtered through a bypass capacitor C9 which will keep any DC voltage from going to the speaker which could damage it The headphone jack is stereo which both mono channels connected in parallel This gives the most power output There are internal switches in the jack so that when the headphones are removed the audio flows to the speaker connection next to the jack Parts list Check to make sure your kit comes with the following parts Sometimes we make mistakes so double check everything pats amp SE Image Name Description Da Distributor Qty 3 3V linear li ei nigee MOITO Digikey 2S0MA 3302E TO Mouser i current Digikey Mouser 12 bit DAC MCP4921 High current _ Digikey 1 opamp TS922 AJN Mouser SD MMC Tyco ole ea T 10K Audio thumbwheel potentiometer 311 TMI1 Includes pot 1204F Mouser thumbwheel 10K and tiny Screw Stereo a headphone N Mouser jack with Digikey tch STX Do 3100 5NB 1 4W 5 1 0K resistor Brown Black Red Gold Digikey Mouser 1 4W 5 1 5K resistor Brown Green Red Gold Digikey Mouser 1 4W 5 10K resistor Brown Black Orange Gold Digikey Mouser 1 4W 5 100K resisto
16. ks start over tracknum 05 return puUEsString n rPlaying T Serial prin name E reset Ghe directory so we can tind the file Gard reser air 3 playcomplete name tracknum void playcomplete char name lti t porra Le uint32_t newsamplerate playfile name samplerate wave dwSamplesPerSec while wave isplaying Ef yo can do sturt here delay 500 card close file f void playfile char name f card open_file name LE LEY E putsiring nl Couldn t open ale y return if wave create f putstring_nl Not a valid WAV return OK time Lo play wave play
17. l want to convert it to the right format This way you will get the highest quality audio Step 2 Check the file If you have a wave file already you should check to see if its already in a proper format That way you will save yourself some time In windows right click on the file and select Properties then click on the Summary tab 80 wav Properties General Summary Property Audio o Bit Rate 256kbps 4 Audio sample size 16 bit 4 Channels 1 mono 4 Audio sample rate 16 kHz Audio Format PEM This file is 16KHz 16 bit mono PCM Since thats below the maximum 22KHz 16 bit mono PCM you are good to go No need to convert the file OK lets say the file is an MP3 or 44KHz or stereo wave file We will need to convert it down Option 1 Use iTunes You can do the conversion easily with iTunes available for Mac Windows if you have your music in iTunes already this will be super fast to convert multiple files You ll have to set the preferences first but you only have to do it once WA File Edit Controls Vier About iTunes iTunes Hot Tips Preferences Shop for iTunes Products Provide iTunes Feedback Check for Updates Services Hide iTunes Hide Others Show All Quit iTunes Go to the Advanced gt Importing tab Make sure it is set to 22KHz or less 16bit or less and Mono channels Click OK Advanced J OBBe qn y Bl Conrad Podem Pta Share Sort Afrinted Parental Apple TY Smc C
18. metimes you can use your camera and MP3 player when its plugged in you will be able to see it as a disk Or you may need an SD card reader Step 1 Format The wave shield needs the SD card to be formatted in FAT16 format To format the card place it into your card reader then right click on the disk and select Format Open Explore Search PartitionMagic 8 0 AutoPlay emowable Disk 1 4 Removable Disk H 4 Sharing and Security wes gt We SVN Checkout Tortoises d Local Scan with Alt 2 Add to archive JS Add to Archive rar Compress and email 3S Compress to Archive rar and email Eject Make sure that in the File system pulldown menu that FAT is selected and not FAT32 Format CANON_DC G AE File system FAT Allocation unit size Default allocation size CAMOM OC Format options Quick Format Enable Compression Create an M5 D5 startup disk And click Start If you get the Properties of the card you will see it is FAT formatted This card has some files on it so its not completely empty CANON_DC G Properties General AutoPlay Tools Hardware Sharing Type Removable Disk File system FAT MW Used space 45 940 736 bytes 473 0 MB lO Free space 461 176 8532 bytes 439 MB Capacity 507 117 568 bytes 453 MB Drive G Intro The wave shield is designed to play a very specific type of audio If your music sample is in MP3 format or 44KHz wavy you l
19. nd like The best way to determine if the quality is good enough for your project is use Audacity and go thru the steps in the User Manual for converting MP3s and other files to 22KHz 16 bit format Can this shield record audio There is no hook up for a microphone so there is no easy way to record audio There is also not enough program space on the current Arduino chips atmega168 to support recording audio and saving it to the SD card as well as playback What pins are used by the shield Pins 13 12 11 are always used by the SD card they are the only pins that have a high speed SPI interface Then there are 5 other pins used to talk to the DAC and SD card but they can be set to connect to any arduino pin However by default the library 1s configured to use pins 10 for SD card and pins 2 3 4 and 5 for the DAC To chanage these pins requires modifying the library the pins are referenced by their hardware pin names 1e PORTD etc not by arduino pins That means pins 6 7 8 9 and the 6 analog in pins also known as digital 1 0 pins 14 20 are available Overview Here is an explanation of how the wave shield works We ll go section by section You ll want to refer to the schematic Voltage regulator The easiest thing to understand is the 3 3V voltage regulator This takes the 5V supply from the Arduino and converts it to a nice 3 3V supply This is necessary because SD MMC cards only work on 3 3V If you give them
20. r Brown Black Yellow Gold Digikey 1 4W 5 4 7K resistor a yellow purple BLE 0 luF ceramic capacitor 104 aves ee Mouser like the 0 01uF ceramic capacitor 100uF 6V capacitor Digikey Mouser 0 01uF ceramic capacitor 103 May look deceptively like the 0 1uF C8 ceramic capacitors Lately has been shipped in an axial not radial package See instructions for details 3 6V Zener Digikey diode DS Mouser RESET 6mm tactile B3F 1000 Digikey switch Mouser 6 pin ICSP Digikey header Mouser 36 pin male Digikey 1 A header 1x36 Mouser EMS Adafruit PCB Circuit board Industries 1 RobotShop ICSP Make it Get ready by placing the PCB in a vise A OOOO TAI pr pS Mal AN 5644 Uu44U4 DDD AA 0 1 14510 ey _ a eeeeee agoa gt gt 4 a bin D 7 lv i ee ko gt eeeeeeee 0 00035000 on a nan 7 We re going to the SD card first While surface mount parts are a little tougher than thru hole this piece has pin spacing of 0 1 so it 1s quite easy Doing it first also gives us lots of working room The holder should snap perfectly into place thanks to two bumps on the bottom ALELLA OOOO rw AE jeeeeeeee 000000 SY A TITUS GZ BOAL LIGIEIOO oto EUY gt p eeoceee opga AAA o le C s g ee oe AO eee Hoe 4 6 eliehe a Liri feji e 56 AAA a 10
21. s O AACA ee ee ee d 5 CO i a a rr recorro lO Lee coesegss 4600 540 6 HA 0090994 rm et 000o0a TEE TEE gt is o gt ES lt S 22000000 7 es OSOS O ow lt 6 TOY rw OT TIZT PRA ship c o os 8 6 Ji J T 48d ns 569 Lge ee s3 Pa eee Bis Sees Cie Audio shield v1 9 Se Seeeeeeo S OeGOUY NV 197 0 1 18 1610 Once you re sure you have C8 correct you can place the remaining 0 luF ceramic capacitors C2 C3 C5 C6 and C7 Ceramic capacitors are non polarized and can go in either way Solder and clip the capacitors Next is the DAC digital analog converter IC2 This is what turns the data into music Make sure you pick the DAC to solder in here it says MCP4921 on it and has a stylized M The chip has a notch in one end and that notch must line up with the notch in the silkscreen In this photo that s on the right Flip over the board and solder in each pin of the chip The pins are already quite short so you don t have to clip them Next is the operational amplifier op amp IC3 It is used to buffer and amplify the output so that it can drive a small speaker or headphones This is a similar looking chip to the DAC Again check that the notch matches the silkscreen notch In this photo that s to the left Solder it in just like you did with the DAC Next is the 3 3V regulator IC1
22. s Shown as 1 5K this is a mistake It was too flakey for me and I reduced the resistance Make sure you place a 1 0K resistor in R1 Solder the components Next comes the 3 6V zener diode A diode is sort of resistor shaped except that it has a black stripe on one end Diodes are polarized and must be placed the correct way to work so make sure that the black stripe on the diode matches the white stripe on the silkscreen position indicator O A OE f w 3 3 1y i Oo 1 eeraa 16 0000000 eee 640500 b exito O Bot TT sees 0 11 Next is the 0 01uF ceramic capacitor C8 The tricky part here is that in older kits there are many 0 luF ceramic capacitors in the kit that look identical to the 0 01uF The way to tell the difference is look for the 103 printed on it If it says 104 then it s a 0 luF Make sure it says 103 This capacitor forms the output low pass filter for the audio so its important to have the right value Lately I have been shipping kits with axial long ways package not radial side ways package These are longer see left and are easy to bend over for soldering This way there is less confusion Either way try to spot the 103 marking Place the capacitor right next to R7 Ceramic capacitors are non polarized and can go in either way i i Ww ol 2 Si j o vil y O yl ai C Gg z y Y E mez SB xx el f o Z s AA Solder and clip the small capacitor lead
23. s 1 mono Audio sample rate 22 kHz Audio Format OK Now you can go to the next step which is formatting an SD card and copying files over Troubleshooting amp Extras Getting Stack overflow errors These examples are all tested to work with v13 or higher so try to use that if possible Get more RAM amp Flash Before you try to play audio you ll want to free up some Arduino RAM so that you don t end up with a nasty stack overflow Especially if you re running a Atmegal68 based Arduino Follow these instructions on how to get more RAM by reducing the input Serial library buffer You dont need to do this if you re using an ATmega328 although hey it wont hurt Note that the library is pretty big about 10K so if you want to do a lot more I suggest upgrading to an ATmega328 The shield was designed with the expectation that this part would be available Generating speech If you want a human voice in your project you can use the free generator at AT amp T Text to Speech demo page It will create a 16KHz 16 bit audio file so you can use the audio right out of the box http www research att com ttsweb tts demo php top Sound sample library There is huge a collection of C C available online Attribution licensed sound samples A lot of it is already mono 16 or 22K Hz http wiki laptop org go Sound_samples Digital audio player This is the simplest example It plays every audio file it finds on the SD car
24. so A 0 4 070 r gt d k 4 L ro Ad O E P aF y A D x i 5 a o Ka e KJ OI e er Y se if lt Tie F 8 6 Ot tr ct etpubsou y o E ETE AS 619 eee A gt Solder the leads to the pads metal ring by heating both with the side tip of the iron for 3 seconds and then poking in a bit of solder 4 LLEE ETOY tooo HO9OOOD Use your diagonal cutters to clip the leads off just above the solder joint Next place the three 4 7K resistor R3 R5 and R6 Make sure they go in the right locations If you re using the shield on an NG arduino use a piece of wire instead of R5 e Los 3 SA Boe LAMA v ete Y Lt gt eel gt f eels Hie e y gt Hide Bie COCR Owe 7 i A Fe gt y e E kd 13 24 A dd ife gt leleje ef bo vn Ss Te S dE 1 zc 57 RC e xy yu 9 30 A a od gt 4 a ac Audio shield v1 8 po e Solder and clip the leads of the three resistors Sce0e0 ee O Seeseeees ee 44 4 gt eee O oo AAA AAE 440 S S 6 e 6 M 4 O o o o E gt Seeteeee 5646 0OVIO00 seen eeenene se o t E t 5 gt gt gt gt 2 gt tp uuwwladyada net Sho mate uausnield c SS Finish up the resistors by placingR8 100Kohm E R1 1 0K and R7 1 5K In the photo R1 i
25. t Generate Effect Analyze Help all ET 441 00Hz Te 32 bit float hute Solo Mama alioli anid Click and drag to select audio Project rate 44100 Cursor 0 00 000000 minsec Snap To Off Cancel Audacity will spend some time uncompressing and opening the file and then present you with something like this Step 4 Split and Mix a stereo track Next 1f you have a stero track you ll probably want to turn it into a mixed mono track That way it will sound most like the original Click on the title and select Split Stereo Track 1 00 0 1 00 1 0 Mame 4 00 2 00 3 00 en O L Ada MU Spectrum Pitch EAC WH Split Stereo Track i a A qe the order of the tracks Set Sample Format Dire Set Rate Next when you mix a track you ll end up adding both of them together This means that if both sides are loud you ll get distortion Reduce the gain on both tracks to 6dB Left 441 00Hz 32 bit float Mute Soho 21 Hey Jud Y Right 44100Hz 32 bit float Mute Solo Mig Gain 6 dB SF 1 PO Dran the lahal waarcicalhe da hara tha order af tha tar Then convert both tracks to Mono by clicking on each title Make sure you do it for both tracks ee ds 21 Hey Jud W 1 0 Mame Move Track Down waveform dB Spectrum Pitch EAC R gt IC ph Left Channel Right Channel Make Stereo Track Set Sample Format Set Rate F Dre i
26. vert the digital to analog pins to send the sample data over The DAC also has a Vref input this is the reference voltage that it uses to define the maximum analog value it can generate There is a very low low pass filter connected to it C6 and R8 so that any digital noise there is a lot will not make it into the audio signal There is another low pass filter connected to the output of the DAC R7 and C8 This is for filtering out the square wave component you see in the recreated audio wave Even though the noise is only 1 4096 ths of the signal about 1 2mV its still noise and these two components filter out anything above 11KHz The reason the filter cut off frequency is 11 KHz and not 22KHz is that if you sample at 22KHz you will only be able to reproduce frequencies at half that rate 11 KHz This is the Nyquist theory It is sneaky but true If you try to sample 16KHz waveform at 22KHz it will actually sound much lower it will play at 6KHz it is mirrored around 11KHz Analog output Finally there is the volume control and output stage The potentiometer acts as a simple volume control It simply divides down the analog signal from 5Vpp down to as low as OVpp The pot is audio type which means that the voltage changes logarithmically which our ears interpret as linearly The analog signal then goes into a high output rail to rail opamp This op amp can provide up to 100mA per channel The two channels are hooked up
Download Pdf Manuals
Related Search
Related Contents
DC and DCC Operation of Atlas Gold Series Diesel Locomotives V7 Dual Connector ON-THE-GO Flash Drive 32GB Copyright © All rights reserved.
Failed to retrieve file