Hey guys. I recently started a topic on charging LEAD-ACID batteries and i think i know what to do but i need help in developing something to read the voltage of what seems to be a max of 12.65V ...
I would like to create a ADC using a Resistor divider to drop 13v to 5v. But calculating values isnt my strong point.
The ADC on the PIC will give you values from 0 through 1023, so if you can set up a Voltage Divider with the ratio 4.092 to 1 then 20.46V input will become exactly 5V (1023) on the output. This could be done with a POT so you can easily calibrate it.
Using this ratio, you can roll the ADC data to the right twice (mathematically this will halve, then halve again) to get the Voltage * 10. Much simpler calculation in a PIC than trying to multiply/divide.
Am I making any sense or just confusing? Did I get the maths correct?
1) Ok i found out i might need 15v as my max or 14v.... so regardless of top resistor i need a 5k resistor on bottom right? can i use a 10k pot set to 5k?
2) Also if i use 14v then 5k bottom and 9k top correct?
2) Also if i use 15v then 5k bottom and 10k top correct?