Electronic – LEDs flash at the same time and not one at a time

ledtransistors

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 😉

Best Answer

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.