clough42 / electronic-leadscrew

Lathe electronic leadscrew controller
MIT License
312 stars 116 forks source link

New feature: encoder driven hand-wheel #20

Open siwyroot opened 4 years ago

siwyroot commented 4 years ago

Hello James,

Is it possible to add following feature: Switching between encodes input base on lead screw engagement leaver. Something like in this clip: https://www.youtube.com/watch?v=lMS2DAUD_DA .I have a small metric lathe during retrofitting to your ELS and wanted to use ball-screw with closed loop stepper around 8.5N.m remove split nut. It would be nice to know what you thing of that idea.

Thanks!

clough42 commented 4 years ago

So the idea is to be able to jog manually so you could use it on a lathe without a halfnut?

What would be really awesome would be to have a virtual halfnut switch and put an encoder directly on the normal handwheel of the lathe.

I think this is pretty advanced, but something that might make sense someday.

siwyroot commented 4 years ago

Hello,

Exactly this is the idea, I wonder how controller would behave in moment when we would switch by some chip input of the encoder to another one.

BR

On Thu, Sep 26, 2019 at 11:32 PM clough42 notifications@github.com wrote:

So the idea is to be able to jog manually so you could use it on a lathe without a halfnut?

What would be really awesome would be to have a virtual halfnut switch and put an encoder directly on the normal handwheel of the lathe.

I think this is pretty advanced, but something that might make sense someday.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clough42/electronic-leadscrew/issues/20?email_source=notifications&email_token=AHFZ73IKD5E6ODEUXAVIEQDQLUS6JA5CNFSM4I2DE2RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XAXTA#issuecomment-535694284, or mute the thread https://github.com/notifications/unsubscribe-auth/AHFZ73MXZKJCEVJ7XC7DCD3QLUS6JANCNFSM4I2DE2RA .

clough42 commented 4 years ago

The microcontroller board has a second encoder input, so something like this would be possible. Right now I'm focused on getting the basic functionality wrapped up and available for people, but this is definitely something to think about.

James

On Fri, Sep 27, 2019 at 12:02 AM siwyroot notifications@github.com wrote:

Hello,

Exactly this is the idea, I wonder how controller would behave in moment when we would switch by some chip input of the encoder to another one.

BR

On Thu, Sep 26, 2019 at 11:32 PM clough42 notifications@github.com wrote:

So the idea is to be able to jog manually so you could use it on a lathe without a halfnut?

What would be really awesome would be to have a virtual halfnut switch and put an encoder directly on the normal handwheel of the lathe.

I think this is pretty advanced, but something that might make sense someday.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/clough42/electronic-leadscrew/issues/20?email_source=notifications&email_token=AHFZ73IKD5E6ODEUXAVIEQDQLUS6JA5CNFSM4I2DE2RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7XAXTA#issuecomment-535694284 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AHFZ73MXZKJCEVJ7XC7DCD3QLUS6JANCNFSM4I2DE2RA

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/clough42/electronic-leadscrew/issues/20?email_source=notifications&email_token=AAZLSHH5JH6MO4SDIBBNIL3QLWOXVA5CNFSM4I2DE2RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7X2TPI#issuecomment-535800253, or mute the thread https://github.com/notifications/unsubscribe-auth/AAZLSHCUQSLE7REBNMLMYBLQLWOXVANCNFSM4I2DE2RA .

dentikhval commented 4 years ago

Hi, this is exactly what I am thinking about and what I am building. I will have a ballscrew nut directly connected to the apron, no halfnuts or hand feed options on the lathe. (It was a weird special purpose lathe so it originally had no leadscrew or auto feed) Hence, I am thinking of using the second encoder input QEP2 to read a 100PPR MPG wheel that would act as manual apron feed would on a normal lathe. That would call for three operation modes: Auto feed as it exists now, Manual feed with a settable MPG/Apron ratio, and Threading as it exists now.

Also, the code has to be modified in our case to use buttons for auto feed to be able to stop at the right moment and not run into something (which wouldn't be a problem if we could unlock the halfnut). The buttons on the LED&KEY module won't suit this purpose so bigger, more responsive, bigger non-locking buttons (or better a lever switch for Auto feed FWD/STOP/REV) would have to be installed in a comfortable place.

While we're at it, the mode selection buttons should also be bigger physical switches because the flimsy buttons of the LED&KEY will surely suffer from frequent presses in a no-halfnut environment.

I'll keep you posted if I have any progress with that.

dentikhval commented 4 years ago

It took a while but it works! See code here: https://github.com/dentikhval/electronic-leadscrew Now I can control the feed with two buttons or a two-position lever (left/stopped/right) and the position can be precisely adjusted with a generic MPG handwheel connected to eQep2. This allows me to use a ballscrew and a ballnut fixed directly to the apron, and have all of the functions of a normal lathe in a very tight package. Threading mode is left unchanged. The only problem you may encounter is the MPG-controlled movements will be some weird value if you have a leadscrew or microstep setting other than mine (5mm pitch leadscrew, 2000 microsteps per revolution), but this is not an issue I am willing to put more time into.