I have a piezo bender that I am using as a buzzer. I'm using an Uno (5V) and the Arduino tone() function at 4100Hz. There is a 100Ω resistor is series. The datasheet says the capacitance of the bender is 1nF at 1kHz and the resonant impedence (max) is 1kΩ.
Is it possible to calculate or estimate the average current from the above information?
See if you can wade through these posts. http://forum.arduino.cc/index.php?topic=352943.0
The outcome (for me) is that the piezo is connected between two output pins (bridge mode).
Therefore the internal resistances of the pins are in series.
That should (almost) be enough protection.
No harm to use some series resistance (e.g. 100ohm).
Leo
Wawa:
Therefore the internal resistances of the pins are in series.
That should (almost) be enough protection.
Are you saying that if you (as happens instantaneously when you reverse the polarity to the capacitive piezo device) connect two Arduino pins in opposite states, together, it does not matter because their ESR adds together?
I think I got this wrong.
Ports and piezo are in series, but the piezo can still be charged when the polarity flips.
Current must also be flowing through the protection diodes, e.g when one pin is high and the other port switches from low to high.
I think this piezo driving is breaking most of the recommendations of the datasheet.
Leo..
Wawa:
Current must also be flowing through the protection diodes, e.g when one pin is high and the other port switches from low to high.
Actually, that does not necessarily happen.
The high-side driver FET can source current, but it will also sink it if the pin tends to rise above VCC. Essentially, its source and drain are swapped, but these devices are fairly symmetrical.
I had already scanned through that long thread. But I wasn't asking here about whether my Arduino was properly protected or what the best circuit to use is, although those are both important and related questions.
Here is some information from Murata, which manufacturers piezo diaphrams (aka "benders"):
What I really want to know is approximately how much average current is drawn. Even a rough estimate would be useful. Microamps? Tens of microamps? Hundreds? Milliamps? Tens of milliamps? I don't trust my $25 DMM to provide this number.
Suppose I measured the DC current drawn by the Uno or delivered by the battery, with the piezo tone on and off. Would the Uno even out the AC nature of the current or would it just it pass it through? Is there some way to even it out with capacitors? I don't know what I'm talking about.
I advised in another post to put a 1ohm resistor in series with the piezo.
And use a 2-channel scope on either side of the resistor.
With a bit of scope-magic you can see the voltage spikes across the resistor (= current).
Leo..
I don't have an oscilloscope. I've been resisting spending that much money on this little hobby but I see the day coming where I will have to part with a few hundred dollars so I can answer questions like this. I am a little surprised that nobody is able to make even an order of magnitude guesstimate as to what the current would be.
I put my DC ammeter on the battery input to the Uno. When I connected the piezo the reading went up by approximately 0.5mA. Whatever that means.
jboyton:
I put my DC ammeter on the battery input to the Uno. When I connected the piezo the reading went up by approximately 0.5mA. Whatever that means.
Piezos are efficient, so 0.5mA average for the sounds is possible.
The problem is that a piezo is a capacitor and the Arduino output is digital.
That results in high peak currents during digital switching.
Stick your head in the sand, or use a 100ohm resistor.
Leo..
I am using a 100Ω resistor, but I can't say that it's because I know that's optimal or even necessary. It's just something I read I should do. If the impedance at the resonant frequency is 1kΩ then is a series resistor needed? I don't know. I just want to hook this thing up and use it and have some sense for how much of my battery it's eating up. Doesn't anyone else use a piezo to make a little beep sound?
The impedance at resonance frequency might be ~1k.
But at the switch frequency of a digital port (>1Mhz) is might be 10ohm.
Leaving the resistor in circuit is not effecting the sound that much.
But is reduces the potentially harmfull switch currents.
Leo..
This thread caught my attention and I wanted the same general information the OP asked about... so I ran a test and here are the results.
Setup: Arduino UNO, 5v, 16Mhz
Test Hardware: Atmel Power Debugger
Piezo: 6.5Khz, 20mm diameter from Digi-Key
Current limiting resistor: 100 Ohms between the Piezo and GND.
Sketch:
void setup()
{
Serial.begin(9600);
Serial.println("I'm Alive!");
a = 5000;
delay(1000);
}
void loop()
{
tone(8,a,250);
delay(500);
a = a + 100;
Serial.println(a);
if (a > 7500)
{
a = 5000;
delay(1000);
}
}
The current drain to start the piezo is 3-5mA above the baseline consumption, it then settles to 0.5-1mA to keep the tone going.
The phantom lines in the image show that there are many noisy current spikes in the background, the "Hi Res" results from the Power Debugger. The average consumption is the bright red line. Both are plotted against the right axis.
If the piezo is a pure capacitor of 1nF, you can use the standard equivalaence for a cap
Z = 1/(2 x pi x F x C)
if F is 4100Hz, Z = about 39000 ohms.
If you apply 5v p-p, this is 5 / ( 2 x SQRT (2) ) vrms ie 1.76vrms.
So the current will be 1.76/39000 or about 45 uA rms..
This isn't quite true, since the harmonics of the square waves make this a bit more, and I haven't taken into acount that the impedance is in fact complex. But it'll be near enough
jboyton:
I have a piezo bender that I am using as a buzzer. I'm using an Uno (5V) and the Arduino tone() function at 4100Hz. There is a 100Ω resistor is series. The datasheet says the capacitance of the bender is 1nF at 1kHz and the resonant impedence (max) is 1kΩ.
Is it possible to calculate or estimate the average current from the above information?
You can "calculate an estimate" at resonance using the impedance figure as if it were resistive which should be somewhere close, but in reality you'll just have to measure it.