# G0704 CNC AC Servo Rebuild (Picture Heavy)



## macardoso

Hi All,

About 5 years ago I completed a CNC conversion of a Grizzly G0704 milling machine. Like everyone at that time I chose to go with the Hoss Machine style conversion as there were not many options on the market. I was not comfortable designing my own system at the time since I was just starting out in the hobby. The conversion was not glamorous, but it worked and I've tended to use the machine more than just fixing it up. The original purchase and conversion have been more than paid off in fun side jobs. I have literally thousands of great parts that have come off of this machine.

Fast forward to today, I am graduated from college and working for an industrial automation company (specifically in servomotor applications and control system design). I have been extremely fortunate to be able to get my hands on hardware leftover at work that I would have no justification to purchase on my own. Off and on over the last year I have been designing and building a complete system overhaul for the machine. I'm primarily focused on ease of use and reliability of the machine, but there should be huge performance increases as a result. I know everything you are about to see is complete overkill for this size machine, but I left it flexible enough to be transitioned onto a larger machine should I outgrow the G0704.

System overview:
The new control cabinet is a 24" x 36" x 8" sealed enclosure housing 6 AC servo drives.


Designed to be run from a Ethernet Smoothstepper and Mach 3/4, the Allen Bradley Ultra 3000 series drives power AB bulletin MPL servomotors.


X Axis - 0.75 kW 5000rpm Max, theoretical rapid 1000ipm, continuous thrust 350lbf, peak thrust 800lbf. High resolution multi-turn absolute encoder (~2M count/rev)


Y Axis - 0.75 kW 5000rpm Max, theoretical rapid 1000ipm, continuous thrust 350lbf, peak thrust 800lbf. High resolution multi-turn absolute encoder (~2M count/rev)


Z Axis - 1.80 kW 5000rpm Max, theoretical rapid 1000ipm, continuous thrust 900lbf, peak thrust 2400lbf. High resolution multi-turn absolute encoder (~2M count/rev)


Spindle - 1.80kW 5000rpm Max, Continuous torque 4.18Nm, Peak torque 11.1 Nm, 1:1 gearing, High resolution single turn absolute encoder (~2M count/rev)


4th Axis - Prewired for up to 1kW. I have a high torque Alpha Wittenstein SP series gearbox which I plan to make a 4th axis with in the near future.


5th Axis / Spare - Prewired for up to 1kW.

The panel is wired for 40A @ 240VAC. It theoretically could pull 70A, but I don't foresee running all 6 drives at 100% at the same time. The control voltage is 24VDC which is coupled to the 5V Smoothstepper through optical isolators. All I/O points are broken out to M12 industrial connectors which include DC power and common to allow direct connection of 3 or 4 wire sensors. I have also purchased a pendant.

Mechanically, all of the original conversion hardware will be removed and replaced with new heavier duty components that are already built (not trying to make this a build log per se). The spindle is getting the most work as the bearings have been dying a slow death over the past year. The new design will be a totally sealed belt drive (noise reduction) and feature a pneumatic drawbar. I have started this process and will share lots of pictures in the next post.

Rebuild plans:

Rebuild spindle
Install spindle motor, belt drive, and drawbar
Remove old CNC components
Install axis motors and mounts
Install electrical cabinet
Install limit/home switches
Install wireway and cable routing
Install touchscreen computer
Migrate to Mach 4
Validate system functionality
Performance characterization
Mach 4 Pendant Configuration
Mach 4 LUA Scripting for servo drive serial communication (Diagnostics, true rigid tapping, absolute homing, gear hobbing, etc.)
I'll follow this post up with some info on #1 since I'm nearly done with that part.

As promised by the title, some pictures:


The freshly completed Hoss Machine style conversion (ca 2012)


The very first control panel, literally just stepper drives and a power supply


Got a touch screen monitor


Upgraded control panel (ca 2013). Ethernet Smoothstepper, CNC4PC breakout boards, StepperOnline drives, and a DMM Tech DYN3 AC servo for the spindle.


