RP2 stepper motor controller using PIO and DMA #18883
Replies: 6 comments 1 reply
-
|
That's great! Thanks for sharing. |
Beta Was this translation helpful? Give feedback.
-
|
I just added multi-axis synchronized motion, for anyone who wants to do CNC stuff... |
Beta Was this translation helpful? Give feedback.
-
|
This looks fantastic @bikeNomad! Can you recommend any readily available hardware that would be a good match for the library? |
Beta Was this translation helpful? Give feedback.
-
|
Le jeudi 05 mars 2026, Matt a écrit :
This looks fantastic @bikeNomad!
+1, great job, again!
Can you recommend any readily available hardware that would be a good
match for the library?
You can use any driver with step/dir interface.
If you need several axis, you could use the famous Arduino CNC shield:
https://www.amazon.com/s?k=cnc%20shield
and a board like this:
https://www.cnx-software.com/2023/08/09/raspberry-pi-pico-to-arduino-uno-adapter-relies-on-flexypins-for-castellated-holes
https://fr.aliexpress.com/item/1005007406849003.html
https://www.hackster.io/news/picuno-rp2040-in-the-arduino-uno-form-factor-56e568c494da
https://microfan.shop/products/rp2040-uno-r2
https://www.amazon.com/APTINEX-Lakduino-RP2040-Development-Board/dp/B0D73KTY7J
(I built my own).
…--
Frédéric
|
Beta Was this translation helpful? Give feedback.
-
|
I just added arc motion as well. |
Beta Was this translation helpful? Give feedback.
-
|
Le vendredi 06 mars 2026, Ned a écrit :
I just added arc motion as well.
Awesome!
Just add a path planner, and we have a full CNC/3D printing firmware ;o)
…--
Frédéric
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I've just published an improved and extended version of @fmafma 's stepper motor control code here: https://github.com/bikeNomad/micropython-rp2-smartStepper
A MicroPython library for smooth, non-blocking stepper motor control on the
Raspberry Pi Pico (RP2040) and Pico2 (RP2350). Uses PIO state machines and DMA for precise,
CPU-independent pulse generation and position counting.
Features
moveTo)jog) with configurable speedhoming.py)mipinstallableI think it should be possible to have more stepper instances (especially on the RP2350) but I haven't worked out how to do that yet, as each instance takes one SM for pulse generation and one for pulse counting.
Beta Was this translation helpful? Give feedback.
All reactions