0

I have a 16 port adafruit servo driver connected to my Raspberry Pi. I followed the directions (https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi) to set it up. I then connected 4 continuous rotation servo motors. When I set their throttle to 1, the servos spin. However, when I set them to 0, sometimes rather than stopping they continue. When I check the value of their throttle, it's something very low, like 0.0000265.

For example, here is the code I am running (Python)

from adafruit_servokit import ServoKit
import time
kit = ServoKit(channels=16)

kit.continuous_servo[0].throttle = 1
kit.continuous_servo[3].throttle = 1
kit.continuous_servo[8].throttle = 1
kit.continuous_servo[13].throttle = 1

time.sleep(0)

kit.continuous_servo[0].throttle = 0
kit.continuous_servo[3].throttle = 0
kit.continuous_servo[8].throttle = 0
kit.continuous_servo[13].throttle = 0

print("Done")
print("Servo 0: {}\nServo 3: {}\nServo8: {}\nServo 13: {}".format(
        kit.continuous_servo[0].throttle,
        kit.continuous_servo[3].throttle,
        kit.continuous_servo[8].throttle,
        kit.continuous_servo[13].throttle
))

And this is the output (After it has set all the throttles to 0):

Done
Servo 0: -0.0020333468889792705
Servo 3: -0.0020333468889792705
Servo 8: -0.0020333468889792705
Servo 13: -0.0020333468889792705

After the throttle is set to 0, the throttle is reset to a very low number, and the Servo Motors keep turning (slowly).

Is there a way to fix this? I have enabled i2c in the raspi-config menu too.

2
  • what happens if you set the throttle to -1?
    – jsotola
    Commented Nov 6, 2021 at 1:41
  • @jsotola the wheel spins backwards (in reverse)
    – Brendan R.
    Commented Nov 6, 2021 at 1:46

2 Answers 2

0

You need to identify the deadband pulsewidth for the servos. Typically it will be 1500 µs.

Use the software to send values around 1500 µs in steps of 5 µs until you find the value to stop them spinning.

The deadband pulsewidth may be different for each servo (i.e. you may need to calibrate the servos individually).

0

I found a solution. There is a tiny screw on the bottom of the servo to calibrate it. I set the throttle of the servo to 0, then turned the screw until it came to a complete stop.

The screw can be seen in this image: Picture of screw

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.