Watt Meter build walks you through Power Measurement basics

You almost never hear of a DC Watt Meter – one just does some mental math with Volts and Amps at the back of one’s head. An AC Watt Meter, on the other hand, can by pretty useful on any workbench. This handy DIY Digital AC Watt Meter not only has an impressive 30A current range, but is designed in a hand-held form factor, making it easy to carry around.

The design from Electro-Labs provides build instructions for the hardware, as well as the software for the PIC micro-controller at its heart. A detailed description walks you through the schematic’s various blocks, and there’s also some basics of AC power measurement thrown in for good measure. The schematic and board layout are done using SolaPCB – a Windows only free EDA tool which we haven’t heard about until now. A full BoM and the PIC code round off the build. On the hardware side, the unit uses MCP3202 12 bit ADC converters with SPI interface, making it easy to hook them up to the micro-controller. A simple resistive divider for voltage and an ACS-712  Hall Effect-Based Linear Current Sensor IC are the main sense elements. Phase calculations are done by the micro-controller. The importance of isolation is not overlooked, using opto-isolators to keep the digital section away from the analog. The board outline looks like it has been designed to fit some off-the-shelf hand-held plastic enclosure (if you can’t find one, whip one up from a 3D printer).

Although the design is for 230V~250V range, it can easily be modified for 110V use by changing a few parts. Swap the transformer, change the Resistive voltage divider values, maybe some DC level shifting, and you’re good to go. The one feature that would be a nice upgrade to this meter would be Energy measurements, besides just Power. For an inside look at how traditional energy meters work, head over to this video where [Ben Krasnow] explains KiloWatt Hour Meters


27 thoughts on “Watt Meter build walks you through Power Measurement basics

  1. Ok that’s a nice build but something in the schematic bugs me:
    He uses two secondaries to separate the analog stage from the digitial one, but the analog side is not galvanically insulated from the main.
    It’s highly unlikely that the main voltage would reach the digital ground through a badly insulated secondary, a deficient MCP and a shorted resistor …. but statistically, it could happen and harm the user.
    So, to me, It’s not a safe design and renders the HCPLs useless.

    1. To be constructive in my criticism, a good way to do it would have been to put two small transformers in the place of only one with two linked secondaries.
      This would step up the insulation rating to thousands of volts

      1. The fail is in the creepage distance, there is ground plane around the 230v AC traces that go in and out the ACS!

        There are supposedly digital traces crossing one corner of the analog side, a very bad example, smells a lot like auto-routed and careless component placement.

    2. Aaaah, i see what you mean now, i thought you meant the current side.
      This is from the spec of the transformer: Insulation: Prim / Sec.. = 10 MOhm to 500 Vcc – Sec / Sec.. = 2 megohms at 500 Vcc So yeah, it appears worse secondary to secondary.

  2. I don’t quite get why the fuse location. On the schematic it seems like it’s protecting the hull sensor only, however on the photos it looks like its where it should be, right at the start of the build to protect the whole thing.
    Also how do they feel a 40a fuse is a safe fuse size choice? The hull sensor is rated for 30a, but how in the world (and please correct me on my naivety of soldered circuits) are those 2 soldered connections going to sustain 30a? I would think you would want to protect it at no more than 80% of the rating and even at that, it seems a little high…

          1. You should re-examine your fuse choices. There are 5 that support 30A or more AND 400V or more. Of those, only 2 could be mounted on a PCB. in reality, these are simply blade connectors, and not fuse holders (unless you want to use 28V automotive fuses.)

          2. All of the following are rated for 600-1500 VAC @ 30A or 32A (of course, their exact ratings vary depending on what standards you’re using, as shown in their datasheets). All use cartridge fuses. All are designed to be placed through-hole on a PCB:

            Additionally, the following can be screwed/riveted to the PCB.

            The point of my initial response to you was simply that there *are* PCB-mounted fuseholders designed for 16+ Amps. In my application I’m using 25A or 30A blade fuses and a set of blade fuseholders (which are not just ‘connectors’), because I’m working with low voltage DC, but as shown in the parts above, there are several fuseholders that can handle some pretty high current and voltage.

    1. For safety reasons, your fuse should be the lowest current rating of all your parts, PCB traces, wires etc in that path. This is to make sure when over current were to happen, the fuse is the part that will blow and not anything else. This is not a case of protecting your parts, but to prevent them from blowing up and/or starting a fire.

  3. Division is such a laborious process. I’d suggest multiplying by 1/N instead. Since N is fixed (N=40), 1/N is a constant, and would be used in many places in the code.

    Multiplication is also supported in the PIC18 hardware by a 16b x 16b single cycle multiplier. Can’t do division in a single cycle.

    Only one step away from being an energy meter too. Energy = sum ( V[n] * I[n] ) for all n.

    A differential input ADC (U5) for line voltage sense might have been a slightly better choice. This would reduce the data required/transmitted by half, eliminated some computations, and really measured the voltage across R1 (instead of two measurements slightly delayed in time – but that’s likely moot as CH1 generally wouldn’t change.)

    The MCP3202 would *almost* work in differential mode, except IN- needed to be within 100mV of Vss, and IN+ could never go below IN-. (Either CH0 or CH1 can function as IN-.)

    I was co-author of AN220 “Watt-Hour Meter using PIC16C923 and CS5460”.

    1. Premature optimization is the root of all evil.

      The division is not in a time critical section of the code. All the samples have already been taken. The only effect would be an imperceptible delay until update on the display.

      For the sake of clarity, I would just leave the division in.

    2. Not familiar with the MCP3202, but the MCP3301 (13-bit ADC) doesn’t seem to have that issue. See common mode vs vref graph.

      >The common mode input range has no restriction and
      is equal to the absolute input voltage range: VSS -0.3V
      to VDD +0.3V. However, for a given VREF, the common
      mode voltage has a limited swing if the entire range of
      the A/D converter is to be used.

  4. Not a bad start. Some layout issues that others have already noted, but more importantly no mention of crest factor, harmonics or simultaneous I/V measurement, all of which define just how accurate the RMS calculation will be, especially when trying to measure the draw of any modern electronics.

  5. Elm Chan’s verison: http://elm-chan.org/works/heco/report_e.html
    – powered from 100-120V AC, no isolation.
    – voltage/current/Power/Power Factor/Frequency, V/I waveform, power factor, harmonics,

    >But 12-bit is not sufficient resolution for current channel because the load current varies in range from several milliamperes to 10 amperes or above as like idle current and heater current. To solve this issue, a 16-bit ADC is added for current channel and a 12-bit integrated ADC is used for voltage channel.

  6. The ACS712 is a highly overrated chip. It will fail at 15A+ currents (arcing + ic popping). (Bad experiences with them and went to a standard current sense transformer afterword with no issues whatsoever).

    1. A bit more on the 15A I’m saying, 15A momentary, 2-5A consistent can cause it to pop. It’s a badly designed chip from the get go that should not be in an SOIC-8 package. Now, this is with THEIR recommended layout, plus my own additions to beef up for current and heatsinking.

      1. Any experience with the ACS711? I hope its performance is better than what you’ve mentioned for the 712. My current application uses the QFN-12 package. I’m working with <30VDC, but up to 25A.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.