Best way to connect a secondary MCU?

Basic Information:

Printer model: not relevant
Printer board: SKR Pico (RP2040)
Primary MCU: Raspberry Pi 3A

Describe your issue:

With the SKR Pico you can connect to the primary MCU via UART (five pins: two 5V, GND, TX, RX).

I would like to add another small MCU in a similar way, but the Pi 3A only has one usable UART connection for this (as far as I can tell).

Is it possible to add another UART connection, or would I need to switch to a different interface like CAN?

What is the MCU, does a board containing the MCU/required functnios currently exist and what are you trying to do?

Personally, my first choice would be USB.

3 Likes

I was thinking of adding some more GPIO near the printer board via a RP2040 based microcontroller. Maybe something as simple as a raspberry pi pico. I could run a bunch of lines from the Pi 3A for a similar purpose, but was trying to minimize the number of wires that have to run from opposite corners of the printer.

Personally, my first choice would be USB

I believe the steps there would be:

  1. Flash pico with klipper firmware (or is it menuconfig? Not familiar with this step for a secondary MCU)
  2. Connect to PI 3A via usb cable
  3. Configure printer.cfg with the pico’s serial ID

Right?

That’s the way I would do it.

When choosing a board, make sure there’s enough Flash on the MCU for Klipper and that the MCU is supported by Klipper.

When choosing a board, make sure there’s enough Flash on the MCU for Klipper and that the MCU is supported by Klipper.

Good point. Since the SKR Pico and Raspberry Pi Pico both use an RP2040 as their main chip and have at least 2MB of additional flash on the board (klipper firmware is <64 kb I think) the Pi Pico should work.

I’ve been running Raspberry Pi Pico (RP2040) as an extra mcu for the last few years for exactly this purpose, adding GPIO to the printer, and have been very happy with it.

It’s connected to the host (a PC in my case) via USB and I have it on a breadboard magnetically attached to a 3D printed bracket right on the front of the printer where stock LCD screen used to be mounted which makes connecting accelerometer (for input shaping), another sensor, relay, etc. a breeze. I can just turn the power off (IMPORTANT), wire in a new (supported) device to GPIO without soldering, edit config files per Klipper documentation, and voilà in minutes!

Breadboards are definitely not meant to be a permanent wiring solution, especially since I have it physically connected to the printer and hence coupled to all of the printer’s vibrations while printing, but I’ve had no issues over a couple of years now.

And if you run out of GPIO, for another $4 you can always add another Pi Pico to your setup.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.