Connecting 12V indicator light with optocoupler.

(Not an expert in this field, so bare with me if this question is ridiculous)

I was thinking of using a 12v to 5v optocoupler to provide a safety net to my vehicles electronics. What i want to know, is can a 12v to 5v optocoupler handle the voltage range most vehicles produce. Lets say (9v to 14.5V)

Can anyone share how they wired there dash lights (Single lights, high beans, etc etc) into Arduino if my idea isnt the most ideal way of doing so.

Thanks,

PS: I noticed the developer spends quite a bit of time responding to almost every question on the forum. Thank you for that, on be half of everyone that needs the help!

PPS: Absolutely incredible app! Cant wait to see how it progresses in the years to come!

1 Like

Thanks and welcome to the forum! Unfortunately we are not electronics experts, but hopefully someone could help you with this one.

Use a resistive divider or transistor switch for this. the other is not justified.

So your saying instead of using an optocoupler, use one of those options instead? Is there any specific reasoning behind this or? Or is an optocoupler just overkill?..

Im trying to be as safe as possible and protect my car/trucks electronics. Do these options offer the same protection in terms of isolation?

Thanks a lot for responding, i believe ive seen some of your videos on your custom dash skins.(If your who im thinking of) Awesome work if it is!

I have one more question since you seem to have experience with this platform and electronics. I was thinking of using a potentiometer and essentially making a 3D printed harness that allows it to connect to my actual fuel needle in order to get a more accurate reading. The read out via ECU for some reason is just all over the place and not very accurate no matter what I do…

Hows that for a option, is that anything anyone has ever done? Also, i was going to sort of take the potentometer apart so there was less friction on the unit its self

Again, thanks a lot for your time and responding to my post!!

No galvanic isolation is required on the 12/5 volt supply circuits.
Usually optocouplers are placed on a circuit with a very high current, so that they can be safely controlled.
In specific cases, this is overkill.
but nobody forbids using them.

What i want to know, is can a 12v to 5v optocoupler handle the voltage range most vehicles produce. Lets say (9v to 14.5V)

Yes.
Sharp PC817/PC847

Don’t need to complicate anything. Why do you need an optocoupler? use a ordinary resistive divider.
I make custom device for 2 CAN without opto.
Transistors, diods, resistors, caps - its ALL … don’t need galvanic isolation for car.
controller2CAN.jpg

The connection is very easy. Use a 1K resister were it shows 24Volts. On the other side is whatever voltage your Arduino input is. Careful some are 5volt tolerant and some are 3.3volt max.

PC817 opto coupler
Pin 1 = input with 1k resistor 12-14 volt input
Pin2 = Ground
Pin 3 = 4.7k resister to ground and the Arduino input before the resistor. The 4.7k is a pull-down resistor to keep the Arduino pin low before getting a input.
Pin 4 = Input voltage =Arduino VCC either 5 volts or 3.3 volts.

Wish I new how to just upload a pic.

I am not an EE so breadboard and try before using. I use this circuit in my builds.