Archive for the ‘Tutorial’ Category

CNC Tools: FreeMILL

Wednesday, August 24th, 2011

When it comes to free and/or open source CAD/CAM tools, I have yet to run into any packages or tool chains that are particularly full featured, easy to use, and glitch free. Because of this, its a better strategy currently to learn the set of tools that are available to you, and how to work within their limitations. Today I'm going to talk about one such tool you might want to add to your CNC toolbox, FreeMILL from MecSoft.

Basically, FreeMILL can best be viewed as a nice script for taking a 3D model and creating a simple set of toolpaths for reproducing it on a standard 3-axis CNC mill. It has its limitations, and it's a little buggy, but it provides a very quick and easy way to go from a 3D model to a physical part. Plus it's free.

Get it here:
http://www.mecsoft.com/freemill.shtml

There's also a community site for it here:
http://www.freecadcam.com/

First off I'll walk you through the process of generating toolpaths from a 3D model with FreeMILL. FreeMILL supports a few 3D formats, including STL, VRML, Rhino, and VisualMILL (another one of their products). I only used the STL support since it's what my source models are in and probably the most widely used format for the hobbyist user and almost all 3D packages support it.

If you're running Windows 7 or Vista, you'll want to run FreeMILL as admin (right click the lauch icon, select "Run as administrator"). You'll want to do this because the default output directory for the resulting G-code file will be the install directory, which FreeMILL won't have write access to by default.  If it crashes randomly or the preview of your model looks weird you may have to revert to a basic Windows theme and/or disable hardware rendering.  Switching to the Windows 7 Basic theme was enough to make it somewhat stable for me.

After launching FreeMILL, you'll follow a wizard step by step until you generate your final toolpaths.  The first step is to load your 3D model.  I'm using a model of a ceramic mold that someone at the space wanted fabbed. You'll get a nice preview of the part and the determined bounds of the part and you'll be given the option to specify that your part is specified in mm.  I assume the default is inches, as this seems to be the standard for models specified in imperial units.  If your part looks like it's about the right size, click next.

Now you will be asked to specify the cutting direction.  This seems to simply be a way to specify the projection that will be cut (someone correct me if I'm wrong).  If your model is already oriented correctly, just click next, otherwise use the radio buttons to orient it correctly.

Next you'll select the offset of the stock.  This is how much bigger the piece of material you'll be cutting is than the model on either side.  Since this is an offset, if you have a particular piece you want to cut a model out of, you'll have to measure the piece, look at the reported model size and do some math to get the right offset.  I simply left both offsets to zero since I was going to cut the final part out by hand.

Now we set up the parting plane.  Parting plane is a mold making term for the plane where the two halves of a mold meet up.  In FreeMILL, this simply defines the lowest the Z axis will go when tracing the 3D model.  Depending on what you want to do, you may want to simply set this plane to a depth that will get all the details you want to see in the final product as I've done here.  I'll go into some detail on the games you can play with this setting to achieve various things later.  A couple times running through the wizard I got some odd values on this page and the application immediately crashed when I tried to continue even thought the preview looked fine.  Repeating the first couple steps seemed to fix this...

Next we set up our origin.  There aren't a whole lot of options here.  You'll likely want to select top so you can easily touch off on your stock with your mill (this puts Z=0 at the surface of your material).

Next we specify our cutting tool.  Again, this is pretty straight forward, just put in the parameters of the mill you will be using.  I'm 1/4" flat endmill here but on the final part I used a 1/8" endmill with a 1 degree taper since I couldn't get all the details of the model fleshed out with the 1/4" endmill.  You'll see this later in the preview.

Next we set up the spindle and feed rates for the material you'll be cutting.  A feed rate of 40 inches per minute is fairly conservative for the machine this will be running on since we're just going to be using housing insulation foam board.

Now we get to select our stepover distance (the distance between passes) and generate our tool paths.  Tool path generation seems pretty quick and the progress of the processor is updated in the preview window as individual passes are generated.

Here's what it'll look like after the paths have been generated.  We can also simulate the toolpaths and see what the final product might look like.  You can see here that not all the details of the model will be preserved with a 1/4" endmill based on the preview.

Next we select the post processor and save our final output.  I'm using Mach3 (configured to use inches) to drive the CCCKCCNC, so I select that post processor.

When you save, a temporary file containing the G-code for the generated toolpaths will be created and opened for you.  Save this file wherever you want and you're done!

You can look at the generated toolpaths in Mach 3 if you're on Windows or with EMC2 on Linux.  Here's what the generated toolpaths look like in Mach 3:

After regenerating toolpaths for an 1/8" endmill, I loaded the G-code on the CCCKCCNC machine and milled the mold without issue.  You can see that this thing is actually pretty big (the outside edge of the mold is 22"). It's almost  too big to clamp from both sides and not have the skirt run into anything.

