Welcome to this project. The CNC UNO is a small desktop CNC Mill that can be used for hobby engraving and routing, PCB milling and education. It is mainly made with 3D Printed ABS plastic parts and plywood. Before starting this project, please observe that this machine is not intended for precision work nor for cutting hard materials like metal. As the machine parts are made of plastic and wood, the machine will flex under heavy load and that is why this project is for fun rather than any serious application. That said, it is a great little machine for hobbyists that want something to play with without having to spend a fortune.

Also, remember that this will not be a 100% exact description of every little detail of the project, although I will try to explain as much as I can. You will probably have to improvise a little here and there. Read through the project before starting and make sure you feel comfortable with the steps described.

Let me know if you want me to add more pictures and steps.

Step 1: What Will You Need?

Here is a list of things you will need to get for the project. I have provided links to where I got the parts.

  • Access to a 3D printer and ABS filament
  • A sheet of 8.7 mm (11/32 inch) thick plywood
  • Lots of small screws and nuts (M2 and M3 or similar)
  • 2 Nema 17 Stepper motors (Link)
  • 1 JKM 42 Stepper motor (Link)
  • A 12V DC motor (Link)
  • A chuck (Link)
  • 8 mm Linear Rail Rod (Link)
  • Set of bearings (Link)
  • Brass copper nut JKM 42 (Link)
  • Set of L298 stepper motor drivers (Link)
  • Timing belts and pulleys (Link)
  • An Arduino Mega 2560
  • STL Files for the 3D printed parts (Link to Thingiverse)

For the electronics you need:

  • Lots of thin cables in different colors
  • A soldering iron
  • A PC power supply or similar to drive the spindle and the steppers
  • A potentiometer (10 K)
  • A rotary encoder (Link)
  • A Joystick module (Link)
  • Some push buttons
  • 1 red, 1 green and 1 yellow LED
  • 1 Nokia 5110 LCD (Link)
  • 3 micro switches
  • A diode, an electrolytic 220uF capacitor, a 10nF disk capacitor, some resistors and a 30N06L MOSFET
  • Optional: SD Card Module (Link)
  • Cooling Fan (Link)

Skills needed for the project:

  • Soldering skills
  • 3D printing skills
  • It will help if you have some basic skills in Arduino programming
  • Basic knowledge of electronics

Step 2: Let's Get Started!

This is the model I made in Rhino 3D when planning the project. I wanted a small and light milling machine that I could play with on my desktop.

Mark the pieces on the plywood and cut them out. The drawing is in millimeters.

Step 3: Glue the Pieces

I cut two pieces of the bottom sides of the frame and glued them together for better stiffness.

I also clamped side pieces together and cut them at the same time to make them as similar as possible.

You can also use nails and screws in combination with the glue.

Step 4: Make the Table

Now, cut out the table and the back plate for the Z axis.

Table size is 25.7 x 24.4 mm.

Back plate size is 80 x 140 mm.

Step 5: Print and Assemble the Plastic Parts

Now when you have the frame ready, print out all the plastic parts and put them together. Use the frame as a reference and cut the steel rods for the X and Y and Z axis to the correct length. Be careful not to cut them too short. It is better to cut them long first and then test with the brackets and the frame, and if they are too long, cut them a bit more. On my machine, I got these lengths (more or less): X-axis 350 mm, Y axis 250 mm and Z axis 120 mm.

Also, test out the length of the X and Y axis timing belts. They should be fairly stretched and you can use the spring from a clothes peg as a tensioner.

On the picture, I had mounted the first motor I used. It later turned out to be too weak so it has been replaced with a bigger motor.

Clamp the parts to the frame and mark and drill all the holes for the mounting screws.

Step 6: Paint the Frame

Sand the frame and paint it. Yes, it has to be silver, otherwise the machine will not work ;)

It is probably a good idea to paint it with a protective coat of clear lacquer as well.

Step 7: Mount and Test End Switches

Assemble the machine. Put cables together with zip ties and try to keep things as neat as possible.

Mount the end switches and test that they click as they should when you move the axis to the stops.

Step 8: Make the Controller

The controller is a whole little project by itself. You can decide to use another box, skip the LCD etc. It is up to you. This is what I did:

I printed out the controller case and mounted the rotary encoder, the joystick, the potentiometer, the LCD, some LEDs, and buttons at the faceplate. Inside I mounted the Arduino Mega, the stepper drivers and a little homemade spindle driver.

