Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As you can see on the illustration below, I have a voltage supply (a keyboard made of two piezo elements) with two terminals. Each one drives one LED, but since I've added a buzzer in parallel with both LED, my circuit drives the LEDs at the same time

enter image description here

Do you have any idea on how I could make flash one LED at a time using just one buzzer?

Thanks in advance ;)

share|improve this question
It may indeed "be working well with the opamps" BUT they will be getting all bothered inside and you may damage them. Vbase cannot rise much more than 1 volt above ground and the opamps MAY try to drive the bases to opamp V. This MY be VFcc (not shown on diagram). The result will be that the opamp supplies as much current as it can and still fails to drive the transistor base above about 1 V. The transistor is driven too hard and the opamp is working outside its design range. – Russell McMahon Jul 30 '14 at 13:35
I kinda get what you say but the voltage generated by my piezo is in the 50mV-800mV range, and with just a base resistance (of 10k for instance) I barely drive the transistor or rather I get a weak brightness and also a weak sensitivity. That's why I wanted to amplify the whole by adding an op amp... – Alibaba Jul 30 '14 at 14:28
My comment applies to opamp driving transistor. The amplified piezo signal can be rail to rail if opamp has good gain. Transistor VFbe is usually in 0.6V - 1V range. – Russell McMahon Jul 30 '14 at 17:57
up vote 5 down vote accepted

Add a diode in each lead from the buzzer to the collector of the transistor (in that direction).

Current can flow through a diode in one dircetion only (the 'arrrow' direction) so it can flow from Vcc through the buzzer and a diode to one of the transistors and to ground, but not from one LED to the other transistor, because one of the diodes would block it.

An 1n4148 will do up to ~ 100 mA, otherwise pick an 1N4004. (or any other 1n400*)

PS your opamps feed the base of the transistors directly. Unless it is a current-output opamp (in which case the circuit would not work as expected) this is not a good idea. Put resistors in series with each base, 10k will probably do.

share|improve this answer
Thanks for this quick answer :) Can you explain me why it's working by putting a diode in each lead between the buzzer and the collector of the transistor? And regarding the op amp I needed to amplify the input voltage. – Alibaba Jul 30 '14 at 9:05
I added some explanation about the diodes. A base-emitter of a transistor requires a current, not a voltage. A (normal) opamp produces a voltage. Hence you must limit the current with a series resistor. – Wouter van Ooijen Jul 30 '14 at 11:33
Ok thank you for your clear explanation. And I knew that the transistor requires a current but I'm not familiar with current-output op amp and it's working well with this op amp,somehow – Alibaba Jul 30 '14 at 12:55
That's to be expected, I mentioned current-output just to be complete. Nearly all 'normal' opamps have a voltage output. Just don't forget the base resistor! – Wouter van Ooijen Jul 30 '14 at 13:09
I used to have a base resistor but that made no difference...because the resistor in parallel was way above the base resistor and then the voltage divider became pointless. – Alibaba Jul 30 '14 at 14:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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