5. Wring and connect Pixhawk to Raspberry Pi

Connect Pixhawk
to Raspberry Pi

How to send data between the flight controller to companion computer?

In our case, we need to send data between Pixhawh to Raspberry Pi.

  1. Hardware level, wiring the cable
  2. Software level, set up the Mavlink connection


Connect Pixhawk to Raspberry Pi as the diagram below. I suggest connecting 5V power source from a BEC board, not from Pixhawk TELEM port. When you connect the 4G USB modem and camera to the Raspberry Pi, the Pixhawk can’t provide enough current to them. The Raspberry Pi will be force restart.

Pixhawk to Raspberry Pi wiring
Pixracer to Raspberry Pi wiring

Setup the MAVlink Port

We need to tell the flight controller to send the MAVlink data to the connected port. I use QGroundControl to change the parameters.

If you are using TELEM 1, the default setting is fine.

# PX4 parameters:

MAV_0_MODE = Normal
MAV_0_RATE= 1200 Bytes/s
SER_TEL1_BAUD = 57600 baud

Next: 6. Install and setup mavlink-router

Welcome your comments