Introduction: Mini CNC Plotter - Arduino Based

Picture of Mini CNC Plotter - Arduino Based

In this project I will show you how to easily build your own low-cost Arduino Mini CNC Plotter!

For X and Y axis we will use stepper motors and rails from two dvd/cd roms! Printing area will be max 4x4cm.

Because it works with serial communication you can also use a Bluetooth module (like HC-06) to print your stuff wirelessly through your computer Bluetooth connection!

I have used the code from this site, so I need to thank the for sharing this to us.

You can visit my site for more cool arduino projects!

Watch presentation video below and proceed to next step!

Don't be afraid to build it, is very easy!!! This tutorial is also made for beginners!

Let's get started!


Follow us on FB:

Follow us on Twitter:

Q & A Support:

Step 1: What You Will Need

Picture of What You Will Need

For this project you will need:

Part list for beginners:

  • Arduino uno
  • Breadboard
  • 2x L293D ICs Motor driver
  • Mini Servo Motor
  • 2x DVD/CD Drives

Part list for 'pro' :

  • ATmega328p (with Arduino Bootloader)*
  • 28 pin DIP IC Socket
  • 16MHz Crystal Oscillator
  • 2x 22pF and 1x 100nF capacitors
  • 10K resistor
  • USB to Serial adapter**
  • 2x L293D ICs
  • Mini Servo Motor
  • 2x DVD/CD Drives
  • Prototyping PCB Circuit Board Stripboard

  • 4x 2pins Screw Terminal Connector (or 2x 4 pins Screw Terminal Connector)***

*You will need also an Arduino UNO board to program the ATmega328 micro possessor

**USB to Serial adapter will allow the circuit to communicate with the computer through the USB cable, just like Arduino uno does.

***Why to use screw terminal connectors? Because you don't want to solder and desolder cables from stepper motors until you find the correct working combination.

Tools (only for 'pro' part list):

  • Screwdriver
  • Soldering iron
  • Solder
  • Cutting tool (e.g. Dremel) (Optional for cutting plastic parts)
  • Glue

Step 2: Desassembly DVD/CD Drives

Picture of Desassembly DVD/CD Drives

First step to start building this cnc machine is to disassemble two dvd/cd drives and take off them the stepper motors. Use the screwdriver to open them and take off them the rails.

Next step is to choose our base for this CNC machine. I used one surface from remaining dvd 'garbage' stuff.

Finally we will need to find something to attach the one of the stepper-rails vertically to our construction. (you will understand what I mean in our next step) Watch the above image.

Step 3: X and Y Axis

Picture of X and Y Axis

In first image above you will see the Y axis of our CNC machine. Attach it on your surface, in this part you will need some screws and nuts.

In second image you will see the X and Y axis. The X axis is attached to two plastic parts that I took from remaining 'garbage' stuff. I cut it to fit the construction.

This is an easy procedure. Just make sure to put the Y axis straight to CNC base and the X axis vertically in this (90 degrees).

Step 4: The Z Axis

Picture of The Z Axis

That's the most difficult part of our construction.

You will need something to attach it on X axis, a flat surface. On that surface you will attach the servo motor (Z axis) and the pen base. Pen (or pencil) must be able to move up and down with the help of servo motor.

Watch the above image to understand what you need to do to duild Z axis.

Tip! Use your imagination ;)

Step 5: Paper Base

Picture of Paper Base

Now you will have to attach a wood (or plastic) surface on Y axis (5x5cm will be fine).

On this you will put the paper piece to print your texts or images!

Remember, printing area is 4x4cm.

Step 6: The Circuit

Picture of The Circuit

Now that we have our contraction ready, it's time to build the circuit and test stepper motors (X and Y axis).

Watch the above image with breadboard circuit schematic.

Steppers motors wiring is something that need patient. On next step you will find a 'testing' code for x and y axis. If yours steppers doesn't work properly you must find correct working combination by changing the cables between them and the L293D ICs.

