4
\$\begingroup\$

I am designing a circuit for an irrigation system with two pumps. Each of the two 12V-pumps is controlled in the same way by a 3V logic pin of a microcontroller through a relay.

I'd like to add an additional power switch to disable each of the pumps safely in case the hose is not connected. This will be done using a simple rocker switch.

I added a small circuit to detect if the rocker switch currently enables or disables the pump.

But I have doubts about the following points of my design:

  • If the relay is opened and the rocker disables the pump, the BC547 transistor has a floating emitter. Will the detection of the rocker state still work?
  • If the rocker is open and the relay closed, the Emitter of the BC547 will be at 12V. So there is a negative V_BE. Will this destroy the BC547 in the long run?
  • Is it a problem to switch the current of the pump to ground rather than to +12V?

The circuit

\$\endgroup\$
1
  • \$\begingroup\$ I can't comment on the BJTs, but for Q3- low side switching is generally fine as long as the chassis of the pump is not tied to ground. If that's the case, then switching off ground will put the chassis at 12V. For your actual problem, why not just use a voltage divider? You'd probably also want a voltage clamp of some kind to protect the microcontroller \$\endgroup\$ Commented 2 days ago

4 Answers 4

3
\$\begingroup\$

If the relay is opened and the rocker disables the pump, the BC547 transistor has a floating emitter. Will the detection of the rocker state still work?

Sure, as long as the environment does not inject enough charge to pull down by about 0.33mA. (R18 is 10kΩ.) This is quite improbable, but only you know the environment.

If the rocker is open and the relay closed, the Emitter of the BC547 will be at 12V. So there is a negative V_BE. Will this destroy the BC547 in the long run?

Yes, as stated for example in this data sheet, the emitter-base breakdown voltage is 6V.

Is it a problem to switch the current of the pump to ground rather than to +12V?

No.


You can go with the absolutely sufficient simple diode solution in Kevin's answer, replicated here. Or if you prefer a BJT solution, use the straight-forward circuit below:

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
5
  • 1
    \$\begingroup\$ Minor note - the bipolar solution will output a high (IsEnabled) if both the switch and the relay are open. A pull-up between 12V and the switch will correct that. Or a pull-up to 3.3V (with a diode maybe to avoid excessive current into the 3.3V supply). \$\endgroup\$ Commented yesterday
  • \$\begingroup\$ @KevinWhite Added pull-up. The current through Q8 will take the current via R21. \$\endgroup\$ Commented yesterday
  • \$\begingroup\$ Can the BC547 withstand V_BE=12V with V_CE=3.3V when the relay is closed and SW3B is open? Looks rather seldom to me to have V_BE > V_CE \$\endgroup\$ Commented yesterday
  • \$\begingroup\$ @thebusybee - good point about current through R21 being drained via Q8. \$\endgroup\$ Commented yesterday
  • 1
    \$\begingroup\$ @PH223 Why do you think V_BE will be 12V? It will never be above V_BE(sat), given the low base current. \$\endgroup\$ Commented 17 hours ago
6
\$\begingroup\$

The reverse breakdown of the base-emitter junction of Q8 is only ~7V so when the switch is open and the relay is closed the transistor will have excessive voltage applied to it.

It would work better if you just replaced Q8 with a diode and removed R20. The 0.7V on voltage of the diode will still give an acceptable low voltage to detect at the controller.

\$\endgroup\$
0
\$\begingroup\$

Its an interesting circuit - an upside-down transistor.. When the emitter of transistor Q8 is at 12 volts, the reverse biased junction acts as a Zener diode, and so the base voltage will increase to about 6 volts. The transistor will not break just because of the reverse breakdown because you have current limiting resistors on its base and emitter.. But once you connect the output to a microcontroller with a 3.3 volt IO supply, because then the base to collector junction is forward biassed, the logic level out will rise to over 3.3 volts. Which might upset your microcontroller. And if the protection diodes conduct, you might then damage the transistor and the microcontroller.

Use any one of the improved circuits.

\$\endgroup\$
0
\$\begingroup\$

You have a rather standard common base switching circuit. It needs diode protection from reverse polarity on the emitter. Otherwise it's OK I think.

The transistor is not really necessary in this circuit - the diode itself would do, but the transistor does the job you intended it to do.

If the relay is opened and the rocker disables the pump, the BC547 transistor has a floating emitter

Yes, and thus C-E current drops to zero, base and collector are at the same potential, and the transistor disappears from the circuit.

If the rocker is open and the relay closed, the Emitter of the BC547 will be at 12V. So there is a negative V_BE. Will this destroy the BC547 in the long run?

It may well destroy the BC547 immediately. You need a reverse protection diode in the emitter circuit.

Is it a problem to switch the current of the pump to ground rather than to +12V?

Not at all. It's rather common because it's easier to implement than high-side switches.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.