Implementation of a PID control system on microcontroller (DC motor case study)

This paper concerns with the design and implementation of a microcontroller based PID controller for the purpose of controlling PMDC motor speed. The design had been done using MATLAB and Simulink and the system then simulated using Proteus, in addition to a practical physical system. The controller was implemented on an Arduino Uno board to control the speed of the motor at a desired value with the possibility of changing it and its direction of rotation. The proposed system use an optical encoder as feedback sensor of motor speed which is compared with reference speed to produce error signal for the controller input, the control signal then sets the PWM duty cycle to change the motor speed which controlled via H-bridge. The controller was able to track the input regardless of friction, disturbance and medium changes of load on motor shaft. Both implementation and simulation results had been obtained and compared.