I want to use an UNO to control a PM DC motor speed accurately using digital *negative feedback.
There will be 6 different preset speeds input by a rotary switch so can be 3 digital inputs.
I obviously dont need a readout of the speed.
So my plan is to feed the tacho pulses to a digital input and use (library) code to measure the frequency, compare it with the preset, then subtract them. The resulting number will be an "error signal" which is then converted to PWM to drive the motor via a transistor switch.
*The negative feedback loop will probably use a PID control algorithm to give optimum stability (I know how to do this bit).
So my questions:
Can all this be done with an UNO?
Is it realistic in terms of response time or will the loop delay be too slow?
Can I use standard libraries eg F Counter?
If it seems feasible I would love to give it a go!