Servo2040 connectivity

Hello, I will start out by saying I’m new to python and micro python so please forgive me if I use the wrong phrases.

I’m building a robot based on the poppy humanoid robot. As I could not afford the servos they used, I went for a suite of 30KG SPT motors and re-designed the joints around them. This part is done and the body is looking OK.

The part that I’m sticking on is the servo control. I started out by using a 2040 Pico connected to 2* PCA9685 boards as there are 26 motors in this robot, but found the action lumpy when trying to get easing to work. As a result I have bought 2* 18 channel Servo2040 boards that I want to connect back to the Raspberry pi in the robot head.

With the Pico solution, I had the Pico’s in the head and used I2C to the PCA9685’s and USB to the Pico from the Raspberry Pi so I could use Thonny to continue program the actions when I got to that stage. This in testing worked well but took up space in the head which I need for other boards and sensors.

To add another thing in the mix there is an IMU in the body connected to the Pico using the I2C bus as I wanted the Pico to control the balance without waiting for feedback from the Raspberry Pi.

Now with that out of the way this is the question:

Is there a way of getting these two Servo 2040 boards to connect back to the Raspberry pi so I only need one cable back to the head (4 cores would be getting to the limit. I have considered a USB connection to a small hub in the body but this would require a redesign somewhere in the body to accommodate it).

I have several limitations with the head cabling, restricted movement and also the amount of cable I can feed through the frame of the robot and the aperture in the back of the head.

I understand there is a way of getting the 2040 to act as a slave for I2C using circuit python, but you are limited as to the number of servos you can run on the board (I believe 12 hence I’m using micro python)

Any help with this conundrum would be appreciated


I2C slave should also be supported by micropython. I think I posted some links some time ago on this forum.

Thank you I shall have a look for it

Correct if I am wrong please, but you cant I2C slave a 2040 chip in python

Of course you can. Just google for “i2c slave micropython” and you will find something.