Here's what I know:
- I'm using a Hitec HS-5625MG digital servo.
- In the debug output below, I've set the pulse frequency to 50Hz, instead of the 60Hz defined in the example code. It didn't work at 60Hz either.
- The servo is getting power, and has holding torque (it resists me trying to move it by hand).
- The servo works fine on it's own (tested with a servo tester, and responds normally).
- There is no error being thrown from the code (debug log output is below).
- The raspberry pi is being powered by the power rail from the servo hat (PWRIN bridged to 5.0V), and an external 5V/10A BEC. The hat, servos and pi are all powered from the same 5V supply. Should be fine, since I'm using an external 10A BEC with ripple caps on the output, but figured it's worth mentioning.
Debug output:
Code: Select all
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0xFA
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0xFB
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0xFC
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0xFD
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x04 to register 0x01
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x01 to register 0x00
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Read 0x01 from register 0x00
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x01 to register 0x00
DEBUG:Adafruit_PCA9685.PCA9685:Setting PWM frequency to 50 Hz
DEBUG:Adafruit_PCA9685.PCA9685:Estimated pre-scale: 121.0703125
DEBUG:Adafruit_PCA9685.PCA9685:Final pre-scale: 121
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Read 0x01 from register 0x00
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x11 to register 0x00
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x79 to register 0xFE
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x01 to register 0x00
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x81 to register 0x00
Moving servo on channel 0, press Ctrl-C to quit...
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x06
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x07
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x96 to register 0x08
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x09
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x06
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x07
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x58 to register 0x08
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x02 to register 0x09
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x06
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x07
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x96 to register 0x08
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x09
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x06
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x00 to register 0x07
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x58 to register 0x08
DEBUG:Adafruit_I2C.Device.Bus.1.Address.0X40:Wrote 0x02 to register 0x09
...etcetera
Any ideas what might be wrong? Any suggestions for troubleshooting?