Feedback speed control of motor.

Hello everyone ,
So I am building my first arduino project which is basically a contactless tachometer with automatic speed control.

So far I have successfully made the tachometer using ir sensor and phototransistor. Now I need to run the motor ( using dc, can be any though) at a fixed speed. I guess I have to use a feedback mechanism from the rpm I am getting from the tachometer. But I am not able to think of how to begin.

Every help will be deeply appreciated. Thanks. :slight_smile:

if you can use PWM to run the motor and increment the PWM out when the desired RPM is higher than the motor speed.

or decrements when it is faster.