How do I count rotations with a sensor?

Thread Starter

RC designer

Joined Feb 8, 2019
14
This is for a CNC quilting machine. Need to send a "pause" command to the machine when the bobbin reaches a certain number of rotations, so that I can change the spool before the machine runs out during the operation. I imagine the use of an arduino board, some type of light reflective sensor, and a way to send a command to the machine kinda like a limit switch, except triggered when a certain number of rotations is reached? and instead of stopping the machine it would pause the machine and give me a "resume" option when ready. Any help would be greatly appreciated.
 

LesJones

Joined Jan 8, 2017
4,189
You would use the pulses from the sensor to increment (or decrement) a counter. When the counter was equal to the number of rotations requited an output pin on the arduino would be set high to drive a relay. If I was doing it I would use a 8 pin PIC or ATtiny microcontroller as ths would be cheaper and smaller than an Arduino. Also I would load the counter with the number of revolutions and decrement it for each revolution. After each decrement I would test if the count was zero (A single instruction.) I would then set an output pin high to drive a relay. You would also need to have a push button switch to reset things back to counting pulses and de-energise thr relay.

Les.
 

AnalogKid

Joined Aug 1, 2013
11,038
Your question needs more information.

What makes the bobbin turn? Also, please post photos of the bobbin and its location in the machine so we can see what spaces we have to work with.

In general, there are lotsa ways to detect rotation.

A reflective sensor pointed at a shiny spot on the bobbin drum, shaft, whatever.

A small magnet on the bobbin going past a Hall effect sensor.

A small protrusion on the bobbin nudging a limit switch.

After that comes the counter. Does it have to be programmable with a user interface, or can it be a simple hardware counter that produces a pulse when a fixed number is reached?

What do you mean by "send a 'pause' command"? Is this a logic-level signal or pulse, a relay contact closure, an ASCII message over a serial port, something else?

ak
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
Is this a DIY CNC M/C or off the shelf?
Many DIY controllers offer the ability to add features in the PGM.
As to the count/mechanics, as said previously there is the optical method, which can become obscured with some applications, and the other hall method could use the Min. SS44xxx sensors from Honeywell to operate into the system. this would need a small button magnet on the bobbin.
https://sps.honeywell.com/ca/en/pro...position-sensor-ics/ss400-series-ss500-series
 
Last edited:

shortbus

Joined Sep 30, 2009
10,045
Need to send a "pause" command to the machine when the bobbin reaches a certain number of rotations, so that I can change the spool before the machine runs out during the operation.
Counting revolutions doesn't make sense to me. The length of thread on the bobbin gets smaller with each revolution, how will you compensate for that? Why do this totally electronically? A simpler solution would be to use a lever action micro switch, set the position of the switch so it sent the signal to pause when it got to your amount of thread that you want.

The type of switch I'm talking about is one of these. When the bobbin is near empty the switch would send the signal for pausing the machine.

1675871754481.png
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
The bobbin count could maybe work if the thread size/dia. is constant, a test could be done as to the normal No. of turns it takes to empty the bobbin.
 

AnalogKid

Joined Aug 1, 2013
11,038
Counting revolutions doesn't make sense to me.
I'm sure much of the world doesn't, but in this case you might be correct. String or thread is sold by the foot. For a spool of xxx feet, a very small difference in tension when spooling would amount to a significant difference in the number of turns on the spool.

ak
 

MaxHeadRoom

Joined Jul 18, 2013
28,684
I'm sure much of the world doesn't, but in this case you might be correct. String or thread is sold by the foot. For a spool of xxx feet, a very small difference in tension when spooling would amount to a significant difference in the number of turns on the spool.
But whether or not, the material had elasticity may have the largest influence. ?
 

shortbus

Joined Sep 30, 2009
10,045
a very small difference in tension when spooling would amount to a significant difference in the number of turns on the spool.
But whether or not, the material had elasticity may have the largest influence. ?
As some one who was taught to use a sewing machine in my youth and still does from time to time, when winding a bobbin there is no way of knowing how much thread, in length, you are putting on one. With the arm of the micro switches contact point on or even slightly close to the center point of the bobbin, it wouldn't matter how much or how little was on the bobbin. when it gets to a predetermined diameter of the bobbin the switch activates.

We aren't measuring the elasticity, just the amount of thread left on the bobbin. And should be much more accurate than measuring rotations.

I am assuming the bobbin is of this type -
1675895250478.png
 

Reloadron

Joined Jan 15, 2015
7,517
Counting revolutions doesn't make sense to me. The length of thread on the bobbin gets smaller with each revolution, how will you compensate for that? Why do this totally electronically? A simpler solution would be to use a lever action micro switch, set the position of the switch so it sent the signal to pause when it got to your amount of thread that you want.

The type of switch I'm talking about is one of these. When the bobbin is near empty the switch would send the signal for pausing the machine.

View attachment 287114
When confronted with stopping a machine which was winding I went with a similar approach. I went with a "travel transducer" or "linear position sensor". All it really is would be is a potentiometer. While not important here is I used a magnetic brake on the spool to maintain constant tension. The displacement transducer gave me a voltage out proportional to wire remaining on the spool. If all that is wanted is On/Off I would look to fixture a micro-switch as shortbus posted with maybe a roller on the lever. Obviously as mentioned as the spool diameter decreases the length per revolution decreases. I just see a uC as somewhat overkill with counting pulses.

Ron
 

drjohsmith

Joined Dec 13, 2021
852
Id break this down into a few separate sections

a) to count revolutions is relatively easy , you need some mark , and some way of detecting that mark, or some direct connection to the rotating thing,

b) mechanics are the more difficult part. If the bobbin is connected via gears say, it might be easier to get access to the gear , and scale acordingly

c) what your measuring. You say revolutions, but as indicated above, the number of revolutions of a bobbin might not indicate the amount used.
I would say some tests with different threads to see if there is a relatively good correlation between rotations and amount of thread.

d) You also need to consider what happens if the power is removed. You need some way of remembering where the rotations got to ,

e) I do little sewing, but am married to a great one, She says its common to change bobbins mid thread, so you would need some way of remember where each bobbin was at.

f) alternatives, are a more direct sensor of the thread. How about a switch that runs on the bobbin, and switches at the almost empty size, I think thats been mentioned above.
 
Top