Unlocking Gimbal Rotation

I am back once more to clog your email notifications

Anyways, my team is making some custom components for the drone that rely on the servos being able to rotate in one direction for a long time. However, the drone will not accept MQTT messages to set_servo_absolute with a value greater than 2400.

We made a custom build of AVRGUI with the variables SERVO_ABS_MIN and SERVO_ABS_MAX modified, and while it lets us go below the minimum value of 700, it will not let us go past the maximum of 2400. Is there a way to unlimit it?

I’m pretty sure servo limits are hardware-defined. I.e, the hardware cannot even process going beyond 2400.

Maybe look into some different servos with more throw?

1 Like

Well that would explain a lot. Thanks for the help!

I’m on a business trip so excuse the short reply. These values are restricted based on the PCC firmware: AVR-PCC-Firmware/avr_servo.hpp at 0274ccbbb96a03edfd4fbe38534b433d47e10ca4 · bellflight/AVR-PCC-Firmware · GitHub

I’m reasonably certain this was lifted directly from Adafruit’s example: Adafruit-PWM-Servo-Driver-Library/servo.ino at bbc6c3058e9a6197b3d360925e35811df942f2e1 · adafruit/Adafruit-PWM-Servo-Driver-Library · GitHub

You can try tweaking the values, and recompiling and flashing the firmware.

1 Like

Good to know. I’ll give that a try, and modifying firmware could open up a lot of new possibilities on top of that!

I have updated some of the documentation about this: bell.avr.serial.pcc API documentation