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!


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.
  • \$\begingroup\$ How does the data logger wake up? Does something like a real time clock wake it up? \$\endgroup\$
    – mikeY
    Commented Jul 12, 2013 at 18:48
  • \$\begingroup\$ What sort of sensors are they - this is important. \$\endgroup\$
    – Andy aka
    Commented Jul 12, 2013 at 19:46
  • \$\begingroup\$ @mikeY: The data logger has a RTC and needs to be connected to power when idling. I do not want to open it up and fiddle with the internals though. \$\endgroup\$
    – JohnCano
    Commented Jul 12, 2013 at 20:01
  • \$\begingroup\$ @Andy aka: Pressure transducers, climatological sensors, battery monitor etc (depends on the station). They need to be powered only when the logger is up, communication is through RS485. \$\endgroup\$
    – JohnCano
    Commented Jul 12, 2013 at 20:01
  • \$\begingroup\$ Is the pressure transducer a wheatstone bridge type? \$\endgroup\$
    – Andy aka
    Commented Jul 12, 2013 at 20:43

3 Answers 3


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:


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.

  • \$\begingroup\$ Wow, thanks! I needed some time to chew through it all. Still have a lot of open ends re how to do the calculation of components, but a new question would be probably better suited. About the comparator though.. the LMC6772 is a bit hard to get, and in general, what other key parameters should I look at (apart from low power)? Have also seen some with "tunable" hysteresis, but in the end that looked similar (connecting R's). I am eying the TLC370 (push/pull) atm. Thanks! \$\endgroup\$
    – JohnCano
    Commented Jul 16, 2013 at 17:01
  • \$\begingroup\$ For this type of circuit to work the comparator has to have rail-to-tail inputs because Vdatalogger is connected directly to the comparator "+" input and when there is no current drawn by the datalogger Vdatalogger = V+.The TLC370 specifies recommended Common-mode input voltage as Vdd-1.5, so it won't work, you can use a seperate powersupply for the comparator (+15V will work) or you can use a current sense amplifier together with a non rail-to-rail input comparator. \$\endgroup\$
    – user25093
    Commented Jul 16, 2013 at 19:48
  • \$\begingroup\$ By just googling "rail-to-rail input comparator" quite a few can be found (TS331, TLV7211, LT1711, ADCMP606... ). Some of these allow a maximum power supply of +5V, but for this circuit this isn't a problem: V_comparator_power+ should be connected to V+, but V_comparator_power- should be connected to VRth2-. This way the supply voltage of the comparator is the DZ1 zener voltage. The only thing to remember is that in this case the gate voltage on Q1 will be only DZ1 zener voltage and not the whole power supply voltage, but, for example, +5V should be enough to turn a power mosfet on. \$\endgroup\$
    – user25093
    Commented Jul 16, 2013 at 20:58
  • \$\begingroup\$ Thanks again user25093, true there are lot of other comparators, I looked through what my "normal" electronic part suppliers have listed, and they have only one rail2rail which is SOT. Seems I have to expand to other shops. I really want to learn how to do the calculations & choosing parts, so will post again when I have something to show - it is a bit of a steep learning curve for me. \$\endgroup\$
    – JohnCano
    Commented Jul 16, 2013 at 22:04
  • \$\begingroup\$ Updated circuit with some specific values. Should work as drawn, but the only "simulations" ran were in my head, so no guarantees. \$\endgroup\$
    – user25093
    Commented Jul 17, 2013 at 22:26

Yes, you're right, the most straightforward approach is a shunt resistor in your datalogger supply (with the minimum resistance to not to disturb it, then a comparator, maybe with built-in hysteresis, to trigger whenever the current (voltage accross your shunt resistor) is over a given threshold you fix. The output of your comparator will drive your transistor (BJT or MOS). By browsing datasheets and app notes of comparators and op amps, you could find a suitable circuit.

There are already integrated solutions, "current monitors" or "current sensors" are commonly called. They have a built-in amplifier so the output is an analog voltage proportional to the current sensed. That's not exactly what you need, but maybe there is a model with the feature of "level triggering" or similar that you could use.

  • \$\begingroup\$ Thanks, looks like that is exactly the way to go ;) Will try it with the circuit by user25093. \$\endgroup\$
    – JohnCano
    Commented Jul 16, 2013 at 17:13

The circuit is interesting but it's not going to work that effectively because those sensors (such as the pressure type) will need (for maintainence of accuracy) a reliable ground connection. This statement is based on the pressure transducer being the wheatstone bridge type (which is commonly used in industry).

It's also more problematic if you are using the "switched power" for other sensors as well because the extra bit of ground impedance (due to the transistor) between sensor(s) and logger will develop small voltages due to varaible current consumption of the individual sensors and this will lead to cross-talk. How much? Impossible to say but gut-feeling is that you should use a MOSFET with an extremely low Rds(on).

Part of my current job is designing strain gauge amplifiers (single sensor to full bridge types) and full scale deflection might be as little as 1 ohm. We use 12 bit ADCs for logging the data which means we have a resolution somewhat less than 1 milli-ohm - this is, I believe what you should be aiming for with the Rds(on) of the MOSFET for switching the ground to the sensors. However, even that is a big compromise given that current from other sensors are bottle-necking through one device and inflicting their current (aka volt-drop across 1 milli-ohm) onto the other devices.

So my first conclusion is that each sensor MUST have its own ground switch to enable it. This leads me to a simplifying assumption - despite how you have shown the diagram, I am assuming that for all sensors, the data logger wiring to these sensors does not use the power connections (switched or otherwise) to measure the sensors.

If you are using the power wiring to the sensors as also your measurement input then you can obviously live with a lot more noise and cross-talk than I previously assumed. On this basis you should consider using one MOSFET with as low an Rds(on) as you can get your hands on and hopefully that will be job done.

If you are using power-independent wiring for each sensor then this is better for accuracy, noise, stability and cross-talk but you'll probably find that individual MOSFETs ought to be the way to go to maintain the signal integrity.

Regards the way you are detecting the data logger powering up I'd be tempted to use a high-side current sense; in fact the AD8217 is a high-side current monitor and so this is another short-fall in your diagram - it won't work as shown it needs to be in the positive lead.

You also need to be wary of sensor stability times - some sensors may take milliseconds to stabilize from a power-on situation; some may take several seconds. This could seriously affect your first few readings taken by the data logger.

  • \$\begingroup\$ Thanks! This helped a lot with reading up and trying to understand the issues... For the sensors we use, they have their own power circuit and seperate digital communication lines (submersible pressure transducer to measure river levels), so I don't think that would be an issue. Sorry for being vague above! However I have to check again if our RS-485 communication rail currently uses ground - the impedance issues you described could potentialy be a source of trouble there. \$\endgroup\$
    – JohnCano
    Commented Jul 16, 2013 at 17:10
  • \$\begingroup\$ @JohnCano I don't think the 485 ground will be much problem now you have explained your setup. By the way, now that I know you are using 485 from the data logger, you could easily use the transmit signal to enable all the sensors - initial detection by logic gate switches power on to them and in absence of any other transmission will time out after (say) one minute. Or, If your 485 becomes active (when logger does) you can also detect the presence of power on the logger via 485 lines too. Couple more options!!! \$\endgroup\$
    – Andy aka
    Commented Jul 16, 2013 at 17:42

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.