Automotive: how to safely connect the car's power grid to the input of an intelligent switch?
Are you looking for something like this?

Signal can come from any 12V(nominal, unregulated) circuit in the vehicle.
Vpos can also come from any 12V(nominal) circuit capable of powering your load.

The zener diodes (marked 16v) protect by grounding overvolate spike &amp; "freewheeling" negV transients while the regular/switching diodes block negV transients from your switch/load.

The 10K and 5K5 resistors form a (5.5/15.5) voltage divider to drive your input pin.