How to wire a piezoelectric buzzer

Dear fellow hackers,

I have bought a few components from Jaycar. (The Australian equivalent to Radio Shack) I have already had success constructing a breadboard with a blinking LED. So far so good. The next component I'd like to attach is a piezoelectric buzzer. The component description is here:

http://www.jaycar.com.au/productView.asp?ID=AB3466

A fellow on the #arduino channel said this might draw too much current and damage the board (the board is actually a Freetronics Eleven, if that matters). So I would like some help setting up the circuit. Also, I was informed that you don't need to use the tone() function with a buzzer - is that right?

Thanks in advance!

Jhanarato Bhikkhu

Have you tried to google this? I am sure there is a lot out there about this. It is very basic and most beginners go through this phase?

You need to use the tone() function because to get a sound you need to vibrate the piezo at high frequency. Tone() will do that, or you can do it in your own code.

10 seconds on the site turned this up http://arduino.cc/en/Tutorial/Tone

Dear marco_c,

Indeed I have googled this, and I did look at the tone() example. However, I do not know whether a piezoelectric buzzer works in the same way as a speaker. One fellow on IRC suggested that you don't need to use tone() at all. What would happen if I just connected one lead to 5V and the other to GND? Also, I got some advice on #arduino indicating I might need to use a transistor. There is no transistor specified in the tone() tutorial. Perhaps he meant "resistor", but I don't really know.

Sorry to be a pain.

J.R.

marco_c:
Have you tried to google this? I am sure there is a lot out there about this. It is very basic and most beginners go through this phase?

You need to use the tone() function because to get a sound you need to vibrate the piezo at high frequency. Tone() will do that, or you can do it in your own code.

10 seconds on the site turned this up http://arduino.cc/en/Tutorial/Tone

"Buzzers" usually output a fixed frequency tone all by themselves when you apply voltage. The tone() function won't work with them.

jhanarato:
What would happen if I just connected one lead to 5V and the other to GND?

Probably not much. The buzzer is designed for 12V operation, you'll need an external power supply to use it (or a voltage booster module).

jhanarato:
Also, I got some advice on #arduino indicating I might need to use a transistor.

You need a transistor if the current needed for the device is more than 20-30 milliamps or the voltage is higher then 5V and you want to use an external power supply.

Thanks fungus,

I think I understand now. Basically the buzzer needs a voltage switched on and off very quickly. Looking at the Jaycar page for the buzzer it is rated at 6-14VDC. So, it needs more voltage than the arduino can supply, right? Actually I wanted to get this component:

http://www.jaycar.com.au/productView.asp?ID=AB3462

It is rated at 3-16VDC, so might this work? It wasn't in stock, so I ended up with this:

http://www.jaycar.com.au/productView.asp?ID=AB3466

Thanks again, fungus. :slight_smile:

J.R.

jhanarato:
I think I understand now. Basically the buzzer needs a voltage switched on and off very quickly.

The ones I've seen switch it on and off themselves, internally.

You just apply a constant voltage and they buzz.

jhanarato:
Actually I wanted to get this component:

http://www.jaycar.com.au/productView.asp?ID=AB3462

It is rated at 3-16VDC, so might this work?

That one should work, yes. Voltas and amps are within Arduino range.

jhanarato:
Thanks again, fungus. :slight_smile:

Karma is added using the little green crosses on the left...

This buzzer has a fixed noise frequency, which means it will generate that sound frequency itself if you simply apply a sufficient voltage.

You don't have to generate any oscillating voltage yourself to drive it.