Arduino PID Control

PID Control Loops

PID control is a great way to keep something in check as if you were there tweaking the inputs for a desired output.

For example if you have a DC motor and want it to stay at a specific RPM you can use a shaft position sensor and PID based software to keep feeding in just the right amount of Voltage (or PWM) to keep the RPM at the set speed.

The beauty of this includes when that DC motor gets old and the bearings start to be less effective, the PID control loop will automatically increase voltage to overcome the additional friction and implicit slow down.

PID is a theory of control. It is just convenient to think of it as a software program. Before computers and microcontrollers they were implemented by mechanical solutions.

Sources of Information on PID Control

One of the best resources for learning PID control loops is:

PID without a PhD

The Wikipedia Entry for PID control loops

Arduino and PID

The arduino microcontroller is perfectly capable of running multiple PID controllers.

There is even a pre-built Arduino Library for it found here:

Arduino PID library




Change is the only constant…