Skip to content

Sonoff 4CH DIY

Gtis69 edited this page Dec 24, 2018 · 2 revisions

Sonoff 4CH DIY

The Sonoff 4CH DIY is based on the ESP8285.

Sonoff 4CH DIY GPIO

Serial Connection

Sonoff 4CH DIY

Please see the Hardware Preparation page for general instructions.

As always, you need to access the serial interface. The four serial pins (3V3, Rx, Tx, GND) can be seen in the picture.

Sonoff 4CH DIY serial

Programming the Sonoff 4CH DIY is a breeze although the on-board-button is not connected to GPIO0. As with all ESP8266/ESP8285 modules pulling GPIO0 to GND is needed to put the chip in programming mode. You need to connect GPIO0 and GND during power up.

Luckily both GND and GPIO0 (as KEY 1) are available on the header. A simple jumper between GND and KEY 1 while programming will do.

Sonoff 4CH DIY jumper

Module parameters

Type

Sonoff 4CH DIY parameters

Module Type => Generic (18)

Restart the module.

GPIO9 & GPIO10

Sonoff 4CH DIY SetOption51

To use GPIO9 and GPIO10 of the ESP8285, open the consol and enter => "SetOption51 on".

Restart the module.

Assign inputs and outputs

  • GPIO 1 => Button 1 (17)
  • GPIO 9 => Button 2 (18)
  • GPIO 10 => Button 3 (19)
  • GPIO 14 => Button 4 (20)
  • GPIO 12 => relay 1 (21)
  • GPIO 5 => relay 2 (22)
  • GPIO 4 => relay 3 (23)
  • GPIO 15 => relay 4 (24)
  • GPIO 13 => LED 1 (52)
Clone this wiki locally
You can’t perform that action at this time.