Propeller and piezo buzzer issue
stevovee
Posts: 18
I have a project where I was driving a piezo buzzer (digikey part number 445-2525-1-ND) directly with my propeller and it worked fine but we were looking to get a little more volume out of it. Since the project has a nice switching 5v supply on the board we figured we could just use a transistor (digikey # 2N3904-APCT-ND) to switch 5v through the buzzer. When I attempt to do this I can tell that something is happening with the buzzer but it really isn't buzzing but more or less making barely audible white noise. I have attached a picture of how I have it wired in the schematic I was just wondering if anyone has any feedback as to why I'm having issues with this. I'm driving it the same way I was before by simply calling the output pin attached high, delay, calling it low, delay and repeat.
Comments
This is a piezo transducer, not a buzzer or even a speaker but what's more is that a piezo's load is capacitive, not resistive or inductive. This means that you need to drive it with an AC waveform which when you had it connected directly to the I/O pin it did by driving high then low. Now with the transistor you are only applying DC. Have you tried differential drive by connecting to two I/O pins and driving them in differential mode, which the counters also support?
If you need it really loud I have used two transmitters from an RS232 chip in differential mode to drive the piezo at 18Vpp. Even single-ended it would be loud. There are other solutions too.
See this link for more reference:
http://forums.parallax.com/showthread.php/62310-Amplifying-piezo-speaker?p=466534&viewfull=1#post466534
They use the same circuit you are using except they hake a 1K resister across the buzzer.
I would think this resister would increase the volume quite a bit.
Other driving methods, such as those in Beau's post, can essentially double or more the volume over the simple circuit with the 1K resistor.
Duane J
Technically the simple circuit with 1K resistor is driving the piezo device with a square wave of about 1/2 of VDD, 1.65V for a Prop. Actually it will be even less than 1/2 of VDD because the resister only cause something like an RC discharge path.
Those push-pull circuits can drive the piezo with a full VDD square wave.
An even higher volume can be gotten with the simple circuit. Instead if a resister use an inductor. The effective drive voltage can be several times VDD.
Of course, one must make sure the transistor never can be turned on continuously, even when the Prop is not running. It takes a bit of experimenting with the piezo device and inductor values. Once you get it right these can be quite loud.
Duane J