What are the four CAP pins on the PixHawk 4 Mini?

Recently bought a QAV250 kit with a PixHawk 4 Mini as my first step into quad and autopilot. Expected to recycle an older Spektrum DX5e with an AR6110e reciever, at least until I learned enough to make a different RC purchase. As I looked to connect the AR6110e to the PX4, I see the error of my ways.

The AR6110e RCVR appears to have only PWM outputs (THRO, AILE, ELEV, RUDD, etc.) and the PicHawk 4 normally wants a single channel, (PPM?), from the RC.

I suspect my only choice to use AR6110e RCVR is to buy a PWM Encoder board, such as the “Hobbypower PPM Encoder V2.0”.

Question here is: What are the four CAP pins on the PixHawk 4 Mini? The docs https://docs.px4.io/en/flight_controller/pixhawk4_mini.html#interfaces
say they are “PWM Input Capture”. It would seem I could jumper four PWM outputs of the AR6110e to the four CAP “S” pins and get four channel control. (+: 5V and GNDs)

However, running through the QGroundControl V3.4.4 Vehicle Setups, I saw no reference to such a configuration.

Can CAP’s be used with existing software?

About 18 months late in replying! I was wondering the same thing and came across this question.

I did a little research - so I’ll summarize what I’ve found here in case anyone else ends up here too.

The CAP pins are included in the FMUv5 and later PX4 designs. So I looked at the pinout for the FMUv5, i.e. the design behind the Pixhawk 4, that’s linked to from the PX4 reference design page.

The pinout is a Google Docs spreadsheet - if you go to the All Pinouts sheet you’ll see CAP1 to CAP3 defined like so:

Pin STM32F7 signal FMU usage Functional description
5 TIM2_CH1_IN FMU_CAP1 Digital INPUT: Typicaly used for PWM input or edge capture
3 TIM2_CH2_IN FMU_CAP2 Digital INPUT: Typicaly used for PWM input or edge capture
11 TIM2_CH4_IN FMU_CAP3 Digital INPUT: Typicaly used for PWM input or edge capture

If you look further, you’ll see that the descriptions of CAP1 to CAP3 look very similar to FMU_CH1 to FMU_CH8:

Pin STM32F7 signal FMU usage Functional description
10 TIM1_CH3 FMU_CH2 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
13 TIM4_CH2 FMU_CH5 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
14 TIM4_CH3 FMU_CH6 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
9 TIM1_CH1 FMU_CH4 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
11 TIM1_CH2 FMU_CH3 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
14 TIM1_CH4 FMU_CH1 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
6 TIM12_CH1 FMU_CH7 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture
9 TIM12_CH2 FMU_CH8 Digital I/O: Output: PWM, GPIO, Input: PWM Input or capture

FMU_CH1 to FMU_CH8 have been part of PX4 designs since the start.

If you then switch to the FunctionTakeOff sheet you’ll see the TIM groups mentioned above described as follows:

STM32F7 signal Usage
TIM1[4321],T4[23] PWM to servos (6+)
TIM12[1 or 2] Piezo / buzzer driver out
TIM2[124] PWM input capture / timer capture

So it looks like FMU_CH1 to FMU_CH8 have a standard predefined output purpose but if unused can be repurposed as PWM/GPIO output pins or as PWM/capture input pins.

And the CAP1 to CAP3 pins appear to be a newer addition in FMUv5 and later designs which have no predefined purpose and can, for whatever reason, only be used as input pins.

If anyone has a good reference on how to use PWM/capture input pins, I’d be interested to see that. Are they only useable if writing your own autopilot C code for additional special-purpose functionality? Or can they be automatically routed for particular purposes in QGroundControl / Mission Planner?

1 Like

If you’re using Missionplanner this might be relevant for you:

1 Like