Hi all.
I have an idea for powering, starting up and shutting down an in car computer (pi) via constant power and CANlines via the obd2 port only.
I only have access to the OBD2 port and no switched power sources in the car.
My idea builds off this:
http://electronics.stackexchange.com/questions/61877/shutdown-controller-for-raspberry-pi-in-a-car
Instead of using a 12v switched power, "ACC" in the diagram, I would like to use the a CAN line. Hear me out.
When the car is off the CAN data line are inactive, 0 volts, until someone unlocks the car or starts it. When the car is on then the CAN H line become active, idle at 2.5 volts and moving up to 3.75/5v to create a differential with the CAN L line(1.25-2.5v).
Would it be possible to use the CAN H line with input protection(diode) and filtering caps to get a "clean"/"smooth" 3.75 or 5 volts out of the data line to drive the mosfet and switch the relay? This "clean" voltage will then be level shifted to 3.3v to signal a GPIO pin on the board to shutdown the pi when power(can H line becomes inactive/car is off) is removed. Ideally the mosfet would draw little to no current, but i honest have almost no clue what I'm talking about lol.
Does this make sense? Or am I insane?
I am not an EE so assistance is very much so appreciated.