Home        Store        Learn        Blog

Help with Servos and Pixhawk 4 Mini

I am having some trouble getting servos to work with a Pixhawk 4 mini, Ardusub, and Qgroundcontrol. The problem comes down to me not understanding how to map servos to buttons on my Xbox controller. Right now, my configuration follows the Pixhawk 4 mini wiring guide found here Pixhawk 4 Mini Wiring Quickstart · PX4 v1.9.0 User Guide. I have checked all the hardware from thrusters, ESC’s, BEC, and servos to make sure they are functioning. The Pixhawk also seems to work fine and can control thrusters. I have also attempted to map servos to buttons via qgroundcontrol and I think this is perhaps where I am confused. With the Pixhawk 4 I can just attach servos in order on the rail and then map buttons using the servo_n functions to the Xbox joystick and it works. With the mini I’m not sure how to map the main out pin to a button on the joystick via qgroundcontrol. I suspect I am missing something simple but after spending a lot of time on this I am stumped. I have added three images that might help. The first is a stripped-down test with the Pixhawk 4 mini. There is one thruster connected via bidirectional ESC and a single servo, also on main out, and is powered by a BEC on pin 8. Any help is appreciated.



Hi @Robi_Sen,

ArduSub hasn’t really been designed for auxiliary connections on the MAIN outputs, and the Pixhawk 4 Mini isn’t something we’ve tested. The normal servo_n controls are specifically applied to AUX outputs, which aren’t available on the Pixhawk 4 Mini.

You may be able to get around that by specifying the desired main pin as a camera control (e.g. pan), and then assign relevant button functionality for that control, but ‘normal’ servo control won’t be available (you’ll either need a workaround like using camera controls instead, or a modified version of ArduSub).

Thank you. I came to a similar assement. I was hoping to use it and its associated small power management board to save some space in a very crowded dry cell. Thank you for the feedback.