Apply a PID control to a DC motor using encoders.

Hi everyone, this weekend I have to do a project applying a PID control to a DC motor and I'm using encoders to know how long my wheel moves, but honestly I don't have idea, how begin or where to look for information, If someone could help me I will appreciate a lot! Thanks! Every one!

PD: I'm using the Dagu Rover who has 4 motors and everyone has a Quadrature Encoder, and I've tried controlling the speed with the PWM of the Arduino.

Thank u!

And happy Christmas! :grin:

Google is a fantastic resource for information on PID (as well as your textbook) and you can also take a look at the Arduino PID library here: Arduino Playground - PIDLibrary

In this case with the PID library, one normally uses the current encoder position as the process variable, and the desired encoder position as the setpoint.