Small Arduino CNC




About: I am a german student and joined Instructables, because I like to build your projects and share mine with you.

This instructable shows you how to build a cheap and easy, but very small CNC. You can use it to mill thin balsa wood and different foams. Everything you need, can be found in old PC's or can be bought quite cheap (I paid ~30$). It was inspired by the Pocket laser engraver, but i added a third axis and now I am able to mill small 3D objects.

For this project you will need:

  • 3 old CD/DVD-Roms
  • 1 Computer power supply
  • 1 PC fan
  • 1 small DC motor
  • 3 Easydriver boards (can be bought on ebay ~2$ each)
  • 1 Arduino Uno (can be bought on ebay ~14$)
  • Screws, spacers, soldering iron, cables (old ribbons from PC's also work), some wood, a breadboard, screw terminals and some other supplies.

Step 1: Take Apart Your CD-Roms

Opening the CD-Roms isn't really hard. Just find yourself some old CD-Roms and follow the steps shown in the pictures. Even if your CD-Roms look a bit different, you shouldn't have many problems opening them.

Step 2: "Hack" the Power Supply

Before hacking the power supply, please make sure it isn't plugged in.

Hacking a power supply is easy. You only have to connect the green cable with a black cable (ground). Make sure not to solder the two, because in case of a short circuit you have to disconnect the two cables and reconnect them in order to reset the fuse in the power supply (It's a good idea to put in a switch).

The power supply will start running, as soon as the green cable is connected to the ground. Now you have a DC power supply!

To use the power supply, strip a red cable (5V) and a black cable (ground). It is also useful to strip a yellow cable (12V) or an orange cable (3,3V) for the milling motor and a cooling fan. Put the stripped cables into a clamp.

Step 3: Build the Structure

This part isn't really complicated. You just need a platform (mine is 13,5 cm x 17 cm but other sizes are also ok) and two pillars (mine are 24 cm high). I made them from wood, as it is very easy to cut and i can put screws into it.

After you have your wooden parts, simply screw the pillars onto the platform. (Make sure that your slides fit onto the platform and in between the pillars, as some slides are a bit taller or smaller).

Step 4: Soldering and Wiring

You have to solder cables onto the stepper motors. It's a bit tricky, as there isn't much space for soldering, so you need patience and a calm hand.
You can simplify this step, if you solder the cables onto the ribbon cable, which is already attached to the steppers. Just cut in between the tracks, and you can solder the cables to the ribbon cable. To avoid short curcuits, insulate the connections.

To make the device look better in the end, i used a stapler and stapled the cables to the wood. It looks nicer and more organised.

Step 5: Build the Axis

Since there isn't the possibility to put screws into your slides, you have to take a good glue (I used a two-component adhesive). Cut a wooden platform for the base axis (the Y-Axis) and glue it to the plastic on the slide.

After that, glue a piece of wood, which is as wide as your Z-Axis slide, to the X-Axis.

When your glue is dry, drill holes into the large piece of wood, which is attached to your X-Axis. The holes have to match the distance of the holes, which are in your Z-Axis slide.

Now that everything is prepared, you can screw the Y-Axis to the ground and the X-Axis onto the two pillars. When this is done, you can attach the Z-Axis to your X-Axis. Note: You will need spacers and washers, because the holes in the slides are too big for most screws. You also have to make sure, that the slides have no contact to the platforms and can move freely.

If you want you can add a metal platform to your base. You can take the metal from an old CD-Rom housing, and glue it to your platform (It's useful to have a metal platform, as you can hold your PCB's with magnets instead of duct tape).

Step 6: Attaching the Easydrivers and the Arduino

Now that the structure is finished, you have to wire your motors to the Easydrivers and the Arduino. There are two ways of doing it.

The easier and faster way is to put all your Easydrivers into a breadboard and connect them to the Arduino.You can wire it as shown on the image which was done with the Fritzing App.

The other way is to build a PCB. The disadvantage is, that you have to solder a lot, but you can build the PCB as a shield and directly attach it to your Arduino.

As mentioned in the picture, you should also add a fan to cool the Easydrivers and the Arduino (Espacially if you want to put them into a housing).

Now you only have to find out, which pin of your steppers, has to go to which pin on your Easydrivers. Again it is useful to look at your ribbon cables. Normalwise you have to attach the cables to your Easydrivers in the same way as they are connected to the stepper.

Step 7: The Spindle

The spindle consists of a DC motor and two screw terminals. It is important, that the motorshaft has the same size as the cutter, to decrease vibrations and increase precision.

Cut the metal parts out of the screw terminals. After you have the metal parts, attach one side of the metal part to the motor and the other one to the cutter. Tighten the screws and attach the second metal part 180° turned. Put it on top of the first metal part (the second metal part is needed as a counter weight, to minimize vibrations and increase precision).

When your spindle is finished, attach it to the Z-Axis. I used a metal part lying arond, but many motors also have attachment points on the front which you can use.

Make sure to use a light motor, as your Z-Axis can't lift heavy objects!

Step 8: The Software

The last step is the software. You have to download and install the Arduino software

the Grbl library and the Grbl controller.

After downloading the Grbl library, you have to click sketch --> import library --> add library in the Arduino software and select the zip file you just downloaded. Now send the library to your Arduino (your Arduino has to be connected via USB). There is also a more detailed discription on how to install Grbl --> Install Grbl

After you installed Grbl on your Arduino open the Grbl controller and select the port to which your Arduino is connected. Press the open button.

Now a list of options appears in the command screen. You have to change a few of these options, by entering the number of the option (the numbers with a $) = and the new value (For example $130=35.000). You may need to experiment a bit, but the options shown in my screenshot should work.

If your motors are moving into the wrong direction, go to Tools --> Options --> Axis and click the axis you want to invert.

Step 9: Milling

After you finished the CNC you can start milling. Just produce a file and transform it into gcode. Now send it to your mill and start milling (Keep in mind that your objects have to fit the small dimensions of this CNC).

Note: When starting Grbl controller it's automatically in alarm mode. Before milling, you have to switch it of by entering $X into the command field.

To produce files for your CNC, you can use Inkscape with the add on Gcodetools both programms are freeware. But you can also use any other programm.

In my example i milled a star into floral foam. The material is really soft and can be milled even with a drill instead of a cutter. I attached the foam with double faced tape.

If your bed is correctly leveled and you use a cutter, it could also be possible to produce small PCB's. PCB's can be attached with magnets, as I have a magnetic platform, which was made out of a CD-Rom case.

5 People Made This Project!


  • Tape Contest

    Tape Contest
  • Trash to Treasure

    Trash to Treasure
  • Arduino Contest 2019

    Arduino Contest 2019

183 Discussions


11 months ago

plz plz any1 provide me gcode of that star wch is in that video.. plz its urgent..


Question 11 months ago

plz plz provide me the gcode of this star diagram... plz its urgent,

سید احمدث

1 year ago


which version of GRBL you used?

mine always has "Buffer size too small" error!!!


1 year ago

I know this thread is ancient but hopefully someone will see this.

What type of DC motor is this? Can someone provide a link to something similar? I'm not sure how many RPM's it needs to be capable of spinning at.

Thank you!

1 reply
Make it BIGJoshuaC235

Reply 1 year ago

It is just a normal DC motor I had lying around. There are no specs written on it. For foam any small motor should be fine. I think mine was out of an old toy or an electric toothbrush.


Question 1 year ago on Step 2

Hey, nice project, but to work the CNC how many power i need? If i conect it in a portable battery of 5 V it works ?

1 answer
Make it BIGBYMart

Answer 1 year ago

I have never measured it. But you should just give it a try. The Arduino is fine with 5V, so there should be no problem. Maybe you can also use a power bank, as it has some more mAh.


1 year ago

Hi can u help.

Keep getting "Buffer size too small"
and no file progress. I can move the motors though

2 replies
Make it BIGwelfitsgoa

Reply 1 year ago


I never had that problem. Maybe your GCode File is too big?


1 year ago

Hi, Iam facing this type of error in running my machine,

actuall i uploaded G-code but machine is not working.. can anyone help??

2 replies

2 years ago

his is the 1st project I could find to make and I did make it too. also made biggest one by Plexiglas. but one main point was made me busy for months and month. and it was the adjusting the code on the grbl witch was not explained anywhere. tile I could find an Italian video clip witch was explained in their own language that I didn't understand it but did as he was done and suddenly could see the difference on my cnc machine. my problem was that cnc could not give me the actual size in print and drawing. and after that I could solve my problem. and now I put my experiences here to help others like me if they want to make such a machine. in GRBL and command line you can add such these code and depend on your stepper motor to adjust them.(

hope this can help others too.

3 replies

Reply 2 years ago

hallo bro , do you use inskape to generate gcode for 3 axi cnc using grbl c and easy drivers ????


Reply 1 year ago

bro hamzaraziel i made my g code from inkscape but this error is in front of me ...

can you solve this error?

or please send me your G-code if you have anyone!


Reply 1 year ago

hi dear i make smae cnc but i ma having this type of error and machine is not runing at all


1 year ago

Hi #makeitbig, i have done all the conections and my motors are also working but i am facing a difficulty in writing a g-code, i used inkspace with gcodetools but still finding a difficulty. Can you plz send me your G-Code, which you used in this machine

2 replies
Make it BIGalihamzaonly

Reply 1 year ago


I'm sorry, but due to the project being quite old, I can't find the files anymore. Nevertheless good luck in creating your own GCode!

alihamzaonlyMake it BIG

Reply 1 year ago

ok dear but what did you write on aurdino,

are the necessary to write,