equivariant

Using T201-V1.0 ESP8285 module with Arduino IDE

In my previous post I went over the hardware and programming process for a T201-V1.0 ESP8285 module that was taken from a Gosund WP3 smart plug. This module can also be used with Arduino as a "Generic ESP8285 Module".

Wire up the module on a breadboard according to the diagram below. To program the module, I'm using a FTDI Basic Breakout board from SparkFun with the jumper on the rear switched to the 3.3V setting. If you're using a different USB-to-serial adapter, the pin order will be different on J2.

Schematic of ESP8285 connection

(Download KiCad schematic)

More information about how to connect the module can be found in the ESP8285 Arduino Core documentation. It's necessary to use an external 3.3V power supply, as the USB-to-serial adapter is unable to supply enough power to the ESP8285 module. I used a benchtop power supply.

Next, install the ESP8266 Arduino Core as described in the documentation. Once installed, change the following settings under the "Tools" menu:

Setting Value
Board Generic ESP8285 Module
Builtin Led 14
Reset Method no dtr (aka ck)

The "no dtr (aka ck)" setting will pull the DTR pin low while programming, which is required to place the ESP8285 in programming mode. After it finishes, it will issue a soft reset and let DTR float high.

The rest can be left at their defaults. Open the "Blink" example sketch under File→Examples→ESP8266→Blink. Plug in the USB-to-serial adapter and upload the sketch with Sketch→Upload. When you see Connecting... in the console, press the reset switch (SW1 in the schematic). A successful upload will look something like this:

Executable segment sizes:
IROM   : 228656          - code in flash         (default or ICACHE_FLASH_ATTR) 
IRAM   : 26752   / 32768 - code in IRAM          (ICACHE_RAM_ATTR, ISRs...) 
DATA   : 1248  )         - initialized variables (global, static) in RAM/HEAP 
RODATA : 688   ) / 81920 - constants             (global, static) in RAM/HEAP 
BSS    : 24880 )         - zeroed variables      (global, static) in RAM/HEAP 
Sketch uses 257344 bytes (26%) of program storage space. Maximum is 958448 bytes.
Global variables use 26816 bytes (32%) of dynamic memory, leaving 55104 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port /dev/ttyUSB0
Connecting........_____...
Chip is ESP8285
Features: WiFi, Embedded Flash
Crystal is 26MHz
MAC: c4:4f:33:xx:xx:xx
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 1MB
Compressed 261504 bytes to 193165...
Wrote 261504 bytes (193165 compressed) at 0x00000000 in 17.1 seconds (effective 122.1 kbit/s)...
Hash of data verified.

Leaving...
Soft resetting...

Once it's done, the LED should start blinking.