Detect car +12v using Arduino

Thread Starter

StealthRT

Joined Mar 20, 2009
303
I am looking to detect 12+v from a car wire using an Arduino.

I have found the following schematic:


I know how crazy automotive voltage can get so i just want to make sure the schematic i found above will accommodate the crazy random currents that the car could produce.

Also, wouldnt i need some type of heatsink taken that i am stepping down a +12v to 5v or less? That, in my mind, would produce a pretty good amount of heat?
 

MrChips

Joined Oct 2, 2009
30,810
Two mods:

1) The voltage across the diode is going to be about 0.6V. You should put two diodes in series to raise the voltage to about 1.2V.

2) You need to calculate how much current you need through the base-emitter junction.
You only need about 10μA. Even if you allowed for 100μA, this would mean that the series resistor from the 12V supply can be as high as 100kΩ.

If you want to keep it safe and be isolated from the 12V supply, you can use an optoisolator.

Edit: I just noticed that the diode is reversed biased. It will work as is. Initially I had a zener in my mind. I would suggest using an optoisolator instead of the diode and transistor.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,498
That's pretty much exactly what was in the link posted above.

D1 is an optional way to protect the LED against hooking it up backwards. It has no function in normal operation. Unless maybe the automotive ground voltage can spike up far enough to exceed the reverse voltage breakdown rating of the LED. Hmmmm, can that happen?
 

GopherT

Joined Nov 23, 2012
8,009
Unless maybe the automotive ground voltage can spike up far enough to exceed the reverse voltage breakdown rating of the LED. Hmmmm, can that happen?
Yes, it can happen when relays are opened or a motor is turned off (inductive kickback).
 
Top