# Best way to shift automotive logic to Arduino TTL

My vehicle ignition switch voltage is 9V when the vehicle is not running. It is 6V when button is pressed. I need a way to convert this to TTL Arduino digital logic levels. I thought I could use a voltage divider, but I can't compute resistor values that satisfy both conditions. I.E. 9V can be 5V, but the 6V would still be high enough to be considered a logic High. Maybe I missing something?

I thought about optoisolators, but it presents the same challenge as the voltage divider, the 3V Delta linearly scales on both sides. Again, maybe I'm missing something with calculating the left hand resistor to find the right hand resistor.

Then there is the ADC of the Arduino, which I can scale in the software with a voltage divider. My concern with this is the power consumption will increase more versus using a digital IO. And I'm trying to be mindful of my car battery and not draining it.

EDIT: I didn't explain well what I'm trying to do. I have a raspberry pi that I'd like to be gracefully shutdown by an Arduino monitoring the ignition of my vehicle. So if I push my ignition button, I'd like my arduino to detect that I'm either entering a vehicle turn on or turn off state and make the appropriate decision for the Pi's power. This gets tricky because the arduino needs a way to know the ignition state. And as someone suggested, maybe I'm not looking at the right signal?

I found the ON/OFF switch voltages from here: https://www.autocats.ws/manual/chevrolet/tis0911/en/documents_2012/Volt/SM-R/92535312.en.html

I've also found this description as well:

"The vehicle ON/OFF switch contains two individual switches that provides redundant switch inputs to both the body control module (BCM) and the keyless entry control module. The BCM supplies the vehicle ON/OFF switch a constant B+ signal. The BCM monitors this signal to determine if the switch is released or pressed. When the vehicle ON/OFF switch is not pressed, voltage on the signal circuit is pulled down through two resistors in the switch. When the vehicle ON/OFF switch is pressed, voltage on the signal circuit is pulled down through only one resistor, changing the voltage seen at the BCM and indicating that the vehicle ON/OFF switch is pressed."

• It's unclear if you are trying to read this or drive it; a change between two such analog levels is a bit odd, and it may be that you are misinterpreting something in the time domain (ie pulse patterns) as an analog level. Likely this is not the best place to connect in order to do whatever you are trying to do, but you haven't stated what that is. Consider an accessory power bus or maybe the ODB-II connector instead? Commented Feb 21, 2019 at 22:56
• You want to map 9V -> 5V, and 6V -> 0V? Can you clarify what input to what output you want?
– Mark
Commented Feb 21, 2019 at 23:12
• Chris, It's entirely possible that I'm misinterpreting my car's ignition switch. Here's the link of the car service manual/schematics that I pulled this information from. [link] (autocats.ws/manual/chevrolet/tis0911/en/documents_2012/Volt/…) Commented Feb 22, 2019 at 0:06