PX4-based systems use sensors to determine vehicle state (needed for stabilization and to enable autonomous control). The vehicle states include: position/altitude, heading, speed, airspeed, orientation (attitude), rates of rotation in different directions, battery level, etc.
The system minimally requires a gyroscope, accelerometer, magnetometer (compass) and barometer. A GPS or other positioning system is needed to enable all automatic modes, and some assisted modes. Fixed wing and VTOL-vehicles should additionally include an airspeed sensor (very highly recommended).
The minimal set of sensors is incorporated into Pixhawk Series flight controllers (and may also be in other controller platforms). Additional/external sensors can be attached to the controller.
Below we describe some of the sensors. At the end there are links to information about sensor wiring.
Many types of GPS can be used with PX4. When using Pixhawk-series flight controllers we recommend using a combined GPS + Compass.
The Pixhawk internal compass is close to other electronics, and may be susceptible to electromagnetic noise. An external compass/GPS mounted on a pedestal or wing (for fixed-wing) away from the rest of the system is recommended.
Some options include:
- Ublox Neo-M8N GPS with Compass (Hobbyking)
- mRo GPS u-Blox Neo-M8N Dual Compass LIS3MDL+ IST8310 (mRo store)
- Drotek uBlox GPS/Compasses (drotek)
- Holybro Micro M8N GPS Module (getfpv)
- Holybro Ublox NEO-M8N GPS Module (getfpv)
- Here GNSS GPS (M8N) (getfpv)
- 3DR uBlox GPS with Compass kit (www.getfpv.com) - Discontinued
Pay attention to pinout when connecting the GPS module. While these are all compatible, there are several different pin orderings.
Airspeed sensors are highly recommended for fixed-wing and VTOL frames.
They are so important because the autopilot does not have other means to detect stall. For fixed-wing flight it is the airspeed that guarantees lift not ground speed!
Recommended digital airspeed sensors include:
- mRo I2C Airspeed Sensor JST-GH MS4525DO (mRo store)
Distance sensors are used for precision landing, object avoidance and terrain following.
PX4 supports many affordable distance sensors, using different technologies, and supporting different ranges and features. For more information see: Rangerfinders.
PX4Flow (pixhawk.org) is an optical flow smart camera that can track motion, and has as integrated sonar sensor. PX4 blends the sensor output with information from other position sources (e.g. GPS) to provide a more accurate position lock. This sensor can be used indoors, when no GPS signal is available.
Some options include:
- 3DR PX4Flow Smart Camera (Optical Flow Sensor) (unmannedtechshop)
- HK Pilot32 Optical Flow Kit With Sonar (Hobbyking) - Software-compatible, but not connector-compatible.
Sensor wiring information is usually provided in manufacturer documentation for flight controllers and the sensors themselves.
In addition, see: