-
Sonoff S20 Firmware Update
05/25/2020 at 19:55 • 0 commentsAfter two years, I released an update of the Sonoff S20 firmware. Since 2018, I have owned 5 Sonoff S20 to control my home servers and 3D printers at home.
The new improvement are the following:
- Turn on the green LED and turn off the red LED when the switch is open.
- Turn off the green LED and turn on the red LED when the switch is closed.
- Enable button switch as a physical switch button.
You can download my new firmware with an instruction in my bREST example repository. See link here.
Happy Hacking!
-
Sonoff S20 mod
06/30/2018 at 22:16 • 0 commentsPlacing 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.