On mine cnc, X axis motor connection are: L293 A: Pins 1 and 3 & B: 2 and 4, but on Y axis motor connection are A: 1 and 2 & B: 3 and 4.

Step 7: Testing X and Y Axis Movement

Here is the X and Y axis testing code embedded using codebender!

For X axis:

For Y axis:

If you see any movement here that means that the stepper motors wiring is correct!

if you don't, try to change the cables...

Step 8: Uploading the CNC Code

Here is the main CNC code embedded using codebender!

In this part you will see your pen goes up. If don't, change penUp and penDown variables that controlling the servo motor.

Press the "Run on Arduino" button and program your board from your browser!

Step 9: The GCTRL Program

Picture of The GCTRL Program

Now we are ready to print our first image! To do this we will use the gctrl.pde processing program. This program sends 'gcode' images to the cnc plotter.

What is gcode?

Gcode is a file with X,Y and Z coordinates. Header of this file is set to:

M300 S30.00 (Servo down)
G1 X10.00 Y10.00 F2500.00

G1 X20.00 Y10.00 F2500.00

M300 S50.00 (Servo up)

Download Processing from here, now donwload and open GCTRL.pde application.

Click the "play" icon/button to start the program.


You can use gctrl.exe, find files on 'gctrl exe for' file.


~Watch the above image~

Now press 'p' and select your Arduino serial port.

Press 'g' and select the 'drawing.gcode' file

(If something goes wrong, press 'x' to stop the plotter)

Step 10: Make Your Own Gcode Files!

Picture of Make Your Own Gcode Files!

To make gcode files that are compatible with this cnc machine you have to use the Inkscape.

Inkscape is professional quality vector graphics software which runs on Windows, Mac OS X and Linux. It is used by design professionals and hobbyists worldwide, for creating a wide variety of graphics such as illustrations, icons, logos, diagrams, maps and web graphics. Inkscape uses the W3C open standard SVG (Scalable Vector Graphics) as its native format, and is free and open-source software.

Download and install Inkscape from here (Important: download 0.48.5 version)

Now you need to install an Add-on that enables the export images to gcode files. This add on can be found here with installation notes.

Setup Inkscape for first use

Open the Inkscape, go to File menu and click "Document Properties". See the 1st image above and make the changes, make sure to change first to "cm". Now close this window.

We will use the area within 4 to 8 cm. See the 2nd image above.

How to print texts

Put text, change font to Times New Roman and size to 22. Now click on cursor icon and center the text like the 3rd image above. Select Path from menu and "Object to Path".

How to print images

This is more difficult than texts. Images must have a transparent background. Drag and drop the arduino logo image (download it from files) in Inkscape. Click ok to the next window. Now you have to re-size the image to fit our printing area, see the 4th image above. Click Path from menu and "Trace Bitmap".

Make changes as the 5th image above. Click ok and close the window. Now, move the gray scale image, and delete the color one behind it. Move the grey image to the correct place again and click from Path menu "Object to path". The 6th image above show how to delete image outline.

Export as gcode

Final, go to file menu, click save as and select .gcode. Click ok on next window. That's it! Ready to go! Use the gctrl.pde app to print the gcode file on your new Arduino CNC Plotter!

I will make a video on next days about this procedure because it's little complicated. It took me a lot of time to understand how it's working...

Step 11: Well Done!

You have successfully completed this tutorial and you have your own CNC Plotter on your desk!

I would like to see photos of your CNC.

I hope you liked this, let me know in the comments.

More projects here:


nixon93 made it! (author)2015-09-28

My plotter :D

Sdyasin (author)nixon932017-02-13

Hey my motors aren't running after uploading the code please help me

Suraj Grewal (author)Sdyasin2017-06-16

start by checking your connections and polarity

Run a blink led code on Arduino before uploading main code

then voltages

Then continuity of motor

Also, try not to put too much load (weight) onto the motors

