top of page
Nathan Selian: Mechanical Engineering
Stepper Motor Control
To begin this project, we broke out into groups of 4 to begin learning how a stepper motor works and how to control it with an Arduino. Using an L298N motor driver to deliver power, an Arduino UNO to execute code, and a NEMA 17 stepper motor; we were able to able to hardcode a basic program that sequentially energized each of the motor's coils to make it spin. By playing with some of the parameters, we were able both change the speed as well as the direction of the motor.
While this code was capable of making the motor move and taught us the fundamentals of how stepper motors work, it was also incredibly clunky and couldn't be easily implemented in larger programs where more control was needed. Thankfully some clever engineers had already thought of this before us, so all we would have to do is use Arduino's built in stepper library to significantly simplify our code.
Later on in the project we would an MKS board, essentially an Arduino mega with motor drivers built in, to power multiple stepper motors. Loaded with custom firmware, we could connect the MKS board to a 3D printer software on our laptops which allowed us to control the stepper motors with G-Code.
Linear Stage Design
The next phase of this project involved designing and building a linear stage, turning the rotation of a stepper motor into controlled linear movement. For materials, we were given sheets of foam board, hot glue, a stepper motor, a lead screw, a lead screw nut, a flexible shaft coupler, and two support bearings. This simplified our design process tremendously as the mechanical components realistically only fit together in one way: with the lead screw supported by the two bearings, the nut on the lead screw between the two bearings, and the stepper motor connected to the lead screw with the flexible shaft coupling. The only design choices left for us to figure out were the linear stage chassis, platform, the spacing of the bearings, and how to fix the rotation of the lead screw nut.
The spacing of the bearings was the simplest of the decisions we had to make. Since the travel of the lead screw nut is constrained by the location of the bearings, we spaced the bearings as far apart as possible to maximize the travel of our linear stage.
For the chassis and platform, there were a few more decisions that we needed to make. We fairly quickly decided that making the chassis as rigid as possible would be very important as this would greatly effect the precision of our linear stage. To achieve this, we settled on an open topped box frame as this would provide rigidity and prevent the linear stage from significantly flexing under its own weight. The other advantage of this design, is it allowed us to directly support the moving platform on the chassis, thus greatly improving the stability of the our platform compared to other group's designs. Because the rotation of the platform was already constrained by the chassis, all we had to do to constrain the rotation of the lead screw nut was attach the nut to the platform. Sticking with the theme of rigidity, we made sure to brace this connection so that the movement of the nut would be rigidly coupled to the movement of the platform.

Putting it Together
With our Linear stage complete, all we had left to do to create the pen plotter was combine our linear stage with two other linear stages from other groups and a pen actuator supplied by the professor. Because our linear stage was significantly sturdier than the the other two stages, we decided to use ours as the Y-axis gantry as it would only be supported on its ends, whereas the other two X-axis stages would be supported along their entire length by the table they were resting on.
With the plotter complete, all that was left was wire it up with the MKS board and see it in action. Initially, we controlled the movement by manually inputting G-Code commands; which while effective, was time consuming and made complex designs difficult to achieve. To solve this problem, we were able to use a program called F-Engrave to convert .png images into G-Code. As our final demonstration, we had the plotter draw two images: one was a dinosaur supplied by the professor, and the other a beautiful mountain scene drawn in ms paint.


bottom of page