ECE 110/120 Honors Lab Section : TrashCNC Machine with Encoded DC Motors

Name

NetID

Section

Mihir Vardhan

mihirv2

ECE 120

Ben Olaivar

Olaivar3

ECE 110


Statement of Purpose

Our goal is to make a tri-axis CNC machine capable of utilizing a spindle to carve into wood and various other materials. As we work on personal projects, we find ourselves needing sturdy supports and precise drilling that our 3d printers just can’t provide. Carving out of wood or metal simply isn’t an option with what we currently have. Creating this CNC machine will allow us to make more complex designs for future projects.

Other groups focus on single-use devices that have one specific purpose. Once operational, we can convert our machine from carving, to embroidering, to pancake-making. On top of this, we are using non-conventional designs to make our project cost-efficient.


Background Research

We were inspired to take on this project by a youtuber named HomoFacien. His channel is full of informational videos on how to make high quality machines with (essentially) trash. We’ve found an interesting way to convert standard DC motors into stepper motors by salvaging components from recycled printers, and have found numerous ways  to cut price across the board while maintaining quality performance. While our focus in this project is to get a working prototype with a spindle, our main goal is to be able to modify this machine to do various other tasks, such as embroidery, which Mihir has prototyped at home. 


 Block Diagram / Design



Our Arduino uses a basic H-bridge driver to control the x and y axis. A 12V power supply is connected to the H-bridge to power each axis.


Our Arduino has a modified version of the GRBL code from a standard CNC machine. The Arduino controls each axis to ensure accuracy in each uploaded design. Our primary GRBL code utilizes input from digital encoders to simulate steps in a stepper motor. 


System Overview

As we do not want to reinvent the wheel, we will be using the standard GRBL firmware most CNC machines and laser cutters use. However, instead of having the arduino communicate with multiple stepper motor drivers like the A4988, we will replace these with an arduino nano. This arduino nano will take the standard step and direction input the A4988s take but instead control a DC motor with a PID loop getting absolute position feedback from our encoder set up. To control our DC motors, we will be using 2 dual H-bridge drivers. 

Along with the encoders, we will have limit switches on the X and Y axis to home the machine. The Z axis will have to be manually zeroed in depending on the thickness of the material to cut.

Finally, we must control the spindle motor. The battery powered spindle will be turned on and off using a relay module through one of the free GPIO pins on the arduino running GRBL.


Results

In this section provide the characterization of your sensors and actuators. Also provide the results of any test you have conducted with your system that verifies its functionality.

 


Our resulting CNC machine is mostly operational. Unfortunately we couldn’t get our digital encoders to work, but our DC motor design is still capable of creating basic designs and shapes. We built our frame out of wood and scrap metal found in our shed. We learned how to use an arc welder to secure each axis in place.

 

As seen in the image above, our CNC machine can complete simple designs, such as squares and circles.


Problems / Challenges

This entire project is riddled with challenges. To make sure we weren’t biting off more than we can chew, we actually managed to successfully convert a DC motor to a stepper motor using a salvaged encoder and an arduino nano which takes step and dir as inputs.

Our biggest issues throughout this project were primarily construction related. We quickly found out that if we wanted our system to be sturdy, we would have to weld our frame together. Neither of us knew how to do this, so we spent a considerable amount of time practicing our arc welding on scrap metal from the shop. We utilized the various tools in our shop, such as a sable saw, band saw, drill press, angle grinder, and belt sander to design our machine. With these tools at our disposal, we felt confident that we could construct a sturdy frame.

Another challenge we faced was the speed of our axis. In its current state, our CNC machine moves at a snail’s pace. While this does not affect the functionality of the machine, it certainly tested our patients. In the future, we plan on using stronger stepper motors that are capable of reaching faster speeds.

Finally, our greatest issue was with the digital encoders. Unfortunately, we were not able to accurately replicate the behavior of a stepper motor with our DC motors. This negatively impacts the accuracy of our final design, as we can currently only do basic designs and shapes. Though despite this setback, we successfully implemented the concept of using DC motors to actuate each axis. Although it isn’t as precise as stepper motors, it is a great start.


Future Plans

In the future we plan on successfully implementing our digital encoders, as well as upgrading our DC motors. By incorporating digital encoders into our design, we’ll be able to make more detailed designs, and improved motors will significantly reduce the time to complete each project. Both Mihir and I will be in town over the summer, so accomplishing these goals soon can be easily done.


References

Youtube. 2021. Rotary encoder or: How to build a digital servo using an Arduino and photo sensors. [online] Available at: <https://www.youtube.com/watch?v=XIUrnR8bLAI&t=0s> [Accessed 19 February 2021].

Youtube.com. 2021. Rotary encoder - sensor arrangement. [online] Available at: <https://www.youtube.com/watch?v=dPBKTZw_xi4&t=0s&ab_channel=HomoFaciens> [Accessed 19 February 2021].

Youtube.com. 2021. Revision v2.1 of my DIY CNC made with simple tools and cheap materials. [online] Available at: <https://www.youtube.com/watch?v=tAusnFPgOcA&ab_channel=HomoFaciens> [Accessed 20 February 2021].

Youtube.com. 2021. Homemade CNC machine with materials from a DIY, built with simple tools. [online] Available at: <https://www.youtube.com/watch?v=mJ-TZvFpY58&t=0s&ab_channel=HomoFaciens> [Accessed 20 February 2021].

Youtube.com. 2021. Homemade CNC machine v0.5 with materials from a DIY, build with low tech tools. [online] Available at: <https://www.youtube.com/watch?v=f4ptBpVOSuY> [Accessed 19 February 2021].

Youtube.com. 2021. Encoded Motor With Arduino. [online] Available at: <https://www.youtube.com/watch?v=zZ40o9QnoUY&ab_channel=NikodemBartnik> [Accessed 20 February 2021].

Youtube.com. 2021. CNC v3.2 the mechanics and tools needed to make a personal copy. [online] Available at: <https://www.youtube.com/watch?v=eT9iDO0I7d8&ab_channel=HomoFaciens> [Accessed 19 February 2021].


Comments:

Hey guys! Looks like a really useful and fun project. I think the parts list you have is really well thought out and the diagram is really nice. 

You guys seem to have a lot of good inspiration and a good amount of background knowledge. I'll approve your proposal!

Posted by dbycul2 at Feb 23, 2021 21:40