# How to isolat cf ,cf1 and sel from esp in hlw8012 ic?

**URL:** <https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937>\
**Category:** General Electronics\
**Created:** [September 17, 2026, 4:05am UTC](https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937 "2026-09-17T04:05:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![praneshmechatronics](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/praneshmechatronics/32/1284304_2.png) [@praneshmechatronics](https://forum.arduino.cc/u/praneshmechatronics)\
**Post date:** [September 17, 2026, 4:05am UTC](https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937/1 "2026-09-17T04:05:44Z")

</div>

Hi everyone,

I am designing an energy monitoring circuit using the [HLW8012](http://www.hiliwi.com/product/1.html) 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:

1. Which optocouplers or high-speed isolators (e.g., PC817 vs. 6N137) work best given the pulse frequencies of CF/CF1?

2. 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!

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [September 17, 2026, 4:54am UTC](https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937/2 "2026-09-17T04:54:14Z")

</div>

> [@praneshmechatronics](#):
>
> I want to fully isolate the low-voltage MCU side from the high-voltage mains side for safety.

Why?

I have a similar power meter with the ESP inside an enclosure, directly connected to mains.  
The isolation is the wireless link.

Arte you re-inventing a **[US$10 smart plug](https://www.amazon.com/Electricity-Monitor-Electrical-Consumption-Voltage/dp/B0BR7Y5PYW/140-6910424-9131941?pd_rd_w=ou3W4&content-id=amzn1.sym.aa738fbd-ad05-4d11-aae2-04b598db6305&pf_rd_p=aa738fbd-ad05-4d11-aae2-04b598db6305&pf_rd_r=HJMJY0E1CXM87FCQKJCK&pd_rd_wg=PejZs&pd_rd_r=192214ca-b7dc-48e9-91b1-00fe3bfe3900&pd_rd_i=B0BR7Y5PYW&th=1&currency=USD)**?

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [September 17, 2026, 8:46am UTC](https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937/3 "2026-09-17T08:46:45Z")

</div>

[https://www.digikey.com/en/products/detail/texas-instruments/ISOM8710DFFR/21298742](https://www.digikey.com/en/products/detail/texas-instruments/ISOM8710DFFR/21298742)

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [September 18, 2026, 9:08am UTC](https://forum.arduino.cc/t/how-to-isolat-cf-cf1-and-sel-from-esp-in-hlw8012-ic/1459937/4 "2026-09-18T09:08:33Z")

</div>

@praneshmechatronics  
Still need help?
