3 Axis Arduino Based CNC Controller





Introduction: 3 Axis Arduino Based CNC Controller

About: Disclaimer: The author is not responsible for loss of life, limb or property. The author is not responsible for your actions. The author is not responsible for anything. In fact, the author is completely i...

I've been playing with different CNC designs and Stepper controllers for many years now. I started building CNC machines long ago. My first inspiration came from Bruce Shapiro’s eggbot. I tried a few variations of it and even the board from evil mad scientist. Recently a project named GRBL came along that caught my eye. It used an Arduino to do the G-Code Interpretation. It still outputs step and direction pulses so all my existing designs worked fine with it.

The latest generation controllers I have built all use the same simple and cheap IC's. A pic 12c508 as the basic stepper driver logic and some H-Bridge chips that were originally meant for mundane things like tray loading motors on dvd players. I got a couple of hundred of these on ebay. The pic micros were from a guy that used to do mod chips with them but sold out his stock of unused chips really cheap.

I've used the cheapest parts I could find and still got great results with modest fine tuning. I used a dial indicator to see how bad my table was and it only varied .008 inches in depth from end to end. If I had used a surface planed board or aluminum plate that would have been better. I could always just mill a huge squared spiral pattern into the table to make it perfect

Step 1: Single Board or Multiple Board Modules

I've tried both ways and each has its advantages. I always keep the 110V SSR board separate. When using the single board approach I like to use an Arduino nano clone. when using multiple boards I use and arduino prototype sheild wired with a bunch of headers for the individual boards.

Step 2: Control Buttons

I found these nice buttons in a surplus shop so I bought a bunch. A scrap of aluminum angle iron, a drill press,  and a bandsaw made a couple of quick panel.s You can easily do this with a hacksaw and hand drill.

Step 3: 110V Solid State Relays

the great thing about certain SSR modules is they operate on 3-36V input signal. that even works well with a raspberry pi. I used 2 relays. one for spindle control and the other for coolant. I never really use liquid coolant. just a shop vac plugged into that port. Makes a great way to tell when the part is done since it gets real quiet in the workroom. I actually put a webcam on it so I could watch it from upstairs and not have to listen to the noise

Step 4: Picking Motors

Picking motors is the hard part. They have to be beefy and easily available. for me that meany craigslist and an ad begging for old plotters and massive printers from the dot matrix days. Luckily I got a recycler to give me a pickup truck load of them

I use a simple driver that has no enable input but is really cheap to build and can handle 90W/per motor max (30V and 1.5A/phase). it does have overcurrent , overvoltage, overtemp protection though. I am writing an i'ble just on that controller. I like to use recycled power bricks in the 16-19V range.

that works well since I had a bunch of unipolar 12V steppers. I don't connect the common leads so I use an H-Bride bi-polar driver. this means the 12 coils on each phase are connected in series for a 24V coil. Running them at 16V keeps them cooler.

Step 5: Software

The GRBL firmware was simple since I used the sketch version so I could load it using the arduino IDE. I foung the GRBL Controller just as easy to use and there are windows and Mac versions available...

Step 6: X-Y Test

I wanted to see just how well the x-y table worked before continuing so I loaded up a simple g-code mickey mouse file and put a pen in the machine with a bunch of rubber bands. This also made it easy to test out acceleration settings since I could hold successive prints up to the light.

I worked by trial and error increasing the feed rate and acceleration until it lost steps then backed off a bit. In the real world I used a slower rate anyway so as not to break off the carbide bits.

Step 7: Z Axis

The Z axis had to be strong enough to hold a dremel but not too heavy to stress the motors. I used some okidata printer rails and 1x4's. in another version I used the rails from an old laserdisk player bolted to a 1x4.

for all the axis' i used 1/4-20 threaded rod. To minimize backlash  I used blocks of delrin to make the nuts

Step 8: Trivets

I finished it on Christmas eve and decided to make some trivets and ornaments for stocking stuffers.

I used scraps of flooring, shelf boards and whatever else I could find laying around the shop.

to give the engravings more contrast I used some spray paint. I just gave the board a liberal coating and wiped it down with a rag sprayed with WD40

