hawkman384:
Call it testbench for control methods. Say I have a L298 motor driver and a DC motor with encoder (e.g the one I linked previous post or one with a bit higher rated RPM), will it work?
As the link was not clickable I did not realize it was a link.
That motor seems to have an 11 PPR encoder on the motor shaft and a 34:1 gear ratio which means that at 210 RPM the motor would be turning at 119 RPS and there would be 1309 pulses per second or one every 764 µsecs.
It should certainly be possible to control the speed of the motor with that encoder but I suspect 1 PPR would be quite sufficient for speed control. I would probably count pulses and log the time (micros() ) after every 11 pulses.
You could count the pulses to identify how far the motor (and the output shaft) has rotated. But it would require a complex program to get the motor to stop, and stay stopped, at a particular position. I think there would have to be some movement back and forth over a few pulse positions, but that would probably not be noticeable after the 34:1 gear reduction.
...R