B
B
balvardo2014-11-06 15:28:19
Arduino
balvardo, 2014-11-06 15:28:19

How to use Arduino as a "smart key" for power management?

There is a car, Skoda. It has one interesting feature: there is always power in the cigarette lighter, regardless of whether the car is running or not. (I have not seen this in Koreans and Japanese).
There are two devices that should live in the car: Raspberry Pi + Mobile Wifi router (separate device, not a whistle in the rasberry).
There is an understanding that just plugging them into the cigarette lighter through an adapter is a bad idea.
So. There is a cigarette lighter in which there is always a network. There is a wire to which + is supplied only when the car is running, respectively, it can be used as a control.
Everything is clear with the inclusion, they started the car, waited 15 seconds, gave a signal to turn it on. Turning it off is a little more difficult, you need to turn it off 30 minutes after the car is turned off. In fact, this is all poetry, and the essence of the question is how to implement this on-off switch, preferably using Arduino.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
artanets, 2014-11-06
@artanets

You can power the arduin from the cigarette lighter (only through an adapter, where the voltage can jump up to 14 volts) connect a 5 volt relay / transistor and a current sensor, or a voltage divider to the arduin.
And accordingly, through the relay, already connect it.
Now the arduin works constantly, if you use a current sensor, then everything is simple, a current appeared on the sensor, waited 15 seconds, opened the relay, the current disappeared, waited 30 minutes, turned off the relay / transistor.
You can use a voltage divider of two resistors (or a tuning resistor), it's cheaper but more dangerous you can burn the arduin. The fact is that the analog input of the arduin understands a current of up to 5 volts, and on the wire of the machine 12V. The divider has 3 contacts, if 4 volts is allowed between 1 and 2, then 8 volts will be between 2 and 3, so if you connect the divider on the contrary, you can burn the arduin.

V
Vitaly Peretyatko, 2014-11-07
@viperet

a person made a similar device on attiny13 (arduino is clearly redundant here). If you want to program in the same ArduinoIDE, you can use attin45 and arduino-tiny core.
the principle of operation is this - the tinka is powered by a 5V stabilizer through the microcircuit, plus we supply power from the cigarette lighter through the divider to the analog input. When the voltage in the network> 12V means the engine is running, we send a signal to the relay (or field-effect transistor), which controls the power load and turns on the RaPI. When the voltage drops <=12V, then the engine is turned off, we wait for a while and turn off the load.
By the way, in Skoda there is a line (power supply for interior lighting) on ​​which power appears when the ignition is turned on or the doors are opened, and disappears a few minutes after the ignition is turned off or immediately when the signal is set. I powered all my gadgets from this line.

C
chapter13, 2014-11-19
@chapter13

In this case, it is more expedient to use an "analog" solution - a timer. We set the turn-off delay once - the circuit opens after the set time has elapsed. You can get inspired by a similar solution here "Simple Timer". Instead of a relay, you can use a transistor.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question