And here's the finished product:

Here's some close up shots:

This entire part took about 4 hours to mill with a 1/8" endmill at 40 inches per minute feed rate and a 0.07 stepover distance.

What FreeMILL doesn't do and how to get around that

The simplicity of FreeMILL is nice, but it really lacks a lot of functionality.  Here's some stuff that would be really nice to have but you can't really do:

  • More bit options, only flat and corner radius mills are supported (ball mills are a special case which are supported, but not V-bits)
  • Depth per pass and roughing passes can't be specified
  • Only X or Y parallel finishing available

A lot of these shortcomings can be worked through by generating additional passes manually.  For instance, you can't specify the maximum depth per pass, so if you've got a design that's relatively thick, the generated toolpaths will have your bit plunging all the way to the maximum Z depth of your part and then dragging through your material.  This is a problem for a lot of mills and materials, but you can get around this by setting the parting plane to different Z depths manually and generating toolpaths for deeper and deeper cuts then feeding them to your machine the the correct order.

You can use the same principal to create roughing passes with larger mills then a final detailed path with a smaller mill and smaller stepover distance.  You can create paths for X parallel finishing and then the Y parallel finishing on your final pass as well.

General Impressions

It should be no surprise that MecSoft seems to be releasing FreeMILL primarily to promote its other CAM tools.  I do appreciate that they effectively put out a demo that, while being a little light on features, actually lets you generate usable G-code.  As a free tool, it's annoying that it's buggy but it's still usable and worth the trouble.  Now the catch is that you have to provide some information to download FreeMILL, and I gladly did.  I'm not intimately familiar with their CAM offerings, but I wouldn't mind some additional information or a sales pitch and, as expected, I got an email promotion the day after I downloaded FreeMILL asking me to take a look at their CAM tools after trying out FreeMILL.  The Monday after I played around with FreeMILL I actually got a call from their sales department asking if I was interested in ordering software after using the demo (yes, I do give out my Google Voice number).

Now even if I was interested in purchasing CAM packages, and I am, I don't think that the buggy, poorly maintained (at least since 2003), feature light demo that is FreeMILL would inspire confidence in MecSoft's offerings (especially from a hobbyist's perspective, since their tools are not cheap for that demographic).  I understand that they probably don't want to or simply can't devote resources to maintaining a free utility, but they should probably put forth a little more effort if they're hoping that that same utility is going to help sell their software.

More CAM Stuff

I plan on posting some info and reviews of other CAM tools (and other useful software tools for CNC stuff), including dxf2gcode and PyCAM, but in the mean time, go check those two out if you're looking for other free CAM tools.  I've successfully used dxf2gcode to generate toolpaths that I've run on machines for very simple 2.5D jobs.  PyCAM seems like it needs a little work and didn't load the STLs I was using for the above project but it seems promising.  I'll be keeping an eye on the project and playing with it in more depth in the future.

Share

Laser Vector Grid Construction and Care

Sunday, March 13th, 2011

One thing many people might not know about laser cutters is that they require a lot of regular cleaning to keep them cutting effectively.   You've got to clean the optics on a weekly basis, clean out any little bits that might have fallen through the vector grid and wipe down the depth plunger and guide rods monthly, and oil the linear guides and clean the positioning strip every couple of months.  Who'd have thought selectively vaporizing stuff was so messy?

One other thing that I have to do about every six months is degrease the vector grid (yes, you have to regularly degrease some of your laser parts).  Before I get ahead of myself, I should probably explain what I mean when I say vector grid.  The vector grid is a metal comb that you set the material you're going to be cutting through on top of.  It's designed to support the material you're cutting and allow the laser to pass through it to prevent burning the back side of the material you're cutting.  It gets dirty because you're be blowing vaporized plastic (or resin if you're cutting wood) through it when you're cutting clean through material.

The manufacturer of my laser cutter, Epilog Laser, doesn't include instructions on how to clean the vector grid in their manuals, but they do have a nice guide online here.  I use about a 1:6 ratio of Zep purple degreaser to warm water compared to Epilog's suggested 1:4, and it seems to work fine for me.  I've got a small plastic container that's only a little bigger than my laser bed that I use to soak my vector grid.   It only takes about 12 cups of water to almost fully cover my vector grid in this container, so one gallon of Zep lasts me a very long time.  You'll notice that I've got a pair of rubber gloves in my box of supplies.  You definitely want to be wearing these and probably some goggles while working with the cleaning solution because Zep contains a number of bad things that can be absorbed through the skin (mainly Sodium Hydroxide AKA lye).

