Weather in the Netherlands improved last week, so I decided to fly my quad/camera. Using a fresh install of stable 3.1.2, I noticed my old-fashion servo-based gimbal doesn’t react any more. Only the pitch servo gets a kind of pulse-train once every second (attached). I tried other versions using firmwares from firmware.diydrones.com/Copter and found out that version 2013-12/2013-12-31-01:12 is the last one where everything worked fine. The version after that installs new firmware on the PX4IO and the servos are not fed any more with the well-known 50Hz PWM signal, but the aforementioned signal on the pitch servo and a constant high level on the roll servo. I´m using exactly the same settings while testing all different versions.
Any one else suffers from this issue ?
- signal-ok*.png: version 2013-12/2013-12-31-01:12
- wrong-signal*.png: version after 2013-12/2013-12-31-01:12, notice signals differ
- ff2.param : my settings
Did some further investigation and found the comment on the “faulty” commit is: px4: enable dual telemetry by default on FMUv1. Reading in PX4Firmware/Build/px4fmu-v1_APM.build/romfs_scratch/init.d/rc.APM gives the solution:
To enable PWM on FMUv1 on ttyS1 add a /fs/microsd/APM/AUXPWM.en file
I’m going to try this on fw 3.1.2 but I’m almost sure this solves my problem (actually no problem but a feature). Maybe this was announced somewhere but I guess I just missed it.
Update, the story continues…
Indeed creating the file on the SD-card makes the servo’s move again, but the last commit it is working in is 3e8e02e9e83a3a39df88922d2e1fa245e2cd8d60.
From commit 0b7e96b5285657725aeb69df206fd3194b9cf62c and later, only the roll servo works, pitch is not fed with pulses, it’s like the ouput is not initialized.
There’s some new code introduced between the two commits, like:
- 99b41f110ffc634cae34c28329029a7f31a2fa2a : HAL_PX4: enable the FMU PWM pins to be used as GPIO when needed
- b5822cd549f08186984990013bfca5c70b6fbbf9 : AP_BoardConfig: board specific config library used to control board specific parameters, such as PWM output count
Might have something to do with those…
Developers, maybe it’s also fine if I create a bug-report in github.com/diydrones/ardupilot/issues ?
I found a solution (or better temporary work-around) to this issue. Setting the parameter BRD_PWM_COUNT to 4 in MP makes output 11 initialize as PWM output and drive the pitch servo the way it should. I’m using 3.1.2-rc2 now.
I’m not sure yet if this jeopardizes any other functionality, because for PX4 it should only be set to 0 or 2, but so far it looks good. I have to make some test flights to make sure it’s ok.
Today I flew a few packs and did not discover any problem. The camera tracked the POI perfectly
So to solve servo pitch output (rc11) on PX4IO not working do:
- add a /fs/microsd/APM/AUXPWM.en file
- set parameter BRD_PWM_COUNT to 4 in MP
set BRD_PWM_COUNT to 4 is not formally supported on PX4-v1, so use at your own risk…