Automatic Power Off

I have used an APO-3 automatic power off unit in my vehicles for many years. I recently needed to add a second one for my rear-facing dash camera in my truck and wondered what it would take to design and build one myself.

I decided to use an Arduino Nano as the microcontroller since I had a bunch of those already. The first question was, how do you measure 12-15 Volts with a 10bit 0-5V ADC? A voltage divider is the answer! I found this article very helpful in figuring out how to do this.

I set up a voltage divider between the DC input and ground using a voltage divider comprised of a 68K and a 33K ohm resistor.

I was surprised to learn that the Arduino boards have on-board voltage regulators. This allows them to run from 5-20 volts, providing you keep the current very low. This means you can’t run a relay directly from an I/O pin, but you can drive a transistor without any problems.

Here’s the crude schematic I created using iCircuit

I used a 2N2222 NPN transistor to drive a 12VDC relay. A 1N4148 diode provides protection from inductive flyback from the relay coil.

Once I had the hardware, I needed to write a sketch to do the work. I set up a loop that measures the voltage. When the voltage goes above 13.00 volts, the relay is engaged. The voltage in a vehicle increases from 12.6 or so to 13.5+ volts when the engine is running and charging the battery. I’m not sure how this works in a Tesla, but for old fashioned internal combustion engine vehicles, this is fairly standard.

If the voltage drops below 13 volts, a delay counter is used to count down 300 seconds (or however long you want it to be). A one second delay in the loop provides the clocking. Once the counter reaches zero, the relay is disengaged.

The relay is connected to three Anderson PowerPole connectors to provide power to multiple devices.

I designed a case that houses the Arduino Nano board and relay and allows access to the USB C connector for (re)programming.

The key feature of the APO device is that you don’t have to wire a relay directly to your ignition in order to have the same functionality. Plus you get the bonus of a delay before the attached device loses power. That’s really handy for example when refueling. Your radio remains powered up for whatever delay you set and goes off so you don’t have to remember to turn it off. Standby current is about 17 mA.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *