Änderungen

SimpleSDAudio

847 Byte hinzugefügt, 11:45, 3. Apr. 2013
/* Usage */
== Hardware setup ==
=== SD card connection ===
The SD card should be connected to the SPI port of the controller. The chip select pin from the card can be connected to any free digital pin, but if pin 4 is used on Arduinos you don't have to adjust the source code. Many shields with SD card support like Ethernet-Shield will work. You need level conversion circuits from 5V to 3.3V for most Arduinos (except those that run natively on 3.3V) - three resistor dividers are enough. Look at the circuit diagram below how to do it.
According your mode configuration, one or two pins are used for audio output. This pins can not be changed and are different between different Arduino boards. For ATmega168/328 based plattforms those are pins 9 and 10. For ATmega1280/2560 those are pins 44 and 45. For other plattforms look into the file SimpleSDAudio.h.
<gallery widths=300px heights=150px perrow=2>
Datei:SD_Card_Connection.png|SD card connection with level shifting to standard Arduinos
</gallery>
 
=== Audio output connection ===
Be careful that the audio output pins are digital ports that carry a positive voltage between 0V and 5V. It is not a good idea to have a DC voltage at line-inputs or smaller speakers as there will be a steady current flow. Therefore at least a resistor and/or a capacitor should be connected in series. For a start use at least 100 ohm or a capacitor between 100nF and 100uF. For line inputs use a voltage divider or poti to reduce the voltage.
</gallery>
=== Audio amplifier for loudspeakers ===If you want more power, you can build a cheap class-D PWM amplifier based on the 74AC14 (hex Schmitt-trigger inverters). The coils are optional but should be used for RF reject when long cables are used.<gallery widths=300px heights=150px perrow=2>Datei:PWM 8Bit MonoAmplifier Steckplatine.png|8-bit mono amplifier on breadboardDatei:PWM 8Bit MonoAmplifier Schaltplan.png|8-bit mono amplifier circuitDatei:PWM 16Bit Amplifier Steckplatine.png|16-bit stereo amp on breadboard, use trimmer to adjust for lowest noiseDatei:PWM 16Bit Amplifier Schaltplan.png|16-bit stereo amp circuit</gallery> === Build your own SD breadboard adapter ===
Follow those pictures to build a very cheap SD-card adapter.
1.995
Bearbeitungen