As installed (24" x 24" x 6")


Servo spindle motor with belt drive and plastic cover


Pretty much what it looks like today, except for some cleaned up wiring.


Machining some valves for a robotic bartender I built with some buddies in college.


I hope you will follow along with me as I complete this project. I have been very grateful to this entire community for the knowledge that is shared, and I hope to be able to give back even if it is a fraction of what I have learned!

Mike


----------



## Boswell

Very interesting and putting A/C Servos onto a  G0704 is indeed some overkill but "anything worth doing, is worth overdoing"


----------



## JimDawson

Nice Job!  

Looking forward to more


----------



## macardoso

OK, so I am part of the way through what I listed as step #1 above (really more like step #437) which is rebuilding the spindle. I've been uncomfortable working on the spindle in the past as it requires a lot of care and precision as well as some tools that I don't have (arbor press, bearing pullers, etc.). That being said, my current setup has significant notching to the bearings and runs very hot and loud. They need to be replaced.

Prior to starting work, I made a set of tools to disassemble the spindle, press the bearings on and off, and get things adjusted correctly. If anyone wants a rough set of drawings for their own use, I'd be more than happy to make them up. I think the job was much easier with these.


Pin spanner for removing the lower bearing retainer


Deep pin spanner for adjusting and removing the spindle locknut (sometimes called an adjuster nut)


Various rings to press bearings


Tool to knock out the upper quill tube assembly


I began by removing my old AC servo, belt, and pulleys. From there, the drawbar could be removed and the entire lower section of the spindle drops out. There was a touch of surface oxidation on the spindle housing, but otherwise it looked really good. At this point I could tell that the angular contact bearing pair on the spindle itself was the source of the notching, and the upper quill tube bearings spun smoothly (I still replaced them since I had purchased new bearings). I used an aluminum disc and a deadblow to knock out the quill tube.

I removed the spindle head casting to fill a few holes with epoxy. I have designed the new belt drive to be "air-tight" to reduce the audible noise from the system.






There was a little porosity due to using JB Kwik, but it won't affect the final product.

Next I worked on removing the quill tube bearings. Many youtube videos show people popping these off with a pair of screwdrivers no problem, but my experience was different. After an hour of getting nowhere, I put it away for the night and went to Harbor Freight to get a 3 jaw gear and bearing puller. I made a quick tool to go on the end of the quill tube so the bearing puller had something to push against, and viola, the bearings came right off. I highly recommend the $20 to have one of these in your tool box for times in need.


Quick tools don't have to be pretty.

Since I don't have any kind of press, I use my lathe to apply pressure to press parts together (pressing against the side of my toolpost).  Pressing the bearings for this project is about the most force I'm comfortable applying with this method. Using a machined aluminum disc and a piece of scrap tubing, I was able to carefully press on the new bearings and reseat the snap ring.


Before


After

I'll save my angular contact bearing woes for the next post. Night!


----------



## macardoso

Yesterday I had planned on spending the afternoon and evening to replace the angular contact bearings and reinstall the spindle components into the casting. I wrote up a procedure for how I was going to assembly the bearings such that I would never press across the balls of the bearing.

First step was to freeze the spindle shaft in the freezer and heat the bearing at 250*F in the oven (limit for phenolic cage material). I waited about 30 minutes then dropped some spacers on the spindle shaft, chilled it further with a gas duster, and pressed the bearing on. This went quite easily and the bearing was seated very flat, confirmed on a .0005" indicator and my surface plate.  Next I heated the spindle housing at 350*F and chilled the upper bearing. When I went to press it on, it just dropped into the housing, no press required. After it cooled, I could remove the bearing by hand. The housing measured a few tenths oversize on the bearing so the fit was a tight sliding fit. There was no radial play on this bearing. I revised my plan to include pressing this onto the spindle shaft after the shaft and lower bearing were installed in the housing.  

The next step was to heat the housing to 350*F again and chill the spindle/lower bearing assembly. After 30 min I set everything up on the lathe to press it on, but when I went to slide the shaft in, the bearing got stuck crooked by about 5 degrees in the threaded portion of the spindle housing. The thermal shrink kicked in and I was screwed. SH*T!!!. I took a deep breath and though about how I was going to remove the bearing. I tried pressing it from the rear, I tried pressing it in further from the front, hoping that it would straighten out, but neither worked. 

After an hour of no success, I decided to whack the spindle shaft laterally with a deadblow to align it again (and thus dooming the bearing to the garbage can. This did free the shaft from the housing, but not in the way I had hoped. The races separated on the bearing and all the balls dropped out. SH*T!!!  From this point I could see the bearing was stuck slightly in the bearing bore of the housing, and jammed into the gully of one of the threads. It looked like a 1 : 1,000,000 chance. Anyways, when I went to HF, I bought a set of 2 jaw pullers, a set of 3 jaw pullers, and a pilot bearing puller (planned to return whatever I didn't need for the job). I didn't think I would use the pilot bearing puller, but boy did it save the day. After a few minutes of fiddling with the setup, POP, the outer race was removed. Now the inner race was still thermally shrunk to the spindle shaft and was nearly flush with the nose of the spindle, I certainly wasn't going to be getting the bearing puller on there. I carefully reassembled the cage and balls and basically hammered the bearing back together (reattached the outer race to the stuck inner race). Using an aluminum ring from before, I was able to press the inner race off as well. WHEW!

So at the end of the day, there was no damage to the spindle shaft or spindle housing, but the angular contact bearing was toast. I have a new one on order and I will be making some tooling to make sure that the spindle is aligned when it is being pressed into the housing. 

I hate working on spindles...


----------



## macardoso

Also, question for everyone. I had previously purchased 7005C and 7007C angular contact bearings (15 degree contact angle). This time I mistakenly purchased 7005B and 7007B angular contact bearings (40 degree contact angle). Does anyone see an issue with using the 40 degree ones? I understand they trade some of the load rating from the radial direction for more axial, but could this be an issue? They are still rated for much higher speeds than they will be run at, and I can't imagine that the loads I will be applying to them would be anywhere near their limit in either direction?


----------



## macardoso

While I am waiting for the new spindle bearing to arrive, I am doing a bit of re-wiring on the electrical cabinet. Since I finished it a year ago, I have decided to add another 3.4A 24VDC supply and a time delay relay to power the industrial PC running this system. I found the PC to be sensitive to the swing up on the power supply voltage when it first turns on, so a 1 second time delay will wait for the voltage to stabilize before closing the power contact to the PC. I'm using an AB 700-FS timing relay for this purpose.


In addition, I am adding 2 DPDT relays to allow Mach 4 to mechanically disconnect the signal lines from the smoothstepper to the Z and 4th axes and connect these axes directly to the feedback from the spindle drive. If I can figure out the serial communications to the drives, I should be able to set the gearing ratio on the fly to do true rigid tapping and gear hobbing.  That being said, it will be one of the last things I try to get working once everything else is finished and working, but I'd rather have the wiring in there already.

I didn't have much spare room on my 11" section of DIN rail, so I am removing all the single tier terminal blocks and replacing them with these 3 tier ones. 


This gives me about 240% increase in wiring density and just barely enough room to fit everything. With the addition of the jog pendant, power drawbar, and a 3 button operator station, I have used every one of my remaining 13 inputs and 4 outputs I saved as spares. But it all fits 


Completed 3 tier wiring, you can see how much space it saved. I haven't done any dressing of the wires; I promise I'll make it look pretty


The original lower density terminal blocks.


----------



## mattthemuppet2

crikey, very impressive work! I haven't pressed on any spindle bearings, but I've pressed on a bunch of bearings before and getting them on/ in straight is always tricky. The best way I've found (where possible) is to use a threaded rod with end plates that locate both the bearing (sized to fit part of the ID of the bearing) and the housing (sized to fit the ID of the housing). That gets the bearing started as close to perfect as possible. Once it starts going on straight, you can swap out the bearing plate for one that allows you to press the bearing on all the way. The screw nature of the press means you go real slow and can correct any errors as you go, rather than getting part of the way and realising the bearing is cocked.

looking forward to the rest of the build!


----------



## macardoso

Well I had a pretty productive weekend on this project.

While I waited for a replacement bearing to arrive, I did some more work on replacing terminal blocks.


I was able to fit all the new relays, and have 18 spare points should I need them.


I also got a little help from Zoey (she likes to bite my hand when I go digging for wire ferrules in the bag)


After I spent half an hour dressing the wires.

I still need to land connections between the empty block on the left (the MPG pendant) and the breakout board for the Ethernet Smoothstepper, and make the connections to the new relays, but it is getting close!


----------



## macardoso

I had watched a youtube video last week about another G0704 belt drive conversion where they warned that the inside diameter of the quill tube had significant runout. I measured mine at .006" which was a lot higher than I wanted. I removed the rear bearing using a bearing puller and covered the front bearing in a generous helping of masking tape:

View attachment 286101

View attachment 286102


I then spent 45 minues indicating the part to run concentric and coaxial to the spindle (major PITA with so little material to hold onto and all machined surfaces had 12 thou or more of runout). I skimmed the bore until it cleaned up.

View attachment 286103

View attachment 286104

View attachment 286107


After this machining, I had about .0005" of runout when running on its own bearings. I was plenty happy with that.

View attachment 286108


Again I used the lathe and some tooling plates to gently press the lower bearing back onto the quill tube

View attachment 286109

View attachment 286110


Since I had enlarged the bore and managed to ruin both flanges on my previous spindle pulley, I got to work machining a new one:

View attachment 286112

(Pulley stock on the left, ruined pulley in the middle, and the old steel L series pulley on the right)

I used a split ring tool to hold the pulley on the teeth without damaging the flanges. This allowed for work on both the bore and the hub OD in the same setup.
View attachment 286113

View attachment 286115

View attachment 286116

I indicated this into true and corrected axial runout using a lead "tapper"
View attachment 286117

View attachment 286118

View attachment 286121

Since all my parts were designed from a 3D model of the G0704 that I purchased, there were a few sizing errors that I had to correct. In particular I tightened the pulley bore to spindle spline fit to a light hand press.
View attachment 286124

View attachment 286125

(CCGX insert, picture doesn't do justice for how good the bore finish was)
View attachment 286126

Shop kitty #2 needed to see what was going on.
View attachment 286127

Finishing hub OD to prep for pressing on an aluminum ring (effectively making the OD larger than available from SDP-SI)
View attachment 286129

The finished precision aluminum ring, fitted to the newly bored quill tube.
View attachment 286131

And pressed on with some Loctite 271.


----------



## macardoso

Continuing...

I did a test fit of the pulley and it was a light hand press fit.


A quick check of runout yielded around .0025 at the teeth (this ended up around .0010 once the spindle was fully assembled)



The spindle pulley drives the spindle through 2 opposed keyways 180 degrees apart. I broach these keyways using the lathe and a custom broach bushing. This bushing has been a pain since it was cut with a significant taper on the lathe which I didn't catch until after I milled the keyways. To correct this I tried filing it, but that mostly got it out of round.   

Since the new bore on the pulley was smaller I decided to use the glue chuck method to remount the bushing in the lathe and cut the OD.




A light skim cut brought down the high spots until the bushing was a nice sliding fit to the bore. The keyways were filed to correct the depth. Not pretty but it worked.










After broaching pass #1


and #2


From here the bushing is rotated 180 degrees and a key is installed to hold it at the right angle


and the second keyway is cut in the same manner



And the spindle pulley is done except for light hand fitting to fit the keys to the roughly machined spindle spline.


----------



## macardoso

I got the replacement bearing from VXB on Saturday afternoon. They incorrectly shipped me a 7007C P5, but I can't complain because it is the right size and a much more expensive bearing than the 7007B that I ordered.

I went very slowly on the installation and had great success!

Lower bearing was heated to 250 degrees and the shaft was chilled with a gas duster. Using the lathe it was a light press on.




The quill bearing assembly was pressed into the head casting using the lathe again (dang this thing is versatile!)




The rest went together without too much trouble. There was some cursing but the bearings went in without damage and the preload was carefully set with a custom pin spanner wrench. The spindle doesn't freewheel and has a slight stiffness to it. I think this is ok and I can back off the preload if they get too warm. The bearings were packed at a 30% fill using Kluber Isoflex NBU 15 spindle bearing grease. This came out to 1.95cc for the 7007C and 1.05cc for the 7005B. All the retaining rings were installed and tightened, then the spindle was generously greased for thermal transfer/anti-corrosion/vibration damping. I almost forgot to install the R8 retaining pin, but fortunately it can go through the side of the spindle housing.




The spindle was installed in the housing and a plastic spacer was lightly pressed between the spindle and the quill to prevent rattling.


The pulley was installed with the keys and finally the steel "top hat" was screwed on. Final assembled runout at the pulley was just around .001 TIR. All non-critical rotating components were within .003". Runout in the taper is roughly .0003-.0004. I wish this was a little better, but it will be good enough. (I have to keep telling myself that this is a $1000 machine, not a Mori Seiki).


For the motor pulley, I modified the setscrew to press in a brass tip. This prevents a scar on the motor shaft when tightened and prevents stuck pulleys.


The depth of the pulley when installed in the housing is critical to maintain pulley alignment to the spindle. I used the 3D model to find the correct distance between two surfaces I could measure between, then I used a height guage and a dowel pin to set the depth. The depth was slowly adjusted using a screw on the end of the motor shaft.




And a final fit test with the belt:



I had to stop here because I forgot to order bolts long enough to mount this housing to the spindle casting. Those will arrive on wednesday.


----------



## JimDawson

Nice work


----------



## Skierdude

I’ve just finished reading your posts - most enjoyable read. You’re doing great work there and this gives me a taste of what I’m in for when I start a CNC conversion on my mill drill, although I’ll go the usual stepper route. 
Keep those posts coming.


----------



## macardoso

I am finishing up some wiring for the pendant, 240V wiring (rather than the temporary 120V test wiring), RS-485 network, and relay wiring.

I have an Ultra 3000 (1kW) drive set up for testing on my bench. I am recording the average current draw at various speeds on the motor with no load. This will help me when I go to measure the current draw of the spindle during break-in and measure the power loss and efficiency of the spindle drive train. Since I am powering this test unit at 120VAC, I am bus voltage limited to ~3000rpm. When powered at 240VAC, the motor will easily reach 5000rpm.









Measured Current Draw:
0 rpm - 0.0A (Some jittering current centered around 0A)
500 rpm - 0.174A
1000 rpm - 0.195A
1500 rpm - 0.230A
2000 rpm - 0.255A
2500 rpm - 0.276A
3000 rpm - 0.280A

Here is the speed-torque curve for the motor I am using. The curve is generated on a slightly higher power output drive, but the peak torque I can achieve will be nearly identical.


----------



## Boswell

No one is going to recognize your G0704 once you are done.  BTW, great wiring work on the control box. I think you have done this before.


----------



## macardoso

Boswell, thanks! I don't need to make the most "bling" CNC, but I want a functional one with lots of ease-of-use features. My day job is designing industrial control panels (among other things) so yes, just a little practice. After all day of drawing designs on a screen, I just want to turn a screwdriver.


----------



## ConValSam

Really, really excellent workmanship on your electrical panels.  A pleasant rarity to see such well layed out, meticulously executed work in a hobby machine.

Do you work for A-B?


----------



## vinnito1

on your build. Looks very well thought out. I'm also working on my G0704 conversion and trying to figure out path that I want to go. I'm already committed to DMM DYN2 for the X,Y,Z axis but haven't settled on the spindle servo or servo driver. Any tips if I decide to go AB route? Ebay seems to have reasonable pricing for decently looking used motors and drivers.


----------



## macardoso

Thanks all! 

Vinnito1, Awesome choice on the DYN2 drives. I've used them on a project before and have been very happy. Make sure to get the full voltage PSU and have a little extra wattage to spare. If I remember correctly, I used an automation technologies unregulated PSU (the one with the big toroidal  transformer). 

I chose to go with the AB Ultra 3000's because they were made available to me for this project through work.  They are used lab testing units. The Ultra 3000 is an older drive but is absolutely bulletproof. AB tried to discontinue them about 3 years ago and so many people complained that they went back into production. As an older unit, they have some antiquated features, but even after exposure to tons of newer servos the Ultra 3000 remains near and dear to me. For _my_ purposes the 3000 is great because there are a million features for customization. I'm controlling it in a "follower" mode where it might be traditionally connected to an encoder running on say a sheet of plywood. It can also receive analog position, velocity, and torque commands, execute indexing programs using digital I/O, or even communicate over RS232/RS485 serial connection with 3rd party software. They can run many different kinds of motors (including non-AB servos) and can read either incremental encoders or Sick Stegmann Hiperface absolute encoders. The user is able to create their own motor profiles (which is not available in newer AB drives). 

But you are correct, AB products are known for being expensive. The drives retail for around $1600 (list price) and the cables can be upwards of $125 each. If you're willing to shop around (ebay), most of this stuff can be found used cheaply (I saw $125 for a drive). I ended up spending probably $600 just in cables to get this system put together. AB servo motors are also fairly pricy, but you can use anybody's servo as long as the voltage class is correct, it has a supported feedback, and you can get your hands on the motor data. 

If you decide to go the AB servo route for your spindle, PM me and we can chat about the system.

That being said, after a few years of having a servo spindle, I never used it to do anything that couldn't be accomplished with a VFD and an induction motor. I would seriously consider just going that route unless you need to do something special with your spindle. I chose to go the servo spindle again because it was available to me...


----------



## macardoso

Got some new bolts in the mail and got the spindle assembled. Unfortunately, working just from a CAD model bit me again and not all of the mounting holes on the top of the spindle line up (guess the Chinese factories put holes wherever they please). I'm hoping I can open up the counterbored holes on my aluminum mount to get things positioned better. Of course now I don't have a mill to use so I'll have to butcher it on the drill press...

I was able to get the motor and belt mounted on 3 out of the 4 screws and got it up and running. I am slowly breaking in the bearings/belt and taking detailed measurements of torque consumption, temperature, and noise as I work up in speed. I'll post those results when I'm done testing, but I can say right now that it is a LOT quieter. At 1500rpm it measures about 10dBA less that my lathe running at 550rpm with no gears engaged. The lathe is quite comfortable to run without earplugs.

I have only run it up to 1500rpm so far, but the highest bearing temp was 89 degrees in a 72 degree ambient temp (I'm right next to the furnace).

All in all it seems to be going well, stay tuned for test results.


----------



## macardoso

So I haven't had so much time to work on this at night but here are some basic tests up to 1750 RPM.

Original Velocity Tuning Gains:
P: 200
I: 20
D: 0
zero speed response kind of spongy, small surging sounds at speed, velocity drops under simulated load.

Ambient Temp: 72 deg - Fluke IR Temp gun

Ambient Noise: 34 dBA (Furnace Off) "Wisper"
Ambient Noise: 67 dBA (Furnace On) "Traffic"
Ambient Noise: 79 dBA (Lathe on) "Alarm Clocks"
Noise readings taken at 1', microphone pointed away from source

All tests run for 20 minutes or longer for reading to reach steady state.

Test 1: 100rpm
Starting Current 0.98A
Lower Bearing Temp: 74.0 deg
Upper Bearing Temp: 72.0 deg
Case Temp: 72.0 deg
Noise: 39 dBA "Quiet Library"

Test 2: 200rpm
Starting Current 1.19A dropped to 1.16A
Lower Bearing Temp: 74.0 deg
Upper Bearing Temp: 73.0 deg
Case Temp: 73.4 deg
Noise: 45 dBA "Quiet Street"

Test 3: 300rpm
Starting Current 1.286A dropped to 1.168A
Lower Bearing Temp: 74 deg
Upper Bearing Temp: 75.8 deg
Case Temp: 75.2 deg
Sound Level: 50 dBA "Quiet Street"

Test 4: 400rpm
Starting Current 1.254A dropped to 1.170A
Lower Bearing Temp: 76 deg
Upper Bearing Temp: 77.4 deg
Case Temp: 77.4 deg
Sound Level: 55 dBA "Normal Conversation"

Test 5: 500rpm
Starting Current 1.274A dropped to 1.218A
Lower Bearing Temp: 77 deg
Upper Bearing Temp: 79.2 deg
Case Temp: 77 deg
Sound Level: 56 dBA "Normal Conversation"

Test 5: 750rpm
Starting Current 1.349A dropped to 1.274A
Lower Bearing Temp: 81.2 deg
Upper Bearing Temp: 82.6 deg
Case Temp: 79.2 deg
Motor Temp: 84.2 deg
Sound Level: 68 dBA "Traffic"
Noticable 3-5Hz surging with higher frequencies. Kinda annoying

Test 6: 1000rpm
Starting Current 1.360A dropped to 1.299A
Lower Bearing Temp: 85 deg
Upper Bearing Temp: 86.4 deg
Case Temp: 82.4 deg
Motor Temp: 88 deg
Sound Level: 68 dBA "Traffic"
Much smoother sounding than 750rpm
Quieter than my lathe at 550rpm and no gears engaged

Test 6: 1250rpm
Starting Current 1.480A dropped to 1.375 A
Lower Bearing Temp: 87.2 deg
Upper Bearing Temp: 89 deg
Case Temp: 84.6 deg
Motor Temp: 90.6 deg
Sound Level: 72 dBA
Higher pitched than 1000rpm, slight high pitched squeaking can be heard
Quieter than my lathe at 550rpm and no gears engaged

Test 7: 1500rpm
Starting Current 1.55A dropped to 1.464A Cold Start after sitting all day
Lower Bearing Temp: 89 deg
Upper Bearing Temp: 90.6 deg
Case Temp: 84.0 deg
Motor Temp: 92.8 deg
Sound Level: 72 dBA
Occassional Fluttering sound?

Shortly after starting the 1750 rpm test, I head a somewhat loud clicking sound. Due to the hole misalignment to the casting, I did not have the top hat installed above the spindle pulley which allowed the pulley to slightly work itself up the spindle shaft until the key was just kissing the housing. I stopped the spindle and installed the top hat. At the same time I also released belt tension so the numbers following this point will no longer be correlated to the above testing. That being said, the lower belt tension gives a much smoother and quieter running noise. I can pretty much only hear the motor noises instead of the belt noises! I made sure everything was set up correctly and ran at a full range of speeds up to 3000rpm. It all sounds amazing. I also retuned after turning on the low pass filter. Here are the new gains:
P: 1000
I: 280
D: 25
LPF Bandwidth: 350Hz

Now the spindle is incredibly stiff and the only compliance is the slightly looser belt. There are no unwanted resonances or oscillations. All of the velocity surging is gone and it maintains speed within +/- 1 rpm even when simulated loads are applied (I grab the spindle nose by hand).

As a benefit, the lower belt tension reduced the running current draw down to about 0.9A after taking off motor bearing losses. This equates to a belt drive (and spindle bearing) efficiency of around 90-92%. I'm pretty pleased with that.

I also got my hands on a calibrated Fluke temp gun, so the numbers are reporting a touch higher but I trust them.

Test 7: 1750rpm
Starting Current  1.15A Significantly loosened belt
Lower Bearing Temp: 96 deg
Upper Bearing Temp: 98 deg
Case Temp: 89.8 deg
Motor Temp: 98 deg
Sound Level: 77 dBA
Adjusted belt and installed top hat. Sound is very very smooth. Total volume registers higher, but upper assembly is removed and everything sounds much better.

I intend to continue testing up to 3000 rpm this weekend as well as finish the electrical cabinet and get it installed.


----------



## macardoso

As always, everything takes longer than I planned, however I did have a very productive weekend.

I started by moving the smoothstepper from my old enclosure to the new one (thereby committing to the new panel).




I completed wiring to the 3rd smoothstepper port, added all the relays, and finished the terminal wiring. I opted to add an additional 2 relays so that the power draw bar solenoids were not powered directly from the voltage converter boards.




The extra blue cable is RS485 over Cat 5 cable for communications to the drives. I need to drill 2 new cable gland entries, and when those are done, I will pull this cable out to the computer. Hidden in shadow next to the 1606 AB power supply is a thermostat which will shutdown the drives should the temperature exceed 130*F (The limit for non-derated drive operation).




Here you can see the RS485 network between the drives. In the short term, this allows me to talk to all 6 drives through their configuration software Ultraware, but hopefully some scripting though mach will allow me to pull diagnostics and set parameters on the fly. I know the drives are capable, but just need to learn LUA. If anyone has experience with this, please message me!




And to finish off, I wired up the 50A power connector and ran hooked up 240V power. After a careful startup, the panel was live with no blown components or tripped breakers. The power supplies were adjusted to get the correct voltage under load.  It is pretty!




EDIT: I also added two new wires to the spindle drive I/O connector (bottom right, thin grey cable, blue wires zip-tied to it). These are the spindle motor encoder output which connects to the larger 2 relays and allows electronic gearing between the spindle and the Z or A axes (rigid tapping or hobbing).

EDIT: The curly Q red wire coming off of the power supply is a temporary wire that will be replaced once the timing relay arrives. This will let me power the PC even without that component.

At this point, I am going to put the electrical panel on hold until the motors are completely mounted.

I still need to correct the poor mounting hole placement for the spindle housing, hopefully that will be done tonight.


----------



## macardoso

Got the spindle mount fixed up last night.

First thing I did was tear down the existing setup. When I did, I found a substantial amount of belt dust inside the housing. I'm hoping this was from when I forgot to install the top hat and the spindle pulley worked itself loose. I cleaned it all up and I will check on it in the future. Those pulleys should be axially aligned within a few thou and completely parallel.










My design includes a felt washer that gently rubs against the top hat OD to help seal in noise. The original adhesive back didn't cut it, so I used some GOOP to glue it on.








From there I used some reamers, and endmill, and a few drills in my cordless drill to open up the mounting holes and counterbores. It isn't very pretty this way, but it will all be covered by other components. I still can only get 3 screws to go in, but at least it lines up now. I could file the other hole down the road, but it isn't needed.







From there, the upper puller plate assembly is mounted. There is only a few thou clearance around the top hat, so alignment is critical. The pneumatic cylinder is mounted on these posts.










Finally I ran the spindle at 2800 rpm (max at 120VAC) for around an hour. The bearing temp rose to around 130F. This isn't crazy but a bit higher than I was hoping for. The Kluber IsoFlex NBU 15 grease has a service temperature up to 130C (266F) and the bearings have a service temperature of 250F which is the limit for the phenolic cage. I hope to not get anywhere near this, but it does give me a hard limit.

Since I have been adjusting so many things, I'm going to hold off on the running torque/temperature measurements until the assembly is complete.

As a note, I have found that the timing belt runs the smoothest with a very low tension. As I get it tighter, the taught belt acts like a guitar string and generates significantly more noise. Unless I have issues with compliance in the spindle when stationary or with teeth jumping under high load, I will leave the belt just hand tight. It also consumes far fewer amps when a touch looser.


----------



## macardoso

Quick question... does everyone like the pictures in the posts or would pure text be preferred?


----------



## JimDawson

macardoso said:


> Quick question... does everyone like the pictures in the posts or would pure text be preferred?



We love pictures


----------



## Boswell

macardoso said:


> does everyone like the pictures in the posts or would pure text be preferred



This is a trick question, right?  

gotta have pictures!  I think that your pictures are great. The quantity and quality.  Very easy to see what you are doing and appreciate the quality of the rebuild.


----------



## macardoso

Thanks! I'll keep putting them out


----------



## ConValSam

Is there text in this thread?


----------



## macardoso

So I switched gears last night and started work on the actual machine

I started by removing the touchscreen, stepper motors, motor mounts, cables, and the old PC.   It occurred to me that this might be the last time I ever see Windows XP. Kinda a sad thought.




She looks a little naked.




Next the old electrical panel was removed by loosening the 4 studs that were attached to the sheet metal base.







Mind you that I cleaned this machine spotless and there was still a million chips hiding everywhere. I removed the fixture base plate from my table and gave it another cleaning.




I got the solenoid valve for the power drawbar in the mail from AutomationDirect. It is a 5 port, 4 way, 3 position, center exhausting valve. It uses 2 24V outputs and fits 1/4" tubing.




And here is a quick shot of the fixture base plate. It is 3/4" aluminum and has a 1" grid of 3/8-16 tapped holes and and offset 1" grid of reamed .251 dowel pin holes. I made this when I had access to a large kneemill at school and it has been one of the most useful things I've gotten for this machine. The cast iron table of the mill is getting a little stained from the coolant that pools in the holes. This used to bother me, but now that I keep this plate on the machine 100% of the time, it is no big deal. It mounts with 6-8 Tee nuts and flat head screws.




Being unsure of the alignment of the panel, mill, and steel base plate, I maneuvered the control panel around to the back of the machine and roped it in place. Holes were laid out onto the steel baseplate.

Although I have no way to actually weigh this panel, based on my CAD model and how hard it is to move, I think it weighs between 150 and 200lbs. I certainly can't lift it , but if I go slow I can "walk" it on the bottom edge to wherever I need it to go. That being said, I was soaked in sweat by the end of the night. Didn't help I went rock climbing right after work.




I reused the square aluminum tubing from the old monitor mount to hold the panel. One was screwed into the steel bottom plate (man that was hard to drill and tap), and the other screwed into the bottom of the machine column.




Cast Iron taps like butter.




And here it is mounted. I wish I would have drilled the 2 new cable glands into the panel first, but it will be fine. I got excited

The panel door should just clear the wall.




BTW, I'll be cleaning up the original CNC components and put them up for sale at a really good price. If anyone wants anything, just let me know.

Mike


----------



## Boswell

nice progress.  btw, I don't miss Windows XP at all.


----------



## spumco

Superb, thanks for sharing.

If you need any machine work while the mill is in surgery, let me know.  I'm just up the road from you in Ashtabula.  In addition to my own equipment, I have access to big stuff if you need it (60x30 cnc mills, surface grinders, and plasma tables).

-Ralph


----------



## macardoso

spumco said:


> In addition to my own equipment, I have access to big stuff if you need it



Now I am jealous   Thanks for the offer! Right now things are churning along pretty well, but if I get stuck I'll let you know.  You might be the closest geographically to me on this site that I've seen so far.


----------



## macardoso

With what I completed last night, I think I am 100% done with panel internal wiring. All that's left from the controls point of view is to hook up the proximity sensors and mount the touchscreen PC.

Here is the pendant I purchased. It is surprisingly well built. I've gotten one of these cheap ones before for a school project and it was super flimsy. I'm pretty sure I could drop this and it wouldn't be damaged.

Here is the listing (it was $49 when I bought it a month ago): https://www.ebay.com/itm/Universal-CNC-4-Axis-Pendant-MPG-Handwheel-Emergency-stop-Switch-controller-US/162243912680?ssPageName=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649

I can stand about 6' in away from the front of the machine with the included pigtail.

The blue cable is the CAT 5 RS485 network cable.




With the panel mounted, wiring is a bit of a pain but not too bad.




The flying lead end of the pendant. I landed the shield (wrapped in heatshrink and a ferrule) on the ground connector of the 3 tier terminals. Wires are pretty thin, probably 26 AWG.




Also I got the timing relay (white box, red dial).




I am concurrently working on an AutoCAD Electrical drawing package. It is very much a work in progress, but I may consider posting it for people to reference if there is interest.

EDIT: Photo Temporarily Removed

The original length was a touch short, so I stripped it back further and cleaned up with more heatshrink.




Timing relay wired to the power supply next to it. Power supply turns on, then 3 seconds later (one the output voltage is very stable) the relay turns on the voltage to one of the M12 panel connectors. The PC I'll be using had some issues with its power circuit where it wouldn't want to turn on if you plugged the power supply into the wall, but if the PS was already on and you closed a switch on the DC power, it had no issues. I'm just automating that process with the relay.




I did a quick power check to make sure the relay worked and it is done!

Next up is either mounting the servos or the PC.

-Mike


----------



## spumco

macardoso said:


> Now I am jealous   Thanks for the offer! Right now things are churning along pretty well, but if I get stuck I'll let you know.  You might be the closest geographically to me on this site that I've seen so far.



I'd be happy to help anyone who wires a panel like you do...    How do you think I got access to the 'big' equipment?  Make friends with useful people, and try hard to be useful to them.

BTW - if you run short of panel stuff give me a shout.  I've got a pile of leftovers from my last two builds scavenged from HGR-sourced enclosures.  DIN rails, control transformers, BOB's, relays, switches/buttons, terminal blocks, etc.  This stuff needs to go away before I start anything new.

-R


----------



## macardoso

Spumco, Thanks!

Its fun to see who you meet through shared interests like this. I have to stay away from HGR, it can get dangerous for a wallet there. I won't buy any small stuff anymore from them because I always make up a reason I'll use it, and then never do. But I'm super happy with the lathe I got from them.

I should be good for the time being, but I'll keep that in the back of my head!


----------



## macardoso

Didn't get a ton done last nice since I got home from the gym pretty late, but I got the panel PC mounted to the machine. I previously had an industrial monitor that was hooked up to a desktop PC on the floor. Its resistive touchscreen stopped talking with the PC at some point and it wasn't very pretty to look at.

The new unit is something we scrapped out at work thanks to someone plugging it into a 50VDC power supply (it only runs on 24VDC). I had to do some surgery and replace some fried components right off of the motherboard, but it works (and I'm kinda proud of that). This unit is an integrated display, capacitive touchscreen computer running Windows 10. It isn't crazy powerful so I'm keeping my fingers crossed that it is enough to run Mach 4. If not I'll work something else out. It has a quad core Intel Atom E3845 CPU (1.91 GHz), 4 GB of RAM and a 128 GB solid-state drive.



The computer is mounted on a $10 vesa monitor mount. Its a touch flimsy, but it seems to do the job. The mount was bolted straight to the column.




It's alive!




Watching some This Old Tony.




I keep my keyboard and mouse on a tool cart along with my tool holder rack (put away at the moment), and Tormach presetting surface plate. I pressed magnets into the side of the cart to hold my prints while I'm working. The cart was a Christmas preset from my fiancee along with the stool. She knows what to get me 




And the whole basement setup. Its pretty messy thanks to this conversion work. I'm normally a neat freak about the shop. That is an ATC prototype on the floor...




Waiting for the yellow and red buttons to come in from ebay. This will be my operator station.




mMmmmmmm servo cables!




Servo motors for the axes! The two small ones are .75kW (1HP) and the big one on the right is 1.8kW (2.4HP) same as the spindle. This will be for the Z axis. On the left is a .75kW motor mounted to an Alpha Wittenstein SP+ gearbox. It is 11:1 and moves pretty quick!




Close up. This will be for a 4th axis that I'll get to building once the rest of the machine is done.




I'll be using this 8x8x8 ground angle plate for the base of the 4th axis. Imagine a large hole bored clean through the face of the plate to receive the gearbox.




And all the motors hooked up. I'll be testing like this for a long time until I feel comfortable about mounting the motors. At first I plan on torque limiting these guys to what my steppers could do (~425 oz-in). This way a crash won't damage the machine. Eventually I'll open up the limits to get some crazy accelerations.




I have a Mach 3 setup that I have used to test all this in the past and I used it to quickly verify some signals, the mpg, and jog the motors. There are a few issues that might exist, but nothing too big of a deal.




My plan for the weekend is to re-image the PC, install Mach 4, Putty (terminal emulator for RS485 testing), Ultraware (drives cfg.), and the ESS configuration. I want to get all the I/O checked out and working, and get the motors tuned. I may start some installation of the motor mounts and home/limit switches.


----------



## spumco

Holy Moley, that's a big harmonic drive.

You and I seem to be channeling each other...

[slight thread hijack]


----------



## macardoso

Nice setup for the 4th axis!  My gearbox is a low backlash planetary gearbox. Not as ideal as a harmonic drive, but it does have a massive crossed roller output bearing on the face that I hope will handle the loads. I figure this has to be better than a rotary table setup.


----------



## macardoso

I don't have as many pictures as I'd like to share, but our furnace went out this weekend so any time I spent in the shop was not focused on taking a million pictures. The bedrooms got into the low 50's and the basement into the mid 40's (it is low 20's outside). Not terrible, but much less than ideal.

I re-imaged the computer back to a bare Win 10 machine. From there I installed Mach 4 and configured it for use with the Ethernet smoothstepper. I am very impressed with the menus in Mach 4. They seem to be laid out intuitively rather than the haphazard placement of settings in Mach 3. I did identify a few potential wiring errors on the I/O during some initial testing that I need to dig deeper into, however as it stands right now, each drive correctly receives the control input pins, as well as an enable signal. Each drive also sends back a fault signal and the encoder index output. This output gives actual speed feedback to mach for the spindle (pretty cool) as well as enables home to switch then to encoder marker which is more accurate than the switch alone. All the limit/home switches work properly, the ESTOP is working, and the pendant MPG is reading into Mach (although it seems to count by 4's?). I know that my "operator station" input (start, hold, and stop buttons) seems to only have the start button operational at the moment, and the pendant resolution selector switch seems to have the X10 and X100 inputs stuck on. I have not tested any of the outputs including the electronic gearing relays, the relay outputs for the 120V outlets on the side of the panel, or the power drawbar solenoid outputs. The panel internal outputs such as the drive enable and fault reset pins work perfectly.

I loaded Putty, a free terminal emulator, onto the computer as well as my laptop, and after an hour of fiddling with it, got the two PCs talking to each other over RS485. From there I connected the computer to the drives, but when I tried to connect, Ultraware (Allen Bradley utility for servo drive configuration) would just freeze up.  It took me a little while to realize that every drive had its network node address set to node 0. When Ultraware tried to talk to the X axis drive, they would all answer at the same time. I had to power each one on, one at a time, to set them to different node addresses. Now whenever I open Ultraware it automatically connects to each drive that is powered on. This is hugely helpful for troubleshooting since every piece of data from the drives is exposed for monitoring and adjustment. Since I got the network working I have not had a single issue with it. If I can figure out Mach 4 LUA then I feel very confident that the networking of the drives will be very reliable.

I tested some jogging with Mach 4 and found it to be a bit unresponsive to keyboard inputs compared to Mach 3. There was a barely noticeable delay when starting and stopping a jog compared to the key press. It probably doesn't matter, but coming from industry it makes me a little uncomfortable when you can "feel" the software between you and the machine. My other, much more major, issue with Mach 4 is that it hangs after 3-5 minutes of running code. This is the demo version right now, but it is not the timeout (I have seen the timeout message and know what it looks like).  The machine will be running and BANG, all the servos stop dead but remain enabled. The software ESTOP does not shut them down (thankfully I also have a hardware ESTOP to kill drive power). The Mach 4 greys out and the cursor is the blue Win 10 waiting circle. This happens repeatably both running Artsoft sample GCode as well as a program I used to machine the spindle housing. The program never recovers and has to be closed with task manager. The Smoothstepper remains waiting for Mach signals and won't reconnect when Mach opens leading to me having to power cycle the machine.

At first I thought that this was due to an underpowered computer. The VersaView 5400 computer that is on the machine runs on a 4 core Intel Atom E3845 chipset @ 1.90GHz. It has 4.0Gb of memory and runs Win 10. This is very much on the bottom edge of the system performance requirements for Mach 4 (especially the memory), but there are posts in MachSupport about people not having issues running mach on much less powerful computers without issues. During loading of Mach 4 the CPU is between 70-80%, at idle it is 30-40%, when loading a Gcode program 70-80% and while running the machine it holds quite steady at the mid 60's%. The memory utilization never got above 2.0Gb (50%). This all seems like the computer was doing just fine, but I was convinced that this computer just didn't have the guts to run Mach 4.

To test the situation, I installed the same version of Mach 4 and ESS utilities onto my laptop (Intel i7 6700HQ 3.5GHz, 32Gb of memory, Win 10). I copied the configuration file from the CNC computer to my laptop and connected to the smoothstepper without issues. I ran the same test files and sure enough, Mach 4 crashed about 5 minutes into the code same as the other computer. I tried this several more times and had the same results. I then tried running the machine from Mach 3 on my laptop and it finished the 2 hour and 20 minute program with no issue whatsoever.

I am posting some questions about this on the Mach support forum, but if anyone here has experience with Mach 4 I'd appreciate any input.  My next test will be to install Mach 3 on the VersaView computer and try running the machine that way. I know that the programs are very different, but if the computer fails to work with Mach 3 then I would believe it to be underpowered.

Here are some Mach 4 screenshots. Not super interesting, but hey, it's all I have.



















Pink wanted to know why I was in the shop rather than in bed with the electric blanket!




Zoey needed to investigate as well.


----------



## macardoso

So I was able to confirm that the crashing program is just what it looks like when the demo times out. 

I do appreciate how friendly this forum is. I got a nasty comment on another forum that I was complaining about the demo software without being a paying customer (yet) when I was just trying to understand a small issue I was having. I haven't had a single unfriendly interaction on this site and I really appreciate that!

Update coming soon.


----------



## JimDawson

macardoso said:


> I haven't had a single unfriendly interaction on this site and I really appreciate that!



Well, we are the Friendly Machinist Forum.   Looking good so far.


----------



## macardoso

Thanks Jim!

Since it seems like Mach 4 is up and running, I am switching gears back to the hardware side of this build.

First off, I got the matching buttons for my operator button station. I have labels for each of these. They are the Allen Bradley 800FP series of operators (22mm). The plastic ones, while plenty sturdy, feel a little cheap. There are metal versions of these but I couldn't find any cheaply on ebay. The back side of the button is modular to select which contacts you want as well as lamps if the button is illuminated. Top hole is for an ESTOP which is temporarily setup elsewhere.

Edit: I guess cheap feeling is relative. They are super nice compared to most operators you get from automation direct or hobby grade stuff, but are a long shot from the mil-spec buttons and knobs I work with day to day.




Thanks to the folding mount, the computer tucks neatly behind the machine for cleaning.  The mount is already getting bent, so I am looking for something a little more sturdy.




Loosening 4 bolts removes the top bearing plate from the Z axis.




From there the 50lb gas strut can be disconnected.




The gib can be knocked loose. Note that all sides are flat (no milled pockets). The way facing side is ground and flaked, the opposite side is just ground. The spare gib just looks rough machined, not ground or flaked. That being said these things bend like a noodle so I'm not sure how much value comes from grinding.




And the Z axis slide completely removed.




The way cover is completely shot and I got a replacement from Grizzly for $22.




I used some Dykem Hi-Spot blue to see how bad the gib was (hint: terrible). I don't have a great way to spread the ink so I use a tightly balled paper towel.  I feel like half the ink sticks to the towel, but a tube is cheap.




I covered the edge which was rubbing on the flat way with steel blue and ground it on my bench grinder until the ink was cleaned up. I was fairly conservative with material removal so I may need to take a few more passes later on. Dummy here didn't cover the surface plate with a sheet so all the exhaust and grinding dust landed on the Hi-spot blue and stuck. I can be a little dense sometimes.  I will completely cover the plate in the future. 




The first spotting of the gib shows very little contact.  I was able to bend it a little straighter by hand and get better contact along the length. I ground the end of a file with a slight rake and a wide radius and used it as a make shift scraper. I'm sure it doesn't work anywhere near as well as a real one, but I'm able to remove a touch of material.  I'm not trying to scrape this into perfection (nor am I really sure how), but I'd like to get a touch more contact than it has. This is my first attempt at any kind of scraping. 

Question: I've seen Sandvik, Biax, and Anderson scrapers for sale but they are large and fairly expensive. Are there any smaller sub-$100 scrapers for things like gibs and touchups that you could recommend. Maybe one day I'll take the leap and get all the scraping essentials, but for now having something to do some touchup would be great.

After a little file scraping and stoning I am getting better contact (not shown by the blue currently, I already wiped half of it off). This is the replacement Z axis gib. Note that it comes in very long and is a cut-to-length kind of deal.


----------



## macardoso

Only spent an hour last night on the gib and Z axis slide.

An initial (and excessively heavy) bluing of the slide shows the contact. Its honestly not terrible, but the heavy blue was hiding some very tall high spots.




After 5 to 6 cycles of scraping.  Removing material with a file/scraper is really slow going.  I'm going to do just a touch more and call it good.  I can revisit later if I want to actually learn to scrape. I would rather not ruin this due to lack of knowledge.


----------



## macardoso

I spent one more hour doing a touch up job of scraping on the Z Axis slide. It obviously isn't perfect, but it is better than when I started. If I decide to take the leap into actual scraping, I will come back to this project. At the the contact points extend to nearly the full length of the slide now.

First pass:




Halfway Through:




After last pass:




I also went to refit the gib into the way but found that even a little work removing high spots caused the gib to seat much lower in the way, beyond the range of the adjustment screws. I had purchased a spare gib from Grizzly but there is a section right in the middle of the way side of the gib that was dished out during machining and never got touched by the grinder.  I'm going to call and see if I can get a replacement...




For the time being, I reinstalled the Z axis slide using some shim stock behind the gib. I got this part done and then had to go back because I forgot the 3 bolts to mount the spindle. Later I found I also forgot the new way cover so I have to disassemble again. Ugh.




Fit of the gib is MUCH better after grinding it.  That gap is smaller than it looks in the picture. Maybe somewhere between .030 and .060. My way oil actually sticks on the ways now which is nice.




Next up is the Z axis servo mount. It is a roughly 3.5" cube that was machined from billet maybe 75% on the lathe and 25% on the CNC.




Original billet made 3 mounts plus some leftover. 4x4x18" 6061. Parted off on the lathe.







Mounted to the Z axis bearing plate.




The servo mounts to the shaft with a zero backlash jaw coupling. These run pretty smooth at high speeds compared to some other types.




And the beauty shot with the servo attached. Cables route down the back of the column. It is a little tall but no issue. I'm hopeful that the direct drive makes the servo setup more reliable and easier to tune.




I still have to go back and put the way cover on, add the cable chain for the spindle, and shim the gib a little more.  I also want a new monitor mount.


----------



## ConValSam

More 5 star work: looking great.

Did the Z axis feel smoother after your scraping efforts?


----------



## macardoso

Thanks!  The biggest thing that I notice between grinding the gib, and scraping the gib and slide is that everything fits better together. The gib seats firmly and I can still slide the axis with moderate ease even though it is a lot tighter. The motion feels more fluid without feeling like parts are scraping together.  The oil actually stays on the way where before it would run between the ways and the slide and just fall off the column.

I would say it was worthwhile, but I certainly didn't do a full scraping job where the parts ride on an oil film.


----------



## Fang

I wonder what is the total price of this CNC AC servo rebuild?


----------



## macardoso

Fang, much of what I have built has been acquired from various places and not purchased new. If everything was bought new, this panel would be prohibitively expensive. I have been very fortunate to be able to use some extra parts from work (with permission of course).

I'm sure I've forgotten lots of things but here is a ballpark of parts that I needed to buy:

Enclosure (24x36x8) - $100
Automation Direct (solenoid, M12 ports, disconnect, misc. components) - $200-250
ebay odds and ends (voltage converter boards, pushbuttons, RS485 converter, monitor mounts etc.) - $400 (This is a huge guess)
Missing cables for servos: $400
Raw Aluminum Stock for motor mounts: $120
SDP-SI (pulleys and belts, including scrap): $150
Assorted McMaster Carr (bolts, gaskets, etc.): $300
Replacement bearings, VXB: $120
MPG, ebay: $50
Mach 4: $200
2 years of having fun building this: Priceless  
Honestly I keep the monthly shop purchases within budget and I try not to stress over the cost of an individual project. I think of my shop like a monthly "fun" membership. I certainly could be doing much worse things with my money.

In addition, I was able to use the Smoothstepper from the previous version of this build (came in around $1200 for the panel and electronics if I remember). I have more than paid off the machine + CNC conversion with customer projects, and I intend to do that again. I love doing customer projects, especially when I get to be invested in the creation and design of their ideas. I just never want the hobby to feel like a job, so I am selective on what kinds of work I am willing to do.


----------



## Fang

Thank you.

Sent from my SM-G610F using Tapatalk


----------



## BGHansen

macardoso said:


> Fang, much of what I have built has been acquired from various places and not purchased new. If everything was bought new, this panel would be prohibitively expensive. I have been very fortunate to be able to use some extra parts from work (with permission of course).
> 
> I'm sure I've forgotten lots of things but here is a ballpark of parts that I needed to buy:
> 
> Enclosure (24x36x8) - $100
> Automation Direct (solenoid, M12 ports, disconnect, misc. components) - $200-250
> ebay odds and ends (voltage converter boards, pushbuttons, RS485 converter, monitor mounts etc.) - $400 (This is a huge guess)
> Missing cables for servos: $400
> Raw Aluminum Stock for motor mounts: $120
> SDP-SI (pulleys and belts, including scrap): $150
> Assorted McMaster Carr (bolts, gaskets, etc.): $300
> Replacement bearings, VXB: $120
> MPG, ebay: $50
> Mach 4: $200
> 2 years of having fun building this: Priceless
> Honestly I keep the monthly shop purchases within budget and I try not to stress over the cost of an individual project. I think of my shop like a monthly "fun" membership. I certainly could be doing much worse things with my money.
> 
> In addition, I was able to use the Smoothstepper from the previous version of this build (came in around $1200 for the panel and electronics if I remember). I have more than paid off the machine + CNC conversion with customer projects, and I intend to do that again. I love doing customer projects, especially when I get to be invested in the creation and design of their ideas. I just never want the hobby to feel like a job, so I am selective on what kinds of work I am willing to do.


I wonder if anyone has posted a "total" for a conversion for a G0704 machine from scratch (or others)?  I subscribe to Home Shop Machinist and was sent a complementary copy of Digital Machinist.  I haven't priced it on his web site, but there's an ad in there for www.cnc-minimill.com that sounds decent.  It's a conversion kit for the G8689, HF 44991, Little Machine Shop #3960, MicroLux# 84630 and others.

I'm still deciding on my upgrade for a Series 1 BP with a 1983 Anilam 2-axis.  Leaning now toward a Centroid Acorn controller ($300) which will also need a Windows 10 touchscreen computer (~$400).  I'm going with either ClearPath or DMM 750W servos.  DMM has a running ad on eBay for 3 750W plus power supply and drivers for $1150.  I already have the ball screws on the table, but need to either drive the knee or convert the quill.  I figure I'll have at least $3000 into the conversion.

Bruce


----------



## macardoso

I can go back to mine and look at the initial conversion costs. Servos add a fair deal of expense to the project but your budget doesn't sound too far off.   That would be a very nice machine!


----------



## macardoso

OK. Been a little while since an update so here is where we are.  I've spent probably a dozen hours over the last week working on an AutoCAD Electrical set of drawings for the control panel. I originally hand drew these, but so much has changed in the panel since those were done that I needed to make a new set.  They still need a lot of work, but have most of the information I need to troubleshoot the system right now. 

I disassembled the Z axis again to fit the way cover. I returned the new gibs that I received defective for replacement, so I'm stuck with what is on the machine right now. 



I ran into a serious issue where my Ethernet Smoothstepper lost its configuration and wouldn't respond to mach. I wasted a number of days on this but after a support call with Warp 9 Technology, it was resolved. They couldn't identify why the board lost its IP address, but the utility to reprogram it was being blocked by the windows firewall. The support from those guys is top notch.

I started to run the Z axis servo, first using Ultraware (Allen Bradley Servo Utility) and then Mach 4 once the ESS was up and running again. This thing is a beast!. I ran it slowly for a long time, but finally cranked it up to 1000ipm (5000rpm). It is loud, but the sound is normal for a ballnut with a return channel. That is about 95% of the noise. I have a few videos I will attempt to post below.

I also got a new monitor mount in. UPS may have played soccer with the box because this is how I found it:



The new mount is super heavy duty. It is rated for 70lbs but only cost $20 (plus it came with a pretty nice HDMI cable). Here it is next to the old mount.




The extra extension length of the mount gives me some flexibility in where the computer can be positioned and tilted. 




And it has some nice cable routing provisions.




I will try to add videos below.  Next step is teardown and assembly of the X and Y axis servos.


----------



## macardoso

This was a test using Ultraware to drive the motor on an indexing pattern at 2000rpm (400ipm). Accelerations are set way low but still pretty impressive.
View attachment IMG_4127.MOV


----------



## macardoso

Ultraware indexing again at 1000ipm. This is the top rapid I could possibly get on this machine with this setup. I doubt I'll run it flat out like this very often. No real reason to.

View attachment IMG_4129.MOV


----------



## macardoso

This was the first real test running the motor from Mach 4.  There is no discernible difference between the command coming from serial (Ultraware) and Step/Dir (Mach 4).  I'm very pleased.

View attachment IMG_4139.MOV


----------



## macardoso

Update time!

I had been holding off on working on the Y axis because I wasn't sure if I had all the hardware I needed. I first removed the table and saddle to clean them thoroughly. The X axis ballscrew was fairly clean and was wiped down with WD40. The Y axis screw due to the way it is mounted could not be removed from the casting without taking the ballnut off the screw, so I cleaned it in place by dripping WD40 on it while running the screw with a cordless drill. Due to the location of the screw, it tends to pick up chips and dirt. 







I didn't have the M6x1 - 60mm screws that I needed to attach the motor mount to the casting, but I was lucky to happen across a few at work. I packed the ballscrew end support bearings with the Kluber Iso Flex NBU 15 grease just like the spindle and pressed them into the Y axis motor mount housing.

The left one is the Y axis mount, one of the more difficult parts I have made. The right one is the X axis motor mount.













I also opted to drop the spindle for a preload adjustment. I was dreading this, but I found it to be very easy. The spline keys had been tapped 4-40 on the ends which made removal a breeze.

The spindle was carefully held in the lathe so I could loosen the adjuster nut. There were pads on each jaw.




Not over greased. Looking good




I marked the keys to help with reassembly. This is all hand fitted, so it has to go back together the way it was.




The spindle is not noticeably looser, but the nut was definitely less tight than before. Hoping this will get the spindle to run a little cooler.


----------



## macardoso

A short section of IGUS cable chain was installed on the Z axis. This loops up and over the gas spring and will carry the servo cables, the PDB release pushbutton cable, and the two air lines for the air cylinder.




I mounted the solenoid valve to two existing 1/4-20 holes in the lower section of the column from the first monitor. A simple adapter plate lifts the solenoid and allows for cable routing beneath.







Continuing... Here was the hard to find bolt. Once again, working from a 3D model bit me and the Y axis mount didn't line up with the holes in the casting. Fortunately it was close enough that I could open them up with a drill.




Here it is mounted.




I forgot the order of assembly, so it had to come right off. The saddle was installed then the mount attached. The ballscrew was adjusted so it ran true to the axis of motion. A light preload was applied with jam nuts inside the motor mount.




Difficult to see, a zero backlash jaw coupling. Normal Lovejoy coupling have too much slop for this kind of application.


----------



## macardoso

From here I focused on the electrical panel. I was having issues with a number of inputs on the 3rd port of the SmoothStepper.  Turns out that since I wasn't using a premade breakout board, I had to deal directly with the circuit interface on the ESS. The bi-directional input pins have weak pulldown resistors that make it easy to interface with my 5VDC HIGH logic level. Unfortunately, the dedicated input pins have weak pull UP resistors that meant that my inputs would always be on.  

This was solved by adding 220 ohm resistors to DC COM on each of the dedicated input pins.  I have now verified all the inputs and just about all the outputs. Those are the black heat shrink components on the screw terminals.




Kate needed to see what was going on. We have 3 kittens we brought in from the street. They are very sweet.




I installed the Y-- limit/home sensor. This will be covered by a sheet metal cover once this is all done.










I will post video soon. The Y axis has been tested and runs very nicely at 1000ipm (5k rpm). It isn't as loud as the Z.  I have soft limits working great in Mach 4.  Next steps are to mount the Y++ limit, Z++ limit, assemble the X axis, and start working on Mach 4 scripts.  This is fun

Mike


----------



## macardoso

1000ipm rapids for the full travel of the Y axis


View attachment IMG_4182.MOV


----------



## macardoso

Short moves showing accelerations. The servo is torque limited to 70% of continuous torque, but can go as high as 280% for brief periods of accelerations. These accelerations are pulling 40-50% of continuous torque, so I have a lot of headroom to get the accelerations increased if desired.

View attachment IMG_4183.MOV


----------



## macardoso

And a silly clip showing the homing/limit sensor

View attachment IMG_4202.MOV


----------



## spumco

That _has_ to be the only G0704 conversion with four (!) Allen Bradley servos.  I'm thinking you've got about 3 cnc'd mills worth of servos & drives (at retail price).

If someone makes a comment about lipstick and pigs, just grin.  Well done sir.


----------



## macardoso

spumco said:


> If someone makes a comment about lipstick and pigs, just grin. Well done sir.



It is a pretty shade of lipstick if I do say so myself 

I totally know this is overkill, but I had the controls, and this is the machine I had to put them on. I'm having fun!


----------



## macardoso

Started tonight off by modifying the default Mach 4 diagnostics window to match the inputs and outputs on my machine. All the signals for a 3 axis configuration are shown. The 4th and 5th axes would be visible in a different mach profile.




Anything in RED is able to emergency stop the machine. This would be either the main or MPG estops, a failure or overload of either DC supply, the main contactor becoming de-energized (thereby powering down the drives), a high cabinet temperature alarm, or a fault on any active servo drive (which would end up messing up the part).

This works great and I was able to verify all inputs.

I started playing around with the soft limits and jogging and got repeated E21 (Aux Encoder Fault) on my X axis servo drive. This fault indicates a faulty signal transition on the Step/Dir input to the drive. Since this motor was not running, I immediately knew it was noise.

I set up my Fluke Scopemeter to measure the step and direction lines. I use the meter for work occasionally. Once the system is powered up and the axes enabled, I get an induced 16kHz pattern on both Step and Direction wires. 16kHz is the PWM carrier frequency for the servo drives. 




The peak to peak voltage varied, but reached as high as 1.8V. This was symmetrical about the 0V rail, so I was getting around 0.9V at the input. This cuts into the OFF noise margin which is around 1.3V. I'm sure individual spikes rose above 1.3V.  This is not high enough to trigger a step, but is high enough (and more importantly brief enough) for the drive to recognize and to generate a fault.

Here is a better view of the noise pattern. This is very typical of drives.




I started to troubleshoot and found that the noise diminished nearly to zero once the spindle drive was shut down. Doing some E-Field sniffing with the scope probe suggested localized EMI near the Spindle drive and the Y axis Drive motor output. I was not very knowledgeable about designing for the control of EMI when I started this panel a year and a half ago, so I will take some measures to ensure solid grounding and bonding of the drives. If that doesn't work, I have LOTS of tricks up my sleeve to get this issue resolved.

For fun, here is a view of the real step and direction signals going to the X axis motor. Note that the negative voltage spike on the falling edge of the step is most likely an artifact caused by the long test wires going to my scope.




Not a ton of room to work back there...


----------



## macardoso

No pictures today. Sorry 

I spent an hour rerouting the grounds and installing a few extra ground wires. The measured signal that was induced on the 5V wire dropped by 40-50% so the average peak is somewhere around 0.4-0.7V 0-pk. This is plenty safe for the noise margins on the input of the drive and after 2 hours of idling while enabled, no faults occurred and no stray steps were received by any drive. I still want to get this thing a little better, but it is good enough right now.

I'll be spending the weekend wedding planning, but I am hoping to have time to mount the two remaining limit switches and get the X axis installed.


----------



## shooter123456

BGHansen said:


> I wonder if anyone has posted a "total" for a conversion for a G0704 machine from scratch (or others)?  I subscribe to Home Shop Machinist and was sent a complementary copy of Digital Machinist.  I haven't priced it on his web site, but there's an ad in there for www.cnc-minimill.com that sounds decent.  It's a conversion kit for the G8689, HF 44991, Little Machine Shop #3960, MicroLux# 84630 and others.
> 
> I'm still deciding on my upgrade for a Series 1 BP with a 1983 Anilam 2-axis.  Leaning now toward a Centroid Acorn controller ($300) which will also need a Windows 10 touchscreen computer (~$400).  I'm going with either ClearPath or DMM 750W servos.  DMM has a running ad on eBay for 3 750W plus power supply and drivers for $1150.  I already have the ball screws on the table, but need to either drive the knee or convert the quill.  I figure I'll have at least $3000 into the conversion.
> 
> Bruce


I have posted running totals a few times for my PM-25.  Very similar machine to the G0704, just a few subtle differences.  The basic stepper set up was $2271 with the mill, ballscrews, vice, electronics, etc included.  A slightly better upgrade with ClearPath servos, a spindle servo (at a criminal price), enclosure, power draw bar, ATC, and tool holders comes in around $3953.


----------



## macardoso

Certainly not a cheap hobby  

Didn't get a ton of time this weekend to make progress on stuff, but I did finish the grounding and bonding work I was hoping to do.

In addition to making sure the grounding was as solid as it could be, I wanted to better the bond from the case of each drive to ground (in case the aluminum subpanel and rivet nuts were not conducting through the oxide layer as well as I would like). I made up a set of braided copper bonding straps (bonding requires high surface area) to jump from drive to drive and finally back to the main grounding blocks.




The bonding straps attach to the motor power clamp which is were the HF noise from the motor cable comes back.




And daisy chains across the lower 3 drives. This whole process took 4 hours to disconnect the cables, unmount the drives, attach the straps, and hook everything back up. The lower 3 weren't so bad since I could rest them on the lip of the enclosure, but the upper 3 had to be hung from wires on the ceiling while I worked on them. I wish I would have done this when the enclosure was flat on the floor not mounted to the machine. But whatever, back is just a bit sore.







The middle drive is currently a spare, so there is no motor power or feedback cable attached.







All buttoned back up.




After all this work, the noise level was barely reduced. This doesn't mean that the work on bonding the drive was useless (and it will probably help with the noise generated by higher currents during accel and decel), but rather that the drive to subpanel bond was sufficient and the noise is being radiated from inside the drive or somewhere else.  

The signal levels remain in the 0.5-0.6V 0-pk which leaves a healthy noise margin below the 1.3V limit. I think I'm going to call it good enough at the moment, but if issues remain, I can do the following:

Install ferrite beads on the signal wires (max step frequency is 340kHz so 1MHz beads would be pretty good)
Install copper shield braid over the shielded signal cables. This could be bonded to the subpanel
Install separator plates inside the wire ducts
Cut all the servo cables to length. The spindle cables are 90' long, but I have avoided cutting them due to the fact that I paid a lot for them


----------



## macardoso

With all the drives running happily, I switched back to the machine build and Mach 4.  

I wanted to break the ice with LUA scripting in MAch 4 so I found a nice example of how to accomplish a timer and used it to get my power drawbar working.

There will be a nice faceplate on the machine when I get it running (first project!), but for now the drawbar pushbutton hangs out of the front. It is an Allen Bradley 800FP series flush operator with N.O. contacts




The PDB is mounted and air tight, but the drawbar needs a simple operation of the lathe and the beville spring washers installed. I want to make sure the cylinder works 100% before I do this last step.




Side view showing the routed pneumatic hoses and AC servo connectors. The servo cables need to be routed still.




Here is the solenoid hooked up. Again it is a 5 port, 4 way, 3 position, center exhausting valve. What this means is that the air cylinder can be driven both in and out, but when neither valve is energized the cylinder vents to the atmosphere and remains depressurized.




Cables will tuck behind the mounting plate. A little organization is needed.




M12 cable attached to the output port. Second order of business once this machine is up and running will be to route out some label tags.




Now for the code:

In the Mach 4 screen load LUA script, I added the following code:

--------------------------------------
-- PDB Timer Code --
--------------------------------------

PDBTimerPanel = wx.wxPanel (wx.Null, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize )
--This line creates a Window which has properties exposed to Win10. This window will not appear on screen, but the Windows event will be tied to it.

PDBTimer = wx.wxTimer(PDBTimerPanel)
--This line creates the actual timer 'PDBTimer' which will be referenced throughout the code
PDBTimerPanel:Connect(wx.wxEVT_TIMER,
    function(event)
        local PDBRetract, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2) -- Is mapped to ESS PDB Retract

        mc.mcSignalSetState(PDBRetract, 0)
        mc.mcCntlSetLastError(inst, "PDB Retracted")
        PDBTimer:Stop()

    end)

This creates a hidden "Window" which is a Windows object. Once this is made, you can take advantage of the Windows event timer to create a delay which does not use any processor time to track. Once the timer expires, the code inside the function(event) will be run. This code writes to the PDB retract output to shut it off, displays a message at the bottom of the control, and kills the timer so it doesn't continue to loop.

In the Signals LUA script, I added the following code:

---------------------------------------------------------------
-- Power Drawbar Pushbutton
---------------------------------------------------------------
if (sig == mc.ISIG_INPUT3) and (state == 1) then
    local PDBExtend, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
    mc.mcSignalSetState(PDBExtend, 1)
    mc.mcCntlSetLastError(inst, "PDB Retracted")
end

if (sig == mc.ISIG_INPUT3) and (state == 0) then
    local PDBExtend, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT0)
    local PDBRetract, rc = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT2)
    mc.mcSignalSetState(PDBExtend, 0)
    mc.mcSignalSetState(PDBRetract, 1)
    PDBTimer:Start(500)
    mc.mcCntlSetLastError(inst, "PDB Timer Started")
end

Whenever any change in signal state is detected by Mach 4, the signal script runs. By checking which signal was changed, you can execute particular chunks of code. In this case, if the changed signal was the PDB pushbutton AND the pushbutton is active, set the output PDB Extend HIGH. This energizes the "A" side of the solenoid and extends the cylinder. If the changed signal was the PDB pushbutton AND the pushbutton is not active, then the extend output is turned off, the retract output is turned on, and the timer created above is started (with an expiration time of 500ms). This causes the cylinder to retract, and that output will shut off and depressurize the cylinder 500ms later.

It is a little more complicated that the PLC stuff I normally use, but not too bad.

Finally I made a simple sheet metal bracket that will trigger the Y++ limit switch.




Poor lighting, but the switch will mount on the base casting and trigger when the folded flag gets close by.








Sorry about all the dark photos, I had already turned most of the lights off and forgot to take pictures.


----------



## macardoso

So I've been pretty busy over the past week with this machine but didn't get quite as many pictures as I would have liked.

I finished mounting the Y axis limit sensors. Giving room for soft limits and the homing marker back off, I end up with around 5.90 inches of travel (This can be frustratingly small) with an absolute maximum of 6.1 inches. I could probably get another 3/8" past that if I remove the Y axis chip cover, but I really don't care to do that. Gotta live with the machine you have or buy a bigger one...

The aluminum flag doubles as a limit switch contact and a mount for the X axis limit cables (which are wrapped in unshrunk heat shrink for protection).




The X axis table was mounted and the limit switches tuck neatly under the table. The end caps of the table trigger the sensors.




The X axis servo is mounted. Working from a CAD model bit me again and the clearance hole in the aluminum mount wasn't large enough to pass the end plate bearing block. That is probably my biggest lesson learned on this project. I set it up on my lathe and bored a couple thou off of the diameter to make the fit better. Fortunately the bolt holes were dead on.

The zip ties are temporary until I can figure out the best way to route the servo cables.




I currently have the X axis cables running down the side of the column with the connectors to the rear of the machine. This actually works decently well, but does tend to stretch the cables in front of the PC when the table is at the X-- limit and bends the cables too tightly against the base at the X++ limit. I would be VERY interested to hear any thoughts on better cable routing. Having the motor rotated so the connectors are towards the floor is worse as the cables hit the chip tray and severely limit travel.




Shot of both the X and Y axes. Accounting for soft limits and marker homing, I have 17.75" of useable travel in the X axis. Not bad!




No pictures yet, but I machined the drawbar collar down on the lathe to accept the stack of beville washers. This was then assembled on the machine's spindle. At first I had too many springs and the drawbar did not reach the collet with more than 1-2 threads engaged. I machined off a little more of the collar (probably at the minimum thickness now) and removed 2 springs. I have maybe 8-12 threads engaged and the drawbar actually works! I can get the tool quite tight in there (although probably not as tight as I would wrench it shut before) and the tool releases down to about 90psi. As it is assembled right now (without the 2 springs) the standoffs are about 3/8 of an inch too tall to reach the drawbar when the cylinder fires so I was testing using a piece of scrap metal in there. Once I decide on the final number of springs I will recut these to the correct length.

I noticed that adjusting the tightness of the top hat (the steel piece on top of the spindle) significantly changed how stiff the spindle is. I'm 99% sure that the length of the threaded section is too long and rather than the spindle bottoming out on the internal shoulder as it is supposed to, it is applying all the force through the pulley and into the upper two deep groove ball bearings (axial load). This is not the design intent, so I will remove the tophat and slowly work the length of the threaded section down until it bottoms out on the spindle and still maintains contact with the pulley. There is no good way for me to measure how much is needed, but it is small so I will work carefully. This way I can fully tighten the tophat without loading the spindle bearings.

I am devoting a fair bit of time to scripting in Mach 4 and will post working code as I go. My current scripts are:

Power drawbar control (working, but needs interlocks)
MPG pendant interface (in progress... Mostly done but mach is not moving with MPG yet)
Start, Hold, and Stop button interface (in progress, not finished)
Independent spindle enable (allows me to free the tool to rotate and inspect corners, not done)
Spindle orient (rotates the pin wrench hole to the front, unnecessary and not done)
Serial communications to drive (doing research, going to be hard, but will unlock a TON of features of the servos)
I also have the homing for X and Y complete. The machine homes to the switches, backs off until finding the encoder marker pulse and defines home. I need to set up indicators, but this repeats to the .0001 mark on the Mach 4 DRO.

Edit: Figured I'd also mention that I tuned the X axis servo and have it running up to 1000ipm. This is by far the smoothest of the 3 axes probably due to the double end supports on the screw. I am very happy with the performance.

Grizzly is shipping me replacement gibs for the defective ones they sent the first time. I plan to scrape (to the best of my ability) these gibs flat then cut them to length and replace the ones on the machine right now.


----------



## macardoso

The machine is now as good or even better then when I started this upgrade. I am going to hold off on actual machining for a little bit, but if I need to use it, it is ready to go!


----------



## macardoso

Pendant is working!!! I haven't had a chance to use it in practice obviously, but I expect it will be in my top 3 favorite changes to this machine.

I won't bother to recreate the instructions, Andy at Warp9TD did a great job here. The things that tripped me up were the counts per detent = 4, and I incorrectly mapped the MPG to ESS Encoder 0 instead of Encoder Aux 0.

Following the instructions, I set the velocity and acceleration to 100%. This nearly shook the paint off of the walls when jogging in .01 steps due to the outrageous acceleration on these servos. I found 10% acceleration was snappy but much smoother, I might even go less. There is a small but still noticeable delay (might only be a few dozen milliseconds) from the click of the MPG to motion on the axis. I don't find it annoying, but it is present. My step settings are .0001, .001, and .01 which corresponds to (very roughly) 1, 10, and 100ipm respectively when the wheel is spun at a quick clip

In the 3 axis mach profile, I will map the 4th axis on the pendant to the spindle. In my 4 axis profile, it will jog the rotary table.


----------



## macardoso

Hi all, been a little while since an update, but I think the machine is mechanically 100% done. There are still a few code changes and features I want to work on, but it all seems to be working great. I ran my first part since the update last night and it FLEW. Super excited. Here is the progression to where I am today:

Cables were carefully routed up the side of the machine and the back of the column. I decided to use the bottom of the machine cabinet as storage for the extra cable length of the spindle and Y axis motor cables. The yellow cables are M12 cordsets that connect to the PDB push button, solenoids, and the PC (power). The blue cables are Ethernet to the Smoothstepper and RS485 to the drives.




I used a Greenlee punch set to knock two holes in the cabinet. Grommet edging was wrapped around the sharp edge and all the cables were pulled. The front hole was a last minute decison to allow easier storage/access to the cables for the 4th axis motor.




Cable route across the monitor stand and loop into the bottom of the industrial PC. I had hoped to get them closer to the same length, but you can't see it behind the screen.




I noticed the spindle was making a little noise and discovered the spindle tophat was rubbing on the pull plate. There was only a .005" gap on each side, so it isn't surprising. 




I chucked the piece (fully assembled) in my lathe and indicated the off center hole into alignment, then took a skim cut to open it up a few more thou. This really fixed all the noise coming from the spindle.




I continued on my quest to get the spindle perfect by measuring the installed depth of the tophat relative to the drawbar. Unsure where the error came from, but the threaded length of the tophat was .016 too long. This pressed firmly into the pulley and side loaded the upper deep groove ball bearings.




I turned up a plastic split bushing to hold the tophat for back work.




I indicated in the axial runout to sub .0005" and took off around .014". When reassembled, the spindle runs freely and I can tighten the tophat all the way down until the spindle hits the internal shoulder. There is still a thou or two of preload on the pulley but this is fine and helps hold it in place.




I ran the spindle up to 5000rpm for 90 minutes and here are the (relatively) steady state performance metrics:

Lower bearing temperature: 149*F
Upper bearing temperature: 153*F
Head casting (middle): 143*F
Motor (Top): 158*F
Spindle Nose: 129*F
Tool holder (End of Collet nut): 90*F

Motor running amps: 1.4A (12A = 1800W)
Heat loss into spindle assembly: 208W
Relative spindle efficiency: 89%
Noise Level: 80dBA at 3" microphone 90 degrees to machine, 73dBA at 18" microphone 90 degrees to machine

All in all, spindle runs hotter than I would like but not dangerously so. Noise level is very acceptable and no squealing, ticking, rubbing, or other bad sounds are heard.


----------



## macardoso

Continued...

Here is the machine as it stands. The X axis cable (wrapped in white spiral wrap) is a little annoying, but only drifts in front of the screen when the table is moved far to the right. There is little pressure or flex imposed on the cable, so it should last a long time.




Cables are neatly routed along the side of the spindle and tucked into the cable chain.




Last week I purchased a Harbor Freight Fortress 2 Gallon, 1.2HP silent air compressor in hopes that I could use it instead of my other HF 8 Gallon 2HP machine gun. I got it on sale for $160. My shop is in the basement of an old 1900's era house that has absolutely zero sound proofing between the floors. I can have a conversation with my fiancee through the basement ceiling as if she were standing next to me. Needless to say she does not appreciate me running the old compressor when I am working in the shop, so I was buying gas duster cans for my little odds and ends cleaning jobs in the shop.

I can't believe how well it works. It certainly isn't silent, but it is no louder than the furnace blower turning on and quieter than the lathe running (which I have running really quiet). My phone app had it in the low 60 dBA at about 1'. My major concern was how much air it would put out, and honestly I think it does as well or better than my other compressor. I have the tanks daisy chained together so I have effectively a 10 gallon tank. My fiancee didn't even notice the first few times it turned on. 

The HF one has a steel tank that needs to be drained, but that is fine. It runs up to 135 psi and has two quick disconnects (that are a little hard to connect when under pressure). Without the other tank connected, it cycles up to full pressure in 10-15 seconds. Maybe a minute to do the tank from empty. A nice surprise for me was the compressor turns ON at 105 psi which was higher than the 90 for the other compressor and makes the CNC run better. All in all I would definitely recommend for anyone who works in a small shop and has limited compressed air needs. 




The Power Drawbar needed the riser posts cut to the correct height to allow the cylinder to push on the end of the drawbar. Here are all the PDB parts laid out.




About 0.29" of height were removed and the piston just clears the drawbar when not activated. Roughly 3/8" of the 1/2" stroke are needed to release the tool (which works perfectly until the air pressure drops below 100psi).




Here it is installed. There is no longer room to fit your fingers in between the pieces, but I still will add some guarding. That would really do some damage to your hand.




X axis all the way right to show cable routing. Not ideal but I don't have another Idea right now. Look at the bottom of the column to see the bundle of servo and control cables coming up from the side of the machine.




Rack of TTS style tool holders. I don't think Tormach makes the electronic edge finder in the top left corner anymore. I love that thing so I better be very careful to not crash it.







Ran a sample part (2.125 x 3) out of PVC. Basically just some 3D adaptive roughing (50% stepover, 50% stepdown, 4000rpm, 75ipm) and some high speed finishing (.050" stock remaining, .02 stepover, .0002 scallop height, 200ipm, 4000rpm). Very fun to watch. I had the rapids limited to 5% at first and 30% after that and it was still flying! Total machining time, including some very slow work at the beginning was 15 minutes. This would have taken hours before. Wall finish was not all that good, but I ran it dry and I think the plastic got mashed into the wall of the part. I think a faster spindle speed, slightly slower cutting speed, and some coolant would get this looking better. That being said, the pictures look much worse than it does in person. Floor finish was excellent. This is where the machine's accelerations really shined!


----------



## spumco

Thanks for the picture-heavy updates.

BTW, your lathe looks familiar.
And your timing is perfect - I'm gathering parts to swap over to a servo spindle and servos on all 4 axis now.


----------



## macardoso

spumco said:


> Thanks for the picture-heavy updates.
> 
> BTW, your lathe looks familiar.
> And your timing is perfect - I'm gathering parts to swap over to a servo spindle and servos on all 4 axis now.
> 
> View attachment 290743



Ah! Looks similar! I'm jealous of your backsplash, mine did not come with one. I walk behind it every day to clean.

That's awesome! Whose drives are you looking at?


----------



## macardoso

Came home after work, turned on the machine, loaded another piece of PVC, homed, and hit go. It made another identical part exactly where it was supposed to in 20 minutes. I cleaned up and shut down no longer than 30 minutes from when I got home. This is what CNC was meant to be like  I used to wish I had a manual mill so often because I did not want to set up the CNC, turns out that avoiding adding limits and homing was just making my life harder. The jog pendant is also a crazy useful contraption. I've found that above 30-40% on the rapid override, the very sturdy monitor mount really starts to shake. I'm not too concerned about damaging the computer itself, but it does get annoying to see it shaking all over. This is less of an issue about the monitor mount and more a comment that the machine's accelerations are ridiculous.


----------



## spumco

macardoso said:


> Whose drives are you looking at?



DMM Tech NEMA 34's, 750W with the DYN4 drives so I don't have to have a separate AC/DC PSU.  Z will have a brake, X/Y/A will not.  I didn't see the point of a brake on the 4th axis as it's a 50:1 drive and I can't back-drive it by hand with the stepper off right now.

It's a linear rail machine and I'm cutting >50lbs off the head weight with the spindle and servo upgrade, so it should move pretty well.

Also switching over to a UC300ETH/UB1/UD1 motion controller and BOB(s) as I'm out of inputs now.


----------



## macardoso

I spoke with Mike Li at IGStool.com (sales@igstool.com) and his current offering for TTS compatible tool holders (ordered directly from him) is:


ER20 with TTS compatible ATC groove 1.38" long 3/4" shank, $17 USD
Set Screw endmill holders with TTS compatible ATC groove (1/8, 1/4, 3/8, and 1/2"), $18 USD
FMB22 Face mill holder with TTS compatible ATC groove (looks like a common size for cheap import facemills, 22mm bore), $19 USD

In addition, the related ebay page offers non-ATC geometry collet chucks in the following sets:


ER20 1 pc., $17 USD + $13 shipping
ER20 5 pc., $70 USD + $23 shipping
ER20 10 pc., $120 USD + $50 shipping
ER16 10 pc., $120 USD + $50 shipping
ER16 Floating Tap holder (requires modification to work with TTS) $70 + $16 shipping
ER32 10 pc., $120 + $60 shipping
ER32 5 pc., $80 + $36 shipping
ER25 10 pc., $130 + $60 shipping

I've been using these non-ATC ones for a few years (not sure if I got them from him) and have been happy. I don't have an ATC so it wasn't a big deal. The ones I have have runout between .0005 and .0025. The low runout ones are pretty good, but the high runout ones are only good for roughing. 

Mike stated that if any chucks were found to have runout exceeding their stated tolerance (<0.01mm = <.0004") they would replace them with new units from their US stock.

I am going to order a few of the ER20 ATC chucks and make sure I get ones with acceptable runout. I will probably then use these most of the time and use my old ones for less accurate tools.


----------



## macardoso

So this is going to take a little bit of a programming twist for a bit. I'm pretty happy with how Mach 4 is working and feel quite confident I can use it to make parts better than before. So now I want to add a few bells and whistles. 

I have already gotten the Pneumatic Drawbar working with a simple LUA script (although interlocking it with the spindle is stilled needed). My next project is going to be significantly more complex. 

All the servo motors on this machine are powered by Ultra 3000 AC servo drives. The drive has an embedded serial port which allows peer to peer communication on RS232 and multidrop communication on RS485. I already have a fully functioning RS485 network to allow me to connect to the drives through their configuration software. Thanks to this I know that the network/com port/RS485 converter is working correctly.

The drives communicate through an ASCII serial host command protocol documented in Rockwell Automation publication 2098-RM003. The first time I went through this manual it was very intimidating, but the interface is actually quite simple. A drive will never transmit on its own and responds when spoken to. All commands start with a colon and follow a similar format :aapppfdd..ddcc<cr> where aa is a two digit network address (my drives are 0-5), ppp is a parameter code which states what the command does (eg. read position, set torque limit...), f is a function code (0 = read, 1 = write, 2-9 do other stuff), dd..dd is a data block of variable length (typically between 0 and 8), cc is a checksum whose derivation is detailed in a Rockwell application technique document, and <cr> is a carriage return.

If I desired to know the number of encoder counts of the X axis motor relative to the home position (think absolute homing here guys!) then I would transmit the string :0007E0BF<cr>. I would then receive the string back from the drive similar to :0007E0000006DB13<cr>. This response says the address 00 (X Axis) is responding to the parameter and function 07E0 (Motor Position - Read Working Value) and the value is 0x000006DB (that is 1755 counts in decimal form). The drive also appends a checksum which I can verify for data integrity and a carriage return to end the transmission.

When Ultraware (the servo configuration utility) is open, it streams data constantly to update diagnostic values on screen. I connected my laptop to the network and monitored the traffic using PuTTY a terminal emulator. I was able to count 7424 data packets received in roughly 60 seconds. Since half of these are drive responses, we can say that at a minimum I can transmit 3712 packets per minute or ~62 per second. This might actually be quite a bit higher if I were to ask Ultraware to talk to all 4 drives at the same time. Talking network bandwidth for a minute, 8N1 format at 38400 baud assuming an average command/response length of 14 bytes, this gives a rough ceiling of 137 packets per second. If I increase the baud rate, this capacity goes up drastically until at some point, the drive response time becomes the limiting factor. Mach 4's PLC macro runs at a default 50ms or 20Hz so this base communication rate will likely be more than enough!


----------



## macardoso

Here are some pictures of the communications tests from last night. I'll try to do screenshots from now on, but this was all I took.

This is the serial host window in Ultraware (hidden feature Ctrl + Shift + F10). This sends a single packet to the drive and displays the response. The nice thing is that it calculates the checksum for you on the right. I already wrote a LUA script for Mach 4 that correctly generates and appends a checksum to packets.




Here you can see the command 08B0 (Drive DC Bus Volts - Read Working Value) and the response with the data 0x0152




Plug this into a Hex converter and you see the value 338. Note that this matches the Bus Voltage display on the upper image.







Here is my laptop, listening to the network on a second RS232 to RS485 converter. The laptop is running PuTTY. The first packet is the one transmitted to the drives, and the second is the response from drive 00 (X axis)


----------



## JimDawson

Now you need to write a routine that translates the return strings.


----------



## spumco

That loud noise was this thread breaking the sound barrier as it went from familar to screaming over my head...


----------



## macardoso

OK, so made big progress last night on the drive communications. LUA 5.2 included with mach comes with a package/module/library called luars232.lib. This gives basic serial port access but the documentation is essentially non-existent. I am not a programmer by trade, so I tend to rely very heavily on provided documentation.

I used the only piece of example code out there for this library to add a serial port open command to the screen load script in Mach. When Mach first opens, it connects to the embedded serial port on the PC and configures the baud, parity, and data format. I get a little message at the bottom of the screen that says "Serial Port Open". It also handles errors like if I forgot to close Ultraware before running Mach and the serial port is in use. I also added the close serial port function to the screen unload script. This kills the port when Mach closes. I bet Windows does this anyways but I figured it was good practice.

I then created a new blank tab on screen that gave me room to add some test buttons. The first one simply wrote "Hello World" on the serial port and sure enough, the first try I received a "Hello World" on my monitoring laptop. The second button sent a line of text that was a drive command, however the drive would not respond until I ended the string with a "\r" which LUA interprets as a carriage return. This correctly transmitted and I saw a drive response. The next two buttons were Serial Port Open and Serial Port Close, and attempted to do exactly what you'd expect. The close button worked perfectly, and the previously mentioned buttons would no longer transmit once it was closed. The open button used the same code from the screen load script, however it never successfully reopened the port. I wasn't too concerned so I moved on. I might come back to this.

The next button flushed the serial port by reading 1 character at a time until no data remained or the maximum windows serial buffer size (4096 bytes) was reached. I also had it announce how many characters were flushed. I was very happy to see that it always flushed the number of characters that the drive responded with, so I was pretty sure Windows was buffering the right data. The next button read 14 characters and concatenated them into a string which was then printed to the screen. And what do you know, I was able to print the drive's response to the screen! This of course only worked because I knew the response would be 14 characters. I added a few more drive command transmit buttons to send and receive strings of differing lengths.

The final button closely resembles the function which will actually handle the communications from the drive. When clicked, it flushes the serial buffer character by character until a ":" is found. It then reads the next two characters to get the drive address and the following 3 to get the parameter code. Using the parameter code, it does a table lookup of supported parameters and finds the expected data length. Next it reads the correct length and concatenates all of the data together to be printed to the screen. This function correctly handles variable length responses from the drive so long as I add them to the table of parameters. Any junk data is thrown out.

When I have time I will next make a button which verifies my checksum function I have already written works, and a button which will convert the data received from the drive and store the decimal form of the data in a register for use anywhere in Mach.

The final code will be a little more complicated since I need to send -> delay for response -> read. The delay must not block the rest of the code from running so a LUA coroutine will be used. I tried playing around with these and found them powerful but confusing.

All in all, I have proven that each piece of the puzzle works and I have confidence I can communicate with these drives automatically through Mach 4!


----------



## macardoso

Edit: Post removed because video only posted 6 seconds. Uploaded a better one below


----------



## macardoso

View attachment IMG_4402.MOV


----------



## macardoso

View attachment DDXP8808.MOV


----------



## macardoso

A Better one of the finish pass

View attachment FVWH2470.MOV


----------



## macardoso

Toolpath was generated by Mastercam and started with an Adaptive 3D rough with 0.125 stepdown and .025 step up (0.125 Ap, 0.125 Ae, 75ipm, 4000rpm, 0.050 stock to leave) and a scallop finish with a .02" stepover (.0002 scallop height) at 200ipm and 5000rpm


----------



## Boswell

Marardos, your work has been incredible. I had a G0704 for a while before I sold to a friend and bought my PM45M-CNC.  I would NEVER have thought anyone could supercharge the G0704 the way you have. Just Fantastic.


----------



## macardoso

Boswell said:


> Marardos, your work has been incredible. I had a G0704 for a while before I sold to a friend and bought my PM45M-CNC. I would NEVER have thought anyone could supercharge the G0704 the way you have. Just Fantastic.



Thank you so much! I'm having a lot of fun. I just really want an easy to use and reliable machine that I can turn on a never have to fiddle with to make good looking parts. Next steps will be figuring out how to advertise since I haven't done any real work since I last moved. I love small customer jobs, especially when I get to work on the design/engineering with them.


----------



## BGHansen

macardoso said:


> Thank you so much! I'm having a lot of fun. I just really want an easy to use and reliable machine that I can turn on a never have to fiddle with to make good looking parts. Next steps will be figuring out how to advertise since I haven't done any real work since I last moved. I love small customer jobs, especially when I get to work on the design/engineering with them.


Lots of small companies out there do short-run production.  www.protoshapes.com is a company run by my wife's brother.  He does low-volume production urethane parts.  Quite a variety of products from air nozzles to clear the glass on deep-sea diving helmets, to air guns to blow off cars at car washes, dice with the pips out for the blind, speaker horns, prototype tail lamps for the auto industry, etc.  He's got a local guy with a CNC mill, 3-D printer and stereo-lithography for making models to cast the urethane dies.  You're in an industrial area and should be able to find some similar companies.

Bruce


----------



## macardoso

Bruce, Thanks for the ideas! I think once we are all done with wedding planning (~June) then I will start seriously trying to get some work. Everything previously has been word of mouth (mostly college startup type stuff).


----------



## macardoso

On the topic of the CNC, I have been having some issues with the spindle whenever it is accelerating, changing speeds, or decelerating to a stop. Not sure if it is a wiring, Mach, or ethernet smoothstepper issue, but the servo receives delayed or missing steps which cause significant clunking in the drivetrain and occasionally a drive fault. I have a workaround to limit the servo acceleration at the drive level but this isn't the best fix.

I have a support ticket in with Warp9TD (whose support is A+) so it will be interesting to see where it goes. 

Few trends showing what should be a smooth ramp in commanded speed of the spindle motor, but has a dip back to 0rpm which causes aggressive jerking of the spindle:

Note that the graphs are inverted to -5000 rpm due to the drive polarity, but it doesn't make a difference.


----------



## macardoso

OK, chucks made it in last week. I have mixed feelings about the quality of the product, but I don't regret buying them. Here is my best attempt at an unbiased review. I will make some comparisons between the Tormach TTS tools I have as well as my previously purchased non-ATC chucks.

*Shipping and Packaging: *Tools arrived within 3 week days from me placing my order via USPS. They were placed inside a double bagged padded Priority Mail envelopes. Each chuck was wrapped in a plastic bag with rust inhibitor and then inside a telescoping plastic tube that tools usually come in. I was a little concerned about damage due to the soft packaging, but there were no issues.

*Appearance: *The chucks have a nice general fit and finish. The black oxide is dark and even and the machined surfaces of the chuck body are nice. The shank, collar, and OD near the ATC groove of the tool is ground with a fine finish. My previous import chucks had a rough grind to the collar that hits the nose of the spindle, but these new chucks were as smooth as my Tormach tools. The body, threads, and taper of the tool appear to be hard turned. This made me nervous, but shouldn't immediately disqualify precision since hard turning can be as accurate as grinding if done right. The taper had microscopic machining chatter marks (the kind that looks like a mirror shine until you pull out a magnifying glass) but certainly not anything significant enough to cause issues. The taper is smoother than the ground taper on my other imports, but I don't have a Tormach ER chuck to compare against. The threads are burr free and have no chatter.

The collet nuts have a lower quality black oxide and the information is laser engraved on the face. The threads and taper are again hard turned and look quality. Two nuts had poor surface finish/scoring on the taper (likely from a broken tool during manufacturing) and were set aside to be discarded.

*Hardness: *I used a fine cut file on the back of the holder, near the taper, and on the nut. The file skated across the surface without really biting but did not feel glass hard. I would loosely guess a low to mid 50's Rockwell C scale. A single nut had 5 hardness test dimples present on the face. I did not receive a chuck which had witness marks from a hardness test.

*Taper Runout:* Chucks were tested by rotating the shank in a Vee Block with a .0005 dial test indicator mounted magnetically to the block. I would have liked to use a .0001 dial indicator, however I did not have a way to measure the taper with this. An extra vee block was used to weight the shank down into the Vee to prevent error due to uneven pressure during measurement. The face of the collar was firmly pressed against the side of the Vee block during the test. This is necessary to keep the indicator in the same location in the taper, however any error in the collar grind will falsely show up as runout in the taper (due to axial motion of the chuck). Chucks and nuts were serialized. Runout was measured at 3 locations within the taper and an average is reported below:

Chuck 1: .0003” (.008mm) TIR
Chuck 2: .0003” (.008mm) TIR
Chuck 3: .0003” (.008mm) TIR
Chuck 4: .0002” (.005mm) TIR
Chuck 5: .0004” (.010mm) TIR
Chuck 6: .0006” (.015mm) TIR
Chuck 7: .0008” (.020mm) TIR
Chuck 8: .0008” (.020mm) TIR
Chuck 9: .0011” (.028mm) TIR
Chuck 10: .0012” (.030mm) TIR
*Assembled Runout: *Chuck assemblies were tested using a Techinks 1/4" Precision (.0002" TIR) ER20 collet and a 1/4" carbide dowel seated to full depth in the collet and measured at 3xD (0.75") from the face of the chuck using a .0001" Dial Indicator. The two nuts which were improperly machined were not tested to prevent damage to the collet. Additionally, chucks 7-10 were not tested due to the excessive taper runout. Each chuck was tested with each nut to find combinations that minimized runout. Understand that at least .0002" (if not more) uncertainty in measurement is introduced by the collet, wear on the collet, and the carbide dowel. Chucks were tightly to roughly equal torques, but I do not use a torque wrench, so some uncertainty is introduced there.

Runout varied from .0003" to .0026" with an average assembled runout of .0013". This leads me to believe that either the threads on the collet chucks, or the nuts have machining errors which cause the taper in the nut to assemble off center of the taper in the chuck. I was able to match nuts to chucks 1-5 which gave the following runouts:

Assembly 1: .0004"
Assembly 2: .0003"
Assembly 3: .0006"
Assembly 4: .0004"
Assembly 5: .0009"
Repeatability of these matched chuck assemblies unfortunately is not very good. For example, reassembling Assembly 1 yielded the following:

Assembly 1 Test 1: .0004"
Assembly 1 Test 2: .0012"
Assembly 1 Test 3: .0016"
Assembly 1 Test 4: .0006"
*Customer Service: *I contacted the seller of these chuck and stated that I had 5 units which did not meet their stated tolerance of 0.01 mm TIR. I explained my measurement method and the results I got. The seller was concerned that my methods may have introduced error in the measurements which was the source of the excessive TIR, but offered to send me 5 replacement chucks immediately. I have not yet received these in the mail, but I am very happy with this outcome.

*Closing thoughts: *All in all I am happy with the purchase of these collet chucks since my expectations were set reasonably. I have 5 chucks which I can (with a little trial and error) assemble within .0005" or so TIR. For me, having more TTS tools was more important than having 2-3 very precise chucks since I can create a library of pre-assembled tools that I can add to my CAM software. Since I won't need to take the chucks apart nearly as often to swap tools in and out, I can afford to take the time to assemble them for minimum TIR. 

If you want less expensive TTS ER20 chucks ($20/ea vs $45/ea) and are willing to take the time to inspect the product and deal with some higher TIR chucks, then I would recommend this product.


----------



## macardoso

I provided the above graphs generated by the servo drives to Warp9TD along with some of my troubleshooting analysis. Andy confirmed that I had found a legitimate bug which would be patched in Build 235.


----------



## macardoso

Over the weekend I completed 3 additional tooling racks to match the one that already had made.

3 of the racks hold 12 TTS tools each and have .78" holes with a nice chamfer on the edge. The last rack holds 24 spare ER20 collets (.75") and 4 MT2 tools (.67") for the lathe. The MT2 holes are sized so the tapper cannot fully pass through the hole, this way my dead center can be held in there.













The material is black Sintra (recycled PVC) and is glued (PVC Cement) and screwed together. Very sturdy and will not mar the tools. The rack in the last picture has been used for 4 years.


----------



## macardoso

And a quick video showing the machining of the ER20 rack. I ended up getting the machine running quite a bit faster on the later racks, but workholding was the limiting factor here. Rapids @ 10%

View attachment IMG_4496.MOV


----------



## macardoso

Got the 5 replacement chucks from the post above. They are completely different from the first 10 as far as physical appearance. They are about 1/8" longer, have more black oxide, a thinner contact ring on the collar, and ground tapers. I think the physical appearance is a little worse than the other 10, but all ran true within .0003 checked at 3 places in the taper. I'm super happy. So now I have 24 ER20 collet chucks with maybe 6 or 7 that are only good for drilling or roughing tools.


----------



## macardoso

Did a slotting test with a high performance endmill to see what it could do.

From Garr tool website:

Series VHM EDP# 49520
1/4x2" VHM HOG MILL *AlTiN
Solid submicron grain carbide end mill - center cutting
State-of-the-art rougher using Variable flute geometry
For stainless steel, inconel, pH materials, cold rolled steel, titanium, cast iron and tool steels
Furnished with a standard 45 degree lead chamfer
MFG recommended slotting data: 275-425 SFM, .0008-.0012 Fz, ap 0.5xD, ae 1xD

Material was a 1000 series cold rolled steel, 3/4" thick clamped in a 4" machine vise. Slots were taken along the X axis. I ran several tests but here was the cutting data for the most aggressive cut:

327 SFM (5000 rpm), 24 ipm, Total depth of 0.25" taken in (2) 0.125" passes. 0.83 motor HP required for cut, MMR = 0.75 in^3/m. Tool Stickout 0.38"

Machine and tool handled the cut very well. It was throwing small hot chips everywhere. I applied a small amount of coolant, but probably would have been ok cutting dry at the lower end of the tool's SFM range. I avoid slotting, but I think this tool would handle shallow slots no problem.







Note that the rough front edge of the stock was given to me that way., the witness marks on the first two slots 1/3 of the way in are from a previous pass taken by the tool, probably where the tool retracted.




Tiny dark blue chips

HEADPHONES WARNING!!!
View attachment IMG_4544.MOV


----------



## macardoso

And a blooper reel from bad MDI code. Gotta share the bad right along with the good!

Tool survived an 18in/min straight plunge and kept cutting.

View attachment IMG_4542.MOV


----------



## macardoso

Also machined a front cover very quickly for the PDB pushbutton. I may paint it and engrave the machine specifications at some point, but for now this isn't bad.


----------



## hanermo2

Re: spindle runout.
Your numbers seem high, and are probably related to the spindle and not the bearings.

You can test this.
Superglue etc, or clamp a turned disc in the spindle.
Then run the disc edge up/down against a mounted abrasive.
You should get runout near 1-3 microns.


----------



## markba633csi

That looks like a lot of fun- the more of these builds I see the more interested I get
M


----------



## macardoso

All the runout tests for the collet chucks (which is what I am assuming you are talking about) was done off the machine in Vee blocks.

If you are referring to the post many weeks ago about rebuilding the spindle, then yes I have a lot of runout at the taper. The ABEC 5 data tables list the maximum bearing runout for a fixed outer race and a rotating inner race as .0002" TIR unilateral. Since my spindle runout is much higher than this, I have to assume that the spindle taper is not ground concentrically to the bearing races.


----------



## macardoso

This post is really more a sanity check for me for where I am at on programming.

1) *Pneumatic drawbar release:* Fully functional including spindle running interlocks and having the position stored in a register so the drawbar will not retract unless required to (for example if the spindle is running and the button was pressed it would not extend, but still fire to retract). This is ready to be ported from my development profile of Mach to my runtime.

2) *MPG functions:* MPG works as required however the proper setting are not loaded into mach until the switches are moved after startup. I will add a section to the screen load script to check the position of the switches and ESTOP and set the correct settings. Also need to modify the Enable button script to prevent the machine from being enabled if the ESTOP on the MPG is pressed.

3) *Cycle start, hold, and stop buttons:* Wrote code which correctly responded to the button press, but for whatever reason Mach did not respond the the cycle start API command. Need to revisit.

4) *Spindle Enable/Disable:* Buttons have been placed on screen, but no code is written. Needs to be interlocked with the cycle start function and machine mode so the machine cannot be started if the spindle is disabled, and the spindle cannot be disabled if the machine is running.

5) *Spindle Orient:* Button is on screen but has not been scripted. Should simply call a M19 and the code should be placed there.

6) *De-ref all: *Machine should be dereferenced if the drives are disabled to prevent an error introduced by the screw moving while the motor is off.