After dropping the vector grid in the diluted mixture it will start foaming all on it's own.  I agitate the mixture a bit and keep the grid soaking for a little less than 5 minutes.

After soaking remove the grid and give it a good rinsing.  When done rinsing, shake it out a bit over the sink and let it air dry completely before using it again.  To give you an idea of how much stuff was pulled off the grid, the cleaning solution started off clear with a slightly purple tint and after soaking it's almost black:

And here's the grid after rinsing:

There's still some black residue on there (ABS from the car tag blanks I make) because it was really caked on and I didn't get a plastic pipe out and clean out those cells.  Be careful if you do choose to use pipe cleaners and scrub the vector grid, and just handling it in general, because it's made out of very thin aluminum an is damaged easily.

Building your own vector grid

Because certain materials get the vector grid gets very dirty, I wanted to make some spares.  I threw some 1/2" aluminum honeycomb in on one of my McMaster-Carr orders to see if it would be a usable substitute for the 1/4" cell spacing, 1/2" thick mat that came with the machine.  I was able to cut it easily with a pair of scissors and get one full bed sheet and one that was a little under an inch short from the 24"x24" sheet I ordered.

Unfortunately, it wasn't as rigid as the original vector grid and needed something to back it.  Next McMaster-Carr order, I added some heavy wire mesh to my order.  This stuff cut easily with a pair of side cutters and was easy to fit to the cutter bed.  I set the aluminum hex on top and it improved the rigidity:

It's still not as rigid as the original vector grid but I think it'll work for what I'm cutting and all I'll likely have to do to fix this is switch out the wire mesh for some stiffer perforated metal in the future.  Here's a comparison between the original grid and the new one:

The new, wider spaced grid looks pretty level and, even though it was never a huge problem, I'm hoping the wider spacing will result in fewer burn marks on the back side of the material I'm cutting than the stock grid.

Update:

I've been using the new vector grid for a bit now and I love it!  Also, I talked to the local Epilog sales rep. and he said they ask about $395 for a replacement vector grid. I think I'll stick with my $35 spare for now.

Share

Makerbot Lighting Build

Thursday, January 27th, 2011

One of the things that's a nice addition to any Makerbot is internal lighting.  I know I've held a lamp up to my bot more than a couple times to get a better look at what was happening at the nozzle.  MakerBot Industries had a lighting kit earlier on and latter added strip lighting.  These strips come with adhesive backing and can bee hooked directly to a 12 Volt supply for power.  Unfortunately, they don't come with much in terms of instructions for use, and they're permanent nature makes them less than ideal for people constantly upgrading or modifying their bots.

Using the LED strips as a starting point, I decided to make a modular lighting solution for my Cupcake CNC that I could swap to a Thing-o-Matic if I decided to upgrade.  I created a few mounting plates that I could attach sections of my strip of LEDs to that I could also wrap my wiring through and could easily be attached and removed from my bot.  One plate attached to the underside of the Z-stage, and two others that are mounted at the top of the bot's build chamber.  You can grab the design files and a detailed BOM for this project here.  I'll cover the construction of the Z-stage assembly here, as it's a little more involved than the top assemblies and works on both the Cupcake CNC and the Thing-o-Matic.

All plates are laser etched/cut from 0.06" thick sheets of PETG (kits are available here with all the parts needed to assemble and mount the lights).  PETG is great for this application because it's crystal clear like the acrylic the Z-stage is made out of but it's nowhere near as brittle.  Below are some pics of the Z-stage plate before and after removing the protective film after laser cutting.  The outlines that are etched on the plate show where the individual strips of LEDs go.

You'll need to cut four 2 inch long strips and one 4 inch long strip off of the end of your LED strip.  Do not just cut these strips from anywhere in the length of the strip! The strip is actually divided up into groups of 3 LEDs in series with a small current limiting resistor in the middle.  You'll need to cut the strip where one circuit ends and another begins.  There will be a set of exposed copper pads clearly labeled + and - where this occurs.  Cut in between these sets of pads leaving a set of exposed copper pads on each side of the cut strip (the white dashed line in the center of the picture below).

Once you've got the strips cut, get out your soldering iron and add a blob of solder to the exposed copper pads at both ends of each strip.

