A4988 Stepper Motor Controller

Thursday, Oct 10, 2024 | 4 minute read | Updated at Thursday, Feb 27, 2025

Will Rohren

A custom four-channel A4988 stepper driver board, designed mostly so I could batch-order another PCB that month. Adafruit sells the same chip on a breakout for $5. That’s the lesson.

STATUS: Built, never got a stepper to move with it. Retired in favor of off-the-shelf driver modules.

Back to Home Page


Background

In October 2024 I was about to send a JLCPCB order for the ATmega32U4 dev board , and shipping from Hong Kong is the dominant cost on small JLCPCB orders. Anything else I could finish a design for in the same window would essentially ride along for free. I had a project in mind that would need four stepper motors driven simultaneously, ideally controlled by the dev board itself, so a four-channel driver PCB landed on the design list almost by default.

The chip choice didn’t get much thought. The A4988 is the driver on most of the cheap stepper breakouts you can buy, the project didn’t need especially high torque or microstepping resolution, and “use the chip everyone else uses” felt like a reasonable starting point.


Project Timeline

Design (October 2024)

Each A4988 needs eight control signals: seven configuration / status pins plus a step input typically driven with PWM. Four of those tiled together would have been thirty-two GPIO lines, well past what the dev board could comfortably spare, so the obvious move was to multiplex through shift registers. Specifically the SN74LV595AR, the SMD cousin of the 74HC595 I’d used on the alarm clock . One register’s worth of bits per driver, chained in series, clocked out from the MCU.

Single-channel signal routing Initial single-channel routing for the A4988 control signals.

After getting one channel routed cleanly, I tiled four copies together, added decoupling caps at each driver, broke out mounting holes for the dev board to sit on top of, and sent it.

Tiled four-channel layout Final layout. Four A4988s tiled, shift register chain along the bottom, dev board mounting pattern up top.

Assembly & The Shift Register Bug (Late 2024)

Boards came back with thicker outer copper than I’d worked with on prior projects, which made hand-soldering the QFN-style packages slower than expected. The fix was to preheat the whole board on a hot plate first, then use the hot-air gun to flow solder over the IC pads. Solid connections, just slow.

Reviewing the layout in Altium one more time after assembly, I caught something that should have been caught at schematic review: the first and second shift registers in my chain were both connected to the same data-in line, instead of the second register’s data-in being driven by the first register’s serial-out. The chain wasn’t actually a chain. Two registers were running in parallel where I’d thought I had a cascade.

Rather than rework the populated board, I skipped the first driver position entirely and populated only positions two and three for testing. Two channels of stepper drive was plenty to validate the rest of the design.

Assembled prototype Assembled prototype with positions two and three populated. Position one left empty as a workaround for the shift register chain bug.

First Power-On & The Walk-Away (February 2025)

Morning of February 6, 2025, I tried to actually move a stepper with it for the first time, using the V1.1 ATmega32U4 dev board as the controller. The motor didn’t move. Nothing on the scope where I’d expected step pulses, no thermal indication on the drivers, just silence.

I swapped to a known-good Arduino Nano to rule out anything dev-board-specific. Same result. I poked at it for another hour or two before calling it a night.

Late-night debug session The debugging session that didn’t go anywhere.

I never came back to it for a serious second pass, and I never determined the root cause. Best guess in retrospect is that the shift-register workaround left state I wasn’t accounting for in firmware. Running two parallel registers and treating them as a chain in code shifts the wrong values onto the wrong control pins. I never validated that hypothesis on the bench.

In Retrospect (2025 – )

The real lesson from this one isn’t technical. It’s economic. A4988 breakout boards from Adafruit, Pololu, or any of a dozen other vendors run about $5 apiece. Four of them on a strip of perfboard, jumper-wired into the dev board, would have done exactly what this PCB was designed to do. Known-good driver layout, zero risk of a shift-register-chain mistake reaching manufacturing, about $20 of parts instead of roughly $60 for the JLCPCB run. And at the end of it I’d have actually had working hardware.

There’s a class of PCB project that’s worth doing custom: something integrating multiple subsystems, something with a form factor that doesn’t exist off-the-shelf, something that genuinely teaches a new technique. This wasn’t one of those. It was four copies of a circuit that already exists as a commodity module, and the value I got out of it was almost entirely as a negative example. It taught me when not to design custom hardware.

For any future stepper-driving needs, I’m just buying the modules.


Back to Home Page

© 2026 Will's Portfolio

Powered by Hugo with Dream.

Me

Howdy!

I am William Rohren, I am a senior Mechanical Engineering Major at Texas A&M University.

This site serves as a portfolio to display my various projects, as well as a blog so that I can have a log of the things I do.

pic of me

One More Note

I try to do my best to keep this reasonably updated, but my priorities are in the projects themselves. Documentation unfortunately tends to be a retroactive effort.

Changelog

5/11/26 - Content & structure overhaul

9/4/25 - Major content update

4/21/25 - Minor tweaks

3/8/25 - Initial portfolio created

Contact Information

Email: wmrohren@gmail.com

Resume: here (last updated 5/13/26)

Google Sites Portfolio Warning: There’s a reason I abandoned the old portfolio & remade it with Hugo.

Additional Reading

It’s because google sites kinda sucks in terms of how customizable it is. As you’ll see if you visit my old portfolio, there’s a navigation bar at the top, some with drop downs. But as far as the actual content goes, it’s really space inefficient. Under ‘Personal Projects > Big Projects’, to even see the SECOND item requires scrolling past all of the content in the first item.

I didn’t like it. So I thought of trying Hugo, and was given the idea by seeing other people using it (namely various Starforge members Brandon and Ismael to name two examples). I found a theme I liked, with blog-like posts and decided that was a suitable way to display my content.

One last note about formatting, once I have a lot more projects under my belt, I’d like to switch to a grid-like format, similar to one used by mitxela

Anyhow, the google sites portfolio linked above has a lot of my smaller projects on it. From 3D prints to school engineering club events, to VEX Robotics.

I expect that I will make posts dedicated to grouping these together. This is relatively low priority right now though, since the projects I have been able to do in college have been much more impactful than the projects I did in middle or high school. This is mostly related to money, as working on the RPS is allowing me to spend my own money on projects.

Feel free to email with any questions :)