Hi,
I've been trying to have an Arduino randomly choose a short mp3 file from an sd card and play it through a small 8ohm speaker and almost got it, but need help.
The SD is connected to the arduino using a logic level shifter (soldered to the SD pads, not using a shield or breakout board). Using the built in SD library I can read and write files consistently without problems.
Then I tried playing an 8bit,mono,8khz Microsoft wave file, by attaching the speaker to the ground rails and to the digital output pin through a 100ohm resistor.
It plays, but the volume is very low. I think that it's also slow and a bit choppy, but the volume is actually too low to tell.
I reckon I need to amplify the signal somehow.
Tried using an npn transistor with 5 volts. Didn't change anything.
Tried creating an audio amplifier using an LM386,but doesn't work either.
Before starting to provide schematics and discuss rc filters and capacitor sizes, I feel I know to little than to even choose the best or proper course of action.
My reasoning tells me the missing part here is an amplifier of sorts. Am I even right? Is the "nature" of the audio signal coming out of the digital pin even "amplifiable"