Opens in a new tab

Tuya TYWE3S Pinout (ESP8266)

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.

Tuya TYWE3S (ESP8266) – pinoutTuya TYWE3S (ESP8266) – pinoutchiptron.eu · CC BY 4.0TYWE3SESP8266 1 RST → Reset – connecting to GND restarts the module 2 A0 ADC0 3 EN → Chip enable (CH_PD) – connect to 3.3 V 4 GPIO16 5 GPIO14 SCK 6 GPIO12 MISO 7 GPIO13 MOSI 8 3V3 → Power 3.3 V, supply at least 500 mA 16 GPIO1 TX 15 GPIO3 RX 14 GPIO5 SCL 13 GPIO4 SDA 12 GPIO0 11 GPIO2 10 GPIO15 SS 9 GND GPIO UART I2C SPI ADC (analog) Power Ground (GND) Control / reset Strapping pin
Download:PNGSVG
Pin table – Tuya TYWE3S (ESP8266)
PinNameDirectionUARTI2CSPIADCNote
1RSTinputReset – connecting to GND restarts the module
2A0inputADC0ADC 0–1 V (TOUT), no divider on the module
3ENinputChip enable (CH_PD) – connect to 3.3 V
4GPIO16input/outputWake from deep sleep (connect to RST)
5GPIO14input/outputSCK
6GPIO12input/outputMISO
7GPIO13input/outputMOSI
83V3inputPower 3.3 V, supply at least 500 mA
9GND–
10GPIO15input/outputSSStrapping pin – must be logic 0 at boot (pull-down on the device board)
11GPIO2input/outputStrapping pin – must be logic 1 at boot
12GPIO0input/outputStrapping pin – logic 0 at boot = download mode (Tasmota, ESPHome)
13GPIO4input/outputSDA
14GPIO5input/outputSCL
15GPIO3input/outputRXUART0 RX – firmware upload
16GPIO1input/outputTXUART0 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.

Related Articles