Thursday, May 26, 2011

Mount an HF Router on Your CNC, Quick and Easy

I posted my design for mounting the inexpensive Harbor Freight 1/4" trim router #44914 to a CNC on my website today. I've posted a dimensional drawing of the base plate, and given instructions for the rest (it's bone-simple, really!) Click the pic below to go right to it:

A quick and dirty spindle mount for the HF 44914 router

Tuesday, May 24, 2011

My GCode Gets a Bit Tricker: Working with the microCarve A4 CNC

We collect souvenir spoons when we travel. Unfortunately, we overflowed the little wooden rack that holds our spoons several years ago:

A pretty wooden rack for holding little silver spoons from around the world.

We have almost twice as many little spoons as will fit on the rack. So I decided that a good CNC project would be making some additional racks that will hold the additional spoons, plus any extras we acquire in the near future.


Building the Toolchain

I've been using this project as a sort of pilot for putting together an automated toolchain for my CNC. You know, draw the object in CAD, convert it to gcode, and cut on the CNC. In the past I've just used image maps as depth maps and hand-written gcode to produce things. This project seemed to have about the right level of complexity for an initial project with a new set of tools.

At first, I had already designed the rack for the spoons themselves by hand on paper, and written gcode to match. But I laid this aside and tried out several CAD tools. The CAD tool that I ended up with a decent file from in the least time was Google Sketchup, running on my Mac. Unfortunately, Sketchup doesn't write in the CAM-friendly file formats. So I pulled MeshLab, which converted a Sketchup Collabra file to STL for CAM.

close-up of the spoon rack
Close-Up of the Item that Inspired my Project


