# Unlocking Gimbal Rotation

**URL:** <https://forum.theavr.org/t/unlocking-gimbal-rotation/494>\
**Category:** AVR Drone Software\
**Created:** [May 16, 2023, 7:05pm UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494 "2023-05-16T19:05:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonah](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jonah](https://forum.theavr.org/u/Jonah)\
**Post date:** [May 16, 2023, 7:05pm UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/1 "2023-05-16T19:05:26Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Tig](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/tig/32/215_2.png) [@Tig](https://forum.theavr.org/u/Tig)\
**Post date:** [May 18, 2023, 1:15am UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/2 "2023-05-18T01:15:37Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jonah](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jonah](https://forum.theavr.org/u/Jonah)\
**Post date:** [May 18, 2023, 3:40pm UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/3 "2023-05-18T15:40:39Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/nathan/32/4_2.png) [@nathan](https://forum.theavr.org/u/nathan)\
**Post date:** [May 19, 2023, 12:11am UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/4 "2023-05-19T00:11:42Z")

</div>

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](https://github.com/bellflight/AVR-PCC-Firmware/blob/0274ccbbb96a03edfd4fbe38534b433d47e10ca4/libraries/AVR_ServoDriver/avr_servo.hpp#L4-L12)

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](https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/blob/bbc6c3058e9a6197b3d360925e35811df942f2e1/examples/servo/servo.ino#L34-L38)

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

---

<div class="post-metadata">

**Author:** ![Jonah](https://avatars.discourse-cdn.com/v4/letter/j/7feea3/32.png) [@Jonah](https://forum.theavr.org/u/Jonah)\
**Post date:** [May 19, 2023, 6:24pm UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/5 "2023-05-19T18:24:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nathan](https://yyz1.discourse-cdn.com/flex007/user_avatar/forum.theavr.org/nathan/32/4_2.png) [@nathan](https://forum.theavr.org/u/nathan)\
**Post date:** [May 21, 2023, 11:54pm UTC](https://forum.theavr.org/t/unlocking-gimbal-rotation/494/6 "2023-05-21T23:54:09Z")

</div>

I have updated some of the documentation about this: [bell.avr.serial.pcc API documentation](https://bellflight.github.io/AVR-Python-Libraries/bell/avr/serial/pcc.html#PeripheralControlComputer.set_servo_abs)
