Mini CNC Milling Machine




Introduction: Mini CNC Milling Machine

Hi friends! In this Instructables, I’ll show you how I designed, fabricated, assembled, and got running this mini CNC milling machine. I love fabricating and I wanted to make a (relatively) low cost CNC mill to have at home during the pandemic. I also want to give a big shout out to the Jacobs Institute for Design Innovation and UMakers Makerspace for providing me the resources for this project. Additionally, inspiration for this project was drawn from these projects: [1][2][3]


Here is a link to a spreadsheet for my bill of materials. It includes the quantity of individual parts in case you already have access to some, as well as links for some of the parts I bought. The parts for this project cost me approximately $375 not including my makerspace fee.


  • CNC Router
  • Hand drill
  • Drill bits for pilot hole for wood screws
  • Hacksaw/other type of saw (for possibly cutting the linear rod and lead screws)
  • Allen keys (listed in the bill of materials)
  • Very little soldering
  • Wire cutter/stripper
  • Multimeter

Step 1: Design

I made this frame using a CNC router with 0.5in (~12mm) thick plywood. I was able to use the shopbot at my local makerspace UMakers in Claremont, CA. This design would be difficult to cut with hand tools so if you don’t have access to one I would suggest trying this design instead.

Additionally, if you are interested in making modifications to this design, I have attached the Solidworks (2020) files and a step file here.

Step 2: Fabrication

I made the toolpath using Fusion360 and have attached a step file of just the frame laid out flat as well as the .f3d file with the CAM for the tools I used. For this toolpath I used a 1/8in flat endmill with a feedrate of 3in/s=180in/min. The parts can be cut out of a 25inx17inx0.5in plywood sheet. It will cut 0.04in into the spoilboard and I put in a lot of tabs. I attached the gcode file for the shopbot but I recommend going into the file and double checking and adjusting the settings to your preferences. All the files can be found here.

Step 3: Assembly - 1

Now the assembly for this design can be a little tricky because we want to ensure that there is no binding or extra friction in the moving parts. Because we are using wood screws to assemble the frame, it is harder to ensure that everything is at 90deg angles. For each axis, before it is screwed together, we want to put in the linear rods to make certain that it will align and then add the wood screws.

First assemble the base (without adding the wood screws) and loosely screw in the four x-axis linear rail supports with M5x20mm screws and nuts. Then add two 300mm linear rails and tighten the screws. It is important to put in the linear rails before using the wood screws to ensure alignment.

Step 4: Assembly - 2

Drill pilot holes (not pictured) and then the wood screws as shown in the photo. If you don’t use pilot holes you run the risk of splitting the wood.

Step 5: Assembly - 3

Now connect the y-axis pieces (without wood screws) and add the four linear rail supports and two 300mm linear rails.

Step 6: Assembly - 4

Now add pilot holes and the wood screws.

Step 7: Assembly - 5

Add the x-axis nut holder piece, drill pilot holes and then add in the wood screws.

Step 8: Assembly - 6

Screw in the lead screw nut using M3x20mm screws and nuts and the linear bearings using M4x16mm screws.

Step 9: Assembly - 7

Now remove the x-axis linear rails from the base and place the y-axis carriage such that the linear rails can be slid through the linear bearings and tighten the screws to fix the linear rods in place.

Step 10: Assembly - 8

Screw in the pillow bearing block using two M5x16mm screws and nuts as well as the x-axis motor using four M3x12mm screws. Then add the motor shaft coupling. After, slide the lead screw through the bearing end (you may need to loosen the set screw), thread it through the lead screw nut and into the shaft coupling. If you’re having trouble getting it to fit you may need to loosen the linear rails or the linear rail supports to get it to all line up.

Step 11: Assembly - 9

Additionally, you can add the y-axis motor and pillow bearing block.

Step 12: Assembly - 10

Similarly, with the z-axis carriage, assemble the pieces, add the linear rail supports and linear rails before drilling the pilot holes and adding the wood screws.

Step 13: Assembly - 11

Next add the y-axis nut holder piece, drill pilot holes and then wood screws. Then add the lead screw nut.

Step 14: Assembly - 12

Now when adding the linear bearings put the linear rails through before tightening the M4x20mm screws to ensure they are aligned. You may have to loosen and tighten again when they are on the y-axis. Additionally you can add the z-axis motor and pillow bearing block.

Step 15: Assembly - 13

Next, take the z-axis nut holder and screw in the lead screw nut. Then add that piece to the z-axis carriage. After, drill a pilot hole then add in the two small wood screws.

