Dual Microcontroller DC Motor Speed Control & IR Tachometer

This project encompasses a two-pronged approach to DC motor control, employing two distinct microcontrollers (MCUs) for precise speed regulation and measurement.

The first MCU is in charge of speed modulation, adjusting the DC motor’s speed using a Pulse Width Modulation (PWM) signal. Simultaneously, the second MCU measures the adjusted speed. Interestingly, these two MCUs interact without a physical connection between them. This is achieved by an ingeniously designed optical sensor system consisting of an IR-emitting diode and a phototransistor positioned on either side of a rotating CD with four drilled holes.

As the CD rotates and a hole aligns with the sensor, the IR light passes from the diode to the transistor, triggering an internal MCU interrupt. This innovative design removes the need for physical wires, enhancing system efficiency and flexibility.

The applications for both MCUs are meticulously developed in C, reflecting a comprehensive approach to hardware-software integration in motor control.

Please note, there is a video of this project available. However, it was recorded a while ago, so the quality might not be optimal.


Here are some pictures taken at the time of project realization.

GitHub repository