One of my after-hours projects is to get my Traxxas Rustler XL-5 to take itself for a drive. The first steps are measuring the open loop response, including how the PWM drive into the motor controller turns into a no-load wheel RPM.
I don’t have a tacho but I do have a web cam, an open source vision library, and too much spare time. Here’s a video of the result:
Each scene is a step in the process. First is the colour image, then the image in HSV (to pick out the red no matter what the brightness), then the squared distance of each pixel from red (to highlight the tape), then thresholding (needed for contouring), then the contours, and finally a circle on the middle of the largest rotated rectangle.
Running the motor and plotting the X and Y of the centre gives a nice sin/cos plot. A FFT will give the frequency/RPM.
Thanks to the OpenCV guys for their library!