Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

PIC - AC Voltage Monitor

Status
Not open for further replies.

rostec

Newbie level 3
Newbie level 3
Joined
May 15, 2005
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,319
Hi,

I am a bit stuck on the best way of doing this. I want to build a 0 to 250V AC Voltage monitor circuit to connect to the ADC of a PIC chip.

I need to be able to monitor both 220vAC and 110vAC and detect if they go over or under voltage so I can program my PIC to decide what action to take.

Do I use some sort of opto of some other form of isolation to sense/convert the high AC into 0 to 5VDC?

Thanks
Niall
 

Isolation is your choice. You can do with or without it.

It depends on the accuracy required. The most accurate way will be to drop the volatge by precision resistors, convert to DC by an RMS to DC convertor and feed to ADC input.

A cheaper way is to use an opamp based precision detector and a peak detector to get the peak and estimate the AC rms voltage.

A cheap and practical way is to just use diodes and resistors and capacitors to get a rough estimate of peak. Most voltage protection devices dont need too much accuracy so can rely on this method.
 

    rostec

    Points: 2
    Helpful Answer Positive Rating
Thanks for that techie.

I was thinking (if isolation is not a problem) to drop the AC down using resistors and then putting it through a simple bridge rectifier to get 0 to 5VDC and then straight on to the 10bit ADC on the PIC. I probably would need a ripple cap as well and a decoupling cap or two after the rectifier (between + and GRN). What sort of value for electrolytic / decoupling caps to get the least ripple and therefore the best accuracy?

Would 1/2watt resistors do - ie what sort of current draw should I expect through these resistors to feed the bridge rectifier / ripple cap / decouplers and then the current draw of the ADC on the PIC.

Am I on the right lines here. Any thought would be greatly appreciated.

Cheers
 

Other option is to use a small mains transformer, such as for example 230/6Vac, rectify this voltage and feed it directly to PIC.
You will have full isolation, so you don't need to worry for your safety ..
rgs
IanP
 

    rostec

    Points: 2
    Helpful Answer Positive Rating
I agree a transformer is a good solution. Make sure it is designed for 220V operation. A very low power transformer is needed, since it basically works with no load.

Then, following the transformer, I would use a rectifier with an opamp, to reduce the error associated with the voltage drop of the diode.
 

    rostec

    Points: 2
    Helpful Answer Positive Rating
Capacitor size depends on your choice of 2 things. 1 is the speed of response and 2nd is measurement accuracy. If you use a large cap, it will be slow but will have lesser ripple.

What I did once was to detect peak in software. Since ADC on chip is quite fast, I take measurements at a fast rate and then see the peak value. That way, a very small capacitor was fine.
 

    rostec

    Points: 2
    Helpful Answer Positive Rating
how to see how much the peak voltage drop is with ADC?i mean can u all do these thing while observing the voltage?
 

xjackal, I dont quite understand what you mean. AV volatge varies at 50Hz-60Hz. If you sample fast enough, you can easily capture an acceptable peak. What I did was to wait for a zero crossing, then wait for a peak (when voltage starts to drop again), record peak and when the volatge is falling, do other controller tasks and come back to wait for the zero crossing. That way, I did not even have to incorporate a complex interrupt based system.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top