Skip to main content
Explore ERDILRF

Press ↑↓ to move, Enter to open, Esc to close.

Connect a UART Laser Rangefinder to Pixhawk/ArduPilot

Explore knowledge

Short answer: ArduPilot’s official rangefinder list checked on 5 October 2026 does not name an ERDI driver. Do not assume direct compatibility from the UART connector. Two documented custom integration routes are MAVLink (RNGFND1_TYPE = 10) and Lua scripting (RNGFND1_TYPE = 36), where supported by the installed firmware and hardware. Each still needs an exact-model decoder and integration validation; this article is not a tested flight setup.

Check the installed firmware before choosing a route

The official rangefinder list checked on 5 October 2026 does not name ERDI. It also warns that some drivers are omitted from standard firmware builds. Check the installed firmware’s features and documentation rather than treating a documentation list as proof of compatibility. ERDI protocols differ by exact model: for example, LRF50H uses a 4-byte 5C frame, while LRF1500H uses a 5-byte 5C frame with a 3-byte distance field. The LRF1500H source also contains a checksum-example conflict; do not copy a four-byte decoder to that model.

The official parameter list, checked on 5 October 2026, lists 10 as MAVLink and 36 as Lua_Scripting for RNGFND1_TYPE. Confirm that the selected backend and any required scripting support are present in your actual build.

Path A: MAVLink bridge via a companion microcontroller

This is one integration architecture if you already have a companion computer or a spare microcontroller (STM32, ESP32, Raspberry Pi Pico, Arduino-class board) in the build. The bridge board talks to the ERDILRF module on one UART, decodes the frame in software, and republishes a MAVLink DISTANCE_SENSOR message to the flight controller on a second UART (or over the same MAVLink stream the companion computer already uses).

  • Read the ERDILRF frame. Start from the current Drivers & Integration resources. Read the exact model’s supported commands, units and known gaps before using a library. A repository entry is not evidence that the delivered module and flight-controller combination has been tested.
  • Send DISTANCE_SENSOR. Map only validated readings into the message. Check the current message definition, units and field limits, and distinguish unavailable or stale data from a valid distance. Validate the bridge cadence and handling on the bench before enabling a control function.
  • On the flight controller side, the current documented MAVLink type is RNGFND1_TYPE = 10. Set orientation to the actual mounting direction; the current list identifies 25 as Down. The current minimum and maximum parameters are RNGFND1_MIN and RNGFND1_MAX, in metres. Use limits reliably demonstrated for the installation and match the parameter names and units to the installed firmware; do not copy a catalog maximum directly into the flight configuration.

Path B: Lua scripting driver on the flight controller

If your autopilot supports Lua scripting and you have a spare UART, you can skip the companion board entirely: a script running on the flight controller reads the ERDILRF module directly and reports the distance to ArduPilot’s rangefinder backend with RNGFND1_TYPE = 36. This keeps the whole integration on one board, at the cost of writing (or porting) the frame decoder in Lua rather than Python or C++.

The driver resources and known gaps can inform a model-specific decoder. Keep protocol facts separate from configuration assumptions:

  • Use the exact model’s frame definition. LR2000E2 and LRF3000A1 document 8-byte 55 AA frames. Confirm the requested command and response format in the delivered unit’s documentation.
  • Confirm the checksum scope for each direction. Do not transfer one model’s command or response rule to another. LRF3000A1 explicitly notes that sending and receiving verification content may differ; retain that source limitation and the driver’s applicable restrictions.

For the two documented 4-byte examples, LRF50H uses centimetres and LRF22VB uses millimetres. LRF1500H instead has a 5-byte frame and a 3-byte distance field. Keep the exact model, frame length, unit and source conflicts together in the decoder; a shared 5C header does not establish interchangeable parsing.

Wiring and baud rate

Check supply voltage, signal voltage and enable control separately before connecting to a flight controller. LRF1200A1 documents UART TTL 3.3 V. LRF3000A1 also explicitly documents TTL 3.3 V on its TX and RX pins. Where the exact model’s source does not specify the signal limits, do not infer them from the supply range. Obtain the missing requirement and confirm compatibility with the host before selecting a connection or interface circuit. Confirm connector orientation, enable polarity and the delivered configuration from the applicable manual.

Choose the baud rate from the exact model and delivered configuration, not a protocol-family label. SPD1200D03 is a documented conflict: its protocol section lists 115200 bps, while its technical table lists 15200 bps (factory) / 9600 bps. Do not select one until the delivered unit configuration is confirmed. Configure the sensor UART and the separate companion-to-controller link for their own endpoints; they need not use the same baud rate.

Documents to review for a candidate integration

Exact modelIntegration checks before selection
LR1000E2Confirm the delivered enable configuration and electrical limits; do not choose a GPIO polarity from an example.
LR2000E2Review the current manual, measurement conditions and required reporting behavior for the installation.
LRF3000A1Keep the source-defined ranging conditions and command/reply verification limitation in the evaluation.
LRF200HConfirm the electrical interface and actual output behavior at the selected rate before sizing the bridge.

These are starting points for document review, not recommendations for altitude control or proof of suitability for a particular aircraft. Use the current exact-model documents and a defined acceptance test for the intended conditions.

Frequently Asked Questions

Does ArduPilot support ERDILRF laser rangefinders natively?

The official list checked on 5 October 2026 does not name an ERDI driver. Do not assume compatibility. Check the installed build and evaluate a model-specific MAVLink or Lua integration where supported.

Which RNGFND1_TYPE value should I use for a custom serial protocol?

The official parameter list checked on 5 October 2026 lists 10 as MAVLink and 36 as Lua_Scripting. The appropriate route depends on the installed firmware, hardware and a validated exact-model decoder.

What baud rate does an ERDILRF rangefinder module use?

Use the exact model and delivered configuration. SPD1200D03 has a source conflict: 115200 bps in the protocol section versus 15200 bps (factory) / 9600 bps in the technical table. Confirm the delivered configuration instead of applying one family-wide default.

Do I need to reboot the flight controller after setting RNGFND1_TYPE?

The current official parameter list marks RNGFND1_TYPE as requiring a reboot after a change. Follow the documentation for the installed firmware and verify the configured backend on the bench.

Which ERDILRF model should I pick for altitude hold versus terrain following?

The model cannot be chosen from a catalog range alone. Review the actual target, reflectivity, operating conditions, timing, electrical interface and host integration, then validate a candidate against the project acceptance criteria.

Get help wiring your specific build

Tell us the exact module, manual revision, flight-controller hardware and firmware, available interface and intended conditions. Request a technical integration review or email tommy@erdimail.com. For the preliminary checks, see the UART integration guide and current driver resources.

ERDI TECH LTD · 905 nm laser rangefinder modules · tommy@erdimail.com · WhatsApp +86 133 0819 5790 · erdilrf.com