Benewake TF-Luna LiDAR (UART mode) with ESP32
Supply 5 V
Bus GPIO
Measures distance
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| 5V | Power | VIN | Pin 1. Needs 5 V: use VIN |
| RX | Input (the ESP32 drives it) | D25 | Pin 2. UART: the part receives data here. Connect to an ESP32 TX pin |
| TX | Output (the part drives it) | D26 | Pin 3. UART: the part sends data here. Connect to an ESP32 RX pin (115200 baud, 3.3 V level) |
| GND | Ground | GND | Pin 4 |
| CFG | Not wired to the ESP32 | — | Pin 5, mode select. Leave unconnected for UART (GND at power-up = I2C) |
| MUX | Output (the part drives it) | D27 | Pin 6, on/off output. Optional |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
This module is sold for 5 V. Its outputs may be 5 V: use a level shifter or a voltage divider on ESP32 inputs.
Sources
- Benewake TF-Luna product manual, Pins 1 +5V, 2 RXD/SDA, 3 TXD/SCL, 4 GND, 5 configuration, 6 multiplexing output
- Benewake TF-Luna product manual, Supply 3.7 to 5.2 V; UART 115200 baud, LVTTL 3.3 V; range 0.2 to 8 m
Try it in 3D in BoardPilot
Learn the basics
Lesson: UART, I2C and SPI Lesson: GPIO: pins in and out Lesson: Hardware basics for software developers UART (serial port) Baud rate GPIO Level shifter Logic level (HIGH and LOW)
Related parts
A02YYUW waterproof ultrasonic distance (UART)A3144 hall effect switchAM312 mini PIR motion sensorATGM336H GPS/BeiDou moduleBeitian BN-220 GPS moduleBenewake TFmini-S LiDAR (UART)
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.