Introduction: 4xiDraw

This project was inspired by a commercial product called AxiDraw that I saw a video of recently from Evil Mad Scientist Laboratories.

It was a combination of reasons that made me consider to do it myself, cost, availability and customs playing a role in the equation (that, and having a 3D printer at home).

This is just a drawing machine quite similar a to a pen plotter but that can adapt to any size of document and any type of paper.

It can use regular felt-tip pens, ball pens or fountain pens as pen orientation is variable. It is a new version of an XY plotter using a single belt and two stepper motors in a configuration called h-bot.

Step 1: What You Need

I started the project using laser cut parts but eventually evolved the model to 3D printed parts. So you can grab the STL files of the printed parts from here or here.

Bill of materials

  • 2 nema 17 steppers (*)
  • 4 8mm smooth rods (two 400mm-long and two 320mm-long)
  • 8 LM8UU
  • 2 20-tooth GT2 pulleys
  • 10 F623ZZ bearings
  • 1 micro servo SG90 (plus a 250mm cable extender)
  • 1 Arduino UNO
  • 1 CNCshield
  • 2 Pololu stepsticks
  • 1 GT2 belt ( 1.4 meters long )
  • 2 M10 threaded rods (400mm-long each)
  • 8 M10 nuts
  • 8 30mm M3 screws with nuts
  • 8 6mm M3 screws
  • 4 16mm M3 screws with nuts
  • 4 M3 washers
  • 2 4mm OD, 100mm-long carbon fiber tubes
  • 2 15mm M3 screws
  • 1 12V 2A power supply
  • 1 USB cable
  • 1 felt tip pen (or many for more fun)

(*) Stepper motors should be 40mm or shorter, unless you chose the taller parts that I later created for some users willing to use 48mm tall steppers (like many use for 3D printers).

Step 2: Assembly

There is a live 3D model you can see for yourself in here. The explode feature may give you an idea of what is inside of another part. Or you can download STEP model or access Onshape CAD design from Thingiverse.

I recommend the following building sequence:

  1. Slide two LM8UU in each of the two longest smooth rods.
  2. Slide the rods into the motor pieces, one on each side (leave an extra 20mm of the rods in one of the two sides protruding from the part towards the motor, this will later be used for supporting the Arduino holder).
  3. Insert the M10 treaded rods so each one supports one side of the motor-supporting pieces using a nut on each side (total 8 M10 nuts).
  4. Mount the nema 17 stepper motors on the two big plastic parts using 8 M3 screws (8mm long).
  5. Insert 8 M3 nuts into the nut-holders in the bottom squared carriage and place it supporting the LM8UU linear bearings you inserted in the long smooth rods already installed.
  6. Take the remaining (shorter) two smooth rods and insert two LM8UU linear bearings on each one of them.
  7. Insert the two endY parts on each end of the pair of smooth rods. Now you have the second axis done.
  8. Insert the top square carriage over the 4 linear bearings of the shorter smooth rods.
  9. Insert 4 M30 30mm-long screws in the 4 central holes of the top square carriage, put the carriage upside-down carefully so the head of the screws will lay on the table and the screws will point upward.
  10. Insert one F623ZZ bearing with the flange down, next an M3 washer and finally another bearing but now with the flange up) into each one of the four screws of the top square carriage.
  11. Use a post-it or a similar-size piece of paper to press it against each one of the screws protruding so paper is perforated and is pressing against the top of the bearings. The goal is for this paper to hold them in place while we put the whole thing upside-down preventing the bearings to fall off.
  12. Place the top carriage over the bottom carriage so the smooth rods on the top form a right angle with the bottom smooth rods.
  13. Screw lightly each one of the four M3 screws and once you notice each one is attached to the nut in the bottom tear the post-it paper apart. Next finish tightening the screws and add the other 4 M3 30mm screws that do not have a bearing but add strength to the union of top and bottom parts of the carriage.
  14. Place one GT2 pulley on each stepper motor but do not tighten the grub bolt yet.
  15. Place a pair of F623ZZ bearings with an M3 washer in between fixed with an M3 screw in the end Y part that will support the servo part.
  16. Insert the belt all along its path (the crossings of the central carriage are a bit tricky). And once pulleys are aligned with the belt tighten the grub screws on each one.
  17. Use two M3 screws and two nuts to attach the servo support part and later add the microsevo using the two screws that come with it.

  18. Make sure the vertical two holes in the servo support part are 4mm diameter and that the carbon fiber tubes can be inserted into them (if not, drill the holes with a 4mm drill bit). Insert both tubes from the top but only mid way. And next insert from the top the vertical carriage (the one that looks like a smiling face). Gently push it down till you can insert the remaining half of the carbon fiber tubes so they are inserted into the bottom holes of this carriage.

  19. Using a couple of M3 screws and nuts fix the pen-holder part to the vertical carriage.

  20. Push the Arduino holder into the protruding smooth rods on one of the stepper motor holders. Use a couple of M3 screws to attach the Arduino board to the plastic holder.

