Go Down

Topic: Can I play wav files using a buzzer ? (Read 96 times) previous topic - next topic

amonaldo1996


Hi,

I'm currently working on a Arduino Audio Player that plays a wav file from SD Card using PWM Output.

I tried to play wav files with a speaker and also with headphones, connecting the first jumper wire to digital pin 9, and the second one to GND. It worked, and I could hear the music but only as long as I'm fixing the wires as I didn't find a suitable to solder them.

So I would like to know if I can use a buzzer to play the music, because with a buzzer I can just put the two wires inside it without having to solder.

Thanks in advance

Grumpy_Mike

Quote
So I would like to know if I can use a buzzer to play the music,
Try it but my guess is that it is not so good.

A phobia of soldering irons is not a good thing to have in this hobby.

DVDdoug

Quote
I tried to play wav files with a speaker and also with headphones, connecting the first jumper wire to digital pin 9, and the second one to GND. It worked, and I could hear the music but only as long as I'm fixing the wires as I didn't find a suitable to solder them.
You should have a series resistor with a regular 8-Ohm speaker or headphones.   The maximum allowable current from an Arduino I/O pin is 40mA.   From Ohm's Law 5V/0.040 = 200 Ohms minimum.   You'll loose volume with the resistor but you won't fry your Arduino.

Or, you can use "powered" computer speakers.  

Quote
So I would like to know if I can use a buzzer to play the music..
There are two kinds of piezo devices.  

A "buzzer" usually has a tone generator built-in.   You apply 5V and it makes sound.  The frequency is determined by the built-in electronics.

A piezo transducer/speaker reproduces the sound fed-into it.   For example, you can generate different tones/frequencies with the tone() function.    A piezo speaker is a tweeter (it only reproduces high frequencies...   No bass and very little midrange.   Musical greeting cards use piezo speakers.

Go Up