0
\$\begingroup\$

I have got a large wooden disc for some purpose which rotates in its center axis. But I need to find the number of rotations or simply stop the disc when number of turns reaches a certain point.

So I tried with a reed switch and a magnet. So the magnet attached to the rotating disc and reed switch at a static position where the magnet comes closer while rotating.

So I connect this setup to arduino and modified the debouncing code and added few variables to count the number of times the reed switch changes its state.

But the problem is when it turns slowly the counter variable increments without any issue. But when moves fast the triggering is not at all happening since magnet moves very fast near to the reed switch.

So which is the best way to count the number of turns of the disc..

I thought about a spring switch.. But had some thoughts will there be any better solution

\$\endgroup\$
6
  • 1
    \$\begingroup\$ You might have too much debounce. What speeds are we talking about? \$\endgroup\$
    – Kartman
    Commented Apr 23, 2021 at 6:16
  • \$\begingroup\$ I removed the bouncing code and just press. Still its not triggering when rotating fast.. I guess fast moving magnets cant trigger a reed switch \$\endgroup\$ Commented Apr 23, 2021 at 6:26
  • \$\begingroup\$ You could replace the reed switch with a hall switch. Same idea but solid state so faster. Slightly more complicated wiring. You could also just use more magnet so the magnet spends more time over the reed switch. \$\endgroup\$
    – DKNguyen
    Commented Apr 23, 2021 at 6:43
  • \$\begingroup\$ @SandeepThomas I think you will need an oscilloscope, because we need to see what the reed relay output looks like when it is running fast enough to be a problem. Also, we need to see the exact schematic of what you are using. A photo of the sensor arrangement also wouldn't hurt. \$\endgroup\$
    – jonk
    Commented Apr 23, 2021 at 7:01
  • \$\begingroup\$ your title does not match the body of the question .... measure RPM is not same as count number of rotations \$\endgroup\$
    – jsotola
    Commented Apr 23, 2021 at 17:34

2 Answers 2

1
\$\begingroup\$

Move the magnet and sensor in towards the centre of the disk. Speed will be slower and the magnet will be larger relative to the circumference at that radius.

The alternative is to put multiple magnets on the edge all touching each other and all in the same polarity. To do this find out the highest RPM you can reliably detect with the current setup. Divide that number into the max RPM you want to measure and you need that number of magnets.

\$\endgroup\$
0
\$\begingroup\$

Another option is to do it optically. Paint a black stripe around the wheel, then add one white spot. Use an optical detector to detect the white spot. You can buy off-the-shelf detectors with an infrared LED and a photodiode.

You will still need some debouncing to avoid rogue counts. If stray light is an issue, you may also need to pulse the power to the LED at a few kilohertz, then look for that pulse train coming back from the photodiode.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.