AC main voltage sampling

Discussion in 'General Electronics Chat' started by gehan_s, Nov 15, 2012.

  1. gehan_s

    Thread Starter Member

    Sep 17, 2012
    38
    0
    hey all,

    i have to design an accurate power meter that measures power drawn by a PC. i am hoping to sample the AC voltage using a 3 resistor devider which converts the AC voltage into a 0 to 5V sin wave which is then converted to digital by a PIC18F.

    i am hoping to power the PIC using the USB from the same PC. the problem arrises at this time because i think the 2 grounds (AC and USB) does not match. how can i overcome this problem.

    can i use a transformer to step down and isolate the two circuits (AC line and PIC) and then use the resistor devider ?????? if i do that will it decrease the quality of the readings ?????

    thanks !!!!!!
     
  2. colinb

    Active Member

    Jun 15, 2011
    351
    35
    Stop. You are in dangerous territory and I don't think you are prepared. Voltage ≠ power. And mains connected circuits without transformer isolation is against forum policy. Measuring ac mains power safely and accurately is not easy. Look into off the shelf solutions.
     
  3. crutschow

    Expert

    Mar 14, 2008
    13,022
    3,236
    To accurate measure real AC power you need to take simultaneous samples of both voltage and current over a complete cycle, multiply them together for each sample, and take the average of the samples. Other your are just measuring apparent power which includes any reactive power.
     
    gehan_s likes this.
  4. JMac3108

    Active Member

    Aug 16, 2010
    349
    66
  5. gehan_s

    Thread Starter Member

    Sep 17, 2012
    38
    0
    thank you all very much for the replies and i assure you i am not planing to die!!!!!!! (hence the reason i asked the question)

    this meter is for industry purposes where they are trying to test power consumption of softwares. i think they are billed for apparent power so shouldn't i measure apparent power???
    if i just multiply and add all the VI elements over a period wouldn't some of them be negative which would cancel out each other????
     
  6. crutschow

    Expert

    Mar 14, 2008
    13,022
    3,236
    Some commercial industries do get billed an extra charge for reactive power but its not the same rate as the charge for real power (apparent power is the total of the real and reactive power).

    To measure apparent power you just multiply the averaged RMS current by the averaged RMS voltage. If you multiply the instantaneous current by the instantaneous voltage you will get the actual (either real or reactive) power at each point. If there is any reactive power you will get a negative number for some of the values, which is correct. When you add all the positives with all the negatives in a cycle and take the average, you get the net real power.
     
    MarpK likes this.
Loading...