I used hot glue, superglue, and screws to hold things in place. I also soldered the buttons to a small piece of perfboard and 3D printed some standoffs that I glued to the back side of the panel so the modules could be screwed into place. If you have different sized buttons and knobs, you may want to design your own front panel instead.

Step 9: Electronics

See tables for how I connected the pins to the Arduino.

You will need to solder all ground pins to the ground pin and all Vcc to the +5 Volt pin of the Arduino.

In series with each LED, you will need to solder a current limiting resistor. Other than that, soldering all these pins should be pretty straightforward.

EDIT: Please note that pin 51,53 on the table has changed to pin 27,29. After having some problems with the serial communication while starting the spindle motor I decided to add a SD card reader module. It uses pin 50 to 53. I recommend anyone to add this too. It makes the machine stand-alone and more convenient to use.

Step 10: The Spindle Motor Driver

For the spindle motor driver, I used a 30N06L MOSFET to switch the power. This is how it is connected.

I soldered the MOSFET, the diode and the resistor to a little perfboard and added a small heat sink to protect the MOSFET from overheating.

Directly on the motor connectors, solder the 2 capacitors to filter out noise from the motor.

Step 11: Stepper Drivers

Then connect the 12V from the PC power supply to each +12V connection of the L298N motor driver boards.

On Output A and Output B you connect the leads for each stepper. You have to play around a little with the leads to see which goes where. After some trial and error, the motor will go in the correct direction. Use the joystick on the controller to test the direction of each motor and switch the cables around until it works as it should.

Note! I have noticed that the drivers get pretty hot when running the machine for longer times. I suggest adding a fan to the controller box to keep things cool.

Step 12: Finish the Project

Paint the controller and screw/glue it together. Use screws for the front panel so you can open it to do modifications later.

Connect the Arduino to the PC and program it with the sketch that you can download from here.

CNC UNO Firmware Files

Test the entire functionality of the controller and make sure the motors go in the correct direction. Check that all buttons, LEDs and knobs do what they are supposed to do; see the controller manual below.

When testing the machine, use very low feed rates (F100 or lower) and do not go deep! The CNC UNO will work with small mills and drills only and they can easily break. Also, by using low feed rates and shallow depths, you put less strain on the machine, avoiding the occurrence of flexing and bending.

I suggest testing it out with small pieces of plywood or similar soft material.

The firmware is a Beta and it is meant to be improved, by me or by others. It has a very limited set of G- and M-codes and basic functionality only. I see many ways in which this project can be improved. For example, one could use inexpensive 3D printer stepper motor controllers, and use micro stepping of the motors for smoother and quieter operation. The controller would gain from having an SD card reader where one could store CNC programs, just like many 3D printers have (EDIT: it has been added now). The spindle motor output should be PWM (Pulse With Modulation) to be able to control the RPMs. WIFI could be added. The list goes on...

Feel free to improve it and add features, and send it to me so it can be shared with others.

Step 13: Controller Manual

When the controller turns on or when it resets, it automatically homes all axes. Once in a home position, the display will show its X, Y and Z axis positions and the current feed rate. At the bottom of the screen, there is a menu controlled by the three buttons below the LCD. The right-most button browses the menu.


HOME will home all axes to their end point breaker position.
SPNDL will start and stop the spindle.


ZERO will tell the controller that the current position of the tool is the zero point.

JOGXY tells us that the joystick will control the jog motion in the X and Y axis. If you press it once, it will change to JOGXZ, changing the joystick to control the X and Z axis.

After an axis has been jogged with the joystick, the controller will remember it as the lasted jogged axis. Now the axis can be fine-jogged with the rotary encoder dial.


DEMO will put the machine in a demonstration loop.
ABOUT will show the About screen and the firmware version number.


RUN will run the cnc program named RUN.CNC on the SD Card.
PAUSE will put the machine in block step mode.

Step 14: Run Programs

To run a CNC program on the machine, you send it via the serial port. The baud rate is 115200 baud.

You can send it with any terminal program that has the XON/ XOFF handshake protocol. Here I use the CNCSimulator Pro from CNCSimulator.com, as it is where I work when I am not at home building CNC machines :) Another communication setting that is important to use is a 100 ms delay between each block for the machine to be able to catch up.

On the picture, the Char delay is set to zero. I have now found out that a small value of 10 works better. You may have to play around with these values to avoid losing characters when sending from the PC.

Step 15: Software

