Electronic – Is it possible to make a short-circuit detector for a battery power supply

batteriessafetyshort-circuit

I have a basic understanding of electrical things myself, but semiconductors are not part of it. While pondering about some unrelated things, I came up with this question:

Suppose I want to make an electrical constructor toy for kids. There would be some lamps, switches, relays, magnets, wires, etc. And then there would also be a battery that powers it all (something like 9V or 3V, so no electrical danger exists).

Kids being kids, they will make lots of mistakes when building their circuits, and that's good – they learn. But short circuits can destroy the batteries pretty quickly, and possibly even heat something up enough to cause actual damage. It would be nice if that could be avoided, while still giving feedback that there is a short circuit.

So, is it possible to make such a "battery adapter", which would:

  • Light a green LED when a circuit is connected and functioning properly (there is some significant resistance in the circuit). Note that this should affect the current/voltage of the circuit as little as possible.
  • Light a red LED when there is a short circuit (very low resistance of the circuit), while also severely limiting the current flowing through the circuit (so nothing gets destroyed). When the short circuit is resolved, the LED should go off and the current limit be removed.

For bonus points, a yellow LED could light up when two power supplies are chained together, doubling the voltage of the circuit. This is can be used in some educational experiments (like seeing that a lamp suddenly lights up twice as bright), however it also shortens the lifespan of some circuit elements, so there should be a warning. However I do not know if this can be reliably detected from within the adapter itself (without some extremely fancy communications between adapters).

Is this plausible? Can anyone show me a schematic of such a device?

Best Answer

The following circuit uses an inexpensive current shunt monitor (AD8210) and a series of comparators to meet your requirements. I am using a separate 9V battery to power the test circuitry, so that even if the main battery gets completely shorted out, the test circuitry will still function. This also allows the test circuitry to work with a main battery ranging from 3V to 12V without requiring a buck-boost converter to generate the 5V needed. Instead I am using inexpensive 7805-type regulator in a TO-92 case, since the current drain is only a few tens of milliamps when one or more of the LEDs are on, and microamps otherwise.

enter image description here

(Right click and select View Image to see a larger version of this schematic.)

The 0.2 Ω shunt resistor R1 puts a minimal load on the circuit, dropping the battery voltage only 0.1V with a 500 mA load. The current shunt chip IC3 measures the voltage across the resistor, amplifies it with a gain of 20, and outputs a voltage proportional to the current on pin 5.

For example, that 100 mV drop across the resistor for the 500 mA load causes the IC to output a voltage of 2V. The proportion is 20 volts per volt across the shunt resistor, or 20V/V as I indicated on the diagram.

Likewise, a load of only 50 mA will result in a output voltage of 200 mV. So I set up the green LED to turn on for this threshold, namely 50 mA, indicating some activity. If you want it lower than that, you can of course adjust the value of the resistors R11/R12.

All of the comparator reference values are set with voltage dividers, using high value resistors to avoid loading the battery.

The comparator for the short condition IC2B is set up so it will trip with a load of 500 mA (2V). Obviously this is not a full short, but represents a lot of current. Again, you can adjust things as needed. With the current shunt resistor, you can only measure up to 1.25 A accurately. If you need to trip on a value higher than that, then you will want to switch the shunt resistor to 0.1 Ω and adjust all the voltage dividers accordingly. I picked 0.2 Ω so there would be enough voltage for the low-current measurement for the green LED.

Rather than lighting the red LED directly, the output of IC2B sets the flip-flop IC5A. This in turn turns off Q2, which in turn turns off Q1, breaking the path to the circuit under load so the battery will not be shorted anymore, avoiding possible damage to the circuitry. The flip-flop, being set, also turns on the red LED, and turns off the green LED. To restore battery power to the circuit, the RESET button must be pressed, resetting the flip-flop.

The bottom comparator is for the yellow LED. Depending on the resistor used for R8, it will light if the battery voltage is either over 3v (threshold is actually 3.5V) with a resistor value of 105K, or over 6v (threshold of 6.5V) with a resistor value of 237K. The circuit allows for battery voltages anywhere from 3V to 12V, since the battery voltage is divided by 4 by the resistor divider R4/R5 before being compared.

Although I didn't show it, you could add a DPDT switch to turn both batteries on and off at the same time.

Obviously this could be done with a microcontroller, but you will still need much of the I/O circuitry: the shunt resistor and IC, two MOSFET's controlling power, three LEDs (and probably three more MOSFETs to drive them), plus the batteries and pushbutton. So not a lot is saved (three comparators, a NAND gate, flip-flop, and some resistors and caps). I believe a circuit like this demonstrates the solution better than showing a bunch of code (if that's even included in the answer). After all this is a EE site.