Difference between revisions of "Pixhawk"

From PaparazziUAV
Jump to navigation Jump to search
(Spelling errors)
Line 3: Line 3:
=Paparazzi on Pixhawk=
=Paparazzi on Pixhawk=


The Pixhawk is an open hardware autopilot that was originally developed by ETZ in the [https://pixhawk.ethz.ch/ PIXHAWK project]. Paparazzi now supports the Pixhawk and the firmware can be uploaded through the orignal PX4 custom bootloader, which happens directly through the usb port of the Pixhawk. This means that it is possible to easily switch between the Paparazzi AP and other projects that support the Pixhawk hardware (i.e. PX4 and APM).  
The Pixhawk is an open hardware autopilot that was originally developed by ETHZ in the [https://pixhawk.ethz.ch/ PIXHAWK project]. Paparazzi now supports the Pixhawk and the firmware can be uploaded through the orignal PX4 custom bootloader, which happens directly through the USB port of the Pixhawk. This means that it is possible to easily switch between the Paparazzi AP and other projects that support the Pixhawk hardware (i.e. PX4 and APM).  


It is also possible to directly upload to the Pixhawk by means of the JTAG port, but this is not recommended as it involves soldering and permanently removes the PX4 bootloader (which means reverting to PX4 or APM firmware is complicated). Therefor, this wiki focuses on flashing through the PX4 bootloader.
It is also possible to directly upload to the Pixhawk by means of the JTAG port, but this is not recommended as it involves soldering and permanently removes the PX4 bootloader (which means reverting to PX4 or APM firmware is complicated). Therefor, this wiki focuses on flashing through the PX4 bootloader.
Line 11: Line 11:
This page is intended as a guide of how to get the Paparazzi autopilot running on a Pixhawk board. For the specifications and pin-out details we recommend to look at the [https://pixhawk.org/modules/pixhawk Pixhawk site].
This page is intended as a guide of how to get the Paparazzi autopilot running on a Pixhawk board. For the specifications and pin-out details we recommend to look at the [https://pixhawk.org/modules/pixhawk Pixhawk site].


The Pixhawk consists of the PX4IO (designed around a stm32f1) and the PX4FMU (designed around a stm32f4), which are glued together in one pcb. Uploading of the autopilot (which runs only on the PX4FMU) happens directly from computer over USB to the PX4FMU, by means of the PX4 bootloader. In the original PX4 and APM Pixhawk software, the compiled PX4IO code (which runs the Fly By Wire) is embedded with the PX4FMU code, and the PX4FMU code would flash the PX4IO board at startup. But, in paparazzi, the PX4IO is flashed from the computer --> USB -> PX4FMU --> internal UART --> PX4IO, directly from Paparazzi Center. This means PX4IO board can be flashed without changing the autopilot, and vice versa.
The Pixhawk consists of the PX4IO (designed around a stm32f1) and the PX4FMU (designed around a stm32f4), which are glued together in one pcb. Uploading of the autopilot (which runs only on the PX4FMU) happens directly from computer over USB to the PX4FMU, by means of the PX4 bootloader. In the original PX4 and APM Pixhawk software, the compiled PX4IO code (which runs the Fly By Wire) is embedded with the PX4FMU code, and the PX4FMU code would flash the PX4IO board at startup. But, in Paparazzi, the PX4IO is flashed from the computer --> USB -> PX4FMU --> internal UART --> PX4IO, directly from Paparazzi Center. This means PX4IO board can be flashed without changing the autopilot, and vice versa.


=Features=
=Features=
The features that are currently supported by Paparazzi are the following:
The features that are currently supported by Paparazzi are the following:
*The dual processor setup (main stm32f4 and co stm32f1 processor), in a AP (AutoPilot) + FBW (Fly By Wire)
*The dual processor setup (main stm32f4 and co stm32f1 processor), in a AP (AutoPilot) + FBW (Fly By Wire)
*Dual IMU (selectable from airframe config)
*Dual IMU (selectable from airframe config)
**MPU6050, 3axis acc + gyro + magneto
**MPU6050, 3axis acc + gyro + magneto
**LSM303 3 axis acc + magneto, L3G 3 axis gyro
**LSM303 3-axis acc + magneto, L3G 3-axis gyro
*External GPS + Magneto
*External GPS + Magneto
*8+6 pwm outputs (8 on FBW, 6 on AP)
*8+6 pwm outputs (8 on FBW, 6 on AP)
Line 38: Line 38:


*1. Define your aircraft and settings for the Pixhawk (e.g. see the Iris airframe )
*1. Define your aircraft and settings for the Pixhawk (e.g. see the Iris airframe )
*2. Connect the Pixhawk via USB to your computer, and upload the firmware
*2. Connect the Pixhawk via USB to your computer, and upload the AP firmware
*3. Replug the usb, and upload the FBW code. Replug usb again.
*3. Replug the USB, and upload the FBW code. Replug USB again.


Details on steps 2 and 3 can be found below.
Details on steps 2 and 3 can be found below.
Line 49: Line 49:
[[File:Upload FBW.jpg|thumb|Figure 5; flashing the FBW]]
[[File:Upload FBW.jpg|thumb|Figure 5; flashing the FBW]]


In order to flash the Pixhawk, both the AP (autopilot on the PX4FMU)  and the FNW (Fly By Wire on the PX4IO) have to be flashed. Paparazzi uses the default PX4 bootloader to upload and flash the code in both systems, but the FBW is flashed through the AP. This means that at least for the first time, the AP has to be flashed first.
In order to flash the Pixhawk, both the AP (AutoPilot on the PX4FMU)  and the FBW (Fly By Wire on the PX4IO) have to be flashed. Paparazzi uses the default PX4 bootloader to upload and flash the code in both systems, but the FBW is flashed through the AP. This means that at least for the first time, the AP has to be flashed with Paparazzi first.


To flash the AP, select your aircraft (1), select the AP (2), and click the build button (3). After the compilation was completed successfully (4), plug in the USB cable to computer and the Pixhawk, and click upload (5). You should see "upload successful" (6). See figure 2 and 3.
To flash the AP, select your aircraft (1), select the AP (2), and click the build button (3). After the compilation was completed successfully (4), plug in the USB cable to computer and the Pixhawk, and after 5 seconds click upload (5). You should see "upload successful" (6). See figure 2 and 3.


To flash the FBW, select FBW (7) and click the build button (8). After the compilation was completed successfully (9), plug in the USB cable to computer and the Pixhawk, and click upload (10). You should see "upload successful" (11).  
To flash the FBW, select FBW (7) and click the build button (8). After the compilation was completed successfully (9), plug in the USB cable to computer and the Pixhawk, and after 5 seconds click upload (10). You should see "upload successful" (11).  


Note: After flashing the FBW, it is required to re-power the Pixhawk. Secondly, the flashing of the FBW is disabled 20 seconds after power up. Re-power to reset the time.  
Note: After flashing the FBW, it is required to re-power the Pixhawk. Secondly, the flashing of the FBW is disabled 20 seconds after power up. Re-power to reset the time.  


[[File:Upload problems.jpg|thumb|Figure 6; upload problems]]
[[File:Upload problems.jpg|thumb|Figure 6; upload problems]]
In case of problems such as in figure 6, most of the time it can be solved by re-powering the Pixhawk (e.g. re-plugging the USB, and removing the battery), wait for 5 seconds for the computer to recognize the usb device, and click the upload button again.
In case of problems such as in figure 6, most of the time it can be solved by re-powering the Pixhawk (e.g. re-plugging the USB, and removing the battery), wait for 5 seconds for the computer to recognize the USB device, and click the upload button again.




Line 68: Line 68:


<br style="clear:both">
<br style="clear:both">
=External links=

Revision as of 04:14, 2 December 2016

Pixhawk 1 v2.4

Paparazzi on Pixhawk

The Pixhawk is an open hardware autopilot that was originally developed by ETHZ in the PIXHAWK project. Paparazzi now supports the Pixhawk and the firmware can be uploaded through the orignal PX4 custom bootloader, which happens directly through the USB port of the Pixhawk. This means that it is possible to easily switch between the Paparazzi AP and other projects that support the Pixhawk hardware (i.e. PX4 and APM).

It is also possible to directly upload to the Pixhawk by means of the JTAG port, but this is not recommended as it involves soldering and permanently removes the PX4 bootloader (which means reverting to PX4 or APM firmware is complicated). Therefor, this wiki focuses on flashing through the PX4 bootloader.

Intro

This page is intended as a guide of how to get the Paparazzi autopilot running on a Pixhawk board. For the specifications and pin-out details we recommend to look at the Pixhawk site.

The Pixhawk consists of the PX4IO (designed around a stm32f1) and the PX4FMU (designed around a stm32f4), which are glued together in one pcb. Uploading of the autopilot (which runs only on the PX4FMU) happens directly from computer over USB to the PX4FMU, by means of the PX4 bootloader. In the original PX4 and APM Pixhawk software, the compiled PX4IO code (which runs the Fly By Wire) is embedded with the PX4FMU code, and the PX4FMU code would flash the PX4IO board at startup. But, in Paparazzi, the PX4IO is flashed from the computer --> USB -> PX4FMU --> internal UART --> PX4IO, directly from Paparazzi Center. This means PX4IO board can be flashed without changing the autopilot, and vice versa.

Features

The features that are currently supported by Paparazzi are the following:

  • The dual processor setup (main stm32f4 and co stm32f1 processor), in a AP (AutoPilot) + FBW (Fly By Wire)
  • Dual IMU (selectable from airframe config)
    • MPU6050, 3axis acc + gyro + magneto
    • LSM303 3-axis acc + magneto, L3G 3-axis gyro
  • External GPS + Magneto
  • 8+6 pwm outputs (8 on FBW, 6 on AP)
  • Arm button led denotes mode info
  • Spektrum RC, including binding through software
  • PPM RC

The features that are not yet supported by Paparazzi are the following:

  • The multicolor led
  • The buzzer
  • The on-board arm button
  • The SD card SDIO
  • SBus out, RC downlink (e.g. gps info, battery info)

Getting started

In short, the steps you'll need to run through are roughly the following:

  • 1. Define your aircraft and settings for the Pixhawk (e.g. see the Iris airframe )
  • 2. Connect the Pixhawk via USB to your computer, and upload the AP firmware
  • 3. Replug the USB, and upload the FBW code. Replug USB again.

Details on steps 2 and 3 can be found below.

Flashing

Figure 2; building the AP
Figure 3; flashing the AP
Figure 4; building the FBW
Figure 5; flashing the FBW

In order to flash the Pixhawk, both the AP (AutoPilot on the PX4FMU) and the FBW (Fly By Wire on the PX4IO) have to be flashed. Paparazzi uses the default PX4 bootloader to upload and flash the code in both systems, but the FBW is flashed through the AP. This means that at least for the first time, the AP has to be flashed with Paparazzi first.

To flash the AP, select your aircraft (1), select the AP (2), and click the build button (3). After the compilation was completed successfully (4), plug in the USB cable to computer and the Pixhawk, and after 5 seconds click upload (5). You should see "upload successful" (6). See figure 2 and 3.

To flash the FBW, select FBW (7) and click the build button (8). After the compilation was completed successfully (9), plug in the USB cable to computer and the Pixhawk, and after 5 seconds click upload (10). You should see "upload successful" (11).

Note: After flashing the FBW, it is required to re-power the Pixhawk. Secondly, the flashing of the FBW is disabled 20 seconds after power up. Re-power to reset the time.

Figure 6; upload problems

In case of problems such as in figure 6, most of the time it can be solved by re-powering the Pixhawk (e.g. re-plugging the USB, and removing the battery), wait for 5 seconds for the computer to recognize the USB device, and click the upload button again.


Whether the current code is APM, PX4 or Paparazzi, the flashing steps remain the same.

Videos

Paparazzi UAV Pixhawk support teaser - Video by the TU Delft MAVLab