Go Down

### Topic: 12 volt input? (Read 7862 times)previous topic - next topic

#### Linc

#15
##### Mar 05, 2012, 06:32 pm

Many cars have nasty voltage spikes & stuff. I would put a transzorb across that pin as well.
You can expect 14.5V when the battery is charging.
Vout = Vin R2/(R1+R2)
You know you want Vout <=5V,  Vin up to  14.5V, pick an R2 of say 6.8K and Solve for R1
Vout(R1 + R2) = Vin R2
VoutR1 + Vout R2 = VinR2
VoutR1 = (VinR2 - VoutR2) or (Vin-Vout)*R2
R1 = (Vin - Vout)*R2/Vout
so (14.5 - 5)*6800/5 = 12920
using a standard 15K:
14.5*6800/(6800+15000) = 4.55V
and if Vin was lower
12*6800/(6800+15000) = 3.74V  so you get a good high over the expected Vin range.

Current draw, V=IR, so V/R = I
14.5/(6800+15000) = 0.66mA

Thanks for the input but I am afraid that my translator has broken and all I got was in Greek LOL XD

Really, what I am tapping into is the stop lamp switch which is a normally open switch. So a voltage spike from the alternator is possible but not probable.  And with am amperage draw of 3.5 amps for this particular application but I could see some where I could reach an amperage draw of 10 amps.

Alternators now a day are mostly PWM to keep a constant voltage in order to keep the spikes down for the already onboard computers.

#### deejay808

#16
##### Jul 12, 2017, 09:44 am
Here's the diagram :

I may be wrong, but in that scheme, if you measure the voltage over the Arduino input and the ground, it will be 7V, and I guess we don't want that. Therefore, I think the resistors should swap places. Correct?

Go Up