I want to measure voltage from 5 batteries(5 inputs) using a pic!
The max voltage is 30V!
I can't use the analog input because it over 5V!
If any has a tip how i sould do ! please help me out!
Thanks in advance!
I want to measure voltage from 5 batteries(5 inputs) using a pic!
The max voltage is 30V!
I can't use the analog input because it over 5V!
If any has a tip how i sould do ! please help me out!
Thanks in advance!
As I show you in the image you could attenuate the input voltage using for example two resistors.
You could calculate the maximum value of tension in the uC port with the next ecuation:
V(in the uC Port) = 30v . [ R2 /( R1 + R2 )]
So if you put two R1=R2 and you have 30v in the input, you would have 15 volts in the uC port. You must calculate your better division factor.
By,
GuillerMo (AR)
27/12/06 --> I modify the ecuation, I added the [] for a better understanding.
Hi Bobx,
They are unknown, but in a knowed range!?
You must say, OK, my voltages are max i.e. 100V, I apply an attenuator 10:1 or what every time my circuit max. need/apply, as in pix in top of these text, and feed it to my micro...
K.