Congratulations, the mechanical assembly has been completed.

Step 3: Load Arduino Firmware

This project uses a special flavour of GRBL software created by robotini user. It enables GRBL to handle a servo on digital pin 11 using commands M3 and M5. This way it can raise and lower the pen on the paper.

Installing the software is better explained here, please read it carefully as some people may find it difficult as is not the typical Arduino program (in essence the code is created as a library).

How do you know it is all working?

You can connect using the Arduino Serial Monitor to your board at 115200 bps and a welcome message: grbl 0.9i ['$' for help]

Step 4: Wiring Everything Together

Before inserting the CNCShield over the Arduino you want to do this trick, that will allow to power everything from the Arduino power jack. Failing to do this connection from Vin to + header on CNCShield most likely will make your servo not to work properly.

On top of Arduino you insert the CNCShield board and on top of it, two of the Pololu StepStick stepper driver boards. But before inserting these two boards for axis X and Y, make sure you put three jumpers in the headers (that will later be obstructed by the Pololu carrier boards).

A three-wire cable will be coming from the servo and two four-wire cables come from the stepper motors.

Servo cable has to go to (red) +5V, (black) GND and signal (white or brown) to Digital pin 11. Servo cable is too short, so an 250mm extension cable will be needed.

Each stepper motor goes to X and Y axis four pin headers on the CNCShield.

There is an optional improvement: make the plotter wireless by adding a Bluetooth module, but I would only do this once everything else is up and running.

Step 5: Computer Software You Need

There are two types of programs to use in your computer (until someone creates one that does both): one for creating the code for a given graphical design. And a second program to send the code just created so the plotter will draw it on paper.

For the first part I use Inscape free vector drawing program with a plugin I hacked. Install may be a bit tricky for the non tech savvy user.

For the second part I use UniversalSerialGCodeSender Java program that allows you to load the file created with Inkscape and send it to the plotter.

You want to setup the proper scale for your machine, but that is not stored in GRBL firmware but on the Arduino UNO EEPROM memory. So you will need to set that right before starting to draw. (Following text comes courtesy of Erivelton user):

  1. Access from the terminal (commands tab) of the Universal Gcode Sender, the settings of your firmware by typing $$
  2. Check the parameters $100 and $101. They define how many steps are required for the machine to go 1mm.
  3. Considering that you used a 200-step motor, a 20-tooth pulley, and the GT2 belt (2mm pitch), the correct values for both parameters would be 80.
  4. If they are not with these values, type “$100=80 + Enter” on the terminal to adjust the X axis. Type “$101 = 80 + Enter” to adjust the Y axis.
  5. Ready, your machine will now draw exactly the same dimensions as your Inkscape drawing :-D

Update: Torsten Martinsen has brought to my attention his work on another plugin that will take care of sending the drawing to the 4xiDraw from within Inkscape software, so no need for UniversalSerialGCodeSender nor for another plugin this way. You can get his plugin here:

Step 6: Final Touches

I think this a fun project can easily take a weekend to get it done (depending on your skills).

This is my first instructable and I can see there is yet much more that could be said about the details of the project, but once the basic stuff has been laid out I would try to improve it by addressing user comments.

And if you would like to say thanks in ways different than a comment, you are welcome.


TuấnV17 made it! (author)2017-08-16

Thanks Misan for this great project!

38fc7e956b844b40b24965891435e088_preview_featured (1).JPG38fc7e956b844b40b24965891435e088_preview_featured.JPGa8c6f3e49352b7a693a7b3b509b9088a_preview_featured.JPG
misan (author)TuấnV172017-08-17

Good job!


thanks for sharing idia

AlexD303 (author)2017-07-28

So... do Windows users, as of July 28th, 2017, have to use the UniversalSerialGcodeSender to use the 4xidraw since the plugin apparently doesnt work? Has ANYONE found a fix or talked with Torsten to get a fix for the plugin for Windows? PLEASE let me know ASAP!

pepepepona (author)2017-07-24

