PiicoDev_Servo i2c connection

Hi Toni,

I replicated your setup and ran into the same issue.

It seems to be associated with the edge rates the Pico creates by driving the pins so strong (and quickly).
On the PiicoDev expansion board this is solved with 120 ohm resistors on the SDA and SCL lines.

Which is how I was able to solve the issue, if you place 2x resistors in series from the SDA and SCL pin on the Pico to the SDA and SCL on the driver.

controller = PiicoDev_Servo_Driver(bus=0, scl=Pin(1), sda=Pin(0), freq=400000)

This line will get you out of trouble (along with the resistors)

Liam

4 Likes

Thanks Liam, I would never have worked that one out…
I’m not worried about loose resistors hanging around as I am ultimately intending to Kicad design a PCB which incorporates a Pico and the PicoDev Servo board, so a couple of resistor pins will keep it tidy.

Now that the single servo code is working I will test my multiple servo version.

Cheers
Toni

3 Likes

Hi Toni

It is refreshing to see someone prepared to start simple and then add is bits until the project is complete.

Unfortunately there seem to be a great many that want to start about 3/4 way up the tree and work in both directions. Usually finishes up a disaster. and a lot of work for sometimes many people.

Keep up that attitude and you will go far with little trouble.
Cheers Bob

4 Likes

Hi Liam,

As I mentioned I am thinking of Kicad designing a pcb which incorporates a Pico and the PiicoDev servo driver. In looking at your data sheet for the server I noticed that you actually designed the servo driver using Kicad and am wondering if Core have ever done what I am hoping to do.

My ongoing project is associated with a model rail layout where I have a number of boards each of which incorporate servos and sensors. I have recently implemented MQTT from a Raspberry Pi instead of usb connections to the distributed Pico controllers to avoid the issue of usb and i2c cable joints between the individual layout boards.

Having the Pico and the PiicoDev boards in one unit under the layout should avoid jumpers, loose connections etc and would look a bit more professional than my current rats nests.

Do you have any thoughts on this?

Cheers
Toni

1 Like

Hi Toni,

At Core we usually design the modules to be accessible and usable in a variety of projects, so functionality is usually focused on one purpose i.e. with the servo driver - just driving a servo motor and the required functions to do so (power input, I2C connectors etc).

Combining the functionality of a few boards is definitely a good reason to design a PCB, baking the wires into the board makes connecting and producing a few much more reliable and easy (depending on the design).

There’s some good discussion in chapters 11 and 12 in the Zero to Maker workshop: https://core-electronics.com.au/courses/zero-to-maker-workshop/#11-electrical-design

My advice at least for the first board is add lots of connectors, test points and solder jumpers incase any mistakes are made.

Liam

Hi Liam,

Thanks for the advice, I will certainly be working through your course videos, especially the pcb sections.

The Kicad RPi Pico symbol etc files are available from Github and I’m wondering if the PiicoDev Servo Driver files are also available or do I need to build them from scratch.

Regards

Toni

1 Like

Hi Tony,

There definitely are files! PiicoDev Servo Driver (4 Channel) | Buy in Australia | CE09181 | Core Electronics (in the hardware repo link)

All of the modules and boards that Core makes are open source

If you want to use the board itself, I could recommend using a 1x4 connector and modifying it to include the mounting holes and silkscreen you would like.

Liam

Great, thanks
Toni

1 Like