7) *Auto Enable Soft Limits: *I constantly forget to enable soft limits after homing. This should be automatically enabled after homing completes.

8) *Power On cycle: *I want to add a menu system which walks me through all the steps of machine startup. This would include homing, spindle warmup, oiling reminders, checking for errors, etc.

9) *Stop machine for fault: *I need to trigger an estop for any condition which prevents the machine from running. This would be a drive fault, a power supply failure, cabinet over temp, etc. 

9) *Drive Serial Communications: *I have proven functionality to both send and receive serial communications from the servo drives. I need to create a single function to send/receive a transmission so I can figure out if a plain delay is acceptable or coroutines need to be used. From there I have developed the structure which will allow for implementation of many functions over serial. These include:

Spindle Load Monitoring
Absolute Homing (automatically get current motor position from drives after power off)
Define home
Set Position error limits on drives
Set Max Torque on drives
Read Fault codes
and more...

I'm having a little hard time to stay motivated to get the code finished up, but the machine will be better because of it.


----------



## macardoso

Did a quick test of an automated send -> receive using a fixed length serial message. Turns out that a 1ms delay is more than enough to allow the drive to respond. This should be perfectly fine and will allow me to continue on with the rest of my serial communications script in Mach 4 LUA.


----------



## macardoso

Got the code for serial communications up and running!

