Skip to content

This project uses cheap sonars, they can be used in autopilots.

Notifications You must be signed in to change notification settings

AlksSAV/Sonar-to-i2c-NMEA-

Repository files navigation

Sonar to: NMEA, MAVLINK

The sensors shown below can be used to determine depth and obstacles. The MAVLINK protocol is used to detect obstacles, and NMEA is used to determine the depth. This repository has full descriptions with

Supported sonar models:

  • L041MTW
  • L042MTW
  • GL041MT
  • GL042MT

Screenshot


Circuit diagram:

The sensor can be connected to any available serial port on the autopilot.

Screenshot

ARDUPILOT SETUP:

Data from the sensor can be received using two protocols: NMEA and MAVLINK. Based on the protocol, you need to select the desired configuration options.


  • NMEA:

SERIAL2_PROTOCOL = 9 (Lidar)

SERIAL2_BAUD = 115 (115200 baud)

RNGFND1_TYPE = 17 (NMEA)

RNGFND1_MIN_CM = 5

RNGFND1_MAX_CM = 600 (i.e. 6m). This is the distance in centimeters that the rangefinder can reliably read.

RNGFND1_ORIENT = 25 (i.e. down)

  • MAVLINK:

SERIAL2_PROTOCOL = 9 (Lidar)

SERIAL2_BAUD = 115 (115200 baud)

RNGFND1_TYPE = 10 (MAVLINK)

RNGFND1_ORIENT = 25 (i.e. down)

RNGFND1_ADDR = 1


About

This project uses cheap sonars, they can be used in autopilots.

Resources

Stars

Watchers

Forks