13

My device needs to know when a car engine/ignition is started and stopped.

Is it possible to get that status using OBD2?

If yes, which PID will give me that information? Do I need to write any car-specific logic in my device to support this feature?

Zaid
  • 39,111
  • 48
  • 142
  • 290
rp1980
  • 325
  • 3
  • 5

1 Answers1

9

Everything depends on exactly what your looking for.

If engine running/not running is sufficient then check the RPM. If RPM is non zero, the engine is running. If the RPM is zero or no communication then the engine is not running. This can be easily done in the OBD stream.

If you want anything more than that you need manufacturer specific and then not everyone is going to support it. If a car has a soft ignition switch then it is connected to some module that reads it's position and turns on relays to power up the car. It would be a matter of accessing that module for the data. If the car has a hard ignition switch that actually controls power to the car directly then at most a "cranking active" pid may be available.

vini_i
  • 16,015
  • 1
  • 40
  • 62
  • Thanks @vini_i. What will be RPM of car when it is not moving? e.g. it is started but in parking mode or neutral mode. If RPM is non zero even in those cases, it will work for me. – rp1980 Jan 04 '16 at 14:33
  • @rp1980 Barring hybrid cars, normal idle speed for a car is above 400RPM. – vini_i Jan 04 '16 at 14:48
  • What about hybrid cars? Is it zero? – rp1980 Jan 04 '16 at 15:17
  • @rp1980 Hybrid cars follow their own rules. RPM is not a good indicator for them. They normally have soft ignition switches though. – vini_i Jan 04 '16 at 15:41
  • 2
    @vini_i - You also need to include auto-start vehicle (that name may be wrong ... the ones which shut themselves down at stoplights and restarts as soon as you let off the brake) along with hybrid vehicles. – Pᴀᴜʟsᴛᴇʀ2 Jan 04 '16 at 21:54