Wednesday, June 23, 2010

Gcode optimization

I tried the Opti - PCB-Gcode Optimizer from JayC. Tried it on Ubuntu under Wine (Windows emulation), it opened, but wouldn't do the optimization. Had to resort to MS-Windows to run the optimizer. Seemed a bit finicky, but once it ran - WOW what a difference. To the right is how the gcode looks coming straight off the Eagle CADsoft program. Click the image to zoom. All those grey-green lines are where the router is moving in between milling actions. The damn thing spends 60% or more of it's time just moving the router from point A to point B.

Enter the optimizer. DAMN! I'd say 95% of the wasted movement is just GONE! This should have an amazing impact on the overall time to mill.

Now if I only knew enough about C++, I could probably re-compile onto Ubuntu!

I ordered some PC milling bits (30, 45 and 60 degree) from Drewtronics. I should have them in a few days. My router is a 1/4" shank, and these itty-bitty PCB router bits are 1/8" shank. I'll need to track down a reducer.

Monday, June 21, 2010

PCB isolation routing with a real PC board

I did not have the proper milling tool. I had a pointy router bit (60 degree) that is supposed to be used for engraving wood. Fiberglass and copper was too much. Nevertheless, the results were very promising. The router bit was more like a snow blower, just heaping the copper up on each side of the trench it dug.

Here is a close-up of the IC pads. It's tough to see, but it is pretty much a mess. I went at it with some 220 grit sandpaper to get rid of the bulk of the nasty high spots so I can get a peek at what was underneath.

To the right is a 20x image of some of the pads for a .100" header - after sanding. I pulled the board off the router before the pads on the right were finished. I also think I had the bit digging-in a bit too deep.

At the left is a 40x image of one of the IC Pads. In both images, even after sanding, the "piling up" of the copper around the edges of the trench is clear.

Couple of early learnings: The cool dust brushes I made obscure the PCB. This isn't a problem for routing, but it makes setting up the tooling a real nightmare. I've got to re-design the brushes such that they are either fully or partially removable.

Second, the CADsoft to gcode converter does an excellent job, technically, but the resulting gcode is very far from being optimized. I'd estimate 40 - 60% of the time to route the board is the router moving from one end of the board to the other. More than half the milling time is just plain wasted.

Next Steps: Order some real router bits. Consider using a dremel tool rather than a wood router. Try to make a gcode optimizer that I found work.

Saturday, June 19, 2010

PCB isolation routing - first attempt

Last night I downloaded CADsoft Eagle schematic drawing and PCB design software. Learned just enough to make a basic board. Used an Eagle to Gcode converter and created the gcode.

Tie-wrapped a rollerball pen in place of my router, added a flat (MDF) auxiliary table on the Router base, got the paper flat.

Started the EMC software, opened the gcode file. It looked perfect with a "rats nest" of jogs. I set X and Y to home, set the touchoff, and hit 'go'. Board is about 2.5 by 2.0 inches.

Son-uv-a-gun. It did pretty damn good. I am pretty sure I had some of the feed rates too high, and I think I skipped a step or two. Nevertheless, I was blown away. It takes a L O N G time to route. One key learning: keep as much copper on the PCB as you can!

Here is a close-of the bottom left of the PCB. The holes are marked quite well in the pad centers. This was not the case everywhere, though. Next time, I will slow down the steppers.

This will make prototyping PCBs fun, clean and fast (faster than the chemical options!).

I will document my complete setup and experience.

Here is a 73 second video of the CNC machine drawing with the roller-ball pen. You can see the pen flex and the paper move - these are, no doubt, large contributors to the inaccuracy.

Wednesday, June 16, 2010

Software - Introduction

The Software. Now this is where things get confusing for me. CAD this and CAM that. I have successfully milled some parts, but I've not yet figured out all the bits.

For the CAD software, I stick with Google Sketchup. Sketchup is a really amazing product. First, it's free. It is 'easy' to learn (for a 2D CAD package, anyway). There are a lot of great tutorials available. I used Sketchup to create all the CAD drawings for building the router, and all the drawings I posted to this blog. Since it's free, you can get your feet wet while preserving some cash.

For the CAM software, I am playing with the demo (40 uses) version of CamBam. The CamBam website says it best: "CamBam is an application to create CAM files (gcode) from CAD source files or its own internal geometry editor".

There is also a free add-in for Google Sketchup that will cleanly export a Sketchup drawing into a format ready for CamBam.

Take some time to read the three-part software tutorial by Patrick Hood-Daniel on his buildyourcnc.com website.

There is a lot to learn about the CAM software, and I'm only just starting. I've found the CamBam documentation to be very weak, almost useless. I did most of my learning by trial-and-error.

