Motor Control

Full Stepping

The first problem we ran into when initially testing our system was getting the stepper motors to work. After we learned how to set up our driver to fullstep instead of microstep, and that we had to output a digital signal to our driver instead of an analog PWM signal, we were able to drive our motors how we wanted to. We were soon running two motors simultaneously and were therefore able to get our system to move the pen to any XY point specified.

Frying Drivers

Next, we implemented a third motor to move the pen up and down and were able to get it working. There were some minor errors but it was finally working. However, not soon after, our motors stopped working one by one. After much troubleshooting we realized that we had fried the drivers. We believe that this was the result of faulty wire connections in our system. A wire coming loose whilst the drivers are being powered is likely to result in permanent driver failure.

Unexpected Delays

One hold up we ran into that exacerbated matters was that many of our parts didn’t arrive on time. We didn’t have our motors or our drivers until the three days before our due date. This ultimately didn’t prevent us from building or coding most of it, but it did mean that we weren’t able to start completely integrating everything until later than we would have liked so the failure of our drivers left us with one day to fix the problem. We borrowed drivers from Professor of Mechanical Engineering Rob White (Tufts University) and changed our code to interface with them.

Ultimately, however, we were never able to get all 4 motors working at the same time. The last motor missing was the motor used to grip the pen. At one point we had it working but soon after we began having trouble with the motor that controlled the up-down motion of the pen. And when we had that motor working, we then began having errors with our motors controlling XY motion. It essentially became a game of whack-a-mole that we were not able to solve before our final design presentation.  

Designing from Scratch

One of the biggest mechanical challenges we faced was building the system for XY motion ourselves instead of buying or modifying an existing product. We designed and implemented a rack and pinion system using 80/20 and lasercut racks. (We specifically chose the size of our 80/20 so it could interface with available acrylic sheets.)

Processed with VSCO with hb1 preset

To keep the structure stable in the ‘Y’ direction we had one side supported by the driving motor and gear while the other side was supported by a linear bearing that slid along a rod.

Processed with VSCO with hb1 preset

In the ‘X’ direction in addition to the driving motor we had three free rotating gears that supported the weight of the pen mechanism.

Processed with VSCO with hb1 preset

The vertical motion had to be able to support the weight of a stepper motor. We used a lead screw mechanism for this as it wouldn’t entail relying on holding torque of the motor. The downside of this approach was that it ended up being quite slow and may have resulted in some inconsistencies.

Overall, designing from scratch was great learning experience for mechanical design, but it did result in a lot of time spent fixing structural issues  leaving less time to deal with integrating the electronics and coding.