More ADC help needed

Status
Not open for further replies.

AtomSoft

Well-Known Member
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.
 
An 8k on the top and 5k on the bottom would work. Picking actual values yields 4.7k and 8.2k and that would give 5V out for 5+(4.7/5*8.2) = 12.7V.

Edit, increase the 8.2 if you want higher range.

Mike.
 
Last edited:
Pommie when you say 8k on top and k on bottom do you mean:

VCC(13v)<---8k---TAP---5k--->GND(0v)

heh it wont control the charge completely but via relay or something like that.

How would you go about it Gayan?
 
Last edited:
Pommie when you say 8k on top and k on bottom do you mean:

VCC(13v)<---8k---TAP---5k--->GND(0v)

Yes, because you will get the same current through both, you will get 8V across the 8k and 5V across the 5k.

Mike.
 
oh heh i see now ... thanks a ton!!! 8+5 = 13 heh simple and since its Kohms less current usage.. 2.6mA right? 13/5k=2.6
 
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?

David
 
Last edited:
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?
 
2) Also if i use 14v then 5k bottom and 9k top correct? you'll get 5 volts at the divider

2) Also if i use 15v then 5k bottom and 10k top correct? you'll get 5 volts at the divider
 
2) Also if i use 14v then 5k bottom and 9k top correct? you'll get 5 volts at the divider

2) Also if i use 15v then 5k bottom and 10k top correct? you'll get 5 volts at the divider

great. I want to turn a max to a max. So if my max is 15v then i want it to be 5v max from pic. this way i just do some math to get the numbers.

so with this said each step should be around 15mV correct? or would it be around 45mv?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…