LilyGO TTGO T-Beam: Your ESP32 Gateway to LoRa and Beyond
The LilyGO TTGO T-Beam is a versatile ESP32 development board featuring LoRa communication, GPS, and a battery management system, ideal for IoT and long-range projects.
The LilyGO TTGO T-Beam is a compact and feature-rich development board built around the popular Espressif ESP32 microcontroller. Released around 2019 by LilyGO, it quickly gained traction among makers and developers for its integrated LoRa radio and GPS module, making it a powerful solution for Internet of Things (IoT) applications that require long-range communication and location tracking without relying on traditional Wi-Fi or cellular networks.
At its heart, the T-Beam uses the ESP32-WROOM-32 module, which houses a dual-core Tensilica LX6 microprocessor. This powerful SoC offers Wi-Fi and Bluetooth connectivity, ample processing power, and a rich set of peripherals, including GPIO, ADC, DAC, I2C, SPI, and UART. The T-Beam specifically leverages these capabilities by adding a Semtech SX1276/SX1278 LoRa transceiver for sub-gigahertz radio communication and a u-blox NEO-6M or similar GPS module for precise positioning.
This board is particularly well-suited for projects involving remote sensor data logging, asset tracking, mesh networking, and autonomous navigation. Its integrated battery charging and management circuitry, often featuring a TP4056 chip, allows for portable operation, making it a compelling choice for field deployments. The combination of ESP32's processing power, LoRa's long-distance capabilities, and GPS's location awareness positions the T-Beam as a go-to board for ambitious IoT projects.
The T-Beam targets makers, students, and embedded engineers who are comfortable working with the ESP32 ecosystem and are looking to explore beyond standard Wi-Fi or Bluetooth projects. Its specific focus on LoRa and GPS makes it ideal for those interested in building off-grid communication systems, environmental monitoring stations, or tracking devices that can operate over significant distances or in areas with limited infrastructure.
Watch
Related video, embedded from YouTube.
Specifications
| Microcontroller / SoC | Espressif ESP32-WROOM-32 |
| Architecture | Dual-core Tensilica LX6 |
| Clock speed | Up to 240 MHz |
| Flash / Storage | 4 MB (typical for WROOM-32 module) |
| RAM / SRAM | 520 KB SRAM |
| Operating voltage | 3.3V |
| Digital I/O pins | 34 (maximum, some used internally) |
| Analog / ADC | 12-bit (up to 18 channels) |
| PWM | Up to 16 channels |
| Connectivity | Wi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and BLE, LoRa (SX1276/SX1278), GPS (u-blox NEO-6M or similar) |
| USB | Micro-USB for power and programming (via CP210x or CH340 USB-to-Serial converter) |
| Power input | Micro-USB (5V), LiPo battery connector (3.7V), VIN pin (typically 5V) |
| Dimensions | Approx. 52mm x 27mm (PCB) |
Pinout & pin functions
| Pin | Function |
|---|---|
| 3V3 | 3.3V Power Output |
| GND | Ground |
| EN | Enable Pin (active high) |
| IO21 | General Purpose Input/Output, ADC1_CH0, Touch0 |
| IO22 | General Purpose Input/Output, ADC1_CH1, Touch2 |
| IO19 | General Purpose Input/Output, ADC1_CH3, Touch4, VP |
| IO23 | General Purpose Input/Output, ADC1_CH5, Touch8, VN |
| IO5 | General Purpose Input/Output, Touch1, SPI_CS1 |
| IO4 | General Purpose Input/Output, Touch3 |
| IO15 | General Purpose Input/Output, ADC1_CH4, Touch7 |
| IO2 | General Purpose Input/Output, Touch5 |
| IO13 | General Purpose Input/Output, ADC1_CH10, Touch10, SPI_MOSI |
| IO12 | General Purpose Input/Output, ADC1_CH9, Touch9, SPI_MISO |
| IO14 | General Purpose Input/Output, ADC1_CH6, Touch6, SPI_SCK |
| IO27 | General Purpose Input/Output, ADC1_CH13, Touch13 |
| IO26 | General Purpose Input/Output, ADC1_CH12, Touch12 |
| IO25 | General Purpose Input/Output, ADC1_CH8, Touch11 |
| IO34 | Input only, ADC1_CH6 |
| IO35 | Input only, ADC1_CH7 |
| IO32 | General Purpose Input/Output, ADC1_CH4, Touch13 |
| IO33 | General Purpose Input/Output, ADC1_CH5, Touch14 |
| IO39 | Input only, ADC1_CH3 |
| IO36 | Input only, ADC1_CH0 |
| VBAT | Battery Input (3.7V LiPo) |
| USB | Micro-USB Port (5V Power and Data) |
| ANT | LoRa Antenna Connector (SMA) |
| GPS_TX | GPS Module Transmit (connect to ESP32 RX) |
| GPS_RX | GPS Module Receive (connect to ESP32 TX) |
| LoRa_DIO0 | LoRa Module DIO0 (interrupt pin) |
| LoRa_RST | LoRa Module Reset |
| LoRa_CS | LoRa Module Chip Select |
| LoRa_SCK | LoRa Module SPI Clock |
| LoRa_MISO | LoRa Module SPI MISO |
| LoRa_MOSI | LoRa Module SPI MOSI |
Wiring & circuit basics
Powering the TTGO T-Beam requires careful consideration. The board can be powered via its Micro-USB port, which typically accepts 5V. It also features a dedicated connector for a 3.7V LiPo battery, often managed by an integrated charging circuit (e.g., TP4056). When using a LiPo battery, ensure it is rated for the expected current draw of the ESP32 and any connected peripherals. The board's onboard 3.3V regulator will supply power to the ESP32 and other 3.3V components. Avoid applying voltages higher than 5V to the Micro-USB or VIN pins, as this can damage the board.
The TTGO T-Beam operates at 3.3V logic levels. This is crucial when interfacing with external components. If you need to connect a 5V device, such as many common Arduino sensors or modules, you must use a logic level shifter to convert the 5V signals down to 3.3V for the T-Beam and, if necessary, convert the 3.3V signals back up to 5V for the external device. Connecting a 5V device directly to a 3.3V GPIO pin can permanently damage the ESP32.
A simple example of wiring is connecting an LED. Choose a GPIO pin (e.g., IO2). Connect the anode (+) of the LED to the chosen GPIO pin and the cathode (-) to one end of a current-limiting resistor (typically 220-330 ohms for a standard LED). Connect the other end of the resistor to a GND pin on the T-Beam. This setup ensures that when the GPIO pin is HIGH (3.3V), current flows through the resistor and LED, illuminating it, while preventing excessive current from damaging the LED or the ESP32. For I2C devices, connect the SDA pin of the sensor to a designated I2C SDA pin on the T-Beam (e.g., IO21) and the SCL pin of the sensor to a designated I2C SCL pin (e.g., IO22). Also, connect the sensor's VCC to 3.3V and GND to GND.
Programming & getting started
The TTGO T-Beam can be programmed using various popular development environments. The Arduino IDE is a common choice, requiring the installation of the ESP32 board support package. This allows you to write C/C++ code using familiar Arduino libraries. For uploading code, connect the T-Beam to your computer via the Micro-USB port. Ensure the correct COM port is selected in the Arduino IDE and that the ESP32 board is chosen. Press the BOOT button (if present and accessible) while clicking the Upload button, or simply click Upload if the board enters bootloader mode automatically.
Alternatively, you can use PlatformIO, a more advanced IDE that supports multiple frameworks including Arduino, ESP-IDF (Espressif's official IoT Development Framework), and MicroPython. MicroPython offers a Pythonic way to program the ESP32, which can be advantageous for rapid prototyping. For ESP-IDF, you'll use Espressif's own toolchain and build system, providing the most control and access to low-level features. Uploading code typically involves connecting the board, configuring the serial port in your chosen IDE, and initiating the build and flash process.