Deterministic motion firmware for DIY motorized camera sliders — C++ / FreeRTOS on Raspberry Pi Pico, STEP/DIR motors plus optional RC servo PWM (banner # MC V1 - …, protocol VP:1).
SliderMC is the motion controller for the open motorized camera slider system. It owns everything timing-critical: STEP/DIR pulses, sine ramps, homing, soft and hard limits, and EMO / driver-error handling — so the UI panel (SliderCtrl) can focus on knobs, buttons, and OLED without stealing motion cycles.
This is a DIY project with pro-grade motion firmware. Live retarget, mm-based API, and open protocol put you on par with many closed commercial controllers for features and transparency — paired with SliderCtrl for operator UX on set. Rail quality, motor choice, and mechanical build remain yours.
The same motion firmware is the electronics half of the construction kit: one STEP/DIR axis with homing and limits — linear slider rail, mini-dolly, rotating head, or turntable depending on your mechanics and mc.ini setup.
Docs and manuals: SliderDoc.
Documentation: SliderDoc
Open motion stack, set-ready behaviour. Dedicated RP2040 runs the planner and PIO step engine; the UIC talks millimetres over UART at 115200 baud.
- Live retarget during movement — change target or speed without stopping the shoot
- Sine ramp acceleration and deceleration — smooth starts and stops;
SAcan set a different stop ramp (SA <accel> [decel]) - Homing, soft travel limits, hard-limit alarms,
DRV_ERROR/ EMO interlock - 1–3 STEP/DIR motors (
CS motors) plus 0–3 RC servos (CS servos); banner{motors}+{servos} axis;IA/CG axis= packed sum.CS axisis rejected — do not send it - Path playback — host-authored motion paths for advanced moves
- Joystick hold (
MJ) — signed % of session speed, 1- or 2-axis - API units: mm, mm/s, mm/s² (steps handled internally)
- Open ASCII protocol on UART + USB CDC CLI — bench-test and script without a panel
- Persistent config (
mc.inion LittleFS) · host-side protocol tests intest/host/ - 10 extender outputs for accessories · UI load fully isolated on the UIC Pico
- Replaceable UIC — same motion board, different panel firmware or fork
Proof points for motion firmware depth:
- Maximum step frequency: ≈259 kHz (≈800 mm/s @ 320 P/mm)
- Minimum step frequency: ≈0.75 Hz (≈2.3 µm/s @ 320 P/mm)
- Step timing precision: ~20 ns via PIO
Competitive context: architecture/compare.md.
No compiler and no PlatformIO. Download the UF2 for your board from the Releases page.
| File | Board |
|---|---|
SliderMC-<tag>-pico.uf2 |
Raspberry Pi Pico (RP2040) |
SliderMC-<tag>-picow.uf2 |
Raspberry Pi Pico W |
SliderMC-<tag>-rp2040zero.uf2 |
Waveshare RP2040-Zero |
SliderMC-<tag>-pico2.uf2 |
Raspberry Pi Pico 2 (RP2350) |
SliderMC-<tag>-pico2w.uf2 |
Raspberry Pi Pico 2 W |
SliderMC-<tag>-rp2350zero.uf2 |
Waveshare RP2350-Zero |
- Hold BOOTSEL, plug in USB, then release BOOTSEL.
- Copy the UF2 onto the drive that appears. RP2040 boards show up as
RPI-RP2. RP2350 boards (Pico 2, Pico 2 W, RP2350 Zero) show up asRP2350. - The board reboots into the new firmware.
Pico and Zero share a chip family. The bootloader accepts either file on that chip, and the wrong one uses the wrong pins. Match the file to the board.
A release UF2 is the application only. A board with no /mc.ini yet boots with the compiled defaults. An existing /mc.ini on LittleFS survives a later UF2 update. Factory data/mc.ini still needs a filesystem upload from a source build.
A new set of files is built when a v* tag is pushed (for example v1.0). That tag's commit must already contain this workflow. Rebuild an existing tag from the Actions page with Run workflow.
Full notes, including the filesystem image: mc/build.md.
- Install VS Code and the PlatformIO IDE extension.
- File → Open Folder → this repository (
SliderMC), not SliderCtrl. - PlatformIO: Build / Upload (env
pico). - Open the serial monitor for the USB CLI (press Enter to unlock, then type commands).
Details: mc/build.md. On Windows, if Upload fails with Please specify upload_port, install the WinUSB driver for RP2 Boot (Interface 1) via Zadig — see Windows upload section.
| Topic | Document |
|---|---|
| Build / flash | mc/build.md |
| Protocol | contract/protocol.md |
| Config keys | mc/config.md |
| GPIO map | mc/pins.md |
| Motion / planner | mc/motion.md |
Joystick (MJ) |
mc/motion-joy.md |
Working window (SL/SR) |
mc/working-window.md |
| UIC (panel) | SliderCtrl · uic/ |
include/ Public headers (pins, protocol, planner, PIO)
src/board/ GPIO, UART, USB CDC, LittleFS port
src/motion/ PIO STEP, planner, FreeRTOS tasks (+ host stub)
src/protocol ASCII parser, commands, verbose/status
src/config/ RAM config store
data/mc.ini Factory defaults
test/host/ Host-side protocol tests
scripts/ Host tests + GitHub repo helper
Requires g++ or clang++ on PATH:
powershell -File scripts/run_host_tests.ps1| Area | State |
|---|---|
Protocol (2-letter cmds, X/Y/Z args, # status, !/ESC, CT) |
Implemented |
| FreeRTOS tasks (feed / plan / proto) + heartbeat/WDT | Implemented |
| PIO STEP + sine planner (live retarget, soft/hard stop) | Implemented |
Soft/hard limits, homing, EMO/DRV_ERROR |
Implemented |
| LittleFS persistence | Load /mc.ini at boot; save on CS |
Copyright (c) 2026 Jochen Krapf <jk@nerd2nerd.org>
Licensed under the MIT License.
Company names and product names mentioned in this project are trademarks or registered trademarks of their respective owners. Use here is for identification only.