The problem: onboard devices for vehicles (cars) typically draw some standby power.
I hate that (yes indeed, it's more than just "dislike"): my car is used very little and I frequently have the battery depleted.

So my own designs should do it right: zero standby power.
Zero as in nil, zilch, nothing; not "very little" or "almost nothing" but actual zero.

And it is simple, too!
Just watch.

## Step 1: Standby Mode

Consider the schematic (I publish this in SVG only, its so simple, you can quickly redraw it in KiCAD).

The device is a PWM modulator for a 30W light in my car. Since it uses up to 30 watts when powered on, I do not care about power consumption while the device is operating.
But I wanted zero consumption while it is waiting to be turned on.

To achieve zero power, the Arduino (an Arduino Nano in my case) must not be powered, neither can the Buck converter be powered on during standby.

This means, we only have onboard voltage available while in standby; this is the battery voltage somewhere between 10V (almost empty) and 14.1V (generator running, battery charging).
this is a voltage that must never reach the AVRs pins, it would fry the chip immediately.

That is where the relays come in.
Please ignore that they have 2 changeover contacts each in the schematic: its the only relay I found in the KiCAD lib and I was to lazy to draw a single-contact device :-)

During standby the relay contact are in the position as drawn.
K2 passes on the input power (marked as 15V) to K1 through the normally-closed contact.
K1 does not feed the rest of the device through the normally-open contact.

Result: zero power because there is zero current.

## Step 2: "It Works Better If You Switch It On"

So lets switch it on.

We press SW3 to do that.

Now a base current flows from the base of the PNP transistor Q1 (limited by R1) through the pushbutton to ground.
Q1 starts to conduct and feed power to the relay coil: the relay is activated.

This closes the contact and the power from the input is fed to the rest of the device.
And also to the relay coil, so the relay is providing its own activation power: the device stays on when the pushbutton is released.

## Step 3: Power-off Under Software Control

Once the device is powered, the firmware in the Arduino is in control.

In my case it is a PWM modulator for an LED lamp.
SW1 and SW2 are actually the A and B phase of an rotary encoder, SW3 is the pushbutton integrated to that encoder.

The firmware reads the rotary encoder to control the PWM output D5, which drives the gate of Q3.
The direct gate drive is not "the right way" to drive a Power-MOSFET, but it still works quite well :-)
(The "right" way includes some current limiting resistor and usually a higher diving voltage; the higher voltage would turn the FET on more quickly and such reduce switching losses in the transistor.)

The firmware can also read the pushbutton just fine.
If SW3 is pressed, pin D6 is pulled to ground and reads as LOW, just like a button not connected to the 12V domain.
D3 makes sure the deadly 12V does not harm our AVR chip.

To turn the device off, the software sets pin D12 to HIGH.
This sends a current to the base of the NPN transistor Q2, it conducts and thus activated the coil of K2.
Now K2s contact opens and cuts the power going to the device.

Without power, K1s coil is deactivated and the contact opens.
So when K2s coil is deactivated, the device is still cut off from power - we are back to standby.

C1 is crucial for this operation. Without C1, the whole device will not turn off.

The reason is simple: When K2 activates, the entire device looses power. The power loss is big enough for the AVR on the Arduino to reset.
When in reset state, all pins are switched to input mode, so nothing drives Q2, so the coil is deactivated and the normally-closed contact closes again quickly.
All this happens too fast for the coil in K1 do become demagnetized, so that one stays on - and so the devices stays on.

Unless we add C1, that is.
When Q2 becomes conductive, it discharges C1 very quickly.
When Q2 turns off again, C1 is still discharged and the current through the relay coil continues for a split-second, charging the capacitor.
This time is sufficient for the coil in K1 to become demagnetized and the relay to fall off - thus cutting power to the device.

The actual value for C1 depends on the relays you are using.
For the Finder relays I use here, the 470 uF provided just enough lag to let K1 fall off.

When you experiment with this method, you want to use the smallest capacitor value that is big enough to keep K2 active long enough for K1 to fall off.
The reason is simple: the energy stored in C1 (which is 0.5 times capacity times voltage squared, by the way) must be dissipated by Q2 every time the cap is discharged.
Too large a capacitor => too much for a small NPN like the trusty BC547 to handle.

## Step 4: What If I Do Not Have Access to European Semiconductors?

From the BCxxx type all-purpose small signal transistors you could already tell: I am from Europe. Germany to be more precise.

Not to worry: the actual transistor type is not really important.

In 1970ies publications these transistors were marked as TUN or TUP - for "transistor universal NPN" and "transistor universal PNP" respectively.

Just use any small signal transistor that can handle the approximately 120-150 mA current of your relay coil and has a breakdown voltage above 30V.
There is many types that fit the bill.

Adjust R1 and R2 according to the transistors current gain, but even the crappy old models from the 60ies will switch all the way on with a base current of 10 times the collector current :-)

And what is that "Buck module" thingy up there in the schematic?

I recently started to use pre-made regulator modules I buy off ebay.
These come from China for a price at which I can not even buy the components (actually: even the coils alone are more expensive in single-piece quantities than the entire module).
They are not always really well designed, but for simple digital devices they get the job down: convert from one voltage to another with not-too-shabby efficiency.

