RPM capturing encoder wheel

Hello,

I have been looking at this post:
https://create.arduino.cc/projecthub/yashastronomy/arduino-based-rpm-counter-with-a-new-and-faster-algorithm-3af9f3

Has anyone tried this? I have a 6-slot 1" optical wheel. I have a break beam module coming any day now. I have an application for a spinning motor at 14,000 RPM. So 6 x 14,000 RPM or 233 x 6 rev (1,398 pulses) per second.

He claims to capture enough accuracy in 40ms. Trying to figure out how it works. Any insight would be great. Thanks!

Does the article not explain how it works? That would be the only good reason to try to explain it here.

If you have specific questions, then ask them. Otherwise a lot of time will be wasted explaining things that are already explained, or things that you already understand.

Hi aarg,

Sure,

Basically what is going on in the Loop. It discusses a 3 blade fan. It says in the write up that it is looking at counting the dark portion of the blade. ok....So I have a disk with 6 slots and 6 larger solid areas. I would be counting the millis incremented during the dark period until it gets to a window. At 14,000 RPM 1/6 blade is very fast on a 1" diameter disk.

1). Does millis still work? this is basically Speed = D/T, but distance is circumference.
2). Is micros better suited? If so will the extra latency using micros affect accuracy? I read somewhere that there is a notable clock cycle difference because of how it is captured before the prescaler or something to that effect.

Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.