# Switching buzzer on and off with two transistors

I want to make a simple water level indicator with tank full alarm as shown in the diagram. What I want to achieve is, when the tank is full to 100% and water is still flowing through the inlet pipe (ie, the pump is on) the buzzer should beep. I have two outputs from IC ULN2003 for that- Pin 14 switches on when the water level is 100% and pin 15 switches on when water is flowing through the pipe. Also, I want the buzzer to stay off as long as the above-mentioned conditions are not met. Now my questions are,

1) Is the circuit right on the transistor switch side? If not, is there any other circuit (preferably simple) which I can use?

2) Is transistor 3906 good enough for this use?

3) The resistor values, are they okay?

4) Should I give a reverse bias resistor to the transistor base as shown in the the second diagram (R2)?

simulate this circuit – Schematic created using CircuitLab

]2]2

• Make a list of expected results for eac h input in measurable terms. i.e. a Spec. {V, I , t} with % tolerances or min/max. then make a simple truth Table. Why use old school diode and transistor logic and Hammer drivers to drive a simple buzzer? Or is it a big buzzer? Specs ! i.e. if Pump is off at 100%, isn't that too late? Jan 22, 2020 at 15:59
• the R1 and SW are shorted in the second schematic Jan 22, 2020 at 16:08
• @ Tony Stewart Sunnyskyguy EE7, I am no expert in circuit design. I just took them from the internet and compiled. As you may know already when a positive voltage is available on pins 1 to 7 the IC switches on and give negative voltage on pins 10 to 16 correspondingly. If I want to drive a buzzer I can connect it directly on any output pin. If you read my question again, I wanted the buzzer to be on and off when some specific conditions are met. For that, I used the transistors. The sensor probe can be placed in any position (assuming the value of 100%). so it won't be late. Jan 23, 2020 at 8:33

The transistor and resistors are okay for a buzzer that draws a moderate amount of current, 100 or 150mA is fine (forced beta of 10-20).

If the buzzer is an electromagnetic type, it should have a catch diode across it. Eg. 1N4148. Reverse biased, of course.

You should have separate resistors for each LED.

There should be high value pullup resistors (eg. 100K) on pins 14 and 15. Note that this will reverse bias the LEDs to -9V (and the E-B junction of Q2, but no current flows) which is out of spec, but probably okay.

• Thanks. The buzzer is piezoelectric. Can you please advise more on the pull-up resistors? Should they be connected like pin 14 to positive and pin 15 to positive separately? Sorry, I'm just an automobile professional without any qualifications in electronics. Jan 22, 2020 at 16:23
• Yes, pin 14 to +9 and another from pin 15 to +9. That's because otherwise the transistors will amplify the reverse leakage from the LEDs. Jan 22, 2020 at 16:24
• First, do you have a buzzer part number or spec?
– X J
Jan 22, 2020 at 16:29
• @XJ, It says CC-27. Underneath it, there is a number 18171. Jan 22, 2020 at 17:08