Circuit to switch power when detecting current (40mA/12V)

current measurementlow-powerswitches

I am looking for a way to supply power to some consumers (sensors) only while another consumer (datalogger) draws power. All consumers run from the same 12v car battery.

The datalogger wakes up periodically and probes the sensors. To conserve power, I would like to run power to the sensors only while the datalogger is up, at which point it draws at least ~40mA. All devices together draw 500mA max.

No EE engineer, so bear with me please… From my (internet) research so far, this might be possible with a shunt resistor (plus something along these lines) and a transistor as switch. First, is this a reasonable approach, or are there better ways? If so, could you give me some hints as to the selection & dimensioning of components? Any other pitfalls?

Thanks in advance!

EDIT:

OK I tried to put something together of what I am thinking about at the moment, hope it helps. It might also be completely off..

Here is a link: schematic and below is the schematic: –

enter image description here

  • Not sure about the AD8217, maybe I do not need it if I get a transistor of the correct dimension?
  • I realize I need to know the power draw of the datalogger when idle. Have not yet been able to measure it.

Best Answer

I've had a look at your circuit. It has the following problem: the current shunt monitor is designed to precisely measure a current, but you need a step-like response:

  • current > threshold = on
  • current < threshold = off

For this type of operation you don't need an amplifier, you need a comparator.

Also, for this type of circuit you would need a comparator with rail-to-rail inputs.

Some hysteresis would also be nice. This would mean that to turn the sensors on the datalogger would have to trigger more than one threshold (for example, 40mA), but to turn the sensors off it would need another threshold (for example, 10mA). This way circuit would be more stable and would turn the sensors off only if the datalogger really was off.

Here's what I've come up with:

schematic

simulate this circuit – Schematic created using CircuitLab

Notes about the circuit:

  • Q1 is a power p-type mosfet used for powering on the sensors, if the sensors have a separate ground you can place a relay with a flyback diode in place of Sensors in the circuit. Or Q1 can be replaced with an optocouple controlling some other circuit.

  • Q2 is a small signal n-type mosfet with low Rds-on.

  • DZ1 can be replaced with a shunt-type reference voltage source (for example, an LT431) if very precise trigger currents are required.

  • don't forget to supply power to the comparator, bypassing it with a 0.1uF capacitor if the power supply is noisy.

How this thing works:

DZ1 guarantees a stable voltage between V+ and VRth2-, this is used because the power supply voltage can change, and if DZ1 wasn't present the threshold voltages would be proportional to the power supply voltage. If the power supply voltage is stable enough, DZ1 can be removed and Rzener can be equal to 0Ohm (VRth2- can be connected straight to ground).

When the datalogger is off the voltage drop across Rshunt is pracicaly zero, so Vdatalogger is higher than Vtrig, the comparator is in a Hi-Z state (it has an open-drain output) the gates of Q1 and Q2 are connected through Rpullup to V1+, Q1 is off, turning the sensors off, Q2 is on, this causes Vtrig to be slightly lower, so a higher current is needed to switch the comparator on.

When the datalogger is on the voltage drop across Rshunt is big enough so that Vdatalogger is lower than Vtrig. This causes the comparator to turn on, forcing Vcontrol to ground. This turns on Q1, turning the sensors on. This also turns Q2 off raising Vtrig higher, so the trigger current for switching the sensors off is lowered.

Notes about using the circuit:

  • Rshunt causes a voltage drop between V+ and Vdatalogger, so make sure that V+ - RShunt * max(Idatalogger) is a high enough voltage for the datalogger to properly work, the voltage applied to the datalogger will also change proportionally to the current drawn, so make sure a slightly unstable voltage source is OK for the datalogget.

  • The same apllies to the sensors, only the voltage drop on Q1 = Rds-on * Isensors.

  • If you need the voltages on the Datalogger and Sensors to be precise and / or stable (independent of the current drawn), you should drive the circuit with a slightly higher voltage (for example, 15V), and place voltage regulators between the outputs of the circuit and the datalogger and sensors.