CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Measure AC Voltage

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
ICD2
Guest







Measure AC Voltage
PostPosted: Sat Jun 05, 2004 2:47 pm     Reply with quote

Help how i can measure ac voltage with PIC (220V,380V)
How connect op. amp. and devide voltage.
Maybe someone have links.
Guest








PostPosted: Sun Jun 06, 2004 3:53 am     Reply with quote

I saw an application note on microchips web site for measuring 110VAC. maybe it can be adapted for higher voltages. Don't remember the ap note number though. You'll have to search through microchips web site.

good luck
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Sun Jun 06, 2004 4:17 pm     Reply with quote

use a flying capacitor -- think circus trapeeze. instead of writing how it's implemented i drew you a picture. note, use caution and the correct components when attaching to mains voltages. if you don't know what the correct components are then seek assistance from someone who does so you don't injure or kill yourself.

http://losdos.dyndns.org:8080/public/pic-uC/flying-cap-small.jpg
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 7:44 am     Reply with quote

The flying capacitor is a neat idea, but not cost effective in most applications. That relay costs money, space, and power. It may be good for a home project or an expensive piece of exacting measuring equipment.

Instead look at using a voltage divider to get the signal small enough for ICs to handle easily, then use an instrumentation amp or a differential amp to shift the signal to the ground reference of the A/D.

Beware of safety when working with 380VAC, that is almost 540V peak! Many resistors can not handle that voltage safely even if the power is OK. A lot of breadboard techniques also become dangerous at these voltages.

If it is a home project and you don't need too much accuracy you might get away with a divider driving a "wall wart" transformer with an unregulated output. The transformer output will be roughly proportional to the input.

Sorry, no links at this hour Monday morning.

Be Safe,
Sherpa Doug
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 8:28 am     Reply with quote

sherpadoug,

i agree with some of your points. however, the flying capacitor provides air-gap isolation, whereas a divider/instrumentation amp does not -- without additional cost and complexity (such as using a 1:N step-down line transformer). hence, as you alluded to, component selection is even more critical without an air gap.

based on the original post, i surmised that the poster had limited knowledge of the subject and only had to build one unit. so recurring bill-of-materials cost would not be a problem. and, safety is markedly improved with the air gap.

jds-pic

SherpaDoug wrote:
The flying capacitor is a neat idea, but not cost effective in most applications. That relay costs money, space, and power. It may be good for a home project or an expensive piece of exacting measuring equipment.

Instead look at using a voltage divider to get the signal small enough for ICs to handle easily, then use an instrumentation amp or a differential amp to shift the signal to the ground reference of the A/D.

Sherpa Doug
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 9:02 am     Reply with quote

Analog devices (www.analog.com) has a new ad for their AD7400 isolated ADC that may be exactly what you are looking for. The price is $4 in qty 1000, but you might get a sample for free. At least the datasheet and App notes might give you some ideas.
_________________
The search for better is endless. Instead simply find very good and get the job done.
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 9:07 am     Reply with quote

jds-pic wrote:
safety is markedly improved with the air gap.


If you go for UL or CSA approval for a high volume product you may find that the regulators disaggree. They will be worried that a mechanical failure of the relay could cause a ground to line short. They may insist on redundant isolation.
_________________
The search for better is endless. Instead simply find very good and get the job done.
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

PostPosted: Mon Jun 07, 2004 9:32 am     Reply with quote

SherpaDoug wrote:
jds-pic wrote:
safety is markedly improved with the air gap.
If you go for UL or CSA approval for a high volume product you may find that the regulators disaggree. They will be worried that a mechanical failure of the relay could cause a ground to line short. They may insist on redundant isolation.


sherpadoug,
having put about 20 different telecommunications products into large volume manufacturing, i'm extremely familar with UL 60950 and CSA C22 No.950, and the creepage and clearance requirements within. i don't know why you keep harping on production costs and production compliance requirements when i've clearly stated that the flying capacitor was a potential solution for a one-off project -- one that was simple to implement from a neophyte's perspective using parts commonly available at radio shack, and one that had the benefit of an air gap to reduce the risks of connecting to the mains.

next, i expect a post from you about the EMC issues with this circuit, which would in turn affect FCC CFR Part 15 and Telcordia GR1089 compliance.

jds-pic
mvaraujo



Joined: 20 Feb 2004
Posts: 59
Location: Brazil

View user's profile Send private message

PostPosted: Tue Jun 08, 2004 7:43 am     Reply with quote

ICD2,

I will not go through the other points that the guys already mentioned, those concerns are true for a product.

In my company, I have a product that monitors AC line for disturbance and i have to measure voltage. The best solution until now is the use of a small transformer, in our case is 264V/13.2V. After the transformer I use OP07 amplifier in a differential configuration that goes to a full wave precision rectifier (also using OP07). In my case this is necessary because we really calculate true rms value of the voltage.

If you need only voltage value and would like to ignore ac voltage distortion, all you need to do this get the differential amplifier to some circuitry to get only the peak voltage and route this to the A/D. You can also use the full wave rectifier, sample voltage in fixed time using the A/D and look for the peak voltage inside the software. Lots of processing that perhaps can be easily solved outside the micro by some electronics.

Good luck finding out the best approach for your design!

Marcus
ICD2
Guest







AC Measure
PostPosted: Tue Jun 08, 2004 8:20 am     Reply with quote

So can anybody give me the link for (multimeters, Voltmeter)
jds-pic



Joined: 17 Sep 2003
Posts: 205

View user's profile Send private message

Re: AC Measure
PostPosted: Tue Jun 08, 2004 8:25 am     Reply with quote

ICD2 wrote:
So can anybody give me the link for (multimeters, Voltmeter)


here's a great one...
http://216.239.51.99/

jds-pic
Mc



Joined: 07 May 2004
Posts: 11

View user's profile Send private message

PostPosted: Tue Jun 08, 2004 3:11 pm     Reply with quote

LOL Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group