Well, here it is at last. It's taken about 6 months to get to this point, mainly because of some short-sightedness on my part.
The basic idea is to make an attachment for the lathe which will enable it to wind coils using any diameter of wire you like. There is an optical encoder disc mounted on the lathe spindle which sends pulses to a computer. The wire spool and guide are mounted on a stepper-driven linear slide which is controlled by the computer. Some switches control the direction of travel of the wire.
Here's the overall setup. A note about the linear slide: I spent about 3 months making a stepper-driven slide from scratch using a pair of drawer slides and a stepper motor from a laser printer. It worked great, but hardly had any torque. Then, one day, I turned round and noticed a beautiful linear slide sitting right in front of my eyes. I have a KT1414 CNC router (www.k2cnc.com) and I realised that the Z axis slide could easily be taken off and mounted on the lathe! 3 months wasted ;-(
So....the linear slide has a 2.54mm pitch leadscrew with anti-backlash nuts. It's driven by a 200 steps/rev motor but with a 2000 steps/rev microstepping controller. The slide moves on two linear ball bearings. The wire spool and tensioner are mounted on the rear of the slide and the wire guide post mounted on the front.
The optical encoder. The disc has 10 segments, giving 10 pulses/rev of the lathe spindle.
The on/off and direction control box. This turns the stepper motor on & off and controls its direction. The D-25 cable on the right is the original cable that came with the CNC router; the 3-pin DIN connector at the left goes to the computer, and the switches basically just connect/disconnect the step & direction lines.
The wire spool. The spool sits on a thrust bearing at the bottom. The clobber at the top is a means for applying some friction to the wire spool to tension the wire. A spring pushes down on a plywood washer attached to the spool.
The practice bobbin.
A very useful attachment in general for the lathe - an outboard handle. Great for screwcutting threads, partly because I burned out the reverse winding on my lathe motor.
Loaded up ready to go. The knurled nut at the right is a device for holding the bobbin. The split collar gets clamped to the shaft with the cap screw and the nut then presses against the end of the bobbin.
In the process of winding.
The finished coil! 420 turns total. I messed up a little in the middle, as you can see.
A note about the software. The program asks the user for the diameter of wire to use (in the above case, about 0.25-0.26mm). It then waits for a pulse from the opto encoder and then sends an appropriate number of pulses to the stepper motor. There is a little error correction routine in the program to enable it to cope with non-integer numbers of motor pulses.
The program was written in C and is run from a DOS 6.22 boot disk to get decent realtime control of the printer port. Running it in Windows is a total dead loss.
I've kinda forgotten why I wanted to do this - I think it was some crazy notion to make my own flyback transformer! I've gone off that idea now. Oh well, it's got to come in handy sometime....