When you want to control a DC motor, there are two ways in which this could be approached. It can be controlled (a closed-loop approach) or simply driven (an open-loop approach). The open loop approach is the easiest one since it does not relay on any addition knowledge about the system or the motor itself. The control process is straightforward. You send the control signal and hope that the DC motor will rotate at the desired speed. However, in many situations, it is insufficient. For example, when a car goes uphill, it requires more torque, so the power output needs to be adjusted. In the end, the same control signal will not give the same results as the environment changes.
In this post the main emphasis is put on quadrature encoders. The quadrature encoder is a sensor mounted next to motor which allows to measure how fast the shaft is turning. Going further, the usual implementation of the quadrature encoder sensor counts how many times the state has changed. However, before going into details, let us focus first on quadrature encoders and how they work.Continue reading