Imported from GitHub: not-forest/rp2040-12V-motor-regulator · commit 01e11d1 · license MIT
Description
Small motor regulator circuit with H-Bridge driver source code for RP2040 Zero microcontroller.
README
RP2040-Zero Powered 12V Motor Controller
RP2040 microcontroller handles status LEDs, an H-Bridge driver, and a rotary encoder input. RP2040's PIO is used to read encoder signals as a state machine, completely restraining bouncing errors from the input lines. This allows to use cheap encoders and have an amazing precision.

PCB
- Designed in KiCad.
- Screw terminals 12V power input and motor output.
- Two versions include buck converter and linear regulator.
Software
- Rotary Encoder:
- PIO reads encoder signals and adjusts speed.
- Rotary Encoder's Switch:
- Changes motor direction via the H-Bridge.
- PWM:
- Controls motor speed by adjusting duty cycles.
- Status LEDs:
- Show real-time speed and direction updates.
Requirements
- Rust Toolchain: For building firmware.
- elf2uf2-rs: To flash the RP2040 (
cargo runautomatically searches for connected rp2040 and flashes thefirmware). - KiCad: adjust PCB design.
Provides a reference for PIO-based rotary encoder handling in Rust.

No comments yet. Be the first to ask about this board.