In theory, an Arduino can be powered directly from onboard voltage: the 14.5V you'll frequently find in a cars power supply is still within the specified limits for the Arduino Nano, Uno, Dicemilia, Duemilanove etc.

Still: they only have a linear regulator on board.

Linear regulators (like the famous 7805 or LM317) are great, do not create the typical Buck-regulator ripple nor any ground noise.
But they have to convert all excess energy to heat.
So when running at 10V, the regulator will burn as much power as the Arduino (an all attached devices like LEDs) combined, at 15V it accounts for two thirds of the overall power consumption.

In the intro I said, I do not care about power consumption while the device is active, and that is true.

But I do care about the heat generated, and a linear regulator on an Arduino Nano gets simply too hot when running from onboard power.
The switching regulator therefore is used to feed the Arduino at 7.9V: still 2.9V for the linear regulator to drop (which results in good, stable operation), and still much less heat produced.

So, that is it, hope you get an idea for saving some power in one of your next projects :-)

In the mean time I'll think about a variant using only one relay and semiconductors otherwise...

<p>Nice instructible.</p><p>Your circuit was a little difficult to follow, however. I would have labeled +15v as BATTERY and the +12V as something else such as SWITCHED_BATTERY. As shown it implies that you have several voltage levels and that you connect +15v to +12v.</p><p>The purpose of Relay #2 is to switch off the power under the command of the microcontroller after it has been turned on via SW3. Wouldn't it be better to power Relay #2 coil from +12V instead of +15V? That way the relay 2 circuitry is powered only after the +12V is enabled thus ensuring it draws no power when not enabled.</p><p>Best Wishes.</p>
Well, I used the labels that KiCAD had available, but I appreciate the input. Will do next time :-)<br><br>Yes, Relay2 is the Reset for the (mechanical) Flip-Flop here.<br>Powering that coil fro mthe controlled power - indeed an intriguiging idea.<br>I'll give that a try in the prototype and see how that affects performance.<br>In the current configutation the coil stays energized for a short moment after the 12V controlled power falls off. I intended this to make sure the relay stays energized long enogh for k1 to fall off.<br><br>But indeed, this leave one high-impedance path for current from the battery to ground: via coil-k2 and the blocked Q2 and through the leakage resistance of the cap C1...<br><br>In my tests this leakage current so far was not measureable (Radio Shack DMM, 16 years old, not calibrated).<br>But using the controleld power would eliminate that path completely and also protect the circuit from spikes in the power supply (like the alternator starting up on engine start).<br><br>Good Idea, I'll update my prototype.
<p>If you are willing to give up on the SW3 monitor and want to take it one step further and remove all high impedance de-energized paths, I think this would also work.</p><p>Best WIshes</p>
Wouldn't it be less effort to use a barebones arduino and use sleep modes?
That depends on your application.<br>The quiescent current of the voltage regulator is anything but zero, the sleep mode still uses power...<br><br>I do know that using low-power modes of the processor is the way, that &quot;everybody&quot; does it.<br>And that is the reason my car uses almost 500mA when parked...<br><br>When designing low-power applications, I usually use the Freescale ColdFire (the 68000 great-grandson) or the Energy Micro Gecko (ARM M0 with _very_ low power consumption, excellent optimization).<br>Modding Arduino boards to use less power is imho actually more cumbersome than building an AVR circuit from scratch (Mega8+crystal+4 caps and appropriate power supply).<br><br>But I have been asked the question &quot;so, how about _really_ _zero_ standby? Can it be done?&quot; by makers in my filterbubble.<br>Such is the type of question that only stopps nagging and engineer when (s)he answered it conclusively.<br><br>My answer: yes, can be done and here is, how.<br><br>hase<br>And btw: &quot;how about with all solid state components?&quot; - Does not look promising, still nagging me...
<p>This is an awesome power management project. What could this be used for? Nice schematic by the way - what did you use to make it?</p>
This ist part of a bigger project.<br>A buddy of mine is making an old Sprinter into a camper/RV.<br>When he planned to use an incanderescent lamp, I intervened and demanded to make an LED lamp instead.<br>In the schematic there is a l12V output (to the right), which is controlled by the relays. This is the feed for the stepup converter drivind the LED.<br>The irlz44 power FET is used to modulate the LED.<br><br>The purpose of the power management is to save the battery when the LED is off (_zero_ standby).<br>The push button turns it on, the rotary encode operates the dimmer function and the pushbuton also tells the firmware to kill power again.
This ist part of a bigger project.<br>A buddy of mine is making an old Sprinter into a camper/RV.<br>When he planned to use an incanderescent lamp, I intervened and demanded to make an LED lamp instead.<br>In the schematic there is a l12V output (to the right), which is controlled by the relays. This is the feed for the stepup converter drivind the LED.<br>The irlz44 power FET is used to modulate the LED.<br><br>The purpose of the power management is to save the battery when the LED is off (_zero_ standby).<br>The push button turns it on, the rotary encode operates the dimmer function and the pushbuton also tells the firmware to kill power again.
<p>Great info! :)</p>