Stepper motors, though common and cheap, come with a learning curve. This is especially true for the 28BYJ-48 unipolar stepper, which is widely available and very affordable, but not very beginner-friendly when it comes to wiring, sequencing, and control l
ogic.
To add to the difficulty:
You often need a microcontroller and some level of programming knowledge.
- You often need a microcontroller and some level of programming knowledge.
A driver board is typically needed to interface between motor and microcontroller.
- A driver board is typically needed to interface between motor and microcontroller.
Even with hardware in place, writing or adapting stepper motor code can be overwhelming for non-technical users.
- Even with hardware in place, writing or adapting stepper motor code can be overwhelming for non-technical users.
Configuring motion patterns like oscillations or synchronizing multiple motors becomes even more complex.
- Configuring motion patterns like oscillations or synchronizing multiple motors becomes even more complex.
From a design perspective, the challenge can be broken down into a few key problems:
Ease of Use: Users shouldn't have to understand H-bridges, pulse sequences, or lookup tables.
- Ease of Use: Users shouldn't have to understand H-bridges, pulse sequences, or lookup tables.
Configurable Motion: The system should support both continuous and oscillating motion, ideally with live tuning.
- Configurable Motion: The system should support both continuous and oscillating motion, ideally with live tuning.
Standalone Control: Motion should be easily initiated and adjusted without a PC or development board.
- Standalone Control: Motion should be easily initiated and adjusted without a PC or development board.
Scalability: Multiple motors should be able to run in sync, and optionally be triggered by external events or sensors.
- Scalability: Multiple motors should be able to run in sync, and optionally be triggered by external events or sensors.
Compact and Drop-in Friendly: The hardware should be compact, self-contained, and easy to integrate into small spaces or enclosures.
- Compact and Drop-in Friendly: The hardware should be compact, self-contained, and easy to integrate into small spaces or enclosures.
This decomposition became the guiding framework for the final design — from microcontroller choice to UI and feature set.
Project Idea & FeaturesThe Unipolar Stepper Motor Controller is a 43mm x 32mm PCB that houses a CH32V003 microcontroller, driver circuitry, a rotary encoder for real-time control, and an intuitive interface that supports both manual and automated motor control. While it is optimized for the 28BYJ-48 stepper motor, it works with any unipolar stepper.
Here’s what makes it special:
🔧 1. Built Around the CH32V003 MCUAt the heart of the controller is the CH32V003, a rising star in the ultra-low-cost microcontroller world. Despite its small price tag and footprint, it offers:
Adequate I/O for stepper control.
- Adequate I/O for stepper control.
Fast interrupt handling for rotary encoder inputs.
- Fast interrupt handling for rotary encoder inputs.
Support for I2C communication.
- Support for I2C communication.
Low power consumption, making it ideal for embedded, standalone systems.
- Low power consumption, making it ideal for embedded, standalone systems.
Using CH32V003 also makes this project replicable and modifiable by other hardware hackers without resorting to high-cost components.
🎛 2. Rotary Encoder as a Natural UIThe controller includes a rotary encoder, which acts as a human-friendly interface for all key operations:
Rotate CW/CCW to turn the stepper motor in either direction.
- Rotate CW/CCW to turn the stepper motor in either direction.
Press to save configurations or trigger motion.
- Press to save configurations or trigger motion.
Navigate through modes like Continuous or Arc without the need for serial terminals or software tools.
- Navigate through modes like Continuous or Arc without the need for serial terminals or software tools.
It’s a small addition, but it turns the product into a plug-and-play device rather than a development kit.
🔁 3. Continuous and Arc ModesThere are two main modes for using the motor:
Continuous Mode: Spin continuously in CW or CCW direction. Great for things like rotating displays, kinetic sculptures, or simple mechanisms.
- Continuous Mode: Spin continuously in CW or CCW direction. Great for things like rotating displays, kinetic sculptures, or simple mechanisms.
ARC Mode: Here’s where it gets interesting. In ARC mode, the user can define left and right extents by manually rotating the motor to each endpoint using the encoder. Once set, the motor automatically oscillates between these positions. This opens the door to:
Windshield-wiper style motion
- Windshield-wiper style motion
Linkage animations
- Linkage animations
Scanner head sweeps
- Scanner head sweeps
Servo-like behavior with a stepper
- Servo-like behavior with a stepper
- ARC Mode: Here’s where it gets interesting. In ARC mode, the user can define left and right extents by manually rotating the motor to each endpoint using the encoder. Once set, the motor automatically oscillates between these positions. This opens the door to:Windshield-wiper style motionLinkage animationsScanner head sweepsServo-like behavior with a stepper
Want multiple motors working in sync or responding to a central controller like a Raspberry Pi, ESP32, or another CH32 board?
The onboard I2C interface allows multiple controller boards to be daisy-chained. This supports master-slave configuration, enabling advanced behaviors like:
Coordinated multi-axis movement
- Coordinated multi-axis movement
Sequenced motion (domino-style animations)
- Sequenced motion (domino-style animations)
Centralized triggering across multiple mechanical subsystems
- Centralized triggering across multiple mechanical subsystems
Each board has a unique I2C address (configurable in firmware), ensuring scalability.
⚙️ 5. Trigger Input for Sensor ActivationThere’s also a Trigger Input, which can be connected to external buttons, sensors, or other digital systems. When activated, it can:
Start the configured motion (ARC or continuous)
- Start the configured motion (ARC or continuous)
Pause or resume activity
- Pause or resume activity
Sync motion with real-world events like object detection, proximity sensing, or audio triggers
- Sync motion with real-world events like object detection, proximity sensing, or audio triggers
It’s a simple way to bring reactivity into mechanical design.
🧼 6. Erase and ReconfigureAn onboard erase button allows users to wipe configurations and start fresh. This is essential for iterative design, experimentation, and classroom settings where motors are repurposed across projects.
💡 W hy This Project ExistsAs mentioned earlier, this project was developed in response to the teaching and prototyping bottlenecks I encountered during a design school STEM program. Students loved integrating motion into their ideas — opening doors, rotating masks, animating props — but the technical overhead always got in the way.
This board removes those barriers. It enables:
Fast iteration without software
- Fast iteration without software
Confidence in electronics for beginners
- Confidence in electronics for beginners
Creative freedom through hands-on control
- Creative freedom through hands-on control
Beyond education, the controller is a perfect fit for my other passion — mechanism design using linkage systems, inspired by tools like motiongen.io. These designs often need precise rotary input with predictable behavior. The ability to configure ARC boundaries or use synchronized motion makes this board ideal for bringing digital life to mechanical linkages.
Here’s what’s running smoothly:
CW (Clockwise) Mode – Tap the encoder, and the motor rotates smoothly in one direction.
- CW (Clockwise) Mode – Tap the encoder, and the motor rotates smoothly in one direction.
CCW (Counter-Clockwise) Mode – Same deal, but in reverse!
- CCW (Counter-Clockwise) Mode – Same deal, but in reverse!
ARC Mode – The star feature. Users define the left and right limits using the Auxillary buttons. Once saved, the motor oscillates smoothly between the two ends.
- ARC Mode – The star feature. Users define the left and right limits using the Auxillary buttons. Once saved, the motor oscillates smoothly between the two ends.
Play/Pause – Pressing the encoder switch now pauses or resumes the motion, regardless of mode. Super intuitive.
- Play/Pause – Pressing the encoder switch now pauses or resumes the motion, regardless of mode. Super intuitive.
Non-Volatile Memory – The system now remembers the last mode and positions even after power-off. This makes it ideal for installations or embedded setups — set it once and forget it.
- Non-Volatile Memory – The system now remembers the last mode and positions even after power-off. This makes it ideal for installations or embedded setups — set it once and forget it.
Choose your mode (CW, CCW, ARC) while the motor is paused.
- Choose your mode (CW, CCW, ARC) while the motor is paused.
In ARC mode, press the Aux buttons and rotate to set endpoints, then press the Save/Erase Button to save the position.
- In ARC mode, press the Aux buttons and rotate to set endpoints, then press the Save/Erase Button to save the position.
Press the play button to start motion.
- Press the play button to start motion.
Pause or play any time with a single click.
- Pause or play any time with a single click.
Power it off and on — your config is still there!
- Power it off and on — your config is still there!
Implement I2C daisy-chaining for multiple synchronized motors.
- Implement I2C daisy-chaining for multiple synchronized motors.
Create a printable case or mounting bracket.
- Create a printable case or mounting bracket.
Start testing with real-world mechanical linkages and kinetic art setups.
- Start testing with real-world mechanical linkages and kinetic art setups.
🎊 This is a huge step forward in making stepper motor control plug-and-play for non-engineers. No code, no libraries — just intuitive hardware and motion.
More to come soon!
Comments