A4988 Stepper Motor Controller

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

Will Rohren

Goal: Learn about higher-powered digital electronics, and PCB design for integrated boards.

STATUS: Finished

Back to Home Page

Motivation

This was a spur-of-the-moment kind of project, because I wanted to batch order multiple PCB desgins from JLCPCB at once. Their PCBs are really cheap, but shipping from Hong Kong can be a bit expensive, so by ordering more at once, I save by only paying shipping once.

At the time I was working on a project which shall for now remain nameless, but it would require using 4 stepper motors at the same time. I also wanted to use my Atmega32U4 devboard to control it, so I started designing with those things in mind.

Design

first design

I chose the A4988 stepper motor controller as my driver only because I was aware of its existance in a lot of stepper-motor-controller breakout boards from Adafruit and other large electronics sellers. I also would not need a ton of torque/speed, so it seemed like a good, well-rounded, choice.

The image above displays the first prototype design for the routing layout of each of the control signals for the chip. For each controller, there are 7 status inputs, as well as an 8th input for each step (typically used with PWM). As such, I turned to the IC that carried the Alarmclock project: the 74HC595 8-bit shift register, or a close cousin, the SN74LV595AR SMD.

first design

After tiling 4 units together, I added some capacitors, added some holes for my devboard, and added a few other features, and I was ready for manufacturing.

Prototype

I got it manufactured, and struggled a little bit with soldering the IC’s on, because of the thicker outer copper, but after preheating with my hot plate, and using the hot air gun to push the solder over the edge, I was able to make solid connections for my first prototype.

I was reviewing the pcb design file in Altium when I took a closer look at the way I set up my shift registers, and realized that the first and second units were both connected to the same data in line (instead of being chained together in series). To fix this, I simply ignored the first slot, and only populated the 2nd and 3rd positions.

second prototype

The morning of 2/6/25, I tried using it for the first time, in combination with the second revision of my AtMega32U4 devboard.

I was unsucessful.

I tried switching my microcontroller to my trusted Arduino Nano, but that didn’t work either. I eventually called it a night, and left it for later. As of 3/1/25, I have yet to make another attempt at getting it to work, and I can’t quite say why it might’ve failed.

late night

As of updating my portfolio, I have since realized that this project was mostly just a quick teaching moment for myself. I thought it was fun to learn about using stepper motors, and controlling them with microcontrollers, but at the end of the day, there’s very little reason for me to design or make my own, since they’re so cheap online. With this in mind, instead of spending another $60 getting another batch prototyped from JLCPCB, I’ll just stick to buying the little modules for $5 a piece.

Back to Home Page

© 2025 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

Contact Information

Email: wmrohren@gmail.com

Resume: here (last updated 8/30/25)

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 :)

One More Note

Please note while I try to keep it reasonably updated, it may not be perfect. I’ve done markdown with the RPS, but setting up a website like this is entirely new to me.

Changelog

3/8/25 - Initial portfolio created Added:

  • A4988 Project
  • Arduino Alarm Clock
  • Atmega32U4 devboard
  • Battery Charger
  • LF3DP
  • PC
  • Photography
  • Plasma cutter (RPS)

4/21/25 - Minor tweaks

  • Added updated resume
  • Fixed dates on all posts

9/4/25 - Major update

  • Fixed categories & tags on all posts
  • Put all images into folders to clean up file structure
  • Added weights to customize order of posts
  • Replaced old resume with the new one
  • Added PBA/SAE Aero/StarTrackerV2
  • Added framework for adding smaller projects from Midd;e/High school
Current Projects

Priority: (Classes must take priority)

  • Personal: N/A
  • RPS: N/A

When I have the time:

  • Personal: Star Tracker V2
  • RPS: LF3DP
  • Dr. Pei’s Lab: PBA-V3