Sunday, November 19, 2017

more successes

Next thing to do was cut something with multiple depths. Eventually I'd like to make some keychains for gifts and myself and family (well most of us) are Packers fans. So I grabbed this model off of Thingiverse and imported the STL into Fusion. I converted Mesh to BRep and scaled the model to fit the stock I was planning to use.

I set up the CAM for 4 operations (settings shown are the ones I converged on after 2 failures)

  1. Adaptive clear the interior
    • 1mm depth per pass
    • 250mm/min feed
    • 0.2mm stock left radially
  2. 2D contour the G
    • 0.5mm roughing depth
    • 120mm/min feed
  3. 2D contour the inner part of the outer ring
    • 0.5mm roughing depth
    • 120mm/min feed
  4. 2D contour the outer part of the outer ring
    • 0.5mm roughing depth
    • 120mm/min feed

I used a 1/8" 2 flute end mill at 2500rpm.

The first attempt, I broke an end mill entering the first 2D contour. I initially add a 1mm depth per pass on the roughing and it dug in and broke right away. I measured after the cut and it was actually 1.5mm deep! Z must have slipped, and admittedly I had "0" set a bit low, in that the first move across the part cut a channel about 0.2mm deep.

Second attempt I dropped the roughing depth to 0.5mm and set zero on the Z axis by setting the end mill on a razor blade on top of the part. This left it slightly shallow but I wanted to be careful. This worked much better, but I finally did break and end mill on the final contour. This was caused by 2 factors. One, once again the end mill dug in, secondly the part was not perfectly flat. Thirdly, perhaps somewhat contributing, is that I didn't have the center of the cut aligned so the outer 2D contour left the stock and re-entered. I think the combo of unloading, reloading, and having too deep a cut did me in. The cut was 1.mm on that side and 0.8m on the other. You think you'd see that but I swear the stock was flat! Combo of using a diced-up part as a shim and getting swarf between the milling vise, shim and stock.

Anyways the Z digging was an obvious common culprit that needed to be addressed. When I have a problem I can't figure out I generally do one of two things. The first? charge ahead and just start doing stuff and generally screw up a lot and get frusturated. The other, rarely, walk away do something else and then find a eureka moment. Fortunately this was one of the rare times - I had my commute bicycle partially torn apart to fix something, so I worked on that awhile and eureka. I was thinking about the GRBL settings and recalled that the X and Y have 126 steps/mm or something like that and the Z has a mere 25 steps per mm because I'm using an 8mm lead screw with direct drive. So it only takes a few missed steps to make a notable impact in the Z whereas in the X and Y I can lose a few and never know it. So, what if I enabled microstepping? A 1/4 step would give me 100 steps/mm and would be the same order of magnitude as the other axes. Sure, it masks a problem, maybe, but it 'scales' the problem to be the same order of magnitude as the other axes.

Third try - success! Code ran to completion, no broken end mills, and the dimensions were good to within 0.1mm or so - again, 10 steps, but margin of error, that's 4 thou which is pretty damn good if you think about it, for a mini mill with printed parts!

I did get some wicked backlash in the Y axis - the screws came loose on the affixing print. I need to add some threadlocker.

Saturday, November 18, 2017

First real part off the mill...

So I've finally got a part to run to completion! It's not the x-axis part I was making last weekend. I decided to give up on that for two reasons (1) it is a large piece and (2) if anything the printed x axis is the least weak part of the system. I have a bunch of aluminum cutoffs I scavenged ( ~ 50mm x 150mm x 5mm) so I made a smaller part. It's a spinning weapon from one of my kids' combat robots, scaled down by 50%.


This lovely weapon is then attached to a 2822 brushless outrunner and spins at about 7k RPM. It slices, it dices, it kicks other bots out of the arena!


Here's the first attempt. First g-code to run to completion! There are four, 1mm high tabs to hold the part to its stock to prevent flyoff. You can see there is a thin layer of aluminum between two of the tabs, clearly the stock is not flat or the head not perfectly trammed. 


The part tore out easily. I used a decomissioned pair of wire cutters to trim the flashing then a rough diamond file. Careful eye can see a fair bit of backlash in the larger holes and a dimple (due to backlash) on the bottom curve.


So back to the machine. Fiddled around with a number of things and found two things I thought were culprits. The first was play in the y-axis - I fiddled around with my printed housing for the motor and the bolts, and they were a bit loose. I did this on purpose at first because when I tightened everything down the axis became very hard to turn, likely because the print is slightly misaligned which shifts the housing around the shaft out of center. I took the housing apart and drilled out the bolt holes a few mm wider so that the print could slide around laterally. This helped quite a bit - I could lock down the print and the tension only increased a little bit over being loosely coupled. Secondly I tightened a few of the set screws in the saddle - again, to the point where it felt a little harder to turn, but not completely locked down. I also slowed down the Z axis a bit - some testing I was doing mid-week showed slips in the Z over time. I wanted to make sure I wasn't driving down the end mill too quickly and either moving the part or sucking the part up.

