Lathe Outfitted With Electronic Gearbox

Running a metal lathe is not for the faint of heart. Without proper knowledge and preparation, these machines can quickly cause injury or destroy expensive stock, tools, or parts. The other major problem even for those with knowledge and preparedness is that some of their more niche capabilities, like cutting threads with a lead screw, can be tedious and complicated thanks to the change gear system found on some lathes. While these are useful tools for getting things done, [Not An Engineer] decided that there was a better way and got to work building an electronic gearbox to automate the task of the traditional mechanical change gear setup in this video.

What makes change gears so tricky is that they usually come as a set of many gears of different ratios, forcing the lathe operator to figure out the exact combination of gears needed to couple the spindle of the lathe to the feed screw at the precise ratio needed for cutting a specific thread pattern. It is possible to do this task but can be quite a headache. [Not An Engineer] first turned to an Arduino Nano to receive input from a rotary encoder connected to the shaft of the lathe and then instruct a motor to turn the feed screw at a set ratio.

The first major problem was that the Arduino was not nearly fast enough to catch every signal from the encoder, leading to a considerable amount of drift in the output of the motor. That was solved by upgrading to a Teensy 4.1 with a 600 MHz clock speed. There was still one other major hurdle to cross; the problem of controlling the motor smoothly when an odd ratio is selected. [Not An Engineer] used this algorithm to inspire some code, and with that and some custom hardware to attach everything to the lathe he has a working set of electronic change gears that never need to be changed again. And, if you don’t have a lathe at all but are looking to get started with one, you can always build your own from easily-sourced parts.

https://www.youtube.com/watch?v=iSDNKmk5B20

 

18 thoughts on “Lathe Outfitted With Electronic Gearbox

  1. I saw that video a few days ago, but didn’t catch the “Arduino was not nearly fast enough to catch every signal from the encoder, ” bit.

    Hunh? This the the 21st century. Weren’t quadrature counter inputs on micros invented for exactly this purpose a long time ago? The Due has two channels. The Teensy4 has four of them. Libraries exist.

    If you’re hell-bent on using something stoneage without a quadrature input counter, you still have the option of dedicated quadrature counter chips; some even give you a nice SPI interface.

    There’s no excuse at all to miss encoder counts.

      1. Quadrature encoder inputs were handled just fine back in the last millennium with an 8-bit 4.7 MHz 8088 PC through the parallel printer port as input. Raw speed is not the answer. Correctly understanding the problem is.

    1. It’s also easy enough to toss your own quadrature decoder in front of a chip that doesn’t have them built in.

      https://www.fpga4fun.com/QuadratureDecoder.html

      Hook the step line up to an interrupt, and read the direction line when it hits. The speed limit will be how quickly your chip can get in/out of IRQs, or if you can think up a clever counter using the hardware peripherals.

      I suspect the Arduino libraries are trying to do it all in software, and that’s what is slowing them down.

  2. You make it sound like there is some kind of black magic to using gears. You look up what you want on a table and put the correct ones in and the advancement speed is locked to the spindle speed. Any kind of electronic solution is going to be sloppier. Just wasting time re inventing a wheel that you are not going to improve on and does not need to be re invented.

    1. That’s fine if you only want to cut threads that are on the tables. 95% of the custom threads I cut, aren’t on the tables because they’re non-standard and I can’t buy them and that’s why I’m cutting them. And on my lathe, unless you go find a NOS triple slot banjo, it’s only approximately correct or impossible to get some feeds, so you can only cut a few threads deep before the cumulative error makes it bind.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.