Ardumotive_com (author)nixon932015-09-28

Well done Nixon!!!

UnmeshK made it! (author)2015-09-08

Hi..Ardumotive_com.. Here, a photo of my new cnc!!! .. making own program is too simple.. thanks a lot for this tutorial and your valuable replies..!

I want to know whether the inkscape can be used to draw solid diagrams.. (like in inkjet or matrix printer..)


Amar CA (author)UnmeshK2015-10-29


UnmeshK (author)Amar CA2015-10-31

Hi Amar CA, don't worry, making your own program it too simple. Just follow the tutorial and the image given by Ardumotive_com. These images are self explanatory...

Sdyasin (author)UnmeshK2017-02-13

Hey bro help me, my motors aren't running after uploading the code please help me, I need to submit my project

Lava94 (author)UnmeshK2016-07-14

hello please can you show mw how did u connected the 2 dvds together (the michanical part)and how the pin id graped!!

MDM51 (author)Lava942017-02-08

Ardumotive_com (author)Amar CA2017-02-03

No, please follow this guide. Or find another one.

Ardumotive_com (author)UnmeshK2015-09-09

Very good! I thins that you can do it, but I can't help you how...

Thank you for the photo!

michelemartino made it! (author)2015-09-03

this is my plotter. for Z axis I've used a rail of an other cd drive, modified with a spring. for the moment I use a pencil because it is the smaller marker I've got but I'll buy a pen with the tip of 0.5 mm.

If I change che numers on gctrl program I think i could modified only the write speed... I believe it's somethingh connected whit Inkscape...


Phil_S (author)michelemartino2015-09-03

I hope your programming is better than your spelling and grammar, but 5 stars for effort! All these things take a lot of hard work, but "somethigh", "whit", "che", "numers" - must try harder, as they used to say.

mholguin-veras (author)Phil_S2016-05-22

Dude, I wonder how many languages do you speak to talk like that? Take into account that english is not the tongue language of many people (me included). Value the effort. Value the fact taht person (albeit with some difficulties) can communicate succesfully with many...

pradeepss (author)michelemartino2015-09-04

great! can you upload a video of this machine in operation?

michelemartino (author)pradeepss2015-09-05

I do not know how to load it, however, it is like ardumotive's plotter, the same working...

Nice photos!! Nice Michele!!!
Phil_S this is not very polite.. People from all over the world are using, that doent means that they have a degree in English...

SergueiA made it! (author)2015-09-24
Ardumotive_com (author)SergueiA2015-09-26

nice!! Well done! :)

Oshadha Pathirana (author)2017-12-02


I built it
Tks very much

Oshadha Pathirana made it! (author)2017-12-02

Oshadha Pathirana

Oshadha Pathirana made it! (author)2017-12-02

Oshadha Pathirana

bukeybans (author)2017-11-27

i want make big size laser cutter,and Screw Length is: 90mm. Step Angle is 18 degrees OK, but Screw Pitch is 0.5mm, (i think DVD rom Screw Pitch is 3mm)

|M |=============|

how can i fix this problem !

please help me !

JaywardhanP (author)2017-11-17

hi i have made the cnc successfully really nice project,

but i could not generate my own gcode, please help me how to do it.

polmourgos made it! (author)2017-11-15


After two days tried hard i have made it..But I face a problem.I have printed all three g-code files you have done and i wanted to create mine g-codes.I use linux and during the instalation i got the latest version of Inkscape so i instaled the version 0.48 to wine.But still the g-codes i've created they dont run.The cnc runs to a just small line.I think the files are corect cose at the camotics run as they should be.I would apriciate if someone can help me.I will upload photos tomorow.Thanks

I have

polmourgos (author)polmourgos2017-11-16

Hi again.I figure out everything.

Works as must be.

Thans again.

Video is here ..

SohaibH4 (author)2017-10-28

I have a problem. when Run G code after some movements in few seconds the process stops. and processing gives the error.

