LR1000E2 UART protocol and integration
LR1000E2 905 nm Laser Ranging Module
Typical applications: Robotics, Industrial measurement, Outdoor positioning.
At a glance
| Protocol family | Family A (55 AA, polled) |
| Default baud | 115200 bps, 8N1 |
| Frame | 8 bytes |
| Distance unit on the wire | metres x 10 |
| Measurement range (datasheet) | 4–1,000 m |
Specification
Values come from the ERDI datasheet for this model. Where the datasheet gives a condition, it is shown.
| Parameter | Value | Condition |
|---|---|---|
| Laser wavelength | 905 nm ± 5 nm | |
| Measurement range | 4–1,000 m | |
| Ranging accuracy | ±1 m (≤400 m) · ±1 m + d·0.1% (>400 m) | |
| Measurement frequency | 3–10 Hz adaptive | Adaptive |
| Interface | UART-TTL | Customizable |
| Baud rate | 115200 bps | |
| Supply voltage | 3.3–5 V | |
| Operating power | Short-range < 0.6 W · max ≤ 1 W | |
| Startup time | ≤ 200 ms | |
| Dimensions | 25.65 × 13.2 × 24.6 mm | |
| Weight | ≤ 10 g | |
| Protection rating | IP67 (inside lens cavity) | |
| Laser safety class | IEC Class 1 | |
| Operating temperature | -20 to +55 ℃ (-40 ℃ custom) | |
| Storage temperature | -40 to +60 ℃ | |
| Laser beam divergence | < 9 mrad | |
| Optical material | Resin aspherical lens | |
| Receiving aperture | 9.2 × 14.5 mm | |
| Measurement accuracy rate | ≥ 98% | |
| False alarm rate | ≤ 1% | |
| Inrush current | < 350 mA | |
| Average laser power | On request | |
| Response time | On request | |
| Sleep power | < 1 mW | |
| Standby power | < 0.3 W | |
| Shock / vibration | 1000 g/ms (10×/s along optical axis) · 5–50–5 Hz, 2.5 g | |
| Reliability | MTBF ≥ 1500 h |
Pinout and wiring
| PIN | SIGNAL | SOURCE-STATED FUNCTION |
|---|---|---|
| 1 | GND | Power supply negative |
| 2 | VCC | Power supply positive |
| 3 | I/O (Reserved) | Reserved for expansion |
| 4 | TXD | Transmit data: module → host |
| 5 | RXD | Receive data: host → module |
| 6 | SW-SHOT | Function enable (active high); Note: Compatible with active-low control requirements |
Cross TX and RX (module TX to host RX), share ground, and power the module from a supply that matches the supply voltage in the specification table. See Wiring and power.
Protocol summary
- Frame: 8 bytes, header
55 AA, then function code, four data bytes, checksum. - Default baud: 115200 bps, 8 data bits.
- Transmit checksum: lower 8 bits of function code + D1..D4 (the header is not included).
- Reply checksum: lower 8 bits of header H + header L + function code + D1..D4 (the header is included). The two formulas differ on purpose.
- Reply to a ranging command:
55 AA <fn> STA FF DIS_H DIS_L SUM.STA = 1means the measurement succeeded. - Distance:
DIS_H:DIS_Lis the measured value in metres multiplied by 10.
| Command | Request frame |
|---|---|
| Single-shot ranging | 55 AA 88 FF FF FF FF 84 |
| Continuous ranging | 55 AA 89 FF FF FF FF 85 |
| Stop ranging | 55 AA 8E FF FF FF FF 8A |
| Angle measurement | 55 AA 8A FF FF FF FF 86 |
The full frame description is in Family A protocol. Try it without installing anything in the browser serial monitor.
Code examples
- Python
- Arduino
- ESPHome
- ROS 2
pip install erdi-lrf # PyPI, MIT
erdi-lrf --port /dev/ttyUSB0 --model LR1000E2 measure
from erdi_lrf import ErdiLRF
with ErdiLRF("/dev/ttyUSB0", "LR1000E2") as lrf: # COM3 on Windows
r = lrf.measure() # single-shot (0x88)
print(f"{r.metres:.3f} m", "raw", r.raw)
#include <ErdiLRF.h>
ErdiLRF lrf(Serial1, ERDI_LR1000E2);
void setup() {
Serial.begin(115200);
Serial1.begin(erdiDefaultBaud(ERDI_LR1000E2)); // 115200 baud; ESP32: Serial1.begin(baud, SERIAL_8N1, RX_PIN, TX_PIN)
lrf.setTimeout(1000);
}
void loop() {
ErdiMeasurement m;
if (lrf.measure(&m) == ERDI_OK) {
Serial.println(m.metres, 3);
}
delay(200);
}
external_components:
- source: github://ErdiTech/erdi-lrf-home-assistant
components: [erdi_lrf]
uart:
id: lrf_uart
tx_pin: GPIO17
rx_pin: GPIO16
baud_rate: 115200
sensor:
- platform: erdi_lrf
uart_id: lrf_uart
model: LR1000E2
name: "Laser distance"
update_interval: 1s
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/ttyUSB0 model:=LR1000E2 rate:=10.0
ros2 topic echo /range
Platform status
Only rows with evidence say Verified. See the compatibility matrix for what that means and where the evidence is.
| Platform | Status | Guide |
|---|---|---|
| Python (erdi-lrf) | Untested | Python / Raspberry Pi / Jetson |
| Arduino / PlatformIO | Untested | Arduino / PlatformIO |
| ESPHome / Home Assistant | Untested | ESPHome |
| ROS 2 | Untested | ROS 2 |
| ArduPilot (Lua script) | Untested | ArduPilot |
| ArduPilot native driver | No driver yet | ArduPilot |
Known issues
- UART logic level is not stated as a separate field for most models. Supply voltage is not the UART voltage: check the module's TX level against your host before wiring, or ask us.
Resources
- Model page with datasheet download: https://erdilrf.com/models/lr1000e2/
- Datasheet and specification page: LR1000E2 datasheet and specs
- Interactive 3D view: LR1000E2 3D viewer
- STEP model: available on request, Request STEP
- Drivers and protocol notes: ErdiTech/erdi-lrf-drivers
- Questions: tommy@erdimail.com, +86 133 0819 5790