>Cnc_Machine_V1 

Last Edit: Sept. 24, 2020, 2:37 a.m.

I'm to version 1.0 of my CNC. It's a custom design I came up with (with some design input from my buddies curing the design phase) and seems to work pretty well, but there are of course some things I would do differently if I was going to do it again. I'll mention some of those at the end, but for now here it is. I've also got a full BOM with costs at the end.

[machine overview - front](https://imgur.com/m7nM7fA)

[machine overview - side](https://imgur.com/NzhYzYe)

[machine overview - operator panel](https://imgur.com/6sYJBIN)

[machine overview - control panel](https://imgur.com/PhCmCIb)

It's got a travel of 22x18x5 with an ER25 18000 rpm spindle.

The frame is built out of 2" square tubing with 3/16" walls. It's welded (keep in mind I'm no welder, but this ain't the space shuttle either - these welds will be fine) but not all one piece - there are actually three pieces to allow for tramming and machining flat of the axis mounts.. The base consists of the outside rails and 45 degree pieces in the back. The second weldment makes up the y-axis rails and is bolted into the frame at the ends. The third weldment makes up the X-axis rails and vertical risers. The axis weldments are bolted to the base with 4 x 1/2" bolts each. The X, Y, and Z axis are made from 3/4" aluminum plate. The X and Z bearings are roughtly positioned at an 8"x8" square. The Y is at the corners of the 16" plate. I think these large bearing spacings are going to be one of the biggest strengths of this setup.

You can see the mounting configurations for the axis rails [here](https://imgur.com/sQNzwMX) and [here](https://imgur.com/dKh1g64)

The spindle is allegedly 4kw but I don't buy that. I got the er25 instead of an er20 because i figured the bearings would probably be a little bigger in comparison and therefore last longer. I haven't taken it apart to confirm this. I'm also hoping having it be oversized will allow me to run it at lower RPM with less risk of damaging it. So far I've ran it down to 8000 without any obvious problems or overheating, but I haven't really worked it that hard either.

The linear rails are SBR20 round rails. If I had known how I was going to nickle and dime myself along the process of building this I would have went with profile rails - the cost difference would not have been much. As it stands though, these are fine. Although 2" square tubing is not quite wide enough to properly mount them - the aluminum flange bolt spacing puts the screws somewhat into the sidewall and was a problem.

The motors are 425 ozin nema 23 steppers. They came in a kit with no-name drivers. The kit also came with a bootleg version of a usbcnc board that was super sketch. The motors are connected to the ball screws with belts and pulleys. Unfortunately the spacing between the motors and the ball screws does not give a standard belt lengths so I had to custom make them. There are a number of videos on youtube about this, but many of them are complicated and/or not very good looking. I opted for developing my own method based on all the videos I saw. This method is as follows:

1. Mark a length of timing belt for final length by *tightly* wrapping it around the pulleys. 2. Cut the belt about 1" longer than you marked it. 3. Sand off the teeth side to the mark being careful not to damage the final tooth that will remain. This should expose the fibers. Be careful not to over-sand and damage the fibers. 4. Sand off an equivalent length of the back side of the other end of the belt until you expose the fibers. Again, be careful not to damage them. 5. Mount the belt tightly on the pulleys and use flexible superglue to bond the fibers together

This process has proven quite durable with [this](https://www.amazon.com/gp/product/B07KLDKZV7) glue. I also tried regular gel superglue and it was not sufficient.

[Here](https://imgur.com/Gzh4ufJ) is an image of the final motor -> ball screw asembly. Originally I just bolted the nema 23 brackets onto the back side of the ballscrew plates but I ended up welding them to keep them from twisting.

The control panel I had laying around from a previous auction purchase so I used what i had there. I used a automation direct click PLC for the non-realtime IO. I was originally going to use interchangable end effectors with this machine - the spindle that you see, a 3d printer head, a laser, etc and I thought that using a PLC for the IO would give me the most flexibility. Now that I'm just using a spindle, going with one of the mesa IO cards would probably have been a better choice. At any rate, this works and *is* super flexible, if not more expensive than the alternative. The disconnect for the system is on the front of the machine and cuts off the power coming into the panel. I have the computer bios to boot on power-up so this is pretty handy for turning it on and off. From there the power distribution is handled by a 3 phase distribution block - here providing L1, L2, and Neutral instead of 3 phase. A ground bar is mounted on the left side of the enclosure. There is an ethernet switch for allowing the computer and PLC to talk as well as allowing a windows laptop to connect for running the PLC programming software. Vertically on the left, there is the 36v power supply for the stepper motors as well as the VFD that came with the spindle. You will notice a bunch of RM chokes on the wiring to and from the VFD - I got an assortment and threw them on like it was going out of style to help prevent noise. Vertically on the right you'll see a 24v and 5v power supplies along with distribution blocks for them. Along the bottom you'll see the stepper drivers and finally on the bottom right wall you'll see the parallel breakout board for driving the step/direction signals.

The operator panel is primarily a usb keyboard I had (cherry mx blues - very nice), a trackball, and the touch-screen monitor plus the hardware buttons, switches and knobs. The large swtiches are either 2 or 3 position 22mm switches. The rotary knobs for speed override, etc. are encoder pots with a click feature. I'm only using the click feature on the jog speed knob - it allows switching from fast jog to slow jog which can then be fine tuned with the knob itself. All the IO on the operator panel goes to the PLC inputs. The high-speed encoder counting is also done on the PLC, but other logic is done in classicladder on the computer. I ended up getting the monitor on ebay for cheap - it's an old discontinued POS terminal. Unfortunately the cable it came with was for a specific POS computer that had a combined USB and 12v power port. I ended up having to cut the end off and splice it into a 12v and USB connector, but it works fine after that (aside from linux driver issues).

For the computer I'm running linuxcnc with gmoccapy for the gui. Classicladder interfaces with the PLC over modbus tcp and handles IO manipulation. Halui, classicladder, and gmoccapy together handle the physical operator controls. There are some custom things in the config files for that, but it's mostly standard other than the tool setter. The computer itself is an old desktop I had laying around. It seems to do fine with linuxcnc.

For tool length measurement, I've got a microswitch mounted to the right side of the y table. It seems to be pretty repeatable. I've got some custom logic in classicladder / RS274NGC remaps to handle a T## M06 and bring the spindle up to z0, drive over above the spindle, stop the spindle and prompt for tool change, then once acknowledged to drive down, touch the setter, back off, touch again slowly, and then return to where it was. It works really well compared to the bog standard linuxcnc tool change logic that just stops the spindle where it is such that you can't change the tool out or redefine the length.

[Imgur album with some additional images.](https://imgur.com/a/3OQ5KVC)

[One](https://www.youtube.com/watch?v=VbedaJtAwM4), [Two](https://www.youtube.com/watch?v=hrq0Bb3MlnI) videos of it in action

If I were doing this again:

All in all this has been a rewarding projects and I've got a machine that I can do some real work with - I've tested it with aluminum and it seems to do pretty well. Wood is a nothingburger. Steel destroyed the end-mill I tested it on - RPM too high I presume, I'll have to do some more testing on this goning forward to see what I can do.

The total for this build came out to ~ $2,200 not including the parts I already had (computer, panel, etc...). You can see a BOM [here](https://docs.google.com/spreadsheets/d/1FC-kP7o2zmTJLG4Uy0ccZtAUUYINo6dF7vrFJuSBrrc/edit?usp=sharing)

Statism: Ideas so good they have to be manditory