1. Introducció
This manual provides comprehensive instructions for the LILYGO LoRa32 868Mhz ESP32 TTGO Development Board. This versatile module integrates an ESP32 microcontroller with LoRa communication capabilities, a 0.96-inch OLED display, and an SD card slot, making it suitable for a wide range of IoT and wireless communication projects. Please read this manual carefully to ensure proper setup, operation, and maintenance of your device.
2. Producte acabatview
2.1. Característiques clau
- Microcontrolador: ESP32 (CH9102 chip)
- Connectivitat sense fils: Wi-Fi, Bluetooth V4.2, BLE, LoRa (868Mhz)
- Visualització: 0.96-inch SSD1306 OLED (128x64 resolution, I2C interface)
- Emmagatzematge: Support for TF (SD) Card
- Gestió d'energia: USB/3.7V LiPo battery power supply, integrated TP4054 for charging, power switch for battery control.
- Antena: SMA connector for external antenna, enhancing signal transmission.
- Aplicacions: Ideal for Paxcounter, LoRaWAN, MQTT over TCP/IP, and serial data transmission.
2.2. Contingut del paquet
El paquet estàndard inclou els següents elements:
- 1 x LILYGO LoRa32 Development Board (868Mhz variant)
- 1 x LoRa Antenna
- 2 x Pin Headers (for soldering)
- 1 x Battery Cable

Figure 2.2.1: Contents of the LILYGO LoRa32 Development Board package.

Figure 2.2.2: Illustrated diagram of included components.
2.3. Board Layout and Components
Familiarize yourself with the key components and interfaces on the LILYGO LoRa32 board:

Figura 2.3.1: Davant i darrere view of the LILYGO LoRa32 board.

Figure 2.3.2: Component identification on the LILYGO LoRa32 board.
- Pantalla OLED: 0.96-inch screen for displaying information.
- Port USB: Micro USB for power and data communication.
- Ranura per a targeta SD: For external data storage.
- SMA Antenna Connector: For connecting the external LoRa antenna.
- Connector de bateria: JST connector for 3.7V LiPo battery.
- Interruptor d'alimentació: Controls power to the board when using battery.
- Botó de restabliment: Resets the ESP32 microcontroller.
- Pins GPIO: Various General Purpose Input/Output pins for connecting peripherals.

Figure 2.3.3: Pinout diagram of the LILYGO LoRa32 board.
3. Guia de configuració
3.1. Connexió de maquinari
- Connecteu l'antena LoRa: Carefully screw the provided LoRa antenna onto the SMA connector on the board. Ensure it is finger-tight to avoid damage.
- Font d'alimentació:
- Potència USB: Connect the board to a computer or a 5V USB power adapter using a Micro USB cable.
- Potència de la bateria: If using a 3.7V LiPo battery, connect it to the JST battery connector. Ensure the power switch is in the "OFF" position before connecting, then switch to "ON" to power the board.
- SD Card (Optional): Insert a formatted TF (Micro SD) card into the SD card slot if your application requires local data storage.
- Pin Headers (Optional): Solder the included pin headers if you plan to use the GPIO pins for external connections on a breadboard or custom PCB.

Figure 3.1.1: LILYGO LoRa32 board with antenna connected.
3.2. Software Environment Setup
To program the LILYGO LoRa32 board, you will typically use the Arduino IDE or PlatformIO. Follow these general steps:
- Instal·leu l'IDE d'Arduino: Download and install the latest version of the Arduino IDE from the official weblloc (arduino.cc/en/software).
- Add ESP32 Board Support:
- Vés a File > Preferències a l'IDE d'Arduino.
- In the "Additional Boards Manager URLs" field, add:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json - Vés a Tools > Board > Boards Manager... Cerca "esp32" and install the "esp32 by Espressif Systems" package.
- Instal·leu el controlador USB: The board uses a CH9102 USB-to-Serial chip. You may need to install the appropriate driver for your operating system. Cerca "CH9102 driver" online.
- Selecciona la junta: A l'IDE d'Arduino, aneu a Tools > Board and select the appropriate ESP32 board, often "ESP32 Dev Module" or a specific TTGO LoRa32 board if available in the list.
- Instal·lar biblioteques: Depending on your project, you will need to install libraries for LoRa communication (e.g., LoRa by Sandeep Mistry), OLED display (e.g., Adafruit SSD1306, Biblioteca Adafruit GFX), and SD card functionality. These can be installed via Sketch > Include Library > Manage Libraries...
- Upload Code: Connect the board via USB, select the correct COM port under Eines > Port, and then upload your sketch.
4. Instruccions de funcionament
4.1. Funcionament bàsic
- Encès/apagat: If using battery power, use the slide switch on the board to turn it on or off. When powered via USB, the board will turn on automatically.
- Pantalla OLED: The 0.96-inch OLED display will show information as programmed. This can include sensor readings, network status, or other application-specific data.
- Restablir: Press the "RST" button to perform a hardware reset of the ESP32 microcontroller.
4.2. Transmissió de dades
The LILYGO LoRa32 board supports various data transmission methods:
- LoRaWAN Network: For long-range, low-power communication, data can be transmitted to a LoRaWAN gateway and then to a cloud-based network server.
- MQTT over TCP/IP: Utilize the ESP32's Wi-Fi capabilities to send data to an MQTT broker over a local network or the internet.
- Serial (SPI) Interface: Data can be transmitted to a local host device via the serial peripheral interface.
- Emmagatzematge de la targeta SD: For applications requiring local data logging, data can be written directly to an inserted TF (Micro SD) card.
4.3. Paxcounter Functionality
The LILYGO LoRa32 board is commonly used for Paxcounter applications. A Paxcounter is an ESP32-based device designed to detect and count nearby mobile devices (via Wi-Fi and Bluetooth probes) in real-time. This provides an estimation of the number of people in an area.