Step 16: Assembly - 14

Place the M6 screws in their pockets before putting the linear bearings on top and screwing them in with the M4x20mm flathead screws. Tighten the screws so that they are flush with the wood.

Step 17: Assembly - 15

Screw in the spindle clamp. You may have to tilt the part to ensure the screws will engage with the M6 nuts.

Step 18: Assembly - 16

Now slide the x-axis 150mm linear rods through the linear bearings to connect to the z-carriage. Then slide the 150mm lead screw through the pillow bearing block and thread it through the nut and into the coupling. This part was the trickiest for me to get aligned. It may require some loosening or even adding the spindle after the lead screw is threaded in.

Step 19: Assembly - 17

The last step is to get the z-carriage onto the y-axis so repeat the process again of taking out the y-axis rods and sliding them through the linear bearings then threading the lead screw through the nut and into the coupling. After everything is put together ensure that all the screws are tightened very well including the coupling set screws and especially everything on the z-axis.

Step 20: Assembly - 18

The very last thing you will want to do is slide the spindle up in the spindle clamp so that you have as much z-range as possible. To do so, loosen the M6 screws (not so much that it completely unthreads from the nut) and use a flathead screwdriver to widen the space in the clamp and slide the spindle up. Then tighten the M6 screws and you’re finished with the assembly!

Step 21: Electronics

For the microcontroller+breakout board you can go with either the Arduino Mega 2560 + Ramps 1.4 or the Arduino UNO + CNC shield expansion board. The latter is cheaper and perhaps better for this purpose and the former is more typically used for 3D printers. I will be using the former because it is what I had access to at the time (though I would probably go back and change that). If you are interested in the latter option, there are many resources for how to use that.

Step 22: Electronics - 1

Motor wires

Firstly you want to ensure that your motor wires are long enough. I chose to keep my microcontroller a little away from the machine so it wouldn’t get so messy so I needed long wires. You can extend the wires yourself if you have some and a soldering iron otherwise you can buy some long wires.

Secondly you want to have wires with the correct connectors. The wires linked here work for these motors but if you buy others, you want to ensure that they have the black dupont connectors on the end. The other tricky thing is checking that the wires are in the correct order. This depends entirely on the motor so you’ll have to check. Here is a resource for using a multimeter to check which wires are part of the same coil. The ones part of the same coil should be next to each other. If your wires are wrong, switch them. It doesn’t matter which coil is on the left two or right two wires because that will only change the direction. This can be modified in the firmware or by flipping the way the motors are plugged in.

Step 23: Electronics - 2

Spindle wires

The wires connected to the spindle will need to be extended as well. I used 18 awg wire and soldered it to the wires coming out of the spindle then heat shrink around the exposed wire (you can also use electrical tape). You might be able to avoid soldering but really be careful that you don’t let the wires come loose or touch.

Step 24: Electronics - 3

12V power supply wiring

Connect the module plug fuse to the power supply as shown in the picture. Then wire the V+ and V- terminals to the green phoenix type connector using 18 awg wire. You can also 3D print a housing but make sure it fits your module plug fuse.

Step 25: Electronics - 4

Spindle power supply

Connect the module plug fuse as shown in the picture. The potentiometer (knob) was already plugged in for me and is used to change the spindle speed. (I have only been running it at max speed so far) Connect the spindle wires as shown and don’t mix up the order because then the spindle will spin the opposite way which will cause problems.

Step 26: Electronics - 5

Stepper motor drivers

Firstly, plug in the little jumpers onto the RAMPS board as shown. These will allow us to microstep (which I won’t explain here but there are many resources on it). With all of them in we will be at 1/16th microstepping mode.

Secondly, it is a good idea to set the current limit. Follow the instructions at that link. You’ll need a small screwdriver and a multimeter. You can plug the stepper drivers into the board and turn on the power source and then set the limit. Make sure you orient them the correct way when plugging in.

Step 27: Electronics - 6

Route wires and plug everything in

I used some cable sleeving to route my stepper motor wires and plugged them into the correct pins on my RAMPS board. The pictures show how I chose the x,y,z directions but you could potentially switch the x and y directions.

Step 28: Firmware

For this project I used the Marlin firmware because that is what I was familiar with but if you were to use the Arduino UNO microcontroller+CNC shield I would use grbl firmware. First start by downloading the Marlin firmware. You will need either Arduino IDE or VS Code to edit and upload the firmware. Open the configuration.h file and make the changes listed below. Notes are listed in italics.



Choose BOARD_RAMPS_14 the ending doesn’t matter because it isn’t a printer


