element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi Projects
  • Products
  • Raspberry Pi
  • Raspberry Pi Projects
  • More
  • Cancel
Raspberry Pi Projects
Blog Building a Coil Winding Machine: Part 1: Prototype
  • Blog
  • Documents
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi Projects to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: shabaz
  • Date Created: 25 Sep 2023 7:50 PM Date Created
  • Views 14161 views
  • Likes 9 likes
  • Comments 27 comments
  • coil winding
  • keyboard
  • rpiintermediate
  • stepping motor
  • keypad
  • pico
  • L6219
  • stepper motor
  • Coil Winder
  • stepper
  • Vacuum Fluorescent Display
  • raspberry_pi_projects
  • vfd
  • pi pico
Related
Recommended

Building a Coil Winding Machine: Part 1: Prototype

shabaz
shabaz
25 Sep 2023
Building a Coil Winding Machine: Part 1: Prototype

Introduction

I recently had a need to wind a thousand turns of wire or so on a bobbin, but I might have needed to repeat it a few times each time the coil design needed tweaking. I needed a coil winder! This project might also be useful for DIY'ing electric guitar pickups, or the information in the blog may be handy if you wish to use vacuum-fluorescent displays (VFD) or stepper motors in projects.

image

There are coil winding machines on ebay, but most of them look pretty primitive. I decided it was worth spending a weekend trying to come up with a suitable method. This blog post describes the protoyping work, which does function, but is fragile with wires everywhere. The next step, in part 2, will be written when the PCB design is complete and a lot more rock-solid construction is achieved.

There’s a 2-minute video demo here (YouTube link):

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Some Possible Approaches

Many of the simpler coil winders are manual, with a mechanical counter for the number of turns. I decided to use a motor. One approach is to try to use an electric drill for this purpose, but the wire was going to be very delicate, and might have snapped.

I briefly tried a normal brushed DC motor, using a magnet for the rotational feedback. This works fine in theory, but it needs a good mechanical design to hold the magnet in alignment. Some brushed DC motors do not have the spindle on both ends, which makes the magnet attachment for precision measurements slightly more difficult. The motor plus magnetic sensor approach had the theoretical advantage of having very low parts cost. Nevertheless, I gave up on this approach due to the mechanical problems; I’d rather be solving more electronic or software problems!

I used a compromise method; a stepper motor! This has the advantage that closed-loop turns feedback isn’t essential, if the number of times the motor coils are energised are counted!
A significant disadvantage is cost, but a major advantage is simplicity in mechanical construction. Besides, cost matters less when a project is a one-off, and not intended for sales!

To maintain accuracy, I simply scaled the project to use a large stepper motor ; it is less likely to slip if there is lots of torque.

image

Stepper Motor Control with L6219 Driver IC