Right now, it just updates the value printed at the bottom of Mach ten times a second, but the important thing is that the backbone of code works. From here there is very little effort to implement the rest of the serial functions since they all use the same process and functions.

I also need to find the best way to handle errors. Right now, I catch most if not all errors, but I don't do anything intelligent with them.


----------



## macardoso

Been really busy so not much time in the shop, but I did make the serial code a bit more robust with proper error checking and handling. Now Mach 4/LUA no longer crashes when a serial packet is missed

I have tested polling the drives at a rate of 10Hz while jogging with the MPG and while running a simple Gcode program and found no problems. The serial program misses 0 packets while Mach is Idle and maybe 2-3 per minute when it is running code. This does not pose a problem for me at all.

I am going to finalize the serial code this weekend and make many more servo functions (right now the only one I have prints the DC bus voltage). Each function will handle errors differently, so a function which updates the display with information will not care if a single packet is missed, but one which defines the pitch of a thread for rigid tapping would need to retry the transmission or emergency stop the machine before breaking a tap.

The next function I want to create will copy the spindle load to a register to be displayed on a bar graph.

I talked with the guys at Warp9TD some more and they suggested to watch the ESS diagnostics window to make sure the buffer stays sufficiently full while running my code. It does, however I find that running the diagnostic tool really messes up the motion generated by the machine both in MPG mode as well as when running code. As soon as I close the window, machine motion goes back to normal.


----------



## macardoso

Spindle Load script is up and working! Had to fix quite a number of things to get it working the way I want it to including converting the Hex value of spindle load to decimal using a twos complement method (allows negative numbers). I found that the 1ms delay worked well for the X axis drive (address 0) but missed maybe 10% of the packets from the spindle drive (address 5). Increasing this to 2ms solved the issue. Not sure if that drive responds slower or the physical distance/address distance makes a difference.  Interestingly, no packets were missed until the drive was enabled.

Currently it seems like the bar graph in Mach 4 only can access internal variables and not registers. For the time being, the load is displayed numerically as a DRO, but I want it animated in the future.

I plan to keep adding functions as I go forward.


----------



## Boswell

Marardoso, you are really turning that G0704 into a Diamond. thanks for continuing to share the journey.


----------



## macardoso

Thanks! Having a lot of fun with it, especially now that everything works. Haven't had much shop time lately but still plugging along.


----------



## macardoso

Totally an aside, but I found a seller on eBay offering "Super Precision" .0002 TIR ER20 collets for $0.99 each  

So knowing full well that these would be absolute junk I bought a few of each size, $25 in total. I figured I'd see what I could get and return the bad ones since they don't meet the specs. Just got them in the mail and I'm testing them in my best collet chuck for runout. 

They all have really bad burrs from the slitting operation, but those flake off with a fingernail scrape. so far 30-40% are in the .0004 to .0008 TIR range and the rest are complete garbage with the worst reading .0085" TIR (you can visually SEE the runout!). I saved the "decent" ones in a bin for emergency use and I marked all the junk ones to be trashed/returned. 

In all I ended up with 9 moderately good collets for $25. If you have patience I guess you could go this route, but I wouldn't recommend it.

https://www.ebay.com/itm/1-2-SUPER-...e=STRK:MEBIDX:IT&_trksid=p2057872.m2749.l2649


----------



## macardoso

Upgraded to Mach 4 build 4162 last night without incident. I moved all my serial and servo scripts into two modules which are loaded when you open Mach 4. The benefits of this are that you get to use a "class" in your programming, and that the screen load script doesn't have a ton of functions just hanging around (makes it hard to read).

My serial module contains 5 functions and my servo module contains 28. I went through the list of available serial commands for the drive and created a Mach 4 interface to any of them that I thought might ever be used. Easy to add more in the future.

I made a special function mcServo.SpindleLoad2Reg() which queries the servo drive for the torque consumption averaged over 100ms and copies the data into a global register. I will probably do some math to convert the torque to power since the torque curve drops a bit past 3800rpm. The function is called from the PLC script 10 times per second. I added a bar gauge to the spindle section of the screen which reads the global register and displays the real time torque on the spindle (roughly analogous to load). The gauge fills up with green to 100%, yellow to 150% and red to 200%. In reality, the register goes up to 250% but I didn't feel like having it go that high since I won't be machining in the red. The refresh is pleasant to watch and it is very responsive to me twisting the spindle nose.










After I took pictures, I also added a spindle orient button and a text display for the motor temperature. I would love to add some thermocouples to the spindle bearings, but this is good enough for now.

I think having a good understanding of the spindle load will help me fine tune my toolpath settings.


----------



## macardoso

In preparation for a prototype job that I recently started on, I ran a test part on my CNC using the spindle as a lathe (tools clamped in the vise). Unfortunately I cannot post any pictures from the job directly, but I will try to get some of the setup in general. 

I have never used MasterCam lathe and was concerned about the learning curve to generate the code necessary. It took me less than 30 minutes to generate the geometry and toolpaths, modify a post processor to output in radius mode, and post code ready to run. The machine axes are all already in the correct setup (Z and X are the same as a real lathe, as well as their directions) and the Y axis can be used to adjust tool centerline or index to a new tool. Instead of using tool offsets to change tools, a new work offset is defined for each tool and the G54-59 call is placed in the code where a toolchange would occur.

I have purchased a Thinbit grooving tool to make all of the grooves on the part and I am excited to see how it works.


----------



## macardoso

Long time without a post, but I just finished up a prototype job that required me to use the mill as a CNC lathe with tools ganged in a vise. Machine worked great! As mentioned above, one of the tools I picked out was a Thinbit Groove N' Turn to do some narrow slotting in the parts. This worked great and I was amazed by the quality of a name brand tool.

