Skip to content

AscendNTNU/voxl-pwm-controller

Repository files navigation

PWM

Using UART outputs from expansion board M0141 to control Voxl2-IO (M0065) to output PWM signal is non-standard.

This project simply lets you control PWM on voxl2-IO from any UART port on the Voxl2.

Build and run

Step 1: Wire everything correctly.

Step 2: (on the Voxl):

make
./voxl-pwm

Settings and caveats

Currently, the UART device /dev/ttyHS1 (APPS_HS1_UART) is used, which is the one exposed on the M0141 expansion board.

The duty cycle is controlled with the input to voxl2_io_create_pwm_packet4, currently set to PWM_OUTPUT = 400.

The range of valid values is $[0, 800]$ afaik.

The code is hard-coded to use UART channel 1. It is obvious from the code how to control channels 1-4, but I don't know about 5-8 ... I didn't get the hires pwm packet to work.

Our M0065 board reports FW version 1, but the PX4 driver requires it to be 2, which is interesting. Doesn't seem matter for our use case tho.

About

Control pwm output over UART from Voxl2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published