There are plenty of nice stepper motor modules available pre-built. I didn’t have any of these handy, but I did have a box of old semiconductors, and it contained a bunch of L6219 parts! These are about as classic as they get; the ST L6219 is an ancient design, at least three decades old. It has inefficiency, and probably less protection than modern stepper motor driver ICs. However on the plus side, it is cheap, and actually performs reasonably well (it can control the motors in a ‘half step’ mode for smoother movement, and the L6219 will also control the level of current through the windings to try to make the travel reasonably smooth, considering that it’s a very old design.

Surprisingly there’s not a lot of examples of this chip being used. The PDF datasheet showed that it is not very difficult, it just requires slightly more microcontroller signals compared to newer chips. Six digital signals are used, plus a fixed voltage level to the chip's Vref pins, that determines the maximum current output before protection kicks in.

imageImage source: st.com

To implement half-step operation, one has to implement that in the microcontroller. The two windings of the stepper motor are energised either in the forward or reverse direction, at either full current or at two-thirds current. The table below shows how the windings are energised, under control of the microcontroller.

image

The L6219 can offer up to 750 mA of continuous current. The stepper motor that I used is capable of handling higher current, from a more powerful motor driver. However, for the kinds of could I will be winding, I don’t think I will need any extra power, it already seems reasonably powerful. I might re-think that later.

When using the L6219 chip, the maximum current is set using a sense resistor, plus a voltage level applied to a Vref pin. The current is Vref/(10*Rsense), so if Vref is 3.3V, and Rsense is 0.5 ohm, then the maximum current will be 0.66A.

image

Construction isn’t great; it was rapidly prototyped. As soon as it was working, I secured the wires with glue so that hopefully it mostly survives until a circuit board can be made!

image

Display

This was an easy choice. A Vacuum Fluorescent Display (VFD )would look very neat. The VFD attaches directly to the Pico’s GPIO pins, and is powered from 5V. For more information, see  Using a Vacuum Fluorescent Display (VFD) with a Microcontroller 

Keypad

I used a random keypad that I had. It is a standard 4x4 matrix design, so for anyone who wishes to replicate the project can use any 4x4 matrix keypad. It is easily reconfigurable in the code; see the diagram below.

image

Each button is referred to in the code by a single character. So, for instance, the CANCEL button is the character ‘*’. If you desired for the CANCEL button to be (say) at the bottom-right corner of the keypad, then the array would be modified to swap the ‘*’ with ‘D’ perhaps.

image

Power Supply

A 24V supply can be used, however it functions with a 12V supply too. Anything 12-24V should be fine. A small 5V DC-DC switching converter module is used. For QAQa|the Pico’s supply, I used the simplest way of feeding power to it, using a Schottky diode.

Circuit Diagram

The Pi Pico interfaces just fine with all the other bits and pieces. There's not a lot to the circuit:

image

Operating the User Interface

This is easier to describe with the diagram below. The way I figured I’d design it, was to ordinarily assume that any value entered is the number of desired rotations. So, typing 100 followed by OK would set the desired turns. That’s the Normal mode, and can be used any time, regardless if the motor is rotating or not. The motor speed can be modified at any time using the up/down buttons.

image

To change a setting, or for lesser-used features, there is an options mode. It currently only has two options; direction, and zeroize. The zeroize merely sets the turns counter to zero (or you could just power-cycle the unit). Technically the options can be modified while the motor is spinning too, but it’s probably not recommended to switch the direction while it is spinning at speed! I’ll maybe lock out that in a later code release (the code is extremely prototype-level currently).

I think it’s fairly straightforward to use, but for sure it’s not very feature-rich. I think I will add an options mode to allow manual operation (i.e. only spin the motor while a button is held down). Also, it would be nice to properly handle fractional turns, which I’ve had in the back of my mind but not coded yet.

Software

Everything is controlled by the Pi Pico, and coded in C/C++. The code isn’t pretty, it was written within a day. It is available on GitHub. 

image

Mechanical Thoughts

The motor spindle is of a good length, so I think it will be easy to create attachments to bobbins and so on. There could be a need for support on the other side of the bobbin, like a lathe’s tailstock. There is also an argument for being able to control a second motor, to guide the windings. The motor driver code will support an additional motor if that is needed, but for now I will just manually guide the wire - but I'll lay out the printed circuit board with space for the second driver. With a more automated system, a wire guide and tensioner will be needed, a bit like a sewing machine probably. I don’t intend to do that for a first attempt. This isn’t intended to be a production-grade coil winder!

Next Steps

The circuit and code seem to function OK enough, but the prototyping is quite ropey, it needs a circuit board. Once I have a better assembly, I can focus on the coding a bit more, to add additional features, and to try it out on some coils I need to wind!

Thanks for reading.

  • Sign in to reply

Top Comments

  • shabaz
    shabaz over 2 years ago +1
    This seemed too good to pass on: It's got a score of 4.9 out of 5, from 17 reviews on another seller's page (the shipping cost was too high there). I purchased two, for a total of £44 all inclusive…
  • ccandiotes
    ccandiotes over 1 year ago

    Very nice solution shabaz. A lot of effort put into this. Thanks for sharing!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 1 year ago in reply to shabaz

    Thanks for the update.

    Mine are due early in April but all sorts of work is piling up so I'm not sure how soon I'll get them going !

    It rather depends on the way the prospective customer for that scheme decides to jump.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to michaelkellett

    Hi Michael,

    They've been sitting on my desk still waiting for me to get around to it : ( unfortunately some work got in the way at the time. I need to spend some time working on the code, which was the thing which caused the delay; my PCB uses a different stepper driver (TB67S581FNG) than what was used initially, and while I was modifying the code, I decided to re-do that area of the code completely, creating a 'Feeder' class to specifically deal with that for the wire feeding purpose, but was working on the 'Winder' class first, so I unfortunately still need to get to the Feeder, to exercise those devices! I do want to get back to it soon though. 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • michaelkellett
    michaelkellett over 1 year ago in reply to shabaz

    Hello,

    Did you ever play with these ?

    I've just ordered two kinds, some like these and some cheaper ones from Aliexpress - for a scheme I want to try.

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • beacon_dave
    beacon_dave over 2 years ago in reply to shabaz

    We might need a few more Lego bricks for this one... Thinking

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube