Skip to content

Sonoff S31

blakadder edited this page Feb 27, 2019 · 6 revisions

See Sonoff Pow/Pow2 page

⚠️️Special Attention ⚠️️

Do not connect AC power and the serial connection at the same time The Gnd connection of the S31 is connected to the live AC wire. Connecting serial with your PC will fry your PC and will electrocute you.

DO NOT CONNECT ANY SENSOR TO THESE DEVICES. Only use them as designed.

The GPIOs on this device are connected to AC power, therefore it is not possible to safely add sensors or displays to it.

Connection

The S31 is pretty easy to take apart.

  1. Pry off the gray cover on the end.
  2. Slide off the two rounded corner pieces to reveal the 3 screws.
  3. Unscrew the 3 screws.
  4. Lift off the cover.
  5. There are no through holes. You can solder a piece of header or you can fabricate something using pogo pins and just hold it for the duration of the flashing process. But, be aware that can get tiring if you need to do it multiple times.
  6. The pads are labeled, you need VCC, RX, TX, GND. There are two others that also have RX and TX on them. The ones next to the GND pin and not used for flashing.
  7. Connect to your serial converter and 3V3.
  8. You need to press the switch (GPIO0) before applying power to put into bootloader mode.

Verify RX and TX (and VCC and GND) are correct

  1. Use a terminal program (TeraTerm, putty are examples)
  2. Set it to the COM port that shows up, when you plug in the USB serial adapter.
  3. Configure for 115,200 baud
  4. Connect all 4 pins to the S31
  5. You should see garbage text show up on the terminal
  6. If you don't, try reversing RX and TX
  7. Make sure your voltage is good
  8. If you don't see text (will be garbage, since the first text that shows up is at a very high baud rate) you are unlikely to be successful in later steps, so figure out why it isn't working now

Now comes the fun part

  1. It helps to have 4 hands (or have soldered pins on).
  2. You must press the switch (GPIO0 to gnd) before applying power to start the bootloader.
  3. You can connect all four wires (while still keeping the switch pressed), or leave all but power connected and then press the switch and then apply the power.
  4. Now that it is in boot loader mode, you can flash the firmware.
  5. Follow the instructions in the rest of the Wiki for the method you are using.

External Info on S31

A link to someone's page about the internals of the S31 and how to flash another firmware. I have not yet tried this with Tasmota but will report back when I do.

S31 Page

Video tutorial by BK Hobby

Clone this wiki locally
You can’t perform that action at this time.