Disclaimer

This blog is for entertainment purposes only, and is not meant to teach you how to build anything. The author is not responsible for any accident, injury, or loss that occurs as a result of reading this blog. Read this blog at your own risk.

Friday, March 27, 2015

CNC mill conversion - part 23

Pneumatic drawbar


There are quite a few ways for a mill to hang on to a cutting tool. Let’s take a look at three of the more common with small machines.

Being that the mini-mill is an obvious budget machine, it is normally sold with a chuck pressed onto an arbor much the same way as a on a drill press. The arbor shape obviously must match the spindle, usually a modern R8 shape, or as in my case an older MT-3 style, both are equally functional.


Chuck pressed on an R8 arbor

Chuck pressed on an MT3 arbor

Mini-mill with chuck


This arrangement is good enough for drilling holes, but dangerous for milling, since the chuck is not designed to take any of the side loads it would encounter. This is usually where the first of many “necessary upgrades“ begins. 

Trying to replace a chuck system, one could go with in-spindle collets, or with ER collets. 

With the former, different size collets slide up into the spindle, and a drawbar (basically a large bolt) is inserted from the top, and screwed into the collet’s top end. Tightening the drawbar pulls the collet higher into the spindle and closes the collet around whatever tool one has put into the collet. When the tool needs changing, one has to loosen the drawbar, and tap on it with a mallet in order for the collet to release from the spindle enough to eject the tool. 


In-spindle R8 collets


After purchasing my mill I chose to go with ER collet. ER collets are easier to use since the collet holder is the only part permanently installed in the spindle, and the different collets are housed outside the spindle. This did however eat up some of my Z axis real estate versus the in-spindle collet, but that’s never been an issue.


R8 arbor with ER chuck and collets

ER collet system being used on my mill


Tool change is unproductive time, and this can last quite a while, depending on a number of factors, including the need to account for the distance from the part to the cutting end of the new tool. Damage to the part, tool, or even machine might ensue, if this is improperly done.

Modern CNC machines use tool holders that are dedicated to each individual tool. These are accurately measured ahead of time, accounted for in the controller software database, and can quickly be replaced in and out of the spindle, sometimes automatically by an Automatic Tool Changer. 


Automatic tool changer


A popular tooling solution for hobby mills is the Tormach TTS (Tormach Tooling System). The Tormach mill uses a 3/4” in-spindle collet  opened or closed by the action of a 3 stage pneumatic piston pressing down on the drawbar. A set of 6 Belleville washers returns tension to the collet when the piston pressure is released, and the tool holder is thus firmly gripped.

I decided to follow in the footsteps of others, and implement a popular upgrade design for the mini-mill (part of the CNC plans CD I bought online), with some of my own modifications. The upgrade consists in a pneumatic drawbar able capture and retain a TTS look-alike tool holder set. Everything is made from scratch of course.

Initially, I bought a MT-3 style ¾” collet, and 1 TTS tool holder from the Little Machine Shop. I wanted to make sure this idea was even possible with my older spindle type.


Drawbar, MT3 style collet, and tool holder.

Items mounted outside of the spindle

Collet (not visible) grasping the tool holder


Since that worked fine, I then tried to make a tool holder on the newly  computerized lathe, to prove I would be able to machine enough of them to accommodate the majority of my tools. These would have to be made out of steel, something the once manual lathe had not digested very well in the past.


Steel slug getting turned into a tool holder

First try at making a tool holder


Amazingly, it turned out that the CNC lathe does not mind being fed steel bars any more, as long as the cuts are not too deep, or the feed too fast.

With all the individual pieces of the puzzle coming together, all I needed was to design and build the darn thing, so here’s what I came up with, after modifying the drawings from the CD a bit.


Power drawbar design for my mill

Same thing viewed from the rear

Making the right side bracket

Right bracket completed

Left and right bracket

Top plate

Testing for initial fit

All linkages completed


The thickness of 6 Belleville washers forced me to have to increase the effective length of the drawbar. I did this on the lathe, by turning 1” of the bolt head into a ½" shaft.


Turning the drawbar bolt

Drawbar modified to hold 6 Bellville washers

Before and after

Drawbar and washers in place


After a lot of fiddling with it, it was finally done.


Finding a good place to drill the bolt holes

0.050" (1.3 mm) clearance from bolt head to steel cam

Rear view of the power drawbar assembly




Power drawbar in action 





Sunday, February 22, 2015

CNC lathe conversion - part 3

From debugging hell, to success.

From my earlier experience setting up Mach3 to run with the mill, I knew that some painful debugging would surely lay ahead, and I was not to be disappointed. I will give some details of my troubles here, in case someone else were to follow in my footsteps.

