Project 1 - Controlling a DC motor using PWM and monitoring its Running status
Overview of the Project:
Implement a system on the simulator for controlling a DC motor using L293 motor driver, monitor its status and print the running status of motor on the LCD Display.
Goals:
- Implement a system on simulator for Controlling the DC motor using L293 motor driver.
- Displaying the running status of DC motor on the LCD display.
Key Highlights of the Project:
- The DC motor can be controlled by using L293 motor driver.
- The speed of a DC motor can be controlled by varying its input voltage, for doing this is to use PWM (Pulse Width Modulation).
- L293D IC is a typical Motor Driver IC which allows the DC motor to drive on any direction.
Deliverables of this project:
- Implement the system for controlling DC motor.
- Controlling the speed of the DC motor using PMW.
- Displaying the present running status of DC machine on LCD display.














project summary :
This C program uses an AVR microcontroller to control a DC motor using PWM and monitor its running status using push buttons. The program uses the I/O registers of the AVR microcontroller to control the PWM signal on the PB1 pin, the direction of the DC motor on the PC0 pin, and monitor the running status of the motor on the PC1 pin. The program also uses external interrupts to detect the button presses and a 16x2 LCD display to show the status of the DC Motor.
The program uses the TIMER0 of the microcontroller to generate PWM signal on the PB1 pin, the program uses the PC0 pin to control the direction of the DC motor. The PC1 pin is used to monitor the running status of the motor, such as a hall effect sensor. The program uses the PIND pin to detect the button press event for direction and speed control of the DC motor. The program also uses a 16x2 LCD display to show the status of the DC Motor.
It's important to note that this code uses the printf function which is not available on AVR microcontroller, you can use UART or any other method of debugging to see the Motor running status. Also, in this program, the delay is handled by _delay_ms() function which is part of <util/delay.h> library.