Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
we managed to get a few of these compact 5 pc from a local school. As most of you I started searching the internet for info on the lathe. I found this artical
http://www.maxton.com/ebay/emco/EMCO...to%20Mach3.pdf
from the digital machinist mag that explained how to remove the octal latch from the interface board, switching the board to step/dir and setting up mach. I did a search for the 74ls374 chip discussed in the artical. It looked like I could use linuxcnc to send the clock signal to the board. So after some figuring and searching I found figured out the printer port pins..
x step pin 2
x dir pin 3
z step pin 4
z dir pin 5
index pin 12
estop pin 11
100 ppr sensor pin 10
74ls374 enable pin 14
74ls374 clock pin 1
So I hacked together a hal file that used the 'reset' function of the printer port driver to send a clock every base period to latch the 74ls374 chip. After not remembering to set switch 1 to on on the emco interface board (sets the interface to step/dir) and scratching my I got linuxcnc communicating. The performance was not stellar. The article above talks about setting your max velocity to 19ipm. This is what I was seeing. Just pretty poor performance. Sounded crappy. Now it could be that I didn't have the timing perfect but read on.. (according to the article above - the original software did around 30ipm)
When I forgot to set switch 1 on the emco interface board - I had decided (by twiddling bits on the printer port with linuxcnc) that the default setup must have been phase drive. The original software controlled the 4 phases of the stepper drives/motors. I didn't have much to lose so I modified the linuxcnc hal file to do 4 phase drive for each axis and set switch on on the emco board back to 'off'.
HAL Component Descriptions
So pins 2-5 ran one stepper and pins 6-9 ran the other.
the stepgen in linuxcnc will do a bunch of wave forms - I was interested in - 5 through 10. (4 phase patterns)
I started with pattern 9. This is Unipolar Half Step
-This acted the same as the step/dir I started with. 19ipm max and sounded crappy.
Next I tried pattern 10. This was a long shot as it is Bipolar Half Step
-I don't think it worked at all - or at least it was way worse..
Then I tried pattern 5. Unipolar Full Step (one winding on)
-I had to half the steps per inch obviously - but it acted the same as the above. around 19ipm and sounded bad.
finally I tried patten 6. Unipolar Full Step (two windings on)
-Wow. This sounded nice. We started pushing it and it started sounding rough at around 40ipm. (didn't seem to be losing steps but I think I might be just fine with 35ipm max)
We still have to up the acceleration as that could be pushed a bit also. this is around .0005 per step - very usable.
Very happy.
Now we need to get the index and 100ppl setup in linuxcnc and I will take some videos (threading and such). with this performance initially - I don't know if I will change the drives/steppers until they fail...
one last thing I would like to try is putting the interface back into step/dir mode and from what I have read - you can put it into full step mode.
So - Again - this is without modifying the emco electronics in any way. Setting up linuxcnc to output the 'clock' to latch the chip.
when I get the encoder setup within linuxcnc - I will post the hal/ini files here.
sam
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
This is the waveform generated by linuxcnc
http://electronicsam.com/images/emco/Waveform.svg
Is this what you were wondering about?
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
Hey Sam , I've got a few questions about this . I've got the exact lathe on it's way , and though I was prepared to do a tear down on it , it would be nice not to have to break into the core of the lathe and it would be nice to use it as is .
I've been all thru the web looking for a software solution and I've come across your mods on a few different sites and I'm intrigued by what you've done .
I've noticed that you have a few versions in the parent directory , which one do you recommend using ?
I see that version 2 has something to do with spindle rpm , are you getting full spindle control with this ??
It's been a while since I've used emc but I'm no stranger to the milling portion , and it's probably the best software solution for a lathe , at least from everything that I've read over the years . I honestly don't think that mach can touch it
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
Sorry - missed this post. We have not modified the lathe at all.
Let me look over what I have - I could pull what is currently on the machine also.
sam
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
I looked at the files and in the latest version you have the half step which I assume is the config to use . I've seen your video's and it looks like your lathe runs great . I don't need something that runs at mach feeds , and it looks fast enough with the stock setup .
I'm not familiar with the hal stuff and some of what you've posted is greek to me , but it looks as though you've managed to nail it . I'm still a week or two away from having it sitting in my shop , so at this point I'm surfing the net to pick up some info on these and I've watched nearly every youtube video on the net . Sorta anxious and I'm looking forward to playing with it
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
Got my lathe today . Aside from having to do some snugging up on the ways , it's a sweet lil unit . Anything that I've learned in the past about linuxcnc is gone from my brain and I'm not sure as to what directories I need to drop the files into . I've been dropping them into the home / linuxcnc . Ive been searching around at different directories and I'm a bit lost . Linuxcnc doesn't like anything that Ive done and won't start up the emco setup .
Any input would be great , I know that it's straight forward stuff but I'm somehow walking a crooked line
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
Does the configs show up in the config picker?
what errors do you get?
I will grab the configs from the running machine tonight.
sam
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
it shows up in the picker . It looks like it's ready to run it but then linuxcnc shuts down
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
wait - it loads the linuxcnc gui - then exits?
Could you open a terminal and type
linuxcnc
Then copy and paste the text after linuxcnc shuts down?
1 Attachment(s)
Re: Emco compact 5 pc lathe - linuxcnc setup without circuit board hack.
Ok - I downloaded my configs here.
Index of /images/emco/linuxcnc_configs/Latest
Installed the latest linuxcnc livecd on some random hardware I had with a printer port and updated it (running linuxcnc 2.7.3 now)
I put the configs in /home/user/linuxcnc/configs
Launched linuxcnc and it errored. :) In 2.7 (I think) the 'probe_parport' command was removed. So - you need to edit the emco-lathe.hal file and remark out line 6 (see screenshot)
sam