This one turned out much better. tolerance on the outer holes is ~0.15mm. The interior hole is about 0.05mm average narrower than the CAD. Which may make sense. In Fusion 360 I have the tolerance set to 0.1mm, and when you are adaptively milling out a hole you are essentially milling concentric circles. If you discretize a circle you get a polygon with a lot of sides, which is inscribed the circle, so perhaps this outcome is a-o-k. I need to study a little more to make sure my intuition is correct.


Anyways, super happy to have a part come off the mill. Repeatability in the Z axis is a bit of a concern and rebuilding the Z axis in metal is likely the #1 priority. 

Sunday, November 12, 2017

metal chips


Well, I almost made my first part. Almost.

I bought some cheap 1/8" two flute end mills from Amazon. 10 for $11. I am actually quite happy with them. As you might recall when I was cutting wood, with the 1/4" end mill I had I could cut out the big void in the middle and the perimeter, but the 1/4" end mill was too large to make the bolt holes and socket cap pockets. These end mills do the trick, and I only broke one in the process of making those bolt pockets.

I used adaptive clearing, setting a boundary of the outside of the part, with these settings it was able to clear all the holes with the 1/8" end mill. I omitted the center circle because man, that would take a long time to adaptively clear all that material! Here is the adaptive settings I used for the bolt holes and socket cap pockets:
  • Under Linking, section Ramp, set minimum ramp diameter to 1mm. This will allow you to mill out a pocket of (end_mill_diameter + 1) 
  • Turn off rest machining and ensure it isn't leaving extra stock
  • Change the optimal load to 0.75 (reduces loading, prevent snapping)
  • Make depth of roughing cut 1mm
  • Set "Order By Area" to ensure it finishes one pocket before moving to the next one - otherwise it will do all pockets at 1mm depth, then all pockets at 2mm depth, etc... 
  • Adjust speeds. I chose 250mm/min travel speeds, with my mill running at ~ 2000 RPM. If you have a router going faster, you can travel faster
I then set up a separate adaptive clear for the large center hole, and a 2D perimeter cut with tabs. For these I set up a 1/4" end mill. I managed to snap several of the 1/8" end mills trying to do 2D perimeter tests and gave up on that idea for today. It would successfully make a few passes, then bind and snap. I have some culprits (the Y axis is still sloppy, maybe it lets the bit drift and bind). But I figured sooner or later I'd have to entertain tool changes, why not start practicing now. 

Code set up, I kicked it off with ChiliPeppr. I had a few stumbles (y axis grub screws came loose, y axis end nuts came loose - I locktited them) but once I was cutting reliably in scrap aluminum it was time for a clean sheet.



The four bolt hole with socket cap pockets and the two thru-holes cut excellently. The tool change triggered. This part was nerve wracking but turned out to be no big deal. The steppers lock in place and so long as you drive with the GUI you can raise the head up, do your tool change, and drop it back down no problem. Which I did! Once you drop it back make sure you measure the position of the tool relative to the part. You can drop it to zero, align the tool on top of the surface, and tighten up. Resumed the code - a it did wind up binding up on the second pass - the X axis stumbled a bit and the bit gummed up and I killed it. I should have had the RPMs set higher on the spindle. DAMN. What to do.

Well, I decided to generate new GCode which just has the center adaptive clear and the perimeter cut. Instead of referencing the corner of the part, I referenced to the center of the circle. Using a compass, it is easy to find the center of the circle as the starting point. This went well, clearing out the middle pocket, but then it bound up on the second pass of the perimeter. I was using the same feed and speed as the adaptive clearing, but the adaptive clearing only loads about half the tool, whereas the perimeter cut is loading the entire tool. I should have the spindle going faster, or the tool going slower, or take a shallower cut. 

The other culprit is the slop in the Y axis. As it is going along the channel it can drift back and forth and suck itself laterally while still being driven, and potentially gum up the works because the channel depth of cut is deeper than the direction it is being driven.


So close, and yet so far away....

Next thing I am going to do is fix the Y axis coupler, before trying again. But regardless, videos below:





Saturday, November 11, 2017

Full power

So cutting wood, I noticed that the Y axis stepper motor in particular felt underpowered. It seemed to stall out without a whole lot of resistance and when I had the steppers locked in place it sure didn't feel like 400 oz-in of torque!

At first I blamed sticktion, then I blamed the Oldham coupler locking up at certain rotations. But I could get the handwheel to rotate smoothly, and there wasn't an excessive breaking force to get the axis spinning. 

