0

I'm working on a sketch where an Arduino UNO performs no useful work after the first 10 minutes following power on. It is not needed again until power to it is shut down, then re-enabled. This may not happen for hours or even days. No wake-up function is required, or deemed useful.

Of course, the Arduino could simply be left on as long as it's connected to its power source, but it will be placed remotely, and it seems [to me] safer to have it powered off. when not in use.

In essence, the Arduino is powered by a wall wart and plugged in with other devices fed by a switchable 120v power source.

I found a couple of possible hardware/software solutions to the problem but it isn't clear whether they would work in this situation. Power consumption is not the issue here.

  • you can interrupt the input voltage with a relay that both an exgternal trigger and a GPIO pin can control. A brief trigger gives the relay power, which powers the uno. The uno writes the pin high in setup(), keeping the relay on. Once done, the pin is written low and the uno turns off. – dandavis Mar 7 '17 at 7:24
  • Based on feedback, it seems clear that any solution to this problem will require the addition of hardware, and the use of a specific type of relay presents a simple solution that will satisfy my needs. In my situation, the requirement is for the Arduino to turn off after a specific amount of time. It really is not necessary for the Arduino itself to trigger the action, just that it is shut off once the interval lapses. As such, a very simple circuit can be constructed using a programmable timer relay delay switch to front-end the Arduino, setting the time delay that is needed. The Arduino is n – KC Tucker Mar 8 '17 at 5:24
2

In general, an Arduino by itself has no control over its power input. It can, of course, enter various Sleep modes, such as the Power-down mode with watch-dog-timer off, which uses 0.1 μA.

It isn't clear from the question what will turn the Arduino back on after it is off for a while, but if you have either a push-button or a signal to turn it back on, the Pololu 2808 Mini Pushbutton Power Switch will work as an Arduino-controlled off switch. This board has On, Off, Ctrl, and button-contacts inputs. If your Arduino raises the Off input, power shuts off cleanly. To turn it back on, either connect the button-contacts inputs together, or raise the On input, or pulse the Ctrl input.

  • No buttons or signals utilised. The Arduino power supply would be cut off at some point by virtue of an unrelated action, i.e., it resides on a circuit that would be powered off for other reasons, e.g., to disable all attached devices. I am just trying to work out how to power off the Arduino in advance of that action. At some point, that circuit would be powered back on again, and consequently the Arduino would power up again, reboot, and run its sketch for a few minutes. Once that is completed, the Arduino has nothing else to do until the entire sequence is repeated. – KC Tucker Mar 7 '17 at 3:43
  • As far as I can tell, I am trying to achieve something here that is rather different that the objectives one usually encounters. – KC Tucker Mar 7 '17 at 3:48
2

A battery-powered Arduino can go into deep sleep mode where it can use as little as 100 nA, and still be woken by a switch closure if required.

There doesn't seem to be much point to me to power down a mains-powered Arduino. What would be the purpose of that? The small amount of current it would use via the wall-wart would be trivial. If you are worried about voltage spikes (eg. lightning) then you should protect the input pins (or your power supply) whether or not it is powered off.

It seems to me that you may as well do whatever you need to do, and then go into an infinite loop. Once the Arduino is re-powered it will do it again. You aren't saving much by attempting to power it off, indeed that introduces an extra point which might fail.

but it will be placed remotely, and it seems [to me] safer to have it powered off. when not in use.

Safer in what way? Any extra hardware you introduce to make the Arduino "safer" might itself introduce safety issues. It reminds me of the days when we had a UPS (Uninterruptable Power Supply). The UPS would fail more-or-less as often as the power did. In other words, you replaced one possible failure (the power failure) with another possible failure (the UPS failure).

  • I think, that OP thinks around the way - no power = no possible shortcuts from condesated watter drops or other external shortcut devices - the same reason many people plug of electronics from socket, when they leave for vacation. – gilhad Mar 7 '17 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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