I/O Interface Board Recommendation For Lathe
- BruceLayne
- Offline
- Junior Member
-
- Posts: 39
- Thank you received: 0
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.
- andypugh
-
- Away
- Moderator
-
- Posts: 23312
- Thank you received: 4938
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.
- BruceLayne
- Offline
- Junior Member
-
- Posts: 39
- Thank you received: 0
andypugh wrote:
It's all a hobby for me, though, so whether it is writing drivers or....
I hope to be making parts that I can SELL using my new CNC lathe. Writing drivers may be a hobby to you, but it could substantially help put food on my table. No pressure.

I do hope to pay some of this forward, and be a contributing member of the EMC2 community. I don't want to be a leech.
With the Mesa I/O hardware on order and about ten other orders inbound, it does feel like I'm over the big hump, but it's still a long way to the finish line. I probably won't post a Look At All The Stuff I Did Wrong project thread, but I will post some details of the finished project with an eye toward making it easier for the next EMC2 traveler. Realistically, I'll probably reach a point (or two!) once I dig into EMC2 where I need a little more help beyond what I can learn from reading the voluminous EMC2 documentation and scouring the info on this site. If nothing else, the newness of the 5i25 hardware will probably throw a curve or two at me, but I'll try not to wear out my welcome here. My long term goal is to give more than I take.
On the plus side.... Once I have it all figured out for the lathe, the CNC conversion of my G1006 Grizzly bench mill should be a lot easier, with a lot of cut and paste. I'm already ordering extras of many small parts like connectors, with the milling machine conversion in mind. I'd sell my old Grizzly and buy a well used Bridgeport class mill, but I can't tolerate the idea of moving the Grizzly out of the basement and a Bridgeport into the basement. I don't think I have that in me, so I'll CNC the import mill that I have.
Please Log in or Create an account to join the conversation.
- phidauex
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
I'll definitely be following along with your thread, and I'm interested to hear about how it goes, and the process for writing the EMC interface stuff to interact with all that I/O.
-Sam
Please Log in or Create an account to join the conversation.
- andypugh
-
- Away
- Moderator
-
- Posts: 23312
- Thank you received: 4938
With the Mesa I/O hardware on order and about ten other orders inbound,.
Support for the 7i76 was pushed to the 2.5 branch of emc2 on Sunday. If you get a 2.5 package from buildbot.linuxcnc.org (instuctions on the page) then you should be good to go.
Please Log in or Create an account to join the conversation.
- BigJohnT
-
- Offline
- Administrator
-
- Posts: 7000
- Thank you received: 1175
John
Please Log in or Create an account to join the conversation.
- andypugh
-
- Away
- Moderator
-
- Posts: 23312
- Thank you received: 4938
I forget did I tell you I have a sample 5i25/7i76 config on my web site?
You told me, I told you it was a 404, you fixed it.

Please Log in or Create an account to join the conversation.
- phidauex
- Offline
- Junior Member
-
- Posts: 21
- Thank you received: 0
-Sam
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
- Posts: 18522
- Thank you received: 5073
earlier versions have many pin-out errors...
Please Log in or Create an account to join the conversation.
- BruceLayne
- Offline
- Junior Member
-
- Posts: 39
- Thank you received: 0
Andy - Thank you yet again for your work getting the new Mesa hardware working with EMC2. I'll upgrade from EMC2 version 2.4.3 to 2.5 when my Mesa hardware arrives. I ordered USB wifi dongles in anticipation of the need to upgrade Ubuntu and EMC2, but the Linux friendly wifi doesn't work with the stripped down realtime Ubuntu. It probably doesn't have a lot of extraneous drivers for stuff like wifi. That puts me in a catch 22. To upgrade Ubuntu I need the internet, so every time I upgrade, I'll lose the wifi that I need to apt-get the stuff I need to get wifi working again. I can either carry the PC/monitor/keyboard upstairs to plug it in to an Ethernet connection, or run Ethernet to the basement shop. I think I'll do the latter. I envision carrying the PC back to the basement thinking I'm good to go, and then realizing something didn't work and I need to start over, or I forgot some file or driver. That can get frustrating. I don't want to spend a lot of time and effort supporting wifi when wired networking is free, easy and reliable. Add "Ethernet To Shop" to the many unexpected additions to my lathe project To Do list. I'll be supporting EMC2 on a milling machine after this, and I've even been looking at EMC2 controlled desktop lasers, so that To Do item will be time saved on future projects as well.
John - Big thanks to you as well for the 5i25/7i76 config file. I'll be needing that! As soon as I get internet to the EMC2 PC and my Mesa hardware arrives, I'll be downloading it.
Peter - The one week old 7i76 version 1.2 manual is in the recycling bin. I downloaded and printed the V1.4 manual. I placed my Mesa order a week ago and you advised there would be a delay of a week or two. It sounded like Andy's EMC2 integration might be the holdup, but that's apparently done, so I guess there are final tweaks in the hardware or FPGA code. Another week isn't a problem for me, and unfortunately, at the rate I'm going, shipping two weeks from now still won't impact my schedule. I'm looking forward to getting the Mesa hardware so I can start wiring up the lathe, but I have a lot of other stuff to do first.
Project Update - I finally got the lathe off the dollies, and leveled. I'm starting to wire up the spindle. Then I'll use the lathe as a manual lathe before starting the serious part of the CNC conversion. Once it was off the dollies, I finally took a look inside the headstock. I was unsure how I'd connect the CUI encoder to the hollow spindle as those generally mount on the centerline of a rotating shaft. There will be a 5' length of steel bar stock on the centerline of that spindle. There is the motor shaft and an intermittent pulley shaft, and while those run at some ratio of the spindle speed, I wouldn't be able to generate the once-per-revolution index pulse I'll need for threading operations, and to stop the chuck at an indexed position so I can integrate an automated chuck closer later. Thanks to Jon Elson's post at CNCZone.com, and his page describing how he monitors the spindle RPM on his Bridgeport ( pico-systems.com/bridge_spindle.html ). I've decided to follow his example and generate an absolute quadrature encoder signal by using automotive magnet & Hall effect sensors to detect the 33 gear teeth on the spindle gear and a nearby divot that was already drilled in the OD of the spindle.
I ordered four of the Allegro ATS667LSG Hall effect gear tooth sensors from Digi-Key yesterday.
Digi-Key - 620-1328-1-ND (Manufacturer - ATS667LSGTN-T)
search.digikey.com/us/en/products/ATS667...20-1328-1-ND/2042758
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 for a 132 count quadrature encoder. The fourth sensor is a spare. Clausing made that job fairly easy for me. I'm seldom that lucky, so it's a noteworthy event. I hope this is a good omen for the lathe CNC retrofit to come, but I suspect The Fates are lulling me into a false sense of security.

Now if life and work would stop intervening, I could get some work done on my CNC lathe conversion. Or, from another perspective, if my paying work would let up a bit, I could do the work that I hope will lead to more paying work in the future!
Please Log in or Create an account to join the conversation.