I also opted to do all of the CNC turning (in 304 SS) with a CCGX32.50 insert for Aluminum. The workholding rigidity was pretty poor due to the shape of the part, so I wanted to keep the cutting forces very low. It actually worked great and left near mirror surface finishes. DOC was only .005 and that easily formed a chip and never rubbed. Tool life was very low (about 5 parts per edge) and still left good finishes but would audibly begin to chatter. At $6 an insert from Shars this was very economical. Maybe I could have found a fancy superfinishing insert for SS, but these got the job done quick and easy.

Getting married in 11 days so probably won't be in the shop for a little while. Can't say I can complain


----------



## BGHansen

macardoso said:


> Long time without a post, but I just finished up a prototype job that required me to use the mill as a CNC lathe with tools ganged in a vise. Machine worked great! As mentioned above, one of the tools I picked out was a Thinbit Groove N' Turn to do some narrow slotting in the parts. This worked great and I was amazed by the quality of a name brand tool.
> 
> I also opted to do all of the CNC turning (in 304 SS) with a CCGX32.50 insert for Aluminum. The workholding rigidity was pretty poor due to the shape of the part, so I wanted to keep the cutting forces very low. It actually worked great and left near mirror surface finishes. DOC was only .005 and that easily formed a chip and never rubbed. Tool life was very low (about 5 parts per edge) and still left good finishes but would audibly begin to chatter. At $6 an insert from Shars this was very economical. Maybe I could have found a fancy superfinishing insert for SS, but these got the job done quick and easy.
> 
> Getting married in 11 days so probably won't be in the shop for a little while. Can't say I can complain


Congrats on the upcoming nuptials!  Maybe adapt the spindle to dispense icing for cake decorating?  Or CNC the bride and groom on top of the cake?  Or add a 4th axis to the mill (wouldn't that be a fantastic wedding present) so you can engrave a nice ring?  Enjoying your string.

Bruce


----------



## macardoso

Thanks Bruce! I haven't done much by way of wood working, but I'm thinking a CNC'd hardwood ring box would make a nice birthday present (it is a month after the wedding).


----------



## macardoso

Also this past job was the destroyer of tools (I've never worked in stainless before)

The following were added to the graveyard:

1 - CCMT Insert (cut above centerline)
3 - CCGX inserts (worn edges, fine by me)
1 - M3.5x0.6 tap (stuck in the part)
1 - 3mm carbide ball endmill (CNC crash due to code error)
1 - carbide center drill (fed too fast)
Chipped the edge off my parting tool (reground)
Fortunately the $16 Thinbit inserts made it through unharmed!


----------



## benster

You may have mentioned this in a previous thread, but what air cylinder are you using, and what size bellevilles?


----------



## macardoso

Air Cylinder is a custom built one from plans by Hoss Machine. It is a triple stack 3" bore 3/4" stroke (not 100% sure about the stroke). OD is 4". Delivers 2100 lbf at 100 psi (minimum on my compressor). Don't love the design and it took a while to get it to not leak, but it works as advertised. 

Beville springs are from Mcmaster Carr (https://www.mcmaster.com/9712k437) and are arranged in 5 pairs of two that looks something like this (())(())((. They're preloaded to something like 1800 lbs of holding force and give about 25 to 50 thou of stroke when compressed. I don't know exact numbers since I tighten it as far as it will go before it doesn't release at 100 psi. Haven't had any tool slip issues yet but I also haven't maxed out the spindle.


----------



## macardoso

The air cylinder makes a really great learn how to use a mill and lathe project. Lathe work requires multiple setups per part with relative tight but still attainable tolerances. The bolt circle is easy mill work, but fixturing the angled porting holes can be a bit of a brain teaser. Very fun project.


----------



## benster

Is the cylinder a part of his CNC conversion plans? I drew up my own cylinder based on the same principle, but it would be convenient to work from a set of finished drawings.


----------



## macardoso

In 2015 I asked Daniel to sell me the plans individually rather than buy the $45 kit of plans. He agreed and emailed me a ZIP file for $10. His email is hossmachine.info@gmail.com.


----------



## macardoso

In addition to my machining, kayaking, rock climbing, biking, backpacking, ... <crap lost count> ... too many hobbies, I love baking bread and cooking. I put the G0704 to work machining a silly little ravioli mold from some nice quality 2x4.










Here is a short clip of it cutting. Finishing pass is 150 ipm and 5000rpm on the spindle. The high accelerations on the axes allow the machine to spend more time cutting at the 150 ipm especially when reversing in the corners.

View attachment WKZF7797.MOV


----------



## macardoso

Tried out the ravioli mold. Worked great - raviloi were great too!


----------



## macardoso

I started work on the 4th axis for this machine. It is a pretty simple assembly since the motor and gearbox I already have include the output bearings and mounting surfaces. I have an 8x8" ground right angle plate from Shars which I'm pretty sure I paid $40 for 6 months ago (and it is $80 now - ouch!). I need to remove the ribs from the inside of the plate to give clearance for the motor and gearbox, bore a roughly 5.5" hole through one face with a bolt hole pattern of tapped holes, and machine mounting features on the face which will become the bottom of the unit. I am using a 5000rpm Allen Bradley AC servo motor and a 31:1 Alpha Wittenstein SP+ gearbox. I'll need to make a custom faceplate and mount a 4 or 5" chuck on it.

Here is the motor and gearbox. One limitation will be that my through hole chucking capacity will be limited to the depth of the chuck and the small bore on the end of the gearbox. The electrical cabinet is pre-wired for up to a 1kW motor on the 4th axis. While not quite as good as a harmonic drive, this gearbox is a very low backlash unit and has a large crossed roller bearing on the output face.




And here is a rough idea of what the angle plate looks like. After removing most of the ribs, I'm a little concerned about structural integrity, so I may machine the inside edges of the right angle (right at the edge of the part) and install new ribs from aluminum or steel plate. These wouldn't interfere with the motor mounting.




I clamped the angle plate to my machine table and tried to use a 1/2" x 8" long reach carbide endmill to cut all the ribs off in 1 setup. This quickly became obvious that it was not going to work when the chatter and cutting pressure made the tool deflect by at least an 1/8" at the tip of the tool. A lot of this is my poor tool holding capability using TTS and my machine rigidity, but the tool itself had some flex as well.

I switched over to a stubby 1/2" VRX endmill from GARR and worked on machining all the parts of the rib that I could reach. I was doing all the cutting from the MPG pendant. This this was really hogging through material! Seriously I was using a G0704 harder than I would cut on the Bridgeports in college. Unfortunately when the endmill was exiting a cut on one of the ribs, it snagged a corner of cast iron, pulled the table into the cut, and cracked 3 of the flutes off of the cutter. I'm pretty bummed because even though I didn't buy this new, it was one of a small handful of 1/2" tools that I had that were in good shape.




Next I popped in a 3/8" roughing endmill and it did amazing. Normally I preach carbide, but for this high cutting force, low rigidity cut, the flexibility of HSS really was what was needed. I was monitoring the spindle load meter that I added to Mach (discussed in an earlier post) and adjusted my feed rate to keep the meter at 100% (although I spiked to 175% a few times). I'm really happy with this upgrade on the spindle. It is very quiet and has more than enough power and torque for this machine. I was considering changing the belt ratios to give higher speeds than 5000rpm, but after spending some cutting time in the <1000rpm range, I think I will leave them right where they are for the torque.

I kept switching though my different endmills to try to reach as much of the ribs as I could, but eventually I ran out of options. I'm going to flip the plate on its side and come in with another endmill like the VRX I showed above.




For the first time since I added my pneumatic drawbar, I had issues with tool pullout. It seems like it didn't matter so much about the load on the tool, but rather the tool would slip as soon as chatter started. I ended up cranking all the way down on the drawbar (the pneumatic release wouldn't work at this point), which helped, but even then the tool would slip. I think I might be pushing the limits of what TTS is capable of holding (I'm pushing 2-3HP into the cut). 

Something odd that I have always noticed is that my toolholder shanks only get scratched up on the first 1/4" closest to the shoulder. I am wondering if perhaps my collet is bad or maybe the spindle taper is, which may force the collet to close up at the nose before deeper in the spindle. One particularly bad episode of chatter dug these score marks into my tool holder. Not thrilled about that.




Have to travel for work over the next couple of weeks, but when I am in the shop I am going to be working away at this.




Cheers! 

-Mike


----------



## JimDawson

If you have a band saw (SawzAll?) available I would remove as much material as possible before machining in the mill to clean it up.


----------



## shooter123456

JimDawson said:


> If you have a band saw (SawzAll?) available I would remove as much material as possible before machining in the mill to clean it up.


Maybe an angle grinder and cut off wheel could work if he does not have a suitable saw.


----------



## macardoso

You guys are gonna yell at me, but I do not have a bandsaw or angle grinder! Only a hacksaw and that sounds miserable.


----------



## macardoso

I have a circular saw that a much braver person than I could use to chop those off


----------



## mattthemuppet2

a hacksaw with a decent 14/18t bimetal blade would cut through that relatively quickly and cleanly, albeit with some sweat equity involved. I'd then go down to HF and get one of their cheapy angle grinders ($15?) and grind down any proud edges. Slap a coat of paint on it and no one will be the wiser 

I'm sorry for the loss of your endmill, I always feel a stab of emotional pain when that happens to me.


----------



## shooter123456

macardoso said:


> You guys are gonna yell at me, but I do not have a bandsaw or angle grinder! Only a hacksaw and that sounds miserable.


For shame sir, for shame.


----------



## JimDawson

Turning the angle plate on it's side and using the side of the endmill might be a good cutting strategy. A roughing endmill would make quick work of that.


----------



## macardoso

JimDawson said:


> Turning the angle plate on it's side and using the side of the endmill might be a good cutting strategy. A roughing endmill would make quick work of that.



That's currently the plan. I could also clean up the rough cast edges for my replacement ribs in the same operation. This project might not have been planned out as well as the rest of the build but it'll be just fine!


----------



## spumco

A bandsaw is at your disposal and 40 minutes away from you...

As are long-reach end mills and spare 3/4" R8 collets and just about anything else you need.

Maybe I misunderstood your intent... but if not an easier way to re-stiffen the angle plate would be to drill & tap the sides and put 1/4" or 3/8" plates on the sides like I did on mine.  They won't influence the angle plate if you (we) grind the mating surfaces flat.


----------



## macardoso

spumco said:


> A bandsaw is at your disposal and 40 minutes away from you...



I think it's time I scheduled a trip out to Ashtabula! Next time I have a free weekend, I will send you a message and hopefully get together.

You're correct about what I'm trying to do. I think you way would definitely be easier.

Thanks again for the offer


----------



## spumco

macardoso said:


> I think you way would definitely be easier.


The easy way is to use two pieces of steel and bolt them together rather than carving up a cast iron angle plate.

Actually, the _really_ easy way is to just get a big chunk of material and come up here.  We'll go over to the 'real' shop and bang it out on the VMC or big horizontal and then grind it in.

See if you can find an 8x8x8 drop of O1...


----------



## macardoso

spumco said:


> See if you can find an 8x8x8 drop of O1...



Well that might be a bit more than my machine table could hold (or I could lift for that matter)!

The angle plate came about because I was looking for something square (these are ground at the factory), rigid enough, and inexpensive. I don't have any plate steel in my scrap bin (mostly round stock and tons of aluminum) and the 4th axis will probably only be used 5% of the time. If we meet up, I have some 5/8 aluminum plate we can use for the sides, or I can go buy some steel.


----------



## macardoso

Also totally bragging here, but I met John Saunders of NYCCNC at the Smithsonian National Air and Space Museum yesterday. Only talked with him for a minute but it was super exciting. Made the drive into downtown DC (insane) worth it.


----------



## spumco

I grew up there and took the Smithsonian for granted as a snot-nosed kid.  DC is not the same place it used to be... (get off my lawn!)


----------



## spumco

macardoso said:


> I can go buy some steel.



Aluminum?  Pshaw.

Just tell me what size you want the sides and we'll shop in the scrap bin.  We've got some nice 3/8" SA516-70 drops next to the plasma cutter.

It's unlikely you need to buy anything unless you want something exotic, like Waspaloy or maraging steel.


----------



## macardoso

spumco said:


> I grew up there and took the Smithsonian for granted as a snot-nosed kid. DC is not the same place it used to be... (get off my lawn!)



The museums are amazing. I was 1 day early for the 50th anniversary celebration of Apollo 11. Kinda bummed I missed it. Love everything about that program.



spumco said:


> Just tell me what size you want the sides and we'll shop in the scrap bin. We've got some nice 3/8" SA516-70 drops next to the plasma cutter.



Thanks! My current design is 8x8". Probably 5/8" wall on that cast plate, but if it were boxed in better, that would be unnecessary.


----------



## spumco

8x8?  do you need it that long?  I understand the width is determined by the gearhead, but are you trying to enclose the motor or is that just because the angle plate is that big?  Remember that any extra length (along X) eats up table real estate.


----------



## macardoso

spumco said:


> 8x8? do you need it that long? I understand the width is determined by the gearhead, but are you trying to enclose the motor or is that just because the angle plate is that big? Remember that any extra length (along X) eats up table real estate.



Nah, The vertical face needed to be 8x8 to deal with the bolt flange on the gearbox and to lift it off the table enough to swing a chuck on it (5" maybe?). The 6x6 angle was too small so 8x8 it was. The motor and gearbox are much longer than 8" so they will be hanging off the back regardless. If I ever get some sheet metal tools, I will make a stainless cover to go around the motor.  I could probably get away with the bottom leg being 5-6" long as long as you don't think that will mess up the rigidity of mounting?


----------



## spumco

Mine is about 5" long and I could lift the whole mill with it.  The only difference - and it's likely significant - is that I have a 5/16" thick back plate for the motor mount so mine is a complete box.  I get the impression yours will be open-backed and thus less torsionally stiff.  You might have a think about how to get a back plate on yours even if it's got a big hole for the motor; anything is better than a completely open back.

I've confirmed with the plasma owner that we can get 2/ea 8x6 drops out of the leftover chunk of 3/8".  We can do this however you'd like, but if you give me a DWG or F360 file I can cut the pieces with whatever cleanup allowance you want.

If you want them angled like mine, fine.  Square - also fine.

Second part is drilling & tapping the holes in your angle plate and finishing up removing the ribs.  Last part - once everything fits together - is grinding it all in on the surface grinder.

Least number of trips for you looks like this:
1. I cut, mill, and drill the side plates to your specified dimensions.
2. You drill & tap the sides of your angle plate to match.
3. You come up here with angle plate and we remove ribs, test fit, and then grind it in.

Or...  if the angle plate sides are really flat & parallel even after you've half-chunked the ribs out then I can gind the side plates before you get here and then you just show up and we hog out the ribs.  You leave with all the pieces and no grinding needed while you're here.

Or... I just hand you some rough-cut side plate stock and we chop out the ribs.  You skip grinding and use epoxy to grout the side plates for full contact.  You do everything else on your own so you aren't spending so much time up here and you get more 'quality time' with your own mill.

You pick.


----------



## macardoso

I'm on the hunt for an import price-point 5" 4 jaw independent chuck with bolts that mount through the face of the chuck. If anyone knows of a good place to buy one, please share 

I will be mounting this to the 4th axis that @spumco is so kindly helping me with. Unfortunately the mounting pattern of my gearbox forces me to screw the chuck onto the faceplate *after *the faceplate is attached to the gearbox, hence the through chuck mounting requirements.




Basically something like this. I see quite a few for sale, but not from any reputable import seller that I know. I don't want to buy absolute garbage from Amazon...


----------



## spumco

Um...  You want a 3" 4-jaw starter kit?  That you can bolt on to the front? I might know a guy...

And there's no reason to buy a special front-mount chuck when you have a CNC mill.  Get a regular one and drill/counterbore yourself.


----------



## macardoso

spumco said:


> Um... You want a 3" 4-jaw starter kit? That you can bolt on to the front? I might know a guy...



Well then I might want to meet this guy! Yes, I'd definitely be interested in a small chuck to start with. I have a 3" 4 jaw chuck *but... *when I started machining I didn't understand why anyone wouldn't want a scroll chuck, so I went out of my way to buy a 4 jaw dependent chuck. Lol

If the chuck has the meat to be machined then I can do that. I've seen lots of 4 jaw chucks which are hollow in the back and wouldn't have enough meat to put a counterbored hole into.


----------



## spumco

Well, that chuck comes with a sub-plate already so there's no need to drill the chuck.  If the bolt pattern doesn't fit your final faceplate design it's got enough fat left to put some new ones in it.


----------



## macardoso

Well I have been doing a lot of redesign on my 4th axis since I am now getting serious about building it.

Here was the mock-up proof of concept design: 



Notice almost everything is missing including mounting holes and the homing proximity sensor. Here is the cast iron angle plate as machined.




Here is the Alpha Wittenstein TP+ 1:31 gearbox I am using







Here is a picture from partway through the design. Notably there have been side plates added, the gearbox is now mounted from the rear, and the Balluff inductive proximity sensor has been added.







Next I designed a cast iron faceplate for this unit which will allow mounting of various fixtures including lathe chucks and tombstones.




The rear of this faceplate is quite complicated due to grooves for sealing rings. As I have continued with the design, I am pretty sure I will remove the seals and rely on the seal integral to the gearbox.




Here is a mock-up of the design on my G0704. Note that the model of the rest of the machine doesn't include the most up to date spindle design or limit switch mounting.




After this point I shortened the assembly by 1/2" and updated the mounting holes. I intend to further update it to include a carry handle on top and provisions for a sheet metal cover. I also need to model mounting features onto the faceplate.

I'm currently worried about weight. This unit as it is modeled comes in just shy of 60 pounds. This is a lot of weight to be hanging off of the end of such a small mill.

Open to design ideas!

Mike


----------



## Boswell

It might be crazy and I have not seen anyone else do this, but could you rig a counterbalance weight to remove say, half of the weight of the 4th axis drive?


----------



## spumco

Boswell said:


> It might be crazy and I have not seen anyone else do this, but could you rig a counterbalance weight to remove say, half of the weight of the 4th axis drive?


Yes. Counterweghts are available.  i believe Kurt is one of the more popular brands.


----------



## macardoso

Getting close to the final design here.

Since the last version:

Simplified the faceplate by removing the V ring seal
Shortened the entire assembly to 7.5" plus the removable carry handle
Added an aluminum truss structure to support the carry handle and sheet metal cover

The black dots are plastic caps to cover holes in the cover to allow access to the mounting screws in the angle plate




The back is left open for ease of manufacturing. Total weight is now 50lbs + whatever chuck or workholding gets attached.




Here is the truss structure. I could machine out a little material to save weight, but it isn't needed.




The only considerations I have left are wiring routing. I have a bulkhead connector for the servo cables if I want to make them externally dis-connectable. Same thing with the proximity sensor. Alternatively, I could always leave this connected and powered on, but set it behind the machine when not in use.


----------



## macardoso

I started working on some of the parts for this 4th axis. The handle risers and side plates need to be machined from plate stock, but there is full machining of the perimeter so normal vise clamping wouldn't work. A while ago I had machined a tooling baseplate for my mill on a large knee mill with a tenths DRO and a tapping head (that was a long day...). My intention had always been that I could build fixtures onto the baseplate that could be accurately removed and remounted, but until yesterday, that had never happened.

I decided a large piece of sacrificial aluminum plate could be used to mount the stock for these components through their drilled features. I searched around a found a 7x16x0.75" plate of anodized aluminum (already full of holes making it useless for stock) that came from a professional CNC router I helped someone disassemble.




The plate was jacked up on aluminum spacing parallels, indicated parallel, and clamped to the tooling plate below.




I then wrote a 5 tool program to spot, drill and counterbore 6 mounting holes for 3/8-16 SCHS and cut two .2505" reamed dowel pin holes for alignment.

The program ran great and I programmed much more ... exciting ... feeds and speeds than I normally would have done. Everything ran great. I'm learning that I baby this machine far too much.

To my amazement, the plate slid perfectly onto the two dowel pins located 12 inches apart. I know the holes in the baseplate will drilled and reamed to .0001" positioning on the big knee mill (take that with a grain of salt) so this means that my CNC cut two features within .0005"/12" which was an order of magnitude more accurate than I expected. I don't believe the machine could cut any feature within this (in fact I know it can't), but I am just excited that this worked so well  




Here it is all mounted (well missing 3 screws, but still). The next step will be to drill and tap the holes for the handle risers and get to work!


----------



## spumco

While you're at it drill some 1/8" holes with a good drill (or ream them) along the X and Y axis.  Use brass pins (cut from stock) as locators so stock can be quickly aligned with the axis rather than bumping it in.  And don't drill all the way through so the pins don't fall out.

Fly cut the surface, and you now have an excellent spoilboard for the 'tape and superglue' workholding trick.

Brass pins so if you forget to take them out before machining they just vaporize.  Better than leaving a hardened dowel pin in there...


----------



## macardoso

Hi All,

Have a month of weddings on the weekends and work travel in the week so forget having shop time (ugh). I got a small bit of tooling from a company which was going out of business after the owner passed away.













Nothing to write home about, but I didn't have any fractional reamers, so these are a very welcome set. There's a mismatched set from 1/4" to 7/8" and they're pretty sharp. 

Still haven't run any of the parts for the 4th axis, but I have some of the code done in MasterCAM and the tooling plate all set up. I'm hoping to get this 4th axis going again soon.

Totally off topic, but I never really jumped into math (for the sake of math) while I was studying Engineering in college. Since I graduated I have gotten very interested in industrial robotics and kinematics and have spent a LOT of time learning the math of robotics motion control and I LOVE IT. Seriously some of the hardest and most interesting stuff I've ever tried to learn. Anyways I've been looking for a used robot for years and just couldn't find anything that I could afford or reasonably play with at home. I did find a Fanuc robot not too far from where I live that I am going to try to pick up. Everyone cross their fingers for me.


----------



## spumco

HGR?


----------



## macardoso

spumco said:


> HGR?



I wish. They've only had some monster sized robots for the past year or so. That or they are kidding themselves on the price. This is from some random manufacturing company in western Ohio.


----------



## spumco

I'm probably going down to HGR soon to pick up some electrical stuff (enclosures, etc).  I may check out the robot section because I suspect there are a few harmonic drives hiding inside some of the $69 'robot wrists' and similar.

That, and there's a giant planetary gear assembly for about $50 labeled as 'bearing assembly.'

I really need more time and space...sigh.


----------



## macardoso

Nice! I've seen those sitting there, but made myself a promise not to pick up loose parts and pieces from HGR. I never use them. 

Those white Sumitomo brand gearboxes are hypocycloidal gearheads and are supposed to be as good as harmonic drives.


----------



## macardoso

Sadly the robot was not to be mine. It was a Fanuc LRMate 200iC with R30iA controller, all the cables, and a teach pendant. It was at auction for $300 so I was hopeful nobody would find it but it ended up selling for $5000. Way more than I was going to spend, but honestly someone got a really nice setup for cheap. 

If anyone knows where to find a small used 6 axis robot, I'd love to hear   

I have a few more weeks of work travel and out of state weddings and then I can get back to the shop!


----------



## macardoso

Well I'm back to work on some more LUA coding. This time I have a few goals:

Start-Up Menu system to get the machine ready to run
Absolute homing by reading the motor encoder at power-up and writing that position to the Mach 4 axis positions
Script a new M code for rigid tapping
Make sure that a servo fault, PSU fault, or cabinet over-temperature condition will stop the machine
I started out with the menu system. I wanted to add this because I often forget to oil the machine and turn on soft limits. By having a menu guide me through the steps, I should be very unlikely to forget stuff.

When I open Mach 4, a short delay is created by waiting for 60 scans of the PLC script to elapse (3 seconds) before running the start-up script. This is because the code begins to run a second or two before the graphics load on screen. I am greeted with this screen. Clicking NO will exit the script, and clicking yes will take you to the next step.




Step 1 is a simple acknowledgement that I have performed the normal maintenance on the machine. Clicking OK will take you to step 2.




Step 2 seems a little complicated, but some of my future features (like rigid tapping) will require me to dynamically change servo drive parameters on the fly. There is a risk that if Mach 4 crashed or power went out when the parameters were set to non-default values , the machine could behave incorrectly later on. To combat this issue, when Mach 4 opens, all the parameters that I might change are set to a default value. I just need to be careful because these will overwrite any changes I make in the servo configuration utility.




I had an extra computer listening on the RS485 network and logging all the traffic. Here is what that configuration dump looks like. The first 2 numbers after the colon are the drive serial address (00 = X Axis, 01 = Y Axis, 02 = Z Axis, 05 = Spindle). The 4 numbers after that are the parameter and write selection (in the case of the second line "01E1" is "Write, Slew Limit Enable Disable), the 2 after that are the data (in this case 00) and finally a 2 digit checksum. Immediately following line 2 is the drive's response which should echo the same address, parameter, and function code (but not return any data). My serial code is able to handle response failure, exceptions, and corrupted data. About 12 parameters are configured in each drive at start-up so roughly 50 serial transmissions occur in around 100ms.




If all the transmissions are met with successful responses, I display the following pop-up. If any responses are missed or exceptions are returned, then a warning message will appear prompting me to restart Mach and start troubleshooting if the issue persists. I have completed this section of code and found it to work very well.




Next menu prompt will ask If I want to home the machine. Clicking YES will take you into the homing menu, clicking NO will skip homing.




The homing menu first gives you the option to restore absolute position data from the motor encoder. Once it is working, this will be what I do 99% of the time. My axis motors (Allen Bradley MPL-A310P-MJ22AA) have a Multi-Turn Absolute Encoder on their shaft. This encoder uses a magnetic disk to produce a pair of SIN/COS waves offset by 90* electrical. This signal is 1.0V Pk-Pk and has 1024 cycles per motor shaft revolution. The drive further interpolates this signal by up to 1024 counts per cycle (a whopping 1048576 counts per revolution). Some newer drives can even interpolate up to 2048 counts per cycle. I have opted to only interpolate at 64 counts per cycle (65536 counts per rev) since this is way more resolution than my machine can handle producing. Since the disks are magnetic, the motor doesn't need to keep the encoder powered to maintain position knowledge. 

It gets better though! The encoder also has a miniature gearbox inside of it with several more magnetic disks. By saving the motor position and disk positions before powering off, the drive can compare the positions of the disks after turning on again and calculate its exact position as long as the motor was not moved more than 4096 revolutions while powered down. This is perfect for fixed travel length applications like machine tools.

This position data is available in a drive register to be read by host commands just like above. In addition, I can define the drive's zero location. When I home to my limit switches to zero out Mach 4, I will also write to the drives to zero them out too. I can later read the drive position count register, divide by 327680  (motor counts per inch), and plug that number into Mach 4. This is always saved by the motor after the machine shuts down, so it essentially negates any need to home the machine after turning it on.

So in this menu, I will pick YES to read the data, or NO to home to the switch and redefine the drive zero location. Clicking CANCEL will skip homing. This code has been roughed out on paper but is not yet ready for the machine.




The next step is to enable soft limits (I always forget). Clicking YES runs a couple of MAch 4 API calls to do the same thing that clicking the soft limits enable button does.




And you get a nice notification. If you click NO, the message will warn you that you need to be careful jogging since you can now reach the limit switch.




Finally I offer the ability to load a simple GCODE file which ramps the spindle up to max speed over 5 minutes.




And a caution message before the machine starts automatically.




And a final pop-up to confirm the script is done.




I still have some more code to write to finish this up, but it is getting very close. I'm super happy that the configuration script works.


----------



## macardoso

Continued on with the LUA coding last night. I have been using some code posted by Andy and Warp9TD to handle the MPG switch settings and have always found it annoying that the MPG doesn't pick the right axis and jog increment until you move the switches (it can read incorrectly right when Mach loads). This is because the code handling those switches in called only on a change of state. 

To get around this, the last thing I do when the Screen Load Script runs is call the function to set the switch states. This forces Mach 4 to read the switches and load the correct values. In addition, I added change of state scripts for the Servo Drive Fault input, the System OK input, and the Cabinet Over-Temp Alarm input. All of these are able to E-Stop Mach 4 and display unique indications of what the issue is. These too are called at the end of the screen load script to ensure they are in the right state for operation.

The last thing to do with this part of the code is to modify the ENABLE button to prevent me from enabling the machine if any of these conditions are true.

Here are the relevant portions of the code:



		Code:
	

SigLib = {
    [mc.ISIG_INPUT1] = function (state)
        SystemOKChange()             
    end,
    [mc.ISIG_INPUT2] = function (state)   
        DriveFaultChange()                      
    end,
    [mc.ISIG_INPUT12] = function (state)  
        CabinetTemperatureAlarmChange()      
    end
}

function DriveFaultChange()
    local hDriveFault
    local DriveFault
    hDriveFault, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT2)
    DriveFault, rc = mc.mcSignalGetState(hDriveFault)
    if (DriveFault == 1) then
        mc.mcCntlEStop(inst)  --Activate the EStop signal in Mach
        mc.mcCntlSetLastError(inst, "A Servo Drive Has Faulted") 
    else
        mc.mcCntlSetLastError(inst, "Servo System Faults Cleared") 
    end 
end

function SystemOKChange()
    local hSystemOK
    local SystemOK
    hSystemOK, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1)   
    SystemOK, rc = mc.mcSignalGetState(hSystemOK)
    if (SystemOK == 0) then
        mc.mcCntlEStop(inst)  --Activate the EStop signal in Mach
        mc.mcCntlSetLastError(inst, "A Power Supply or Main Cotactor Has Failed")
    else
        mc.mcCntlSetLastError(inst, "System OK Signal Has Returned to Normal")
    end 
end

function CabinetTemperatureAlarmChange()
    local hTempAlarm
    local TempAlarm
    hTempAlarm, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT12)
    TempAlarm, rc = mc.mcSignalGetState(hTempAlarm)
    if (TempAlarm == 0) then
        mc.mcCntlEStop(inst)  --Activate the EStop signal in Mach
        mc.mcCntlSetLastError(inst, "Cabinet Over-Temperature Alarm!") 
    else
        mc.mcCntlSetLastError(inst, "Cabinet Temperature Has Returned to Safe Levels")
    end 
end
---------------------------------------------------------------
-- Define Initial States --
---------------------------------------------------------------
--Without this code, Mach will not place the MPG in the right state at startup
--Correct Axis and Jog Increment only loaded when switches are moved

PendantAxisChange()

PendantSpeedChange()

PendantEStopChange()

DriveFaultChange()

SystemOKChange()

CabinetTemperatureAlarmChange()



Also here is the code for the screen load menu script. It is still a work in progress and immediately needs work on axis enabling, absolute homing, and starting the classic version of homing to a switch.  



		Code:
	

function mcServo.AbsolutePositionRecovery(address)
    local rError = 0
    local ctsInch = mc.mcMotorGetCountsPerUnit(inst, address)
    local sError, position = mcServo.GetPosition(address, ctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    mc.mcAxisSetPos(inst, address, position)
    mc.mcAxisHomeComplete(Inst, address);
    return rError
end

---------------------------------------------------------------
-- Start-Up Script --
---------------------------------------------------------------

function startUpScript()
    local welcomeBox = wx.wxMessageBox("Welcome to Mach 4. Do you wish to run the Start-Up Script?", "Welcome",2)
    if welcomeBox == 2 then
        local oilBox = wx.wxMessageBox("Apply Vactra No. 2 Oil to the Following Locations: \n \n-X Axis Ways \n-Y Axis Ways \n-Z Axis Ways \n\nVerify the air compressor is powered on and pressure is >100psi.", "Step 1/5 - Maintenance Reminder",4)
        local configBox = wx.wxMessageBox("Do you wish to write the default configuration to the Servo Drives?", "Step 2/5 - Servo Configuration",2)
        if configBox == 2 then
            local xmtError = mcServo.writeStandardConfig() --Configure all axes
            if xmtError == 0 then
                wx.wxMessageBox("Configuration Successful", "Step 2/5 - Servo Configuration",4)
            else
                wx.wxMessageBox("Configuration Failed! \n \n Some parameters may be set incorrectly for use with Mach 4. Shut down Mach 4 and try again. \n If this issue persists, confirm connectivity and parameters using Ultraware. ", "WARNING",4)
            end
        end
        local enableBox = wx.wxMessageBox("Do you wish to Reference Home? Choosing YES will enable the axes", "Step 3/5 - Homing",2)
        if enableBox == 2 then
            mc.mcAxisEnable(inst, 0, true);
            mc.mcAxisEnable(inst, 1, true);
            mc.mcAxisEnable(inst, 2, true);
            mc.mcAxisEnable(inst, 5, true);
            local HomeBox = wx.wxMessageBox("Do you wish to restore absolute position data from Servo Drives? \n \nChoose YES to restore homing data. \nChoose NO to Home to Limit Switches. \nChoose CANCEL to skip homing.", "Step 3/5 - Homing",18)
            if HomeBox == 2 then
                local e1 = mcServo.AbsolutePositionRecovery(0)
                local e2 = mcServo.AbsolutePositionRecovery(1)
                local e3 = mcServo.AbsolutePositionRecovery(2)
                local e4 = mcServo.AbsolutePositionRecovery(5)
                if e1 ~= 0 or e2 ~= 0 or e3 ~= 0  or e4 ~= 0 then
                    wx.wxMessageBox("Home Position Recovery Failed! \n \n Axes must be referenced to switch before operation.", "Homing Failed",4)
                else
                    wx.wxMessageBox("Home Position successfully read from Servo Drives", "Step 3/5 - Homing",4)
                end
            elseif HomeBox == 8 then
                wait = coroutine.create (RefAllHome) --This is the code from the ref all home button
                --Figure out how to wait here unitl the coroutine is complete and homing has finished.
                local hsBox = wx.wxMessageBox("Home to Switch completed Successfully. \n \nDo you wish to write the absolute home position to the Servo Drives?", "Step 3/5 - Homing",2)
                if hsBox == 2 then
                    local a1 = mcServo.DefineHome("0x00")
                    local a2 = mcServo.DefineHome("0x01")
                    local a3 = mcServo.DefineHome("0x02")
                    local a4 = mcServo.DefineHome("0x05")
                    if a1 ~= 0 or a2 ~= 0 or a3 ~= 0  or a4 ~= 0 then
                        wx.wxMessageBox("Home Position Definition Failed! \n \n Absolute Position Recovery will be inaccurate until corrected.", "Homing Failed",4)
                    else
                        wx.wxMessageBox("Home Position successfully saved to Servo Drives.", "Step 3/5 - Homing",4)
                    end
                else
                    wx.wxMessageBox("Home Position was not saved to Servo Drives.", "Step 3/5 - Homing",4)
                end
            end
        end
        local softBox = wx.wxMessageBox("Do you wish to enable Soft Limits?", "Step 4/5 - Soft Limits",2)
        if softBox == 2 then
            mc.mcSoftLimitSetState(inst,0,1)
            mc.mcSoftLimitSetState(inst,1,1)
            mc.mcSoftLimitSetState(inst,2,1)
            wx.wxMessageBox("Soft Limits Enabled", "Step 4/5 - Soft Limits",4)
        else
            wx.wxMessageBox("Soft Limits are not enabled. Use Caution when jogging", "Step 4/5 - Soft Limits",4)
        end
        local spindleBox = wx.wxMessageBox("Do you wish to run the Spindle Warm-Up Routine? This will take approximately 5 minutes", "Step 5/5 - Spindle Warm-Up",2)
        if spindleBox == 2 then
            local cautionBox = wx.wxMessageBox("CAUTION! The Spindle is about to run. Verify no cutting tools are present. \n \nKeep Hands Clear!", "CAUTION!",16)
            if cautionBox == 4 then
                mc.mcCntlGcodeExecuteWait(inst,"M03 S500")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S1000")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S1500")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S2000")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S2500")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S3000")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S3500")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S4000")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S4500")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"S5000")
                mc.mcCntlGcodeExecuteWait(inst,"G04 P30000")
                mc.mcCntlGcodeExecuteWait(inst,"M05")
                wx.wxMessageBox("Spindle Warm-up Complete", "Step 5/5 - Spindle Warm-Up",4)
            end
        end   
    end
