PX4 BeagleBone-based quad

This article shows a PX4 BeagleBone-based quad

Hardware

  • Radiomaster Pocket Radio Controller (M2)

  • Radiomaster RP3 V2 ExpressLRS 2.4ghz Nano Receiver

  • Matek Systems GNSS & Compass, M10Q-5883

  • BeagleBone Blue

  • 4x BLHeli Series 12A ESC

  • 2x MT2205II 2300KV Brushless Motor CW

  • 2x MT2205II 2300KV Brushless Motor CCW

  • FT VersaCopter v2.0

Software

  • Express LRS Configurator

  • balenaEtcher

  • Windows Subsystem for Linux (WSL)

  • Compiled PX4 v1.15.0 under WSL using the Arm GNU Toolchain

  • BeagleBone software image (bone-debian-10.3-console-armhf-2020-04-06-1gb.img.xz)

  • Arm GNU Toolchain (gcc-arm-8.3-2019.02-x86_64-arm-linux-gnueabihf.tar.xz)

The Radiomaster Pocket Radio Controller (M2) and RP3 V2 ExpressLRS 2.4ghz Nano Receiver must be updated to ExpressLRS 3.5.2 firmware (the latest at the time of writing this article). The receiver's serial protocol must be set to SBUS.

Using Windows Subsystem for Linux (WSL), the latest stable PX4 release must be cloned (v1.15.0 at the time of writing this article). Before compiling, the default.px4board file in boards/beaglebone/blue folder must be modified to include the following lines:

CONFIG_BOARD_SERIAL_GPS1="/dev/ttyS2"
CONFIG_BOARD_SERIAL_TEL1="/dev/ttyS1"
CONFIG_BOARD_SERIAL_TEL2="/dev/ttyS5"
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
CONFIG_DRIVERS_MAGNETOMETER_QMC5883L=y
CONFIG_DRIVERS_RC_CRSF_RC=y

In addition, the CONFIG_BOARD_TESTING must be set to n.

Two CPP files must also be modified - the CrsfRc.cpp file in src/drivers/rc/crsf_rc folder and the board_pwm_out.cpp in the boards/beaglebone/blue/src folder. The #define CRSF_BAUDRATE in CrsfRc.cpp must be changed from 420000 to 460800. If left unchanged, the csrf_rc driver would not start properly. In board_pwm_out.cpp in the BBBlueRcPWMOut::send_output_pwm function an additional line must be added before the return:

 rc_usleep(1000000/50);

This makes sure that the PWM signal frequency is approximately 50 Hz.

Once the above changes are made, PX4 can be compiled for the BeageBone Blue board with the following command:

make beagebone_blue_default

For more information on how to upload the compiled PX4 binaries please refer to:

Wiring

Below is a wiring diagram showing the UART and I2C connections to the M10Q-5883 GNSS & Compass and the UART connection to the Radiomaster RP3 V2 ExpressLRS 2.4ghz Nano receiver. The BLHeli Series 12A ESCs are connected to the BeagleBone Blue board via servo 1 to 4 outputs. Only the signal and ground wires are connected to the servo outputs, as the 12V DC power connector powers the board.

Last updated