The next step was CAM. After spending over a week trying out different free CAD packages (see below for why I'm starting with no-cost software), I was getting antsy to start cutting something. After three goes with different CAM packages on three OSes, and still no results worth cutting, I just decided to pull out the gcode and give it a once-over.

GCode FTW

I did a quick third pass over my gcode program on paper, then typed it in on my EMC2 system with gedit. The EMC2 preview was, as always, very helpful. It let me catch a bogus Z-value. Once that was fixed, I plunked down a piece of MDF for the trial run and let 'er rip.

The first go at cutting my own little spoon rack.
My first go at the spoon rack's shelf, the back is another piece. But I've got an idea for improving on this...

The piece cut out very nicely. I ran it in three passes, the support for the piece was pretty minimal, so you can see where each pass cut across. A bit of sandpaper would fix this well enough.

However, I think I'd rather do the little shelf out of 1/4" stock. I used 1/2" because my prototype uses that thickness. But it's not like there's a lot of stress on the part from the spoons. So I'm going to re-build my code for a 1/4" thick piece before making the "production" units (probably three of them.) Then I may try to use the automated toolchain again for the backs of the spoon racks (all I have in gcode at this point is the little shelf.)

Why Free?
I don't have any aversion to spending money for quality software. In fact, much the opposite. However, I've already spent the money I had budgeted for the CNC. Plus I've tread on my money set aside for travel this summer because of some unexpected household expenses.

For the time being, I'm being a bit hairshirt when it comes to software.

I'm very happy with EMC2 for my CNC software at this point.

Sketchup is pretty well doing OK for me for CAD right now, though there are things I will want to do later that I'm not sure it does easily or well. When money permits, what I'd really like to do is pick up ZBrush. Hopefully within a year or so. Sooner if possible.

For CAM, I'm thinking that I'll want to pick up something like Cut3D from Vectric. It seems to have the functions I want. Cut2D is a possibility, too. I'll be doing the free trial on each in the not-too-distant future.

In the meanwhile, if you know of some free CAM software that doesn't just treat an STL object as something to be rastered over, drop me a note. I'm completely OS-agnostic. Most recently I was doing CAD in MacOS, running CAM (FreeMill, a good package but didn't do what I needed) on Windows, and I'm driving the CNC with EMC2 on Linux.

Friday, May 20, 2011

microCarve A4 CNC Assembly Instructions Online

MicroCarve A4 CNC router, base assembly

I've posted step by step instructions of how I assembled my microCarve A4 CNC router on my website:

microCarve A4 Assembly

This is the first component of a new section of my site dedicated to CNC machining. Since I've gotten the A4, I've really enjoyed spending a lot of time working with it, learning what I can do with it. I'm still a long way away from solidly competent, but it's a state I'm enjoying working toward. And the stuff I'm making along the way is fun, too.

So, as time allows, I'll be expanding the content I have from the CNC Machining home page on my site to include project info, tips and tricks I learn along the way, and links to information from others that I've found especially helpful (if I linked everything that was helpful to me, it'd overwhelm me entirely!)

Monday, May 16, 2011

Fundraising with my microCarve A4 CNC

This last weekend, my daughters went to a special SacAnime Con. It was a Japan Disaster Relief con, which raised $6556. My daughters had some space on a vendor table at the con, and last week they asked me of I could make something that they could sell to raise money for disaster relief.

I set aside my other projects, and turned out a number of little "remembrance tablets", as you see in the pictures here. The idea was that for each one we sell, we'd pass on the profits to Second Harvest Japan, Japan's first food bank. We think they do great work, whether there's been a disaster or not. So it seemed like a good cause to support.

The tablets are about 1.5 by 2.25 inches (~3.7 x 6 cm), hung on a cord so to be worn around the neck. Each design is bilingual, English and Japanese. I took a bit of a liberty with the "Prosper" tablets, the Japanese is more properly "Prosperity" but the English word was too long to fit on the tablet with the level of detail I'm able to carve at present.

Tohoku disaster remembrance: Recovery in Kanji and English.

Tohoku disaster remembrance token: Health in Kanji and English.

Tohoku disaster remembrance tablet: Prosper in Kanji and English.

Tohoku Rememberance Tablet: Tsunami of Love in Kanji/Hirigana and English.
This tablet is larger than the others, measuring 2 x 3.5 inches (5 by 9 cm). The detail is far more striking in person than in this photo where the light from overhead washes it out.

There were some other designs that I'll try to get decent photos of soon.

Unfortunately, we weren't able to sell all of these tablets, I still have many left. If you're interested, drop me an email. I have instances of all the above plus a couple of other designs available. And it'll still benefit Japan--that's what these were made for.

Making the Tohoku Remembrances

These were made using the image-to-gcode converter included with EMC2. It's got some serious quirks to its behavior I had to overcome. When I originally set out to make these, I had two ways I could do it. I considered writing my own gcode programs by hand, and using the image converter.

I decided to go with the image converter because I thought it would allow me to make more different designs faster than writing my own programs by hand. Unfortunately, I was wrong. The time I spent learning the quirks of the image converter, with what sort of feature depth I would get, how much of a border around the image, and so on was far, far more than I expected. It would have been far more productive to hand-code the simple designs I ended up with.

My original ideas were more involved, more like the "Tsunami of Love" design, above, which was carved last of all at about midnight before the con. On each iteration I ended up simplifying my designs while trying to get the sort of features I wanted in the carving. I wanted to have the Kanji characters carved into the wood, originally, but I couldn't control the way the software managed the depth and width of the lines when doing this. The Kanji would end up barely visible, and the English characters were unreadable.

A CNC Success, in a Way
I took advantage of this project as an initial test of my ability to do some small-scale production with my new CNC. As a fundraiser, I have to say it didn't work out so well, but as a first go at some small-scale, simple production it was a success--barely.

My decision to rely on someone else's software that I don't entirely understand was a real weak point, but I still managed to turn out a decent number of pieces of work before the con. The investment of time into each one was over double what I originally expected. Still, I got them done within the time margin I provided for this project. Barely.

I'm happy with the results, particularly the Tsunami of Love item, and think I could go on to make some better stuff. Though I clearly need to work on my toolchain. In the future I need to have a tool at hand that I'm familiar with that will produce better results than the free image-to-gcode converter. And I need to have something that's more powerful than hand-written gcode programs for all but the simplest designs.

I've learned a lot over the past week, both about myself and my CNC machine. Now I'm ready for the next step.

Friday, May 6, 2011

What I Learned with My CNC Machine Today

I'm in the second day of a one day project today. Hopefully I'll finish it on Day 3.

But, at each step I'm learning new and useful things.

Yesterday I learned:


  1. There's a point where you need to stop writing gcode by hand, and use CAD/CAM.

  2. Doing tool compensation by hand is a real bear.

  3. Don't think of designs that are too much more elaborate than what you've actually made before.


Today's Lessons:


  1. When your test piece is MDF and your work piece is real wood, there are going to be differences.

  2. Grain and cutting direction matter more when using a CNC than when you route by hand, where you make all sorts of little compensations that you don't even notice.

  3. Just because this piece looks like the last piece you cut doesn't mean that it really is, even if it's a piece off the same stock. This can be really important when you're clamping your work down.


Nonetheless, I managed to avoid anything worse than some minor marring of the surface of one work piece. It's still usable for the project.

So far, I've succeeded at using the CNC as a really complicated and finicky power planer. Unlike the first time I used a power planer, it did not throw a piece of wood across the shop at barely subsonic velocities. One piece came a bit loose in the clamp is all. I shut down the machine in time, re-clamped it, and picked up where I left off.

Wednesday, May 4, 2011

First Attempt at Engraving an IC with my CNC

I decided to try doing a smaller, more precise job with my microCarve A4 CNC today. I took some of my GCode program from yesterday, scaled it down (fortunately I provided variables to do all that automatically for me) and added a chip number in characters that I hoped would show with the bit I'm using.

Here's what I got:

CNC Engraved IC. The bit isn't quite sharp enough for the level of detail.
My first shot at engraving an IC top. It's not really an 8085 microprocessor, it's a dead ROM I happened to have hanging around.


The cut widths are about 35 thousandths. Too large for the level of detail in the smaller key pattern. The single large key above is scaled three times larger than the smaller keys. The base leg length for the small keys (the smallest segment size) is 25 thousandths. So it's easy to see why it didn't quite come out.

Still, the accuracy would have been plenty good, if I'd had a sharp enough bit.

Onward and upward! :)

Learning GCode with EMC2

I'm spending a lot of time with my new microCarve A4 CNC router this week. My first couple of items were made using a handy image to gcode converter that's built into the EMC2 control software I'm using.

But the image converter simply treats the image as a depth map which is cut by raster-scanning with the cutting head. For the designs I used, this was slow, and produced rougher results than would be produced using vector cuts.

So I looked at a couple of approaches to improve things. One is using CAD software that works well with a CAM package to covert the CAD design into machine control instructions to cut out the CAD shapes. The other is to go straight to writing my own machine control programs by hand. I know that I'll want to have both methods in my toolkit, but which to use first?

After a bit of back and forth yesterday morning, I decided to start with programming by hand first. So I dove into the EMC2 documentation for gcode, the programming language more properly called RS-274-NGC. What a catchy name, eh? You can bet that the folks who picked programming language names like "python" and "Java" are kicking themselves after seeing how "RS-274-NGC" rolls off the tongue.

Results of my first gcode program on my microCarve A4 CNC.
Results of My First GCode Program.

Well, the EMC2 site has a link for a gcode tutorial, but what's there is...not much. Maybe I'll pitch in, since that's what wikis are for, right? The I went an read the EMC2 documentation, which has the standard cart-before-horse format of discussing details before generalities. Then I found the excellent LumenLabs GCode Tutorial. Much better!

I read some bits, scanned others, then hit the keyboard on my CNC control system. It's an old Athlon 800 with 768MB of RAM loaded up with the EMC2 LiveCD install for Ubuntu Hardy Heron, with EMC2 upgraded to the current version after install.

I fired up EMC2 with the SIM-Axis configuration for developing the gcode. I've got three different configurations of EMC2 on my desktop. I've got the SIM-Axis setup, and two different configurations for my microCarve A4, each with different origins for the axes.

I used gedit to create an initial gcode file, then opened it in EMC2. The gcode preview window is great. Whenever I edited the gcode file and saved, I'd click the reload button in EMC2 and immediately see the changes. Likewise, the error messages were good enough to let me find my problems, though the problems were usually typos rather than what was reported.

I used iterative development, of course. No sense writing too much code before finding out that I didn't understand some element of syntax. I started with initializing the mode settings, lifting the head to a safe traversal height, traversing to a point in space, then returning to machine zero. After fixing a couple of problems, I got what I wanted. Then I added a few additional move commands, and got the simulated CNC to follow them. At that point I could see that things would get out of hand pretty quick if I didn't learn some basic flow control.

So I read up on subroutines in gcode. I laid out a simple key pattern on graph paper, and wrote the necessary routines. That's the border you see in the picture above. That was the easy part. It's all straight lines.

Next was curves. I read up on G2 and G3. I hadn't thought about the ability to shift the depth of cut across the curve when I started reading, but by the time I was done I was thinking, "Hmmm, if I vary the depth of the cut with a V groove bit, I can vary the width of the cut just as I would vary the width of a line with a calligraphy pen."

So I broke out a fresh sheet of graph paper, and started drawing some letters. Well, it took me about three times as long to lay out the letters as it took me to lay out the key pattern, but I managed that. Not only that, but I set things up with scaling factors and variable settings that allow me to easily scale and move the letters.

Results
The results you see above are what I got from the first "live" run of my first gcode program. The cuts are a bit deeper than I'd like, and the 90 degree bit I'm using right now doesn't help. Also, the cutting was a bit fast for the plywood, causing the wood to be frayed on the cross-grain cuts. Still, the varying of "line weight" on the letters turned out well. Overall I'm happy with it, and the defects should be easy to fix when I run it again. I'm planning on building a complete alphabet for this font and throwing it into a file for later use.

Monday, May 2, 2011

microCarve A4 CNC First Cut Complete!

I got a router mounted on my microCarve A4 CNC machine this weekend. The router I'm using is an inexpensive 1/4" router from Harbor Freight. It's mounted on a base plate I made out of 3/4" plywood with a pair of muffler clamps holding the body of the router:

Harbor Freight drillmaster trim router on microCarve A4 CNC


I've got two bands wrapped around the body of the router cut out of a bicycle inner tube. They help mate up the muffler clamps to the router body. I was expecting to drill and tap a hole into the router for a screw through the base plate, but with the rubber straps everything is very firm and tight.

Today I spent some time "cutting air" to make sure the tool would run properly before I put a bit in. I had to invert the Z and Y axes in the setup I was using as it turned out. Then I tested twice more, once again with no bit or wood, then again with a bit and wood in the machine, but the Z axis set high enough the bit of the router wouldn't quite reach the wood.

Everything looked good, so I made my first cut:

saundby.com logo cut using micrCarve A4 CNC router.

Closer look at first cut made with microCarve A4 CNC.

Close-up of saundby.com logo cut into wood using microCarve A4 CNC router.


The material is some plywood I recovered from an old failed project. As you can see, it wasn't mounted completely flat. The top piece is held by some screws that hold it from underneath.

The G-Code was a raster pattern generated by an image-to-gcode converter that comes with the EMC2 software I'm using. That's why the bottoms of the letters look kinda scrappy, if they'd been cut continuously rather than raster-cut, they'd probably look a lot better.

The bit I used is a 1/2" 90 degree bit, I don't have any really nice bits yet. Now that I've got the machine actually cutting things out, I can work on refinements.

The depth of cut is 1/8".

Now I'm looking forward to getting some better bits, getting my CAM software in order, and so on.

Edit:

Had one more go with what I've got on hand this afternoon. It's a little more ambitious. Here you go:

CNC router cut of saundby.com surrounded by a key pattern.