Continue to Site

# Measuring voltages with pic!

Status
Not open for further replies.

#### Cortex

##### Full Member level 3
Hello

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!

Cortex said:
Hello

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!

Cortex,

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.

### Cortex

Points: 2
Helpful Answer Positive Rating
Hello.I want to measure 5 unknown voltages;DC or AC with PIC .How can I do that? Thanks,

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.

bobx

### bobx

Points: 2
Helpful Answer Positive Rating
bobx

### bobx

Points: 2
Helpful Answer Positive Rating
Status
Not open for further replies.