Maxbotic I2C Sonar Rangefinder¶
Maxbotic I2C EZ4 sonar (also known as the I2CXL-MaxSonar-EZ4 or MB1242) is a relatively inexpensive, short range (up to 7m) range finder primarily designed for indoor use but which has been successfully used outdoors on Copter.
The EZ4 (recommended) has the narrowest beam providing the best noise resistance while the EZ0 has the widest beam and highest sensitivity. The datasheet can be found here. Additional information on the similar analog version of this sonar can be found here.
This rangefinder is only supported on the Pixhawk running AC3.2 or higher or recent versions of Plane and Rover.
Connecting to the Pixhawk¶
The sonar should be connected to the Pixhawk’s I2C port as shown below or alternatively through an I2C expansion board. The Pixhawk will provide the regulated 5V power supply the sensor requires.
Setup through the mission planner¶
To configure Copter, Plane or Rover to use the Maxbotix I2C, please first connect with the Mission Planner and then open the Config/Tuning >> Full Parameter List page and set the following parameters:
- RNGFND_MAX_CM = “700” (i.e. 7m max range)
- RNGFND_TYPE = “2” (MaxbotixI2C sonar)
Testing the sensor¶
Distances read by the sensor can be seen in the Mission Planner’s Flight Data screen’s Status tab. Look closely for “sonarrange”.