hi. Im on my long project still. And im attempting to check battery voltage from my vehicle and voltage divode it to 4v to an analog in. My math is correct (i belive) but the values i can not find for the resistors. My results: r1: .051k r2: .019 power: 100ua vout: 4v the battery max is about 14 volts (13.95) thats whith engine running. Can anyone els validate me or is the voltage just too high?
Your resistor values are awful low and while they may or may not divide the voltage properly they will consume a lot of unnecessary current. What makes a voltage divider work is the ratio of the two resistors value, not their absolute value.
I would want the sum of the two resistors be around say 5k ohms or so to keep current consumption down to 3ma or under. I will leave it as a exercise for the student to determine the correct values for the two resistors are such that they sum to 5k ohms but divide the voltage to the proper ratio, approximately 1/3 of input voltage.
Given the resistors you have selected, you can use Ohms law to determine the current that will flow through the resistor, as retrolefty points out.
Then, with the current and voltage known, you can compute how much power the resistor is consuming (voltage * current = wattage). Make sure that the resistor you select has the appropriate wattage rating.
Your 51 ohm resistor at 12 volts (V=I*R) will draw 12/51 amps. That's about 200 mA.
200mA * 12 volts = 2.4 watts.
That's a BIG resistor. You won't find that at Radio Shack.
you could check using a Digital Multimeter ;D
Or take the lazy guys route and get a 5k ohm ten turn trim pot. Wire the fixed terminals to battery + and -. Adjust the pot until you get the desired voltage (has to be = < 5vdc), then wire that wiper terminal to the arduino analog input pin as well as the battery ground to the arduino ground.
If you research around there are a lot of comments on how noisy and spiky automotice voltage system can be. Many add filtering and transisent protection devices to protect the Arduino board.