I’m sharing my adventures into researching, designing, building and debugging my CNC machine. Hopefully some of these lessons will save time for the next person taking on this adventure. I’m providing a step by step instruction build guide from memory so there may be a few steps out of sequence. I also discuss how I approached design, some of the pitfalls, software decisions, electrical wiring and debug learnings along the way. Hopefully this will address some questions you have if you are considering designing and building your own CNC. This project isn’t for the faint of heart. There is a fair amount of skill needed in the part fabrication, but with a reasonable workshop and honed skills, it is very doable.
Step 1: Step 1. Overview
I’ve been wanting to build a CNC for over a year. I scoured Instructables, Pinterest and YouTube videos for design concepts and layouts. I had a limited budget ($1500) in mind, and I wanted to use linear rails and ball screw for its rigidity, accuracy and repeatability. I didn’t have access to a mill or lathe, so my machining capability was limited to a floor drill press, band saw, table saw and a healthy assortment of power hand tools. For the actual design, I used SolidWorks.
Disclaimer. I’ve attempted to freely share everything I have. I make no guarantees. Hole locations, part sizes, actual purchase part differences, wood thickness all contribute to parts not fitting correctly. You should check all design / geometry with your actual parts. I'm providing pdf's of all the fabricated parts, (not the purchased parts). I will not be supplying CAD geometry or .dfx files.
Step 2: Step 2. Design
a. I wanted a working area around 20” x 30” and 2 drivers on the Y-axis to avoid any racking. I settled on 20mm linear rails (SBR20’s) and 16mm ball screws (RM1605’s). I chose supported rails versus suspended rails for their stiffness. I lost about 6 inches (about 150mm) of travel due to the spacing on the bearing blocks. For the Z-axis, I only wanted about 6 inches of travel so I had to ask the eBay vendor to modify one of the standard offered packages. I purchased SBR20’s at 300, 700, and 1000mm lengths. The RM1605 ball screws ended up being: 350, 750 and 1050mm. For the frame I used 3060 (metric) aluminum extrusions. The slots on the 3060 metric extrusions exactly line up with the mounting holes (30mm spacing) on the SBR20 linear rails. I had to request the holes drilled in the linear rails because this vendor did not drill them by default. Most other vendors predrilled the rails. I needed the rails and drive screws on hand before I could finalize some design dimensions. The spacing between mounting surface for the rails and the linear screw is a very convenient (50mm) when using a ball nut housing bracket (see diagram). A 5mm spacer block created perfect spacing for the rail support and screw drive system.
b. The support frame was designed from 3060 (metric) aluminum extrusions. This provided the support for the table and the Y-axis. I was able to order the 3060 (metric) aluminum extrusions cut to size from a shop in my home town. I considered it a bargain at $90. The ‘feet’ for the CNC is ½” Baltic birch and also provided support for the two Y-axis motors which I mounted in the back. My original intent was to mount all the motors on purchased standoffs, but the birch was too soft to support the ¼” diameter standoffs on the X and Y axis. The standoffs with fender washers might have worked. Motor mounts were designed and fabricated from 3/8” Baltic birch.
c. The X-axis was designed similarly to the Y-axis, using the 5 mm spacer and ball nut housing bracket. This time the 5 mm spacers were under the linear screw bearing blocks instead of the ball nut housing bracket. The gantry back plate was designed to be as tall as practical to provide side load stiffness. The attached design calls for ¾” Baltic birch plywood. I used ½” but wish I used ¾”. I also tied the vertical gantry supports together underneath the frame for additional stiffness.
d. My CNC design also incorporated 2 small platforms for the cable drag chains. The table top had an initial MDF surface that attached to the 3060 frame and then another layer that incorporated aluminum T-slot groves to be used for hold downs.
e. The Z-axis mount and z-axis motor mount plate were made from ½”and ¼” aluminum plates. I designed the Z-axis plate around a ‘standard’ size plate that I could purchase. I also provided space for clear lexan side shields to minimize the dust from reaching the bearings.
Step 3: Step 3. Part Fabrication
a. Most of the CNC was fabricated with ½” Baltic birch, the only exception being the Z-axis mounting plate and its accompanying motor mount. I designed the Z-axis mounting plate around a size I could purchase on eBay without any resizing (1/2” x 6” x 14”). I then was able to machine all the metric holes and counter bores using a full sized printout for the hole placement. Instead of trying to measure and scribe the hole locations on the plate directly, it appeared more accurate to print a full sized drawing, aligning the drawing to the aluminum plate, and marking all the hole locations with a center punch. For the machining, I would start with a centering bit and then use the appropriate metric bit and counter bore. Part of the fabrication then involved purchasing metric hole taps, drill bits and counter bore bits for 5mm and 6mm cap head screws. In hind sight, I should have purchased the metric drills and taps from McMasterCarr. The AliExpress drills in the tap set were worthless, but the taps were OK. The counter bore bits were unique but worked very well. The Z-axis motor mount plate was the only other plate I fabricated with ¼” aluminum. I cut the aluminum to size with my band saw and marked the hole locations again using a full size drawing. I purchased a whole saw for the large coupling opening.
b. The vertical gantry supports were made by gluing two ½” Baltic birch together to double the thickness and cutting to size using the table saw and band saw. All holes were located using full size drawings. Sometimes the drawings were pieced together, because I could print drawings only up to 11” x 17”.
c. As mentioned earlier, the Y support plate was sandwiched between the 3060 extrusion and the linear rails and ball screws and made of ½” birch. The gantry back was made of ½” Baltic birch also, I figured it was strong enough with the stiffness of the linear rails. In hind sight, this should have been ¾”, the plans reflect ¾”. The ‘feet’ were also fabricated from birch and also supported the 2 X-axis motors. I made the motor mounts for the X and Y axis out of birch also. Though the motor mounts provided good support, the access to the motor coupling was challenging.
d. I latex painted all the exposed wooden parts with my favorite color: Kelly Green. I then sprayed on a semi-gloss clear coat to give it a little shine and durability.
e. Having the major components on hand is a major step, but nothing gets started without hardware. Determining what hardware, where to purchase it from, what sizes was very painstaking. Everything was metric so I ordered everything between AliExpress and eBay. I used 90 degree brackets for the 3060 framing attachments. Most hardware was 5mm and 6mm cap screws but I needed various quantities at different lengths. Also determining the mounting nuts for the 3060 extrusions were painful. I ended up with sliding t-nut blocks for the feet and Y-axis linear rail attachment, T-screw bolts for the 6060 frame corner brackets and rotating sliding T-nuts for the top surface. All hardware took 2 to 3 weeks to come from China.
Step 4: Step 4. Assembly
a. Once I had most of the parts fabricated and all of the hardware, assembly started. I started with the frame. Actually, the first step was mounting the Y-axis linear rails (and ball screw nut) and the ‘Y screw mounting plate’ to the 3060 extrusion. I used the T-sliding nut blocks (see picture), so they had to be slid onto the 3060. With mounting plate in the way, it was best to build the frame upside down. Next, the 2 cross bars and X-direction extrusions were assembled with the corner brackets and T-screw bolts. This was pretty straight forward; the only detail was getting the offset dimension for the x-direction bars to provide the clearance for the drag chain support.
b. Next mount the 4 end plates. Again these get secured using the T-sliding nut blocks. Each plate is different: the two front ones are mirror images of each other because of the countersunk holes. I actually messed up one of the rear motor mount plates, they are NOT mirror images of each other. It’s also best to machine the flats onto the linear screw drive shafts (and motors) before mounting them. Attach the ball screw nut to the ball screw, tighten the locking nut on the bearing block then mount the 2 Y-axis screw drives to the Y screw mounting plate. At this point you can rotate the frame right-side up.
c. Next I mounted the ‘side supports’ to the Y-axis bearing blocks. I didn’t attach the screw drive block until the very end. You want to put everything together to make sure it moves freely before attaching the linear screws. Check that the gantry plate mounting surface is perpendicular to the top. I then mounted the ‘gantry back plate-wood’. I made it longer than it needed in anticipation of cutting it to size. I made sure the gantry supports were perpendicular to the table top, cut the gantry back plate for length, clamped everything in place, then pinned and screwed it.
d. Attach the x-axis linear slides and the linear screw to the gantry back plate, along with the 5 mm spaces. At this point I temporarily attached the screw drives to side gantry supports. Rotate the screws so the gantry back plate is in line with the rear motor mount plates then rotate the whole frame up to rest on the rear motor plates and the gantry back plate. You will have to use spacer blocks to avoid contacting the end of the screw drives. Attach the ‘side support bottom tie in’ after making sure it’s all square (X is perpendicular to Y)!
e. Rest the frame back on its 4 feet. Detach the Y-axis ball nut from the gantry side supports and make sure the gantry runs freely. Attach the Z plate to the X-axis slides. This is where I had a few issues. When tightening the 4th set of slider blocks, the movement started binding. My only purchased aluminum plate must have been warped. I could not find a set of shims to eliminate the problem, the 4th set remains loose to this day but does not affect operation.
f. Attach the remaining z-axis linear slides and screw drive (and nut) to the Z-plate. The router plate was made by doubling up the ½” like the side gantry support. The router plate movement should be tested before attaching the ball nut. I also created the clamps for the Porter Cable router. I added holes to gain access to the X-axis ball nut.
g. Mount the ¼” aluminum Z-axis motor mount plate. Attach the 4 motor mount standoffs to the z plate motor mount before mounting it to the Z-plate. Mount the Z-axis motor and coupling.
h. Next I mounted the motors for the X and Y axis. I ended up building spacer boxes with 3/8” Baltic birch to mount the motors. They were strong enough and easily pinned and screwed in place but, these boxes seriously restricted access to the motor coupling set screws. There is room to improve this portion of my design.
i. Installed the limit switches, drag chain support plates, drag chain support and drag chain. It’s best to wire the Y-axis limit switches before installing the work surface. Wire the rest of the limit switches and motors. Run the cabling through the drag chains back to the electronics box.
j. Installed the table top: This did not go smoothly. I had to precisely drill 23 countersink holes. I could not use the CNC because the attachment points are beyond its reach. I used the turning t-nut. So assembly involved attaching all of the screws, aligning the nut to the slot and trying to place the top on and have every single nut fall into the slot. I needed a mallet to persuade some. In hind sight: I could have placed the nuts in the slot in the approximate location, placed the top on and then used a rare-earth magnet to position the nut and then insert the bolt. I then screwed in an additional surface with the t-tracks. I added the clear side shields to the top and attached the base side plates.
k. The mechanical assembly is now complete. I had to go back and tighten the locking nut on the fixed linear blocks (BK12) to reduce the backlash. I also replaced the set screws with cap screws in the fixed linear blocks (BK12) to be more secure.
Step 5: Step 5. Electronics
a. Motor sizing became another big question. I had no idea what size motors I needed. I have hopes of machining aluminum someday, so 425 inch-ounce torque sounded reasonable. I ended up purchasing a 4 motor system from eBay that came as a kit. Buying all as one kits reduced the concern about matching all of the components to each other. The kit came with two 36V power supplies, four 425 in-oz stepper motors, 4 motor drivers (DQ542MA) and a DB25 breakout board.
b. I fabricated a wooden box with clear plastic windows. I’m sure this violates all safety codes, but it provided easy mounting at an affordable price. I designed it with an exhaust fan to keep down the heat and I provided input air through a heating vent filter mounted on the opposite side. I installed a switch (and a junction box) which powered the 120V to the 36 volt power supplies, 5V power supplies and an indicator light.
c. Electrical diagrams were not provided with the components, but were provided from the distributor after dealing with a few start up issues. For some reason, the “enable” inputs were not needed in the wiring on the drivers for the 4 axis system. The dip switch setting and the complete wiring diagram are provided in the attached files.
d. I used 6 limit switches (for each extreme on each axis). I set up 3 of them independently (X home, Y home and Z home), so that consumed 3 out of the 5 inputs of the breakout board. The other 3 limit switches were wired in series, and the E-stop consumed the 5th input. I have no inputs left for tool zeroing. All switches were wired, normally closed. See the wiring diagram.
e. Mach 3 software appeared to be a standard for machine control so I purchased an ’old’ Dell Optiplex 745 with a dedicated video driver. The most important part; it had a parallel port which is what’s is needed for Mach 3. I had Windows 7 (32 bit) installed. Mach 3 supposedly only runs on 32 bit machines. Even though this machine met the minimum requirements, the motors do not always run very smoothly. I can hear motors skipping by just running the task manager. Every time the process window would update, the motors would chirp. I’m considering a ‘smooth stepper’.
f. Motor driver dip switches were set up for 2.84 amps (dip switches 1-3), half power holding torque (dip switch 4) and 400 steps per rotations (dip switches 5-8). When the holding torque was set to full power, the motors would get hot. One characteristic about these stepper motors is that the more steps per revolution, the lower the torque, so it’s advantageous to minimize the steps per revolution. The linear screw pitch is 5 mm per revolution, 400 steps per revolution provided a precision of about .000492”/step resolution or 2032 steps / inch.
g. I have Mach3 set to 25,000 Hz. Before installing the motors to the screw drives, I could not get the motors to run reliably without stalling or freewheeling. I really don’t know what the correct term was, but it would not run reliably. If anything else runs on the computer everything starts choking. This computer seemed to meet the minimum requirements but would choke if anything else was running. I don’t have it connected to any network, so It doesn’t get bogged down with Microsoft or virus updates. I usually start the computer 10 minutes before I want to use it so Microsoft can settle down. The top speed I have set is 60 inches per minutes. I would like to double this, but I have been hesitant. Any suggestions would be appreciated. Is there a maximum RPM for stepper motors or do I need the ‘smooth stepper’ to increase the speed?
h. One of the four motor drivers was defective which got replaced after sharing a video of it not working with the vendor through a YouTube video. The Chinese vendor was very responsive and then provided the wiring diagrams and answers to my questions about holding torque (dip switch #4).
i. I considered buying a Warp9 ‘smooth stepper’ to improve the speed, but I could not get straight answers to simple questions from a US supplier. I may still try this board in the future. I’d like to know if the board buffer’s commands (and the calculations for stepper movement) along with supplying the clock for the drives? If the board only supply’s the frequency generator, doesn’t Mach3 still have to generate the pulse commands?
j. I had also planned on using a different breakout board (BOB) than the one supplied with the motor kit. I wanted to use one with a built in relay for spindle control. I purchased it, hooked it up and was able to run the motors OK, but none of the input sensors worked. I returned it to Amazon and got a replacement thinking it was defective. The second one didn’t work either. Trying to do the troubleshooting, I discovered that my parallel port only put out 3.75 volts versus 5 volts. To this day, I didn’t know if a 5V parallel would have worked. I got a reply on my Amazon comments, that I had to provide a 5V to the sensors. I have never seen any wiring diagram with this board that required 5 volts to the sensors. It’s still a mystery to me.
Step 6: Step 6. Software
a. As mentioned, I have an old version of SolidWorks for the CAD which meets all of my designing needs. The parts are designed in 3D and can also create assemblies.
b. The second software required is something that turns the CAD into CAM. I’ve been using a trial version of CamBam ($149). This software is best for 2D or 2.5D parts. I have not tried the 3D from .stl files. CamBam could use a definite update to the user interface. It is awkward to use but has plenty of features. It is cumbersome and the user is prone to making mistakes when in a hurry. CamBam can work from a .dfx file which SolidWorks can create. Be sure to create the dfx drawing at full scale, otherwise you will have a scaled part. Once you import the .dfx file into CamBam, you have to define the material thickness, tool characteristics, features to cut, etc.
Vectric has a couple of nice looking programs (Cut2D (desktop, $149) and (VCarve desktop, $349)). These programs have a much better user interface than CamBam. I’m considering VCarve for its sign making capability. I can’t afford any of their professional programs they offer unless I go into business. Aspire is a whopping $1995, not for the hobbyist.
c. Then you need a program that reads the CAM file and turns it into machine motion. Mach3 is one of the standards, so I purchased a license for it. You can run up to 500 lines of code with the free trial, but that doesn’t get too far especially if you want to do text. It was a little tricky setting up the dual Y-axis. I used the A-axis to run as a slave to the Y-axis. The CNC almost tore itself apart when I accidently hit ‘auto home’ and I didn’t have the slave axis to follow the y-axis. E-stop to the rescue!
Step 7: Step 7. Results
a. I’ve been making parts a few months now. Actually most of the parts I’ve made are for the CNC machine. I made the e-stop housing, a monitor and keyboard support and 2 iterations of a dust shoe. I still need to more tweaking to enable inlays. I’m trying to improve dust removal with different dust boot designs and I hooked up a cyclone dust separator (which works great) to my ShopVac.
Step 8: Step 8. Lessons Learned / Issues
a. Rewiring the limit switches
Once I was up a running, I started making pretty simple parts. For reference, all the limit switches and E-stop are wired ‘normally closed’. This is considered ‘best practices’. Since the breakout board only has 5 inputs, I had to wire 3 limit switches in series (see wiring diagram). Sometimes in the middle of a run, Mach3 would stop and indicate that a limit switch had been hit. Though it wouldn’t tell me which limit switch was triggered. I figured I had a loose connection somewhere, since I wasn’t anywhere near any limit switches. I checked and wiggled all connections and didn’t find any issues. Long story: I think it was electrical noise on the line. To save money, I had used lamp cord and speaker wire for the limit switches. I replaced all the limit switch wiring with 2 conductor shielded cable and I grounded the shielding. I haven’t had an issue since.
b. Another limit switch issue:
On one occasion I accidentally triggered one of the limit switches and it stopped the stepper motor as expected. The problem is now that the limit switch is triggered, how are you supposed to power up the motor to move it off the limit switch? I had to short the switch to move it off of the switch. This could be painful for the hard to reach Y-axis limit switches.
Step 9: Step 9. Conclusions
a. It’s been a great project. I’m very satisfied with my design. Future possible upgrades include aluminum gantry support and x-axis back plate, a smooth stepper and possible Vcarve Desktop.
b. I hope this has been informative. I’ve shared my design approach, fabrication approach, electronics learnings, software requirements, and lessons learned. Now, go make something!
c. Total cost about $1400 without software or computer.
UPDATE: I've added some images of completed projects: Beauty and the Beast Rose Pedistal, Dust boot, bottle openers, and Railroad brdige book ends. I'm also using Vectric V-Carve Desktop now, which I love. It's a perfect choice for inlays, as seen in the bottle openers. I also rewired my limit switches to gain a port for a zero plate I fabricated.
UPDATE 2: 1-2018 fabricated aluminum sides and gantry back. All cut on the CNC. Future upgrades: 2.2Kw spindle.