Hello Arduino community,
I'm new here, and I'm more or less new to electronics and to Arduino specifically. I'm mostly playing around with connecting different components and trying to get stuff working.
I am working on a Piezo Buzzer which must sound on command from a java program with a specific pin on a raspberry pi.
The problematic is the same that if it was an arduino(I suppose.).
Here the specifications of the equipment:
Piezo Buzzer: Piezo Transducer - 15V Buzzer (2800Hz) | The Pi Hut
Transistor: 2N2222
Raspberry: Pi 3 Model B+ (a pin like the GPIO 2, when set to HIGH deliver 3.3V, as Arduino)
I have questions on my circuits, because whatever I am trying, impossible to make working my buzzer.
My first try was like the following schematic:
Unfortunately, the buzzer was noising randomly. Sometime it was buzzing (1/10), sometime it was not(9/10).
I though it was coming from a component which was defective. I replaced everything and I had the same result.
Then I though it was from my buzzer which wasn't working well with only 5V but it is when the piezo is connected directly to the 5V pin.
Then I though it was with my schematic which was wrong.
I searched on this forum and saw previous post about "how to connect a piezo buzzer":
https://forum.arduino.cc/index.php?topic=380219.0
https://forum.arduino.cc/index.php?topic=526417.0
Some answers tell us to:
TonyWilk:
[...] add a 100ohm resistor across the piezo.[...]
lawrence_jeff:
[...]the answer is in fact that the piezo needs a resistor in parallel when used with this circuitIt doesn't when directly connected to the arduino pin so it must sink current when the tone low function goes low... when you add a transistor the negative pin of the piezo (in this diagram) stays high due to the capacitance[...]
I tried like the following schematics with 1K ohms to 220 ohms for the resistance in parrallel:
Unfortunately, No sound. I just hear a little pulse but no real noise.
Then I though it was about oscillation or it requires an AC drive.
MarkT:
Yes nothing happens because a piezo element is a capacitor(*), so DC drive is not possible, you must use
AC drive, aka push-pull, and expect no net DC current to flow.(*) all large-value ceramic capacitors are made out of the same basic material type as piezo transducers
But in the specifications of the buzzer it is describing that:
This buzzer requires no external oscillation, simply place a DC voltage across the terminals and it will make noise!
I am totally blocked, I don't know what to do.
I know that it requires a voltage between 9V and 15V but it noises when I set directly to the 5V pin.
Why it isn't when I set a simple transistor. I don't get it if you can help me.