0

I started with hooking up the PCA9685 board to my Pi4B and then installing the adafruit PCA9685 library.

I followed this guide https://medium.com/@poojakose5/control-servos-using-16-channel-servo-driver-and-raspberry-pi-8b9318ce7762 except that I installed the latest adafruit library

I tried different examples I found but the servos don't move.

I get no errors but there's no movement.

When going through a loop

for i in range(180):
    servo.angle = i
    print(servo.angle)

it prints the angle from 0 to 180, but....no moving servos.

What could be wrong? It's the az-delivery PCA9685 board (https://www.az-delivery.com/products/pca9685-servotreiber), could there be a problem with that.

I'm using the AZDelivery SG90 Micro Servo Motor 9G

Also when I execute sudo i2cdetect -y 1 I get

0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --

That's ok I guess.

Below are the images showing the connections.

pi4B PCA9685

4
  • We need more information. There are plenty of similar questions. Look at them then edit yours with the needed info.
    – joan
    Aug 22, 2022 at 9:58
  • I made some edits to make my problems more clear
    – Wezy
    Aug 22, 2022 at 13:54
  • Are you using a second power supply for the servos? Also, it would be very useful if you included photos of your equipment.
    – NomadMaker
    Aug 22, 2022 at 15:30
  • Yes, I'm using a 5V supply for the servo motors on the PCA9685 board
    – Wezy
    Aug 22, 2022 at 16:05

2 Answers 2

1

The device appears to be wired correctly.

Try running this example code.

http://abyz.me.uk/rpi/pigpio/examples.html#Python_PCA9685_py

Unzip then

sudo pigpiod
python PCA9685.py
5
  • Thank you for your answer. I tried it, when I ran python PCA9685.py I got an importerr: ,no module pigpio so I used python3 PCA9685.py, that ran without error, but also without movement. I took some time before the cursor came back so I guess it's doing something.
    – Wezy
    Aug 23, 2022 at 7:05
  • Sounds like duff servos or power supply. Try connecting a servo directly to the Pi (5V, ground, plus GPIO). If you connect to GPIO4 (pin 7) give the command pigs s 4 1000 then pigs s 4 2000. It should move if the servo is ok.
    – joan
    Aug 23, 2022 at 7:30
  • when I connect the servo directly to the Pi I can get them to move with those commands, so the servo's are ok.
    – Wezy
    Aug 24, 2022 at 9:09
  • 1
    I suggest you connect one of the PCA9685 PWM outputs to a Pi GPIO set in read mode. Then use piscope or monitor.py to check that a signal is being generated when you run a test. Perhaps the power supply is wrongly connected.
    – joan
    Aug 24, 2022 at 9:38
  • Omg, that was it, the power supply cables where wrongly connected. Now they're moving like they should. Thanks for thinking about it.
    – Wezy
    Aug 24, 2022 at 9:45
0

I guess the problem is you connected 3.3 V [Pi] -> 3.3 V/5 V PCA9685.

You can use 5 V from the Pi or connect an external power source to the V+ pin.

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.