Etekcity Voltson - ESW01-USA

Does anyone who beeped this out have the ESP8266 RESET signal pinout for this dingus? I want to hook up DTS and RTS to the proper pins to make flashing easier. To me it looks like the leftmost pin on the bottom (viewed from component side as in pic at start of this thread), but maybe I’m wrong?

Thanks in advance.

Did we ever figure out the power monitoring?

So, I have one of these apart now showing the HLW8012.

My continuity check shows pin 8 to be connected to pin 1. They’ve strapped the Select line to high, meaning the HLW8012 is putting out a voltage reading. See this post…

I’m not sure why they would do that. I’ve gotten the Tasmota to give a voltage reading that is not accurate… right now I’m working on checking the passive components to see if the Voltson is using the 8012 differently.

One possibility is that their software reads the power measurement and voltage and then just does I = P/V. It would save them a timer and would theoretically calculate faster than waiting for an extra cycle… but it seems unlikely.

I’ve been unable to determine what GPIO16 is connected to. It connects to the pin next to ground on the ESP8266 module, but I don’t see anything in either the power supply board or the relay board that it connects to…

I walked through the HLW8012 circuit on the Voltson and found these differences from the implementation on the Sonoff:

HWL8012 Circuit notes
similar to here: https://tinkerman.cat/post/hlw8012-ic-new-sonoff-pow
Differences:
“SEL” is strapped high, meaning CF1 only puts out voltage
The shunt resistor seems to be a normal 0Ohm but high current resistor. There is no other connectivity like in the diagram.
1.92MOhms (2 953K) between the Hot and the V2P input instead of the 2.82M series resitors (6 470K)
The two outputs, CF1 and CF feed GPIO12 and GPIO13 through 4.7K/10K voltage dividers. Which just converts the outputs to 3.4V safe…

Can you flash the firmware using an Arduino Uno? I want to give this a shot since I want to get these plugs to work with my Octoprint setup

So I’m Just jumping in to this project and seem to be hitting a roadblock. i’ve tried a few different FTDI cables and adaptors to no avail. I am able to read serial output from the chip when it’s in regular boot mode running the default firmware, but for some reason I am unable to get it to flash a new script successfully. Whenever I put GPIO2 to ground on boot it just hangs out and then when i try to flash it i get “esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header”

Anyone have any ideas? i may break open a second one to try that , but i feel like since i can see Serial Data I should be able to flash it no?

For reference,I’m fairly confident with flashing purchased boards, but this is my first mod of a retail product…

Part 1:
Well I could not let things like this happen. it should work and I planned to make it work.
You will need good eyes (Mine are getting old), I good Soldering Iron and good soldering skills (I thought mine were good) and about an hour of extra time.

Summary: I opened up the Plug and separated the two boards. Then I found the HLM8012, lifted pin 8 from it’s pad, ran a wire to the pin and make sure it is isolated from the pad, re-assemble the boards and connect the other end of the wire to GPIO16. Configure the unit like normal, your WiFi, MQTT Server, Host name and all that stuff. Use the following template:
{“NAME”:“ESW01”,“GPIO”:[0,0,0,0,21,157,0,0,132,133,17,0,131],“FLAG”:15,“BASE”:18}

Freshly opened
This is the module without the case (You have seen this is you have flashed it already. In this picture you can see I have unsoldered the tab that connects the two boards. You also need to unsolder the black wire from the bottom board. Ignore the melted capacitor

Part 2:
image
Next remove all the solder off the ESP Module from the bottom board. I use solder wick but any method will work, just protect the pads on both the module and the board. ignore the red wire, it’s not there yet

Part 3:
image
Carefully separate the two boards so you will have something like this. At this time it might be a good time to clean out any extra solder from the hole that the tab and thick black wire was removed from. The thick hole is on the bottom board and the tab hole is on the upper board.

Good work! I broke one of mine on an update and have to pull apart to reflash, might give this a try while I’m in there

Part 4:


You can now see U1, HLW8012. Find pin 8 and carefully lift it from the PC Board. you can also add something insulating between the board and the pin.
You could just cut the pin but It is a lot better solution to just lift the pin. If you do cut it, make sure there is enough pin to solder to after.

I used the most flexible, stranded, small wire I could find. If you use a stiff wire it may be difficult to route later on. Make sure you do a good job soldering the wire or else you may get it all together and the wire cone disconnected and you get to start over.


Now re-assemble the two boards. Be careful to adjust the boards to be parallel to each other. I did this by soldering the TAB and Black Wire first. Then soldered one pin on one end of the ESP Module, verify the spacing. next solder a pin on the other end and verify the spacing. Route the wire between the two boards and to one side of the button on the board. This seems to be the best place as there is a little extra room for the wire when the case is re-installed.

When putting the plug back in the case avoid allowing the wire to be on the button side of the button as there is little room and there is a standoff in the case that will force the PC Board up a little and the button will always be pressed.

If you have a switched power strip plug the outlet in, stand back and turn it on and wait for sparks or smoke. There will be none if you did everything right.

Configure the like normal, your WiFi, MQTT Server, Host name and all that stuff. Use the following template:
{“NAME”:“ESW01”,“GPIO”:[0,0,0,0,21,157,0,0,132,133,17,0,131],“FLAG”:15,“BASE”:18}

Activate the profile and Save. The Plug will reboot and you should see the Blue Light blinks as it connects. Pressing the button should toggle the switch. Connect via web page and Toggle should act on the switch, show status and toggle the relay and LED.

At this point all readings on mine were wrong so I decided to calibrate.
Get a known load, like a 60 watt light bulb (incandescent, not LED). Plug the bulb into the plug and turn it on. Verify the wattage (if possible with a meter) and then open console on the EWS01 web page.
Enter: “PowerSet 60.0” ( or whatever watt load you have).
Measure the voltage with a good meter.
Enter: “VoltageSet 120” (or whatever voltage you read with the meter).
Last calculate the current by measuring it or calculating it with this formula P/V=A.
Enter the current in Milliamps.
Enter: “CurrentSet 5000”
In theory resistive loads will always provide a power factor of 1.00. If that is not the case, I recommend you repeat the calibration process and make sure everything was done correctly.

Please comment if you try this and let me know your results. it seems to work for me so far.

FWIW, using this great thread and others I was able to get my Etekcity ESW01-USA flashed with Esphome and have power monitoring working.

This is my yaml https://github.com/fancygaphtrn/esphome/blob/master/esp_etekcity-01.yaml