The HLW8032 is a high-precision energy metering IC that is primarily used in single-phase applications. It measures line voltage and current and active power. It allows calculating apparent power and power factors.
HLW8032 can us two measuring methods: isolated and not isolated.
Note 1: Both measuring methods are sensitive for correct AC input connection. Please, swap L and N wires if you get strange results.
Note 2: High voltage hazard!
Not isolated measuring
This method does use any transformers and the MCU side is separated from the AC side using optocouplers.
Voltage coefficient: 1.88
Current coefficient: 1
Advantages of this HLW8032 board:
- All coefficients are known.
- The board has a reference schematic.
- You can find a 3rd party software for this board to read values. The access password is i59p.
- A library for Arduino.
Using this measuring method, the MCU side is separated from the AC side using voltage and current transformers.
I’ve tested this board too. It looks less precise than the non-isolated version. Also, you should measure and set coefficients for current and voltage. To do that, you should measure AC voltage using a multimeter, then connect a load with a known value (e.g., a 100W lamp), calculate current. Then get results, compare with your initial values and calculate a coefficient.
Voltage coefficient: 20.5
Current coefficient: 0.96
Disadvantages (in comparison with the board above):
- Less accurate.
- No power supply.
- It is necessary to measure and calculate coefficients.
The firmware settings
You should connect the “TX” pin of boards to the “P02” pin on CC2530 or CC2531.
- Select the HLW8032 board type (isolated or not).
- Specify coefficients for your board (see above).