So I did what any rational person would do, I grabbed the food scale out of the kitchen (sorry, wifey) and pushed on the handles of the Y axis handwheel while the stepper was locked and sure enough, I got something just under 200 oz-in of torque! What gives? I figured even if overadvertized, the steppers would at least be north of 300 oz-in, and I knew the motor drivers were sufficiently powerful to give me most, if not all of the advertised torque. 

So was it the motor or the drivers? Turns out it was the latter. The DRV8825 stepper driver board comes with a potentiometer to limit current. If you visit the pololu page for the DRV8825 stepper board, and scroll down to the video, you can watch a nice lady explain to you how to adjust the potentiometer. Not mentioned in the video: as shipped they limit to 1A current. The drivers are rated for 2.2A peak, 1.8A continuous. I set mine to 2.0A by setting VREF to 1.0 volt. 

A little more information: The 2 amps is per coil. The steppers are rated to a peak of 2.83A for the motor - not for the coils! If you are treating the motor as bipolar (by wiring the four coils as two sets in series) the maximum current would be the square root of 2 amps, squared, for each coil, which works out to 2.83 amps. Or 2 amps per coil. So set the motor drivers to 2 amps knowing you aren't exceeding the capability of the motor. You do need to ensure you aren't microstepping - on my board you need to explicitly set a sequence of jumpers to enable microstepping. 

One other thing to note: while bipolar series has more holding torque than bipolar parallel, bipolar parallel has more torque at speed than bipolar serial, however it draws more amps - need a bigger motor driver. See the "series v. parallel" figure towards the end of this article.

Making sawdust

So with the X, Y and Z axes in existence (note: nowhere near complete or dialed in) its time to make some wood chips. A bunch of 2x4 ends donated from a woodworking neighbor are a bit more failure-tolerant than aluminum. 

In action. Had to deal with a couple slips in the Y axis. I had the most mental anguish about the Z axis, but in truth the Y axis is more of a pain in the butt than the Z is ... 


I took the CAD for the X-axis plate since it was the simplest and played in Fusion with the adaptive clearing. The bolt pockets are too small for my 1/4" end mill but the center hole and outline work fine. Obviously in a real part you wouldn't clear a full square around the part - I need to figure that out (probably use adaptive in the part, 2D cut outside?)


Watch the wood chips fly for yourself!


Z axis

I'm a couple weeks late posting this - as they say, life comes at you fast. 

My original projection for getting the CNC operational was "1 week for X, 2 weeks for Y and 3 weeks for Z, cut a meaningful part by Thanksgiving (week 9)". And I came in right on time. I had the Y axis operational week 2 but took another week to re-work it properly, and after a false start week 5, I got Z operational on week 6. 

The setup is pretty simple. A stepper motor is cantilevered over column to drive a leadscrew that is between the machine head and the column. A thrust bearing on the bottom supports the load through the leadscrew, and an adapter holds the leadscrew nut to the head.

First things first, head needs modifying to provide a gap between the column and the head. If you flip the casting over there are three webs that extend across the casting (highlighted in red below). I had a buddy of mine from work who converted his mill to CNC take those down ~ 15mm. This allowed sufficient gap to run the leadscrew down the head once the rack and pinion were removed.



Without the spring lift the head wants to drop (gravity is a harsh mistress) and so I made a print that encompasses the bottom of the head casting and bolted the leadscrew nut to it. In the picture below it is the black plastic part which wraps around the bottom.



Although in practice gravity might not be enough, the head can still try to jump - may add an air spring pushing down to force the head down even against upwards pressure from a translating cut. For now you can see a clamp is holding it in place.

As mentioned the motor is mounted cantilevered off of the column. I printed an adapter 10mm thick with a 10mm extension going into the headstock. This does wiggle a bit here and there, it should be made of metal once I can. The printed part could be improved by having a 30-ish-mm extension going into the column and using several exposed bolt holes to secure in place.




Another view showing the coupler I made on the lathe. It was a 1" diameter bar stock turned down to ~18mm to clear the head when it slides up over it. Several tapped holes with grub screws secure the motor shaft to the leadscrew.



Thrust bearing. The metal part on top of the thrust bearing is made on the lathe, it fits inside the thrust bearing and has a hole to accomodate the leadscrew. It can then spin freely against the thrust bearing sitting atop the hard stop. I put a reasonable amount of force into driving the hard stop against the leadscrew when securing in an attempt to carry most the weight - I don't want to wear out the steppers' bearings. An alternative construction I am considering is putting the thrust bearing up top annd hanging it instead of supporting from the bottom.


The mill with all 3 glorious axes.


Cheap 48v adjustable power supply. Black box houses the Arduino with the CNC shield.


Final setup with T-shirt chip baffle!


Chips will fly, soon! Printed parts can be found on thingiverse.

more successes

Next thing to do was cut something with multiple depths. Eventually I'd like to make some keychains for gifts and myself and family (wel...