There are two ways for communication between a Pixhawk 5 and a Raspberry pi 4B+:
- through serial ports
- through USB ports
There are also different methods to power Raspberry Pi:
- through battery and BEC
- through autopilot (not tested)
Let us have a look at all the ports provided by Pixhawk 5.
Pixhawk ports Therefore, we will use Telem 2 as the port for Raspberry Pi.The details of Telem 2 is shown by the figure below
Pins of Tele 2 portPins in red and black can be indentified by using cables with Pixhawk. Here is an example.
Pixhawk ports Pixhawk portsWe need to make a wire to connect them like the way below
Pixhawk 5x - Raspberry PiSome parameters are needed to be modified to enable serial communication between Pixhawk and Raspberry Pi.
Here are the list
- MAV_2_CONFIG = TELEM 2
- MAV_2_MODE = Onboard
- MAV_2_RATE= 80000 Bytes/s
- MAV_2_FORWARD = True
- SER_TEL2_BAUD = 921600 baud