

#Avr control system simulator
It is simulated using AVR simulator 2 for ATmega16 device available with AVR studio software.
#Avr control system software
It is compiled using AVR studio software tool. So micro controller continuously increases motor speed by generating PWM and also counts RPS and display them on LCDĪbove working is based on the program embedded into internal FLASH (memory) of ATmega16 micro controller The pulse width is increased upto 99% and after that once again it is reduced to 10% and whole cycle repeats continuously Every time the pulse width is increased in step of 10% and new RPS is displayed. After 1 sec updates the pulse count as new RPS (speed).Īgain after 2-3 second the cycle repeats. Wait for motor to attain stable speed and measures the pulse count. Again it increases pulse width to 20% and display it. After 1 sec It directly displays the pulse count as RPS on LCD Then micro controller starts counting pulses coming from sensor and counts it for 1 sec only. Then it waits for 2-3 seconds for motor to settle down to new speed. Micro controller sets 10% pulse width, display it on LCD and apply it to motor. The duty – pulse width increases from 10% to 99% and again it reduces to 10% and this cycle continuous. The micro controller starts generating PWM on PD7 pin. So revolution of motor is converted into pulse A strip is attached to motor shaft such that as motor rotates the strip passes through the gap of MOC7811.
#Avr control system manual
It will provide clock signal for all micro controller internal operationsĪ reset push button is connected to reset input pin to provide manual reset to controller Thus PD7 pin drives DC motor through TIP122Ī crystal (8 MHz) is connected to crystal input pins along with two 22 pF capacitors. DC motor is connected to collector output of TIP122 as shown. The PWM output pin PD7 is given at the input of TIP122 through limiting resistor 470E. 1 K pot is connected to brightness control pin VEE to vary LCD brightness RW pin is connected to ground to make write enable. Its data pins D4-D7 are connected to PD0 – PD3 and control pins Rs and En are connected to PD4 and PD5 respectively. The LCD is connected to PORTD in 4-bit mode. This output is given to timer/counter 0 input pin PB0 of ATMega16 The output of sensor is taken from collector of photo transistor The photo transistor is connected in switch configuration.

The internal IR LED of MOC7811 is forward biased by giving direct 5 V supply through 330E current limiting resistor. It increases pulse width from 10% to 99% and measures DC motor RPM and displays pulse width as well as RPS (revolution per second) on LCD.Īs shown in figure circuit is built using AVR ATMega16, 16×2 LCD, darlington NPN transistor TIP122, opto interrupt sensor MOC7811 and few additional components. The project is built using AVR micro controller ATMega16. It generates PWM to vary speed of DC motor and at the same time it continuously measures RPM of it. So simultaneously DC motor speed is increased or decreased by applying PWM and its actual speed is measured means two tasks are performed simultaneously, generating PWM and measuring RPM. The system compares require speed and actual speed and takes necessary action if deviation is found. In close loop control system speed of DC motor is controlled at the same time its actual speed is also measured and given as feedback. In such application it is required to control as well as measure DC motor speed. In many applications it is required to precisely control speed of DC motor to an exact RPM.
