Skip to main content

LR1200E2 UART protocol and integration

LR1200E2 905 nm Laser Ranging Module

Typical applications: Industrial measurement, Robotics, Outdoor positioning.

At a glance​

Protocol familyFamily A (55 AA, polled)
Default baud115200 bps, 8N1
Frame8 bytes
Distance unit on the wiremetres x 10
Measurement range (datasheet)4–1,200 m

Specification​

Values come from the ERDI datasheet for this model. Where the datasheet gives a condition, it is shown.

ParameterValueCondition
Laser wavelength905 nm ± 5 nm
Measurement range4–1,200 mMax 1,500 m at night
Maximum range (nighttime)Maximum 1,500 m (nighttime)
Ranging accuracyδ ≤ ±1 m, 6 ≤ d < 500 m · δ ≤ ±50 cm + d·1‰, 500 ≤ d ≤ 1,000 m
Measurement frequency2–10 Hz adaptiveHigher rates customizable
InterfaceUART-TTLCustomizable
Baud rate115200 bps
Supply voltage3.3–5 V
Operating powerShort-range ≈ 0.4 W · max ≈ 1 W
Startup time≤ 200 ms
Dimensions25.65 × 13.2 × 24.6 mm
Weight≤ 10 g
Protection ratingIP67 (inside lens cavity)
Laser safety classIEC Class 1
Operating temperature-20 to +55 ℃ (-40 ℃ custom)
Storage temperature-40 to +60 ℃
Laser beam divergence< 4 mrad (small laser spot)
Optical materialResin aspherical lens
Receiving aperture9.2 × 14.5 mm
Measurement accuracy rate≥ 98%
False alarm rate≤ 1%
Inrush current≈ 350 mA
Average laser powerOn request
Response timeOn request
Sleep power< 1 mW
Standby power≈ 0.2 W
Shock / vibration1000 g/ms (10×/s along optical axis) · 5–50–5 Hz, 2.5 g
ReliabilityMTBF ≥ 1500 h

Pinout and wiring​

PINSIGNALSOURCE-STATED FUNCTION
1GNDPower -
2VCCPower +
3I/O (Reserved)Reserved for expansion
4TXDSignal output port, Ranging Module → Host
5RXDSignal input port, Host → Ranging Module
6SW-SHOTFunction Enable (active high); source note: compatible with active-low control requirement

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 = 1 means the measurement succeeded.
  • Distance: DIS_H:DIS_L is the measured value in metres multiplied by 10.
CommandRequest frame
Single-shot ranging55 AA 88 FF FF FF FF 84
Continuous ranging55 AA 89 FF FF FF FF 85
Stop ranging55 AA 8E FF FF FF FF 8A
Angle measurement55 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​

pip install erdi-lrf # PyPI, MIT
erdi-lrf --port /dev/ttyUSB0 --model LR1200E2 measure
from erdi_lrf import ErdiLRF

with ErdiLRF("/dev/ttyUSB0", "LR1200E2") as lrf: # COM3 on Windows
r = lrf.measure() # single-shot (0x88)
print(f"{r.metres:.3f} m", "raw", r.raw)

Platform status​

Only rows with evidence say Verified. See the compatibility matrix for what that means and where the evidence is.

PlatformStatusGuide
Python (erdi-lrf)UntestedPython / Raspberry Pi / Jetson
Arduino / PlatformIOUntestedArduino / PlatformIO
ESPHome / Home AssistantUntestedESPHome
ROS 2UntestedROS 2
ArduPilot (Lua script)UntestedArduPilot
ArduPilot native driverNo driver yetArduPilot

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​