Arduino Addict (SMALL CNC Rounter attempt)

Hi everybody, I am a total NEWB when it comes to this kind of stuff. I have been a fan of the "hack type websites" for years now. I have built a few projects in my time, by reading tutorials. This Arduino thing really got my attention, so I made the leap and bought one not knowing what I want to do with it, other than messing around with LEDs and things like that. I also bought a motor shield (thanks LadyAda).

I have done all the easy tutorials for both Arduino and the Motor sheild, and everything works. So now I have this idea that I want to build a SMALL desktop CNC type router. Do you guys think it will work? I have searched Google with some success but nothing that really covers it top to bottom.

I guess my biggest hurdle is getting the machine to take commands from the software. I downloaded the software called MACH3 (because it was free) Anybody ever here of that? I looked at the RIPRAP or what ever its called but I dont think thats what I want.

I feel like I am going about this in the wrong order because I dont know anything about programming C let alone electronics. But with the small progress I have made makes me think I might be able to do it. So its either the small CNC, or a laser guided gun turret with a camera. lol. Any and all advise welcome. I could become the Adruino case study if I got the working.

Dave

hm, a good starting point could be these "Lego Technik Plotters".

for example this one: http://kisd.de/~krystian/nxt/

ciao andré

Hey Dave,

I too have been musing over a desktop CNC router of late. They'd be perfect for making your own CNC routed PCBs quickly and easily, which would be my intended purpose.

I think the hardware side of it would be quite simple. You need say 2 stepper motors or 2 servos to move the bed around, plus a solenoid (or something better) to push the router/motor down (for drilling holes). Plus the router (I've seen/heard of people using dremels?) and the gear to hold it all together. Wouldn't be hard using 3D CAD software to design the parts and/or utilise existing parts.

The more difficult part as you've discovered is the software and communication. I'm yet to look into the contents of a DXF file, but my initial stage 1 thought was using a monochrome bitmap. In VB.Net it's extremely easy to iterate through the pixels of a bitmap and determine what the pixel colour is. So, for instance, if you were to draw your PCB (or whatever it is) and made the bitmap black where you wanted it routed and white where you didn't, you could translate the relationship between the black pixels and the material you're routing. Simple commands could be sent to the Arduino over serial to tell it to lower or raise the router and which X,Y coordinate to move to. This basic method would make it work like an inkjet printer (left to right, top to bottom)...wouldn't be much good for line work, this would be more complex.

I'd like to see the router follow paths, to create smooth arcs and solid lines in a single route. That's where you'd need to use more advanced file formats and command routines with the Arduino.

I'm going to make this thread a favourite, so keep it updated with your progress/or lack there of!

Cheers,
Scott

Well, I just checked out the contents of a DXF file and it looks pretty simple...so there's some good news!

Scoota - why not use the text-based G-Code like most other CNC routers?

Funny enough, I was considering making a "travel size" pcb router myself last night, as I wished I could just test out what I was working with in Eagle w/o waiting for a PCB service. =)

!c

Would looking at the rep-rap project offer some inspiration? surely what they can do in 3-d can be turned into a 2-d version?

Harry - a 3d printer is basically just a cnc router/mill with a dispenser instead of a cutting bit. You can even add such heads to many existing systems - so yeah, what they do is directly applicable =)

!c

One big difference between additive (depositing) and subtractive (milling) systems is the way you have to adjust the tool paths. It can be a significant software problem. A milling tool isn't a zero-radius needle, and a depositing jet can't produce zero-width material either.

why not use the text-based G-Code like most other CNC routers?

Never heard of it! Looks pretty straight forward going by the Wikipedia article. We could do it either way I suppose...use someone elses or make up our own. Either way, it'd work. Just not sure which would be easier but it'd make sense to at least follow the basic method and logic they use but this would still be something we'd need to implement manually on the Arduino side.

Better yet, is there software available that will output serial commands for a CNC router that we can interpret? That'd be ideal. They probably all do this...I have had no experience with CNC routers.

Would looking at the rep-rap project offer some inspiration? surely what they can do in 3-d can be turned into a 2-d version?

I'm sure they'd have some functions that would be very handy. 3D is only 2D with an extra axis. Seems like an obvious statement but if you look at how they build 'up' with the Reprap, they appear to handle the STL files in layers..X and Y for each Z. No doubt there's more to it than that.

One big difference between additive (depositing) and subtractive (milling) systems is the way you have to adjust the tool paths. It can be a significant software problem. A milling tool isn't a zero-radius needle, and a depositing jet can't produce zero-width material either.

I agree. I had thought of this, which is where I had initially thought for the PCB, you can subtract everything you don't want very easily. It's much more complicated to do anything beyond that, but certainly not impossible.

In my case, I'd rather have the PC control the CNC router (aka Arduino)...which will make it a ton easier to handle all of the data by sequencing the commands and having the Arduino execute 1 command at a time. Seems a little inefficient but I'm sure it'd work fast enough for this little black duck.

One thing is for sure, it's certainly going to be of huge benefit to work with a common file type like a DXF or whatever else is more appropriate. The ability to work/operate for various platforms would be crucial.

Anyone have mad Java programming skills?

