Sunday, May 5, 2013

Router lathe -- converted to CNC

A lot has happened on the router lathe and this posting is way overdue. It's gained a nice new 3rd axis carriage driven by a stepper motor, adding programmable z-axis (depth of cut) control,  and has been converted from arduino control to full CNC, controlled by a PC running Mach3. Here's a video of the first major part cut on the machine since the rebuild.

The conversion to a CNC controller opens up huge potential. The arduino was great for spirals, but it took a lot of code to generate them. I found I could do in 3 0r 4 lines of g code what took 100+ lines of arduino code.  I could have installed Grbl and continued using the arduino as the CNC controller, but I like the feedback graphical programs like Mach3 and EMC2 provide. Although I do have an idea for a little internal thread-cutting machine that Grbl might be perfect for.

Cutting the square profile proved to be a bit of a challenge. Unfortunately, on this machine there's no way to move the cutter relative to the center line of the part (bad planning!), so cutting a flat is a little more complicated. After a calling up some forgotten math and doing some sloppy Excel scripting, I was able to make a spreadsheet to generate code to control depth of cut / rotation ratio that generates a flat surface as the part rotates. Then, rotating the part by increments between each cut to produce the spiral was a matter of learning how to use parameters and subroutines in g code to create loops

Here's the Excel function to make the square:  
...where offset is the distance from the center of the part to the flat surface you want to generate, angle is the angle relative to the axis of the cutter and tool_radius is... well tool radius. I have a spreadsheet that does all the math and generates g code for different angles and offsets. I'd be happy to share if anyone's interested, but I don't want to post it in its current unfinished state.

1 comment:

  1. when you converted to cnc and eliminated the arduino did you attempt to interface linuc cnc to the arduino with the likes of EMC2Arduino wondered what it's like to work with
    Dave M


Note: Only a member of this blog may post a comment.