Author Options:

need a little guidance with an arduino controlled CNC machine. help? Answered

ok so I am in the process of getting the axes set up, and theyre in a state that would allow me to test them. I am using the laser carriages from CD-ROM drives, so i know i wont get amazing build sizes, but that isnt the matter here.

I've searched and searched and searched and have yet to really find definite instructions.
The hardest part is going to be coding the arduino. I would like to use an ATmega16, but a 328 will work too. I intend on using L293D's to control my motors. they seem to work fine for on the bench testing, so with cooling in an enclosure i dont see why it wouldnt work.

but I have no idea where to start with the coding. Ive seen references to GRBL, some reprap stuff, and a LOT of people being told basically "your method is stupid, buy these motor controllers and use my method", which i guess works well, but I dont have the money to buy the fancy motor controllers and the 293s seem to work fine.

so, can someone point me in the right direction, or give me some pointers here please? I'd really appreciate it.



5 years ago

MOST CAM (CNC) machines are linked to a CAD system - You draw the design on the CAD and cut it out on the CAM (CNC) .

Commercial CNC usually uses a protocol called Gcode (look it up) This is produced by the CAD system and describes the drawing as a set of X Y coordinates.

There are variations on Gcode - HPGL is a common one often used for pen plotters.

You need a machine driver system that can understand the Gcode commands and turn them into the series of X Y steps to move the stepper motors. Gcode will be start and end points of a line or a series of cordinates for a circle or arc.

1. You need to know quite a lot about programming the Arduino, start with very simple things and build up to running the stepper motors.

2. Your going to have to work out how to turn a start and end point into a series of steps to get from A to B. i.e. the maths involved.

3. To do something meaningful your going to need to work out how to use larger stepper motors and build the heavy duty driver stage to go between the arduino and the stepper motors - the arduino will not provide enough current to drive a stepper motor (at any speed)

4. Your going to need to know how to build a suitably stiff moving X Y and maybe Z platform

5 there is a lot on the site about CNC so try a search.


Answer 5 years ago

i know the basics of CNC machines, and have a stage in the process of being completed. I have what I feel is adequate arduino experience, having constructed a mini sumobot for a competition prior to this project. I have steppers, and I have a motor driver for them, I was only asking if someone had an idea of where I should start with the coding for interpreting the gcode, as I am not sure on this, and it has been very difficult to find the information I am looking for through searches.


5 years ago

Well, I wouldn't write a Gcode parser if I could help it, and GRBL is opensource...