Benewake TFmini-S LiDAR (UART) with ESP32
Supply 5 V
Bus GPIO
Measures distance
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| 5V | Power | VIN | Red wire. Needs 5 V: use VIN. Check the wire colours on your cable |
| GND | Ground | GND | Black wire |
| TX | Output (the part drives it) | D25 | Green wire. UART: the part sends data here. Connect to an ESP32 RX pin (115200 baud, 3.3 V level) |
| RX | Input (the ESP32 drives it) | D26 | White wire. UART: the part receives data here. Connect to an ESP32 TX pin |
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 TFmini-S product manual, Supply 5 V; UART 115200 baud, LVTTL 3.3 V; range 0.1 to 12 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 TF-Luna LiDAR (UART mode)
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.