end


----------



## macardoso

Spent some more time on LUA over the weekend and was able to make some decent progress.

First off, I modified the ENABLE button to prevent the user from enabling the machine if any alarm conditions are active. Mach 4 already does this for the ESTOP, but not any of the other conditions I added (Cabinet temp, Pendant ESTOP, PSU OK, etc). Additionally, error messages are displayed telling the user exactly why the machine cannot be enabled.

The first condition is the only one where enabling the machine is allowed, and the API call mc.mcCntlEnable(inst, 1) handles enabling. All the other conditions display an error message and also reset the ENABLE button back to the unpressed state.



		Code:
	

local inst = mc.mcGetInstance()
local hSystemOK
local SystemOK
local hTempAlarm
local TempAlarm
local hPendantEStop
local PendantEStop

hSystemOK, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT1)
SystemOK, rc = mc.mcSignalGetState(hSystemOK)
hTempAlarm, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT12)
TempAlarm, rc = mc.mcSignalGetState(hTempAlarm)
hPendantEStop, rc = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT15)
PendantEStop, rc = mc.mcSignalGetState(hPendantEStop)
    
if (SystemOK == 1 and TempAlarm == 1 and PendantEStop == 0) then
    mc.mcCntlEnable(inst, 1)
elseif (SystemOK == 0 and TempAlarm == 1 and PendantEStop == 0) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: A DC Power Supply or Main Contactor has Failed")
    scr.SetProperty("tbutton2", "Button State", "0")
elseif (SystemOK == 1 and TempAlarm == 0 and PendantEStop == 0) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: Cabinet Over-Temperature Alarm is Active")
    scr.SetProperty("tbutton2", 'Button State', "0")
    elseif (SystemOK == 1 and TempAlarm == 1 and PendantEStop == 1) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: Pendant ESTOP is Active")
    scr.SetProperty("tbutton2", 'Button State', "0")
elseif (SystemOK == 0 and TempAlarm == 0 and PendantEStop == 0) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: Cabinet Over-Temperature Alarm is Active and a DC Power Supply or Main Contactor has Failed")
    scr.SetProperty("tbutton2", "Button State", "0")
elseif (SystemOK == 1 and TempAlarm == 0 and PendantEStop == 1) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: Cabinet Over-Temperature Alarm is Active and the Pendant ESTOP is Active")
    scr.SetProperty("tbutton2", "Button State", "0")
elseif (SystemOK == 0 and TempAlarm == 1 and PendantEStop == 1) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: A DC Power Supply or Main Contactor has Failed and the Pendant ESTOP is Active")
    scr.SetProperty("tbutton2", "Button State", "0")
elseif (SystemOK == 0 and TempAlarm == 0 and PendantEStop == 1) then
    mc.mcCntlSetLastError(inst, "Cannot Enable: Cabinet Over-Temperature Alarm is Active, a DC Power Supply or Main Contactor has Failed, and the Pendant ESTOP is Active")
    scr.SetProperty("tbutton2", "Button State", "0")
end


When the machine is enabled, and the DISABLE button is clicked, all the axes are dereferenced. I do this because I know the motor shaft will move slightly when power is removed and I don't want to mistakenly think that everything is perfectly in place.



		Code:
	

local inst = mc.mcGetInstance()

mc.mcAxisDeref(inst, 0)
mc.mcAxisDeref(inst, 1)
mc.mcAxisDeref(inst, 2)
mc.mcAxisDeref(inst, 5)
mc.mcCntlEnable(inst, 0)


Next, I started working on the absolute position recovery script. I noticed that when I asked for the drive's position, the numbers I was getting back were incorrect (compared to the hex values I saw on the serial line). I traced this back to my hex to decimal conversion code which assumed a 4 character hex length. The position data is returned as 8 characters so the two's-complement conversion was wrong. There may be a more elegant way to write this code, but now the conversion checks the length of the input string and selects the correct conversion based on that. I ran a huge number of test cases through this and it worked perfectly. The drive only returns data in packets of 2, 4, or 8 characters.



		Code:
	

----------------------------------
-- mcSerial.Hex2Num(string) --
----------------------------------
function mcSerial.Hex2Num(string)
    local hexNum = tonumber(string,16)
    if string.len(string) == 2 then
        if hexNum >= 128 then
            hexNum = hexNum - 256
        end
    elseif string.len(string) == 4 then
        if hexNum >= 32768 then
            hexNum = hexNum - 65536
        end
    elseif string.len(string) == 8 then
        if hexNum >= 2147484148 then
            hexNum = hexNum - 4294967296
        end
    end
    return hexNum
end


Before I added the complexity of doing absolute position recovery in the start-up script, I figured I should get it working on the Ref All Home button first. I modified the script to ask if I wanted to use the absolute data, or home normally. Here it is.



		Code:
	

--RefAllHome()

local HomeBox = wx.wxMessageBox("Do you wish to restore absolute position data from Servo Drives? \n \nChoose YES to restore homing data. \nChoose NO to Home to Limit Switches. \nChoose CANCEL to skip homing.", "Homing Type",18)
if HomeBox == 2 then
    local e1 = mcServo.AbsolutePositionRecovery()
    if e1 ~= 0  then
        wx.wxMessageBox("Home Position Recovery Failed! \n \n Axes must be referenced to switch before operation.", "Homing Failed",4)
    else
        wx.wxMessageBox("Home Position successfully read from Servo Drives", "Step 3/5 - Homing",4)
    end
elseif HomeBox == 8 then
    wait = coroutine.create (RefAllHome) --This is the code from the ref all home button
end


If I choose YES, then it calls the function mcServo.AbsolutePositionRecovery(). This function DOES NOT WORK right now, but I am really close. Basically it changes the Mach configuration to home in place rather than having the ESS handle the homing. It queries the drives for their current position, copies that into the homing offset, then runs a home in place. My current problem is that I need Mach to reload the config.ini file to make these changes apply. I will work on fixing this tonight.




		Code:
	

---------------------------------------------------------------
-- Absolute Position Recovery --
---------------------------------------------------------------

