Energy Metering

Last Updated on : 2022-11-24 09:20:10download

This topic describes what energy metering is and how it works.


Smart electrical products such as sockets and switch modules are the most convenient smart home accessories for controlling devices. The energy metering feature makes them go the extra mile to help users track energy consumption and use energy wisely.


Energy metering chip

There are two types of energy metering chips available to choose from:

  • Pulse counting: The Wi-Fi module calculates the pulse counts and frequencies and converts them into the power reading. HLW8012 and BL0937 use this method.
  • Serial communication: The Wi-Fi module receives the data from the energy metering chip through the serial port and converts it to the power reading. HLW8032 and BL0942 use this method.

Sampling accuracy

  • Pulse counting (BL0937 or HLW8012): 5%
  • Serial communication (BL0942 or HLW8032): 3%

Report electrical parameters

Voltage, current, and power

  • Each time users open the Energy Metering page on the mobile app, the app will query the current electrical parameters to update data. If users stay on this page, the data will be updated every five seconds.
  • In other cases, to avoid frequent reporting, the device reports data at a regular interval. Intervals and triggers for data reporting:
    • Detection interval: 5 seconds or 30 seconds.
    • Parameter threshold: Voltage changes by 2% or power changes by 20%.
    • For a small power load, when the real-time power is less than 20W or the absolute value of power changes exceeds 3W, data reporting is triggered.

Energy consumption

If the device has consumed at least 0.001 kWh, the device reports data every 10 minutes or 30 minutes.


How sampling works

  • For BL0937 or HLW8012

    The Wi-Fi module collects the voltage, current, power, and energy consumption from the configured pins. Then, it converts the collected data to electrical data based on the formula from the energy metering chip datasheet.

  • For BL0942 or HLW8032

    The Wi-Fi module receives the data from the energy metering chip through the serial port and converts it to the power reading.

How calibration works

Select a resistor as the resistive load. For a 220V device, use a 100W 560Ω ceramic resistor with 1% tolerance. For a 120V device, use a 200W 144Ω ceramic resistor with 1% tolerance. The energy metering chip will calculate the acquired data and compare it with the reference value.

If the result falls in the accepted error range, it indicates the calibration is successful. Otherwise, calibration fails. The calibration parameters will be stored in the flash memory on a successful result.

For more information, see Production Test on Energy Monitoring Socket.


For more information, see Energy Metering FAQs.