- Joined
- Feb 25, 2021
- Location
- Southwest, Indiana
As an alternate to "knowing" the gearbox settings, the ELS could use a low resolution encoder on the end of the leadscrew to measure the gearing.
As an alternate to "knowing" the gearbox settings, the ELS could use a low resolution encoder on the end of the leadscrew to measure the gearing.
While I agree starting simple is best (crawl, walk, run), I like to think through potential areas that might be interesting to avoid ruling them out in the initial design. Two things that would make sense to me for threading would be
1) auto stop at a point (shoulder, thread gutter, etc). This would reduce the issue of getting the leadscrew disengaged a a key spot.
2) rapid travel to a point. Typically in reverse from the primary threading direction. Why reverse the whole spindle when the ELS could just back the carriage up
These two features would allow you to easily thread without disengaging the half nuts.
For real time processing, I would have the ELS track the encoder turns using an up/down counter. Each encoder input should simply increment/decrement the counter appropriately. Makes for a very short encoder ISR. Possibly also grab the clock time of the interrupt.
Based on the encoder counter, calculate the rate of stepping for the motor. Set up a timer interrupt at that rate to drive the leadscrew. That rate is obviously dynamic.
This keeps the stepper running smoothly rather than using the encoder as a timer for the stepper which is going to have jitter due to rounding and irrational encoder/stepper ratios. It also facilitates an algorithm to accelerate the carriage (leadscrew) to avoid missed steps if using a simple stepper instead of a hybrid or servo.
This may be more complicated than a simple ELS needs but is how I envisioned getting the best performance out of the hardware.
FYI Teensy prices have jumped 50% since I bought mine. They are around $26 now. Having a Pico do this would be a great thing for people.
That being said, so far, I don't have any issues using a single core processor (Teensy 4.1) at encoder rates up to 400 KHz without losing steps. Using a 4096 pulse per revolution encoder, that is about 5859 RPM, which is more than twice as fast as my lathe can go! I can also drive the display at 100ms concurrently.
As I said earlier an ELS is a about three down on the project list of microcontroller projects. Since I already have full featured QCGBs on all three lathes, If I do get around to it I’ll be interested in implementing something with a little more than simple ratio functionality.Controlling the gearing by managing a timer running the stepper rather than using fractions from the encoder is a significantly different approach, and I have not investigated that in any detail. Maintaining the gearing ratio precisely might be a significant computational and timing challenge during spindle speed changes due to cutter loads. For that technique one might choose a processor with a richer timer system and higher computing speed rather than a Pico. The Pico PIO and multicore is well suited to the fractional approach which has been very successful for many ELS projects. Have you found any examples of the timer driven approach to ELS that discuss the requirements for the processing and timing hardware?