Pixhawk: Ultrasonic Sensor Setup Guide

Interfacing an Ultrasonic Sensor with a Pixhawk or Ardupilot Mega [Tutorials] - MaxBotix
We’ve written quite a bit about how to use our sensors with Arduino and Raspberry Pi. There are other microcontrollers to consider when developing your application. Other popular microcontrollers include the Pixhawk and the Ardupilot Mega (APM). The Pixhawk is an independent, open-hardware project aiming at providing high-end autopilot hardware to the academic, hobby, and industrial communities at low costs and high availability.The Ardupilot.co.uk describes the APM as an autopilot used to control fixed-wing aircraft, multi-rotor copters, and traditional helicopters. The Ardupilot is primarily used for collision avoidance. While we are aware of the large culture of UAV / Drone pilots, we have not tested these particular controllers in-house. Yet, we often get questions about how you would connect our sensors in these particular applications We want to provide you with a few places online with a great community of other programmers and UAV enthusiasts that have insight on using our sensors in these applications. Top resources to find more information:

1. Analog Sonar (AC3.1)

Our MaxSonar line of sensors is supported by Copter in a “Terrain Following” application for UAVs. In this particular tutorial, you learn these key points for your UAV build. 
  1. Supported Sonars - Our recommended sonars for multicopter use include the MaxSonar.
  2. How to build a cable that reduces sonar noise
  3. How to connect the sonar sensor on the APM2.x
  4. How to connect the sonar sensor on the PX4
  5. How to mount the sonar sensor
  6. How to enable the sonar through Planner (Ground Control Station)
  7. How to test the sonar and tune the gain
  8. Review how the sensor works in cold weather
  9. What else is causing sonar noise?

2. Analog Sonar - Copter3.2| Ultrasonic Sensor with a Pixhawk or APM2.x Connection

Our XL-MaxBotix-EZ line of analog sensors (MB1200, MB1040, and MB1260) are designed for indoor use but have successfully been used in outdoor applications on Copter. These maxbotix ultrasonic sensors offer reliable performance in various environments.
Disclaimer: Protected use (indoor) sensors are not designed for use in outdoor environments, or environments that will see chemicals/fumes or dust and moisture. Any moisture or environmental damage from placing the sensor in an unprotected environment will void the manufacturer's warranty.
This tutorial demonstrates the process of connecting to the Pixhawk, image source: http://ardupilot.org/copter/docs/common-rangefinder-maxbotix-analog.html Connecting to the APM2.x with setup through the mission planner, and testing the sensor in the application.

Multicopter with APM Video Test

Test Features

3. I2CXL-MaxSonar-EZ4 - Ultrasonic Sensor Pixhawk connection

Our MB1242 is an indoor sensor that has been successfully used outdoors on Copter.
Disclaimer: Protected use (indoor) sensors are not designed for use in outdoor environments, or environments that will see chemicals/fumes or dust and moisture. Any moisture or environmental damage from placing the sensor in an unprotected environment will void the manufacturer's warranty.
This brief tutorial shows:
  1. How to connect your ultrasonic sensor with a Pixhawk
  2. How to set up your sensor through the Mission Planner
  3. How to test the sensor in the application.

Smart Drone Presentation - Using a MaxBotix Ultrasonic Sensor with a Pixhawk

Review this presentation to see how a smart drone was created using the Pixhawk and using our sensors as the foundation of the Collision Avoidance System. This pixhawk flight controller setup is integral for enhancing drone capabilities.
QUIN 4.0 - Smart Drone - Final Presentation from Ali Ghani Syed

Conclusion

Review our tutorial on how our MaxSonar operates in a Multicopter for basic troubleshooting advice for your UAV sensor application. - MaxSonar Operation on a Multicopter Make sure to review the tutorials on ArduPilot with specific instructions on using our ultrasonic sensors with a Pixhawk and APM. Do you have any more questions about using MaxBotix Sensors in your UAV application? We offer Free Sensor Selection Help, Click the button below to get started.

Our Recommended Sensors for Multicopter Use:

Back to blog

Let's connect on your project!