Re: Compact 5 pc running linuxcnc - no circuit board mods (plug and play)
Posted by
samcoinc2001
on 2013-08-02 11:36:42 UTC
Fun with linuxcnc... Variable pitch/diameter threading...
http://electronicsam.com/images/emco/fusee3.JPG
it is a fusee for a rat-trap powered car..
Stolen from
http://jmkasunich.dyndns.org/cgi-bin/blosxom/shoptask/fusee-1.html
sam
http://electronicsam.com/images/emco/fusee3.JPG
it is a fusee for a rat-trap powered car..
Stolen from
http://jmkasunich.dyndns.org/cgi-bin/blosxom/shoptask/fusee-1.html
sam
--- In CAD_CAM_EDM_DRO@yahoogroups.com, "samcoinc2001" <samcoinc2001@...> wrote:
>
> So
>
> After some slight tweaking... (it hasn't lost steps - but I wanted to get the alignment as close to perfect as I could.) it ended up being 1/2 step (0.000273403). Obvious I guess with the way the patterns line up...
>
> accelerating (halfstep left side - full step right - xswitch is the velocity trigger point)
>
> http://www.electronicsam.com/images/emco/betterstep.png
>
> de-accelerating (full step left - half step right xswitch is the velocity trigger point)
>
> http://www.electronicsam.com/images/emco/betterstep_de-accelerating.png
>
> sam
>
> --- In CAD_CAM_EDM_DRO@yahoogroups.com, "samcoinc2001" <samcoinc2001@> wrote:
> >
> > So - as far as I can tell - the original control did 1/2 stepping up to about 19ipm - then full stepping from there to 30ipm. Now the lathe runs fine on full stepping from 0 to 40 (maybe 45)ipm. Half stepping only works well up to 20ipm-ish. (stalls above that)
> >
> > But why stop there..
> >
> > I started thinking about if linuxcnc could do that.... (without coding anything)
> >
> > A couple advantages of halfstepping..
> > 1 higher resolution 0.000273403/step vs 0.000546806 per step
> > 2 reduced resonance.. (I have not run into this with full stepping on the lathe)
> >
> > Then at normal cutting speeds - < 16ipm you get a higher resolution.
> >
> > So why not have 2 stepgens running. One that half steps (type 9) with input scale of 3657.6073152 and the other full stepping (type 6) with a scale of 1828.8036576 (lathe calculation - metric screws)
> > Then switch between the two stepgens at a specific feed (I picked 16ipm with a hysteresis of 1ipm)
> > All I can say is - HAL IS AWESOME
> > I setup a Lut5 with Jeff E's help (thanks jeff!) that switches the printer port between the 2 stepgens.
> > A offset componant was used between the 2 stepgens to better align the phasing. (not tweeked 100% yet) but we jogged it around - could not tell that it was switching between the 2 stepgens and it always came back to 0.
> > there is a bit more than that.. (ddt for calculating the axis velocity, abs of that, comp w/hystorisis, and stuff I have forgotten already.)
> >
> >
> > And here is a halscope capture. Left side is halfstepping - right side is full stepping. The trigger is the velocity threshold.
> >
> > www.electronicsam.com/images/emco/Screenshot.png
> >
> > I think the offset could be tweaked more scientifically to maybe get rid of the blip. But as it is running the 4 phases directly - it didn't seem to effect the motion.
> >
> > here is the initial configs.
> >
> > [url=http://www.electronicsam.com/images/emco/linuxcnc_configs/full-half_step_test/%5dIndex of /images/emco/linuxcnc_configs/full-half_step_test[/url]
> >
> > again - jmk and everyone that has worked on hal - Very very awesome work!
> >
> > sam
> >
> > ps - another threading video
> >
> > https://www.youtube.com/watch?v=Z_LxyosF2yc
> >
> > Last one I swear ;)
> >
> > --- In CAD_CAM_EDM_DRO@yahoogroups.com, "samcoinc2001" <samcoinc2001@> wrote:
> > >
> > > heh should read...
> > >
> > > xphase-a pin 2
> > > xphase-b pin 3
> > > xphase-c pin 4
> > > xphase-d pin 5
> > > zphase-a pin 6
> > > zphase-b pin 7
> > > zphase-c pin 8
> > > zphase-d pin 9
> > >
> > > Tried it on a second emco compact 5 pc and worked the same.
> > >
> > > Reading the manual - I think what the original software did was do half stepping up to a certain threshold - then switched to full stepping for shuttling. somewhere around 19ipm I would guess.
> > >
> > > But we are talking .00025ish vs .00005ish - I think that is fine. If we find there is a resonance issue - then I might think about seeing if I can get linuxcnc to do the same thing.. It may be possible.
> > >
> > > sam
> > >
> > > --- In CAD_CAM_EDM_DRO@yahoogroups.com, "samcoinc2001" <samcoinc2001@> wrote:
> > > >
> > > > 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 an article in summer 2007 issue of digital machinist. The digital machinist article explained how to remove the octal latch from the interface board, Jumping it, then switching the board to step/dir and setting up mach. I did a search for the 74ls374 chip discussed in the article. 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'. (and maybe there was a reason why they did it that way... who knows)
> > > >
> > > > http://www.linuxcnc.org/docs/2.5/html/hal/rtcomps.html#_stepgen_a_id_sec_stepgen_a
> > > >
> > > > So pins 2-5 ran one stepper and pins 6-9 ran the other.
> > > >
> > > > xphase-a pin 2
> > > > xphase-b pin 3
> > > > xphase-c pin 4
> > > > xphase-d pin 5
> > > > yphase-a pin 6
> > > > yphase-b pin 7
> > > > yphase-c pin 8
> > > > yphase-d pin 9
> > > >
> > > > 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. Actaully have been playing with it for the last few days - 45ipm seems to be repeatable. (indicated) but we have been running it at 40ipm.
> > > >
> > > > Very happy.
> > > > 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. All 4 switches off on the emco interface board.. Plug and Play.
> > > >
> > > > Unmolsted emco interface and stepperdrive
> > > > http://electronicsam.com/images/emco/interfaceanddrive.JPG
> > > >
> > > > Picture of one of the lathes.
> > > > http://electronicsam.com/images/emco/emcoclose.JPG
> > > >
> > > > Videos of threading.
> > > > http://www.youtube.com/watch?v=ERMizV-yy8U
> > > > https://www.youtube.com/watch?v=_7skJhKzU7Y
> > > >
> > > > Initial version of the config files here
> > > > http://electronicsam.com/images/emco/linuxcnc_configs/
> > > > I would like to add a spindle rpm meter and a at-speed setup within hal so that the machine won't cut unless the spindle is on.
> > > > (use at your own risk)
> > > >
> > > > sam
> > > >
> > >
> >
>
Discussion Thread
samcoinc2001
2013-07-14 17:28:21 UTC
Compact 5 pc running linuxcnc - no circuit board mods (plug and play)
samcoinc2001
2013-07-16 06:45:27 UTC
Re: Compact 5 pc running linuxcnc - no circuit board mods (plug and play)
samcoinc2001
2013-07-18 14:40:50 UTC
Re: Compact 5 pc running linuxcnc - no circuit board mods (plug and play)
samcoinc2001
2013-07-21 13:30:24 UTC
Re: Compact 5 pc running linuxcnc - no circuit board mods (plug and play)
samcoinc2001
2013-08-02 11:36:42 UTC
Re: Compact 5 pc running linuxcnc - no circuit board mods (plug and play)