Sunday, June 10, 2012

Arduino CNC Motion Controllers

I have been examining projects using a gcode parser and step motor controller running on an Arduino. Here are the projects I've come across.

GRBL: ( Simen Svale Skogsrud ) This open source program has been developed to run on a basic Arduino; however, it cannot be compiled using the Arduino IDE. The code is compiled directly using the avr-gcc and downloaded or programmed into the ATmega328 ( Here is another loader ).. The development of GRBL seems very active which is a plus. Take a look at the Github site. I only wished it compiled using the Arduino IDE. For an overview of GRBL including implemented gcodes try here.

If you are interested in trying GRBL, here are some suggestions:
  1. Download the Arduino IDE. Can be used to test your Arduino board.
  2. Download WinAVR. Can be used to compile GRBL, if you wish.
  3. Download the hex file and source for GRBL from GitHub
  4. Purchase an Arduino. I would suggest the Duemilanove which can be obtained from Amazon for $20.
  5. Purchase a proto shield and wire whatever connector is needed to connect to your driver board.
  1. Some of the older sketches, like those below, will not compile with the Arduino IDE 1.0, so also download Arduino IDE 023.
  2.  I have made sure the drivers on this blog are opto isolated, if yours is not you could do that on the proto shield.


The following Gcode interpreters are directly or indirectly from the RepRap project. The code below has mostly gone dormant, but the code is there to look at and play with.


Reprap_New_Firmware: ( Chris Meighan )

Reprap_New_Firmware_Arc: ( MMarz )

RSTEP: ( Reza Naima )

Still working on this post


  1. I have a GRBL shield with the GRBL interpreter running on it. Right now, it is not connected to anything but I have done a few tests. It is really nice with very smooth stepping. The shield was developed by the same guys as the TinyG. The only thing I don't like is that it ends up being expensive. I have a $50 US mini-ITX and a cheap Chinese 4 axis controller that is about the same price if you pull it out of the package deal I got with steppers, power supply, connectors, cables and such.

    1. I expect the mini ITX for $50 is just the motherboard, so by the time you add memory, CPU and an OS you have $300. You might look at places like Goodwill in the US where you can buy a used Dell with monitor for about $150. As to the cheap chinese motor controller, check out the CNC Zone where there is a very long thread. You get what you pay for.

      I intend to try the GRBL gcode interpreter. Today I compiled the code using WinAVR so I can make changes. For example I would like to re-assign the limit switch pins to A0-A2.

  2. Wow, really fantastic blog.. this post is looking very informative and unique content.. i am very impressed by reading this content .. thanks for sharing good information... good work..keep it up...

    Brother Printer Technical Support