Detect car +12v using Arduino

Discussion in 'The Projects Forum' started by StealthRT, Jun 23, 2013.

  1. StealthRT

    Thread Starter Active Member

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

    I have found the following schematic:
    [​IMG]

    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?
     
  2. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
    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: Jun 23, 2013
  3. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,058
    +1
    Simple and safe.
     
  4. StealthRT

    Thread Starter Active Member

    Mar 20, 2009
    223
    0
    Care to show a schematic?
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,449
    3,365
  6. StealthRT

    Thread Starter Active Member

    Mar 20, 2009
    223
    0
    I got my answer in another post:
    [​IMG]
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,058
    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?
     
  8. GopherT

    AAC Fanatic!

    Nov 23, 2012
    6,067
    3,836
    Yes, it can happen when relays are opened or a motor is turned off (inductive kickback).
     
Loading...