element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
Single-Board Computers
  • Products
  • Dev Tools
  • Single-Board Computers
  • More
  • Cancel
Single-Board Computers
Forum Digital Winding Machine Counter Using Arduino & Rasperry Pi
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Single-Board Computers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 1 reply
  • Subscribers 55 subscribers
  • Views 925 views
  • Users 0 members are here
  • raspberry pi gui
  • counter
Related

Digital Winding Machine Counter Using Arduino & Rasperry Pi

kkazem
kkazem over 5 years ago

I did a project recently to change my winding machine's old mechanical counter to a digital counter. I did this using the following main components:

  1. An Optical Encoder, 1024 counts per revolution with a Quadrature Output. This allows determination of both angle/revolutions and direction (forward or reverse).
  2. An Arduino to capture the encoder pulses, and temporarily store the count.
  3. A Raspberry Pi for the higher-level Python code and to control the Touch Screen Display.
  4. A 3.5" Color Touch Screen Display to indicate the count in large numbers and for a RESET Function, On/Off Control of the Winding Machine's electromagnetic brake, and for a RESTORE LAST COUNT function.
  5. A Black Plastic Box for Mounting.

 

The counter is continually updated and shows 3 integer digits, a decimal place, and 1 digit for tenths of a turn. One big advantage of this digital counter over the older mechanical one is that the resolution is 10X higher. With the mechanical counter, the resolution is to the nearest turn. This makes it hard to know whether the count is at X or X+1. As an example, if the counter reads 85 and is near the spindle angle where the count changes, it would be hard to know whether the count is 85 or 86 until the spindle angle rotates far past the angle where the count changes. This can easily lead to errors in the number of turns wound on a transformer coil, which is unacceptable. However, with the Digital Counter that reads to the nearest 1/10 of a turn, there is no doubt about the integer value of the turns count.

 

6-wire Control Cable was used to get the various signals from the encoder and brake to the counter box. For power to run the Arduino and Raspberry Pi, a  120VAC to 12VDC wall wart was used. The encoder needed +12 VDC, but the Arduino and Pi needed 5VDC & 3.3VDC. TO accomplish this, a small dc-dc converter (12VDC to 5VDC) was used. The Arduino had a 3.3VDC output which was used to pull-up the encoder's open-collector outputs.  The Arduino's code was fairly simple and straightforward as it input the two quadrature pulse inputs and the code kept a running total of the turns count to include forward minus reverse. The reason for this is that if the winder rotated forward, the count incremented in a positive manner, but if stopped, then reversed, to add tape to the coil for example, the counter would subtract the amount of reverse turns, including fractional turns, so that the number of turns of wire would always be accurate. If this was not done or if a non-quadrature encoder was used, the count would increment up whether going forward or reverse. The true turns count would then be lost.

 

The constantly-updated turns count, plus the status of the spindle brake and digital output to turn the brake on/off was transferred from the Arduino to the Pi via USB. The Pi directly accepted the color touch screen display as the pins line-up for easy insertion. The harder part was mounting the display in the box along with the Raspberry Pi behind it, and the Arduino, On/Off Sw, 4-separate cables using DIN connectors, and the USB cables. Cutting the square hole in the box using my Dremel tool was especially hard in terms of keeping the lines straight. I wound up needing to do some manual filing to get the display to fit. I also had to make a couple of special brackets to bolt the display down to the box's plastic using tiny 4-40 screws.  The photo below shows the black box with the touch screen display, electronics, and cabling on the left. I had a photo of the entire winding machine with the black box, but the element14 editor stopped working for inserting subsequent photos after I inserted the first photo.

 

The Raspberry Pi OS was Linnix and Python was used for control and display . The counter works great and we haven't had any problems with it. There's a RESET button on the touch screen and if it's pressed by mistake such that the count is zeroed on an unfinished coil, we added a RESTORE COUNT button to restore the previous count if the RESET was pressed by mistake. Finally, there's a touch screen button and indicator for the spindle brake. Normally, the brake is on when the foot speed control is not being pressed. However, in that case, the winding operator cannot rotate the spindle manually to reverse it for adding tape, etc. To overcome this problem the operator can press the brake on/off switch and the indicator tells if the brake is on or off at any given instant. The Pi's code is stored on a microSD card while the Arduino's code is flashed to its microprocessor chip.

 

 

  image

  • Sign in to reply
  • Cancel

Top Replies

  • Jan Cumps
    Jan Cumps over 5 years ago +2
    kkazem , I was looking at your company website, and you are way ahead of your time : Nice portfolio of products!
  • Jan Cumps
    Jan Cumps over 5 years ago

    kkazem, I was looking at your company website, and you are way ahead of your time image :

    image

     

     

    Nice portfolio of products!

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • 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