Hi everyone,
I am designing an energy monitoring circuit using the HLW8012 metering IC interfaced with an ESP microcontroller (ESP32 / ESP8266).
Because the HLW8012 has its reference ground directly tied to mains neutral/line, I want to fully isolate the low-voltage MCU side from the high-voltage mains side for safety.
I need advice on how to properly connect optocouplers (or digital isolators) for the three digital lines:
-
CF (Output from HLW8012): Active power pulse output.
-
CF1 (Output from HLW8012): Voltage/Current RMS pulse output.
-
SEL (Input to HLW8012): MCU signal to toggle current/voltage reading mode.
Specifically:
-
Which optocouplers or high-speed isolators (e.g., PC817 vs. 6N137) work best given the pulse frequencies of CF/CF1?
-
How should the pull-up resistors and emitter/collector configurations be wired across both isolated power domains?
Thanks in advance for any schematics, component recommendations, or guidance!