I cannot get servos to move using the PCA9685 servo driver on my Jetson Orin Nano, despite successful I2C communication and proper register configuration. The servo works fine when tested on Arduino, so it isn’t broken.
What Works:
- PCA9685 detected on I2C bus 7 at address 0x40
sudo i2cdetect -y -r 7shows device at 0x40- Can read/write PCA9685 registers successfully via smbus2
- Register values verify correctly (MODE1, MODE2, PRESCALE, channel PWM registers)
- Servo confirmed working on Arduino
- Power verified: 3.7V measured at PCA9685 V+ terminal
- Common ground established between battery, PCA9685, and Jetson
- Permissions all set (
groupsincludes both gpio and i2c)
What Doesn’t Work:
- Servo does not move at all (no sound, no twitch, no resistance)
- Tested with two different servos - neither works
- Both smbus2 and Adafruit ServoKit (via gpio) library produce no movement
Here’s my setup:
- Board: Jetson Orin Nano Developer Kit “Super” variant
- JetPack Version: 6.2.1
- OS: Ubuntu (based on JetPack 6.2.1)
- Python: 3.10
- Servo Driver: Adafruit PCA9685 (genuine board) on pins 3 and 5 on the Jetson
- Servo: MG90S micro servo (tested and confirmed working on Arduino)
- Power: Single 3.7V LiPo battery (9800mAh) connected to PCA9685 V+ terminal
- I2C Bus: PCA9685 detected on bus 7 at address 0x40
The code runs with no errors but the servo does not move at all.
Here’s the script I’ve tested (+ some variants of this structure):
from smbus2 import SMBus
import time
bus = SMBus(7)
addr = 0x40
# Configure MODE2 (OUTDRV bit for totem-pole outputs)
bus.write_byte_data(addr, 0x01, 0x04)
time.sleep(0.01)
# Initialize for 50Hz
bus.write_byte_data(addr, 0x00, 0x10) # Sleep
bus.write_byte_data(addr, 0xFE, 0x79) # Prescale for 50Hz
bus.write_byte_data(addr, 0x00, 0xA0) # Wake + restart
time.sleep(0.01)
# Set channel 0 to 90 degrees (~1500us pulse)
bus.write_byte_data(addr, 0x06, 0x00) # LED0_ON_L
bus.write_byte_data(addr, 0x07, 0x00) # LED0_ON_H
bus.write_byte_data(addr, 0x08, 0x33) # LED0_OFF_L (307 ticks)
bus.write_byte_data(addr, 0x09, 0x01) # LED0_OFF_H
time.sleep(2)
bus.close()
And for the ServoKit library (+ variants of this structure):
from adafruit_servokit import ServoKit
import board
import busio
i2c = busio.I2C(board.SCL, board.SDA)
kit = ServoKit(channels=16, i2c=i2c)
kit.servo[0].angle = 90