Figure 4.3.1: Paxcounter application examples.
To implement Paxcounter functionality, specific firmware needs to be flashed onto the ESP32. Refer to community resources and project repositories for detailed instructions on flashing and configuring Paxcounter firmware.
5. Manteniment
- Neteja: Use a soft, dry cloth to clean the board. Avoid using liquids or abrasive cleaners.
- Emmagatzematge: Store the board in a dry, anti-static environment when not in use. The provided protective case is suitable for storage.
- Manipulació: Handle the board by its edges to avoid touching components, especially when powered. Static electricity can damage electronic components.
- Actualitzacions de firmware: Regularly check for updated firmware or libraries from the LILYGO community or relevant project repositories to ensure optimal performance and access to new features.

Figure 5.1.1: Board stored in its protective case.
6. Solució De Problemes
| Problema | Causa possible | Solució |
|---|---|---|
| Board not powering on | Incorrect USB connection, faulty cable, battery switch off, discharged battery. | Check USB cable and port. Ensure battery is charged and power switch is "ON". Try a different power source. |
| Upload errors in Arduino IDE | Incorrect board selection, wrong COM port, missing USB driver, firmware flashing issues. | Verify board and port selection. Install CH9102 driver. Ensure proper firmware flashing procedure, sometimes requiring erasing flash before re-uploading. |
| La pantalla OLED no funciona | Incorrect wiring (if external), incorrect library, I2C address mismatch, faulty display. | Check I2C connections (SDA to GPIO21, SCL to GPIO22). Ensure correct OLED library is installed and initialized with the right I2C address. |
| LoRa communication issues | Antenna not connected, incorrect frequency, power settings, interference, range limitations. | Ensure antenna is securely attached. Verify LoRa frequency (868Mhz for this model) and power settings in code. Test in an open environment. |
| No s'ha detectat la targeta SD | Incorrect wiring, card not formatted, incompatible card, incorrect library. | Ensure SD card is properly inserted and formatted (FAT32). Check SD card library usage and pin assignments. |
7. Especificacions tècniques

Figura 7.1.1: Mésview of technical specifications.
| Característica | Detall |
|---|---|
| Marca | LILYGO |
| Nom del model / Sèrie | LoRa32 RS1833 |
| Microcontrolador | ESP32 (CH9102 chip) |
| Memòria Flash | 4 MB |
| RAM | LPDDR (integrated with ESP32) |
| Sistema operatiu | FreeRTOS (typical for ESP32 development) |
| Tecnologia de connectivitat | Wi-Fi, Bluetooth V4.2, BLE, LoRa |
| LoRa Transceiver | SX1276 (for 868/915/923Mhz variants) |
| Banda de freqüència LoRa | 868Mhz (for this specific product variant) |
| Pantalla OLED | 0.96 inch SSD1306, 128x64 resolution, I2C interface (SDA-GPIO21, SCL-GPIO22) |
| Suport per a targetes SD | Sí (targeta TF) |
| Font d'alimentació | USB (5V) / 3.7V LiPo battery |
| Càrrega de la bateria | Integrated TP4054 |
| Dimensions (aprox.) | 6.4 cm (alt) x 2.7 cm (ample) |

Figure 7.1.2: Approximate dimensions of the LILYGO LoRa32 board.
8. Garantia i Suport
LILYGO products are designed for hobbyists and developers. While specific warranty details may vary by region and retailer, LILYGO generally provides support through its official website and community forums.
- Recursos en línia: For technical documentation, example code, and community support, please visit the official LILYGO website or relevant GitHub repositories for the LoRa32 series.
- Fòrums de la comunitat: Engage with other users and developers in online forums dedicated to ESP32 and LoRa development for assistance and project ideas.
- Contacte amb el fabricant: For direct support inquiries, refer to the contact information provided on the LILYGO official weblloc.
Please note that modifications to the board or improper use may void any implied warranty.





