TYWE3S is an older Tuya module with the ESP8266. Its pinout matches the ESP-12S, so it is flashed exactly like any ESP8266 – with Tasmota or ESPHome.
It was used in plugs and switches until about 2020, after which Tuya replaced it with modules based on Beken chips.
Specifications
- ESP8266: Tensilica L106 80/160 MHz, Wi-Fi 4 (2.4 GHz)
- 2 MB flash
- 16 pads in the ESP-12S format (16 × 24 mm)
- 11 GPIO, analog input A0 (0–1 V)
- 3.3 V power
Flashing goes through UART0 (GPIO1 TX, GPIO3 RX) with GPIO0 pulled to logic 0 at boot. Older Tuya firmware could be flashed without soldering using tuya-convert; newer versions no longer allow it.
Pinout and pin table
Hover over a pin in the diagram or a table row; use the filter to highlight a bus. You can download the pinout as PNG or SVG.
| Pin | Name | Direction | UART | I2C | SPI | ADC | Note |
|---|---|---|---|---|---|---|---|
| 1 | RST | input | Reset – connecting to GND restarts the module | ||||
| 2 | A0 | input | ADC0 | ADC 0–1 V (TOUT), no divider on the module | |||
| 3 | EN | input | Chip enable (CH_PD) – connect to 3.3 V | ||||
| 4 | GPIO16 | input/output | Wake from deep sleep (connect to RST) | ||||
| 5 | GPIO14 | input/output | SCK | ||||
| 6 | GPIO12 | input/output | MISO | ||||
| 7 | GPIO13 | input/output | MOSI | ||||
| 8 | 3V3 | input | Power 3.3 V, supply at least 500 mA | ||||
| 9 | GND | – | |||||
| 10 | GPIO15 | input/output | SS | Strapping pin – must be logic 0 at boot (pull-down on the device board) | |||
| 11 | GPIO2 | input/output | Strapping pin – must be logic 1 at boot | ||||
| 12 | GPIO0 | input/output | Strapping pin – logic 0 at boot = download mode (Tasmota, ESPHome) | ||||
| 13 | GPIO4 | input/output | SDA | ||||
| 14 | GPIO5 | input/output | SCL | ||||
| 15 | GPIO3 | input/output | RX | UART0 RX – firmware upload | |||
| 16 | GPIO1 | input/output | TX | UART0 TX – firmware upload |
What to watch out for
- Disconnect the device from the 230 V mains before opening it. Program the module only from a 3.3 V USB-serial converter.
- To enter download mode, connect GPIO0 to GND at boot.
- Strapping pins: GPIO2 must be at logic 1 at boot, GPIO15 at logic 0.
- A0 measures only 0–1 V.
Flashing smart plugs on chiptron.eu/
On chiptron.eu/ you'll find guides on flashing ESP8266-based smart plugs and switches with your own firmware:
- Esparto 2.0 – an Arduino library for developing alternative firmware for Sonoff switches
More pinouts
See all pinouts on the Pinouts page.