MakerLab
ESP32LilyGO TTGO T-Beam

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.

LilyGO TTGO T-Beam

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 / SoCEspressif ESP32-WROOM-32
ArchitectureDual-core Tensilica LX6
Clock speedUp to 240 MHz
Flash / Storage4 MB (typical for WROOM-32 module)
RAM / SRAM520 KB SRAM
Operating voltage3.3V
Digital I/O pins34 (maximum, some used internally)
Analog / ADC12-bit (up to 18 channels)
PWMUp to 16 channels
ConnectivityWi-Fi 802.11 b/g/n, Bluetooth v4.2 BR/EDR and BLE, LoRa (SX1276/SX1278), GPS (u-blox NEO-6M or similar)
USBMicro-USB for power and programming (via CP210x or CH340 USB-to-Serial converter)
Power inputMicro-USB (5V), LiPo battery connector (3.7V), VIN pin (typically 5V)
DimensionsApprox. 52mm x 27mm (PCB)

Pinout & pin functions

PinFunction
3V33.3V Power Output
GNDGround
ENEnable Pin (active high)
IO21General Purpose Input/Output, ADC1_CH0, Touch0
IO22General Purpose Input/Output, ADC1_CH1, Touch2
IO19General Purpose Input/Output, ADC1_CH3, Touch4, VP
IO23General Purpose Input/Output, ADC1_CH5, Touch8, VN
IO5General Purpose Input/Output, Touch1, SPI_CS1
IO4General Purpose Input/Output, Touch3
IO15General Purpose Input/Output, ADC1_CH4, Touch7
IO2General Purpose Input/Output, Touch5
IO13General Purpose Input/Output, ADC1_CH10, Touch10, SPI_MOSI
IO12General Purpose Input/Output, ADC1_CH9, Touch9, SPI_MISO
IO14General Purpose Input/Output, ADC1_CH6, Touch6, SPI_SCK
IO27General Purpose Input/Output, ADC1_CH13, Touch13
IO26General Purpose Input/Output, ADC1_CH12, Touch12
IO25General Purpose Input/Output, ADC1_CH8, Touch11
IO34Input only, ADC1_CH6
IO35Input only, ADC1_CH7
IO32General Purpose Input/Output, ADC1_CH4, Touch13
IO33General Purpose Input/Output, ADC1_CH5, Touch14
IO39Input only, ADC1_CH3
IO36Input only, ADC1_CH0
VBATBattery Input (3.7V LiPo)
USBMicro-USB Port (5V Power and Data)
ANTLoRa Antenna Connector (SMA)
GPS_TXGPS Module Transmit (connect to ESP32 RX)
GPS_RXGPS Module Receive (connect to ESP32 TX)
LoRa_DIO0LoRa Module DIO0 (interrupt pin)
LoRa_RSTLoRa Module Reset
LoRa_CSLoRa Module Chip Select
LoRa_SCKLoRa Module SPI Clock
LoRa_MISOLoRa Module SPI MISO
LoRa_MOSILoRa 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.

Project ideas

LoRa Weather StationBuild a remote weather station that collects temperature, humidity, and pressure data using sensors connected to the T-Beam. The data is then transmitted wirelessly over LoRa to a base station, allowing for remote monitoring without Wi-Fi.
GPS Asset TrackerCreate a portable device that tracks its location using the onboard GPS module. The T-Beam can send its coordinates periodically via LoRa to a receiver, enabling real-time tracking of assets or people.
LoRa Mesh Network NodeDevelop a node for a LoRa mesh network. Multiple T-Beams can communicate with each other over long distances, relaying messages and forming a decentralized communication network for remote areas.
Long-Range Sensor NetworkDeploy multiple T-Beams with various sensors (e.g., soil moisture, light levels) in agricultural fields or forests. They can transmit sensor readings over LoRa to a central gateway for environmental monitoring and data analysis.
LoRa-based Remote ControlDesign a handheld remote control unit using a T-Beam to send commands wirelessly over LoRa to another T-Beam acting as a receiver connected to actuators or lights, useful for controlling devices far from a Wi-Fi network.
Autonomous Drone/Robot NavigationIntegrate the T-Beam into a robot or drone project. Use the GPS for navigation and LoRa for command and control or telemetry transmission over extended ranges, learning about embedded systems in robotics.

Buying tips & gotchas

When purchasing a TTGO T-Beam, be aware that there can be minor revisions and variations in components (e.g., GPS module model, USB-to-Serial chip). Always check the specific pinout for your board version. Ensure you have a suitable LiPo battery if you plan to use battery power, and be mindful of the battery's charging current. Common pitfalls include incorrectly wiring 5V components to 3.3V pins, insufficient power supply for peripherals, and issues with LoRa antenna matching. Accessories like SMA antennas, appropriate LiPo batteries, and USB cables are essential. Consider checking for clones, as quality can vary significantly.