Next, remove the protective backing on the strips and attach them to the  mounting plate.  The outlines should make placement easy.  Don't worry about strip orientation.

Before going much further, let's assemble the power connector.  I opted for the simple solution and just used two 0.1" male headers for my power connector (This will eventually connect up to one of the 3-1/2" floppy power connectors on your ATX power supply) and some black and red 18 gauge wire twisted together with a hand drill for my power cable.  If you picked up a kit from me, you'll have some nice 2 conductor Red/Black wire to wire everything up with.  I removed less than 1/8" of shielding from the ends of my power wires and tinned them (applied a bit of solder) and tinned the 0.1" headers a bit too.  I used 1/8" heat shrink on each conductor, and if you want to do this as well, make sure you place it on the wire before proceeding to the next step.

Next, solder the power wires to the header.  If you've already applied solder the the header pins and the wire you should be able to simply touch them together and apply a little heat with the soldering iron to mate them.  Do not hold the header while soldering the wires on!  Also, make sure to solder the power wires to the shorter side of the header if there is one.  Polarity doesn't matter at this point.  It should look something like this when done:

Next shrink wrap the wires if so desired.  I used a small length of 1/4" shrink wrap over the whole thing:

Now we can cut our power cable to length.  I cut mine to 24 inches and had plenty of slack.  Size it up on your bot if you're unsure how long you'll need to cut it to make it from your Z-stage to your power supply with a little slack for movement.

Next we need to finish up wiring the lights on the mounting plate.  For this I used some nicer 2-conductor color coded red/black wire.  Use the same technique of tinning the wires before mating them with the solder blobs you put down previously.  If you do it right you should only have to touch each connection only briefly with your soldering iron to make the connection.  Pay attention to the polarity of your connections when connecting the strips together.  Positive and negative connections should be clearly labeled with + and - on the silkscreen of the strips.  Positive connections go to positive and negative connections go to negative.   As long as each individual strip has one positive connection and one negative connection they should light.

Next we need to connect up power.  You'll notice that there are pairs of oval holes on the edges of the mounting plate.  These are for power wiring.  You'll want to fish the power wires in one of these paired holes and out the other:

This should help prevent damage to your lights if something accidentally yanks on the power cable.  Next solder the power wires to the positive and negative pads on one of the LED strips.  When you're done it should look something like this (again, if you picked up a kit you'll have red/black zip cord rather than the twisted pair pictured):

At this point you'll want to inspect your work, making sure you don't have any bridged connections or positive pads connected to negative pads.  If everything checks out, it's time to test it out.  Power up your bot and find a free 3-1/2" floppy power connector.  If you've followed the standard wiring scheme of red being positive and black negative, you'll want to plug your header into the the power plug with yellow (+12V) matching up to red as shown below.

If everything is connected up correctly, you should see everything light up immediately:

Constriction of the two top light plates is almost exactly the same as the Z-stage plate but you'll want to adjust the length of the power wire you give each.  The right top plate was relatively close to the power connector I was going to plug it into so I left it fairly short:

While I left about 2 feet of wire on the left top plate because I ran the wire for it across the front of the bot.  Pay attention to where you will be running the power wires for each of these plates and make sure you don't cut their cords short!

Now the only thing left to do is attach it to your bot.   The two top light plates attach easily with 2-M5x15 bolts each.  I ran the wire for the left right light plate out of the hole on the back right of the bot.  The right top light's power wire I ran through the M5 holes on either side of idler pulleys in the front of the bot and out the front right hole on the top of the bot:

Next you'll want to install the Z-axis plate.  This plate is attached using the M5 bolts that hold your extruder to the Z-axis.  Remove the bolts holding your extruder in place, slide in the plate, then re-bolt down your extruder.  I added a third M5 bolt to hold the plate down that is installed just behind the extruder in one of the mounting holes that would be used to attach the pen plotter accessory.  Make sure you install the bolt with the cap side down (like the rest of the extruder bolts) if you choose to install this third bolt.  Lastly, check to make sure nothing is sticking down past the nozzle on your extruder so nothing can snag on your parts as they're being built!

I used some clear tape to tack down the power wires to the Z-stage and make sure they don't interfere with the operation of the machine.

That's it.  Plug everything in, flip the power switch on your supply and the motherboard and proclaim "Let there be light!"

Here's some more pics with just the top lights on:

And just the Z-stage lights on:

Share

Quick Projects – Build a Simple Vinyl Roll Floor Rack