MIsan como estas? Tengo un problema. CUando desde el GCODESENDER intento mover el eje X o el eje Y, se mueven los dos juntos haciendo movimientos en diagonal. En un foro lei que pusiste que habia que usar el correcto CONFIG.H . Como asegurarme de que se esta cargando correctamente? Cuando se modifica el CONFIG.H... hay que volver a cargar la libreria al ARDUINO IDE? Tengo el COREXY sin comentar. Gracias por tu ayuda.

misan (author)pepepepona2017-07-24

Es el COREXY que tiene que estar sin comentar pero me parece que no has conesguido cargar la versión sin comentar.

pepepepona (author)misan2017-07-26

Pense en el mismo problema. Los pasos que sigo son:

1- Conecto Arduino y le corro el programa EEPROM Clear.

2- Luego busco el grblupload y se lo cargo

Antes de todo esto descomente el config.h. La carpeta de grbl debo moverla a algun lado? Despues de cargar la libreria GRBL, si quiero modificar el CONFIG.h, lo tengo que hacer desde la ubicacion de donde cargue la GRBL o desde otro lugar?

Gracias Misan

pepepepona (author)pepepepona2017-07-26

Me parece que mi error es que modificaba el CONFIG.H desde donde lo cargue al arduino y no desde el CONFIG.h que esta en arduino\libraries. En un minuto lo pruebo y te aviso. Gracias

pepepepona (author)pepepepona2017-07-26

Efectivamente ese era el problema. Gracias Misan!!

misan (author)2017-07-26

solo cuenta el config.h en la carpeta grbl dentro libraries

JacksonV6 (author)2017-07-22

I'm getting a warning on inkscape saying "Warning: Your selected object is part of a group..."

I've tried to ungroup it but still have problems. Any ideas?

misan (author)JacksonV62017-07-23

There may be groups inside groups that might need more than one ungrouping operation.

JacksonV6 (author)misan2017-07-23

I got it working now. Only problem is everything mirrored and the Z axis wants to go up instead of down. How do I go about reversing these? I know that $3 inverts the x and y, but not sure if I'm doing it right. On your Gcode files it works fine but others it does not. How do I invert z axis? Thanks so much.

AbuFayez (author)2017-07-22

Hi Misan, I made this machine and it works perfectly on the gcode files you made , but not working on any file that I made !

Can you please help me with this !?

I try several methods to generate a gcode file and even the plugin you recommended doesn't work ,too!

faisalA117 (author)2017-07-17

Hi Misan,
Thanks a lot for this amazing project.
I've made one.
Through universal gcode sender, i can manually control x y steppers
But the problem is bullestock 4xi plugin for insscape always crash. It doesn't work at all.
But your own g code exporter plugin is for laser machine. How it can work for 4xidraw for moving the servo. Didn't find anything. Plz help me out on this.
Again thanks for the amazing tutorial :)

misan (author)faisalA1172017-07-17

The plugin I posted works with 4xiDraw as it replaces the laser on/off commands by pen down/up commands.

pepepepona (author)2017-07-15

Misan, GRBL version 1.1 is currently available. Do you recommend it? Have you used it? Have you noticed any improvement in the Axidraw?


misan (author)pepepepona2017-07-15

Hi, I do not think changes on GRBL version are making a difference for the job. At any rate, you need to port the changes so the servo works (as stock GRBL spindle control does not work with a servo). I have not made any changes to my machine so far, but I can see that smooth bars could be fixed with screws instead of superglue.

HazzyMan (author)2017-07-15

Thank you so much for the great project Misan! May I ask you a question, is it possible if we want to control a DC motor instead of a servo? Like for pen down the motor runs and for pen up the motor stops? Can we use the spindle enable?

misan (author)HazzyMan2017-07-15

Sure you can do that too. Other people use a third stepper for the pen up and down as Z-axis.

AbuFayez (author)2017-07-11

Thank you Misan for this great explanation,
i tried to make this one , but i didn't use the CNC shield and the recommended drivers , rather i used 2x L298N drivers , the problem is, everything is wired up and tested but when i load any gcode file the machine didn't move >>>
could it be that i didn't use the CNC shield cause that ??

i want one more thing from you , please!

what are the pins you used to connect the two steppers?
i believe if i connect the motor correctly the machine will work , it's only the connecting sequence that i need to know!

thank you in advance!

sorry for my bad English!

misan (author)AbuFayez2017-07-11

