I/O Interface Board Recommendation For Lathe

More
24 Oct 2011 18:09 - 24 Oct 2011 18:09 #14182 by BruceLayne
SHORT VERSION:

Despite a lot of reading EMC documentation and watching YouTube videos, I'm having trouble deciding which hardware to buy to interface all of the electronics to my PC running EMC2. This is a lathe CNC conversion project.

My Inputs:
9 @ 5VDC (three CUI encoders for X, Z and spindle, each A+, B+ and index)
4 @ 24VDC (X & Z limit/home prox switches)
1 @ 24VDC (E-Stop)

My Outputs:
4 @ 5VDC (STEP & DIR for X and Z)
1 @ 0-10VDC (analog spindle speed control)

The Gecko servo drivers have encoder inputs to close the servo loop. I assume I should feed these encoder signals back into EMC2 as well?

I'd like the PC completely isolated from the CNC electronics voltages. I plan on expanding this in the future, which will require a few more inputs and outputs of the 5V or 24V variety, so I'd like that ability in the initial I/O purchase.

I think I can also use 0-5VDC, 0-20mA, 4-20mA, or RS-485 for the VFD speed control for the spindle.

Can anyone recommend some I/O hardware to interface my PC running EMC2 with the lathe CNC electronics? I want a robust solution that's easy to implement in EMC2, and hopefully not too expensive. Feel free to send me a private message if you're shy about posting a commercial recommendation. Thanks.




LONG VERSION:

I'm a month and a half into a lathe CNC retrofit, working part time. I was going to buy a Grizzly G0602 10X22 lathe and retrofit it, but a machine shop friend talked me into an old American made lathe. Those guys all look down their noses at the import machine tools, even though I think the parts I'd keep for the CNC retrofit would have been good (spindle, taper bearings, induction hardened ways). So I haunted Craig's List and found an ugly but lightly used Clausing 4902 lathe about 100 miles north of me for $1200. Buying it and getting it into my basement were epic adventures, but I won't bore you with that. The lathe is in the basement and I've been degunking it. The original owner painted it blue and it's now rough looking with age, but it's still tight and should be a good CNC retrofit.

Getting the lathe:




The lathe is finally in the basement:




I've been researching EMC2 quite a bit, and studying other people's CNC conversions. I'm an electrical engineer and I've designed many custom machines, so I'm not too put off by the electronics and wiring. As I researched EMC2 CNC and found good choices for subsystem solutions, I purchased the hardware. I'm well along the way. I installed EMC2 on a $100 used Compaq D51S Evo PC I bought off Craig's List for $100. It's running the EMC2 lathe simulator. I added a small Logitech K400 wireless keyboard with touch pad ($38 on eBay) that I think will be very handy and might take the place of a pendant. I have some nice Italian 900 ounce inch servo motors left over from my 2005 CNC mill project (never got a round tuit, but the mill CNC retrofit is next, after the lathe). I found some great $23 CUI encoders at Digi-Key. I have a couple of Gecko 320X servo drives. I took a chance on a 2HP Chinese VFD on eBay for $106 (looks OK, packing material smelled like Harbor Freight, Chinglish manual could be better but looks reasonably easy to set up and use). I have E-stop switches and shaft couplings and inductive prox limit/home switches, etc. I just spent $115 at Lowes on the wire, plug and outlet to wire the CNC lathe into the 30A dryer circuit in the basement. I bought a very heavy duty roll around tool cart at Sam's Club for $200. The PC sits on top, various measurement tools and lathe tooling go in the top five drawers, and the CNC electronics will go in the large drawer on the bottom with a lot of forced air cooling. Connectors to the lathe will be on the back of the roll around.

The roll around PC stand, tool cart, and electronics enclosure:




I still need to make some servo motor mounts and buy some fuses/breakers, connectors, etc. The only remaining big piece of the puzzle is the hardware to connect everything to EMC2 and the PC. I have a parallel port, but I don't think it'll have enough I/O. Should I add a second parallel port and use simple optoisolated breakout boards? Is there a better single board I/O solution that works well with EMC2?

I want the PC to be optically isolated from the rest of the electronics. I need to control the X and Z servos via the Gecko 320X drives and the three phase spindle via the VFD (0-5VDC, 0-10VDC, 0-20mA, 4-20mA, or RS-485). I think I'd like to use 0-10 VDC, and I may need a couple of outputs to signal RUN FORWARD and RUN REVERSE? I have four limit switches I need to read, as well as three quadrature encoders with index pulses (X, Z, and spindle). I plan on running the encoders single ended and not use the negative signals for A and B, so I'll need three inputs for each of the three encoders (A+. B+ and Index). I'd like some extra digital I/O because... call me crazy, but I eventually want to build a 5' bar feeder and collet/chuck closer so I can run semi-unattended operation for my short run production (up to 500 parts a month).

Got a good recommendation for an EMC2 friendly I/O solution, that's hopefully reasonably priced? Something that'll work well with my 24VDC digital I/O, the single ended absolute encoders, the Gecko servo drives, and the VFD to control the spindle?

I'm documenting this entire project, and when it's working, I plan on making a web page with a bill of materials, tips & tricks, and a series of step-by-step YouTube videos to "pay it forward", and make an EMC2 conversion easier on those who follow me along this path.

Thanks in advance for any EMC2 I/O hardware recommendations you might have.
Last edit: 24 Oct 2011 18:09 by BruceLayne.

Please Log in or Create an account to join the conversation.

More
24 Oct 2011 18:18 #14183 by BigJohnT
#1 I love those carts from Sams, I have 2.

#2 I would not use step-direction drives to run servos, if you have to buy servo motors and drives get matched drives that take velocity input. The encoder from the ballscrew closes the loop with EMC. The drive and the motor usually have a loop that tells the drive if the motor is spinning fast enough. I would use Mesa 5i20 + 7i37 + 7i33 to connect EMC to the servo drives.

Sorry for the short post but I need a nap...

John

Please Log in or Create an account to join the conversation.

More
24 Oct 2011 19:52 #14186 by BruceLayne
> I love those carts from Sams

Very heavy duty for an imported tool cart. Those big bag-o-screws are intimidating. I think I spent two hours putting that sucker together. I'm getting another one (or two!) for the future milling machine CNC conversion.



> I would not use step-direction drives to run servos

Now he tells me. :)

I was trying to do this with a minimum of hand holding by the EMC2 community. I knew I'd need help at the end, so I tried to save it for when I needed it. I knew that would result in some purchasing mistakes. In this case, I thought the microstepping resolution would be fine enough and the internal servo drive firmware would be sophisticated enough that I'd avoid problems with step and direction control of servo drives. Oh well. Live and learn.



> The encoder from the ball screw closes the loop with EMC.

It sounds like I need a pair of encoders per axis, with one encoder mounted on the motor to provide motor position feedback to the servo controller, and the other encoder mounted on the screw to close the larger servo loop with EMC2 controlling machine position. That does make sense from a control theory perspective (control whatever you want to control as directly as possible), and it avoids any potential voltage reference issues with the 5VDC supplied by the servo driver for the encoder power supply and the 5VDC power supply I have for the other CNC electronics. I had hoped the motor shaft would be coupled directly enough to the screw that the two encoder readings would be the same and one would be redundant, but there is probably enough slop in the shaft coupling or toothed belt drive (haven't fully decided which yet) that I'd get hunt & seek oscillation.

BTW - As I expect almost all of my motions under load to be in the same direction and free of direction reversals, and my tolerances aren't terribly high for the parts I'll be making at first, and there is very little backlash in the lathe X and Z, I was planning on using the existing lead screws on the lathe, at least at first. I wouldn't try that with a milling machine, but I was hoping to get by with lead screws on the lathe for a while.


> I would use Mesa 5i20 + 7i37 + 7i33 to connect EMC to the servo drives.

I had looked at MESA, and even called their tech support a couple of weeks ago. I think I talked with the owner or chief engineer. They had a wide variety of boards and daughter cards that could work, and I was hoping for a reduction in the possibilities. Rather than not finding a solution, I seemed to be afflicted with too many solutions and I couldn't decide. They do seem to be mindful of their business growing into the CNC market, and they're starting to provide specific solutions tailored to the CNC market as opposed to generic PC I/O solutions. A turn-key CNC solution with some extra I/O for future expansion would be perfect for me.

The 5i20 + 7i37 + 7i33 solution would be $337 + s/h, so that's not the cheap solution, but it's not really a budget buster either if it quickly gets me where I need to be. I was half hoping for a recommendation from the EMC2 experts for a simple optoisolated breakout board solution or close to it, partly for the low cost, but mostly for the simplicity. Parallel ports are conceptually simple. I'll trust your experience that the MESA cards are not difficult to configure in EMC2. That's the experience I'm lacking that's making the I/O hardware such a difficult decision for me. It's one of those issues that's probably a lot easier after configuring EMC2, but I didn't know which hardware to buy to get to the point of configuring the hardware. Catch 22. Chicken and egg. That sort of thing.

Thanks again for the Voice Of Experience. I'll give it another day or two to see if there are dissenting opinions :) and then I'll order the I/O hardware. I'm anxious to get this show on the road. Until then, I'll draw some wiring diagrams to organize my thoughts, make a To Do list (aka punch list), order some connectors, relays, prox cable assemblies, etc. And I'll move the milling machine so I can move the lathe into place, and I'll wire the 220 VAC to the outlet above the lathe and I'll get the lathe running via the VFD in manual mode as a prelude to CNC control.



> Sorry for the short post but I need a nap.

Not at all. Your terse and informative post was exactly what I had hoped to obtain. Thank you very much.

As for the nap... I can empathize. Been busy here lately, and the CNC lathe project heaped on top of that isn't helping me get enough sleep.

Please Log in or Create an account to join the conversation.

More
24 Oct 2011 23:08 #14189 by BigJohnT
The Mesa web site can be quite intimidating to navigate. Peter (the head engineer) is quite active on this forum.

A new solution just released by Mesa is the 5i25 and is a bit more cost effective than the 5i20. I have one with the stepper daughter card the 7i76. Total cost for up to 5 steppers, spindle control, one encoder and a bunch of I/O was just a few dollars over $200. I think without looking that the servo card is similar in price to the stepper card. ATM we are working out the software part of the integration with EMC and have most of that worked out.

The encoder on the ball screw is used only if you use velocity drives not step direction drives like the Gecko's. BTW, I like the G203V stepper driver from Gecko and use that for any machines that warrant steppers. And I know that Mariss is quite friendly and will take just about anything back. The only plus to the G320X is it might be simpler to set up and get going. Saying that I would if I had the hardware on hand give it a go and see what comes out. With a 5i25 + 7i76 and the G320's you add an encoder to the spindle and you have threading and rigid tapping.

Acme lead screws have tons more friction and slop than ball screws with that in mind to get going if they are in good shape it seems like a reasonable upgrade path. Just know upfront that you may need higher gear reduction to move the axis.

A normal servo setup is the tacho => drive => motor. When you give a velocity input into the drive (+-10vdc) the drive sends enough current to maintain the velocity and direction requested by the CNC control. An encoder is not usually in that loop. The second loop is encoder position feedback => controller(EMC) => drive.

Oh, I got the bigger version of the cart and it was somewhat of a challenge to sort it out the first time...

John

Please Log in or Create an account to join the conversation.

More
25 Oct 2011 12:37 #14216 by BigJohnT
I just wanted to add that I did use an acme screw for the Z on my plasma (very little weight) and it works fine in that application. I think Andy has some photos of the X axis on a lathe he added a ball screw to...

John

Please Log in or Create an account to join the conversation.

More
25 Oct 2011 14:38 #14230 by andypugh
BigJohnT wrote:

I just wanted to add that I did use an acme screw for the Z on my plasma (very little weight) and it works fine in that application. I think Andy has some photos of the X axis on a lathe he added a ball screw to...


Poke about in
picasaweb.google.com/1081645046564043805...#5403345449585651218
and the following pictures.

If I was doing it again, though, I would mount the motor further back to leave room for ballscrew covers, probably in a plate bolted on the end of the bed (as that mounting flexes a bit, and keeps coming loose, and getting to the bolts inside the bed is a _pig_.

Also, there is not much to be gained by having the screw all the way to the tailstock end, as you can't turn very long stiff without the tailstock. This might not apply if you have a steady, though.

Whatever you design, think about screw covers first :-) A simple U-shape of metal can work nicely if you use a hook-under ballnut mounting, for example.

Please Log in or Create an account to join the conversation.

More
25 Oct 2011 15:38 #14237 by BruceLayne
I'm trying to arrange the project tasks in a prioritized manner, and for now, turning the spindle and moving under CNC control is the priority, but I do have bellows-style way covers in my shopping cart and I selected some that were wide enough to protect the headstock end of the lead screw.

I doubt I'll use anything close to the full 24" between centers. I anticipate short run production work consisting of 1.5" to 2" long parts turned from 1" or less diameter steel bar stock, and even the incidental shop uses for the lathe will probably be short pieces, bushings, etc. However, I'll try not to have the CNC conversion eat into any of the lathe's capacity.

Speaking of capacity... I was hoping for 6" of cross slide travel and that was the first thing I checked when I made the trip to purchase the lathe. I was ecstatic to find 8.25" of travel. I can get a true 8" of motion in the X direction, and that's going to greatly benefit my ability to use gang tooling for nearly instant low cost tool changes. B)

Despite the lack of curb appeal, I was also very happy to find tight gibs with free movement but no apparent slop or play, and no obvious evidence of saddle wear, at least to my inexperienced eyes.

Thank you to all who have been contributing ideas and suggestions for my first CNC conversion. I hope to make some positive contributions to this community when I have some experience that would be useful to others.

Please Log in or Create an account to join the conversation.

More
25 Oct 2011 16:01 #14239 by andypugh
BruceLayne wrote:

Speaking of capacity... I was hoping for 6" of cross slide travel and that was the first thing I checked when I made the trip to purchase the lathe. I was ecstatic to find 8.25" of travel.


Converting the X axis is much more difficult than the Z. (In fact Z axis conversion is so easy that I can see strong arguments for doing it with a manual lathe just to eliminate the changegears)

FWIW This is how I did my lathe:
www.cnczone.com/forums/mini_lathe/63621-...ide_ballscrew-2.html

You look to have a lot more space above the leadscrew than I had, so might not be quite so tight for space.

I also had a lack of room at the back, so a rear-mount motor wasn't possible.
If you can rear mount a motor then a very rigid solution which doesn't limit the screw size by what ball nut will fit between the doetails would be to rigidly connect a ballscrew to the cross slide (using a bracket in place of the existing nut), then have a belt-driven, rotating, ballnut mounted on the back of the saddle in angular-contact bearings. . A simple tube (also, optionally, rotating) sticking out the back could protect the ballscrew.

Please Log in or Create an account to join the conversation.

More
02 Nov 2011 00:05 #14500 by BruceLayne
I/O Electronics Ordered!

Mesa Electronics

5i25 $89.00
7i76 $119.00
10' DB25M to DB25M IEEE-1284 cable $12.50

The 5i25 is fairly new. The goal is a product that's more optimized specifically for CNC applications, so it has the features we need, not a lot of capability we don't need, and the cost is a bit less because we aren't paying for features and added flexibility in excess of what we need. It's a solution that's a bit more integrated, and down the road that should translate into less complexity getting it to run with EMC2 or the controller of your choice.

Basically, the 5i25 plugs into the PC bus and has a DB25F port on the back of the computer. The cable connects the 5i25 in the PC to the 7i76, which will be in the electronics panel, which in my case is in the big drawer in the bottom of a roll around cart. The PC and monitor and keyboard are on the top of the cart, and lathe tooling, manuals and measuring tools are in the other drawers. There will be connectors on the bottom back of the cart with cables running to the lathe. The cables power the X, Z and spindle motors, carry encoder signals back to the CNC electronics, carry the end and home limit switch signals for X and Z, etc. The 7i76 card has screw terminals so making connections should be easy.

I've designed a lot of machines, including some big systems with a lot of PC based I/O (Opto 22, etc.), and I don't remember fretting over the hardware decision like I did this time. I entered this thinking EMC2 liked bit banging on the parallel port and the I/O would be easy. Just get one or two inexpensive optically isolated breakout boards for one or two parallel ports and program the EMC2 configuration file to know what hardware was where. Not so.

I probably made it harder than it needed to be. I'm glad I finally have the I/O hardware on order. That's the last big unknown checked off the list. All that's remaining are many little details - custom motor mounts, sensor brackets, lots of wiring, and later on, some ball screws... PLUS, all the big gotchas that I can't see from here. :)

Lots of work left to do, but I'm well under way. Thanks to Peter at Mesa Electronics for some hand holding and pre-sales technical advice in a couple of phone calls. Thanks also to those online who took time to help me.

I'm meticulously documenting this project, so hopefully I can provide a step-by-step guide that will save those attempting CNC retrofits some effort and a lot of the head scratching I did. I may not produce the very most optimal solution, but hopefully it'll be a good solution that others can emulate if they like.

The 5i25 I/O board is brand new, and Andy is apparently just finishing up the drivers. Thank you Andy! I'll need to do a little double clutching to get EMC2 to like it. I'll need to upgrade from 2.4.3 as installed on the live CD to the new version 2.5, but I'm fairly comfortable with Linux. I wasn't going to network the EMC2 machines, but in anticipation of the need for EMC2 version 2.5 and probably a couple of profile downloads, I ordered a three pack of Ubuntu friendly USB WiFi dongles from eBay last night. Those have gotten cheap while I wasn't paying attention. They're about $5 each! The next live CD version of EMC2 should support the 5i25 board without any upgrade hassles.

I need to devote some serious time to this project. I've been piddling around an hour or two a day, and adding more to the To Do list than I'm crossing off the list. At this rate, I'll never finish.

Please Log in or Create an account to join the conversation.

More
02 Nov 2011 00:53 #14502 by andypugh
BruceLayne wrote:

need to devote some serious time to this project. I've been piddling around an hour or two a day, and adding more to the To Do list than I'm crossing off the list. At this rate, I'll never finish.


Aye, that seems to be the way. I don't recall the last time I looked at my own retrofit.

It's all a hobby for me, though, so whether it is writing drivers or fettling castings, it's all good.

Please Log in or Create an account to join the conversation.

Moderators: PCWjmelson
Time to create page: 0.106 seconds
Powered by Kunena Forum