function mcServo.AbsolutePositionRecovery()
    local rError = 0
    local sError = 0
    local xPosition
    local yPosition
    local zPosition
    local sPosition
    mc.mcAxisSetHomeInPlace(inst, 0, 1)
    mc.mcAxisSetHomeInPlace(inst, 1, 1)
    mc.mcAxisSetHomeInPlace(inst, 2, 1)
    mc.mcAxisSetHomeInPlace(inst, 5, 1)
    mc.mcCntlSetLastError(inst, "Axes Set to Home in Place")
    local XctsInch = mc.mcMotorGetCountsPerUnit(inst, 0)
    local YctsInch = mc.mcMotorGetCountsPerUnit(inst, 1)
    local ZctsInch = mc.mcMotorGetCountsPerUnit(inst, 2)
    local SctsInch = mc.mcMotorGetCountsPerUnit(inst, 5)
    sError, xPosition = mcServo.GetPosition("00", XctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, yPosition = mcServo.GetPosition("01", YctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, zPosition = mcServo.GetPosition("02", ZctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, sPosition = mcServo.GetPosition("05", SctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    mc.mcAxisSetHomeOffset(inst, 0, (xPosition*-1)) --Need to multiply by -1 to invert the counts (because the drive polarrity on all these servos is inverted)
    mc.mcAxisSetHomeOffset(inst, 1, (yPosition*-1)) --Need to multiply by -1 to invert the counts (because the drive polarrity on all these servos is inverted)
    mc.mcAxisSetHomeOffset(inst, 2, (zPosition*-1)) --Need to multiply by -1 to invert the counts (because the drive polarrity on all these servos is inverted)
    mc.mcAxisSetHomeOffset(inst, 5, (sPosition*-1)) --Need to multiply by -1 to invert the counts (because the drive polarrity on all these servos is inverted)
    mc.mcAxisHome(inst, 0)
    mc.mcAxisHome(inst, 1)
    mc.mcAxisHome(inst, 2)
    mc.mcAxisHome(inst, 5)
    mc.mcAxisSetHomeInPlace(inst, 0, 0)
    mc.mcAxisSetHomeInPlace(inst, 1, 0)
    mc.mcAxisSetHomeInPlace(inst, 2, 0)
    mc.mcAxisSetHomeInPlace(inst, 5, 0)
    return rError
end


I'm really happy with the progress. I think I might go back and recap my to-do list.


----------



## macardoso

OK, copied from earlier in this thread, here are my to-do items (I added a few not on the original list:


Rebuild spindle - *DONE*
Install spindle motor, belt drive, and drawbar - *DONE*
Remove old CNC components - *DONE*
Install axis motors and mounts - *DONE*
Install electrical cabinet - *DONE*
Install limit/home switches - *DONE*
Install wireway and cable routing - *DONE*
Install touchscreen computer - *DONE*
Migrate to Mach 4 - *DONE*
Validate system functionality - *DONE*
Performance characterization - *DONE*
Mach 4 Pendant Configuration - *DONE*
Mach 4 LUA Scripting & Servo drive serial communications
Pneumatic drawbar release  - *DONE*
MPG functions - *DONE*
Cycle start, hold, and stop buttons - Didn't get it to work on first attempt, need to revisit
Spindle Enable/Disable - Works, but I need to interlock it with the Cycle Start button, homing, etc. Maybe I will just remove?
Spindle Orient - Button is on the screen but not scripted, is this needed?
De-ref all when disabled - *DONE*
Auto Enable Soft Limits - *DONE*
Power On cycle/Start-Up Menu Script - Mostly done except for absolute homing code
Stop machine for faults and alarms - *DONE*
Drive Serial Communications - *DONE*
Spindle Load Meter - *DONE*
Absolute Homing - Actively in progress and should be done soon!
Rigid Tapping - Mapped out on paper, low priority until everything else is done
Gear Hobbing - Same code as rigid tapping. 
Fix Cycle Timer - Stock cycle timer code not working for some weird reason, need to investigate


----------



## macardoso

I went on quite the adventure to get this absolute homing code working on Mach 4 but I did it!

For those of you who have absolutely no clue what I am talking about, my CNC has servos on all the axes (Allen Bradley MPL motors with Ultra 3000 servo drives). The motors have a multi-turn absolute encoder that records the position of the motor shaft AND the number of turns relative to a zero location (up to 4096 revs). I developed a serial interface between Mach 4 and the drives which allows me to query them for information. In this case, since the drive always know exactly where the motors/axes are at (even if Mach 4 doesn't), I can ask them for the exact motor position.

Using this, instead of homing each axis to a limit switch every time I turn on the machine, I can just copy that position data into Mach 4 and define home relative to that. It happens in under a second and is extremely accurate.

I won't get into the nitty gritty details of the issues I had, but trust me it wasn't very straightforward to get Mach 4 like to home to that data. It required the programmatic switching between homing in place with a variable offset while still retaining the ability to home to switches if I want to redefine the home position.

Here is the code:  



		Code:
	

function mcServo.AbsolutePositionRecovery()

    local rError = 0
    local sError = 0
    local xPosition = 0
    local yPosition = 0
    local zPosition = 0
    local sPosition = 0

    mc.mcAxisSetHomeInPlace(inst, 0, 1)
    mc.mcAxisSetHomeInPlace(inst, 1, 1)
    mc.mcAxisSetHomeInPlace(inst, 2, 1)
    mc.mcAxisSetHomeInPlace(inst, 6, 1)
    mc.mcProfileSave(inst)

    wx.wxMilliSleep(100) --Sleep 100 milliseconds

    local XctsInch = mc.mcMotorGetCountsPerUnit(inst, 0)
    local YctsInch = mc.mcMotorGetCountsPerUnit(inst, 1)
    local ZctsInch = mc.mcMotorGetCountsPerUnit(inst, 2)
    local SctsInch = mc.mcMotorGetCountsPerUnit(inst, 6)
    sError, xPosition = mcServo.GetPosition("00", XctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, yPosition = mcServo.GetPosition("01", YctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, zPosition = mcServo.GetPosition("02", ZctsInch)
    if sError ~= 0 then; rError = 1; return rError end
    sError, sPosition = mcServo.GetPosition("05", SctsInch)
    if sError ~= 0 then; rError = 1; return rError end

    mc.mcAxisSetHomeOffset(inst, 0, (xPosition*-1))
    mc.mcAxisSetHomeOffset(inst, 1, (yPosition*-1))
    mc.mcAxisSetHomeOffset(inst, 2, (zPosition*-1))
    mc.mcAxisSetHomeOffset(inst, 6, (sPosition*-1))

    mc.mcAxisHomeAll(inst)

    wx.wxMilliSleep(100) --Sleep 100 milliseconds

    mc.mcAxisSetHomeOffset(inst, 0, 0)
    mc.mcAxisSetHomeOffset(inst, 1, 0)
    mc.mcAxisSetHomeOffset(inst, 2, 0)
    mc.mcAxisSetHomeOffset(inst, 6, 0)

    mc.mcAxisSetHomeInPlace(inst, 0, 0)
    mc.mcAxisSetHomeInPlace(inst, 1, 0)
    mc.mcAxisSetHomeInPlace(inst, 2, 0)
    mc.mcAxisSetHomeInPlace(inst, 6, 1) --Leave Spindle as Home in Place
    mc.mcProfileSave(inst)

    wx.wxMilliSleep(100) --Sleep 100 milliseconds

    return rError
    
end


All of this to get the right numbers into these DROs (without using work offsets) and to set the red LEDs on the left to green.




The script manipulates the check marks in the "Home in Place" column.




With this, I should be able to quickly finish up the Start-up script without issue.


----------



## matthewsx

Very nice, thank you for sharing your code. Even though I'm using Linux CNC understand the concepts is a great help and who knows, I may switch to Mach in the future. I'm just about to the point in my project where I can turn my attention to the software side of things....

Cheers,

John


----------



## macardoso

I have a feeling that lots of posts about programming might not be the most exciting thing on a machining forum, so I thought I would go back and make a few posts about some of the work that wen into this machine before I started recording it on this forum. I'll keep posting about the code for those who are interested, but right now I'm mostly doing boring changes to the error handling .

This rebuild started when I got my hands on some old servo equipment from work. I lived in an apartment and was really missing doing project like I did in college. Unfortunately since I was new to the area, I didn't know anyone who was involved in these hobbies or any machine shops nearby.

I figured that building an electrical panel was doable in an apartment setting (I kept it under the guest bed) and I got to work.

I scored a 24x36x8" enclosure off of eBay figuring it was twice the size I could ever need (ha).




I decided to do some extra planning by modeling the enclosure and components in CAD. I use Autodesk Inventor.




I think that opting to model the panel really saved me as I was able to figure out wire spacing and routing ahead of time.




I used a 1/8" aluminum sheet as a subpanel and began laying out the components. I picked up a cheap rivet nut gun to put threaded holes into the panel. This was super handy to be able to screw all the components in from the front, rather than my old panel which had nuts on the back.




I stuck with simple breakout boards for the Ethernet Smooth Stepper this time since I felt that the fancy breakout boards can be more of a hindrance sometimes. The circuit boards with the red LEDs are voltage translators for converting back and forth between 24V and 5V.  Most of the automation gear was either junk from work, AutomationDirect, or import stuff from eBay. The panel is wired to support either 120V or 240V at 60A, but it is only currently hooked up to a 240V 35A feed.




Ethernet Smoothstepper from Warp9TD and a C25 breakout board from CNC4PC.




A generic IDC-26 breakout board. The ESS doesn't follow "normal" pinout for the IDC-26 connectors so the screen printed labels do not match.




The voltage converter boards are easily found on eBay or Amazon. 




The main disconnect is a Socomec from AutomationDirect and lets me mount a remote operator on the front of the door. The AB C30 contactor powers up the servo drives separately from the logic components. The "B10" contact on the side is part of a "System OK" input into Mach 4 along with the power supply status.


----------



## matthewsx

Awesome work there, keep the photos coming


----------



## macardoso

At first, I din't expect to need many terminal block connections. I installed 50 or so AB 1492-J4 terminals to be used for whatever I needed.




Automation Direct had a good deal on these Meanwell power supplies. They are very compact. The white cards to the left are slim AB single pole relays. 




I quickly realized that I didn't have enough room for all seven 2-pole breakers (main + 6 drives), so I made a two tier DIN rail setup. This is the least professional part of the panel but it worked for me. I can still reach the lower breakers if I need.




Here is a closeup of the servo drive. AB connectors for the encoder and I/O ports are crazy expensive so I bought the solder cup type off of ebay for a few dollars. I don't have any pictures of it, but I probably spent weeks soldering all the connections. It worked, but I wouldn't wish that on anyone! The encoder is a 3 row DB15 (like VGA) and the I/O is a DB44.




Here is the panel mounted in the enclosure.




Skip ahead, and here I have some barebones wiring done. I was having some really weird faults on the drives and was testing with Mach 3. At first I thought it was noise (hence the tin foil) but later I figured out it was an obscure issue with the way I wired single ended signals into the drive I/O port.




Voltage converter boards wired. I used solid core hookup wire with Panduit ferrules and wire labels froom Brady.




Here is another less than ideal place in my panel. The contactor served as a great place to distribute wiring from, but I ended up shoving more wires into the contacts than I should have. In hind sight, get a bigger panel and use more terminal blocks...




Didn't yet have all my circuit breakers in yet, but here is how it was starting to get populated.




and the control signal connection to the ESS on top, and the I/O cables to the drives (colored wires) on the bottom.




Power entered through a right angle cord gland. you can see the disconnect operator floating in the air. The little M12 connector near the top is a disconnect to shut down the contactor. This let me power cycle the drives without shutting down the whole cabinet. The black squares are 120V accessory outlets that can be switched on and off by those relays mentioned above.




On the other side I installed (starting from the top, left side of image) a connector for the Ethernet connection to the ESS, 12 M12 ports for connecting limit switches and various I/O, and 4 rows of cable glands for the servo cables.


----------



## macardoso

I don't really have any pictures of the rest of the build of the panel in my apartment, but I pretty much just ran the servo cables and stopped there. I toyed around with an automatic tool changer for the mill for a while and then shortly after I moved to a house with a basement. The rental company was kind enough to set up extra electric service in the basement for me. I still don't know why!

I was able to get the mill from my parents house and move it into the basement. Here is a shot of the Hoss Machine style conversion I had been using.







And a crappy shot inside the old control panel.  I kept having these cheap stepper drives from OMC stepper online die on me. So annoying.




Before my mill showed up, I bought my first lathe (and joined HM!). I got to really use it for the first time to make the servo motor mounts for the conversion.  This was truly the first piece of material that lathe held on to.




Using a parting tool and a hacksaw, I was able to cut the 4x4" aluminum bar into pieces for the mounts.




The pieces were squared in the lathe using the 4 jaw chuck. It was much faster than milling them square.




While looking back through these pictures I came across the first picture I ever took of the kittens we adopted off the street. Had to share   They are lovely year and a half old cats now.


----------



## macardoso

Partly because I was enamored with the lathe and partly because I was having issues with the CNC, I did as much work on the lathe with a boring bar as I possibly could. I really struggled with the milling on these parts due to the limited Z clearance and travel of the mill.

Here I was counterboring the holes for some cap screws on the Z axis using a 3/8" diameter 6" long carbide endmill.




Similar machining on the Y axis mount. I had to turn the vise on its side for extra clearance.







The large center bore and the bearing holes were completed on the lathe. A large bottom facing slot gives clearance to get a wrench into the mount to tighten the coupling.







CNC made it very easy to do this slot.




Here are the 3 finished mounted before cleanup and painting.







To paint them, I baked them in the oven to 350*F and sprayed them outside with a metal primer and Rustoleum paint. I did thin coats with a day to dry then 2-3 hour bake cycles at 200*F in between each. Maybe 10 coats in total? I found the finish to be superb and much tougher than 1 coat of paint left to air dry. It has been extremely durable.




I made some shoulder pins from scrap aluminum to plug all the holes.




Some extra machining ended up being needed on the Y axis, so the paint was removed, machining done, then repainted.







The odd floor finish comes from the machine taking many passes to remove the material. It is extremely smooth though.




Zoey turned into a shop kitty!


----------



## macardoso

Another key part I worked on was the spindle top hat which is used by the power drawbar to release tools. This was the first internal thread I ever cut and it was against a shoulder. I made many test parts in aluminum to dial in the fit of the thread to the spindle. Unfortunately the spindle threads were completely non-standard, so it mostly took trial and error to get the right fit.

The real part was made from 41L40 steel, a first for me, which machined beautifully.

Here was a scrap test part in aluminum. My lathe always made those wavy patterns on threads, but I haven't figured out why. If you have any idea, I would love to hear it.




Here is the steel part, save wavy pattern. The threads work fine but it is ugly.




Whenever I have a bunch of parts to make, I print out my dimensioned drawing on a sheet of 11x17 and set it on my workbench with the required piece of stock. It helps me stay focused and productive. Also cat...




Here is the nearly finished top hat. I added two holes for a pin spanner wrench later on.




The drawbar is inserted through the top hat on this side with a stack of beville washers. The washers sit inside this bore.




Here is a shot from the back.


----------



## macardoso

This is the way I normally work when using the CNC. This was before converting it to servos.




This is the motor mount plate for the spindle.




Next I sized and squared up the large block of aluminum that would become the spindle mount and belt guard. It was designed to be nearly air tight to minimize belt noise.







Trying to measure then length 




Tools for this part loaded and ready to go.




Whoops! Trying to machine a very deep very narrow slot with an XL 1/8" endmill.




More machining on the first side using my favorite tool, a 3/8" ALU-POWER endmill from YG1.







Finished with side 1




Pocketing out the bottom. Off camera, I drilled a screw access hole in the side of the part for accessing the spindle motor pulley set screw.




Finished







On the left is the machine spindle and tophat, on the right is a slotted system to hold the spindle motor and pulley.




A glued in wool felt disk help keep dust out and noise in. The top hat rubs against this.


----------



## macardoso

Here is a test fitting of the assembly. You can see the square nuts retained in the slots, and the top hat fed through the felt disk.




Spindle assembly with 1.8kW 5000rpm servo motor and air cylinder







Here is the top hat assembled. When installed on the machine, it floats just clear of the black plate and holds the drawbar. The piston of the air cylinder sits overhead and squeezes the drawbar to release the tool. The black plate rides up and down on the ground shoulder bolts to grip onto the top hat.

The rectangular block behind the top hat pushes on the motor to help set the belt tension.




To cut the keyways in the spindle pulley, I made a custom double sided broach. This helped me cut 2 5mm keys exactly 180 degrees apart.


----------



## macardoso

I've been noticing my Z axis has a lot of backlash right now and I suspect the bolts between the Z axis slide and the ballnut bracket have come loose. I managed to strip out one of the two threads many years ago and I'm sure the one bolt by itself wasn't up to the job.

Rather than disassembling it, finding the problem, putting it back together, making a replacement part, taking it apart, fixing it, and putting together again, I plan on just jumping straight to making the replacement. If I'm wrong, the part needed to be replaced anyways.

This is a part directly from the Hoss Machine conversion plans and is very simple. Most tricky part is a 1.125-18 UNEF thread for the ballnut. I can threadmill or single point this on the lathe, don't know which is easier.

I had a piece of material with the right cross section from the get go which made this really easy. I don't have a bandsaw, so I used a 3/8" ALU-Power endmill to slot off the part. This was keyboard jogging, 2200rpm, 6 ipm, .375 depth of cut. This made great chips and sounded awesome. Used 50% of the spindle torque and around .64 HP.




After having to flip the part to reach the final cut, the first chunk of stock was removed.




Here is that endmill. It really performs well.




Used a 3/4" 1.5" L endmill to clean the face in one pass.




After marking out my final size, I sliced off another chunk in the same way as before.







Cleaned up before working on the actual features. For punching this out extremely quickly, I was happy to hold +/- .004 on all dimensions.




The last operation I finished yesterday was to drill the hole which will become the 1.125-18 thread. The was done in one shot with a 1/2" twist drill.

700 RPM, 3"/min, 95% spindle torque, 0.39HP (.327 calculated value, dull tool)




Will post more pictures as I finish this up. Supposed to be a quick N' dirty part.


----------



## macardoso

Finished some more work on this part. First was to bore the large hole out so I can get a good surface on which to indicate this part in on the lathe.  I opted to thread this on the lathe so I can test fit the ballnut as I work.




Unfortunately I screwed up by making a change to the width of the part that wasn't shown on the print. This caused the hole to be 0.050" off center. No problem however, I just moved the boring bar to the correct location and re-bored the hole slightly larger. I still have lots of material to remove before I hit the thread minor diameter.




Here is the print I am working to, with some chicken scratch markups to handle the slightly wider part.




I have 16 tools queued up and recorded in the CNC control. Makes using MDI input easy to punch out these simple parts.




Now I flipped the part on its side to drill the two holes which mount the Z axis head to the ballnut, as well as a deep hole which allows a brass tipped setscrew to lock the ballnut into this block.




I added the side relief using a 3/4" 4F endmill. This must have some wear as the resulting wall varies by a few thou but is not tapered.




Drilled and tapped the 3 holes. The 5/16-18 holes are 1.25" deep (my 0.5" deep holes before just stripped out) and the 1/4-20 hole is 2" deep. Unfortunately my longest tap only reached 1" so I had to figure out another option.




I could have bought as $50 reduced shank long length nut tap, but instead I just drilled out the first 0.8" of the thread to clear the body of the tap. This let me tap the full length. Looks a bit silly though.




Final operation will be to bore and thread this on the lathe. Hoping to get that done tonight.

I'm also having a weird issue that just popped up where my X axis makes little ticking sounds and is slowly drifting out of position. This is very intermittent and is occasionally accompanied by the X axis drive faulting with an Aux Encoder Error (the command from Mach 4 goes into the aux encoder port). This means it is getting an illegal state transition on one of the inputs. I'm pretty sure my noise issues are back.

I don't know what changed since I was running this for weeks without issue, but as soon as I started worked on this part, I started getting noise.

I have a good plan to deal with it:

Stop noise at the source by installing ferrite toroids on the servo drive outputs. I have a pair of rings for each drive which should suppress the 4kHz carrier frequency of the drive and all harmonics up to 15MHz.
Install clamp on ferrite chokes to all of the signal cables coming into the drives. These are broad spectrum chokes and should allow the 5V signals to pass without impedance, but suppress spikes due to noise.
Verify that the Step - and Dir - inputs on the X axis drive are not shorted to GND or DC com. This drive is weird and needs those floating for single ended inputs. When I first built this panel I was getting this same fault due to tying these pins to DC COM.
Install a 1N4007 diode on each solenoid coil to suppress EMF flyback when using the Power Draw Bar
Install common mode chokes on all the M12 I/O cordsets
Install common mode choke on PC power cable
If needed, install additional shield braid over the X axis control cable and bond it to the subpanel.
If all else fails, I bought a new DB44 connector and shielded cable to replace the control wiring to the X Axis drive. I can do some better stuff with the shielding on that cable than I did in the past.
If all of that fails too, I can replace the X Axis drive with a spare.
Try coiling the spindle motor cables in a figure 8 pattern.
If even that fails, I can cut the spindle cables to length (I left them 90' long because I couldn't bear to cut the cables I just paid a bunch of money for).
I plan on hooking up my oscilloscope to the X Axis step and direction lines so I can watch what difference each of these strategies makes on the issues. I will record what the change in measured voltage is, as well as the dominant frequency.

Finally, I have a few other things in the electrical cabinet I want to finish up:

Finish marking up my AutoCAD electrical drawing package for this cabinet and verify the wiring connections match my drawing. This will be a very useful document if I need to troubleshoot something down the road.
Install labels on the terminal blocks which correspond to the wire number at each point.
Fix the fan connection inside the Z axis servo drive (not working currently)


----------



## macardoso

Finished up the replacement ball nut mount over the weekend. Bit more complicated than expected but very happy with the results.

First I took the parts off the mill and added sticky backed plastic material to protect the part while clamping in the lathe.




Next the part was centered on the 4 jaw chuck using a .0005" dial test indicator. I found the bore of the hole to be out of round by a little under a thou after boring on the mill. Not sure what that was about?







I used a small boring bar (CCGX) and a indexable threading tool (16IR) to finish the bore and create the threads.




I got the thread dimensions out of the Machinery's Handbook. These were my starting point and final fitment was done with the mating part.




Boring is complete. Hit the diameter right in the middle of the range for the minor diameter.




Before I started threading, I wanted to get the actual ballnut out of the machine so I could get the fit of the thread exactly as I wanted it. This was no small task and I will attach a few pictures below of the process required to extract that part.

Remove air hoses...




Remove servo cables, PDB pushbutton connection, remove head...




Remove Z axis slide, remove computer, remove monitor mount, remove Z axis motor, remove Z axis motor mount, remove Z axis bearing block, remove Z axis limit switch, remove Z axis gas strut, and disconnect cables from back of column. All this to get to an access hole in the back of the column to loosen a locking screw on the ballnut mount.

Looking quite frankenstein right now...




There's the access hole.




Continued on next post - too many pictures    

-Mike


----------



## macardoso

Started cutting the threads. Used steel blue and a scratch pass to make sure I got the right thread pitch.




I had some issues with understanding my thread dial chart and ended up nearly destroying the threads by engaging at the wrong time. If anyone can explain to me how to interpret the 18TPI entry on this thread chart, I'd really appreciate it!




After several passes and a few spring passes, I got a really nice fit to the ballnut. I normally get a lot of chatter while threading, but it came out really nice this time.




Here are the two parts, old one on the left was threadmilled on my Sherline while the right one was threaded all the way through on the lathe.




Threads look really great. Chamfer with a hand tool, not so much. Threads have a small amount of chatter but not much.




The old one on top has the two large holes stripped out. They were only drilled 1/2" deep and I guess I used the stock screws that came with the machine which only had 2-3 threads engaged into the block. The new one (bottom) has 1.5" of threads.




You can clearly see the poor state of the threads here. No wonder I had .125" of backlash


----------



## macardoso

While I had the ballscrew out on the table, I figured I would try repacking it like I did with my X and Y axes. I had a cardboard lid with finger cutouts that made a great container to catch the balls.




Removing the ball track.




I ended up removing all the balls, counting and measuring them individually. They were 0.1257" within a tenth or two. I decided to replace half of them with new balls that measured .1278" alternating every other ball. 

This screw went from freewheeling loose to quite tight with this change. I can rotate the nut by hand, but not by pinching it between my thumb and index finger. This may shorten the life of the screw, but I know the motor (2.25 HP) won't have problems moving it. There is zero backlash in the screw now.  If the screw gets worn, I will be fine replacing it with a better one.




The final balls (and a bit of extra space) are packed into the return tube with some bearing grease, then reassembled.




The ballnut and new block are reassembled onto the machine. Thanks to a new front facing access hole, the locking screw can be removed without removing the computer and monitor mount in the future. 




New bolts from Home Depot (ugh so expensive) engage much more of the threaded hole and were torqued tight with Loctite. The other 4 bolts are longer than the stock bolts and hold down the Z axis bearing block at the top of the column.




Machine is coming back together. About 4 hours into it at this point.




New bolts ended up going here.




While I was working on everything, I decided to check on the state of the spindle belt. Absolutely zero dust since the first issues I had with it. Happy about that.




A little black grease/oil is thrown around the wall of the spindle housing. Not sure where it is coming from. Shouldn't be a problem.




Finally I retuned the Z axis servo. With the tighter screw, I could set the servo gains much higher than I could before without causing instability. 

I started with the gains in the image below and got the gains after turning to:
-P = 400
-I = 125
-D = 0
-Kp = 23.00
-Kd = 0.00
-Kvff = 100
-Ki = 2.25

I was testing a 5" move at max accelerations and speed for the axis. Before tuning the motor would reach .008" position error during the very aggressive acceleration moves and I got that down to .0006" after tuning. During constant velocity, static positioning, or less aggressive moves (i.e. normal machining) then error was less than .0001" at the motor shaft. These values don't show mechanical errors of the machine, but it is a great starting point.

I do notice with the much tighter gains that the noise from each motor step (really the pulse from the ESS) is much louder than before. I may roll these tuning gains back just a touch purely to reduce this noise.


----------



## macardoso

Last night, I started working on the EMI/noise issue. 

Here is the cabinet before I start tearing it apart 













The computer is able to flip backwards which is handy for troubleshooting.







I have my Fluke Scopemeter setup to measure the Step and Direction inputs right at the X axis drive connector.




The leads are clamped directly to the pins on the DB44. Trying hard to make sure nothing shorts here.




The connector is pretty tight.




I hope to get a baseline for the level of noise tonight, then I can start working on reducing it.

My noise margin is 1.2VDC on the 5V input. I need to make sure that no noise spike ever gets above this level or it may be registered as a step by the drive (if the spike gets above 3.8VDC) or otherwise will cause a fault. Both are bad!


----------



## BGHansen

Nice work as usual.  Regarding your thread indicator table, it's "probably" similar to my Grizzly G0709.  Mine is numbered 1 - 4 at North, East, South and West with tick marks in between.  Here's how mine works:

"ALL" means any number is good, no alignment required.  
"1 - 4" means hit 1, 2, 3 or 4 or hit any of the numbers right on the number (guess you should be able to hit the ticks between also).
"1" means engage just on "1".  Seems like in reality you could pick any number and continually hit that number.
"1 & 3" means numbers across from each other are good.  So hit either 1 or 3, or hit 2 or 4.

I'd interpret your chart to mean:

"1" is pick a number and only hit that number
"1 - 4" means hit any of the numbers at 90's
"1 - 8" means hit any spot, no alignment needed
"1-3 / 2-4" means hit the same number or the number on the opposite side of the dial.

I'm guessing if it's crossed out or blank (like 4 1/2, 4 3/4, 5 1/2, etc.), you can't do the thread.

Might be worth chucking up a 1/2" - 13, 3/8" - 16, 5/16" - 18 and a 1/4" - 20 and set the QCGB to that particular thread.  Set a threading tool close to the thread, then engage the half-nuts on a number.  Adjust the cross feed and compound until you touch the thread (push the carriage to the right to take up the slop in the half-nuts) until your tool is square in the thread.  Zero out your compound and cross feed.  Back off the cross feed, disengage the half-nuts, and rotate the spindle by hand until the next target number comes up.  Re-engage the half nuts and crank the cross feed back to zero.  You should be aligned if I'm interpreting your table correctly.

More details (always more details . . . ).  Naturally, doing the check above, your targets will change based on the thread.  For the 1/2" - 13, you'll want to pick a number and stay with it ("1" on your chart).  For the 3/8" - 16, try any spot on the dial.  For the 5/16" - 18, hit the same number or the one on the opposite side.  For the 1/4" - 20, hit just the whole numbers or whatever is 90 degrees apart.

Hope that helps!  Really stinks to split a thread after all of the work to machine the part in the first place.

Bruce


----------



## macardoso

BGHansen said:


> Nice work as usual.  Regarding your thread indicator table, it's "probably" similar to my Grizzly G0709.  Mine is numbered 1 - 4 at North, East, South and West with tick marks in between.  Here's how mine works:
> 
> "ALL" means any number is good, no alignment required.
> "1 - 4" means hit 1, 2, 3 or 4 or hit any of the numbers right on the number (guess you should be able to hit the ticks between also).
> "1" means engage just on "1".  Seems like in reality you could pick any number and continually hit that number.
> "1 & 3" means numbers across from each other are good.  So hit either 1 or 3, or hit 2 or 4.
> 
> I'd interpret your chart to mean:
> 
> "1" is pick a number and only hit that number
> "1 - 4" means hit any of the numbers at 90's
> "1 - 8" means hit any spot, no alignment needed
> "1-3 / 2-4" means hit the same number or the number on the opposite side of the dial.
> 
> I'm guessing if it's crossed out or blank (like 4 1/2, 4 3/4, 5 1/2, etc.), you can't do the thread.
> 
> Might be worth chucking up a 1/2" - 13, 3/8" - 16, 5/16" - 18 and a 1/4" - 20 and set the QCGB to that particular thread.  Set a threading tool close to the thread, then engage the half-nuts on a number.  Adjust the cross feed and compound until you touch the thread (push the carriage to the right to take up the slop in the half-nuts) until your tool is square in the thread.  Zero out your compound and cross feed.  Back off the cross feed, disengage the half-nuts, and rotate the spindle by hand until the next target number comes up.  Re-engage the half nuts and crank the cross feed back to zero.  You should be aligned if I'm interpreting your table correctly.
> 
> More details (always more details . . . ).  Naturally, doing the check above, your targets will change based on the thread.  For the 1/2" - 13, you'll want to pick a number and stay with it ("1" on your chart).  For the 3/8" - 16, try any spot on the dial.  For the 5/16" - 18, hit the same number or the one on the opposite side.  For the 1/4" - 20, hit just the whole numbers or whatever is 90 degrees apart.
> 
> Hope that helps!  Really stinks to split a thread after all of the work to machine the part in the first place.
> 
> Bruce




Thanks for the feedback Bruce! It was sure frustrating but I ended up with a nice thread. I kept engaging on the "1" and it wasn't lining up right. I got frustrated and switch to "metric style" keeping the halfnuts engaged and reversing the lathe. It was a pain but it worked. When I have some free time I think I'll run some practice pieces and see what went wrong.


----------



## BGHansen

Wow, that should have worked fine. You'd have to suspect that either your lead screw is not imperial (probably 8 tpi) or something is wrong in your quadrant gears. I think I've read on this forum that guys have had a gear with the wrong number of teeth in either their quadrant or qcgb.

Fortunately you obviously have what it takes to figure it out pretty quickly. 

Bruce


----------



## macardoso

I've cut plenty of great threads with the lathe and never had issues with the threading dial or gearbox. My guess is that I was goofing and not closing the halfnuts completely.


----------



## spumco

macardoso said:


> I found the bore of the hole to be out of round by a little under a thou after boring on the mill. Not sure what that was about?



I think the sticky foam between the chuck jaws and the part contributed to the dimensional issue.  Since one of the four faces was clamped without foam, that side didn't move when it went past the tool.  The other three faces may have moved slightly under tool pressure.  And I'm sure you didn't have the jaws clamped down super-tight as you were trying to avoid marring the part.

I'm guessing that if you mapped the hole at fairly tight increments it's not simply 'out of round' - but more egg-shaped, with the non-tape side being a bit larger than the other direction.

You might run a similar test again - same material and 3 of 4 jaws with foam tape.  If you find my suspicions are correct you can switch to using copper sheet as jaw liners.  If you need adhesive to keep the shims/liners in place a bit of spray adhesive would work well and be thin enough not to affect clamping pressures much.

Of course, some snap-on copper chuck jaw liners are always handy to have and aren't too difficult to make.

As an aside, if you find that your Z-axis is getting backlash in the future you might consider making a replacement nut block from steel.  My first thought when I looked at it was _'why isn't he using steel thread inserts?' _but the small holes are essentially in shear and you've increased the thread depth significantly.  If it starts to stretch or deform from high Z loading (rapid reversing, heavy drilling, crashing) I don't think inserts would help much.  I think the only answer would be a stronger base material.  A chunk of cheap hot rolled steel would be great here.

Looking good, keep it up!


----------



## macardoso

Spumco, The sheets I used are a hard phenolic with thin adhesive backing. I figured they'd be hard enough, but you are most likely correct. My confusion came about since the error in the hole came up before I made any cuts on the lathe. Just when centering it in the 4 jaw chuck. I wonder if it happened since there were 2 "strong" sides to the part and 2 "weak".

I would love to make copper jaws, but have never gotten around to it.

Steel definitely would have been the best choice here, but I still avoid cutting steel when possible on this machine, although maybe that's why I need to do it more. Also I had the aluminum on hand


----------



## macardoso

I took a half day off work on Friday to work on getting the machine free of noise problems. Good news is that I was able to fix it! Here is the process.

I started off by measuring the noise present at the X axis command input pins (Step = RED, Dir = BLUE). I added a grounded shield plate between the scope probes and the Y axis drive, since I was getting some noise artifacts from the drive output due to the proximity to the motor cable.







My starting values for noise were 1.3V at 16kHz on the Step signal and 0.3V at 8/16kHz on the Dir signal. These are the brief spikes in the scope image. The square wave visible on the Blue line are artifacts from the Y axis drive.

After running lots of tests, I figured out that the spindle drive was producing 75% of the total noise, regardless of if the motor was enabled or not. Here is a scope trend of the other 3 drives enabled, but the spindle drive powered off.




I decided to start by installing some broad spectrum ferrite cores on the control cables going to the drives, but these ferrites don't attenuate much noise at these low frequencies so they did very little. Still they will help with noise in general, so not a bad idea to install them.




I also recoiled the long spindle cables into figure 8 patterns (really helps cut down coupled noise when coiling cables). They were stored inside the base of the mill again, but this time I added a big aluminum plate between them to help shield the feedback cable from emmissions.




Next I added a pair of EMC ferrite toroid cores on the output of the spindle, hoping that the noise was coming from the cable. The blue core is a nanocrystaline core which is very effective from relative low frequencies up to 15MHz or so. The black core helps at even higher frequencies. I needed an extra 10 inches of cable stripped back to get this installed.







Finally I disassembled the drive itself looking for anything which might indicate a piece of failing hardware. At this point I was expecting to have to replace the drive (found a spares on ebay for $100-200). As I was finishing putting it together, I noticed that unlike the other 5 drives, the case of this one was entirely powder coated. I checked it with a meter and found it to be completely insulated from the rest of the drive. Huh... odd..

I took a knife and scraped away the paint by the mounting holes so that the case of the drive would get a good bond to ground. The spindle drive was a series A hardware build, while the other 5 I have are series B or C. They must have changed the design at some point to start using galvanized casings for the drives.









After installing the drive again with these changes, I powered it on and took some new measurements. Note that the voltage scale has changed in this image from 1V per division on each signal to now 200mV on Step and 100mV on Dir. 




With all these changes, I now am getting 0.55V on Step and 0.12V on Dir. This is awesome! I am perfectly content with these numbers and after a few hours of testing I have gotten no faults or extra steps registered. I decided to be done at this point, but I can always go back and add additional EMC cores and filtering capacitors on the other drives if needed. In all I got a 65% reduction in the noise received on the X axis signals.

Here was my testing setup.


----------



## macardoso

Since i had a little time left over yesterday, I went through and added terminal block labels on each connection. These are printed plastic tabs with a clip on the back. Ideally you install these BEFORE attaching the wires, however I had to do it the other way around... 

This was a bit like playing the game operation. I had a small screw driver covered in tape that I would stick a label to. I then reached all the way to the back of the panel to snap it into place. If I bumped a wire, the label would fall off and I'd have to go fish it out. 










Here was my pile of labels! What a pain.




This also provided a good opportunity for me to go through a double check all the wiring. I have a half complete set of electrical schematics which I hope to finish up and match the actual panel.




I'm happy with the progress. I really need to come up with a project so I can use the machine!


----------



## macardoso

Its been quite a while without an update here!

I spent a good two weeks trying to identify an issue which would cause my machine to move unexpectedly and violently every time I enabled the motors, tried to home the machine, or jogged in any way. After recording a ton of data and presenting it to Warp9TD, we were able to find that the was an anomaly in their code/interface with Mach 4. Andy was extremely helpful and they were able to correct the issue immediately in the next release of the plugin. Everything seems to be working great now! 

I wanted to try out the machine with the latest features I added. To do this, I drew up a slightly complicated part up in Inventor. Rough size is 4x2x1".




This was programmed in MasterCam. There were 9 tools used in 10 operations.

3/4" endmill used to face the part
3/8" ALU-Power endmill: Dynamic roughing and island facing
#3 Spot drill to spot the 6 drilled holes
1/2" endmill to drill the 4 large holes. This was the first time I used the chip break canned cycle. It worked great!
3/8" endmill to drill the smaller holes. Also used a chip break canned cycle
5/32 endmill to clean up what the 3/8" endmill left behind. I used a dynamic rest machining operation which was very efficient. This tool also did a contour to finish the walls of the cylindrical bosses.
1/4" endmill to rest machine the lower profile (too deep for the 5/32) and finish.
3/8" ALU-Power endmill again to do a helical bore on the larger center bore. 
1/4" ball endmill to finish the central boss inner wall and cut the 1/8" radius on the floor
1/4" Chamfer endmill to cut a 0.020" chamfer on all edges
All the tools were preset in Tormach Tooling System (TTS) compatible holders and loaded into the Mach 4 tool table.




Here is OP6 rest machining shown in MasterCam.



Here are a few pictures of the process. I also have a couple of short videos if anyone is interested. I can't seem to post anything longer than 18 seconds so it is rather limited. If you could tell me how I'd really appreciate it.







And the finished part right off the machine. Material was solid PVC. Tool marks are super visible because it is dark plastic, but the surfaces are very smooth. If I were to run this part again, I would tweak a few things to make it more efficient and to avoid a few blemishes where the dynamic roughing marks were never cleaned up by the finish passes. 




After having so much fun working on this part, I decided to really test myself and design a backside to the part. This will require machining of soft jaws (which I have never done before). The "fence" around the part is 0.5" tall with a 5 degree taper on the walls. The cavities in the part are setup to be machinable with the 5/32 cutter and are 0.2" deep into the 0.25" thick lower rim.

I already own a HSS 5 degree cutter so it should be good practice to program a tapered cut. The hardest part will be keeping everything aligned such that the through holes line up with the edge of the tapered web.




Will keep everyone updated with how this adventure goes.


----------



## Boswell

Your work encourages me to look into Mach4 again.


----------



## macardoso

Looking for advice and feeback from anyone with soft jaw experience...

I used Inventor to take a model of my vise with the soft jaws installed and the part I want to machine. I used a subtract boolean function to cut away the soft jaws wherever the part was. I then cleaned up the cut by removing material wherever I didn't want it to touch the part. I also added 5 thou of clearance on all of the walls to prevent the part from needing to be jammed into the fixture.

Both parts, before subtraction




After Boolean operation




After cleaning it up. Blue is for contrast...




Part depth is set by the top shelf. The bottom of the part does not touch the jaws. Total depth gripped is 0.15"




Any curves beyond 180 degrees were trimmed to prevent the jaws marring the part when opening. 5 Thou of clearance is visible around the part.




Does it look like I am on the right track?


----------



## macardoso

Boswell said:


> Your work encourages me to look into Mach4 again.



I love the program. Hated it at first (was such a Mach 3 fanboy)... but I think it is decades ahead of where Mach 3 got to. I have been able to add anything I could dream up using the LUA scripting.

Would be happy to help if you need it.


----------



## Boswell

I may be reaching out. I did a little bit of coding in LUA sometime last year so I have a head start on that aspect. Really the thing that is holding me back is that Mach3 is meeting my needs and I am hesitant to fix something that is not broke. I also have a Mach3 GUI that I really like and have gotten used to. Anyway having said all that I like the idea of being able to use LUA when needed and take advantage of the other improvements. We will see. Might be a Christmas break project.


----------



## macardoso

Boswell said:


> We will see. Might be a Christmas break project.



Hit me up. If you take the plunge, I don't think you'll regret it.

Edit: You can also keep Mach 3 set up on the same computer so you can always go back to it. I did that while I was originally setting up Mach 4.


----------



## bakrch

macardoso said:


> Looking for advice and feeback from anyone with soft jaw experience...
> 
> I used Inventor to take a model of my vise with the soft jaws installed and the part I want to machine. I used a subtract boolean function to cut away the soft jaws wherever the part was. I then cleaned up the cut by removing material wherever I didn't want it to touch the part. I also added 5 thou of clearance on all of the walls to prevent the part from needing to be jammed into the fixture.
> 
> Both parts, before subtraction
> 
> View attachment 307464
> 
> 
> After Boolean operation
> 
> View attachment 307465
> 
> 
> After cleaning it up. Blue is for contrast...
> 
> View attachment 307466
> 
> 
> Part depth is set by the top shelf. The bottom of the part does not touch the jaws. Total depth gripped is 0.15"
> 
> View attachment 307467
> 
> 
> Any curves beyond 180 degrees were trimmed to prevent the jaws marring the part when opening. 5 Thou of clearance is visible around the part.
> 
> View attachment 307468
> 
> 
> Does it look like I am on the right track?



Looks good to me. My only concern is that I do not know how slippery PVC will be in the jaws. It should be okay if you keep everything dry and degreased, but I've launched a few plastic parts out of soft jaws in my day when holding this shallow.


----------



## macardoso

bakrch said:


> Looks good to me. My only concern is that I do not know how slippery PVC will be in the jaws. It should be okay if you keep everything dry and degreased, but I've launched a few plastic parts out of soft jaws in my day when holding this shallow.



That's what I'm worried about.... I may redesign the jaws to be closer together. Can't put the part deeper if I want to add a chamfer around the part...


----------



## Boswell

how about doing it in two operations. First is to mill out one of the thru holes. Then use the through hole to secure the part.


----------



## macardoso

Boswell said:


> how about doing it in two operations. First is to mill out one of the thru holes. Then use the through hole to secure the part.



That's not a bad idea. Unfortunately, I would need to rough out almost all the material to access those holes. By that point, all the heavy machining that could possibly throw the part would be done.


----------



## macardoso

I just got permission from a past customer to share some pictures of a job I did for them.

5 Assemblies, one part was free machining brass, one part was 316 Stainless.

The slender part was cut with a single pass from 7/16" barstock and finished with fine sandpaper for finish and to dial in the final size evenly along the length of the part. The full radius on the small end was cut with a form tool. Tolerance was +/- 0.003" all over. I had a bit of difficulty holding tolerance on the overall length and diameter of the slender part. The second operation used my CNC as a lathe with tools ganged in the vise. The profile was finished using a sharp corner CCGX insert and the grooves machined with a Thinbit by Big Kaiser tool swapping the insert between sizes mid program. The small M3.5x0.6 thread was cut with a die. The cross hole was drilled on the CNC in a third operation.







The stainless "ball" was roughed from 1/2" barstock on the lathe, the smaller radius cut with a form tool, center hole drilled with a carbide drill, and finally tapped M3.5x0.6. The stock was parted off on the lathe, threaded onto a fixture mounted in a TTS toolholder, and the larger profile was cut on the CNC. The CCGX insert held up to the stainless quite well and left a beautiful surface finish. The part was fixtured for a 3rd operation on the CNC were the 3 dimples were drilled with a ball endmill.
















Parts were cleaned and deburred before shipping them off.

I had a lot of fun with this job and have plans to keep working with this customer again in the future.

Mike


----------



## macardoso

Going to modify the soft jaw design a bit based on feedback above.

This time, the jaws are placed 0.25" closer together, creating engagement on all features of the first side of the part.

Soft jaws immediately after subtracting the part to be gripped.




And after removing the unnecessary remnants of the boolean operation.




Surfaces highlighted in red are designed to not touch the part and were cut 0.015" deeper than the geometry that would touch it. Blue faces are designed to support the part in the Z direction.




Surfaces in green were expanded outwards by 0.003" to allow clearance for the part to fit into the jaws. I felt that the original 0.005" might have been too loose, however I can adjust this after I have cut the jaws and test fit the part.




Finally the faces in purple are cut to allow the part to come loose from the jaws as the vise opens and to remove some razor sharp edges. The two holes are 1/4" reamed holes. This would allow the jaws to be realigned in the future with a pair of dowel pins and an indicator. The hole on the fixed jaw will also serve as the zero location for the G-code. 




I plan on cutting this tomorrow and starting on the programming of the second side of this part.

Mike


----------



## Boswell

looks well though out. Looking forward to seeing how it works out. Seems like you will have enough surface area in contact to keep the part from popping out.


----------



## spumco

I've had some success holding slippery parts (UHMW, PVC, Delrin) by scuffing the soft jaws with some fine sandpaper.  Not much, just enough to take the gloss off.  Seems to bite a bit better.

Other things to try:
1. Undercut the bottom sides with a dovetail cutter (like a grinding relief), or use a small threadmill (or lathe threading bar) to create serrations in the clamping surfaces.  Once serrated, go back over the surface with a final contour spring pass to get rid of any burrs that may mar the clamped surface.  The bottom relief keeps it from squishing out.
2. Degrease the jaws & stock with alcohol so any coolant/mold release is off the surfaces
3. Light coating of spray adhesive on the part before putting it in the vise.  The adhesive should only be put on one surface (part only) as if you do it on the vise jaws and part they're likely to bond pretty firmly.  I haven't found any dimensional issues using a very light spray - and plastics aren't exactly dimensionally stable to begin with.  Of course test the adhesive to make sure the propellant/solvent doesn't attack the plastic.


----------



## Boswell

I never thought of Spray Adhesive. Great idea.


----------



## macardoso

@spumco, Thanks for the tips. I ended up making the soft jaws before I read this, but I'll remember for next time.

I machined the soft jaws while clamping on some parallels that spaced the jaws exactly as they were in my CAD model. Also helped deal with any jaw lift.











The part dropped into the features perfectly and clamped extremely firmly once the parallels were removed


----------



## macardoso

Programming the second side of this part proved to take a lot more effort than expected. About 3 hours.

Operation 1: Facing w/ 0.375 endmill
Operation 2: Dynamic Roughing outside profile
Operation 3: Dynamic Roughing Interior Pocket
Operation 4: Dynamic facing of island
Operation 5: Helical boring of central bore
Operation 6: Dynamic Rest Machining of central pocket, 0.250" endmill
Operation 7: Dynamic Roughing of interior pocket
Operation 8: Taper finishing of walls, 5 deg taper endmill, 3 flute
Operation 9: Dynamic Rest machining of all features 5/32" endmill
Operation 10: Finishing contours
Operation 11: Chamfer

Kate hung out with me nearly the whole time the machine was running




Facing cut, heavy stock removal. I'm noticing that the mill is chattering a lot when climb cutting along the X axis, conventional is fine. Thinking I might have a lot of backlash on the X screw. Thoughts?




Mach 4 running the part




After Dynamic roughing




Making an absolute mess.




After Taper finishing of the walls, don't know why the image wants to flip on its side.



	

		
			
		

		
	
+

The HSS taper endmill.




After the 1/4 and 5/32 cutters.




Almost had it perfect, but a little mistake in programming called H318 for T03. This crashed the head straight into the jaws. Luckily, the spindle drive locked up, faulted, and shut down the system. There was no damage besides the pock mark in the jaw and a blemish on the part. Tool didn't break. I will have to make another part so it can be perfect.




"Finished" part, minus the chamfers and my oops mark!


----------



## bakrch

I have always had the climb-cut-on-X-chatter- while-roughing issue.  

I've pushed/pulled on the table in every direction and will get a few thou movement in Y, which goes away when the Y gib is locked. I suspect the ball nut mount came loose and the movement is whatever bolt clearance there is?

Not sure, but I plan to take it apart soon to diagnose. 

The part looks good! You can also play with the Horizontal Area toolpath for finishing floors.  Many times you can select the entire solid and it will do what is possible with the selected tool,  then maybe unselect the features you need more control over and address those in a different OP. I don't use it much, but it sure is handy sometimes.


----------



## bakrch

Here is an old video.  The chatter is heavier when moving in X+.  It has always done this to some degree, but did progressively get worse. 


__
		http://instagr.am/p/BwGGXRGl0GG/

I eventually got tired of this and reposted using conventional direction just to get parts done. I am able to feed way faster that way, should have done it sooner. 

I still have a back log of work, but coming to the end of it.  Can't wait to get in there to fix it.


----------



## spumco

As you suspect, chatter is likely one of the following:
Ballscrew nut to saddle
Ballscrew housing bearing
Ballscrew bearing housing to table
Y-axis gib loose(ish).  That's the easiest to check & fix.

In addition, you're using the TTS which likes to chatter with long gauge lengths.  Crank down on the drawbar until your PDB just barely releases, stick that roughing end mill in a shortie setscrew holder instead of the collet and go to town.

Hog the plastic with a 1/2" corncob once you double-check your backlash suspects.  With that spindle motor you should be making _chunks_.

And 3 hours to program?  That's fast for someone who doesn't do it for a living.  Seriously.

Nice job on the part. Learn from the 'oops' and have another go at it.


----------



## macardoso

bakrch said:


> I have always had the climb-cut-on-X-chatter- while-roughing issue.



I'm not sure if I have noticed it before or if I always just thought it was a limitation of machine rigidity. I've never been thrilled about the ballnut mounts, so I may remake them and repack the X screw while I am at it like I did on the Z. Now that I have all this power on the axis motors, I don't mind the screws being pretty tight. I know this will exacerbate wear, but I just can't imagine I'm going to wear the screws out with the way I use them.



bakrch said:


> Not sure, but I plan to take it apart soon to diagnose.



Let me know what you find!



bakrch said:


> The part looks good! You can also play with the Horizontal Area toolpath for finishing floors. Many times you can select the entire solid and it will do what is possible with the selected tool, then maybe unselect the features you need more control over and address those in a different OP. I don't use it much, but it sure is handy sometimes.



OK I',m all ears for tips here. I normally do a dynamic roughing, dynamic rest machining, followed by a multipass contour to get the walls looking nice. Unfortunately I have yet to come up with a good way to finish the floor. I'll play around with that toolpath. I feel like I have "mastered" (as much as a hobbyist could I guess) only 3-4 toolpaths and the rest are just a mystery to me. I know what the rest are supposed to do, but I can never get them to look how I want.



bakrch said:


> Here is an old video. The chatter is heavier when moving in X+. It has always done this to some degree, but did progressively get worse.



Mine sounded very similar, although perhaps a little less bad, granted I was cutting plastic. IS there a downside to cutting conventional when CNC'ing, particularly the home hobbyist?



spumco said:


> As you suspect, chatter is likely one of the following:
> Ballscrew nut to saddle
> Ballscrew housing bearing
> Ballscrew bearing housing to table
> Y-axis gib loose(ish). That's the easiest to check & fix.



Time to tear it down again! Maybe I'll make new ball nut mounts ahead of time so I can swap everything out at once.



spumco said:


> In addition, you're using the TTS which likes to chatter with long gauge lengths. Crank down on the drawbar until your PDB just barely releases, stick that roughing end mill in a shortie setscrew holder instead of the collet and go to town.



Yeah, not ideal. I only have the ER20 chucks. The genuine Tormach ones used to be pretty cheap, but now I cry when I see the price. I paid $18 each for my chucks, including shipping. That being said, the Tekniks collets I've been buying are pricey and get me up to the original cost of the tormach stuff. Any tips on how to hold drills in something other than a collet chuck? The drill chucks are so long and chew up a lot of my Z travel.



spumco said:


> Hog the plastic with a 1/2" corncob once you double-check your backlash suspects. With that spindle motor you should be making _chunks_.



It should, but I haven't yet gotten confident enough to really put it to work. I get in the mentality that slow and safe is good and then I never push the machine hard.



spumco said:


> And 3 hours to program? That's fast for someone who doesn't do it for a living. Seriously.



Thanks. I pick up software pretty quickly, but I get stuck on the speeds and feeds. I know how to calculate them, but I don't always have a good feel for how hard to run the machine.



spumco said:


> Nice job on the part. Learn from the 'oops' and have another go at it.



Will do! I have a pile of other edits which should just make everything run better.


----------



## bakrch

macardoso said:


> OK I',m all ears for tips here. I normally do a dynamic roughing, dynamic rest machining, followed by a multipass contour to get the walls looking nice. Unfortunately I have yet to come up with a good way to finish the floor. I'll play around with that toolpath. I feel like I have "mastered" (as much as a hobbyist could I guess) only 3-4 toolpaths and the rest are just a mystery to me. I know what the rest are supposed to do, but I can never get them to look how I want.



Horizontal Area isn't any better than what you did, but as you know starting a new path and going through the menus, again and again, can be daunting.  Pretty sure it is only there for complicated parts so you do not have to visually locate every flat area yourself. 

I would probably go Dynamic OptiRough (I like the selection method and level of control that it offers), Horizontal area, Contours, helical bore. One good trick (if you do not already know) is to put a negative radial finish allowance for your contour toolpath to face surfaces.  Contour is a lot easier to deal with, so I use that a LOT.  Again, not a better strategy ... just being 2 parts German I have a fundamental need for efficiency. Even if it takes me twice as long ... haha.


----------



## spumco

macardoso said:


> Any tips on how to hold drills in something other than a collet chuck?


Collet chuck is the ticket for drills - no side load to put on the TTS.  And as you build up your drill collection, try to find the 'good' ones which use a standard shank size.  I like YG-1 for the cost-quality.  The TTS just doesn't like long gauge length and heavy side loads.  Actually... no taper likes that, even the CATxx and HSK stuff.  That's why the Big40 and Bigxx stuff was developed.

You can pick up two or three stubby side-lock holders and just leave your roughers in them.  I've got a 1/2" 4FL (HSS) and a 3/8" 5FL (carbide) that just live in the same holders.  Virtually all my roughing in any material is done with those two tools.



macardoso said:


> I know how to calculate them, but I don't always have a good feel for how hard to run the machine.


HSM Advisor.  Even if you can calculate the F&S, the horsepower requirements displayed for you is very helpful along with the spindle motor power curve.  You can set up a cut and the be like me: "Crap.  I don't actually have 3 horsepower at 8kRPM"


----------



## macardoso

spumco said:


> Collet chuck is the ticket for drills - no side load to put on the TTS. And as you build up your drill collection, try to find the 'good' ones which use a standard shank size. I like YG-1 for the cost-quality. The TTS just doesn't like long gauge length and heavy side loads.



Which YG-1 drills do you like. I'm a big fan of some of their other tools, particularly their ALU-Power endmills.



spumco said:


> HSM Advisor. Even if you can calculate the F&S, the horsepower requirements displayed for you is very helpful along with the spindle motor power curve. You can set up a cut and the be like me: "Crap. I don't actually have 3 horsepower at 8kRPM"



I may have to buy that. I like that it has a CHook to drop it into Mastercam.


----------



## macardoso

Spent 3 hours today redoing and tweaking my Mastercam code. Hope to run the part again tomorrow. Here are my changes.

Front:

Drill all holes deeper to remove lip after second OP
Spot drill deeper to try to keep drills centered
Changed all dynamic tool paths to conventional, 45% engagement, 5000rpm, 80ipm. Max depth of cut is 0.75", should be throwing some plastic. Tool is good for up to 0.0075 chipload (I'm at .0045) so there is room to push it much harder. 
More finish passes with the ball endmill to get a better floor finish
All holes will be reamed to get more on size (drills were cutting way undersized)
Shallower ramp with endmills, hope this will help break the really stringy plastic chips. Other option is a super aggressive ramp
Rear:

All heavy cuts to be conventional
Use a dynamic toolpath to face the rear of the part and remove a majority of the material.
Reduce stepover on taper cutter, remove unnecessary air cutting
Avoid the helix bore toolpath, use circle mill instead. Chips getting wrapped around cutter
Fix Chamfer tool offset which crashed the machine.
In addition, I remeasured all 24 tools so the height offsets were spot on in the control. Some of them were a bit off which left scallops on the floor of the part.


----------



## spumco

macardoso said:


> Which YG-1 drills do you like.


My favorite is the Multi-1 powder metal stub length.  Cuts everything, lasts forever.  Can run higher F&S and it's way less fragile than carbide.  Reasonable cost and the shanks are all standard sizes (1/8, 3/16, 1/4, etc).

Otherwise, all the YG-1 drills I've purchased have been excellent.  I prefer stub length whenever I can get away with it, as well as parabolic flutes.  I've stopped peck drilling for holes under 5D as long as I can get coolant in the right spot.



macardoso said:


> I may have to buy that.


The Android app is also very useful, as are the reference tables for screws and related Machinery Handbook type stuff.


----------



## spumco

macardoso said:


> Spot drill deeper to try to keep drills centered


Double-check your spot drill angle.  If it's too far off from the drill that follows it won't center properly as the drill cutting edges don't engage at exactly the same time and gets pushed over a bit.  Try a 120 spot for a 118 drill, 140 spot for 135 drills and so forth.

Or use stub length drills and skip the spotting.



macardoso said:


> All holes will be reamed to get more on size (drills were cutting way undersized)


Might want to run a test in the material with this first and make sure your reamer is sharp sharp sharp.  I think you'll find that some plastics spring back quite a bit with just about all hole-making tools, reamers included.  If you find the reamer is still producing an undersize hole, boring it or circular interpolation should improve things.

If you haven't already done so, get an air blast going on the part to keep it cold.  Should make chips better instead of getting soft and just moving out of the way of the drill & reamer.


----------



## macardoso

OK so I ran a second copy of this part with the modified program discussed above and it turned out a *lot* better. Still have some edits to do, but all in all it is close. This is just a for-fun part, but I want to get it perfect.

The roughing passes were completed at 45% engagement (3/8" 3F endmill), 5000rpm, 60ipm , 0.75" DOC. This equates to 7.5in^3/min material removal rate (on a G0704  ). I was able to get it up to 70ipm (8.8in^3/min) but it started chattering even when cutting conventional. I can likely improve this by repacking the ballnuts and tightening the gibs, but at some point soon I will be coming up on the limitations of rigidity on this machine and the TTS tooling. The roughing only accounted for about 30% of the cycle time, so I probably won't be trying to optimize further. There were chips hitting the floor 8' away from the machine. Insane.

During one of these cuts I got a position error fault on my X axis. I realized I still had all the motor torque limited at 50% (should be 250%) from when I was getting runaway motion. I returned these to their full values and adjusted the position error tolerance to 0.005". No issues since.

My adaptive facing passes for the little islands on the part are still causing a full tool burial. This is probably fine, but I am slowing the machine down in anticipation of this. I will reprogram to avoid this.

The 1/2" reamer was held in the tool holder with 10 thou of runout  and the 3/8" reamer had 30 thou . This is due to me using some absolutely garbage ER20 collets that I got from China at $0.99 each. These need to be thrown away and some more Techniks purchased. They're quite expensive though. It also didn't help that the reamers ended up in my worst 2 collet chucks that had around .002" of runout. The 1/2 reamer left a beautiful finish but only cleaned up 1/2 of the hole (Top pic) the other side was still rough from the 1/2 drill (bottom pic). The 3/8" reamer chattered so badly from the runout that it ruined the hole. I could probably drill these holes smaller, mount the reamers better, and get a great hole finish, but I think I am just going to do a helical bore on these with an endmill and call it a day.

It is interesting that even with a stub length 1/2" drill and spot drilling, it is walking significantly off center.







There is a triangle patch of material that has poor finish between the large center bore and the smaller holes. This is left over from the helical entry of the roughing operation. I need to add 5 thou of stock to leave on the floors during roughing and later come back with a different cutter to get a better floor finish.

Remeasuring all the height offsets of my tools really helped get a great floor finish all around the part. There is no noticeable scallop between passes of different cutters.

The back side turned out great and the features are lined up within a thou. This can be dialed in even closer by adjusting the work offset of the soft jaws.




I am finding that my accuracy is severely limited by the backlash in the X and Y axes. I can read a tenths indicator running true on a bore, but there is this window of uncertainty of where I am really at due to the several thou of backlash on each axis. My next project will be to repack the ballscrews, tighten up the end supports, and scrape in the new gibs to get a better fit on the ways. I hope this will improve my accuracy.

Finally I need to rethink how I am doing finishing on the part. It is just taking forever and I have to baby sit it with coolant in a bottle or the chips weld to the walls and mess it up. Perhaps some sort of semi finish to rough it in a bit closer then only use one pass to get the finish?

I can also tell that some true flood coolant and a basic enclosure would do a lot towards making better parts and requiring less attention from me.

The power drawbar has been the biggest time saver and has just worked perfectly since installation. Very happy with this design.


----------



## spumco

macardoso said:


> I can also tell that some true flood coolant


A dual nozzle air blast/mister will work wonders and is a cheaper/easier first step before going full rain shower.  Build a pressurized coolant delivery mister (tons of internet plans) and hook up the solenoid valve to an output pin.  Map pin to M7 macro and you're in business.  I use two nozzles, usually oriented at 45 degrees when looking down at the part (2 & 8 o'clock) so the part is never completely obscuring the point of cut.



macardoso said:


> Perhaps some sort of semi finish to rough it in a bit closer then only use one pass to get the finish?


If your part geometry can handle it, a bullnose with a small 0.005-0.0015 corner radius will help with floor and inside corner finishing.  I don't know if you're using a sharp corner end mill, but I've found on my smallish, slightly flexible mill that vibration will leave tool marks that you can't feel but can certainly see.  The corner radius helps blend & smooth everything a bit.


----------



## macardoso

spumco said:


> A dual nozzle air blast/mister will work wonders and is a cheaper/easier first step before going full rain shower. Build a pressurized coolant delivery mister (tons of internet plans) and hook up the solenoid valve to an output pin. Map pin to M7 macro and you're in business. I use two nozzles, usually oriented at 45 degrees when looking down at the part (2 & 8 o'clock) so the part is never completely obscuring the point of cut.



My panel is pre-wired with (2) 120VAC outputs to energize a flood and mist coolant system (I actually have a mister that needs new Loc-lines and nozzles) so all I need is the solenoid. I've avoided it due to noise and the compressor, but with the new ultra quiet compressor, I don't mind it. Might be time to get it set up.

Really need an enclosure though. I would love a fancy folded sheet metal one, but I don't have sufficient experience designing, have access to sheet metal equipment or welders, and I don't want to spend a $1000 on an enclosure.

I might throw something more simple together with some plastic sheeting and wood framing. Get me going at least.



spumco said:


> If your part geometry can handle it, a bullnose with a small 0.005-0.0015 corner radius will help with floor and inside corner finishing. I don't know if you're using a sharp corner end mill, but I've found on my smallish, slightly flexible mill that vibration will leave tool marks that you can't feel but can certainly see. The corner radius helps blend & smooth everything a bit.



That's a good idea. I think I might have a few in my big box of tools.


----------



## spumco

macardoso said:


> plastic sheeting and wood framing


Clear shower curtain + 1" PCV pipe + fittings = disposable enclosure.  Shower curtain is already reinforced at the top and has holes for zip ties.

Should last a couple years until you get around to building something swank.


----------



## spumco

macardoso said:


> I don't have sufficient experience designing, have access to sheet metal equipment or welders



I beg to differ about your access to equipment or welders.


----------



## macardoso

spumco said:


> I beg to differ about your access to equipment or welders.


God that's pretty machine. Can't wait to get a shop tour!


----------



## spumco

macardoso said:


> God that's pretty machine. Can't wait to get a shop tour!


That's the one I built last year.  Buddy wanted one so we just dived in and now his wife is runing the business making signs.  He built the frame, and I built all the motion hardware/rails/drive system and the controller. It's had over 30k pierces since we built it without a single issue.  He also has a big brake now so we can make enclosures...

In the middle of a much larger, higher-end plasma now.  It'll be 6x12, DMM servos, with a built-in bridge crane and running under UCCNC.

Sorry, not to hijack the thread but I can't stand hearing you whine about not having access to equipment just up the road from you.


----------



## macardoso

spumco said:


> In the middle of a much larger, higher-end plasma now. It'll be 6x12, DMM servos, with a built-in bridge crane and running under UCCNC.



That'll be quite the sight! I wouldn't even know where to put something like that.



spumco said:


> Sorry, not to hijack the thread but I can't stand hearing you whine about not having access to equipment just up the road from you.



It's just that every time I whine, I find out about a new machine that you have!


----------



## macardoso

So, almost a year since my last check in on this thread. I've been using the machine quite a bit and I've been super happy with it. I have made 30-40 different parts for a steam engine I'm helping a buddy build and it really does nice work.

A while back I posted about the work on this machine and the LUA code, so I figured I'd update that checklist:

Rebuild spindle - *DONE*
Install spindle motor, belt drive, and drawbar - *DONE*
Remove old CNC components - *DONE*
Install axis motors and mounts - *DONE*
Install electrical cabinet - *DONE*
Install limit/home switches - *DONE*
Install wireway and cable routing - *DONE*
Install touchscreen computer - *DONE*
Migrate to Mach 4 - *DONE*
Validate system functionality - *DONE*
Performance characterization - *DONE*
Mach 4 Pendant Configuration - *DONE*
Mach 4 LUA Scripting & Servo drive serial communications
Pneumatic drawbar release - *DONE*
MPG functions - *DONE*
Cycle start, hold, and stop buttons - Still haven't used these, the touchscreen computer is fine for what I do.
Spindle Enable/Disable - Removed this, don't want it
Spindle Orient - Removed this, don't want it
De-ref all when disabled - *DONE*
Auto Enable Soft Limits - *DONE*
Power On cycle/Start-Up Menu Script - *DONE*
Stop machine for faults and alarms - *DONE*
Drive Serial Communications - *DONE*
Spindle Load Meter - *DONE*
Absolute Homing - *DONE, *slightly buggy, discussed below.
Rigid Tapping - Code is there, but never scripted the G/M codes and never tried it 
Gear Hobbing - Code is there, but never scripted the G/M codes and never tried it 
Fix Cycle Timer - *DONE*

The Absolute homing script is the coolest thing I've added to this machine and I use it constantly. I do have one gripe. Sometimes, one of the axes fails to update with the number received from the drive, but marks itself as homed (rather than failing if the drive returns a bad serial packet, which does happen rarely and works). If I keep hitting the button 2-3 times, then all the axes will home correctly. I've been doing the lazy thing and just homing 4-5 times, but I really should investigate this issue.

The 5000 rpm spindle and load meter are awesome and I've had zero maintenance on it this entire time. The pneumatic drawbar is my favorite addition to the CNC and I am constantly using it.

The ballscrews and the flatness of the ways are the worst part on this machine. I think if I could get the machine ways ground or scraped and replace it with some nice double nut ground ballscrews, the machine would be much more accurate and rigid. 

I've thought a lot about getting another larger CNC, but the truth is that for a lot of what I do, I would prefer a manual mill for quick setup and stock squaring. I mostly need a simple drill press setup or a facing cut and taking the time to boot the CNC or write a program isn't worth it. I may be moving soon, so adding a bridgeport to my shop will be on my mind.

Thanks again to everyone for following along with me on this thread!


----------

