Connect with us

Energy Monitoring (Formulas and methods help)

Discussion in 'General Electronics Discussion' started by Gryd3, Jul 17, 2015.

Scroll to continue with content
  1. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I've been intrigued with energy management and logging lately, but everyone seems to have their own method of how to get the actual readings...

    I'm hoping to get feedback as well as opinions on this so I can look into it further and understand this process complete.

    My current understanding for DC, is simply polling frequently and recording the DC voltage, and DC current. Multiply the two together and you have your answer.
    AC on the other hand is a little more complex, and this is where I have a bit of a hole in my understanding.
    Polling the AC voltage and Current must be done at a higher frequency than the AC supply, or you could accidentally poll during the peak or zero crossing... giving you incorrect results. That said, if I rectified the output for the voltage and current readings, and averaged it with hardware... (ie, capacitor.) would I still get accurate results?

    This starts to get much more complicated when you move from a single phase supply to 3-phase... I'm not sure where to start at all with a 3Phase setup, and tips and information are greatly appreciated.


    So.. tl;dr
    I'm after formulas and information regarding measuring single and 3phase supplies, as well as pros and cons to taking a larger number high frequency polls, or averaging the readings with analogue electronics.
     
  2. AnalogKid

    AnalogKid

    2,458
    705
    Jun 10, 2015
    For AC voltage and current monitoring you have two options, not counting the manual way with a zillion readings and a ton of calcultions.

    One, if you are sure the waveforms are all going to be sine waves, use a rectifier and filter to get a DC voltage that is related to the sinewave peak value, and divide by the square root of two to get an approsximate RMS value. This is what all small DMMs do for the AC readings.

    Two, for more accuracy with any waveform, use a true-RMS-to-DC converter IC.
     
    Gryd3 likes this.
  3. hevans1944

    hevans1944 Hop - AC8NS

    4,560
    2,132
    Jun 21, 2012
    For accurate AC power measurements you also have to account for the power factor of reactive loads like motors. That means measuring the phase difference between the current and voltage. IIRC, there are ICs available to do this automagically. If I remember where I saw them, I will post a link. Look at digital power metering circuits used by utilities for billing purposes.
     
  4. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    From the looks of things, digikey has a selection of metering ICs, power factor correction ICs, and RMS-DC ICs.. I'm still doing some digging.
    Thank you for the tips so far.
    Ideally, the end result will be something I can build as a prototype to monitor and log the power used by my computer. (In addition to the power used... logging AC line voltage will give me some ammo to get the utility company out here... I'm sick of flickers and brown-outs, and have battery backups on my media equipment.)
     
  5. Harald Kapp

    Harald Kapp Moderator Moderator

    11,007
    2,506
    Nov 17, 2011
    RMS-to-DC converters are comparatively slow as they use an integrator to snooth the Dc output. If you can live with the time constant of these chips, you're fine. But: You cannot use the RMS values of current and voltage and multiply them to get at the real power. What you get is apparent power.
    For real power measurements you'd have to multiply current*voltage first and then perform the RMS-to-DC conversion.

    As you are concerned about brownouts, flicker etc., this method is probably not the best. Have a look at this thread, where a member named @jgauthier discusses building a power monitor. Monitoring voltage and current by two ADCs and a microcontroller will give you the highest flexibility in analyzing your mains power over time.
     
    Gryd3 likes this.
  6. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    Hi Jerid
    Are we talking direct measurements of the mains voltages and currents?
    Adam
     
  7. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Yes.
    The current plan is to use a shunt for current, but I may opt for a current transformer.
    (Would like to stick with a shunt)
     
  8. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    What sort of current are we talking?
    Adam
     
  9. Harald Kapp

    Harald Kapp Moderator Moderator

    11,007
    2,506
    Nov 17, 2011
    I suggest you use transformers for both current and voltage for two reasons:
    1. Safety - potential isolation will greatly reduce the danger of an electric shock (and may even be mandatory, depending on the applicable standards).
    2. Technical - you will have to reduce the measurands to a level manageable by the electronics (e.g. microcontroller) anyway.
    A tranformer (two for V and I) does both in one step.
     
  10. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Mains voltage for my computer equipment.. currently estimated between 3 and 5 amps, but considering the application, I would be sizing and over compensating components for the maximum load possible on the circuit which would be 15 Amps on my circuits.
    (I realize this may sound funny, but if I oversize it, I gain the freedom to use the device in other locations in the home.)
    Yes Harald, the transformers would indeed make it safer, but I am hoping the use of a shunt can keep the size down. The intention is to put an IC in harms way, and use an opto-coupler to get the data out of the completed device.
    (The transformer for voltage can be kept small enough... it's the current transformer that I am concerned with for size)
     
  11. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    The most accurate way I can think of is to use RMS thermal measurements. Measuring the temperature of a known resistance.
    Adam
     
  12. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    A little inaccuracy is fine.
    I figured using a low enough Ω shunt would allow me to to take current readings.
    The voltage could be read with a small transformer, or voltage divider.
    Once I have an approach down, I'll be putting safeguards in place to help protect against spikes.
     
  13. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
  14. AnalogKid

    AnalogKid

    2,458
    705
    Jun 10, 2015
    For a buck fifty that's disgusting. I notice the datasheet has 0.0 interface guidance. BTW, Analog Devices also is big in power meter ICs.

    ak
     
    Arouse1973 likes this.
  15. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    I must be missing something... Looks like it has more than what I need capabilities wise, and I can connect it to a micro controller via serial to do the formatting and logging of the data.. what am I missing?
     
  16. AnalogKid

    AnalogKid

    2,458
    705
    Jun 10, 2015
    The isolated interface circuits to high voltage AC and high current AC; you know, the a.n.a.l.o.g stuff.

    ak
     
  17. Arouse1973

    Arouse1973 Adam

    5,165
    1,087
    Dec 18, 2013
    Any energy you use to make the measurment will result in errors. If you can account for all errors then thats fine.
    Adam
     
  18. Gryd3

    Gryd3

    4,098
    875
    Jun 25, 2014
    Datasheet claimed use with current and voltage transformers as well as shunts.
    Also provided min/max values so I figured it wouldn't be too hard to draw it up myself as long as the conditions are met.
    You're right Adam. If I power the device from a parallel branch before the current shunt, I should be fine. (That's my thought anyway)

    I've read the other monitoring thread on here, and have done some digging and the conclusion I have drawn is to use a dedicated IC for this.
    This should account for the math, power factor, and line measurements and will greatly simplify the program required on a pic, or AVR.
    I'll try to get something drawn up to see if I understand this well enough.
     
    Arouse1973 likes this.
  19. Harald Kapp

    Harald Kapp Moderator Moderator

    11,007
    2,506
    Nov 17, 2011
    I'm with you, but: That's comparatively slow and you will not be able to detect fast events like flicker, voltage dips etc.
     
  20. Harald Kapp

    Harald Kapp Moderator Moderator

    11,007
    2,506
    Nov 17, 2011
    Not a bad decision. Follow the application notes and get something started. There's always time to refine later one you've gotten the gist of it.
    Ensure potential isolation and take all necessary safety precautions to avoid electrical shock.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-