openxc / vi-firmware

OpenXC-compatible firmware for PIC32 and LPC1768
http://vi-firmware.openxcplatform.com
BSD 3-Clause "New" or "Revised" License
197 stars 106 forks source link

Find standard, reliable OBD2 method to determine if a hybrid's ignition is on #248

Open creitz opened 10 years ago

creitz commented 10 years ago

Currently, the VI checks for engine speed or vehicle speed to be non-zero in order to activate. For hybrids, though, the engine may or may not be running even if the vehicle is on. That's not a problem if the car is moving, but if the vehicle is not moving both will be zero, and it won't activate.

zacnelson commented 10 years ago

good catch @creitz. Based on the list of currently programmed PIDs, I might suggest that we use the fuel_pressure signal as the input to the function: https://github.com/openxc/vi-firmware/blob/master/src/obd2.cpp#L53

This might not be ideal, though because the fuel rail might remain pressurized even after the vehicle is turned off... This also doesn't solve the problem for electric vehicles like the Focus Electric.

@peplin if the vehicle is responding to PID requests, can we assume that the ignition is ON? Do the PID requests keep the CAN bus/modules awake?

peplin commented 10 years ago

if the vehicle is responding to PID requests, can we assume that the ignition is ON? Do the PID requests keep the CAN bus/modules awake?

Unfortunately no, we have to be really careful because sending PIDs can keep modules awake and kill your battery.