WOW, that lego deal is pretty cool. I have been looking at those projects as well, I just cant bring my self to spend the cash on "legos". After looking at REPRAP again, that might not be a bad way to go after all. The problem would be that I already have most of the stuff to start the build. (I think) I have 6 or 7 steppers that I have acquired... RIP all the printers and scanners in my house! i have even more DC motors, and I have 4 good servos, and 4 not so good servos. The ladyAda shield only supports 2 steppers, and I want 3. So thats kinda problem one. I guess I could use a servo for the Y axis. For the frame, I want to do something like the EASY CNC project. (The guys who uses round pipe on youtube) For the cutting head.... I may just start out with a pencil, so I dont do too much damage. Then maybe a dremmel tool w/ the flex extension. Remember I plan on a small machine. Maybe 1 x 1 or something. You can see how well thought out this is. Anyway, I try to make a little progress every night, so I will keep this thread updated.

BTW, last night, I tried the Wii nunchuck with 2 servos that I ordered from Trossen Robotics with the pan & tilt. 99% success. The code I found has the vertical servo reversed. Of course I cant find where in the code it calls for that. Its pretty cool code, it has 7 levels of smoothing, lots of LEDS (one I replaced with a laser pointer that I can turn off and on with the wii controller.) If I posted that code here, would you guys take a look at it? or is this not the place?

Dave

@Dave: Great work! I've got a few old servo's laying about too, I'll have to dust them off. Create another thread for the code, or PM me, I'm interested to see it.

You should be able to handle your third motor with one of these: EasyDriver v3 Stepper Motor Driver - ROB-08368 - SparkFun Electronics

@Drone: Seems you're on it with the G-Code. There's plenty of cheap software available that will send out G-Code commands that we can interpret with the Arduino. Awesome stuff.

There are a ton here: CNC Software

And this one looks like a great place to start: http://www.kellyware.com/kcam/index.htm

that sounds really cool. Would be a nice way to prototype PCBs. Where can i buy such a nano cnc? :smiley:

I made some progress on the X Stage of my TOY Machine. The video shows single steps and micro steps. Still not much progress on the software / firmware side. I got the Raprep host running. The Firmware compiles with no errors. Im not not sure what to do next other than start reading up on the raprep controller. Do you think that can cross over to the LadyAda motor shield?

Heres the video.

Looks awesome. How are you controlling the movements?

Just a few lines of code from the motor shield tutorial. I was trying to figure out how to control with a pot. I can do it with out the shield, but not with. Im sure its just pins and wiring.

Dave

This is very interesting! I too often wish I had an easy way to make a single pcb.

A small postcard-size 2-axis milling machine.

I have never heard of G-code. When I was making prototype PCBs at work 20 years ago, the software outputted a HPGL file that was sent to at pen-plotter that drew a layout on a foil through which the the board was exposed to UV light - developed and etched. The result was fine but the steps required a plotter, a lightbox and chemicals, and the drilling was made manually. Making double sided was hard.

But the HPGL language for controlling the plotter might be worth looking at. It is VERY simple: HP-GL - Wikipedia

Also most PCB-layout software outputs Gerber-files: Gerber format - Wikipedia which I think would be a very nice way to reduce translationsteps.

/NOE

this is... hm... would say "nice":

a mini cnc build of old scanner and printer parts. And the small green thing looks like an arduino on the right side. sry, it's an basic stamp... ;o)

that's nice too (the last half of the video):

There is a huge community dedicated to home-brew CNC mills and routers. I've been learning from these guys by reading their stuff for quite a while (but will actually be buying my first router soon, instead of building - as I need aluminum and acrylic in addition to PCBs, and my ability to hand-machine perfectly aligned parts is suspect grin. Will also use it to build a larger one if my production needs increase.) -- check out CNCzone, esp. the DIY router section: DIY CNC Router Table Machines they also have a section specifically about CNC PCB fabing: http://www.cnczone.com/forums/forumdisplay.php?f=403

The important part about this, is that CNC routers and mills are not new technologies =) Everything you want to do - has been done before for years, and most likely three dozens ways to fail have been found.

G- M-, and the related codes are largely standard, and there's a ton of software to produce the g-code from dxf, bmp, and eagle files. The CAM software then utilizes this to send basic controls to a controller/break-out board setup (this would be your arduino and stepper/servo controllers). Think of it this way - the standard CNC setup uses a parallel port on a computer, with each pin being a logic signal for one thing or another -- the CAM software drives the parallel port, and your uC sends the correct controls to the motor drivers.

Another place you might want to look, is http://www.vxb.com/page/bearings/CTGY/LM - inexpensive rails, bearings, support shafts and all of that jazz

!c

Hi,

Here is my little toy, it has some issues (software locks up sometimes) but it could be a good staring point.

http://letsmakerobots.com/node/9006

Another diy-CNC'er here! I am working on a home made CNC router setup, much larger than the ones listed here though. Roughly 28x38". Mine uses motor controller cards and a break-out board being fed step and direction signals from Mach3. Mach3 sends the step and direction signals out over a parellel port bit by bit. I always wanted to upgrade this by adding a closed loop control so that Mach3 knew where my cutter head was at.

Mach3 is nice, since it is free for the smaller programs, but I don't know about the more complex communication schemes it can handle.

Now you got my wheels turning. Although it should be pretty simple to implement, you could count the pulses coming from Mach3 in real time, buffer them, and play them back to a motor controller. This way you could have encoders involved, and adjust for skipped steps on the motor side in real time. The you could always add limit switches, safety lights, blinking gizmos....