This is a broad question but I want advice on what type of hardware I should look for to make a device that could measure the velocity of an object attached via a string/wire to some sort of rotary wheel.

The purpose of this is to attach it to a barbell and measure mean-velocity for weightlifting atheletes.

I'm a software engineer by trade but know nothing about hardware. I will obviously need to start with simple projects to learn, but I would like to know which hardware I should lean towards buying, so I don't have to re-buy anything?

  • Attach a optical rotary encoder. Similar to the one that can be found in mouse scroll-wheels. (Since direction isn't needed for you problem only a single photo-interrupter is needed.)
    – Gerben
    Commented Sep 25, 2015 at 14:20
  • I wonder though how I would get the encoder to "rewind" back into position (between subsequent weight lifting repetitions) without affecting the velocity measurement, or causing undue asymmetrical stress on the athlete? Commented Sep 25, 2015 at 14:35
  • Some small spring would retract the wire without exerting any noticeable force for the athlete. Or have the wire loop around the "wheel" and attach a counterweight (just like a lot of fitness devices do).
    – Gerben
    Commented Sep 25, 2015 at 19:12

2 Answers 2


You can use a dog lead (or replace it with a fishing line). I made one my self. I used a rotary encoder and a dog lead, an Arduino board Paralax, and Excel.

It will use interrupts. Once the wire is triggered, the Arduino will send to Excel time and distance traveled. Once the weight goes down distance and time will be printed too, however distance will run in a minus direction. Later just press one button in Excel and each set of lifts will appear on the desktop. I can see my lift speed, power generated, distance travelled and so on.

Excel example


This is an example of the optical encoder. You want to use interrupt detection, rather than polling. Or maybe even an HW counter. That's all you really need.

I am using 4 of them for a car.

I am in the process of refactoring the code, but you could already have a look at the driver & example I wrote for ChibiOS, here.

  • Second link appears empty Commented Sep 26, 2015 at 5:30
  • Ooops, sorry. Fixed. Commented Sep 26, 2015 at 7:20

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.