L.744 DEFAULT_AXIS_STEPS_PER_UNIT { 400, 400, 400, 500 } (leadscrew pitch = 8) These values may need to be tuned.

L.751 DEFAULT_MAX_FEEDRATE { 120, 120, 30, 25 }

L.746 DEFAULT_MAX_ACCELERATION { 400, 400, 100, 10000 }



L.793 #define DEFAULT_XJERK 3.0

L.794 #define DEFAULT_YJERK 3.0

L.795 #define DEFAULT_ZJERK 0.2

L.828 #define S_CURVE_ACCELERATION (uncomment)

L.1089 #define INVERT_X_DIR true

L.1090 #define INVERT_Y_DIR false

L.1091 #define INVERT_Z_DIR true

The last 3 lines change the direction of the motors so if you later find that it is moving the wrong direction, change it here.

Step 29: CNC Control Software

To connect my computer to the printer I used pronterface. It’s meant for 3D printing but is one of the few interfaces that will connect to the Marlin firmware. (If you are using grbl firmware you have more options.) Open the application, plug your computer into the microcontroller, and connect to the machine. Once connected, use the buttons to move in the +x -x, +y -y, and +z,-z directions. Ensure that positive is in the direction you want it. Remember that since we are not using limit switches/endstops the machine has no idea when it will run into a wall so be careful not to move it outside of its limits. This is especially easy to do by accident with the z-axis.

Step 30: Post Processor

After making a toolpath in Fusion 360 or some other CAM software, we need to post process it into gcode that the machine can understand. This will depend on the kind of firmware you use, so we need a custom post processor for the Marlin firmware. Download the post processor here and add it to Fusion 360 according to these instructions.

Once added to Fusion 360, select the DIYCNC_Marlin20 post processor and change the settings shown in blue text in the picture. This will prevent the z-axis from running into its limits.

And always make sure you change your units to mm if that is not the default you are working in! I think you have to change it every time you open Fusion360 which is inconvenient and I will often forget. If your units are in inches, then your machine will try to move 0.2mm instead of 0.2in and it will look like it is not doing anything.

Step 31: Test Cuts!

Ok finally we can do some cuts!

First, make a toolpath and post process it using our new custom post processor. After some testing, I have found that a feedrate of about 1in/s=60in/min works ok for this machine with softwoods and MDF.

Then, open pronterface and connect to the machine. Ensure that everything is moving smoothly. Move to the location you would like to be X0,Y0,Z0 according to your toolpath ensuring that there is enough room to complete the toolpath without hitting the sides. The post processor will set the starting location as X0,Y0,Z0. Plug in and turn on the spindle (which is not controlled by your microcontroller) and set it to the highest speed with the potentiometer. Then click the load file button to upload your gcode and click print to start. Be ready to quickly turn it off if something goes wrong.

I've attached pictures of my first successful run with softwood and my first successful carving out of MDF.

CNC Contest

Participated in the
CNC Contest

