PX4 PWM Output
Configure PWM outputs for servo motors and ESC control
PX4 PWM Output will be removed in a future release. For more information, see Version History.
Add-On Required: This feature requires the UAV Toolbox Support Package for PX4 Autopilots add-on.
Libraries:
UAV Toolbox Support Package for PX4 Autopilots /
PX4 Utility Blocks
Description
The PX4 PWM Output block helps you to configure the PWM output from the PX4® flight controller board. The block accepts time value (in microseconds) that represents the ON period of PWM signal for a particular channel, and passes the same to the corresponding PWM channels on the board.
The PX4 PWM Output block also accepts signals for arming the flight controller.
During Connected I/O simulation, this block writes data to the peripherals of the hardware.
During Connected I/O simulation, this block writes data to the peripherals of the hardware.
Configure Actuators
For Firmware version 1.14, the PWM & AUX pins need to be configured in QGroundControl before the PWM Output block can be used in Simulink. To do this, QGroundControl version 4.2.3 is needed which can be downloaded from this location.
Note
Configuring the actuators is not required for Hardware-in-the-loop or PX4 Host Target simulations.
To configure the actuators, perform these steps.
Perform the Hardware setup process for your Autopilot.
Launch QGroundControl 4.2.8 (QGC) and allow it connect to your Autopilot.
Once QGC is connected, go to Vehicle Setup -> Actuators tab.
Assign the following sequence of Motors against each Main Channel.
It is recommended to change the Minimum PWM value of each channel to 1000 and Maximum PWM value to 2000.
Assign the following sequence of Motors against each AUX Channel.