Go Down

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

mark_anderson_us

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

Thanks

mark

Osgeld

#1
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
http://arduino.cc/forum/index.php?action=unread;boards=2,3,4,5,67,6,7,8,9,10,11,66,12,13,15,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,86,87,89,1;ALL

robtillaart

+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)

mark_anderson_us

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?

http://www.radioshack.com/product/index.jsp?productId=2049726

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?

Regards

Mark

mark_anderson_us

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)

Regards

Mark

Go Up