Aside from sleep mode, can we completely turn off the power of Arduino through software?

I would like to configure my arduino to have zero current draw when circuit is doing nothing for certain period, like turning off completely. Sleep mode can save power and extend battery life but is there any other way of doing it?

sort by: active | newest | oldest
seandogue2 years ago

40mA while in sleep or some "deep sleep" mode? That seems awfully high.

If you use an external latching relay circuit and a "power button" you can easily reduce the current draw to zero when in shut down mode, although the Arduino's direct participation (ie, programmatic participation) would be limited to the power-down process (break the latch), for obvious reasons. All monitor processes that I'm aware of require *some current draw, although I haven't personally used any uC during the past 20 years that requires 40mA of draw when in sleep mode, more like tens of uA or less.

pelegren (author)  seandogue2 years ago

that is why i was wondering because it was actually on power down mode. uA could only be on microcontroller (ATMEL uC) and does not include power Led and status Led of the Arduino. Or it could be the voltage regulator circuit?

If it has one of those pulsing leds that indicates "I'm still alive", that would result in a power drain (much like the annoying led on smart phones prior to the latest gen that suck the batteries dry if one has a lingering phone, email, or other "announced" message), but I would not expect it to result in a continuous 40mA drain, since indicator LEDS do not draw anywhere near 40mA, more like a 5-10 mA, and as noted, pulsed (short duty cycle) in general, so the average continuous load should be a fraction of its "on" value.

Yes, it could be a combination of the LED, the power supply, and also possible the voltage monitoring circuit, depending on the age of the Amtel uC. But for a modern uC, such as one would buy off shelf literally "today", I would be surprised to see such a massive drain unless there was an underlying problem or ancillary (user added, etc.) circuitry that wasn't designed to the same power-saving standards. Not to say there *couldn't be, since I have no idea the age of your uC or its support systems.

Meh, regardless of the source (presuming its by design rather than a failure)

You are familiar with latching power circuits (the circuit I alluded to above)?

The image below shows such a circuit.

Press the "on" button to momentarily deliver power to the coil of relay RL1

During this energized "moment", RL1-A contact closes, providing power to the relay coil. The circuit is now energized until either

a) the power fails

b) the off switch is pressed.

RL1-B circuit (simple example) turns on when the ON button was depressed, and aside from power failure situations, turns off when the off button is depressed.

Turning something ON is not all this circuit can do, as you'll realize if you study it for a moment and think about how many different styles of relay are available to the designer and what the particular end goal is for the circuit's use.

Since many, a lot, whatever arduino programs run on boot, then pressing the on button boots the arduino, it does it's thing, blah blah blah....time passes, it determines a power off state is appropriate, and instead of you pressing the off button, you use another opt and a digital I?O output from the arduino to trigger it.

Hope that helps.

LatchingPower.jpg

PS. In the sketch I show above, "Some Source" is the power for the arduino, and "Some load" is the arduino itself.

BTW "Since many, a lot, whatever..." should have said "presuming the ardunio program runs on boot," (Most I've seen do... although admittedly not all )

Thinking about "zero" current when off, if the leakage current of the device is less than the leakage current of the batteries you use, its essentially "zero". All batteries leak energy, on a timescale of days, weeks, months or years, but they all do it.

Yes. Look at power-down mode. Be careful, its actually hard to do. You need to be careful about pin value setting, you need to use the power reduction registers wisely too.

pelegren (author)  steveastrouk2 years ago

I've tried the power_down before but the board still has a current draw of around 40mA. I'm not sure if this could be because of the status LEDs on board.

That's why I said this isn't easy to do: your external circuit can have a massive influence. Pulling down the LEDs is the first thing is do, using open drain pins. They will float OFF when you go to reset and stay there.

With no current draw how is the device suppose to be able to detect a change and turn itself back on again. Sure you can make it so it shuts itself off but you cannot make it turn itself back on again.

rickharris2 years ago

Turn it off isn't that hard e.g. a relay controlled by a timer/another device. Turning it back on from dead automatically without drawing current in an external device is much more difficult.

If the Micro draws no current then it cannot spontaneously restart without external activity.