We have added the CNC UNO machine as a virtual machine in the CNCSimulator software so one can simulate CNC programs before running them, to see that all is OK. This addition will be available when we release version 2.0 later this year.

Step 16: G- and M- Codes

Each line (or block) must have a G-code. In other words,they are not modal. All code letters must be written with capital letters.

G00 is fast transport moving all axis in full speed.

G01 is linear movements with programmed feed rate (F).

G02 is clockwise arc movements with programmed feed rate.

G03 is counter clockwise movements with programmed feed rate.

G04 is dwell.

G28 moves all axis to their maximum position.

G73 drills a hole.

M03 starts the spindle.

M04 also starts the spindle (we have no directional control yet).

M05 stops the spindle.

M01 puts the machine in pause mode.

F feed rate in mm/ minute.

Example program

G00 X0 Y0 Z0 (Go fast to X0 Y0 Z0)
G01 Z-10 F400 M03 (Go to Z-10 with a speed of 400 mm/min and start the spindle) G02 X40 Y0 I20 J0 (Do a half circle to X40 Y0 center in X20 Y0) G01 X50 (Go to X50 with programmed feed rate) M01 (Pause) G01 Y50 (Go to Y50) G01 X0 (Go to X0) G04 P1000 (Dwell one second) G00 Z10 (Go up to Z10) G00 X20 Y40 (Go to X20 Y40) G73 Z-10 Q3 F200 (Drill a hole to Z-20 with a step size of 3 mm and feedr. 200 mm/ min) M05 (Spindle stop) G28 (Move all axis to max)

Good luck building your own CNC UNO!

Step 17: A Video of the Machine in Action

This video shows the first version of the machine before I replaced the spindle motor for a much better one.

