Hello,
Automatically syncing a motor to a manually-spun device
I have an unusual variable-speed persistence-of-vision experiment that intentionally generates some optical illusions (think bike wheel lights, except on a table) when two simultaneously cranked toys run at almost the same speeds. I want to electronically spin one of the two instead. So I am doing a add-on experiment that requires me to automatically synchronize a motor to a manually cranked spinning wheel.
I need accurate spin of between 10 RPS through about 60 RPS
From the manually-spun device, I have access to a processed GPIO squarewave signal that goes between 10 Hz thru about 60 Hz (photosensor connected to the hand-spun wheel). I have configured cutoff thresholds, e.g. ignored when Hz is too low and Hz is too high.
Range is flexible, but it needs to be a variable range
I've set the range from 10Hz thru 60Hz since too slow is bad flicker, and too fast is risky to equipment. I can downshift to 5Hz to 30Hz (spins per second) if motor limitations restrict range, etc. I can shift or narrow the range if need be to accomodate output motor limitations, but there needs to be a range.
How do I precisely spin a motor at an exact speed, and change the speed on the fly
I need to change speed of the motor within about a 1-2 second margin. There will always be a lag in synchronizing spin speeds, but a 1-2 second latency (maybe 3-5) in RPM speed sync is acceptable.
Basically a continuous feedback loop -- Manual cranked toy speeds up, motor speeds up (within a short while), manual cranked toy slows down, motor slows down (within a slow while). Syncing of a motor spin to a manual spin.
I've got lot more experience with digital stuff, but no experience with speed-controlled motors. I can program both computer-side (C# etc) and Arduino IDE (C), but I am new to speed-control of motors.
I'm working off only 32-bit ARM based Arduinos.
What would be the easiest way to add a programmable-speed motor to my circuit?