Detect if Engine is Running

Hi All,

Is there a way to use a Canbus message to detect if the engine is running or not? I want to be able to put my Electron to sleep if the engine is off to save the battery.

I found a post online about checking RPM, and if it’s 0, then the ignition must be off.


@osmosis311, The Carloop normally takes its power from the 12V connector on the OBD-2 port. On some cars, the power at the port is shut off if the ignition is in the off position. However, some people have discovered that there are exceptions to this rule.

Checking RPM only indicates if the engine is running. For example, you will probably get RPM of 0 if you put the key to the Run position, prior to starting the engine. So, it is not quite the same as determining if the ignition is off. However, RPM will let you know if the engine is running.

Another thing that might or might not work on your car is monitoring the voltage with your Carloop. When the engine is not running, you will likely see a voltage around 11.8 V or somewhere near that. When the engine is running, you will likely see a voltage increase to about 14V or a bit higher in order to charge the car battery. You might have to experiment to get the range for your electron and your car. It could vary with the health of your car battery; you might even be able to detect changes in the health of the battery.

Another thing to experiment with is if the car even responds to the Carloop with the different key positions. No response to a Carloop message might also work as an indication.

One other very important thing to think about with the Electron is how you are going to wake it up from a Sleep Mode (an choosing an appropriate sleep mode). Will it wake up every so often with a timer to check on the condition and then go back to sleep, or will you use some sort of detector to trigger an interrupt? It’s a pain to wake up an Electron if it is in a never-ending sleep; design to avoid that if you can.

There are a few ways to go about it; it will depend on exactly what behaviour you want and what the car makes available to you. Hopefully you find a good match!

Hi @osmosis311
You can Listen to CAN bus if there is no activity on CAN bus for 1 minute then you can Put your Electron in sleep mode.
I observed while working on different cars like FORD, Hyundai etc that there is no data on CAN bus when key is outside from Car. Activity on CAN bus start only when you put your Key inside or Car in Ignition ON condition.
Sometimes there is Activity on CAN bus when you press Lock / Unlock from your Remote of car, But this is also for very small time period and that too you will see 1-2 frames from BCM ecu.