Placing orders in Bangood is a good test on your patience. I ordered a box of fuse two weeks earlier than Sonoff S20. Sonoff arrived this week from Thailand. But I still haven't got my fuse.
Sonoff S20 is a cheap smart power plug. It comes with an ESP8266, a relay and a AC-DC transformer for ESP8266. It costs only $10, which is far cheaper than the cost of my prototype. It seems that it also comes with a mechanical relay since I can hear the click sound when turn on/off. For 15 min use, I can feel warm on the bottom of Sonoff even it only supply power to a low watts fan.
In any case, let me explain how to flash bREST to Sonoff in case you want to save money.
First, open the hood. You saw 4 holes: VCC, TX, RX and GROUND. These are serial ports for flashing ESP8266.
I got several packs of solderless male pins from Adafruit. I never got a chance to use it. I thought this is a good use case here. So I used a hammer and a piece of acrylic board to push them into the board. As you can see, it doesn't work. The pins are bended. I have to cut the two female wires and solder them into the holes.
After some trial and errors, I figure out the following:
1. The enable pin is 12 in Sonoff S20. That pin controls the relay. The relay is Normally Open (NO).
2. TX holes and RX holes are incorrectly labeled in the PCB. So TX (RX) should connect to TXD (RXD) in USB-to-Serial board.
3. Connect VCC to 3.3v and Ground to Ground in USB-to-Serial board.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.