With the latest release Mach3 at present time (R3.043.066) running on Windows 7, a UC-100 USB to parallel controller (update 2.146), and a G540 (ver. #8), I’ve been having an issue with a runaway axis (or two). This is not a new issue, I’ve had this happen to me infrequently in the past, maybe once every few months or so, but now it's happening every single time, and it’s making my machines completely unusable, and somewhat dangerous. 

Unable to continue with my conversion work, and quickly running out of ideas, I was able to catch this problem as it happened on video. Unsure as to which was the source of the problem, I sent it to GeckoDrive support, CNCdrive support, and posted it in a new thread on the Mach3 support forum.





Runaway X axis 




Of course, there was always a chance that Windows might be to blame, so I updated it, though it ended up not making any difference. Getting pretty desperate at this point, I deleted, then reinstalled Mach3. This finally appeared to fix things, and I regained control of the lathe and the mill… until the problem started again about 1 hour later, as I was setting up the motor tuning options for the lathe, this time causing me to loose control of the Z axis.


I decided to limit the top speed to 40in/min to more precisely position the cutter by hand

Top speed on a lathe is pretty irrelevant


I captured that in a second video, sent it to the same outlets as before.





Runaway Z axis 




By this time I had finally gotten a hold of the Gecko tech support, which said exactly what I was expecting, but hoping they would not say, you probably guessed it… their board could not be the one causing the issue, it just reacts to input signals

I tended to agree though, since the UC-100 screen shows an active "Run" LED every time there's a runaway, so it knows something is going on. On the other end, Mach3 DROs (digital readout) showed no movement whatsoever while the axis was running away, like it had nothing to do with it at all. Perhaps the UC-100 was the party to blame after all.

To compound the lack of actionable troubleshooting information, running the mill and lathe from my laptop produced no runaway axes at all, like the problem resided with the “all in one” computer in the shop instead. I was quickly loosing faith, until someone in the Mach3 forum had the bright idea to suggest I turn off the backlash compensation, and all of a sudden everything was right with the world again.

Apparently backlash compensation is calculated in the UC-100, and not in Mach3, so I passed the information on to the Hungarian support team at CNCdrive, who promised to have their programmers look into it the next Monday.

Meanwhile, I moved on with other setting up tasks.

One thing that really surprised me of the BDtools CNC conversion, was the ability of the anti-backlash nut in the cross-slide (X axis) to completely remove all backlash from the lead-screw, when properly adjusted. 



Anti-backlash nut and its adjusting setscrews (top bolts are for attaching it to the cross-slide)





Checking for backlash on the X axis lead-screw 




The Z axis did not do as well with 0.0023” (0.0584mm) of backlash, even though it was sporting a very tight ball-screw.





Checking for backlash on the Z axis ball-screw 




This meant that I really didn’t need to use Mach3 backlash compensation after all, though I was happy to have played a part in the debugging of the UC-100 unit, of which I am very fond, and would definitely buy again.

Having sorted out these very important issues, I felt confident enough to run the first air-cutting test, a traditional first step.





Cutting tool running under CNC power for the first time 




I really felt like things were moving along, until I realized that everything the computer would come up with was in fact happening not only in reverse, but also in the wrong direction and quadrant on the actual lathe.

I’m going to give you the short-short version here... it took me 2 more days of troubleshooting hell to make this right. 

I hate setting up Mach3!

The good news now is that I will save my Mach3 turning profile in a safe place, so that I will never run the risk of having to go through this painful experience again.

I will include some pictures of my config pages at the bottom of this page, in order to spare you the trouble (should you be interested). You might still have to tinker slightly with the motor’s steps per unit numbers, since lead-screws and ball-screws are not all created equals, but this should get you really close. Note that I am using the lathe in “diameter mode”, as opposed to “radius mode”, as in normal manual operations. I am also working with X+ toward me, and X- on the further side of the spindle centerline, though backward, it was the only way I could get the code, the screen, and the cutting tool to agree on the same plan of action.

Finally, I started playing with the “turning wizards” included in Mach3, and practiced a bit on a ¾” (19mm) Delrin rod.


5 complex operations in less than 5 minutes!!!






turning a rod with a fillet





Cutting a ball on the end of the rod 







Cutting metal












Saturday, February 21, 2015

CNC lathe conversion - part 2

Electric motors

I ordered two NEMA 23 425oz/in 2.8A Stepper Motor ¼” Dual shaft (KL23H286-20-8B) on eBay to run the lathe X and Z axes.


Stepper motors


When the motors came in, I was surprised to find out they didn’t fit. Fortunately that was easily fixed by enlarging the mounting holes on the drill press, and shortening the length of the shaft with a cutoff wheel.


Enlarging mounting holes

Shortening the front shaft

After mounting them on the lathe, the time came for wiring, and these motors require you to make a decision before that can be done. Since they have 2 coils per side, and 2 wires per coil, there are a total of 8 wires to be sorted out (luckily I found the wiring diagram online) into 3 possible configurations, unipolar, bipolar series, and bipolar parallel. To make a long story short, bipolar parallel is where it’s at! More torque and more speed, who wouldn’t want that! 

The point to take away here is that 8 wires give you the flexibility to chose whatever configuration you need.


Stepper motor wiring diagram


Following the diagram, I paired the wires and ended up with 4 couples to labeled A+, A-, B+ and B-. 


Wires paired for bipolar parallel configuration


These were matched to the connectors on the G540 driver unit, through one DB-9 plug per axis (X & Z).


Coils (6 though 9) and resistor (1 to 5) connections


One last item to keep in mind before being able to power them up was the addition of a resistor. Since my motors are rated for 2.8A, I needed a 2.8kΩ resistor, unable to find one, I resorted to combine random resistors until I obtained the needed value, then bridged pin 1 and 5 with it.



Making a 2.8kΩ resistor

Resistor installed between pin 1 and 5


With all the details taken care of, it was time to turn the power on, and hope it would all work out.





Testing the X and Z stepper motors




Awesome! The biggest hurdle was already behind me, though more would surely lay ahead.


Wednesday, February 18, 2015

CNC mill conversion - part 22

X travel limit switches

One of the items I should have addressed a long time ago, that was instead put off for a rainy day, was the installation of travel limit switches on the mill. 


Typical inexpensive snap action roller microswitches


All three axes need limit switches for reference and protection, but due to the diverse physical configuration of each axis, different mounting strategies are required. 





Limit switch operation




In this post I will discuss my development of the X axis travel limits.

Travel limit switches are needed on CNC machines for two main reasons. The first is to let the computer know where the table and head of the mill are in relation to the travel stops (machine coordinates). This is usually done at the beginning of the work day, or as needed, by giving the machine the “Reference all home” command, which slowly runs the head of the mill all the way up to the stop (Z=0), and the table to the furthest right and forward possible (X=0 & Y=0), where limit switches are tripped, the motors stopped, and the mill position recorded in the software. 

The second reason is to avoid damages to the machine by accidentally driving table, or head, all the way against the travel stops, which usually consist of hefty steel chunks. Positioning limit switches just inside the physical travel stops, causes the motors to be turned off before any hard hits are realized, and any damage done.

There are nearly infinite ways to attach limit switches to the bed of a mill, some are good, and some create more issues. 

What I wanted to achieve was a scenario where a slight bed over-travel (due to high speed) would not damage the switches, plus minimize the number of parts to be made, reduce the need for adjustments, utilize any already existing and unused tapped holes in the bed, and lastly reduce switches contamination from cutting operations.

The first prototype entailed a microswitch at the far left of the table, and a cam attached to two previously vacated screw holes near the center of the bed.


Left microswitch biased ramp (version #1)


This worked in principle, but the hole pattern didn’t match (my fault), and this device didn’t address right switch activation. It was however useful as a platform on which to develop the second and final version.


New cam mostly done

Version #2 of the cam is bidirectional

New cam bolted in two unused holes

Enough room still exists on either side to access the gib screws


Installation of the microswitches required drilling and tapping a few holes in the right places, so I didn’t bother taking any pictures, but I put together a short clip of the making of cam #1 and #2.





X axis travel limit development




I’d like to end by adding one last thought regarding the number of limit switches needed on a 3 axes CNC mill. 

While it might initially seem obvious that 2 switches per axis are necessary, this number can actually swell to 3 if you choose to have a dedicated homing switch, or shrink to 1 if you choose not to, and set up and employ the controller’s soft limits function. 

Setting this up in Mach 3 is actually a pretty easy thing to do, you just simply tell the controller how far you want it to allow the bed to travel in a certain direction, and the controller will slow down the speed of the motors as you approach this imaginary travel limit, and stop it as you reach it. 

This is a fine strategy to avoid having to mount ½ of the hardware, and it works well the majority of times, but I’ve had occasions when I turned the soft limits off to perform certain maintenance functions, then forgot to turn them back on, only to be really surprised at the next crash event.

For this reason, I will use a total of 6 limit switches on my mill, with 3 of them doubling as home reference switches.