I then used mineral oil to give the wood a little protection

Step 9: Circuit Board Routing

A little while later my friend John was visiting and asked if it could drill a circuit board.  I said sure, it could even route them too

So I decided to give it a try. I found a simple QRP transmitter design which I could use for an arduino project and tried to make a couple.

I built a 20M and a 40M board. They worked so well I’m going to route 2 more for 80M and 160M



    • Oil Contest

      Oil Contest
    • Water Contest

      Water Contest
    • Creative Misuse Contest

      Creative Misuse Contest

    20 Discussions

    i have a BUNCH of unipolar motors too!
    so, if you could share your PIC drivers, wold be great

    Hey !very nice cnc .... I m in my way to make a cnc and since I am a beginner so I wanted to know that
    IS there any difference in cnc's code due to use of different size of lead screw or anything else ... Means my router is going to be a little bit bigger so can I use the code that I downloaded from an instructable ...PLEASE HELP

    Hai imade a cnc plotter
    But .idont know how to create gcode can anyone help me to do it.from youtube i found but it dont work for me.mainproblem is my bed size is 4x4 butthe gcode file is20x20

    circuit diagram plz

    is simple h bridge driver l298 can work accordingly with g code interpreter if does can i have simple g code interpretor program for ardiuno i am working on 5 axis cnc machine and get traped with driver and software issue (is edit usb controller is compatible with h bridge ..?? if not so which software is ... ) please help..!!

    1 reply

    I used H-bridge drivers because that's what I had on hand. I did another instructable about them here:


    There are some things to consider. To drive a single stepper you need 2 separate H bridges and a controller to go between the step/dir pins and the h bridge inputs. Also without a lot of work the best you can do full or half step drive.

    so for your 5 axis machine you would need 10 h bridges and 5 pic or attiny support micros...

    That being said I did many machines with H-bridges anyway and they worked great. Full stepping is fine with 20tpi lead screws...

    I'm doing another machine soon so I may revise this a bit....

    Great job! Can you upload an electrical schematic and arduino code?

    your idea of making this cnc machine is awesome..!

    But you haven't provided full circuit diagram with arduino and its code..!

    in your other instructable you have provided circuit of stepper motor controller ,but not cnc controller circuit..!

    please send me the full circuit with code "maheshjshetty@gmail.com"

    I used H-bridge drivers because that's what I had on hand. I did another instructable about them here:


    I hand-wired the protoboard by following the hookup diagram in the GRBL wiki. I never bothered to document the board since I figured everyone would have a unique take on how to assemble a cnc and make it their own.

    I have since moved on from GRBL in favor of a controller that does ARC's and has a few more options.

    Where is the code for the arduino and the schematic of the electronics? Could you also tell me which programs you will need to get it working? And last I want to draw in AutoCAD the things I want to mill out. Could that work?

    1 reply

    The code for the arduino is on the GRBL project github, its been updated a couple of times since this was published.

    there is also a hookup diagram in their wiki that I followed. I did use a couple of custom pics to drive the H-bridge chips I had lying around. if you're interested in it that code is in this instructable


    Inventables sells a aurduino g-sheild that fits right on top of the aurduino and will control a 3-axis cnc if that helps anyone. It is what I use.

    1 reply

    Yeah I looked at a lot of those but many use the little stepstick driver chips. they like to overheat. These big SIP's easily transfer heat out. I've run the thing for 7-8 hours straight and the heat sink barely got warm. I could leave my hand on it comfortably. I wanted to do some long jobs. I guess it a matter of your intended use. My next big job is a Gallifreyan plaque for my sister. it might be the longest one yet but I wont have to worry about overheating the controller. I added an Air jet to keep the bit cool too.

    Great job with the details and explanations. It's answers many questions and makes a terrific roadmap for anyone trying to learn.

    Thanks @rjkorn for the mention. I have actually designed a nice little Arduino Shield that uses GRBL(G-code interpreters) to control CNC machines. All that is needed with the shield is an Arduino an some Pololu Drivers.. :)

    Here are a few helpful links:



    yes could you please upload the schematic and the code for the pic, that would be very helpful.