A Jetson Orin or Nano reads an ERDI laser rangefinder over the 40-pin header UART, usually /dev/ttyTHS1, at 3.3 V logic. Wire TX/RX/GND, free the port from the serial console, add your user to dialout, then read frames with pyserial or run the erdi_lrf_driver ROS 2 node.
Step 1: wire at 3.3 V
The Jetson 40-pin header UART is 3.3 V logic. The module UART must be 3.3 V TTL too; supply voltage is not UART voltage, so check the model page for both rows before connecting, and use a level shifter if the module TX is higher than 3.3 V. Power the module from its own supply as the manual says, with a common ground to the Jetson.
| Module | Jetson 40-pin header |
|---|---|
| TX | Pin 10 (UART RXD) |
| RX | Pin 8 (UART TXD) |
| GND | Pin 6 (GND) |
| VCC | Own supply per the model manual |
Pins 8 and 10 are the standard UART pair on the Jetson 40-pin header; confirm against the carrier-board pinout of your exact developer kit or custom board.
Step 2: find the device name
The header UART is typically /dev/ttyTHS1 on Orin Nano and Nano developer kits, but the name can differ by module and carrier board (for example ttyTHS0). Do not guess:
ls /dev/ttyTHS*
dmesg | grep -i ttyTHS
A USB-TTL adapter shows up as /dev/ttyUSB0 instead, which is the easiest way to bring up a first test.
Step 3: free the port and set permissions
On images where nvgetty runs a login console on the header UART, stop it so it does not consume bytes or echo into the module:
sudo systemctl stop nvgetty
sudo systemctl disable nvgetty
If the service does not exist on your JetPack release, there is nothing to stop; check with systemctl status nvgetty. Then give your user access to the port and log out and in:
sudo usermod -aG dialout $USER
ls -l /dev/ttyTHS1
Step 4: read frames with pyserial
ERDI modules use two UART protocols. Family B (LRF22VB, LRF50VB, H series) free-runs at 460800 baud with 5C lo hi chk frames, check byte = inverse of the sum of the distance bytes, LRF1500H uses a 5-byte frame. Units differ by series: VB series millimetres, H series centimetres. The reader below is a minimal rewrite of the parser in erdi_lrf.py for LRF22VB.
import serial
PORT = "/dev/ttyTHS1" # confirm with: ls /dev/ttyTHS*
ser = serial.Serial(PORT, 460800, bytesize=8, parity="N", stopbits=1, timeout=0.1)
buf = bytearray()
while True:
buf.extend(ser.read(64))
i = 0
while i <= len(buf) - 4:
if buf[i] == 0x5C and ((~(buf[i+1] + buf[i+2])) & 0xFF) == buf[i+3]:
raw = buf[i+1] | (buf[i+2] << 8) # little-endian
print("out of range" if raw >= 20000 else "%.3f m" % (raw * 0.001))
i += 4
else:
i += 1
del buf[:i]
For a polled family A module (for example LRF3000A1, 115200 baud), write the request 55 AA 88 FF FF FF FF 84 and read the 8-byte reply 55 AA 88 STA FF DH DL SUM; STA = 1 means a valid echo and the value is (DH<<8 | DL) x 0.1 m. The ready-made Python package is in erdi-lrf-drivers/python (erdi-lrf --port /dev/ttyTHS1 --model LRF3000A1 measure).
Step 5: ROS 2 with erdi_lrf_driver
Build the package in your workspace, then launch it with the Jetson port (commands from the repository README):
cd ~/ros2_ws/src
git clone https://github.com/ErdiTech/erdi_lrf_driver.git
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -y
colcon build --packages-select erdi_lrf_driver
source install/setup.bash
ros2 launch erdi_lrf_driver erdi_lrf.launch.py port:=/dev/ttyTHS1 model:=LRF22VB rate:=10.0
ros2 topic echo /range
The node publishes sensor_msgs/msg/Range on range. The full parameter list is on the ROS 2 driver page. Your ROS 2 distribution must match your JetPack/Ubuntu release; see the repository README for the build instructions.
Common pitfalls
| Symptom | Likely cause | Fix |
|---|---|---|
| Permission denied on /dev/ttyTHS1 | User not in dialout | usermod -aG dialout, then log out and in |
| Stray text or no data | nvgetty console on the port | Stop and disable nvgetty |
| Device not found | Different UART name on your board | ls /dev/ttyTHS* |
| No frames | TX/RX swapped, no common ground | Module TX to pin 10, module RX to pin 8 |
| Garbled frames | Wrong baud | 460800 family B, 115200 family A |
FAQ
Is the Jetson UART 3.3 V or 5 V?
The 40-pin header UART is 3.3 V logic. Use a 3.3 V TTL module or a level shifter, and never feed 5 V into the header.
Should I use ttyTHS0 or ttyTHS1?
It depends on the module and carrier board. Run ls /dev/ttyTHS* and check the pinout; ttyTHS1 is the common choice on the 40-pin header of Orin Nano and Nano kits.
Can I use a USB-TTL adapter instead?
Yes. It appears as /dev/ttyUSB0, needs the same dialout permission and the same baud rate, and avoids any serial console conflict.
Where is the frame format for my model?
See the model page at erdilrf.com/models for the frame format and units of your exact model. Questions: tommy@erdimail.com.
Category pages: Laser distance sensor · Laser rangefinder module
Models mentioned in this article
- LRF22VB905 nm · up to 20 m · UART · I2C · 1.5 gFrom $10 · shipping includedSee price & buy
- LRF3000A1905 nm · up to 3 km · UART · TTL · 12 ± 0.5 gFrom $180 · shipping includedSee price & buy
- LRF50VB905 nm · up to 50 m · UART · I2C · 1.3 gFrom $30 · shipping includedSee price & buy
- LRF1500H905 nm · up to 1.5 km · UART · I2C · 20 ± 2 gFrom $250 · shipping includedSee price & buy