Changing RPM of DC Motor with using PID ( Please Help Me )

Hello friends, for my final project i wanted to use arduino and i was new in now i am not bot but it is not enoguh.I created an rpm reader with using CN70 on breadboard and i showed it to my instructor but she wants to change speed of DC motor with using PID however i could not do that i want to help from you. How can write the code and using PID with feedback system like that also i do not know how can i create the breadboard for that . She said I want to see that. If you know about this topic please help me

Search the forum for PID control, PID library, PID tutorial or something like that. A software solution doesn't require additional circuitry.

thanks mate i will try it

If you use the PID library you provide two numbers:
Setpoint: The value of RPM you desire
Input: The value of RPM you are currently reading
The library returns a third value:
Output: A number from 0 to 255 you can use with analogWrtite() to control the motor speed.

actually mr. john wasser my instructor wants the input with on pc or keypad not like changing the potiontion meter and the value of dc motor will change. Honestly, i could not write the code i could not figure out.

and i think that diagram but is it pid or somethnig else i am not sure if you give your opinios about that i will be very glad that is the url http://avrprojects.info/files/images/stepper-motor-atmega16.gif

You have to use the keypad to bring in a number

call that number set_point

it should be a number from 0-1023
0 being stop and 1023 being full speed.

keypad > set_point

for the PID and it is PID, not pid by the way.
use that set_point number to be the desired set-point value from 0 to 100%

the RPM that comes in is the other value.

the library will want the setpoint that you get from what you enter in the keypad and then also the value of the RPM