# PanTiltHead Servo Gears Grinding

**URL:** <https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967>\
**Category:** Support\
**Created:** [January 19, 2018, 10:06pm UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967 "2018-01-19T22:06:43Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgeorgy](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgeorgy/32/3728_2.png) [@mgeorgy](https://forums.pimoroni.com/u/mgeorgy)\
**Post date:** [January 19, 2018, 10:06pm UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/1 "2018-01-19T22:06:43Z")

</div>

I purchased the Pan-Tilt Kit and after connecting it to the Pan-Tilt HAT based on the “Assembling Pan-Tilt HAT” instructions. I tried using the example code ([neopixel.py](http://neopixel.py)) provided by in the GitHub repo, and also my own code calibrating the servo range (575-2325) as specified in the Pimoroni forums. The result of all my testing is the pan servo immediately swings to the far right (-90?) and grinds for the duration of the run regardless of movement instructions provided.

This is a video:  
[https://www.dropbox.com/s/1slw7kxe5mvp900/IMG\_5823.MOV?dl=0](https://www.dropbox.com/s/1slw7kxe5mvp900/IMG_5823.MOV?dl=0)

AdaFruit has replaced both the hat and servos, but the behavior continues with the new set. What am I doing wrong?

FWIW I’ve tried switching the servo connections (pan servo -\> Servo 2, tilt servo -\> Servo 1), but the pan servo still behaves the same way.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 20, 2018, 10:17am UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/2 "2018-01-20T10:17:35Z")

</div>

I’d hook a servo directly up to the Pi without the Hat, and test it that way. All by itself not mounted to anything. Once you get one working correctly, swap it out for each of the others you have. If they all work OK, its not the servo. If one or more behave weird, find two that work. Then move on. I’d want to know if the servo’s are OK and go from there.  
This might help with that, [https://www.youtube.com/watch?v=ddlDgUymbxc](https://www.youtube.com/watch?v=ddlDgUymbxc)

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 20, 2018, 10:22am UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/3 "2018-01-20T10:22:28Z")

</div>

You may also want to post your test code. PS, your video shows an unsupported type error.

---

<div class="post-metadata">

**Author:** ![mgeorgy](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgeorgy/32/3728_2.png) [@mgeorgy](https://forums.pimoroni.com/u/mgeorgy)\
**Post date:** [January 21, 2018, 6:35pm UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/5 "2018-01-21T18:35:54Z")

</div>

Here’s a direct link, the forum seems to want to try and render it within the post.

https[:][//www.dropbox.com/s/05w16gmhuquedj3/IMG\_5823.mp4?dl=0](https://www.dropbox.com/s/05w16gmhuquedj3/IMG_5823.mp4?dl=0)

---

<div class="post-metadata">

**Author:** ![mgeorgy](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgeorgy/32/3728_2.png) [@mgeorgy](https://forums.pimoroni.com/u/mgeorgy)\
**Post date:** [January 21, 2018, 6:37pm UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/6 "2018-01-21T18:37:16Z")

</div>

I tried the link, and the servos work fine when controlled directly by the RPi. This leaves the HAT. Could it be possible that I received two bad HATs?

As for my sample code, I’m just trying to use the example provided in the PanHatTilt repo:

> <https://github.com/pimoroni/pantilt-hat/blob/master/examples/neopixels.py>

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 21, 2018, 8:03pm UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/7 "2018-01-21T20:03:22Z")

</div>

If you switch the cables, swapping the two servos, plugging the tilt servo into the pan header. Does the issue move to the other servo, the one now plugged into the pan header? It sounds like its the Hat. Maybe they had a bad run? Going to go watch NFL football paly offs, so I likely won’t reply again until tomorrow. ;)

---

<div class="post-metadata">

**Author:** ![mgeorgy](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/mgeorgy/32/3728_2.png) [@mgeorgy](https://forums.pimoroni.com/u/mgeorgy)\
**Post date:** [January 22, 2018, 12:43am UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/8 "2018-01-22T00:43:18Z")

</div>

Thank you for your help. It appears to be bad servos.

---

<div class="post-metadata">

**Author:** ![alphanumeric](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alphanumeric/32/2729_2.png) [@alphanumeric](https://forums.pimoroni.com/u/alphanumeric)\
**Post date:** [January 22, 2018, 10:41am UTC](https://forums.pimoroni.com/t/pantilthead-servo-gears-grinding/6967/9 "2018-01-22T10:41:11Z")

</div>

So do you have a working setup now, two good servo’s?
