• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Circuit to detect when a car's ignition has been turned on

Status
Not open for further replies.

jjmalove

New Member
Hello,

I am working on a larger project, but one of the many small tasks is we need a decent way to spit out an input to a microcontroller when we see a vehicle's ignition has been turned on or off.

We have a potential solution. Simply tap into the fuse box onto one of the various ACC fuses that only turn on when the ignition is on. That is all fine and dandy except A: Its a bit invasive. B: It changes based on the vehicle. I would like a solution that is more cross-platform and easier for a user to install. I am limited in what I can say about the rest of the project, but all I really need is some sort of "tell" that I can either directly or step down the voltage (know how to do that already no problem there) so that I can feed a GPIO pin of a microcontroller elsewhere in the system.

I would like to come off a usb or cigarette lighter. On some cars, this would work great. Some cars have ports that only turn on when the ignition is on.
However, on some cars they are on all the time. Also, on some cars you have a few on all the time and a few on some of the time.
I want to design a circuit that can be used on either variant, either on all the time or on only when the ignition is on. I think I have an idea but not sure if this is correct.

I know when you crank the ignition the voltage dips for a short period of time. Does this dip always pass onto the rest of the ports like the cig lighter and usb? If so I believe I could design a circuit that sits there expecting to see either 0v or 12v, but if it ever sees a range of say, 6-10v, it lets me know. The big question is whether or not my assumption is correct that the cig lighter/usb do in fact dip during crank?

Any thoughts? I plan to go do some testing today but just wanted to put some feelers out as well.
 

ronsimpson

Well-Known Member
Most Helpful Member
I believe all voltages in the car "dip" during crank. The amount depends on battery condition, temperature, battery cable conditions, etc.
 

jjmalove

New Member
Hmm interesting. I'm in process of testing some vehicles right now. So if they do dip, what I really need is when I plug it in it detects what the voltage is a remembers. So I plug it in and it says "Ok, its 11.8 volts right now" (based on like you said battery condition and temp). So then I need it to detect when it changes past a certain amount from the initial detection. So if it dips say 1 volt lower than the original detection, it reacts.

I think on that same notice I could solve the problem if its one of the outlets that is off when the car if off, and on when the ignitions on. I plug it in and it says "Ok, its 0 volts right now". When it detects a rise of more than 1 volts, or whatever really, it reacts.

Im thinking this means it needs to be battery powered? But also I'm thinking this type of basic circuit falls into the realm of very low power that can run a long time on a battery or two? Hmmmm...
 

MikeMl

Well-Known Member
Most Helpful Member
If you have a power port on a newish car:

1. check if the port is powered when the car is parked, or not. Some are, others are only powered when the key is in the "accessory" or "run" position. The voltage at the port if the car is running will be >14V if the battery was not badly discharged just before the engine was started.

2. if the port is powered while parked, then it will measure <13.2V depending on how long the car has been sitting, and the state-of-charge of the battery. If you see <12.0V, the battery is low enough that the car might not start...

3. some power ports are live with the car parked, and with the engine running, but are interrupted while the key is in the "start" (crank) position. Some get powered as the key is turned to "run", and then unpowered while starting, and then power comes back as the key springs back to the "run" position. Some are also powered if the key is turned to the "accessory" position (i.e. the position you use to listen to the car radio while parked).

4. If you measure the battery voltage directly, you will see <13.2V if the car is parked. You will see >14V within a few minutes after start with the engine running. You will see the battery voltage sag below ~10.5V during cranking. The voltage drops between the battery terminals and a power port will be minimal, a few tens of mV at most.
 
Last edited:

jjmalove

New Member
This is all potentially good news, thanks Mike.

Well there is a different but potentially easy solution. If I just hook wires to the car battery I can monitor the voltage there and detect the dip, then use that detection to trigger. That may be more viable because, baring a few oddballs, the battery location is generally easy to get to, and straight forward.
 

shortbus=

Well-Known Member
Most Helpful Member
3. some power ports are live with the car parked, and with the engine running, but are interrupted while the key is in the "start" (crank) position. Some get powered as the key is turned to "run", and then unpowered while starting, and then power comes back as the key springs back to the "run" position. Some are also powered if the key is turned to the "accessory" position (i.e. the position you use to listen to the car radio while parked).
Most American cars do this, everything not needed to make the engine run gets shut down while the key is in start.
 

ronsimpson

Well-Known Member
Most Helpful Member
When I last worked on a auto project; During crank the voltage dropped, for a time, to 6V then ran back to 12V.
During the compression stroke the starter works real hard. After the motor passer top center the compressed gasses push back into the starter.
I added a diode and capacitor to grab voltage, when there, and hold during the compression stroke. The diode is a good idea because batteries get put in backwards too often. The capacitor is good because the computer needs to run for some fraction of a second with out power.
 

KeepItSimpleStupid

Well-Known Member
Most Helpful Member
I think my post got lost. Are you actually looking at "engine running" or "ignition on"?

CAN might have to be used to detect engine running on new cars.

Radio Shack sold a device that basically converted an always on cigarette lighter to one that on when the engine was running.

Ripple detection from the alternator could work.

EDIT: No - You posted on another forum too.
 
Last edited:

jjmalove

New Member
So good news for the short term.

The vehicle first being used after some testing...a lot of testing...in the heat...

It has 3 fuses I can tap into that only have voltage on them when the car ignition has been turned on. So problem solved in the short term at least.
KeepItSimpleStupid That device would be perfect. If you can possibly find and link it I would be greatful. I looked for something similar but didn't see it yet.
 

RODALCO

Well-Known Member
a GPS device will give all that info remotely but costs more.
 

jaack65

New Member
This may be overkill but an OBD-2 device will give you everything about nearly any car or truck. This includes RPM and battery voltage. If RPM is above ZERO, then the engine should be running or you are starting the vehicle. These devices use wi-fi or can be hardwired. Most times these devices are so small and innocuous, most people will never notice them. mahat a ny times mfg will disable things consumer may want to use, such as fuel types, etc..
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top