HLW8012 datasheet (mostly Chinese)

Website with english info

I am developing a product which requires energy measurement of two different phases. I am planning to use HLW8012 energy metering IC which has this application circuit:

Application ckt

In this circuit, GND is referenced to 220 VAC on 1 milliohm shunt resistor.

Since GND is referenced to 220 VAC, the circuit uses NEUTRAL line on V2P for sensing voltage.

Q1) Can I reverse these two things? - I want to use GND referenced to NEUTRAL and use LIVE (220 VAC) line on V2P for sensing voltage. (please refer to the circuit below):

reverse lines

Q2) As mentioned earlier, I need to measure energy on two different phases (neutral line is common for them). I want to keep total circuit size small. Can I use same power circuit to power both circuits as shown below:


Details - Power supply circuit will be non isolated type with neutral connected to GND.


Note: R8 (1K) is my shunt resistor. Actual value will be 1-2 milliohms.


Note: R17 (1K) is my shunt resistor. Actual value will be 1-2 milliohms.

  • \$\begingroup\$ Without details of "power supply" this can't be properly answered or, I suspect built. \$\endgroup\$
    – Andy aka
    Feb 7, 2018 at 10:05
  • \$\begingroup\$ I'd assume power supply is an isolated AC/DC power supply. So 5V and ground are floating with regard to the rest. Not exactly as the mains divider is ground referenced. Shunt resistor is funny. Never seen a 3-pin resistor with ground reference. \$\endgroup\$
    – gommer
    Feb 7, 2018 at 10:45
  • \$\begingroup\$ @andy - Power supply will be non isolated with neutral connected to ground. \$\endgroup\$ Feb 7, 2018 at 11:10
  • \$\begingroup\$ @gommer - Power supply is non isolated with neutral connected to GND. About the shunt resistor, I found this interesting question: electronics.stackexchange.com/questions/22170/… \$\endgroup\$ Feb 7, 2018 at 11:11
  • \$\begingroup\$ @Whiskeyjack that won't work with the top diagram because the chip is connected to the shunt and the shunt is connected to live - think again. \$\endgroup\$
    – Andy aka
    Feb 7, 2018 at 11:12

1 Answer 1


The important thing to remember in this design is that "live" (the hot wire) is also ground to the circuit: -

enter image description here

Live directly connects to the shunt resistor and this means that live is also GND (0 volt reference) for the chip.

You can swap incoming live and neutral connections and it will still work but now neutral becomes the 0 volt reference for the chip.

So, providing you design the "power supply" section to respect the reference 0 volts for the circuit you are fine.

If you choose neutral as the reference you can utilize this design to measure power in two (or more) phases providing you connect the current shunts to a star point at neutral. You should also be able to use a common "power supply" section but, because I don't read Chinese, I have some doubts about chips input common-mode range for the shunt differential inputs. I would be cautious here.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.