What you want to do is beyond the current capabilities of the firmware I use (GRBL assumes drivers with STEP and DIRECTION drivers. L298 won't work like that, so you will need to figure out a firmware that can use it).

Wiring is like this

faisalbelwadi (author)2017-07-07

One more Question that i Have is Misan, In inkscape, the picture that is in inkscape has a fill in it , while when the actual picture is drawn, only the outlines are traced and not the fill (i.e. black fill inside the outlines.)

How am i supposed draw the outlines as well as fill it with the pen? (besides hatchfill as it takes too long for complicated images.)

In short i need to fill in color to the picture

misan (author)faisalbelwadi2017-07-07

hatchfill is what I was about to suggest. other than that I do not know what else you could do.

faisalbelwadi (author)2017-07-06


The AxiDraw has a feature in which by using different layers in Inkscape, two or more pens can be used in the drawing. the axidraw draws with one pen, then the drawing is paused and the user changes the pen and then it is manually resumed.

Can that be done with the 4xiDraw as well? ie. automatic pausing and then manually resuming after changing pen.

misan (author)faisalbelwadi2017-07-06

Use Torsten's firmware as it is an adaptation of the original AxiDraw plugin.

faisalbelwadi (author)misan2017-07-06

The plugin still does not work for windows , he says. Can it be done through Universal gcode sender?

misan (author)faisalbelwadi2017-07-06

Not in a way I am aware of.

fishnet (author)2017-07-05

Hi Misan,

Thank's for this fantastic project. I finally finished it and it works with some errors, but it works.

I have some errors when I send the gcode file to print, but if I press resume it begins to print, but for now it's ok. I will post the errors here to see if you can help me to solve.

I have another issue to solve, but I think It's not an error it's simply I did wrong on inkscape and I explain you:

When I start a new design on Inkscape , first I import the file I want on jpg or png. After I change properties of the documents, changing mm to px and scale to 1.

When I have this done, I select the picture and I vectorize it and after I export with the plugin laser gecode exporter and I generate a gecode file.

When I import the file whith the universal gcode sender and I print it, always lines prints are duplicated and there is a blank space between lines.

I can not print like the example of the begining of the post from monalisa with single lines.

maybe its a problem when I vectorize?

Thank's in advance and congratulations again


misan (author)fishnet2017-07-05

try this other tool for vectorising

fishnet (author)misan2017-07-05

Hello Misan,
Thanks for your help.
I tried with this tool and it works fine.
I exported on vectorised pdf and I imported on inkscape and result is fine! Very thin lines.
Do you know if its possible to do the same on Inkscape with any comand or maybe with Corel Draw?
Thanks again

misan (author)fishnet2017-07-05

No, I do not think so.

fishnet (author)misan2017-07-06

Thanks a lot Misan

JacksonV6 (author)2017-07-03

Does CNC.JS support servo?

misan (author)JacksonV62017-07-04

no idea but I would guess it does not.

author made it! (author)2017-06-23

Thanks Misan for this great project!

misan (author)miguel.bi2017-06-23

Thanks and congrats on your working unit.

author (author)misan2017-06-26

misan (author)miguel.bi2017-06-26

Great job, and thanks a lot for sharing it.

ANDROG4 (author)2017-06-23

Hey , please can you upload some pics in detail ?

author (author)ANDROG42017-06-23

If it can serve, in a few days I will publish a videotutorial (in English), with step-by-step assembly.

misan (author)miguel.bi2017-06-23

That is going to be great. Thanks.

pepepepona (author)2017-06-22

The NEMA 17 stepper recommend 1,8º or 0,9º ?

misan (author)pepepepona2017-06-22

I have only used 1.8º but I cannot think of a reason of why 0.9º won't work.

pepepepona (author)misan2017-06-22

Thanks Misan.

What precision is achieved with 1.8º?

misan (author)pepepepona2017-06-22

I would say better than 0.2mm but math can fool you into thinking you can do much better. On the other hand, using a single belt for the two axis can make repetitivity poor unless you manage to get a very rigid structure. I won't use this for any high precision operation.

krivulak (author)2017-05-28

Hi, can I ask you for contact on the guy who made the 4xidraw plugin for Inkscape? It throws errors on me and I would like to discuss it with him, Thank you very much :)

krivulak (author)krivulak2017-05-29

Nevermind, I debbuged it myself. There was a problem with board addressing, the code had few typos. Working flawlessly now.

faisalbelwadi (author)krivulak2017-06-14

Can you tell me how to correct it? I am facing a problem which says "failed to connect to 4xiDraw :( " . i have installed pyserial 2.7.

JanK207 (author)faisalbelwadi2017-06-17

I have the same problem, have you solved it yet?