For the machining software, I am using EMC (Enhanced Machine Controller). From the EMC site: "EMC2 is software that runs on Linux, on most standard PCs, that can interpret G-code and run a CNC machine." In my case, I use Ubuntu. I had an extra PC, the EMC software installed and ran first time, no problems. EMC plays perfectly with the HobbyCNC stepper driver board.


On a side note: If you have not considered a Linux system, Ubuntu 10.0.4 is amazing. It is quite Mac-looking, fast-as-hell, robust and stable (my server ran for well over a year with zero issues). And with a product called Wine, you can run most windows applications. It's pretty sweet.


I do suggest you use a separate computer to drive your router. It will suck in dust and crap like you won't believe, and you'd hate to trash your home PC. I open my PC regularly and blow out the collected dust and debris. One challenge, is finding a PC with a parallel port, which is required for the HobbyCNC stepper controller. Most new laptops don't have a parallel port. My Ubuntu system had no issue accepting a parallel port card, tho I do remember having a challenge finding some I/O port address or other. But once I figured that out, all was well.

I hope to give some tutorials or other helpful guidance on getting these three products playing together nicely, but time is a rare commodity at the moment.

Dust Control - making the brush

I settled on the idea of a 'brush' or at least 'bristles' for my dust curtain. I couldn't find anything ready made, so I made my own. Works pretty good, and I'm confident when I upgrade to dual 2" vacuum lines, it'll be smokin'. I started by taking pliers and tearing out the tufts from a Harbor Freight workbench brush.

Try to carefully yet securely grab the entire 'tuft' of bristles with the pliers and rock the pliers to pull out the 'tuft'. Some will get messed-up. Keep going. It takes a hell-uv-a-lotta bristle tufts.

The Harbor Freight brush had a neat little staple like gizmo around the 'tuft' of bristles. This came in very handy when inserting the tufts into my motor mount.

I tried drill bits in the holes left in the brush to determine the proper hole size.

I flipped the motor mount upside down and put holes around the perimeter of the router in a highly un-precise fashion - just guesstimating the spacing.

Then I took a small nail set, and with a file, put a very slight "V" in the end. I would open the bristle bunch a bit, line the "V" of the nail punch over the small metal staple, align it with one of the holes I just drilled and smacked it with a hammer. Repeat until you start talking to yourself.

To the left is a close-up of the bristles in the motor mount. It actually worked quite well, and the bristles are held in quite firmly.

I didn't count 'em, but it took a lot of the little buggers to circle the router and dust port.




Tuesday, April 6, 2010

Dust control - the background

If you haven't used one of these devices, there are two issues you will need to deal with - noise and sawdust. And these routers produce both in ample amounts. The noise can be dealt with using hearing protectors. IMPORTANT SAFETY NOTE: eye, ear and dust protection is mandatory. You may feel like a goober wearing all this protective gear, but at least you will still be able to see and hear and you are less likely to cough up bits of your lungs years from now.

Regarding the dust, goodness only knows what carcinogenic crap is in that stuff, and these machines produce a lot of very fine particles - I'd bet these are the most dangerous.

I needed something that would include a vacuum system, and there had something that would enclose the router bit, extending all the way to the surface of the workpiece. Upcut spiral router bits really sling the sawdust - somewhere between a speeding bullet and the speed of light.

I am a firm believer in intercepting the dust as close to the source as possible - especially considering my garage is attached to my house - and all that fine dust will work it's way inside - and my wife will find it - and I will be in deep, deep sh_t.

Whatever I used needed to be flexible - it has to bend against the work surface when the router cuts deeper. It had to be firm enough to not get sucked into the router bit or the vacuum system.

I've seen some builders used a 'skirt' around the router mount, others suggested brushes (called 'door sweeps'). Yet others just put the whole-damn-thing into an enclosure (thereby addressing both dust and noise). I will eventually do the enclosure route and a dust-pickup at the source. Sort of like wearing a belt and suspenders.

This looks like an industrial router, but I really like the dust control.

Sunday, April 4, 2010

Router Mount

Since I had to take the whole thing apart to replace the drive screw for the x-axis, I decided to replace the left-and-right side of the z-axis assembly with two parts I made on the CNC router.

The photo (above, left) shows the router mounted in the original mount. I had to raise the router in the mount so that the router bit did not extend past the dust brush (details on that later). That moved the router too far away from the table, so I had to jury-rig it to lower the whole router/mount assembly lower toward the table. The new sides to the Z-axis assembly (above, right) includes a "jog" to hold the router mount lower.

Here is the router mount. I designed it in cardboard, transferred the design to 1/4" hardboard. I verified the fit of all the components. I used a pattern bit on my router to duplicate the shape on two 3/4" pieces of plywood. I stacked and glued the plywood together.

The small hole to the upper right is for the vacuum attachment. It works fairly well, but I will re-make this with a 2 1/2" vacuum attachment. The more air you can move, the better.