Building a Meshtastic Node with ESP32-S3 and LoRa E22-900M30S: A Step-by-Step Guide
To build a Meshtastic node using an ESP32-S3 Super Mini, you'll need the following components:
- ESP32-S3 Super Mini
- LoRa module E22-900M30S
- GPS Neo-6M v2
- 0.96" OLED display (SSD1306, 128x64)
- 868 MHz LoRa antenna (5 dBi, SMA)
- USB-UART converter
- Jumper wires and breadboards
The total cost, excluding consumables, is around $20. This setup allows for a deeper understanding of the hardware and the flexibility of the ESP32-S3's GPIO matrix.
Wiring Diagram
The ESP32-S3 offers advanced remapping capabilities for SPI, I2C, and UART interfaces. Avoid using system pins (USB, boot). Example pinout for the LoRa E22-900M30S:
- SX126X_CS (NSS): GPIO 10
- LORA_SCK: GPIO 11
- LORA_MOSI: GPIO 12
- LORA_MISO: GPIO 7
- SX126X_RESET: GPIO 6
- SX126X_BUSY: GPIO 5
- SX126X_DIO1: GPIO 4
For the OLED (I2C):
- I2C_SCL: GPIO 9
- I2C_SDA: GPIO 8
The GPS Neo-6M connects only via TX (GPIO 1) to avoid conflicts with the debug UART.
Adapting the Meshtastic Firmware
Clone the firmware repository:
git clone https://github.com/meshtastic/firmware
Install PlatformIO (on macOS: brew install platformio). Navigate to variants/esp32s3/EBYTE_ESP32-S3.
Edit variant.h:
#define SX126X_CS 10 // EBYTE module's NSS pin
#define LORA_SCK 11
#define LORA_MOSI 12
#define LORA_MISO 7
#define SX126X_RESET 6
#define SX126X_BUSY 5
#define SX126X_DIO1 4
// I2C
#define I2C_SCL 9
#define I2C_SDA 8
#define HAS_SCREEN 1
#define GPS_TX_PIN 1
In platformio.ini, specify the speeds:
upload_speed = 115200
monitor_speed = 115200
Build: pio run -e EBYTE_ESP32-S3.
Flashing via External USB-UART
The built-in USB on budget ESP32-S3 Super Mini boards can be unstable. Connect the adapter:
- 5V → 5V
- GND → GND
- TX adapter → RX board
- RX adapter → TX board
Upload: pio run -e EBYTE_ESP32-S3 -t upload. For boot mode:
- Hold Boot
- Press Reset
- Release Reset
- Release Boot after 1 second
Optimization and Testing
After flashing, the node will recognize the LoRa E22-900M30S, OLED, and GPS. Test the mesh network on 868 MHz. Next, solder onto a PCB to eliminate loose wires.
Key Points:
- The flexible GPIO matrix of the ESP32-S3 simplifies custom builds.
- Base your setup on the EBYTE_ESP32-S3 variant for the E22-900M30S.
- Connect GPS only via TX to preserve the UART for debugging.
- An external USB-UART stabilizes flashing on inexpensive boards.
— Editorial Team
No comments yet.