microcontroller based3rd phase project

Upload: mailtoakhils

Post on 14-Apr-2018

232 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 Microcontroller Based3rd Phase Project

    1/23

    MICROCONTROLLER BASEDRPM COUNTER

    PRESENTED BY: AKHIL S (03)&

    AKHIL R (04)Guided by:

  • 7/27/2019 Microcontroller Based3rd Phase Project

    2/23

    INTRODUCTION

    Counting the revolutions per minute (RPM) of motors,

    determining the motor speed.

    Essential in the field of industrial automation.

    Useful for closed-loop control systems.

    Proper action can be taken, actual RPM deviates from the setRPM.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    3/23

    AIM

    Project based on microcontroller AT89C4051 that measuresand shows on an LCD the RPM of a running motor.

    Using a proper transducer, first the rotations of the motor are

    converted into pulses.

    The generated pulses are counted by the microcontroller fora fixed time (say, one second).

    The count is multiplied by a factor to get the exact RPM andthen displayed; if time is one second, the factor is 60.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    4/23

    Block diagram of the RPM counter

    based on microcontrollerAT89C4051

  • 7/27/2019 Microcontroller Based3rd Phase Project

    5/23

    Block Diagram Description

    RPM counter based on AT89C4051 microcontroller that generates pulsesfor every rotation of the motor, counts them and shows on the LCD.

    On a fixed base,light source on one side and the combination of a light-

    dependent resistor (LDR), pulse generator, microcontroller and LCD onthe other side.

    Both the arrangements are housed in separate wooden cabinets such thatthe light beam falls directly on the LDR.

    The motor is placed on top of the l source. A slotted wheel(optical shaftencoder) is attached to the motor shaft. The wheel is so big that it caninterrupt the light beam falling on the LDR.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    6/23

    As the motor rotates, the slotted wheel also rotates.

    The light beam falls on the LDR whenever the slot aligns with

    the light beam and LDR, producing one pulse.

    The rotations of the motor are converted into pulses that canbe counted by the program in the microcontroller.

    Pulses are counted for one second. The pulse count is

    multiplied by 60 (because 1 RPM = 60 RPS) and finally shownon the LCD.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    7/23

    Circuit of the RPM counter using

    AT89C4051

  • 7/27/2019 Microcontroller Based3rd Phase Project

    8/23

    5 V DC REGULATED POWER SUPPLY

    SYSTEM

  • 7/27/2019 Microcontroller Based3rd Phase Project

    9/23

    Components Required

    Semiconductors:

    IC1 - AT89C4051 MICROCONTROLLER

    IC2 - NE555 TIMER

    T1 - 2N2222 npn transistor

    D1 - 1N4007 rectifier diode

    LED1,LED2 - 5mm LEDLCD - 16x2 line

    Resistors (all -watt, 5% carbon):

    R1-R4 - 1 kilo-ohm

    R5 - 150 ohm

    R6 - 220 ohmR7 - 10 kilo-ohm

    R8 - 470 ohm

    VR1 - 10 kilo ohm preset

  • 7/27/2019 Microcontroller Based3rd Phase Project

    10/23

    Capacitors :

    C1 - 1uf, 16V electrolytic

    C2 - 0.01uf ceramic disk

    C3,C7 - 0.1uf ceramic diskC4,C5 - 22pf ceramic disk

    C6 - 10uf, 16 V electrolytic

    C8 - 100uf, 16 V electrolytic

    Miscellaneous:S1 - ON\OFF switch

    S2 - Push-to-on switch

    XTAL - 12MHZ crystal

    LDR

  • 7/27/2019 Microcontroller Based3rd Phase Project

    11/23

    Circuit description

    Figure shows the circuit of the RPM meter. It comprises microcontrollerAT89C4051, timer NE555, LCD module (162 line) and a few discrete

    components.

    Timer NE555 is configured as a monostable multivibrator whose time

    period depends upon the combination of resistor R1 and capacitor C1.

    Trigger pin 2 of NE555 is pulled high via resistor R2.

    The LDR is connected along with resistor R2 to pin 2 of NE555 such that

    when the light falls on the LDR, pin 2 goes low to trigger NE555.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    12/23

    The output from pin 3 of NE555 is inverted by transistor T1 and fed toport pins P3.3 and P3.4 of the microcontroller. LED2 is connected to port

    pin P3.0 (pin 2) of the microcontroller.

    Data pins D0 through D7 of the LCD are connected to port pins P1.0through P1.7 of the microcontroller, respectively.

    Control pins E, RS and R/W of the LCD are connected to port pins P3.2,P3.5 and P3.7, respectively.

    A 12MHz crystal connected between pins 4 and 5 of the microcontroller,along with two 22pF capacitors C4 and C5, generates the basic clockfrequency.

    Power-on reset is derived with the combination of resistor R7 andcapacitor C6. Switch S2 is used for manual reset.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    13/23

    WORKING :

    1.As the motor starts rotating, the light falls on the LDR when

    the slot aligns with the laser beam and LDR.

    2. Every time the motor completes one rotation, the

    monostable (NE555) triggers to generate one pulse, which isindicated by LED1.

    3. As the first pulse arrives, it generates an interrupt for the

    microcontroller and immediately the microcontroller startscounting the pulses. This is indicated by LED2.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    14/23

    4. The microcontroller counts the pulses for a period ofone second. Thereafter, LED2 goes off.

    5.The microcontroller stores the count and multiplies itby 60 to give the final RPM count

    6. The count is in hex format, so you have to convert itinto decimal first.

    7. The decimal values are converted into ASCII andshown on the LCD one by one.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    15/23

    Circuit TOP

  • 7/27/2019 Microcontroller Based3rd Phase Project

    16/23

    POWER SUPPLY TOP

  • 7/27/2019 Microcontroller Based3rd Phase Project

    17/23

    Circuit PCB Layout

  • 7/27/2019 Microcontroller Based3rd Phase Project

    18/23

    POWER SUPPLY PCB

  • 7/27/2019 Microcontroller Based3rd Phase Project

    19/23

    SOFTWARE

    Software for the RPM counter is written in C

    language.

    Compiled using Keil Vision3 compiler.

    Burned the generated .hex file into the

    microcontroller using a suitable programmer.

  • 7/27/2019 Microcontroller Based3rd Phase Project

    20/23

    FEATURES

    Safe and accurate rpm measurements

    Consume less power

    LCD display gives RPM reading exactly with noguessing or errors

  • 7/27/2019 Microcontroller Based3rd Phase Project

    21/23

    FUTURE SCOPE

    Modern automobile engines & Aircraft

    engines

    Ultrasonic dental drills

    Analogue audio recording & cd players

    Turbo chargers

    Zippe-type centrifuge used in isotope enrich

  • 7/27/2019 Microcontroller Based3rd Phase Project

    22/23

    REFERENCES

    Electronics For You (EFY)

    http://www.electronicsforu.com/electronicsforu/circuitarchives/view_arti

    cle.asp?sno=476&id=4690

    Muhammad Ali Mazidi, Janice Gillespie Mazidi, The 8051Microcontroller and Embedded Systems, Seventh Edition, Pearson

    Education Asia (2004).

    Wikipedia

    http://en.wikipedia.org/wiki/Tachometer

    http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690http://en.wikipedia.org/wiki/Tachometerhttp://en.wikipedia.org/wiki/Tachometerhttp://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690http://www.electronicsforu.com/electronicsforu/circuitarchives/view_article.asp?sno=476&id=4690
  • 7/27/2019 Microcontroller Based3rd Phase Project

    23/23

    THANK YOU