Monday, January 3rd, 2011

I recently acquired a vinyl cutter that came with a reasonable cache of sign making supplies.  These supplies included several 24" and 15" rolls of vinyl that I had no easy way of storing, so I made a quick rack to store most of them (the alternative was buying a $50-60 wall rack I had to mount that only held 16 rolls or a $200 floor rack).  I played with the idea of making racks that would work with some cheap gondola shelving I picked up, but in the end I opted for a simple floor rack because it was easier, and significantly cheaper, to build.

Materials

  • 16 M3x40 bolts - Perfect length for spanning  2 sheets of 1/4" material using 1" spacers
  • 16 1" Spacers - I had some around for stacking PCBs on my Makerbot
  • 16 M3 nuts - I've got a lot M3 hardware because of Makerbot projects
  • Rubber feet hardware - Picked up at Home Depot for $2
  • 3-12"x18" Sheets of MDF - Available at Home Depot in 4'x2' sheets for about $6
  • 15' 1" Schedule 40 PVC electrical conduit - About $2-3 for a 10' section
  • Wood Glue

Construction

First you'll need to cut/drill your parts out.  Get the design files and a more detailed BOM from the Thingaverse page for the rack here.  I cut out all these parts out of 1/4" MDF on my laser cutter, but you could easily just use a hand drill and a hole saw to make them.

Bottom MDF Sheet

Top MDF Sheet

Cover MDF Sheet

Next you'll want to cut your conduit into sections.  You can make quick, clean (but not always straight) cuts with a pvc pipe cutting tool, pictured below.  I used 1" schedule 40 electrical conduit, which is a little under 1-1/3" in diameter in 12" sections.  You could probably get away with shorter sections and conserve a little conduit.

After that's done, start assembling everything.  Install the feet and assemble the top and bottom pieces with your M3x40 bolts and 1" spaces.

Next you'll install the cover, which will prevent the bolt heads from damaging the ends of the vinyl rolls.  Use a couple conduit sections to make sure everything's aligned correctly then glue it to the top layer and clamp it down.

Now all you have to do is wait until the glue dries, remove the clamps, install the rest of the conduit sections and you're done.

Share

Quick Inkscape Tutorial – Perspective Transforms

Sunday, January 2nd, 2011

Let me start out by saying that far as open source software goes, Inkscape is definitely on my top 5 list and there a number of things that Inkscape can do that other proprietary vector graphics programs can't.   That said, I've used a few other proprietary vector graphics programs before and it seems like there are some nice features missing or buggy in Inkscape in its current state.  In many cases, you can get around the limitations of Inkscape and get the effects you want, you  just have to work a little harder than you would have in other software packages to get there.

I ran into one of these cases recently while trying to make a quick set of paths to use with my vinyl cutter to make a sticker for my laptop.  I used standard path operations to create a sensor tower warning symbol, but then I ran into trouble when I wanted to perform a perspective transformation.  Some other vector graphics packages roll this functionality into a "free-transformation" tool that allows you move each of the points of the bounding box of the currently selected objects and some separate this transform into its own tool/operation.

A quick Google search returned a number of videos showing how to perform a perspective transform, but it seems the functionality and path to it has changed over time.  After figuring everything out I also found this good post on all the pitfalls of perspective transformations here.   Basically, the old path for the perspective transformation was "Effects>Modify Path>Perspective" and it is now found under "Extensions>Modify Path>Perspective"  and it will only work if the paths you will be applying the transform to follow some strict guidelines.  Basically as of Inkscape 0.48.0 r9654 you'll need to make sure that:

  1. All elements you are going to transform must be paths.  No text objects, no bitmaps, no rectangles or other shapes, just paths.  If you've got any shapes amongst the paths you will be transforming you can convert them to paths by selecting them and got to "Path>Object to Path".
  2. All elements you are going to transform need to be grouped or in a combined path.  I was able to use nested groupings without issues but if your results are not as expected you may have to remove nested groups.
  3. You must define a "target shape" to determine the bounds of the transform that is a 4-sided polygon who's points are drawn clockwise starting from the bottom left corner.  Drawing the points in any other way will result in odd behavior.  All sides must be straight lines, no curves.
  4. You must select both the paths you will be transforming and the target shape by selecting your paths first then shift-clicking your target shape second.

After you've done all this, go to "Extensions>Modify Path>Perspective" and everything should work as expected.  In addition to being able to use nested groupings, I was able to assign transformations to individual paths and get predictable results, so some of the issues with the perspective extension may have been fixed recently.

Share