Be the First to Share


    • Metal Contest

      Metal Contest
    • Plywood Contest

      Plywood Contest
    • Microcontroller Contest

      Microcontroller Contest



    1 year ago

    im not able to see the file with all the dimensions . could you please provide it in pdf form or the one which can bee seen in fusion 360


    Question 1 year ago on Introduction

    Is it possible to get *DWG or *DXF files for all the flat parts of the frame?


    Answer 1 year ago

    The reason I uploaded a STEP file instead of DXF or DWG files is because the parts are not strictly 2D. For instance, many of the screws have counterbores for the head to allow increased range of travel in all of the axes, as can be seen in Step 11. Additionally, the spindle mount piece is not 2D either as it has a pocket in the middle surface to ensure the correct offset for the lead screw nut, as can be seen in Step 16.

    There might be some ways to avoid this, for instance getting rid of the counter bores and losing about 10mm of travel in each axis (not recommended, especially for z) and finding a way to make the spindle mount out of two .25" thick pieces of material but it might be difficult to get the spacing right for the M6 nuts.

    Disclaimer: there may be some other parts of the design that are not 2D that I'm not remembering right now


    Question 1 year ago on Step 31

    What are the X, Y, Z limits of your machine?


    Answer 1 year ago

    Great question! There is about 165mm of travel in x, 195mm of travel in y, and 42mm of travel in z. The z travel distance can be limited by the length of your endmill though.


    1 year ago

    SO COOL! Absolutely love the detail in this write-up, great photo illustrations and schematics. Looking forward to making one of my own! :)


    1 year ago

    Great detail and info. Appreciate that. I recently found another source of nice polished steel rods, old shocks. The 8mm rods can be found in certain copiers and printers at the lengths required. HP inkjets are great for the 6mm and 8mm polished rods. I'm not certain yet what to make with the tube material from the shocks... though the polished rods have me thinking something like your design. Certain copier brands used to be great for the stepper motors. The above can be found free sometimes. Wondering about waterjet or plasma cutting steel instead of plywood to make an even sturdier design for metalworking. Guessing offhand might need a better lead screw design and bearing blocks... though maybe not. Thanks for all the info!


    Reply 1 year ago

    Let me clarify: in "copiers", "printers" and other equipment with plain bearings (plastic and bronze), shafts with a diameter of 7.98 mm are used! Linear ball bearings require exactly 8.00mm shafts. Two hundredths of a millimeter play a very important role in terms of backlash and overall structural rigidity!


    Reply 1 year ago

    I just checked the range of 6mm rods and they're measuring 0.234-0.236", so an even worse specification of 5.94-5.99mm potential. Interesting. I just found the assumed 8mm rods range from 0.312-0.314" confirming and even worse range of 7.92-7.98mm potential. HHhmmm... and I was trained to assume nothing. Can tell I'm retired on a pension, doing more physical labor than I need and not thinking so sharp as can be. B^|) Has me wondering more about actual bearing specs based on their reported tolerance and what is more typical variation along with probability of oversized versus undersized batches.


    Reply 1 year ago

    I immediately apologize for my English - I use a google translator.
    So - yes, the range of guide diameters can be up to 7.90mm (for "6mm" - 5.85-5.90mm) - it depends on the manufacturer and the plain bearings used(plastic or bronze). There is also a dependence of the diameter on "old age" - the guides in printers / copiers do not have surface hardening!! Therefore, the older - the "thinner".
    Regarding the accuracy of linear bearings, you need to look at the datasheets on them. By the way - most manufacturers have linear ball bearings with a "cut" to compensate for "production", or a smaller diameter of the guide. But it still does not help much on guides, which do not have surface hardening - the bearings roll "road" over the surface rather quickly.
    So if we take guides from printers / copiers as a basis, use them ONLY with sleeve bearings from the same printer / copier. And a lot, a lot of grease :)


    Reply 1 year ago

    No need to apologize. I comprehend. I'm thinking with "road" you are meaning "erode" or "wear" the surface.
    In regards to the datasheets, for one manufacturer the bearings read 0 to -0.013 and assumed mm... though maybe is micrometer. Guessing varies with manufacturer.
    I was just reading there are polymer versions, made of "Drylin", of the bearings \ that recommend not using grease. Wondering what those Drylin bearings are like in regards to long term performance.
    I was also thinking last night about Chrome plating to salvaged rods to increase the diameter... though that would be a lot of work and most likely not easy on an already polished surface.


    Reply 1 year ago

    "roll a track" in the place of contact between the guide and balls :)
    yes, according to the datasheet, those with "negative precision" are usually called "preloaded". Those that are made "to zero" are ordinary bearings.
    Drylin - one of the variants of "oil-filled polyamide6" - the material is quite interesting, but in terms of load capacity it remains from the usual polyamide6 and lags far behind the "oil-filled bronze" (powder material for all sorts of different electric motors and starters). If you still want to contact the "plastic" - see the parameters of the Zedex material.
    about chrome plating - purely for the sake of "hobby". For business, this is all "self-indulgence" and is not worth the time and effort spent. cheaper and faster to buy / order nomalney "Chinese"(or not - for example, branded Hiwin) guides.


    Reply 1 year ago

    I forgot to add - the Chinese "guides" all have surface hardening above 68HRC and the "diameter tolerance" in plus - from 8.00mm to 8.02 (rarely 8.04) mm


    Reply 1 year ago

    Awesome observation! Thanks for the feedback regarding. You can definitely tell I've not mic'd the rods yet. Are the 6mm rods not true also? Seems like such a waste. Wondering if there is any way with shim stock adhered or secured if can be still used? Thinking maybe there might be a potential for batches or parts where the tolerance specs better regarding the bearings, what are your thoughts? Appreciate your experienced clarification.


    1 year ago

    Be very careful about your source for the CNC router. I have one of these that came with a desktop mill and the tooling mount was not drilled on center and it wobbles no matter how you install it. I ended up having to replace the whole motor. This won't be too much of an issue for working with soft materials like wood, but anything harder and you're libel to snap tools left and right.