M18(Driver off)

command not recognized: M18


Any suggestions plz.

anil more (author)2017-09-20

hey ....i cant save the g code file .giving the error thats No module named site .plese helf me....

IrvinB (author)2017-08-01

What if I use different stepper motor and different length of x and y axis for a bit larger drawing. Does this step still works? If not what are the things i should to to calibrate my own cnc. Hope some will respond.

Jeevan K (author)2017-07-25

The stepper motor is not rotating..its only vibrating..please help

Eduardo A.D (author)2017-07-03

Hi, very, very good project, I see that many people have been successful.

I have uploaded Test_X_Axis_CNC_Plotter and Y, and my engines have good movement.

I have a problem with gctrl.pde and gctrl.exe, but I do not know why. My engines have no movement with gctrl. Select the serial port (OK), use the arrows and no movement, load a gcode image with (G) and no movement. I do not know where the problem is.

You help me? Thank you

My beta-CNC without Arduino, only router with OpenWRT and L293 driver. Does not interpret GCODE yet:

RasoolZ (author)2017-01-22

hi, my cnc plotter is working but unfortunately something is wrong with it. there is not any similarity between shape in inkscape and what is drawn with plotter. I do nt know how can I figure out this problem. can you help me?

Suraj Grewal (author)RasoolZ2017-06-16

Can you upload your code, results and photo of your CNC?

a1m918 made it! (author)2016-03-04

Thank you for this great tutorial.
yes I made it :) (y)
but I am having smaller scale than original. ( such that any image of 40 mm is being printed on the scale of 25mm max)

sorry for english.

William Summer made it! (author)a1m9182016-06-16

I have a similar problem . Obtained strange drawings with dimensions of 25 * 25 mm. Do you know how to fix it? Thank you for your suggestions

Heavy load I guess?

Did you solved the issue?

I swaped axes to fix thath issue. And with inkscape and customized drawings on my first attempt I had to redefine the drawing area dimensions, making it smaller and starting from negatives points as origin and doing the are smaller and starting drawing on the center position (manually set)

Wish it helps :)

Ardumotive_com (author)a1m9182017-02-03

Great! Well done!!

opp1 (author)a1m9182016-03-14

Same here also .

SarvjitP (author)2017-06-05

What is the area Of printing ?

MusaA11 (author)2017-06-03


i need help. dude i made one of this plotter and i use arduino uno and 3 easydrivers to control the motors. but when i use grbl controller the only motor that move is the X axis .the Y axis only jogging and Z axis dont move at all. i measure the power pins on the easydrivers and its shows 4.6 volts. i dont know what should to do. pls help me.

MuntasirW (author)2017-05-01

Hello, greetings from Bangladesh. I recently made a cnc
plotter. But I can't generate any gcode files using inkscape. Can you
please provide me with some gcode files? Thanks in advance.
Thesikor (author)2017-04-30

It's great project.

JonnyAlpha (author)2017-04-17

Will your guide work with an Arduino Nano? The reason I ask is because I have been following this guide:
the creator of which has uploaded a simplified version in which your Instructable is linked.
It has taken me ages but I think I now have the software working using gbrl and Universal Gcode Sender but my motors are not moving (possible wiring or arduino sketch problem as I am still not sure I have installed gbrl properly as there does not seem to be anything in sketch apart from all the include files).


EzekielV1 (author)2017-04-06

can i use uln2003 ic instead of the l293d ic?

sanjayks (author)2017-04-04

I run the test code but the stepper motor are not moving they are only vibrating please help me

SajithU2 made it! (author)2017-04-03

Working Video....?

How to make CNC Video...?

SayadY (author)2017-03-24

About This Instructable




More by Ardumotive_com:MIKE - Arduino Line Following Robot for Beginners "GRECO" - Arduino Object Avoiding Robotfor BeginnersArduino 3D Printed Digital Thermometer With DHT-22 Sensor
Add instructable to: