# Reliable mechanism for counting the number of rotations of a shaft?

I need to create several spools of enameled copper wire, each one rolled on a 3D printed bobbin and with a certain number of turns. In total, there will be several thousands of turns, and I want to count all turns without accidentally missing any or counting any twice, and therefore I need to construct a counting mechanism. The maximum number of turns for one bobbin will be 1500, so I need the counter to have four digits.

I will print the bobbin in many different sizes, so I designed it in OpenSCAD to be able to easily change its dimension. Here is a rendering of it:

This is my plan so far:

• I will attach the bobbin to an adapter (since not all bobbins have the same dimensions) that I will attach to an arm that passes through two holes, one on each side of the bobbin, and each hole is at the top of a leg. This will allow the arm to rotate around its own axis while being suspended in the air.
• I will attach a crank to the arm in order to be able to turn it.
• The spool the copper wire comes on will be mounted on something that can rotate but will have some amount of friction to it in order to create a tension in the wire so that the wire will be rolled on tightly to the bobbin. I haven't figured out completely how this should work yet.
• The turn counting mechanism is what feels like the most complicated part. There are already some counting mechanisms on Thingiverse, like these two, but using those are not that straightforward. They are not adapted to be attached to a shaft and would need to be reverse engineered. Besides, it is enough if each digit "changes" with a constant angular velocity (assuming that the crank is turned with a constant angular velocity) and not stands still waiting for a carriage from the next digit and then suddenly change. Reading the number from such a counter wouldn't be any bigger problem than reading the time from an analogue clock since it essentially behaves in the same way. I think this is even preferable since
1. this may make the construction simpler and therefore more reliable since there will simply be a 1:10 (gear) reduction between each digit, and
2. if all digits suddenly change at once, I suspect that might suddenly create a lot of friction in the system, which both makes the turning less smooth, and might even create a torque or a force on some part that is high enough to break that part; if instead each digit change with a constant angular velocity the forces in the system can be thought of as geometric series, which are constant and finite even for an infinite amount of digits and therefore won't suddenly increase and cause something to break. At least this makes a theoretical difference but maybe not a difference that is big enough in practice if the counter only has four digits.

Having said that, I may change the design if there is another design that seems simpler to make or more reliable.

My questions are:

• How should I construct this counting mechanism for it to be as simple yet reliable as possible? Is there any standard way of doing this sort of thing?
• Does this construction idea make sense or is there some considerably easier way to achieve the same thing (creating a spool and reliably keeping track or the number of turns)?
• tangential: why not make the adapter part of the bobbin? Aug 17, 2021 at 8:22
• @user253751 Because I will put the different spools around different transformer cores with different dimensions, so the bobbins need to have different inner dimensions, and the adapters all need to have the same inner shapes in order to fit onto the rotating arm. Aug 17, 2021 at 9:44
• As you create spools, if you truly wish to create something yourself by using them as a transformer, if two spools are equal the current and voltage will be equal. Or if you have one calibrated spool you can use this to verify all others. Aug 18, 2021 at 13:15

Figure 1. A coil winder using a hand-drill, magnet (on the handle), reed switch and pedometer. Image source (and more details) [Instructables](https://www.instructables.com/DIY-Hand-Driller-Coil-Winding-Machine-with-Digital/.

A bicycle speedometer may also work directly on the bobbin shaft. Set the wheel circumference to 1000 mm and you'll get 0.001 km for a single pulse of the reed switch. If using gears between the bobbin and the counter then scale to suit.

• This works, but there is the chance that some turns are counted three times (or more, in odd increments) if there is some back and forth when the magnet passes in front of the reed switch. From this perspective, and probably for around the same amount of money, it should be possible to use a rotary optical encoder, similar to what was found in old, ball driven computer mouse. Aug 17, 2021 at 6:28
• @VladimirCravero You can have two reed switches and your own microcontroller to sense direction. Or, you can just not do that. Turn in one direction, not back and forth. Aug 17, 2021 at 8:23
• @user253751 the problem is that this back and forth can happen accidentally, and you might get the pedometer to count more turns that were actually done. This is not solved just with a quadrature encoder, you need to have more resolution, like a few tens of ticks per turn, to reduce the issue. Of course, depending on the mechanics of the whole rig, it is possible that this is a non issue at all. Aug 17, 2021 at 9:19
• @VladimirCravero I am leaning towards it being a non-issue, unless you expect to stop winding often? I expect that once the system is set up, you will be turning continuously in one direction every time you use it. Do remember to debounce the switch though. Aug 17, 2021 at 9:25
• The most reliable system will have no mechanical moving parts and not rely on environmental conditions - e.g. magnet on the drive rotor and a Hall effect sensor. Then use an electronic counting device. If you are concerned about errors caused by reversing the rotation, use two sensors so you can detect the rotation direction. Aug 17, 2021 at 21:17

There are cheap off-the-shelf devices to do this. I've used one for exactly what you're doing. Search "Digital Counter"

https://smile.amazon.com/DIGITEN-Digital-0-99999-Proximity-Magnetic/dp/B01DNLRAUA/

Just attach the magnet to part of your jig that's spinning, and mount the sensor so that it will pass close by during each revolution.

I built a coil winding jig myself that you might find useful as a reference design: https://wolfsprojectfiles.com/guides/windPerfectCoils.php

So, two possibilities and have used both during different projects:

1. reflective tape and an optical counter. Note make sure you don’t get the dispersive reflective tape :)

2. a mechanical counter, screw or gear driven

We did test runs comparing them to check accuracy, you may want to do so as well.

Consider using a stepper motor to turn the bobbin. Something like this can be had very cheaply and comes with a driver chip, which is just an array of transistors and flyback diodes to drive the coils.

Then you can write a simple arduino sketch to turn the motor shaft the requisite number of times. You can just use your hand to guide the wire onto the bobbin, but be careful not to stall the motor as this could upset the count.

Otherwise, a geared solution like an old fashioned electricity meter would be effective and reliable.

• A geared solution was actually what I had in mind :) But I didn't mention it explicitly in my question. Having no electronic components and measuring devices in the counter feels like it would make it more reliable; it is simply not going to get the wrong count unless it breaks. Basically the only concern is how to reset it. Do I have do disassemble and reassemble it to reset it if I don't want to run it backwards? Aug 19, 2021 at 1:27
• I think I will design the gears train myself, so I'm just thinking if there is any way to design it so that it would be easily resetable. Aug 19, 2021 at 1:35
• I'm not sure how you could implement a "reset button". Manually turning the gears back to zero would be quick and easy by turning one of the slower gears. Or like with an electricity meter, you could just record the difference between readings. To make gears that are easy to disassemble, look at Tinkercad, which has a gear generator and a snap-together bearing part. If you wanted to use one of the mechanical counters from Thingiverse, I don't imagine you'd have much trouble with all digits rolling over at once, but you could drive it with a power drill to make sure. Aug 19, 2021 at 13:34

is there some considerably easier way to achieve the same thing (creating a spool and reliably keeping track or the number of turns)?

You can use sensors on a smartphone for this. There are several options:

• Magnetic counting: Install a strong magnet on the spool, and place phone nearby.
• Optical counting: Use paint or tape to make one edge of the spool different color, and mount phone so that its camera sees it.
• Accelerometer counting: If the phone is small enough to mount so that it rotates with the spool, the motion sensors will work also.
• Audio counting: You could place a piece of plastic so that it clicks every time the spool rotates, though this will be sensitive to other sound in the room.

There are ready made applications available, for example keuwlsoft appears to have made counter applications for all of the sensors listed above.

Have a wheel on the shaft, of a dark colour and not highly reflective.

Have a little hole in the wheel.

Have an LED that shines through the hole once per turn of the wheel.

Have a light sensor on the other side.

Have a cover over the light, wheel and sensor, so ambient light doesn't shine directly on the sensor.

An electronic device connected to the sensor counts the number of times the light is detected.

I'll another industrial system to the list

You can simply attach it to your shaft and measure the turns. There are options for:

• CW/CCW/Both directions
• Shaft size
• Resettable
• etc....

This rest of the answer is regarding the selection process, because as you can see there are too many solutions. Most of them will probably be adequate, however there are different considerations.

Obviously the first thing you need to consider for this type of project is the cost. How much money are you willing to spend to get it right. If you got enough time and 3d printer you can probably get away with a minimum cost in money, but a considerable cost in time. If you are willing to spend 10 USD or 100USD or 1000 USD then you can appreciate that this is a game changer.

Following from the cost determination you can check at ready made solutions, or if you want to get your hands dirty. If you are familiar with programming, and sensors, with a bit of reading and a few tenths of dollars you can get a long way with things like arduino etc.

Then you need to determine more technical parameters:

• Do you intend to use this once, or do you intend to use it to make a few tenths or a hundred windings? (in that case, spending the extra buck to go to an industrial solution make sense).
• Do you intend to have it fully automated? (the projects from the thingiverse are basically manual held counters - or so I gathered).
• Is there possibility that the shaft will move clockwise and counterclockwise (in that case you need a quadrature encoder system - preferably with an index channel - if you go to electronics, or at least a gear solution if you go to a manual counter).
• Determine the maximum number of rotations: (is it 100 or 1000, or 10000)
• Determine the accuracy of the result. Is integer rotations ok, or do you need fractions of a rotation also?
• Determine the maximum speed of rotation. Some systems might not behave very well at high rpm.

At that point it would make sense to gauge your capacity to develop this system. If you never programmed or don't know what a shouldering iron is, then the best way - IMHO- is to buy an encoder system attach it to you shaft, and measure the rotations. Just make sure that it fits the technical parameters you determined above.

If you can program a microcontroller or a PLC or a PC (you can do it in any programming platform from Matlab, python, labview, etc), then you have almost endless possibilities.

You can use:

• proximity sensors (e.g. accoustic like in the parking of cars, magnetic)
• optical sensors: implementations can be either reflective or interruptive
• ...
• @HelloGoodbye If you do want to consider a small machine to do the winding for you (it'll make neat, accurate windings), the search term would be "cnc coil winder". Aug 18, 2021 at 15:42