Line Voltage measurement, help!!!

Status
Not open for further replies.

LijoeThomas

New Member
I'm building a microcontrolller project to measure the power line voltage and display it on a lcd screen. I dont know how to measure 220v as its too high a value.
Some pls tell me how I can bring it down to saFe levels acurately and measure it, with a very small error margin?

Thank you....
 
A transformer comes to mind as a way to reduce the voltage to something more measureable. It also provides a degree of isolation and filtration (may not respond well to higher frequencies, spikes, etc).

"Very small error margin" isn't specific but suggests you are interested in reducing error. Consider that on an electrically noisey line that voltage may vary considerably from moment to moment and that noise can interfere with your measuring process.
 
yer use a trasnformer to lower the potential down (main advantage is isolation) then use a diff-amp or instrumentation amp (with filtering) to get a usable voltage
 
Please don't make multiple posts of the same question!.

A transformer is one way, but (depending on the exact application), you may simply need a resistive attenuator to feed the analogue to digital converter - however, make sure the resistors are rated for the voltage!.
 
remembering the transformer would only work if the line voltage is AC, but that goes without saying right guys.

could you not just use a large voltage divider, say with a ratio of 10:1, thus bringing your measurment voltage down by a factor of 10, then you pic just adds a 0 onto the voltage it reads. there wouldnt be any more error than measuring it directly, wouldnt it only be limited by the resolution of the ADC?
 
or if there is an Op-amp that could handle that voltage you could set it up in an amplifier circuit with a gain of 0.1 or whatever, that would do u. Tho i'm not sure if theres an op-amp that could handle a 220v input......
 
Misterbenn, I like your idea of voltage divider using a 10:1 ratio but the problem is that, I am not sure how to design the divider circuit for 220v ac. And also to take care of the current flowing through the circuit.
If you could give me a design to work with, it would be appreciated.
 
to reduce the current flowing through the voltage divider cirucit you need as big a resistance as pos. so say 200MHz and 20MHz.
that would give a total resistance of 220MHz, that gives you a tiny current and shouldnt effect the voltage your measuring.
 
I would be inclined to be careful about advice around mains voltages from someone who thinks resistance is measured in MHz! :lol:

And he even got the numbers wrong!, dividing by 11 and not 10.

I mentioned this solution a little higher up, but I don't think dividing by ten is going to be enough, that still gives 22V - assuming you expect to feed it to an analogue to digital converter?, it probably needs to be under 5V.

The values of such a potential divider depend on a number of things - for a start, what it's going to feed!. Also, mains is AC, you need to either rectify it, or read only at the positive peaks (which requires zero-crossing detection).
 
Meh, give me a break i've been at Uni all day, got back and was my turn to cook for the whole flat.
so you can understand if i got things a bit wrong...

ok so yes, For AC you'll want to rectify it and its prob best to put some smothing capasitors in so you measure the RMS voltage. If you dont use capasitors you'll have problems with sampling rates.

Also as i ment to say use 198Mohms and 2Mohms giving you a total of 200Mohms. giving you a voltage of 2.2V

any better??
 
Misterbenn said:
Meh, give me a break i've been at Uni all day, got back and was my turn to cook for the whole flat.
so you can understand if i got things a bit wrong...

I've been at work all day, so what? - it's hardly an excuse for getting something so basic incorrect!.

Did you perhaps cook bacon and bananas for tea? :lol:

Funnily enough, a friends son started Uni last year, and he's actually found he enjoys cooking - so he does all the cooking now, and the others take turns cleaning, buying the food etc.

ok so yes, For AC you'll want to rectify it and its prob best to put some smothing capasitors in so you measure the RMS voltage. If you dont use capasitors you'll have problems with sampling rates.

This isn't RMS, doing it this way reads peak, but as long as it's a sinewave you can calibrate the reading to give a similar reading to RMS - almost all multi-meters work this way, only a very few read RMS.

Also as i ment to say use 198Mohms and 2Mohms giving you a total of 200Mohms. giving you a voltage of 2.2V

any better??

As I said previously, it depends entirely on what it's feeding - with those values you would need a very input impedance to the converter, at least 10MOhms - most PIC's require a maximum of 2.5KOhms source impedance.

But I see where you're coming from with trying to keep the resistances high!.
 
I was thinking of connecting the output from the resistive/setp down network to a ADC0804. I'm not sure how to put these resistors in place in order to do this. Could some one draw the resistive notwork for me?

Thanks...
 
LijoeThomas said:
I was thinking of connecting the output from the resistive/setp down network to a ADC0804. I'm not sure how to put these resistors in place in order to do this. Could some one draw the resistive notwork for me?

Check my PIC analogue tutorial hardware at , this uses a similar potential divider R5/R1 for CH0, plus it uses an opamp to overcome the low input impedance problem.

The values in the tutorial give a division of about 4.5 times, in order to display 0-10.23V with a 2.5V reference.
 
correct me if I'm wrong

So Nigel, are you saying that if I put 200Mohms as R5 and 2Mohms [Thanks to Misterbenn for those values] as R1 in your channel 1 that I should get a good stepped down value with very little current so that I can feed it to a ADC such as ADC0804?
 
Re: correct me if I'm wrong

LijoeThomas said:
So Nigel, are you saying that if I put 200Mohms as R5 and 2Mohms [Thanks to Misterbenn for those values] as R1 in your channel 1 that I should get a good stepped down value with very little current so that I can feed it to a ADC such as ADC0804?

I would have thought they would probably be far too high, but you could check the ADC0804 datasheet?.

There's no reason to go anywhere near that high, it's completely pointless.
 
Ok here is something I found online.

https://www.electronics-lab.com/projects/test/014/index.html

This IC 7107, is an ADC with 3and 1/2 seven segment display driver.
They have shown that to measure 0-2000v we have to put a resistance of 120Kohms as R3.

I need to use a normal ADC and need to modify the circuit. can anyone help??
My question is, Is it enough to connect the R4,C4 and R3 network as shown in https://www.electronics-lab.com/projects/test/014/schematic.gif

to a ADC0804 to get the same result?

R3=120Kohms
R4=1Mohms
C4=10nF
someone pls help!
 
Those values are COMPLETELY wrong, and you would destroy the 7107!.

The two resistors are a simple potential divider, as we've been discussing, it's no big deal to arrive at the values - it's simple ohms law!.
 
ok i agree you know your stuff. If you say its wrong cant you even tell me whats right? Like for example the resistance value and how it should be connected.
It would be appreciated if you could solve the problems rather than saying if its right or wrong.
 

For a start - do you know what ohms law is?.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…