enter image description here In the datasheet of HLW8012, the both 33nF capacitors , 1K resistor and 0.1uF capacitor are connected to GND. I'm not sure where should I connect those ends of components marked with GND symbol, (To Live, To Natural). I can't read Chinese, I don't really know what everything mean there.

I see most of schematic on the internet have mixed the GND of IC on the Bottom Right with the Natural Line , I don't know why. enter image description here

I want to play with this cheap power metering IC.

Can someone explain me / Redraw this schematic with everything connected ?

  • \$\begingroup\$ Ground connects to ground. It's labelled on your Arduino: GND \$\endgroup\$
    – Majenko
    Jun 24, 2019 at 8:36
  • \$\begingroup\$ And if you don't know what you're doing when messing with mains electricity, then DON'T DO IT. Get someone who does have a clue to do it for you, or buy an off-the-shelf product. \$\endgroup\$
    – Majenko
    Jun 24, 2019 at 8:37
  • \$\begingroup\$ I am concerned how can I connect a LIVE wire to my Arduino GND. \$\endgroup\$
    – Khaalidi
    Jun 24, 2019 at 8:38
  • \$\begingroup\$ I want to DO IT , and learn something about professional designs and not stick to DIY always and use pre-built modules. \$\endgroup\$
    – Khaalidi
    Jun 24, 2019 at 8:40
  • 1
    \$\begingroup\$ You have to have a reference point to measure the AC voltage against. Personally I wouldn't use a chip that didn't provide full galvanic isolation from the digital side, but that's just my paranoia. \$\endgroup\$
    – Majenko
    Jun 24, 2019 at 8:41

2 Answers 2


How to establish a clean ground for the Power Meter IC's shunt-current measurement, voltage-measurement, analog (oversampling-ADC) operation, and interfaces to digital output?

On the PCB, establish a GROUND region UNDER the IC, and loops around the 4 left-side analog pins. Form the GROUND encirclement (Ground region, Ground loop) of 1/2 centimeter wide copper foil.

To this Ground Encirclement, tie these components:

.... The IC GROUND pin

.... the lower side (ground end) of the 0.033 uF capacitors for the Current Shunt; have these two PCB traces be symmetric and balanced and as short as possible

.... the 2 capacitors of the +5 VDD bypass filter. [some reference designs insert a 10 ohm resistor in the path from +5 voltage regulator to the 2 caps and the IC VDD pin. This forms a Low Pass Filter, to reduce the amount of EMI/RFI that can enter the IC and make it vulnerable to mis-counting or even being caused to undergo a Power On Reset. In professional designs that must be "certified robust", enormous Efields (and Hfields) from high-power transmitters/antennas will be brought very close to the PCB/ICs; the circuit must not show any errors (extra counts nor missing counts, nor Power On Reset behaviors); place the 10 ohm resistor right by the 2 capacitors, for minimal "antenna size"]

.... the IC's Ground pin

.... the 0.1uF Ground-size of the V2P pin on the IC


PLEASE keep in mind that if you do use this circuit it is at LINE voltage and will probably electrocute the unwary even the Gnd of this circuit at line voltage!! To continue only connect it to power when it is well insulated from ALL contact!!

This circuit will only function when at line voltage.

  • \$\begingroup\$ Welcom to EE.SE! This is an good note, but it does not answer the original question. Since you do not have the points to comment yet, I would recommend that you summarize the answer -- from your own understanding -- before your cautionary note. \$\endgroup\$
    – mbedded
    Sep 21, 2020 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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