<p>Can you put up the Rhino file please </p>
Hi Kevin, you can download the firmware from the link above. But I couldn't make it works...
<p>Hi all HELP :)))))))))))</p><div>Finally, I did complete building the CNC machine and the remaining things is to program the Arduino. I downloaded all files and followed the instruction given by Arduino. But unfortunately I receive some errors during the verification.<br><br>I really appreciate all help I can get.<br><br><em>The error message</em><br>______________________________________________________________<br><blockquote>CNCUNO:1343:<br>error: 'int8_t sgn(int)' was declared 'extern' and later 'static' [-fpermissive]<br> static inline int8_t sgn(int val) <br>..........................................^</blockquote><blockquote><br>CNCUNO:197:<br>error: previous declaration of 'int8_t sgn(int)' [-fpermissive]<br> pinMode(PIN_RESET, OUTPUT);<br>...........^</blockquote><blockquote>exit status 1<br>'int8_t sgn(int)' was declared 'extern' and later 'static' [-fpermissive]<br><br>______________________________________________________________<br></blockquote></div>
<p>Can you help us to build this one? </p>
<p>Hi,</p><p>The CNC is built, all axis goes to zero when it's switched to ON and I can move all axis by the joystick. The communication between the CNC and the Hyper Terminal is established via the Arduino's USB connector. I still don't have communication with the SD-card reading neither to the CNCSimulator software.</p><p>Any suggestions on how to send a g-code to the machine?<br>And why the SD-card is not responding?</p>
<p>I don't see anywhere the emergency/brake switch connection. Can anybody advice where is connected?</p>
<p>I connected it to the RESET of the Arduino. Maybe it's not the right way, but it works. It's a good idea to use an ON/OFF switch too. </p>
<p>Is there a list of the plastic parts to print? I didn't notice how many of which part to print... </p><p>Thanks!</p>
<p>Hi,</p><p>You can download a printable .stl files see (link above) but you may have to make some changes.</p>
<p>Yup I noticed the link to where to download them from... but I can't see where it says how many of each of the pieces... I have the pieces I don't have the quantities to print.... or simply one of each? </p>
Hi, did you print the parts?
<p>Hi, Begin with printing one piece of each .stl file and you'll notice soon if you need more then one piece of some part. Before printing you have to download and open these .stl file by the printer software. Then you'll export each file to g-code to the 3D-printer, so you will be able to see all objects before printing.</p>
<p>Hi,</p><p>I also have the CNCsimulator expired :(.</p><p>I wanted to see some details on the hardware of the machine.</p><p>You said that you did it with rhino 3D. Could you send us the file to compensate the software we couldn't use ?</p>
<p>Hi &amp; Help, I&acute;m having troubles with the CNC SIMULATOR software licence, do you have any idea of keep using it, I was on vacation and I didn&acute;t use it and suddenly expired :( or another similar software? </p><p>Thanx for all help I can get.</p>
<p>Can i use the same machine for a 3d printer with a 3d printer pen...?</p>
<p>something like this https://www.tinkernut.com/portfolio/hack-old-cd-roms-into-a-cnc-machine/</p>
<p>Hi,</p><p>I want to build this machine but as I don't have a PC power supply,</p><p>I'm asking you if someone knows how many Amperes does it requires ?</p><p>thank in advance</p>
<p>Hi program01,<br>Count the sum of all output you need.</p><p>Ex1:<br>2 motors &aacute; x Watt + 1 motor &aacute; y Watt + (LCD, Arduino, LED) z Watt.<br>So you need a Power supply of minimum (x+y+z) Watt.</p><p>Ex2:<br>If the data of your motor is 2.5A @ 12V so the Power will be 2.5*12 = 30W (P=V*I)<br>&curren; Add now about 60% for the start condition 30*1.6 = 48W for 1 motor.<br>&curren; If you have 2 similar motors: 48*2 = 96W</p>
good idea<br>
<p>Hi I have almost finished a small mill like this using 6mm threaded rods an Arduino cnc shield 3 A4988 stepper drivers 3 Nema 17 I have Arduino mega,Uno, Duemilanove and others that I can use but I am not looking forward to trying to set the software for a first run can anybody suggest an easy to follow tutorial I know people will say Google it but there are so many that are not very clear I would like somebody that is new to Arduino to point me to one that got them up and running. I know I have quite a lot of Arduino items but I just spend &pound;20/&pound;30 now and again on eBay I don't know much about them as yet. I am not saying there is anything wrong with this tutorial but it uses different drivers and I don't know if it's all compatible with mine.</p><p>Thanks Bill</p>
<p>Can you lay out the parts to be cut from wood and export to dxf. I would like to use my full size router to cut this frame. Love to build this for pcb work.</p>
<p>Hi bob, can I to use marlin firmware with this scheme?</p>
<p>why silver?? does the frame has to be conductive?? </p>
<p>No choose the colour that suits you.</p>
<p>Is the table size supposed to be in centimeters? It says 25.7 x 24.4 mm which is tiny and looks like it would be the right size if it were centimeters. Other than that this looks great and can't wait to start building my own!</p>
<p>Hi BobS77, you've right the dimensions is given in centimetre.</p>
<p>hi, I am planning to make one but just a question: what kind of files can you mill with it ? (.stl, etc or do you have to write the program for every piece) thanks :)</p>
<p>Hi starrytime, someone should know the answer beter then me.<br>But I think it's a g-code file. watch the Youtube and the description above.</p>
<p>sorry for the double post :/ but couldn't I use threaded bars instead of the belts?</p>
<p>Hi, </p><p>I'm trying to order the chuck and the link doesn't work. I found this <a href="http://www.aliexpress.com/snapshot/7017738903.html?orderId=70232205128487" rel="nofollow">http://www.aliexpress.com/snapshot/7017738903.html...</a></p><p>what size diameter do I need?</p><p>Thanks!</p>
<p>Hi HannahL17,</p><p>I ordered &gt; <a href="http://www.aliexpress.com/store/product/Applicable-to-motor-shaft-diameter-3-2mm-4mm-5mm-6mm-6-35mm-7mm-8mm-mini-drill/1002193_1970210912.html" rel="nofollow">THIS </a>&lt; chuck from aliexpress.<br>But don't forget to inform the seller about your motor shaft diameter.</p>
<p>yes, but what is the motor shaft diameter needed for this project?</p>
<p>I would say its your decision what motor you want to buy but I bought &gt; <a href="http://www.aliexpress.com/item/775-DC-Motor-High-Speed-High-Torque-DC-12V-35000rpm-Hair-Dryer-Electric-power-tools-DIY/32324543540.html" rel="nofollow">THIS</a> &lt; motor and the shaft diameter is 5mm.</p>
<p>Printing and assembling the hardware!<br>I'm modifying the stl file, printing and assembling the Z-axis for now.<br>Hope to get the rest of the parts I ordered soon, but I guess it will take about 3 weeks to get them from China :(</p>
<p>Got compiling error:<br>C:\Program Files (x86)\Arduino\libraries\SD\src\utility\Sd2Card.cpp:26:17: fatal error: SPI.h: No such file or directory<br> #include &lt;SPI.h&gt;</p><p>can anyone help with it?</p><p>Xalax, read previous messages: in cncuno rename to </p><p>#include &lt;Stepper.h&gt; </p><p>#include &lt;SD.h&gt;</p><p>and these files will be found in library</p>
<p>Thanx MMantas1, Now I can see those files under the library.</p><p>But the compiler is case sensitive, so be sure if the &lt;SPI.h&gt; file under your library is written in CAPITAL letters...</p>
<p>Hi,</p><p>Motor clamps are for 45mm?? but on pictures i see 36 mm motor mounted.</p><p>Can i get 36mm clamps stl please? because my motor 36</p>
<p>Hi MMantas1,</p><p>Did you fixed the clamps yet?</p>
<p>Hi and HELP :)</p><p>I downloaded the Arduino files from &quot;<a href="https://github.com/cncsimulator/CNC-UNO" rel="nofollow">https://github.com/cncsimulator/CNC-UNO</a>&quot; as mentioned. But when I verified the files the compiler ask for &quot;stepper.h&quot; which is not located with the other files.</p><p>How did you compiled the &quot;CNCUNO.ino&quot; without the &quot;stepper.h and stepper.c&quot;?</p><p>Thanx for all help I can get :))</p>
Hello, I have built all the hardware: physical structure, and have completed in entering the GRBLtoArduino and all the software. I have used the Universal GCodeSender and has successfully interpreted the software for is says &quot; Grbl 0.8c ['$' for help] &quot;. I've soldered the stepper motors (for I'm using steppers from dvd roms) to some salvages wire from a printer I took apart. I installed some female sockets in order to connect to the male pins on the CNC Shield ver. 2.01 . The orange light from the arduino flashes and in the Universal GCodeSender ver. 0.8 completes the operation b/c is says &quot; ok &quot; . I have no idea whats wrong. I know the steppers work b/c ive used a 9v battery to pulse the motors and they do indeed pulse. Ive used a multimeter to check its resistance and it works. I've checked the current on the motors once connected to the cnc shield and there's current. I have tested if the drivers are in fact getting power and they are. I've attempted the code &quot; x=100 &quot; , &quot; $7=225 &quot; but no motor movement. Can ANYONE help me ?
<p>if you are trying to move your axes you need to use G code. Like '' G1 x1.5 f10.'' </p>
<p>Hi,</p><p>In the CNC UNO.ino file, you have the following statements:</p><p>#include &quot;stepper.h&quot; and </p><p>#include &lt;sd.h&gt;</p><p>Should we not have:</p><p>#include &lt;Stepper.h&gt; and </p><p>#include &lt;SD.h&gt;</p>
<p>Hi,</p><p>I had to make these changes to be able compile the program.</p><p>#define ENCODER_USE_INTERRUPTS</p><p>int xGoalSteps=0; </p><p>int yGoalSteps=0;</p><p>int zGoalSteps=0;</p><p>are not used in the soft.</p><p>Best Regards</p>
<p>Hi,</p><p>In Step 16: G and M codes, you can add :</p><p>M06 and M30</p>
<p>hi congratulations , very cool your project. But I have some doubts. What solid you used for parts below: <br>feet, belts , spindle motor z spacer, the housing of the x-axis bearing ?</p>
<p>Thanks. I <br>had missed to upload some STL parts, sorry about that. They are uploaded now. <br>If you still do not find a part, send me a msg. I have also uploaded the <br>brackets for the feet. The actual parts for the feet are bolts with rubber caps <br>that I found in my storage. You could 3D-print the caps, maybe in a flexible <br>material.</p>
<p>Curious what kind of accuracy and registration you get with this?</p><p>As a pcb mill in particular...</p><p>I'm assuming you can get .1 traces.. have you measured this? IF registration is good, do you think it could pull off dual sided, or surface mount stuff?</p><p>Looks fun.</p>
<p>The belts are the issue when it comes to step size (which leads to accuracy), and the amount of torque you can apply to the Z axis, which is why most use threaded rod or ball screws for CNC machines. I used M6 x 1mm pitch threaded rod with Nema17 2.5A steppers. At 200 steps per revolution is 1 x 200th of a mm per step (5 microns) with a full step. Further divide that by 16 for microstepping (A4988 stepsticks) and you can get extremely high resolution and accuracy, and also use less powerful stepper motors and maintain a high degree force along the axiis. The DRV8825 stepper drivers can run 1/32 microstepping for even more added fun.</p>

About This Instructable




More by Elektron8:3D Printed Desktop CNC mill 
Add instructable to: