Electronic Gear Hobbing was discussed during yesterdays’ Zoom meeting of the Society of Model and Experiment Engineers Digital Group.
Gear Hobbing is more challenging than an Electronic Lead Screw; as I understand it an ELS only needs to create a single gear ratio whilst a hobber needs two or more. Example picture is of the Jacobe Gear Hobber described on the most excellent lathes.co.uk, loads of gears!
In a digital ELS a computer or conventional logic circuit, measures the lathe’s spindle speed, does a simple calculation, and sends a stream of pulses to a stepper or servo motor driving the lead-screw. Thus the lead-screw can be turned at any reasonable ratio relative to the spindle, and the electronics replace the change gears. There are a bunch of gotchas, notably the lead-screw and spindle have to stay in sync requiring the spindle speed to be measured accurately, and the electronics and lead-screw motor fast enough to keep up.
The advantage of a computer is that complex logic can be programmed and altered, which is generally quicker and easier than building the equivalent circuit from discrete components, which in turn is quicker and easier to develop than a complex mechanical design. But computers are slower than hard wired circuits, and electronic solutions introduce new problems: unlike a mechanical gear train they don’t stay in sync automatically.
The question was asked: which microcontroller is most suitable for this application? The group assumed that calculating speed would be the limitation, along with accumulating error due to calculating in floating point. Avoiding these problems implies a fast microcontroller, with high precision floating point executed on a built in Floating Point Accelerator (FPA). That eliminates most of the Arduino range, but the Nucleo is a possibility. Clough42’s successful ELS, uses a fast 32bit Texas Instruments microcontroller, which is less well known, at least to me!
Last night I looked at Clough42’s code and the Texas Instruments data-sheet:
- The maths is short and sweet. Clough42’s code allows it to be done it either floating point or integer maths, I guess because integer will work on a cheaper TI microcontroller that doesn’t have a FPA. Anyway, the maths makes no provision for accumulating error, and is so short it can’t be a significant bottle-neck.
- The TI microcontroller is designed for this type of application. In an ELS, the lathe spindle turns a rotary encoder, probably emitting 400 pulses per rotation, so the computer has to track over 13000 events per second at 2000rpm. An Arduino struggles with this because each pulse triggers an interrupt function that keeps track of position, speed and direction. The function is time-critical and uses a lot of processor time – a massive bottleneck. The TI controller avoids this bottleneck by continually decoding up to two rotary encoders in hardware: position, speed and direction do not have to be tracked by the processor, the information is read when needed. Much simpler and faster.
The TI microcontroller (F280049C) is a 100MHz 32-bit specialist that leaves an 8bit 16MHz in the dust for this requirement. That it only supports two rotary encoders in hardware may be a problem for an Electronic Gear Hobber, though it could support more in software in the same way as an Arduino.
Some Nucleo boards also appear to have a hardware rotary decoder, but I wasn’t able to find any details last night. Might be hard to use because the mbed development environment doesn’t support the hardware directly, and low-level programming is hard work.
So, the TI chip is now the most suitable that I know of for an Electronic Gear Hobber, but I don’t understand how many spindles it needs to measure, how many ratios and motors are needed, or how fast the computer needs to go. Anyone able to give a steer on that?
The Digital Group also discussed the advantages of a hardware solution based on phase locked oscillators. I understand the principle well enough to know the approach is feasible, but it’s outside my skill-set. Another technology I’m interested in, but mostly ignorant!
Dave