Logan Model 200 Servo Threading

"It would be interesting, but it's outside the scope of what I'm trying to accomplish.
My goal is something that will bolt on to a stock Model 200 (and maybe some other QCGB-less lathes further on) and give the functionality of a Monarch 10ee with an ELSR. A full CNC lathe is another animal entirely. "


So how does one go about changing the scope of what you are trying to accomplish??? LOL
 
Last edited:
"It would be interesting, but it's outside the scope of what I'm trying to accomplish.
My goal is something that will bolt on to a stock Model 200 (and maybe some other QCGB-less lathes further on) and give the functionality of a Monarch 10ee with an ELSR. A full CNC lathe is another animal entirely. "


So how does one go about changing the scope of what you are trying to accomplish??? LOL

Feature Creep has already taken it much further than I had originally intended. When I started I was just going to use a gear motor to drive the cross feed a little slower (I've left the spur gear on the tail end of the lead screw for now as a reminder). I really, really don't want to get into retrofitting it with ball screws and stepper motors.

Plus, in a few days I may become the owner of a 10EE (without ELSR, with taper attachment) that needs some TLC. I've got to wrap this up and get pictures and videos of everything actually working because, as everyone knows, if you don't have pictures it didn't happen!

-Jon
 
I'm waffling, because I can't decide whether I want to turn it into an actual product. Of course, I kinda have to finish it first. Over the weekend I ripped out the jogging routines and completely re-wrote them. Much cleaner code, and a better acceleration profile. It tends to work that way, since on the first (or second) pass you don't really understand the problem. Then I worked on feeding/threading to a shoulder some more. It's going to take another pass or two to get that right. Then I have several other "enhancements" on my list. Software is never done.

if you can collaborate via open source you can still sell it as a product and also get help from a community.

I'm trying to understand the russian ELS here: https://github.com/jschoch/electonic_guitar. I have the manual mode working and one of the automated modes.

A few thoughts I had:

  1. there are a ton of buttons and controls. I wonder if bluetooth and a mobile app would be a better way to configure it and then just have a very simple physical button layout.
  2. it requires pre-computation of a threading table. this is likely due mostly to #1 and the added complexity of adding numerical input to the already complex control scheme.
  3. the mega is slow. I wonder if ESP32, ESP8266, or STM32F103 are better fits.
  4. I don't have the LCD used and I plan to add an i2c OLED screen to replace the LCD with. I'm just sprinkling serial prints to understand it now.


Regarding feature creep: I'm really debating the need for feeding the X axis. All I really need is to set a feed speed and a threading sync. the rest just gets you on the verge of CNC.

my particular lathe is pretty FUBAR as the threading tables don't actually work with the banjo and headstock gear the lathe has on it...
 
if you can collaborate via open source you can still sell it as a product and also get help from a community.

I'm trying to understand the russian ELS here: https://github.com/jschoch/electonic_guitar. I have the manual mode working and one of the automated modes.

A few thoughts I had:

  1. there are a ton of buttons and controls. I wonder if bluetooth and a mobile app would be a better way to configure it and then just have a very simple physical button layout.
  2. it requires pre-computation of a threading table. this is likely due mostly to #1 and the added complexity of adding numerical input to the already complex control scheme.
  3. the mega is slow. I wonder if ESP32, ESP8266, or STM32F103 are better fits.
  4. I don't have the LCD used and I plan to add an i2c OLED screen to replace the LCD with. I'm just sprinkling serial prints to understand it now.

Regarding feature creep: I'm really debating the need for feeding the X axis. All I really need is to set a feed speed and a threading sync. the rest just gets you on the verge of CNC.

my particular lathe is pretty FUBAR as the threading tables don't actually work with the banjo and headstock gear the lathe has on it...

Our local Tech School is having a Maker Space open house next week that I'm thinking of attending. There certainly ought to be people there who can provide some insight/advice on putting out a product.

1) All of the buttons on other ELS's is why I went to the Touchscreen-plus-Knob. I offloaded a lot of complexity to the Nextion display so that the Mega could just do the real-time work. No way I wanted a mess of connections to a front panel. Been there, done that. I have a breadboard stacked between a DIN-rail terminal block and the Mega with a couple of RC filters and pullups on it, and a header to consolidate the display/knob connections. If I do a product, I will make a board to do all of that.

2) Pre-computing is the way to make it efficient and fast. In fact, I think it would be kind of silly to do it any other way (but I started doing this back when a 6502 was hot stuff, so the Mega looks pretty nimble to me). The spindle count just provides an index into a lookup table, allowing the interrupt handler to execute in a few microseconds. At 1500rpm my spindle is interrupting at 20khz, so there is only 50us between ticks to get everything else done. If you have to do any math at all you quickly get in trouble.

3) So far the Mega is handling my setup pretty well. I bought a Due just in case, but haven't needed the hardware quadrature decoding.

4) Look at the Nextion lineup. I ignored their Arduino library and parse everything myself with a couple of simple case statements. Keep the protocol simple and it leaves you with lots of cycles to do other things.

My Model 200 looks stock until you notice the touch screen and the enclosure under the pan. I want to keep it that way.
 
Our local Tech School is having a Maker Space open house next week that I'm thinking of attending. There certainly ought to be people there who can provide some insight/advice on putting out a product.

1) All of the buttons on other ELS's is why I went to the Touchscreen-plus-Knob. I offloaded a lot of complexity to the Nextion display so that the Mega could just do the real-time work. No way I wanted a mess of connections to a front panel. Been there, done that. I have a breadboard stacked between a DIN-rail terminal block and the Mega with a couple of RC filters and pullups on it, and a header to consolidate the display/knob connections. If I do a product, I will make a board to do all of that.

2) Pre-computing is the way to make it efficient and fast. In fact, I think it would be kind of silly to do it any other way (but I started doing this back when a 6502 was hot stuff, so the Mega looks pretty nimble to me). The spindle count just provides an index into a lookup table, allowing the interrupt handler to execute in a few microseconds. At 1500rpm my spindle is interrupting at 20khz, so there is only 50us between ticks to get everything else done. If you have to do any math at all you quickly get in trouble.

3) So far the Mega is handling my setup pretty well. I bought a Due just in case, but haven't needed the hardware quadrature decoding.

4) Look at the Nextion lineup. I ignored their Arduino library and parse everything myself with a couple of simple case statements. Keep the protocol simple and it leaves you with lots of cycles to do other things.

My Model 200 looks stock until you notice the touch screen and the enclosure under the pan. I want to keep it that way.

1. I assume you have a phone with a touch screen, so does most everyone else. If you decouple the interface you can make the dedicated touchscreen an option. That said, physical buttons are nice when you need to look elsewhere and still feel the controls. Seems to me that making it modular is worthwhile since there are likely tons of opinions on the interface.

2. to be more specific, the table could be calculated once on init/startup so that you don't have to re-flash if you want to change one of the parameters. you still enjoy pre-computation when it is running but can avoid dragging out the laptop and cables to make changes.

3. the mega is pretty darn slow compared to a 32bit board. this impacts your spindle encoder resolution and the microstepping settings you can use. bluepill stm32 is like $2 each. esp32 gives you 2 cores and networking (bluetooth for phone interface). Making it modular here is a win since everyone will have their own preferences. HAL work in grbl seems to be an interesting template for hardware abstraction in real projects.

anyway, Hope you share your code! if not, good luck with productizing it.
 
Are you two still speaking English? I got lost a couple posts back. o_O
 
Are you two still speaking English? I got lost a couple posts back. o_O

sorry to take this to geek land... lots of ways to skin the apple in both hardware and software for one of these projects. I happened to be digging through another approach commonly known as the "russian ELS" and hoped to collaborate. Sorry for the tangents i've pulled the thread on.

For anyone interested in the russian ELS I plan to post my source code for the firmware on github once I've documented how it works (lots of translation).
 
Oh, I'm sure you're much more up-to-date on things than I am. Thanks for suggesting the Blue Pill/STM32. It certainly beats the pants off of an ATMEGA2560 price/performance-wise. Is there one in particular that you would recommend? I might want to give porting my code over to one a try, if for nothing more than the quadrature decoding.
 
Oh, I'm sure you're much more up-to-date on things than I am. Thanks for suggesting the Blue Pill/STM32. It certainly beats the pants off of an ATMEGA2560 price/performance-wise. Is there one in particular that you would recommend? I might want to give porting my code over to one a try, if for nothing more than the quadrature decoding.

there are some good guides on stm32duino.com if you want to keep using the arduino IDE. there are a quite a few different chipsets. the super cheap blue pills are "STM32F103C8T6 "



Back to the topic at hand, I've been digging more and I have replaced the LCD with an OLED using i2c. As I dug into the ISR for the encoder i see that there is a ton of stuff in there including driving the motor. Are you using external interrupts or are you pollling the encoder via a timer?

I'm also wondering what microstepping you are targeting and why? I bought a closed loop hybrid stepper to direct drive the lead screw. I would like to leverage it's smooth microstepping as much as possible. The russian ELS seems to be targeted at 1/4 microstepping which isn't very smooth.

also i'd love some coffee!
 
Back
Top