Adding capabilities to my ELS system

Doppler chronograph sounds interesting. Did you use it to start/stop a timer? Did you create a thread for it? I might start one to document my ELS, but would like to see how others document builds first. I believe my design is somewhat unique and might be interesting to Some folks since I was able to handle instantaneous spindle speed changes with the hardware based state machine.

I can definitely relate to how these fun projects can snowball! What got me going a few years ago was an autopilot for my boat while trolling. My wife and I would head to the lake once a week for an overnight fishing trip during Covid. She would pilot the boat whenever I got a fish on. That became problematic when she decided to sleep in when I’d start fishing at 5am.

It was a year in development, primarily because testing required a trip to the lake. I started out thinking it would have an integrated UI, but half way through the development I decided to create a phone interface for it. From there I added a watch interface so I could make course corrections while reeling in a fish without putting the rod down. I got an Apple developer license and took 3-4 months to get proficient with phone and watch development including Bluetooth and WiFi. After trying a few off the shelf compass modules, I decided to build my own tilt compensated compass with a combine magnetometer, accelerometer and gyro chip. So I can definitely relate to how these projects go.
 
If you recall, my ELS has a touch screen interface, a Teensy 4.1 micro-controller, and an integrated two axis DRO. It currently can do 25 imperial threads, 24 metric threads, 9 imperial feeds, and 10 metric feeds, and will support other values, but I haven't entered them into the tables. I made a design choice to limit the number of entries to a single page, that can be easily selected by a finger tip. This was to keep the display programming simple. At some point, I may add the algorithm to compute the correct ratios inline. Currently they are computed offline, but are easy enough to add.

What my ELS isn't: A CNC lathe. However, I wish to add some features that while manual, augment the capability of the lathe. The goal is to make this easy to use, and hopefully, intuitive how to operate. Currently, the spindle motor is controlled by a VFD, which is not connected to the ELS. I replaced the original 0.001" resolution DRO's with 1um glass scales. There is no external DRO controller, the DRO display and updating is done in the ELS.

To get ready for these changes, I made a branch in my software repository, called feedtostop, and changed branches. This preserves my fully functional "production" ELS code, should I ever wish to revert to it. One thing that I did in the main branch, was to disable my ELS via disabling the spindle encoder. It was an early design choice, which I need to change. It does work, but it will make adding capabilities a little harder. Disabling the encoder starves the stepper algorithm of updates, so the stepper driver never receives stepper pulses. But this makes the whole system blind to the spindle position. It works ok for simple feeding and threading. But it will prove problematic for positioning to a stop. My new approach will be to gate the stepper driver pulses, but keep the spindle encoder active all the time. My spindle encoder uses signed 64 bit integers, so practically speaking there never should be a rollover issue to worry about, even at the highest speeds and leaving it on for years.

Made the gating changes just now, and need to test it. Hopefully this won't blow up in my face right away! Once the normal functionality has been proven with the gating change, I can start to plod through item #1, feed to a stop. For that to work, I will need a way to enter the end point, and a fool proof stopping mechanism that doesn't chatter at the end, as well as a way to simply restart the feed again.
My Initial read had me thinking you had a DRO you were reading with your ELS. Aafter a re-read, I see now that you are reading the scales with your ELS. I like that idea, and may look into adding that to mine once it’s up and running. The pico has two cores, and I’m currently only using one. I’ve also got a lot more room in the state machine to add additional programs. The Pico isn’t even breaking a sweat.
 
My Initial read had me thinking you had a DRO you were reading with your ELS. Aafter a re-read, I see now that you are reading the scales with your ELS. I like that idea, and may look into adding that to mine once it’s up and running. The pico has two cores, and I’m currently only using one. I’ve also got a lot more room in the state machine to add additional programs. The Pico isn’t even breaking a sweat.
There's no difference (software wise) between reading a rotary or linear quadrature encoder. The interrupt rate for the linear encoder, aka the DRO, is very much slower than the spindle encoder. Of course one is cyclic and the other isn't, but the updating and maintaining the position count is nearly identical. Personally, I think knowing the position of the carriage and cross slide is a "very good thing" and enables a lot of additional features. That's what I am "bumbling" through right now. Haven't had as much time as I would have liked recently to work on things, but that's the direction I'm heading.
 
Back
Top