Go Down

Topic: Safely detecting 12v on/off in car (Read 1 time) previous topic - next topic


Hi Guys

I need to detect whether several wires in a car are "on" or "off". I'm concerned about connecting up to 15v (max I measure on my car) directly to an analog input. What's the safest/simplest way to determine if wire is hot or not




Apr 15, 2013, 03:19 am Last Edit: Apr 15, 2013, 03:21 am by Osgeld Reason: 1
opto-isolator is the best bet, or a resister + zener diode

have the current come in and hit a resistor (1k?) so there is not much current, then use a 5 volt zener to drop the voltage to safe levels and feed into normal digital input

dont feed the arduino anything over 5 volts, especially the analog channels. There is the argument that the AVR has input protection diodes, but I made a device that sniffed 24 volt lines to see if they were on or off, and I grabbed the wrong diodes off the rack, got 24 volt zeners instead of 4.7 volt zeners (the part number on the reel was 1 number difference)

it lasted about 2 days before acting weird, then about a week later it was stone dead, kind of suprised it didnt sneak back up the ftdi cable and mess with the USB port


+1 for optocoupler

you may also google for ruggeduino...
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)


Thanks Osgeld

Sounds like a good plan. Would rather use digital if it's easy to do, and definitely don't want to risk blowing anything up.

I calculated this as about 120mA, is that correct. Anything specific I need to look for in the diode specs other than 5v and 120mA?

Would these do the trick?


One last thing, do I need a load resisitor? I read somewhere that you need a seires and a load resistor, or can I just connect the top to the digital input and ground to ground?




Thanks Rob

Think I'll pick up a ruggeduino for testing!

Any suggestions on a part no/source for an opto coupler? (Not too sure what attributes I should be looking for)



Go Up