Can't get 18 servos to work on Servo2040 board

I got this board to make a Hexapod robot with 18 servos. I connected 18 servos (Tower Pro MG90S) to the board. I took the example file and modified it to create 18 servos. I know the comment mentioned that only 16 servos can be created, but I tried any way.

import time
import math
from servo import Servo, servo2040

# Create a list of servos for pins 0 to 3. Up to 16 servos can be created
START_PIN = servo2040.SERVO_1
END_PIN = servo2040.SERVO_18
servos = [Servo(i) for i in range(START_PIN, END_PIN + 1)]


I tried to just control the 1st servo (as above) and when I run the program the servos on the 1st pin and the 17th pin moves in unison. I tried with…


the servo on the 2nd pin and the 18th pin moves in unison. [2] to [16] pins work as expected.
Is there something I need to do to get 18 servos working independently? This board was marketed as an 18 servo board, so I would assume that it can control 18 servos independently.

Found this with a search,
How to control servo 17 and 18 on the 2040 Servo Controller - Support - Pimoroni Buccaneers
@assadollahi can probably tell you exactly how he did it, and or share his code.

Thanks alphanumeric for that link, but I tried that code and it did nothing. So, I loaded the example and ran it with 18 servos created. It also did nothing. So, I added a print statement after the ServoCluster statement, and it never gets to the print statement. I have the latest firmware installed.

import gc
import time
import math
from servo import ServoCluster, servo2040


START_PIN = servo2040.SERVO_1
END_PIN = servo2040.SERVO_18
servos = ServoCluster(pio=0, sm=0, pins=list(range(START_PIN, END_PIN + 1)))

print(‘start servo test’)


Maybe @MrEcko can help, he’s built one.
How do you remotely control your bots with the Servo2040? - Discussion / Learning Resources - Pimoroni Buccaneers

I created that discussion, but I didn’t test the servos at that point yet.Was just trying to get the remote control working.

Ah, OK, I don’t have anything else other than.
Contact Us for Raspberry Pi Technical Support - Pimoroni

Thanks again alphanumeric, but I think I will switch to an arduino mega with the servo shield for my project. I think the Servo2040 is a decent controller for 16 servos, it doesn’t seem to be an 18 servo controller. Also, it lacks a pinout diagram. Other pimoroni board do have a pinout diagram.

I reached out to technical support via email twice but did not get much help.

I’m thinking there is no pinout because it has an RP2040 onboard, not a full Pico or Pico W?
The schematic will tell you what pins do what, with some sleuthing.
servo2040.sch (