Wemos TTGO ESP8266 with 0.91" OLED

updated 3 min read #note #electronics

This note collects the specifications and pinout of the Wemos TTGO ESP8266 board with a 0.91" OLED display, for anyone who wants to use it in their own project.

I was looking for an ESP8266 board with voltage regulators like a NodeMCU, but much smaller. The project: connecting a wine fridge to my smart home, so I can control it and read its state. The TTGO board with its built-in OLED display is perfect for that. It fits exactly into the fridge’s handle and has all the interfaces I need to read my NTC temperature sensor and to control the cooling circuit and the interior lighting. The board also works with ESPHome without any problems.

Specifications#

MCUESPRESSIF-ESP8266EX
Flash Size4 MB
HW ButtonsReset / Flash
Display0.91-inch 128 × 32 monochrome OLED
PWR LEDred
USB to TTLCP2102
Clock26 MHz crystal oscillator
Voltage3.3–7 V
Avg. Current~70 mA
Temperature−40 to 90 °C
Board Size50.86 × 18.2 × 6.96 mm

Front view#

The front has the OLED display, the micro-USB port and two buttons for resetting and flashing the ESP8266.

Front of the black TTGO board: the 0.91-inch OLED display in the middle, a PCB antenna on the left, the micro-USB port and the RST and PRG buttons on the right, and a row of pin holes along each long edge
Wemos TTGO ESP8266, front view

Back view#

The back has the unshielded ESP8266 chip and a battery connector. Users in online communities report poor Wi-Fi performance. I assume this is because the antenna sits behind the display’s flex cable and because the microcontroller isn’t shielded.

Back of the TTGO board: the display's orange flex cable on the left, the unshielded ESP8266EX chip, a crystal, the flash chip and the USB-to-serial chip, and a white battery connector on the right
Wemos TTGO ESP8266, back view

Board layout#

Pinout diagram of the TTGO board with GPIO, power and bus functions for every pin; arrows mark the display pins OLED_SDA on GPIO2, OLED_SCL on GPIO14 and OLED_RST on GPIO4
Wemos TTGO ESP8266 pinout

The following pins are occupied by the display:

OLEDBoard
SDAD4 / GPIO2
SCLD5 / GPIO14
RSTD2 / GPIO4

Code example#

// This example of the Adafruit_SSD1306 library worked for me.
// I only modified initialising Wire with the appropriate I2C pins.

...
#define OLED_SDA 2
#define OLED_SCL 14
#define OLED_RST 4
...
Wire.begin( OLED_SDA, OLED_SCL);
...

OLED interface pins (WEO012832)#

No.SymbolFunction
1C2PPositive terminal of the flying inverting capacitor
2C2NNegative terminal of the flying boost capacitor
3C1PThe charge-pump capacitors are required between the terminals
4C1NThey must be floated when the converter is not used
5VBATPower supply for DC/DC converter circuit. This is the power supply pin for the internal buffer of the DC/DC voltage converter. It must be connected to external source when the converter is used. It should be connected to VDD when the converter is not used.
6NCNo connection
7VSSGround of logic circuit
8VDDPower supply for logic circuit
9RESPower Reset for Controller and Driver. When the pin is low, initialization of the chip is executed
10SCLI2C mode is selected, D2, D1 should be tied together and serve as SDA-out, SDA-in in application and D0 is the serial clock input, SCL.
11SDA-
12IREFCurrent Reference for Brightness Adjustment. This pin is segment current reference pin. A resistor should be connected between this pin and VSS. Set the current lower than 12.5μA.
13VCOMHVoltage Output High Level for COM Signal. This pin is the input pin for the voltage output high level for COM signals. A capacitor should be connected between this pin and VSS.
14VCCPower Supply for OEL Panel. This is the most positive voltage supply pin of the chip. A stabilization capacitor should be connected between this pin and VSS when the converter is used. It must be connected to external source when the converter is not used.

Sources#

cd ~/writing