# Trying to sense when a wheel stops

I am trying to sense when a wheel stops turning I have IR trip sensors that I would prefer to use and I can 3d print a series of windows on the wheel. This is to time how long a wheel will turn based upon how things slow down the wheel and then save the data to an sd card. The only thing that is confusing me is the code side of it, if there is a tutorial on this that would be fantastic.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.

jtb1313:
I am trying to sense when a wheel stops turning I have IR trip sensors that I would prefer to use and I can 3d print a series of windows on the wheel. This is to time how long a wheel will turn based upon how things slow down the wheel and then save the data to an sd card. The only thing that is confusing me is the code side of it, if there is a tutorial on this that would be fantastic.

If your wheel was turning at one revolution per day, how long would you have to wait before your project would say the wheel was stopped?

Paul

jtb1313:
I am trying to sense when a wheel stops turning…
This is to time how long a wheel will turn based upon how things slow down the wheel and then save the data to an sd card.

Learn how to attach a sensor to a data pin and read a signal from the sensor.
Learn how to attach multiple sensors to multiple data pins and read signals from the sensors.
Learn how to record the time when a condition is met (like a data pin goes from HIGH to LOW).
Figure out what the condition is when the wheel has stopped (like the elapsed time since the last signal from the sensor is over a threshold).
Learn how to write data on an SD card.

That is at least 5 steps. There’s not one solution for everything I listed. There’s one or more solutions for each step. You just have to define each small step for yourself. Then (if you can’t figure out the solution yourself) you google for the solution to that step. If you still can’t find a solution, try to further divide it into smaller steps.

If you have solved each small step (like in separate working Arduino programs) and can’t figure out how to combine everything, you might need to improve your general coding skills. Click here for reading on.

Sensing when a wheel stops is not a simple concept. It is much easier to tell when the speed falls below some value by measuring the time between pulses from the sensor. When the wheel stops there will be (in theory) an infinite interval from the last pulse to the next pulse. But if the wheel is moving very very slowly maybe the next pulse could arise after an hour.

If it is important to know that the wheel is not rotating then you need to apply a brake.

...R