× Forum Header

lathe encoder

More
01 Apr 2021 06:56 - 01 Apr 2021 07:18 #204363 by jbraun
lathe encoder was created by jbraun
I'm having some trouble understanding the encoder on a lathe project. The spindle readout in Axis drops to approx 10 rpm fairly quick when the spindle stops but takes about 10 seconds to drop to 0.1 and never returns to zero.
encoder.0.velocity-rpm reads 0.1397 at stand-still
encoder.0.position-interpolated bounces around crazy on the 3rd decimal and the only way I've found to stop this is increasing min-speed-estimate to many times the default. That doesn't feel like a proper solution and none of the above seems normal.
I've tried both a CUI capacitive and an Omron (knock-off) optical encoder with identical results. Only A channel and index are hooked-up. No synchronisation has been tested as the lathe is still in the build stage. The wiring is very basic since I don't know electronics, wired straight to parallel port..
Is what's described above typical and if not any clues why ?
A HAL file is attached.
btw the spindle speed is manual control.

File Attachment:

File Name: little_lathe.hal
File Size:4 KB

File Attachment:

File Name: pyvcp_options.hal
File Size:1 KB
Attachments:
Last edit: 01 Apr 2021 07:18 by jbraun.

Please Log in or Create an account to join the conversation.

More
01 Apr 2021 07:24 #204366 by cmorley
Replied by cmorley on topic lathe encoder
is 100 for encoder.0.position-interpolated the large value you tried?

that's 1.6 RPM - pretty low for a lathe spindle.
From the manual:

encoder.<chan>.position-interpolated (float, Out) - Position in scaled units, interpolated between encoder counts. The position-interpolated attempts to interpolate between encoder counts, based on the most recently measured velocity. Only valid when velocity is approximately constant and above min-speed-estimate. Do not use for position control, since its value is incorrect at low speeds, during direction reversals, and during speed changes. However, it allows a low ppr encoder (including a one pulse per revolution encoder) to be used for lathe threading, and may have other uses as well.

encoder.<chan>.min-speed-estimate (float, in) - Determine the minimum true velocity magnitude at which velocity will be estimated as nonzero and postition-interpolated will be interpolated. The units of min-speed-estimate are the same as the units of velocity . Scale factor, in counts per length unit. Setting this parameter too low will cause it to take a long time for velocity to go to 0 after encoder pulses have stopped arriving.


Seems to discuss your exact problem. I don't have real world experience with this setting so can't definitively say this is typical.

Please Log in or Create an account to join the conversation.

More
01 Apr 2021 15:00 #204393 by jbraun
Replied by jbraun on topic lathe encoder

is 100 for encoder.0.position-interpolated the large value you tried?

Yes, StepConf .hal doesn't include that line so it defaults to 1.0
The spindle doesn't seem to lose track of accumulated position, it's the velocity that's a bit wonky.
If velocity plays no part in sync for thread cutting I can live with the rpm display being a bit unresponsive. The thing is I don't know enough to know if this is a real problem.

Please Log in or Create an account to join the conversation.

More
01 Apr 2021 15:13 #204395 by cmorley
Replied by cmorley on topic lathe encoder
I think the manual explains it well enough - there is only so much you can do with a single pulse per rotation.

Real world testing will tell the story - please revisit this thread when you get an answer so others will know.

Chris
The following user(s) said Thank You: jbraun

Please Log in or Create an account to join the conversation.

More
01 Apr 2021 15:39 - 01 Apr 2021 15:43 #204398 by jbraun
Replied by jbraun on topic lathe encoder
Okay thanks. This project will need the big mill and it's still sub-freezing in that space. In other words this won't be completed any time real soon. I could connect the B channel but don't foresee a real need for the intended use. I don't think of it as a single pulse per rev since the A channel is 100 ppr.
Last edit: 01 Apr 2021 15:43 by jbraun.

Please Log in or Create an account to join the conversation.

More
02 Apr 2021 22:55 - 03 Apr 2021 10:05 #204570 by andypugh
Replied by andypugh on topic lathe encoder
I think that using only the A-channel is likely to cause problems.

If the spindle is sat on an edge, and vibrating, then the system will see lots of spurious pulses and the position will count monotonically up.

With full quadrature ( A and B ) this doesn't happen, the on-pulse counts up, then the off-pulse counts down.

If there is any chance that you would want to do rigid tapping on the lathe then you absolutely need all three encoder channels.
Last edit: 03 Apr 2021 10:05 by andypugh.
The following user(s) said Thank You: jbraun

Please Log in or Create an account to join the conversation.

More
03 Apr 2021 04:51 #204590 by jbraun
Replied by jbraun on topic lathe encoder
Okay I wasn't aware adding a B channel has possible benefits beyond rigid tapping. It doesn't look hard to hook-up or configure so I'll see how that goes. I do want to stay with LPT for now and the encoder can be reduced to 48 ppr if needed. I'm aiming at 4000 RPM max capability but don't expect to be using that speed often or ever, certainly not for cutting thread.

This machine is going to be a mongrel for occasional use. An excuse to build something again really. The headstock is off a Sieg 7x12 and has a 4" 4-jaw chuck. So far the hi/low gears are still being used. The motor and MC-60 control are treadmill salvage. I've added a reverse switch and also kept the flywheel in hopes that it helps steady the rpm. Afaik the MC-60 can only be controlled by potentiometer.

Please Log in or Create an account to join the conversation.

More
03 Apr 2021 10:11 - 03 Apr 2021 10:12 #204604 by andypugh
Replied by andypugh on topic lathe encoder

I do want to stay with LPT for now and the encoder can be reduced to 48 ppr if needed. I'm aiming at 4000 RPM max capability but don't expect to be using that speed often or ever, certainly not for cutting thread


I ran a lathe for years that couldn't track te encoder above 1200 rpm. It wasn't a problem as the Z axis was nowhere near fast enough to thread at those rpm. Threading re-synchs to the index on every pass, so losing counts at high speed isn't a disaster.


The motor and MC-60 control are treadmill salvage. I've added a reverse switch and also kept the flywheel in hopes that it helps steady the rpm. Afaik the MC-60 can only be controlled by potentiometer.


There are digital potentiometer replacements ( uk.rs-online.com/web/p/digital-potentiometers/7239930/ as an example) or you can generally use something like photos.app.goo.gl/DCKF7nEkTF7RCtBo6 (or a ready-to go: store.mesanet.com/index.php?route=produc...oduct&product_id=205 )
Last edit: 03 Apr 2021 10:12 by andypugh.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum