# First time with servos not going well

**URL:** <https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350>\
**Category:** OpenMV Boards\
**Created:** [July 16, 2019, 7:33pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350 "2019-07-16T19:33:34Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ScottM](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@ScottM](https://forums.openmv.io/u/ScottM)\
**Post date:** [July 16, 2019, 7:33pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/1 "2019-07-16T19:33:34Z")

</div>

I am trying to get two servos to work with the pan/tilt shield, but so far it isn’t working. I am brand new to Micropython, so it might be a learning issue. Here is what I did.

I connected a 5.2Vdc power supply to the servo bat pins and confirmed that it carries through to the Vin and GND pins.  
I connected two HS-5485HB digital standard servos.  
I connected the shield to the OpenMV camera and made sure to test it first by running the helloworld example. The camera works fine  
From the examples, I opened pca9685.py and under Tools/Save open script to OpenMV cam. It asks if I want to strip comments and convert spaces to tabs, so I say Yes  
I then open servo.py and do the same thing  
I then select Tools, Reset OpenMV Cam  
I then open main.py and hit the green arrow to run it.

I get an error "OSError:[Error 110] ETIMEDOUT

Nothing happens. I was expecting the servos to move. What do I do to get this working?

Scott

 ![20190716_152907.jpg](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/66cfc00451ee0a06f586af6c62251c122d13ac11.jpeg)  
 ![20190716_152815.jpg](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/3382dcfdcceb28442a020ae22e22460e0293ade2.jpeg)  
 ![20190716_152839.jpg](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/aa0d3ad248769bb198eff3a8ec9b4d8466085bf3.jpeg)

---

<div class="post-metadata">

**Author:** ![ScottM](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@ScottM](https://forums.openmv.io/u/ScottM)\
**Post date:** [July 16, 2019, 7:46pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/2 "2019-07-16T19:46:50Z")

</div>

I tried again with one of those tiny pan/tilt kits, but I get the same error.

 ![20190716_154510.jpg](https://canada1.discourse-cdn.com/flex029/uploads/openmv1/original/1X/b0e64f5f6ced8b2d9618d6b7daaefc6794c5bd3e.jpeg)

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [July 17, 2019, 3:28am UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/3 "2019-07-17T03:28:44Z")

</div>

Hi Scott, the drive you are trying to use is for controlling the 8-channel servo shield. You have the Pan/Tilt shield. For this shield no driver chip is necessary. The servos are directly controlled by the OpenMV Cam. Please see the Board Control → Servo example for how to drive servos directly from the H7 main chip using it’s PWM output.

---

<div class="post-metadata">

**Author:** ![ScottM](https://avatars.discourse-cdn.com/v4/letter/s/65b543/32.png) [@ScottM](https://forums.openmv.io/u/ScottM)\
**Post date:** [July 17, 2019, 12:58pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/4 "2019-07-17T12:58:59Z")

</div>

Thanks Nyamekye,

That sample works perfectly and is a lot simpler. Perhaps you can update the comments in the other sample to make it clearer to users which code works for the servo shield vs the pan/tilt shield. On to my next learning challenge. This is fun.

Scott

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [July 17, 2019, 5:47pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/5 "2019-07-17T17:47:58Z")

</div>

I can probably comment on this on the product page.

---

<div class="post-metadata">

**Author:** ![Edmod209](https://avatars.discourse-cdn.com/v4/letter/e/d07c76/32.png) [@Edmod209](https://forums.openmv.io/u/Edmod209)\
**Post date:** [October 20, 2020, 8:35am UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/6 "2020-10-20T08:35:31Z")

</div>

Trying to find the section on Board Control → Servo in your previous reply. Can you please send me the tutorial link for this? Having trouble finding the reference.

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [October 20, 2020, 2:57pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/7 "2020-10-20T14:57:06Z")

</div>

In the IDE:

File → Examples → Board Control → servo\_control.py

---

<div class="post-metadata">

**Author:** ![jay1st](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jay1st](https://forums.openmv.io/u/jay1st)\
**Post date:** [November 18, 2020, 12:07pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/8 "2020-11-18T12:07:28Z")

</div>

I’m interested in doing the same, with the pan / tilt shield.

Coming from the R/C wold, i know the pwm timing for digital servos ( Futaba for example) can be different from analog servos, I guess the PWM is user configurable ??

---

<div class="post-metadata">

**Author:** ![kwagyeman](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.openmv.io/kwagyeman/32/4_2.png) [@kwagyeman](https://forums.openmv.io/u/kwagyeman)\
**Post date:** [November 18, 2020, 6:54pm UTC](https://forums.openmv.io/t/first-time-with-servos-not-going-well/1350/9 "2020-11-18T18:54:48Z")

</div>

It’s the same PWM signal for servos. The analog or digital part just means that the servos have better control loops internally.
