Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Detect car +12v using Arduino

Status
Not open for further replies.

StealthRT

Member
I am looking to detect +12v from a car wire using an Arduino.

I have found the following schematic:
**broken link removed**

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?
 
It'll work. It forces you to tie the Arduino GND to the car's chassis, which may introduce ground loops where you might not want them...

If that matters, you might want to look at an opto-isolator...
 
I think I'd slap a TVS or a ~10μF capacitor across the diode as a spike suppressor.

Edit: No heatsink necessary as the current is low.
 
It would also be a good idea to put 470 Ω or so in parallel with the diode. That way you will need at least 2 V and 1 mA for the voltage to be registered.

Without the resistor, you only need 0.7 V and 1 μA or so to turn on the transistor.

I have seen problems in cars, even with circuits from large car makers, where moisture caused a transistor to operate.
 
As Mike said, the circuit is an opto-isolator. That has the advantage that the supply for the 12 V can be separate from the 5 V supply.

With the transistor circuit, the transistor has a huge gain, so a really tiny current could turn on the transistor and be detected as 12 V. On the opto isolator, the gain is less than 1, and it might not turn on at 12 V. That would give you the oposite problem of it not detecting 12 V at all.

If you look at The 4N25 datasheet the minimum current transfer ratio is 20%, and that is measured at 10 mA. In your circuit it the current will only be around 2 mA, and the graphs show that the current transfer ratio drops to around 40% of that 20% at 2 mA so it could be as low as 8%. That means that you would only get 0.16 mA from the output of the opto isolator, so the voltage drop on the output would only be around 0.8 V, and the Arduino would not see that as a low input.

Even with the typical current transfer ratio of 50%, the circuit behaviour would be marginal at best. I would suggest that you use more diode current and a larger collector resistance on the opto-isolator circuit.
 
The opto solution is great, but I would put a 1uF cap after the transistor as well. The car power supplies tend to have some very short sudden drops from time to time. Further on, when you start, the cap will hold the signal low for some time to prevent your board from start using unstable power.
 
Status
Not open for further replies.

Latest threads

Back
Top