My first CNC machine Arduino Mega controlled!!!!

Oh, btw, my blog is at http://blog.borud.no/ . I occasionally blog about the CNC project there.

-Bjørn

Here are some pictures from my Zen Toolworks CNC build. I built the machine last night with a friend of mine. I also posted these on my blog along with some comments: http://blog.borud.no/2010/02/cnc-build.html

At $300, that's tempting. I've realized that I don't have the tools to produce the precision bits that I need to build a machine that can make those types of precision bits. I've looked at some higher-end parts than I was initially considering, but just a full set of pillow blocks alone would be about half the price of that kit (those things are seriously overpriced). Also, it doesn't come with electronics other than the motors, so I'd still have to do the arduino stuff that I'm really more interested in anyway.

I'm worried that its leadscrews might make it move too slowly to be an effective repstrap. Though, I suppose it would only have to be one long enough to make me a set of Mendel parts, and I think I read that some of those can be milled faster than they can be printed.

My plan was to drive the steppers with the EasyDriver 4.2 cards. Someone pointed out that the NEMA 17 motors that came with the machine may be a bit too large to drive from EasyDriver 4.2. Anyone have any experience with these cards on equivalent motors?

If it turns out that the EasyDriver 4.2 is a bit too undersized, are there any equivalent drivers someone can recommend? (Just a schematic would do as well. If I have to build it myself it'll just add to the fun :slight_smile: ).

-Bjørn

I have some NEMA 17 motors that I've tested lightly with them. They seem to work, but I haven't tried it under a real load. These are also 400-step motors (most NEMA 17s I've seen are 200 step), so that may be a factor. Apparently, the NEMA standards refer only to the dimensions of the motor's case, and what's inside could vary pretty widely, so they may be able to drive some NEMA 17s but not others. Mine are rated for .67A/phase for bipolar operation (this appears to be lower than most), so they should be fine. If there's a model number on your motors, you should search for a datasheet. If you don't need microstepping, a chip like the A3982 on the makerbot driver board should be a better choice.

Yes, from what I understand the NEMA 17 designation only says something about the dimensions of the motor case.

I figured I'd just hook up the EasyDriver and run the X-axis back and forth for a few hours or until the board blows up :slight_smile:

I suppose that's one strategy. If you put a heat sink on it, you can probably reduce the chances of the magic smoke escaping.

You can also get a motor driver that has controllers for all all 3 motors on one board.

I am currently building a 3D printer and got a complete kit that includes a very nice motor driver. Here is the link:

http://store.makerbot.com/electronics/assembled-electronics/reprap-motherboard-v1-2.html

You can buy one fully assembled or you can build your own. Everything is open source so all schematics etc. are available online.

http://www.reprap.org/bin/view/Main/Generation3Electronics

IT is used in the REPRAP http://objects.reprap.org/wiki/Mendel and the CupCake http://www.makerbot.com/ printers.

The reprap motherboard you linked to does not have stepper drivers onboard. You have to connect it to a driver board for each stepper. It is designed to be used with three of these: http://store.makerbot.com/electronics/assembled-electronics/stepper-driver-v2-3-fully-assembled.html

Sorry about that! ::slight_smile:

I linked to the "mother board" which is essentially an Arduino (Sanguino). The stepper driver is at the link you provided. and you will need one for each motor.

:slight_smile:

Genius!!! This is an amazing work!

Cool, I am attempting to make my own as well, though I am new to arduino.

@aventgps and anyone who can help. I am building a 3 axis CNC router and was very happy to find this forum post about controlling a CNC with a ArduinoMega! I have my stepper motors and I bought some drivers for them, I thought about making my own but I lack of patience got the better of me and I bought some. I have done some preliminary tests and successfully got the arduino running one stepper using the stepper library in the arduino IDE.

Next step is where I am struggling, I found the reprap site also but didn't find much on it about the arduino setup (anyone have a good link?) I uploaded a modified reprap sketch for the stepper control with the parameters for my steppers. Where I am stuck is then implementing the Gcode control to the arduino. What do you use for this? There are a lot of options out there some people use pearl scripts, ReplicatorG or there is the reprap software. I am trying to use a mac to control it but I could use linux if needs be. I have been trying to use ReplicatorG and it is promising but it says there is no serial interface connected, I can't believe it would not work over USB, I am assuming you have it working with usb? Is anyone else using this or could someone describe there software setup along with the arduino sketch and Gcode control?

Another area I am not sure about is will I need to modify the code for my drivers a bit more. The drivers worked for the stepper library with the pulse control but the drivers also have a two pin direction control, are there pins assigned for this in the reprap stepper control?
Any help would be great, thanks!

Dave

I've been lurking in this thread for a while trying to come up with ideas, and now I'm getting ready to begin the build. I had a small business in High School building Adirondack chairs, they're easy enough to build, but cutting out all the pieces is really time consuming. I've wanted to experiment with building a CNC machine for years, but now I have a good excuse to make an attempt.

The machine I'm working on will (for now anyway) be a 2-axis 2D cutter using a Rotozip cutting tool to basically fulfill the role of a band saw and a drill press. I'm putting it together using a Duemilanove and the from Adafruit Stepper Motor shield. The horizontal axes will be driven by bipolar stepper motors harvested from an old DMX-controlled DJ light, while the vertical axis will most likely be controlled by a simple DC motor with limit switches since I don't need precision, it just has to be able to pull up, move, then plunge back into the wood. I might try a router bit in the tool, but since I'm only planning on cutting 1" thick wood, I see no need to go out of my way designing a vertical axis at this time.

I'll post updates as this rolls along. Here's one now because I forgot to mention it earlier. I ordered the stepper motor shield a week or so ago, but while I was waiting for it to come in the mail, I noticed that my local electronics shop had ULN2003A Darlington chips in stock. I bought a 4 pack (for $3.00USD) and started playing with one the other night to see if I could get the motor running off of the 12vdc feed from an old ATX computer power supply. I figured I'd play with this to get an idea for the coding as I waited for my motor shield. Somehow (most likely alcohol induced) I managed to insert the ULN2003A into my breadboard backwards. I wired everything up using the 4-wire schematic from the Arduino Stepper library reference page, and it didn't work. Eventually it donned on me to make sure the chip was in right, and that's when I realized that I had just sent 12vdc straight into 4 of the digital pins. I went to unplug the arduino, but I touched the ATmega328 and got a first degree burn (which was a good indication that I did something wrong). So with my arduino dead as a doornail, my motor shield arrived the next morning, and here I sit with no arduino to play with until my new one arrives within the next day or so.

Loving this project, I run an open space maker group in Nottingham called LAB. CNC router is way up there on the list of things to make!

hello people, i am back from a lot of work....... very glad to see people making arduino cnc machines....

Hi aventgps!, i'm venezuelan, please How i can buy a Arduino Mega?. i wanna do a cnc machine for printed circuits, excuse me, my english is no very good. Thanks!

@kdragon you can get an Arduino Mega from loads of online shops that will ship internationally such as:

Or

I don't know of any Venezuelan suppliers unfortunately. On a cautionary note, this is an ambitious first Arduino project for anyone and I might suggest that if you just want this for PCBs it might be simpler and cheaper to buy a CNC kit or pre-made one such as this or something similar:

Even making one yourself unless you have at least some of the parts like the stepper motors you will be looking at about a $300 build. Lead screws, nuts, stepper drivers, and bearings etc all add up very quickly! So weigh up time versus cost versus satisfaction of making it yourself. Hope this helps.

@ Daithi, thanks for answering, I am instructing me in how to buy in dollars from my country. You know, a fellow student and I made a cnc machine but only drilling we do, we made a software for milling and bring the printed circuit but does not satisfy us. Us at that time we did not have the economic resources to do so, in fact, the step motors of photocopiers got damaged and so many other components, because the country did not exist or were very expensive. Now we want to improve the machine to collaborate, teach and promote the elaboration of projects in the country. Thanks again!! and be following in the themes of the forum.

Does anybody know of an existing Arduino-based G-Code interpreter that is compatible with the Adafruit motor shield? This shield uses it's own library and is not compatible with most G-Code interpreters. including the RepRap one. I tried asking about this in the Adafruit forums, but they seem to be avoiding my question and keep telling me to just use their library, which doesn't include a G-code interpreter.