Winding large multi-layer coils for minimum winding area by hand is quite tedious. Slight changes in tension and spacing lead to uneven outer layers and turns counting is error prone. I need at least three and perhaps as many as six small compact precision coils with about 1000 turns (to be determined) for a project that I am working on.
Now might be a good time to make a cylindrical coil winder.
I have a couple of stepper motors from my failed toroidal transformer winder that should do nicely. The mechanical brackets, bearings, rods and drive screws can either be 3D printed, made from recycled parts, or machined from stock material. The winder doesn’t need to operate particularly quickly and I figure on a speed of less than 5 turns per second (300 RPM).
The winder consists of three separate parts. A bobbin holder with tension to hold the wire spool, the coil former holder and drive, and a travelling shuttle to direct the windings. The drive motors can be controlled by either oscillators or preferably a micro-controller with some sort of user interface.
I’m going to start with the mechanical parts. I drew up something that should work and set about making it.
Figure 1. Winder Concept Drawing
While I had to re-design several parts the basic construction appears to work. The biggest bother was the M6 x 1 threaded rod for the shuttle and the motor to shaft couplings. I used a scrap piece of industrial galvanised threaded rod for the rotating shafts which was anything but precision and bent all over the place. I’ve straightened it to within about 0.1 mm but this may need further work.
The plastic motor-to-shaft couplings were a bit difficult to make on centre. This was overcome by first attaching the threaded plastic coupler to the threaded rod using Super Glue and then machining the remainder of the coupling on the threaded rod centre.
Figure 2. Initial Build
The design has a couple of ‘novel’ features. The shuttle carriage has a pair of spring-loaded hex nuts to reduce slop. The shuttle has adjustable end stops (nothing unusual here) but I have used a couple of miniature tactile switches as opposed to micro-switches for the actuators. With the simple single sheave carriage the winding tension is set by the feed wire spool holder tension.
In order to test the mechanical parts I threw together a voltage controlled oscillator and some direction changing logic and a Sparkfun Easydriver stepper motor controller. The VCO is based on an LM331 IC and provides an output pulse width of 30 us with a variable frequency from 0 to about 10 KHz. The output has quite a lot of jitter but is adequate for testing.
Figure 3. Simple Motor Drive
The shuttle drive consumes about 85 mA from 12 V unloaded and 100 mA driving a 1 kg vertical load (about 2 kg wire tension) which is more than adequate for 0.5 mm diameter copper wire. I can drive the motors at up to 300 RPM with lots of torque but they start skipping above this speed. From a 24 V supply the stepper motor speed can be increased above 400 RPM with an average motor current of less than 100 mA. However a loaded take-up spool (66 g at an average diameter of 18 mm) will not start at this speed due to inertia.
Unfortunately I can’t find the torque/speed data for the SparkFun Mercury Motor SM42BYG011-25 1.8°. These motors are rated at 12 V and 0.33 A with a bipolar winding resistance of 34 Ohms and an inductance of 46 mH.
The inertia of our loaded spool can be estimated as:
I = m * (R2 – r2) / 2 + m * r2 / 2
Where R is the outer diameter of our spool, 10 m
r = inner diameter of the spool, 7.5 mm
m = mass of spool, 66 g
r = radius of threaded rod, 3 mm
m = mass of threaded rod, 12.5 g
I = 1,444 g mm2 + 112.3 g mm2
= 1,556 g mm2
This is not huge, so the problem must be with the bearing static friction under increased weight. I’m using simple threaded rod on brass bearings as I don’t have any suitable roller bearings. The solution is to apply speed ramping on start-up (which is probably nice to have anyway).
The next mission is to make a controller board. I’ll need lots of IO for an LCD, the stepper motor drivers, end stops, and user interface. The port requirement could be reduced by using a serial LCD interface this application needs speed so I’m going to implement the LCD drive with full parallel 8 bit read/write functionality.
The controller board has been designed as a double sided board without plated through holes. Now I just need to make the board, populate it, test it and write some code.
Figure 4. Controller Board
The board was made and tested without too much drama. There were a few minor issues: solder paste shorts under the regulator and associated tantalum decoupling capacitors that needed to be resolved and a problem with the rotary encoder mounting footprint. These were readily resolved.
The controller has no LCD feedback for now and a fixed 500 turns count with a 0.5 mm winding pitch set in software. I’ll need to add LCD visual feedback, variable count, pitch and maybe provision for wave and bank winding in due course.
The controller software sequences setting of the end stops, home left, establishing initial anchor turns, and full winding with pause/restart and pause/abort. The stepper motors start any movement at 60 rpm and accelerate over 3 seconds to 300 rpm to ensure adequate staring torque (which is higher at low rpm). There should be no jitter in the motor step drive and the carriage should auto-reverse at the end stops.
I just need to program the controller board and test it, and then connect the stepper motor drivers and carriage controls. The controller board has been tested and it works just fine (after some further software debugging). I think I’ve got all the motor directions right but this will be confirmed during initial testing. The code is just over 300 bytes and we have a whole 8 K available.
Driving the LCD was an interesting exercise in itself. You can read about this by clicking here.
The basic LCD menu structure for the winder has been completed. There is some further work required here, particularly with setting the total turns, pitch and display of the actual turns.
Figure 5. LCD Display
Setting the pitch is interesting. I have decided to limit the pitch range from 0.1 mm to 1.00 mm in 0.01 mm increments. Above 1.00 mm the governing drive speed is the carriage. Below 1.00 mm it is the coil spool. Other really clever stuff (like orthocyclic, wave and bank winding) will wait for now, but there is lots of code space for implementing other winding regimes.
The LCD is running just fine and I have integrated the display with the stepper motor drives, incorporated variable pitch (0.01 to 1.00 mm) and variable turns (10 to 9,999) with the last set of parameters saved in EEPROM to ease setup. The motors accelerate smoothly and the turns counter is effective (although the last digit can be difficult to read once the spool motor is running at 300 rpm. The code is just over 2,000 bytes and comfortably within the ATMega 8515’s resource limits. I could probably reduce the code length by a few 100 bytes without too much difficulty but there is no need for now.
The next mission is to actually wire up the stepper motor controllers and the carriage LEDs and switches (hardly a challenge) and test the winder for real. After that I’ll need to mount the motors and drives on a base board and think about a case for the electronics.
The carriage motor and stops are wired up and working. This required fixing a couple of software issues. I had the pitch control inverted and a really odd software issue with global interrupts being disabled. Fixing the first problem was straight forward. Finding the second issue took some effort but the problem was eventually tracked down to changing the 16 bit counter timer compare register. This has now been properly implemented as an atomic write.
The carriage micro-stepping is not as smooth as I’d like because of how I’ve implemented the pitch division as a fraction of the micro-steps per revolution modulo 100. So with a pitch of 0.50 mm the carriage micro-steps the first 50 of every 100 steps and does this 16 times per revolution.
The next step is to wire up the spool motor. This should be straight forward and I’m not anticipating any problems because it runs at 300 RPM and uses the same acceleration routine as the carriage motor.
The physical wiring is getting a bit messy. Some of this is down to the number of leads (20 for the LCD, 6 for each stepper motor, a further 6 for the carriage stops, and 2 for power) required to the controller board. With some simple changes to the PCB layout the wiring orderliness could be significantly improved.
Figure 6. Messy Wiring
As an aside I started getting all sorts of grief from my in-circuit programmer board during programming. The problem was that the 24 V supply I am using is a split supply about mains ground. So the negative rail was actually being shorted to ground via the USB connector through my workstation! Yuk. The problem has been fixed by reducing the controller board voltage from 0 (ground) to 12 Volts during programming.
The spool motor is now wired up and working just fine complete with acceleration. I have got the spool motor direction backwards but this is easily resolved. I added another menu so now the take-up spool direction is user selectable. This was hardly a challenge and completed in less than 30 minutes with a slight code increase to 2,032 bytes plus the LCD messages.
The stepper motor controller boards run quite warm. I’ll need to think carefully about how best to mount these in a 3D printer case.
Finally I can mount the hardware on a base board and actually try winding a coil. The base board will be a piece of 6 mm Perspex with a lot of holes for adjustment of the bearing mounts to suit various spool lengths. Getting these holes on centre is quite important.
Oops, I may need to change the design of the feed wire reel support. These are jumble wound so the point of wire take-off is not well defined. Ideally the spool will self-centre so the take-off aligns with the carriage sheaves, but this won’t happen with my current design. As the take-off angle changes so will the wire tension. The wire reel needs to slide freely, yet maintain the wire under tension. Another problem that I can see with my current design is that the threaded rod tends to force the reel to one end of the stops.
There are a few ways I can improve this. One is to simply position the current spool a long way from the carriage so the take-off angle is significantly reduced. This will work but at the expense of a large machine base unless I go vertical. A more common option is to make the wire reel free floating and use a weighted plate on the spool rim to stop it unravelling. A third option is to incorporate a spring arm tensioning device but this is starting to get complicated.
I’ve settled on going vertical which keeps the base plate small and retains my current axial spring tensioner which is effective, easily adjustable and compact. Note that the relatively long wire feed from the wire reel to the wound coil (almost 750 mm) does not waste wire.
The winder is on the base and I set about testing it. The first coil was far from perfect, but it is a good start.
Figure 7. First Coil Attempt
I need to make some design refinements.
- The take-up spool is stalling at high speed with large take-up reel diameters. I need to reduce the winding speed.
- The windings are not nicely side by side. The carriage design needs some more thought. If the carriage sheave is too far from the take-up spool then the wire is free to wander.
- I need to think about an overlap delay on the carriage to ensure that turns sit nicely side by side.
- The 3D printed former core is not perfectly smooth. This is forcing the first layer turns to wander. The easiest solution is to wrap some paper or Sellotape on the former core.
- I have got the pitch wrong. The actual wire diameter is 0.55 mm and has an as-wound tight turn pitch of 0.56 mm. This is a simple user-interface adjustment.
- The tension needs work (this is one of the most important aspects to making successful coils).
First up was a redesign of the carriage to incorporate three sheaves and bring the final sheave closer to the take-up spool. This also makes loading the wire into the carriage a breeze. The new carriage has side mounted sheaves with bronze bearings, a thrust washer and mounting boss. They turn freely with no appreciable axial slop.
Figure 8. New Carriage Design
Interestingly (but not unexpectedly) the wire tension is now largely determined by the diameter and vertical centre to centre distance of the sheaves. If the tension is too high then I’ll need to reduce the centre to centre distance and maybe the sheave diameter.
Rather than re-program the controller I simply wound the coil at manual slow speed. The first few layers looked really nice but as the coil diameter got larger (say 6 layers) the windings started to jumble, particularly near the ends of the coil. Although the winding wasn’t perfect I continued on until I had 750 turns. The coil has a resistance of 5.5 Ohms and seems to make plenty of field when energised with 0.5 A.
During my experiments the field strength suddenly plummeted. I had blown up my ancient bench power supply! The supply is quite rugged with current and thermal overload and it has sustained years of use (and abuse). I figure that I have killed it through switching what is a large inductive high current load. So there will be an intermission while I rebuild the supply. I’ll be needing to put a fly-back diode across the coil for future experiments.
On with testing. The 750 turn coil gets quite warm as a consequence of Ohmic heating. The current limit for 0.5 mm diameter wire is a couple of Amps but this needs to be de-rated by at least 50% due to poor heat dissipation from multi-layer windings. Unfortunately as the windings heat they also expand and during my tests this forced the end cap off the former. Bugger! This was a disaster as the coil could not be recovered and the wire immediately got into an unrecoverable birds’ nest. The wire was put in my scrap copper collection.
With the first real coil reduced to scrap it was time to think about what is going on with the winding that is causing the jumble. It turns out that this is a direct consequence of multiple layer helical winding. With sufficient layers these will eventually jumble, particularly at the ends, because the helix advances clockwise and then anticlockwise on alternative layers. Wire alignment jumps to follow the layer below until there is sufficient tension to resume the correct path. The resulting gaps create further disruption to the layer above. This also results in less than optimum winding packing.
Eventually a Multilayer Helical Coil will Jumble (get used to it).
One solution to this problem is to use paper or tape between layers (but this not ideal because it increases the total winding thickness and does not implement optimum fill). A better approach is to use an orthocyclic winding pattern.
There is an excellent paper on orthocyclic winding by Philips. In essence the pitch increment per turn changes over about 30 degrees as opposed to throughout the revolution. This means that each layer aligns immediately with the layer below over 90% of each turn. This provides optimal winding packing and prevents jumble.
Figure 9. Othocyclic Winding (image reproduced from Philips Paper)
In order to implement orthocyclic winding I will need to adjust my code, and perhaps my coil former. The rules appear to be quite simple but experimentation will be required.
- The coil former must be (n + 1/2) * pitch long, within 0.2 * pitch.
- The full pitch increment per turn must occur within the final ~ 36 degrees of the turn.
- The pitch increment must regress (occur slightly earlier) with each turn depending on the winding length per layer.
Given the required accuracy of the coil former length it may be desirable to count layer turns in software rather than rely on the end stops. This will also ensure appropriate register between layers provided that the first layer is correct. It also means that I don’t need end stops (although I’m going to leave these to prevent accidentally driving the carriage against the shaft coupling or bearing).
A further consideration is sealing the coil so it will not disintegrate into a birds nest when it is removed from the former. I don’t have thermosetting wire insulation but maybe I can simply coat each layer with epoxy as the coil is wound? This will certainly hold the windings in place but it may be challenging to remove the former. I figure that this can be removed by heating the to around 180°C. The former, which is exposed, will heat much more rapidly than the epoxy in the windings.
There are a number of parameters that must be calculated for a precise orthocyclic winding pattern and many of these vary as the winding increases in diameter. The maths involves squares and square roots of real numbers. While squares are relatively simple multi-byte multiplication square roots require iterative methods (Newton-Raphson algorithm) that take time to solve. The simplest solution is to use a off-board MS Excel spreadsheet to calculate the winding parameters and input these into the winder. We can mess with parameters in Excel with almost instant results that won’t waste wire. Excel also allows calculation of a whole heap of other stuff and checking for potential errors. If this works then I’ll consider incorporating the Excel calculations in the winder firmware.
With my Excel spread sheet set up it has become apparent that the carriage movement necessary for accurately maintaining a constant crossover angle on successive layers is not linear. As the coil grows in diameter the crossover length increases (with a constant crossover angle) and the distance between the coil and the final carriage sheave decreases. So the carriage over-feed decreases on successive layers.
Figure 9. Carriage Overshoot for Crossover
(Red and Green are tolerance limits, Blue is ideal and Purple is Piecewise Approximation)
Of course we can’t do the carriage overshoot near the end of a layer because the carriage will move beyond the former cheeks causing the wire to hit the former rims. The carriage overshoot needs to be reduced at the end of layer. I still expect to get a good crossover in this layer region because the last few turns in a layer should track against the previous turns.
The carriage increment for each layer can be calculated as follows:
R1 (coil radius) = L * sqrt(3)/2 * Wd + (Fd + Wd) / 2
= L * constant + constant
where L = layer number
Wd = wire diameter
Fd = former diameter
R2 (sheave radius) = constant
D (axial distance between sheave and former) = constant
X (crossover length) = 2 * R1 * pi * 36/360
+Steps (carriage overshoot steps) = sqrt(D2 – (R1 + R2)2) * P * 1600 / X
-Steps (carriage return steps) = +Steps – P * 1600
So we need six real number multiplications, a square root and a division to calculate the carriage step parameters for each layer. For some reason I’m not looking forward to coding this in assembler! However there is a better way. Using our Excel spreadsheet we can simply represent the curve in the graph above using a piecewise linear approximation for each 10 layers or so (see graph above). This is simple to code and should be very efficient.
The basic orthocyclic winding scheme is to calculate the carriage overshoot based on the layer number. Wind 323.6 degrees with no carriage feed. Move the carriage forward with overshoot to form the crossover (but within the limits of the former). Wind a further 36 degrees. Now move the carriage back to a single pitch increment and start on the next turn. If you add the two winding angles you’ll see that they don’t quite equal 360 degrees. The missing 0.4 degrees makes the crossover region regress (start slightly earlier) on successive turns. The coil diameter is slightly greater in the crossover region so we want to distribute this around the perimeter of our winding.
Figure 10. Orthocyclic Flowchart
I’ve written a new flowchart for the software. You can see that there are quite a few required variables for required for the orthocyclic winding process. Initially I’m going to hard code these values on the Heap so I can test the software. In due course I’ll move them to EEPROM with a user adjustment menu during initialization.
Time for some more coding...
Several weeks later (28 Sep 17 due to other commitments) the code has been written, compiles without error, and simulates just fine. While the flow chart at Figure 10 is still essentially correct I have refined it somewhat for code optimization. My rule of thumb is that each block of the flow chart should be realized in about 10 lines of code. Any more than this and maybe the block should be reduced to smaller blocks.
Now all I need to do is test it on the hardware. Hopefully this will be happening in the next day or two.
Okay, I’ve completed the first few attempts at winding an orthocyclic coil and we’re almost there. You can view the winding action on YouTube (click on the following image). The lay overshoot is working great and reduces at the end of each layer to prevent the wire clashing with the spool cheeks. The cross-over retard is perfect so that the third layer cross-over starts just after the first layer cross-over finishes. The crossover angle is 36 degrees. I’ve slowed the winding down to increase the stepper motor torque, and so I can keep an eye on things. A mistake at 5 turns per second is a disaster. The carriage is entirely under stepper motor control but I have retained the end stops to prevent an accidental over-run. If the end stops actuate then the winder stops with an error message. The first layer only winds while the left push button is actuated. This allows me to make minor manual adjustments to the critical first layer. Further layers wind automatically, stopping at the end of each layer to allow application of epoxy resin to hold everything in place. With the reduce speed the stepper motor drive voltage has been reduced to 12 V.
Figure 11. Click on Image to View on YouTube
The following image is a six layer 285 turn coil using 0.5 mm diameter wire. The coil still isn’t perfect. Any slight error in the first layer results in issues on subsequent layers. There is a winding error at the very first turn which transfers to upper layers and eventually causes a lay-skip which transfers to the other end of the coil.
Figure 12. Six Layer Orthocyclic Wind Attempt
(Close, but no cigar!)
In order to improve the coil I need to:
- use some clean new copper wire. This lot was recovered from my coil disaster (see above) and has been wound about twenty times now. It has small kinks and twists that aren’t helping, has hardened and the stretched, and I no longer trust that the insulation is intact.
- clean up the spool surface so it is dead flat. I’ve tried using Sellotape but the 3D printed ripples are still pressing through causing individual first layer turns to misalign. Perhaps paper might be a better option?
- change the wire anchor on the spool to get the very first lay flat against the spool cheek without a 90 degree bend in the wire (which is next to impossible to actually make).
The current coil is already a heap better than my multilayer helical attempt and with but with a bit more care on that critical first layer I expect to get some good coils.
I also have some more coding to do. At the moment here are seven (7) parameters that are hard coded. These are:
- lays per layer (always an integer plus 0.5)
- the pitch steps per lay,
- the first layer overshoot,
- the initial overshoot decrement per layer,
- the second decrement layer threshold,
- the second decrement, and
- the third decrement layer threshold.
All of these parameters are generated from an Excel spreadsheet which looks after all of the trigonometry and rounding. While I’m happy to stick with Excel at the moment, I don’t want to be recompiling the software and programming the hardware every time I change the coil parameters.
I completed the three bullet point changes above (new copper wire, dead flat spool with paper former, and wire anchor adjustment) and tried two more coils. The first windings look great but everything is turning to custard at the start of the second winding. Both attempts failed during the second layer. Bugger! Time for some analysis.
The carriage and spool movement appears to be perfect and repeatable (there is no stepper motor skipping). The smooth former allows an underlying layer to slip horizontally under pressure from the next layer. This creates gaps in the winding. In the Philips paper (linked above) they use a precision former grooved at the pitch to ensure that the initial turns stay in place.
This indicates that the first layer winding needs to be tight to prevent horizontal slippage. So the former must be within 20% of an integer + 0.5 wire lays. My current former is exactly 25.5 mm between the cheeks so, with 0.53 mm diameter wire it is totally out of wack. 25.5 mm / 0.53 mm = 48.11 lays when we need either 47.5 or 48.5 lays +/- 0.1 mm. No wonder the winding fails on the second layer. There are a few solutions to this problem. Either I can:
- make a new former or machine the existing one out to 48.5 lays x 0.53 mm = 27.7 mm.
- secure the first layer with adhesive to stop horizontal spread.
- increase the winding tension to prevent slippage or reduce the winding tension to reduce compression between the layers..
The easiest solution is to adjust the former. I machined this out to exactly 25.7 mm and tried the winding two more times. Darn. The first layer looked tight and finished exactly on the spool cheek, but I am still getting lay problems on the second layer. Either a lay jump or a single lay sinking low into the first layer.
I’ll need some more experimentation and thought to sort this out.
When stuff isn’t working a good place to start is the beginning. I reviewed the original Philips paper and found a couple of things I was doing wrong. After the first layer we don’t need layer overshoot because upper layers will track the wire lay of layer below. I adjusted the code with an immediate improvement in the second layer.
But I still have a problem with the very first lay of the second turn. It is caused by the very last full lay of the first layer being hard up against the spool cheek when it should be 0.5 pitch diameter away. This causes the first lay of the second layer to slip left. The error compounds with each additional layer. The cause is likely to be a lack of precision with the former and slight eccentricity with the spool drive.
There are a couple of things I can do to resolve this. The first is to slow down the very last lay and manually adjust the winding spacing to ensure a half pitch clearance. The second is to place a removable spool cheek spacer on the right hand spool cheek to force the space. The third is to change the spool bobbin to cheek profile to force the space.
Figure 13. First Layer Lay Issues
For now, the easiest solution is to slow stuff down and manually adjust the lay. Adding the manual wind is a straight forward software adjustment. The initial layer looks great with no gaps between turns but it is a whole two turns short! The spool dimensions haven’t changed so I rechecked the wire diameter. Successive attempts at winding appear to have stretched the wire causing the diameter to change from 0.53 mm to around 0.51 mm. This puts the winding out by an entire two turns at the end of the very first layer (0.53 - 0.51) x 48.5 = 0.97. This is annoying because I know that most of the wire on the spool is probably at 0.53 mm diameter. I figure I need to loose the first layer length of wire off the supply spool.
After some more winding attempts with new wire I still can’t get a consistently good orthocyclic winding and the problems appear to be with the first layer. After each attempted winding I can see that that the first layer is not stable. The first layer turns are slipping sideways due to the upper layers so the wire tension isn’t right on the first layer.
After some more thought I think I have found the cause of some of the issues.
- Carriage advance with overshoot for the crossover maintains tension, but the carriage return to the next lay position looses tension because there is no concurrent spool advance. This requires a software solution.
- While the carriage is dead stable in the horizontal plane it has vertical angular play. The carriage needs a second guide rail to fix this.
- The friction on the three sheave wheel wire guides is quite variable and sometimes some of these are sticking which results in wire tension variations. The solution is to go to ball bearing mounts.
- The current wire lay position can be improved by using the previous lay as a guide. Rather than using a calculated fixed coil pitch increment I might do better to force a quarter pitch overlap on the first layer. This will force the adjacent turns together.
- The carriage drive threaded rod is pretty rough. This could certainly be improved by using something better than construction grade industrial galvanised steel stock.
I re-designed the carriage with ball bearing mounts for the sheave wheels and a second guide rail. The 3D prints for the new motor mount, carriage and bearing block were straight forward but I do regret purchasing cheap nasty plastic shell ball bearings. While these are significantly better than my previous bearings they feel rough. The new parts were fitted with a few extra holes were drilled and chamfered in the base board. The carriage is working well with no play at all and the sheave wire guides are free wheeling. The new carriage is lighter than the previous design and the guide rail diameter has also been increased to 6 mm. Now I just need to adjust the software for a 1/4 turn lay overlap on the first layer and some spool advance during the overshoot return.
I have also purchased some 6 mm diameter stainless steel threaded rod. This is definitely superior to my previous rod but I haven’t replaced the original yet.
Figure 14. New Carriage with Second Guide Rail and Sheave Wire Guide Ball Bearings
More to follow...