How do you control the loudness level of a piezo buzzer?

Discussion in 'The Projects Forum' started by steven334, Aug 24, 2011.

  1. steven334

    Thread Starter Member

    Aug 9, 2011
    37
    0
    How do you control the loudness level of a piezo buzzer?
    thanks steven
     
  2. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Here's one way, but let hope it not the easy way!
    How-to-Amplifying-a-Piezo-Speaker-and-Volume-Control

    Here's some more general info:
    What is a piezo buzzer ?

    It's a "component" with a material having piezoelectric ability. Piezoelectricity is the ability for a material to produce voltage when it get distorted. The reverse is also true: when you produce a voltage, the material gets distorted. When you stop producing a voltage, it gets back to its original shape. If you're fast enough with this on/off voltage setting, then the piezo will start to oscillate, and will produce sound. How sweet...
    Constant duty cycle ? Why ?

    So we now know why we need to vary the frequency. This will make the piezo oscillates more and less, and produces sounds at different levels. If you produce a 440Hz frequency, you'll get a nice A3.
    But why having a constant duty cycle ? What is the role of the duty cycle in this case ? Remember: when making a piezo oscillate, it's not the amount of volts which is important, it's how you turn the voltage on/off1:

    when setting the duty cycle to 10%: during a period, piezo will get distorted 10% on the time, and remain inactive 90% on the time. The oscillation proportion is low.
    when setting the duty cycle to 50%: the piezo is half distorted, half inactive. The oscillation proportion is high, because the piezo oscillates at the its maximal amplitude, it's half and equally distorted and inactive.
    when setting the duty cycle to 90%: the piezo will get distorted during 90% of a period, then nothing. The oscillation proportion is low again, because the proportion between distortion and inactivity is not equal.

    So, to summary, what is the purpose of the duty cycle in our case ? The volume ! You can vary the volume of the sound by modifying the duty cycle. 0% will produce no sounds, 50% will be the max volume. Between 50% and 100% is the same as between 0% and 50%. So, when I say when need a constant duty cycle, it's not that true, it's just that we'll set it at 50%, so the chances we hear something are high :)
     
  3. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    I have a simple continuity checker with a 9V battery and a piezo buzzer. when I put the leads across a high resistance, the sound is very faint. So, I suspect the volume is related to current and you could vary the volume down with a high value pot
     
    Last edited: Aug 24, 2011
  4. steven334

    Thread Starter Member

    Aug 9, 2011
    37
    0
    so how do i control the duty cycle?
     
  5. steven334

    Thread Starter Member

    Aug 9, 2011
    37
    0
    sorry i didnt see the link
     
  6. iONic

    AAC Fanatic!

    Nov 16, 2007
    1,420
    68
    Do you have a circuit with this Piezo buzzer to post here. .png is preferred.
     
  7. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Do you have a Piezo Buzzer or a Piezo Element? They are not the same. If your Piezo operates directly from a DC supply then you have a Piezo Buzzer, also called a Sonalert.
     
  8. Audioguru

    New Member

    Dec 20, 2007
    9,411
    896
    A piezo beeper (it beeps at a high frequency, it does not buzz at a low frequency) has a built-in oscillator and runs from DC. Its loudnes is determined by the DC voltage.
    A Piezo transducer is a small speaker (like used in the amplifier/volume control article) and runs from the AC from an amplifier.
     
  9. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Uhhh, yeah.;)
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    I don't buy this. The diaphram only makes sound when it is moving. Regardless of the duty cycle, the diaphram moves twice each cycle. The only way to vary the sound intensity (okay, not the ONLY way, but from a simple driving signal standpoint) is to either increase the amount of the deflection or increase the speed of the deflection. The first involves applying a greater voltage while the second involves driving it with a lower impedance to reduce the RC time-constant involved. I would think that controlling the voltage is the more practical way for most simple circuits.
     
  11. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    WBahn that's not totally true.

    The piezo resonates (flexes) at a much lower frequency than the digital transitions. So with a very short duty cycle the material has not had enough time to flex very far before being reversed. Basically it acts as a low pass filter which will reduce the sound level as the PWM moves away from the ideal 50% (as 50% duty causes the maximum possible deflection of the element).

    It's common in microcontroller use to vary the PWM duty to the piezo element to get different sound volume levels.
     
  12. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Okay, I can see that. But it would seem to make the choice of drive frequency pretty critical.
     
  13. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Yep that's right re the frequency vs loudness, especially since most piezo elements have a resonant frequency where they are much louder.

    Cheap piezos are only really suitable for alerts and simple tunes etc.
     
Loading...