I want to drive this 12V piezo buzzer: http://www.conrad.com/ce/en/product/130256/Kemo-L001-High-Freqeuncy-Piezo-Speaker-Component-12-24-V

This is the circuit I am using.

Circuit

The Arduino is powered by a 12V DC adapter trough the DC IN jack.

I have tested the following code:

void setup() {
}

void loop() {
  int pinOut = 9;
  int freq = 10;
  int duration = 100;
  while(1)
  {
    for(int i=0; i<1000 ; i++)
    {
      tone(pinOut, freq*i, duration);
      delay(duration * 1);
      noTone(pinOut);
    }
  }
}

When run I can hear the tones changing but is really really low. I have measured the voltage between buzzer pins and it is 12V (as expected) so the MOSFET seems to be properly working.

This piezo buzzer should be louder (I have tested it with this 12V tone generator http://www.kemo-electronic.de/en/Car/Modules/M048N-Ultrasonic-Generator.php )

I am making any mistake? Thanks in advance!

migrated from electronics.stackexchange.com Sep 6 '15 at 23:01

This question came from our site for electronics and electrical engineering professionals, students, and enthusiasts.

  • resistance of the speaker?current limit? – MaMba Sep 5 '15 at 15:48
  • If I mesure the piezo buzzer resistance with a multimeter I get like open circuit. – soyxan Sep 5 '15 at 16:00
  • I have managed to make it a bit louder by placing a 1K resistor in parallel with the load (piezo buzzer). What I am wondering now is why this resistor makes it louder and how to calculate the proper resistor value in order to have the loudest output. – soyxan Sep 5 '15 at 16:00
  • It makes it louder because resistance is parallel reduces the value of the load resistance hence the overall resistance increases, increasing the current in the circuit. – MaMba Sep 5 '15 at 17:18
  • 1
    Do you have a capacitance meter? – Spehro Pefhany Sep 5 '15 at 17:38
up vote 2 down vote accepted

The piezo element acts like a capacitor, not like a more-or-less resistive element as in a conventional speaker. You need to discharge the capacitor during the 'off' time or you just get a click and little sound after that. That's why your resistor helps. Push-pull would be much better, and an H-bridge would give you much more output (maybe too much for the speaker).

Also the IRZ44 is not specified to be driven from 5V (it's specified at 10V Vgs) so you may not get much current. Further, if you're trying to get 10's of kHz, you won't be able to drive the MOSFET gate that fast with a 1K resistor, in fact the Arduino may not be able to source enough current and you may have to use a gate driver.

If you can measure the capacitance and provide the frequency of interest, more specific recommendations would be possible. At 2kHz about 3K would be okay with a 10nF element, but that resistance would decrease with increasing resistance and with increasing capacitance, and at some point the power dissipation in the resistor will become excessive.

Edit: You can do something like the below with a 10nF/20kHz requirement:

schematic

simulate this circuit – Schematic created using CircuitLab

You could even duplicate the above circuit and add an inverter in series with one of the halves and get 24Vpp across the piezo, but you might want to use somewhat beefier transistors (Zetex perhaps).

  • I have measured the capacitance on the piezo buzzer pins and is 10nF. I want to generate sound arround 20kHz. How can I calculate the proper resistor value? Can you explain a little bit that "push-pull" solution? – soyxan Sep 5 '15 at 18:37
  • See above edit. You can base a resistor value on the RC product being much less than half a cycle. – Spehro Pefhany Sep 6 '15 at 1:54
  • I have tested your circuit and the sound level is almost the same as mine (with the resistor in parallel with the piezo). There is any disadvantage of using my solution compared to yours? – soyxan Sep 27 '15 at 18:03
  • Wasted power in the resistor is the disadvantage. Advantage is slightly cheaper, simpler. Your choice. – Spehro Pefhany Sep 27 '15 at 18:07
  • 1
    Based on your circuit, what do I have to change to drive the piezo at 40 kHz. Can you explain me how to calculate it? Thanks! – soyxan Oct 4 '15 at 17:51

The usable frequency range of the speaker is 2500 - 45000 Hz. In your script, you sweep from 10Hz to 10kHz which is a bit low. Try to change the start frequency to a higher value:

void setup() {
}

void loop() {
  int pinOut = 9;
  int freq = 2500;
  int duration = 100;
  while(1)
  {
    for(int i=0; i<1000 ; i++)
    {
      tone(pinOut, freq+(i*50));
      delay(duration);
      noTone(pinOut);
    }
  }
}
  • With this script I get more tones (as expected) but the sound is not louder – soyxan Sep 5 '15 at 16:19
  • Try to add an inductor (value from 10-50mH) in parallel to the piezo buzzer. This creates a resonant circuit and helpts to discharge the piezo in the off stage. For further Information see Link – Martin Sep 5 '15 at 16:46

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.