2
\$\begingroup\$

I want to be able to switch a piezo buzzer with arduino without connecting it directly.

I have wired the following circuit I found on the internet:

enter image description here

The problem is that the voltage across the buzzer is very low (lower than 1v when I connect a voltmeter instead of the buzzer)

My guess is that I lack some basic understanding of how transistors operate. Maybe I chose the wrong transistor or I need to apply higher voltage between emitter and collector?

\$\endgroup\$
  • \$\begingroup\$ That should work with most low power buzzers but maybe a link to the spec might help sort this out? Maybe also you have the pins incorrect on the BJT or you are using a PNP device? \$\endgroup\$ – Andy aka Jan 9 '15 at 12:21
  • \$\begingroup\$ @andy product.tdk.com/en/catalog/datasheets/ef532_ps.pdf \$\endgroup\$ – Artium Jan 9 '15 at 12:24
  • \$\begingroup\$ Have you checked the transistors pinout?? Can you check if the arduino pin is working ok? \$\endgroup\$ – Sebastian Heyn Jan 9 '15 at 13:22
6
\$\begingroup\$
  1. Make sure that the GND connection at the emitter of the transistor also connects back to the GND of the Arduino board.

  2. Check that you have the diode installed the right direction. If the diode has a line or band marked end that side should be connected to the +5V.

  3. Normally you would check the voltage when the buzzer is in place instead of removing it. Since you removed the buzzer and measured less than a volt it is an indication you have the diode installed backwards.

  4. If you had the diode installed backwards replace your transistor with a new one. You likely damaged it.

\$\endgroup\$
  • \$\begingroup\$ I checked the direction of the diode, the side with the stripe is connected to +5V. But now when I have connected both the voltmeter and the buzzer, the buzzer is making sounds! Disconnected the voltmeter, makes the sound stop. The voltmeter is still vibrating at <1V though. \$\endgroup\$ – Artium Jan 9 '15 at 13:21
  • 1
    \$\begingroup\$ Is your buzzer one with internal oscillator or are you driving it with a square wave from the Arduino? If you are using a unit with no built in oscillator and driving it with a square wave you will most likely need to add a resistor of 1K ohm or so across the piezo element. \$\endgroup\$ – Michael Karas Jan 9 '15 at 13:26
  • \$\begingroup\$ I added it in parallel with the diode and the buzzer is working! But I do not understand what the problem was... Also, why touching the junction between transistor, diode and buzzer with my hand causes the buzzer to produce faint sound? \$\endgroup\$ – Artium Jan 9 '15 at 13:33
  • 1
    \$\begingroup\$ The bare piezo element needs to see a voltage change across itself. With the resistor in place it causes the voltage across the element to go to zero when the transistor turns off. When you put the meter there it represented some large impedance and allowed some voltage change to occur. Same with your hand. You represent some large impedance which allow the voltage across the element to change when the transistor turns off. \$\endgroup\$ – Michael Karas Jan 9 '15 at 13:38
  • \$\begingroup\$ I had the impression that this is the reason for the diode there. Do I still need to keep it? \$\endgroup\$ – Artium Jan 9 '15 at 16:10
1
\$\begingroup\$

A piezo element needs to oscillate to produce sound. With a a flyback diode in place you will shortcircuit the piezo element and prevent it from producing sound.

There is a good description here, How to tell a piezo buzzer is broken?

A flyback diode is only needed when working with inductive loads, ex. motors and relays.

So remove the diode.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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