Power control circuit

I am planning a project based on an Arduino Due and a lot of different devices (sensors, speech modules, displays and so on). The system will mainly be battery powered (8 x size D 1.2V), with the option to use a power adapter while the battery pack is being recharged.

I would like the Arduino to have full control of the system power, so it will be able to shut itself down should a critical situation occur, like low battery power, too high load current, or too high temperature. I would also like all shutdowns (even user instigated) to be controlled, so the system can save important operational parameters to EEPROM before powering down.

So, in the attached schematic I have tried to design a power control circuit for the system, based on a 5V relay. The relay is normally open (NO), which means no power to the system. The relay is activated (closed) by an Arduino output HIGH.

From the system OFF state, the Arduino has no power, of course, so the relay can't be closed. I have placed a push button to directly short circuit the relay long enough for the system to "boot up" and set the relay activation pin HIGH, after which the system keeps itself running, as long as that pin is held HIGH by the Arduino.

The push button is DPST (or DPDT), so I use the other poles to test for button presses while running, which will initiate a controlled shut down.

Before I start building, I would like to know if any of you have made similar (or most likely better) power control circuits? And if mine is completely insane and full of errors and will most likely explode when powered on?

Also, is using a relay stupid? Could a simple MOSFET do the trick and at much lower current loss?

Why don't you use a latching relay?

You waste 0,36W if your circuit is on it would make your on/off circuit much easier since you just need to pulse the relay coil.

EDIT:
Next thing is, your relay needs 5V, but your arduino only provides 3.3V. So you need an additional transistor to power the coil. You could use the 3.3V version of the relay but you'll need the transistor anyway since a single pin should only source a limited amount of current (the Uno has a limit of 20mA per pin, your relay at 3.3V needs 120mA! - maybe the Due is similar).

That is a very good question, Thomai. Well, one reason is that I already have a non-latching relay, but most importantly, I didn't know about latching relays until now!!

I don't know if a latching relay would necessarily make the circuit simpler or easier. As far as I can understand from a very brief search, controlling a latching relay requires more circuitry, than a non-latching, because you need to be able to reverse the current flow in the coil to toggle it (please, correct me if I'm wrong). But it would certainly be a very welcome power saver!

I will have to read more about latching relays.

There are relays with two coils - one for ON and one for OFF.

Your ON-button powers the "ON" side of the coil. The arduino is just responsible for the OFF coil.

Simple and clean :slight_smile:

thomai:
EDIT:
Next thing is, your relay needs 5V, but your arduino only provides 3.3V. So you need an additional transistor to power the coil. You could use the 3.3V version of the relay but you'll need the transistor anyway since a single pin should only source a limited amount of current (the Uno has a limit of 20mA per pin, your relay at 3.3V needs 120mA! - maybe the Due is similar).

Ah, sorry, my schematic wasn't particularly clear on this point. The complete system will have DC-DC step-down converters to power both 5V devices and 3.3V devices in the system, so I won't be using the Arduino linear voltage regulator for powering stuff.

thomai:
There are relays with two coils - one for ON and one for OFF.

Your ON-button powers the "ON" side of the coil. The arduino is just responsible for the OFF coil.

Simple and clean :slight_smile:

Oh, that really is simple and clean! Thanks. I will look into that.