Skip to content

Latest commit

 

History

History
65 lines (52 loc) · 2.15 KB

4_Experiment_Communication_Pi_Pixhawk.md

File metadata and controls

65 lines (52 loc) · 2.15 KB

Communication between Raspberry Pi 4B+ and Pixhawk 5.

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)

1 Communication through serial ports of Raspberry Pi

1.1 Connect Raspberry Pi and Pixhawk 5

Let us have a look at all the ports provided by Pixhawk 5.

drawing

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

drawing

Pins of Tele 2 port

Pins in red and black can be indentified by using cables with Pixhawk. Here is an example.

drawing

Pixhawk ports

drawing

Pixhawk ports

We need to make a wire to connect them like the way below

drawing

Pixhawk 5x - Raspberry Pi

1.2 Set parameters on PX4

Some 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

2 Communication through USB ports of Raspberry Pi

https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#power-supply