Author Topic: Piezo buzzer's current consumption confounding me  (Read 6999 times)

0 Members and 1 Guest are viewing this topic.

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1477
  • Country: gb
Piezo buzzer's current consumption confounding me
« on: August 01, 2016, 04:29:03 pm »
I have been playing around trying to get a handle on the current required to drive a piezo buzzer in various configurations. But, the numbers I'm measuring don't make sense to me - or, rather, seem unrealistically low.

First, I tried using an external BJT NPN transistor (a BC337) to drive the piezo, with a 1K resistor in parallel with the buzzer. Current measured at 2.8mA. Next, given that the current was so low, I figured why bother with an external transistor, when I can drive it straight from the MCU's I/O pin? So hooked it up with a 220R series resistor to provide some kind of safe current-limiting just in case, and the same 1K parallel resistor across the piezo. Current measured 2.4mA.

However, I then figured that in this configuration the 1K resistor was redundant (when there is a permanent path to ground for the piezo, it doesn't need the resistor to discharge it in the off periods of the frequency cycle, right?), so I removed it and measured again. I was puzzled to see that now zero was registering on my meter. ??? After double-checking everything, I switched the range down from 20mA until it finally did register... around 5uA! :o Wha? How?

Surely a piezo buzzer cannot possibly be using that little current to produce a loud sound? I was expecting something in the low single-digit mA range - the spec sheet for this particular buzzer claims 7mA max. @ 9V p-p 4KHz. If it truly is drawing such a minuscule amount of current, it appears that the current consumption I measured in the earlier iterations was simply that drawn by the parallel 1K resistor (5V @ 50% duty cycle = 2.5V avg, so 2.5V / 1000R = 2.5mA).

Is it something to do with a piezo being extraordinarily efficient when driven at its resonant frequency? Or is the square wave signal somehow messing with the reading of my meter?

Circuit diagrams below if it helps.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #1 on: August 01, 2016, 04:40:43 pm »
1st - You did have your meter set to AC current didn't you?

2nd - I was reminded recently that most meters only measure AC current up to 1KHz ONLY (check you meter's specifications)

3rd - Since the waveform is probably a square wave, the meter need to be a TrueRMS type in order to give true reading since most assume sine wave for AC. (however, due to point 2 - probably redundant anyway)
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1477
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #2 on: August 01, 2016, 06:39:38 pm »
I'm not driving the piezo with AC; DC only, 0-5V 4KHz square wave, 50% duty cycle.

Was it not obvious from the circuit diagrams?
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Piezo buzzer's current consumption confounding me
« Reply #3 on: August 01, 2016, 06:40:28 pm »
Best to drive them with two pins of a micro out of phase.  We had a product where we turned a pot to get the resonant frequency for loudest point.  About a year later units started coming back.  Under a microscope the connections to the crystal has fatigue cracks.  Looking at the specs we were driving them at about 50% more voltage.  At resonance they are quite efficient but so is your ear to higher frequencies.   A Braun tri amped speaker had 60W for bass, 15W for midrange and 1W for tweeter.
 

Offline Kilrah

  • Supporter
  • ****
  • Posts: 1852
  • Country: ch
Re: Piezo buzzer's current consumption confounding me
« Reply #4 on: August 01, 2016, 07:26:10 pm »
The piezo draws short intense current pulses, your meter can't measure that, especially not in DC mode. AC may give you some results, but with questionable accuracy.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #5 on: August 01, 2016, 07:33:48 pm »
Quote
  I'm not driving the piezo with AC; DC only, 0-5V 4KHz square wave, 50% duty cycle.

Was it not obvious from the circuit diagrams?
What do you think a 4KHz square is?
DC or an AC waveform?

So, you got me thinking, how can you measure the average current......
Put a decoupling capacitor on the 5V, turn off the waveform and measure the current.
Turn on the waveform and measure the current, the difference between the 2 is the avaerage current going into the piezo
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1477
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #6 on: August 01, 2016, 07:55:49 pm »
What do you think a 4KHz square is?
DC or an AC waveform?

Well I say DC because I'm pretty sure technically it's not AC because there's no 'alternating' going on - the current isn't reversing flow, I'm just switching it on and off.

But if your point was that the periodic nature of the signal makes it difficult to measure with DC amps mode on a meter, then fair enough. However, my meter doesn't have AC current functionality. :( It's only a cheapy.

Soooo, if there's another way for me to properly measure the current, then...

So, you got me thinking, how can you measure the average current......
Put a decoupling capacitor on the 5V, turn off the waveform and measure the current.
Turn on the waveform and measure the current, the difference between the 2 is the avaerage current going into the piezo

When you say 'turn off the waveform', you mean just continuous 5V? What kind of value and type of cap would I need?
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #7 on: August 01, 2016, 08:04:07 pm »
Quote
But if your point was that the periodic nature of the signal makes it difficult to measure with DC amps mode on a meter, then fair enough.
Correct  :-+

Quote
When you say 'turn off the waveform', you mean just continuous 5V? What kind of value and type of cap would I need?
Yes, hold the piezo at 5v or 0V .
An electrolytic, 10uF or so, anything above that really, it is just to smooth out the AC current and give you an average going into the circuit.
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1477
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #8 on: August 01, 2016, 09:45:32 pm »
I tried the capacitor thing, but either I'm doing it wrong or it doesn't work.

Didn't have any 10uF electrolytics to hand, so I used a 47uF instead. I arranged things as follows:



(The multimeter is 'MR1' in the schematic.)

Then I changed my test code to go high on the relevant MCU pin for a couple of seconds, then pause for a second, then do a 4KHz 50% duty cycle square wave for 2 seconds, ad infinitum.

I still only got readings in the fractional milliamps. About 0.5mA for the first 'reference' period, then 0.1mA for the 'beep' period.

:-//
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #9 on: August 01, 2016, 10:06:20 pm »
Try it on the original circuit with the transistor driving the piezo and resistor.
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #10 on: August 01, 2016, 10:39:59 pm »
There something bugging me about the way you tried to measure with the capacitor and while brushing my teeth it came to me  :palm:

It will not work the way you have it because when the micro gpio pin goes low, it discharges the capacitor.

The measurement must be done on the voltage supply to the whole circuit. Take the differnce between the piezo off and being driven with the square wave. :-/O
 

Offline Seekonk

  • Super Contributor
  • ***
  • Posts: 1938
  • Country: us
Re: Piezo buzzer's current consumption confounding me
« Reply #11 on: August 01, 2016, 10:51:00 pm »
Using your very first drawing, try replacing the resistor with an inductor.  A common mode AC line inductor from some old low power electronics.  Put the coils in series( diagonal connection) and that should give enough inductance and about 10 ohms resistance.  That should be loud and low power.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #12 on: August 02, 2016, 01:43:18 am »
You are missing the trick, the piezo is effectively a series RLC network, and yes when driven with a square wave the CURRENT does oscillate, consider driving the thing WAY below resonance (so that the inductance is not a factor), drive the pin high, current flows into the element, increasing the voltage across the element capacitance, drive the pin low, current flows back OUT of the element discharging the capacitance.

Average current IS zero, RMS current is non zero, and average POWER is non zero but the current leads on the voltage by enough to make the real power small.

Regards, Dan.
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1477
  • Country: gb
Re: Piezo buzzer's current consumption confounding me
« Reply #13 on: August 02, 2016, 06:10:30 pm »
Try it on the original circuit with the transistor driving the piezo and resistor.

Ah, gotcha. I tried it with that configuration, and got the following results: 5.31mA during 'reference' period, 3.15mA during 'beep' period, making a difference of 2.16mA.

That seems more in line with what I'd expect for running at 5V, given the manufacturer's spec at 9V. But still seems suspiciously close to the current draw of that 1K resistor on its own. Unless this is completely mitigating that - I still can't quite get my head around what it is about using a capacitor like this that makes the measurement possible.

The measurement must be done on the voltage supply to the whole circuit. Take the differnce between the piezo off and being driven with the square wave. :-/O

Not particularly feasible, as I'm doing these experiments with an Arduino board powered over USB alone, so kinda hard to measure at the point of overall supply. One of those USB power measurement gadgets, would be handy, really. ;D

This is all a bit of an academic exercise anyway; I was only curious as to how little, approximately, the piezo would draw so that I could guesstimate how small of a 5V regulator I could get away with for powering my micro and all it's accompanying peripheral devices. Looks like it all going to be way below 100mA, which any old 7805 should handle, so all's good in that respect.

Using your very first drawing, try replacing the resistor with an inductor.  A common mode AC line inductor from some old low power electronics.  Put the coils in series( diagonal connection) and that should give enough inductance and about 10 ohms resistance.  That should be loud and low power.

I don't need it to be any louder. It's perfectly loud for my purposes as-is. That's also why I'm not bothering with driving it with a 'push-pull' configuration using two micro pins.

You are missing the trick, the piezo is effectively a series RLC network, and yes when driven with a square wave the CURRENT does oscillate, consider driving the thing WAY below resonance (so that the inductance is not a factor), drive the pin high, current flows into the element, increasing the voltage across the element capacitance, drive the pin low, current flows back OUT of the element discharging the capacitance.

Okay, I think I understand. In the configuration where the piezo is directly attached to the micro, when the square wave drive is 'off', the piezo element discharges back through the micro pin, so it is alternating direction.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf