Page 1 of 2 12 LastLast
Results 1 to 12 of 21

Thread: EMC2 I/O Hardware Recommendation

  1. #1
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0

    EMC2 I/O Hardware Recommendation

    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 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.


  2. #2
    Registered
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    93
    Downloads
    0
    Uploads
    0

    Doing same Stuff

    Hi,
    i did recently the same (even if i now doing an EMC2 update)
    i retrofitted an new Drehmaschinen und Frsmaschinen Hersteller - Klippfeld Turning lathe which also has an Mill head. Thats why i bought it with special Linear gear for the Toolhead.
    I am an it specialist and know electronic quite well (do some micocontroller stuff so i personally think when you want to do it easy use the standard parallel ports and if you have to put 2 or 3 of the parallel cards in there.

    I searched long but finnaly i found a controller called tripple beast and verry strong steppers ( Benezan Electronics) i dont have the ballscrew so i have to fight backslash.

    i found out the hardest stuff was to get an good CAM Programm for what i have to "lathe" (for milling i have an heiz Portal mill and use different software)
    my next step is to build an "Handwheel" which i want to use arduino base like
    sansbury95's Channel - YouTube so i can then use the lathe and mill as it was on hand or at gcode .

    And then my winter project is doing an Turret. Where i bought already the plans but i am not happy with the air compressing stuff and the way it works.
    so i think i will do an second arduino based turret. i want to use the design i bought for the shaft and tool holding plate the rest i will do it controller based. my idea is to also use it for manual mills. where you press button tool x and it jumps to tool x or center drill and so on.

    And the reason i want to use arduino based stuff because the software support is cool and no parallel board i only need an usb board for it.

    so thats my 5 cents
    thx
    thomas


  3. #3
    Registered
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    26
    Downloads
    0
    Uploads
    0
    I am a fan of Mesa's products (Mesa Electronics). Buy a 7i43, 7i33 and a 7i37. The 7i43 connects to the parallel port providing 48 programmable io via FPGA. The 7i33 connects to the 7i43. It has four +/-10V Analog ouputs and 4 quadrature inputs for encoders. The 7i37 is an isolated IO board providing 8 outputs and 16 inputs. The drivers are all included with EMC and they are a reasonable price.

    On my machine I bought a 24IO G4 Opto-22 Relay rack instead of the 7i37. It plugs directly into the 7i43 and allows you to pick and choose what IO you want. It's a little more money this way but ebay usually has good deals..


  4. #4
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    Thank you both for your comments and suggestions. I'm leaning toward a Mesa solution. A couple of weeks ago, I talked to Peter at Mesa (nice guy!) and it seems that they're realizing that a significant part of their market is now CNC conversions, and they seem to be developing specific solutions for that market, although their products still seem mostly directed toward general purpose PC I/O. They reportedly work well for CNC, including EMC2, but I think they're working on a more integrated CNC solution, hopefully a product that doesn't require three cards to get all the features needed for CNC.

    I had the initial impression that EMC2 prefers interfacing directly through the parallel port hardware, and that's certainly the simplest concept. I figured I could get simple low cost optical isolator breakout boards for the digital I/O, and with the STEP and DIRECTION servo controllers I have, the digital I/O would be most of what I needed. I do have a VFD and I'll probably use 0-10V to control spindle speed, so I probably need at least one analog output. I thought maybe someone might make a fairly simple parallel port breakout board that's mostly digital I/O with perhaps a frequency to voltage controller and maybe EMC2 could provide a pulse train on an output pin that could create the voltage I need easily and inexpensively, or maybe a simple integrator circuit to convert a pulse width modulated output to an analog voltage.

    I'm fairly cheap, but the expense of the very nice Mesa hardware isn't much of an issue. Mostly, I was wanting to keep it simple. Putting an FPGA card and a couple of daughter cards into the mix didn't sound as simple as I was wanting. On the other hand, maybe it will be easier to let Mesa do all of the work and treat the I/O hardware as a black box. I'm just worried about EMC2 config file problems trying to get it to recognize the Mesa cards. Based on the recommendations I'm getting for Mesa as opposed to using the parallel port hardware, I'm guessing that Mesa is the easiest path to success.

    I'm going to try to get my I/O hardware on order today so I can get this project over the hump and on the long downhill run to making some chips. I'll read the hefty EMC2 documentation a bit more to see if I can get a better understanding about the I/O issues. That's still fuzzy to me, and that's keeping me from making the I/O hardware decision.

    Thanks again for the info and assistance!


  • #5
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    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.


  • #6
    Registered
    Join Date
    Oct 2010
    Location
    Austria
    Posts
    93
    Downloads
    0
    Uploads
    0

    Some Links

    Hi,
    i think important is that you can get support if you need to so if mesa is helping you out go for it.
    I did use Triplebeast from germany for that and i am happy.

    Bzw i will now (in next 2 Months - add the threading functionalty
    And i found a nice link of one who did it successfully. And he also has a kind of parllel buffer board which may be of interest for you
    Lathe Spindle Encoder

    take it as a kind of my 5cents

    hello from vienna

    thomas


  • #7
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    I went with Mesa instead of Triplebeast largely because I'm in the USA and international shipping and support seemed like an unneeded complication. I did bookmark their website from your previous post, though.

    Speaking of bookmarks, your link to the homemade spindle encoder was also added to my bookmarks. I've been wondering how I'll attach the tiny encoder I have to the spindle. The 7i76 has inputs for a spindle encoder, but mounting that encoder may be difficult. To be honest, the lathe is still up on the dollies and I haven't been able to open the end to look at the back side of the spindle. I'll come up with something. I have access to a laser and it would be easy to cut a spindle encoder disk from black acrylic as shown on that web page. I hope I can use the little CUI encoder I already purchased. Whatever I do, I'll document it so others can share in the idea.


  • #8
    Registered
    Join Date
    Mar 2004
    Location
    St. Louis, MO
    Posts
    332
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Liberty4Ever View Post
    I've been wondering how I'll attach the tiny encoder I have to the spindle. The 7i76 has inputs for a spindle encoder, but mounting that encoder may be difficult. To be honest, the lathe is still up on the dollies and I haven't been able to open the end to look at the back side of the spindle. I'll come up with something. I have access to a laser and it would be easy to cut a spindle encoder disk from black acrylic as shown on that web page. I hope I can use the little CUI encoder I already purchased. Whatever I do, I'll document it so others can share in the idea.
    I have a Bridgeport mill, and there is no place in the head to mount a standard
    encoder. The spindle moves up and down and the spline that drives it has a
    large diameter. I mounted two gear tooth sensors inside the head to pick up
    the gear teeth on the bull gear, and drilled a little dimple to trip a 3rd
    sensor for the index pulse. This has worked remarkably well. See
    Adding a spindle encoder to a Bridgeport 1J head
    for the details.

    The CUI encoders have a problem responding to acceleration, but should work
    fine as a spindle encoder. They rely on whatever is being sensed to supply the shaft bearing, however, so unless you provide a shaft with bearings and a toothed
    belt or something, then it will be hard to use on a lathe spindle.

    Jon


  • #9
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    Hi Jon,

    Thanks for the info. That Bridgeport spindle encoder is ugly but good! The gear tooth detector was very clever. For the index pulse, I'd just chisel off a tooth and wire up a missing pulse detector. Just kidding!

    I just spent four hours leveling my new lathe, because I had to make new PVC pads for the leveling feet and they had to be pretty. Stuff like that is why this project will take me a long time. Similarly, I've been researching a lot of details and loose ends, and I just added a gallon of way oil and a gallon of spindle oil to my shopping cart, about $60, more like $80 with two nice oiler cans, and stuff like that is why I'll be way over budget, too.

    I hadn't read of any problems with the CUI capacitive encoders not handling acceleration well, and Gecko seems to recommend them for their servo controllers. Are we talking about the same encoders? They ship with bushings that adapt the encoder to nine different common shaft sizes. Digi-Key part number 102-1308-ND

    Digi-Key - 102-1308-ND (Manufacturer - AMT103-V KIT)

    Next up for me - run the wiring for the 220VAC 30A service from the clothes dryer in the basement and temporarily wire the spindle through the $106 2HP Chinese VFD to get my motor running and head on down the highway. Lookin' for adventure, in whatever machining may come my way. I'm born to be wild. I also have a little manual lathe project to do, and I'll probably use the lathe to make parts for the lathe CNC conversion. How cool is that? I'm also looking forward to verifying the alignment of the tailstock and other lathe calibration and setup stuff.


  • #10
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    Jon,

    I finally pulled the cover off the upper headstock section to look at the spindle, with an eye toward attaching an encoder. I knew I couldn't just slap an encoder on a hollow spindle. I was originally thinking I'd put an encoder on the motor shaft and program EMC2 with a spindle encoder count that would adjust for the pulley reduction ratio. I was hoping for a 1:1 ratio, but the highest ratio was 17:18. The original maximum spindle speed was 1700 with an 1800 RPM motor, and while I'd like more spindle speed for turning small diameter parts, I don't think I should go much faster than the original because the bearings and other parts were specified for 1700 RPM max. I could use the 900 RPM pulley selection which is a 1:2 reduction ratio, which is a better ratio than an irrational number like 17/18. With the 1:2 ratio, I could run the motor at twice speed (or slightly more) with the VFD and should have good low end torque and good speed. Then, I'd need to tap the motor shaft, epoxy in a dowel, and press on the encoder.

    From a control system perspective, I'm not crazy about measuring the motor RPM and inferring spindle RPM. I might decide to change the gearing ratio. Belts slip. I'd rather directly measure what I want to measure, so I'd like to have a spindle encoder measuring the spindle RPM directly.

    I might do as you did on your Bridgeport, only it looks easier in my case. The index divot is already drilled, and access is fairly easy. Here's what the Clausing 4902 looks like with the headstock cover removed.



    I may be ordering three gear tooth sensors from Digi-Key. In addition to directly measuring spindle speed, it looks like it may be easier to install than trying to drill the motor shaft.

    Thanks for the tip!

    I'd like to put the Z axis servo inside the headstock, but that will be a lot of work. The gear box isn't easy to access for modification, and it's not big enough for the servo motor, which would need to extend into the back of the headstock. It'd be a lot of work to gut the gearbox and cut a large hole in the cast iron for the servo motor. I may be forced to hang the servo motor for the Z axis off the tailstock end of the lathe. I'll eventually need to use a ball screw for the X and Z axes, and I'm not looking forward to that.

    One step at a time, and the next step is to temporarily wire the spindle motor to the VFD and start using the lathe in manual mode (albeit with full spindle speed and direction control).


  • #11
    Registered Liberty4Ever's Avatar
    Join Date
    Sep 2011
    Location
    USA
    Posts
    26
    Downloads
    0
    Uploads
    0
    I ordered four of the Allegro ATS667LSG Hall effect gear tooth sensors from Digi-Key.

    Digi-Key - 620-1328-1-ND (Manufacturer - ATS667LSGTN-T)

    One sensor is for the encoder index pulse, once per revolution. Two sensors are for the A & B quadrature encoder signals, in my case, 33 pulses for each of the two sensors. The fourth sensor is a spare.

    Trying to infer the spindle speed from the motor speed wasn't a good way to go. In most circumstances, belt slippage wouldn't be a problem, but without a 1:1 gear ratio, there was no way to get a true spindle index pulse. I'd eventually like to make a chuck closer, and I'll need a true spindle index signal to precisely locate the spindle position before unlocking the chuck.


  • #12
    Registered
    Join Date
    Mar 2004
    Location
    St. Louis, MO
    Posts
    332
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Liberty4Ever View Post
    Hi Jon,

    Thanks for the info. That Bridgeport spindle encoder is ugly but good!
    Thanks! Really, in the confined space of that head, there really is NO
    other way to do it.

    I just spent four hours leveling my new lathe, because I had to make new PVC pads for the leveling feet and they had to be pretty. Stuff like that is why this project will take me a long time.
    Rebuilding the bed of my 15" Sheldon lathe took me 22 months, but it was worth
    it!

    I hadn't read of any problems with the CUI capacitive encoders not handling acceleration well, and Gecko seems to recommend them for their servo controllers. Are we talking about the same encoders? They ship with bushings that adapt the encoder to nine different common shaft sizes. Digi-Key part number 102-1308-ND
    Yes, these are the ones. I could never get the motor to run well under EMC2, they were
    always twitchy and seemed on the verge of instability. I finally put an HP optical encoder on the same shaft so I could compare both encoders at the same time.
    See this picture
    http://pico-systems.com/images/compare_encoder2.png
    The white trace is the HP (good) encoder. The red trace is the CUI AMT-103
    encoder. These are velocity traces, in raw encoder counts per millisecond. You can clearly see when there is acceleration, the red trace lags behind, and then the velocity has to overshoot for the position to catch up. This makes servo tuning very hard to do.
    It may be that the Gecko servo drives handle this more smoothly, but this much lag has to worsen following error. Of course, with a Gecko 320-series drive and no other measurement being made on position, you have no idea what the real following error is.
    Anyway, the lag in responding to acceleration seems to be about 3-5 ms. The time scale in this plot is 20 ms per division.

    Jon


  • Page 1 of 2 12 LastLast

    Similar Threads

    1. Replies: 33
      Last Post: 01-29-2013, 10:50 AM
    2. MPG recommendation??
      By PriddyShiddy in forum Benchtop Machines
      Replies: 12
      Last Post: 06-23-2011, 08:07 PM
    3. Need Help!- EMC2 to IMserv hardware
      By twells in forum LinuxCNC (formerly EMC2)
      Replies: 3
      Last Post: 08-09-2010, 09:28 PM
    4. VFD recommendation
      By TheGreenMachine in forum Phase Converters and VFD
      Replies: 2
      Last Post: 01-16-2010, 08:51 PM
    5. CAD CAM recommendation
      By lipolad in forum General CAM Discussion
      Replies: 1
      Last Post: 03-06-2008, 11:17 AM

    Tags for this Thread

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.