First time with servos not going well

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



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

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.

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

I can probably comment on this on the product page.

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.

In the IDE:

File → Examples → Board Control → servo_control.py

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 ??

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