Incremental Rotary Encoder Device to measure velocity

Hi,

I am kinda new to Arduino. Right now I am working on a project where there is a cord connected to an incremental rotary encoder. The goal is to be able to know the current velocity by calculating the difference between the current position and the previous position.

The reason for this project is to be able to connect the cord to an athlete (swimmer of track and field) that way you can be able to see where the athlete loses speed and where the athlete gains speed. I pretty much got the software to work but I do have an issue with the hardware.

The issue is that when the athlete gets far from the device, the cord gets very loss (probably because of the weight and the distance) so the input is getting less and less accurate. I was thinking maybe to connect a small DC motor to the other side of the encoder and to get it to turn the counter side of the encoder, that way there will be a resistance to the encoder but I have never used a dc motor before so I don't know if this is even possible.

Any suggestions?

BTW I am using an Incremental Photoelectric Rotary Encoder - 400P/R. I am attaching a picture of my setup and a picture of the final graph.

1 Like

How can you get any accuracy with that thing? The cord is all higglety pigglety on the bobbin, and of course the diameter changes as there are more and less turns of cord on the bobbin. Then, the length of cord per revolution changes.

Also, if you pull back on the cord, won't that affect the athlete's performance?

Thank you very much for your fast response.
First, I know that the setup right now is not 100% accurate just because I want to get all the software done before I start to invest more money into developing a real product. In order to keep the accuracy level high, I will remove the string from sitting directly on the encoder. by doing so, I will be able to ensure that the movement is going to be consistent (something like that - Cheap String Potentiometer Pt 1 - YouTube).

What I meant by pulling back the cord is that if you pull it back in a very light way, the athlete is not going to be affected by it because it is not going to be strong enough. It will only be strong enough to keep the cord from being loose.