Decoding Power Bar with Energy Monitoring

@agk1190, Thanks for sharing the trace! I have been looking for something similar online but the last one I found was many years ago and is no longer available for download.

I am unsure if you can do another trace, but this time use a resistive load (e.g. old school 40W light bulb) That way the readings may be less random. Besides the possible minor voltage fluctuation, most values should be pretty constant, and PF should be 1.

Before I arrive this page, I have already made a PoC mod on my own. Long story short, I have bypassed the unmark chip.

Cut the VS, VC, PC pin to the ESP board. Then run a wire to connect VC (CF1), PC (CF) to GPIO 4 & 5*1. For the VS (SEL) is a bit tricky, according to specs Vhi min is 0.8Vdd which is 4V. I have tried 3.3V logic and it is no go for me. So I made a level shifter using 2N3904 and connected that to GPIO16.

Other misc findings…
GPIO0 - Output to the unmarked chip
GPIO2 - Blue WiFi LED
GPIO12 - Input pin receiving data from the unmark chip
GPIO13 - Button 1
GPIO14 - Green (aka night light) LED
GPIO15 - Relay 1

For the Green LED, I configured it as PWM. With a simple script*2, I make it as power usage indicator, it gets brighter when more current/power is being used.

If you want to save an IO pin, you could use GPIO0 or even GPIO2 for VS (SEL) output.

I have ordered some level shifters, once I get them I will replace the 2N3904 and have all 3 signals run through it.

Another observation is the reaction time for current/power detection is kind of slow after a device is unplugged. It may take a few seconds to drop to 0A 0W. I think it may be due to the sampling time (switching SEL HI/LO) frequency.

*1CF1 and CF is 5V logic, it is in serial with 1K before reaching VS & VC pin. Some people (including myself) may not feel comfortable hooking up 5V login directly to ESP8266, but a few articles did some in-depth analysis to indicate ESP8266 logic is 5V tolerant. And to confirm, even the CEO of Espressif - Teo Swee Ann has confirmed.

*2Custom compile Tasmota 13.3.0 ESP8266 using Script instead of rules.

1 Like