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 use 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.
- MCU not isolated from high-voltage (common ground).
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. Moreover, you should measure and set coefficients for current and voltage. To achieve 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: 33.8
Current coefficient: 1
Advantages (in comparison with the board above):
- Full isolation using voltage and current transformers.
- Less accurate.
- No power supply.
- It is necessary to measure and calculate coefficients (check a resistor’s nominal before on your board).
- Actually, this board does not work with 5V because input voltage comes to 78L05 (nearby to a large capacitor), and it requires minimum 7V. If you have the 5V power supply, you can short-circuit 1 and 3 pin on 78L05.
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).
⚠️ The firmware reports the following values to the coordinator:
- Voltage (V, volts).
- Current (A, ampere).
- Power factor (0 – 1).
- Instant power (W, Watt).
- Summary energy (kWh, kilowatts per hour).