tachometer using at89s52 microcontroller with motor control

28
Submitted By: Ketan Gupta (04211502809) Yatin Jain (04811502809) Sushil Kumar Mishra (05311502809) Harshit Jain (05911502809) 1

Upload: sushil-mishra

Post on 01-Sep-2014

7.721 views

Category:

Education


6 download

DESCRIPTION

Tachometer using AT89S52 microcontroller with motor control using H bridge method We , in this project are measuring the RPM of a motor using an IR sensor. The motor speed and direction is made variable by use of a H-bridge method. RPM is shown on LCD display for the two directions.

TRANSCRIPT

Page 1: Tachometer using AT89S52 microcontroller with motor control

Submitted By:Ketan Gupta (04211502809)Yatin Jain (04811502809)Sushil Kumar Mishra (05311502809)Harshit Jain (05911502809)

1

Page 2: Tachometer using AT89S52 microcontroller with motor control

RPM METER OR TACHOMETER A tachometer

(revolution-counter, Tach, rev-counter, RPM gauge) is an instrument measuring the rotation speed of a shaft or disk, as in a motor or other machine. The device usually displays the revolutions per minute (RPM) on a calibrated analogue dial, but digital displays are increasingly common.

2

Page 3: Tachometer using AT89S52 microcontroller with motor control

MICROCONTROLLER AND WHY MICROCONTROLLER NOT MICROPROCESSOR?A microcontroller is a single-chip microcomputer which

contains Ram , Rom , Cpu , i/o ports ,Adc and other peripherals.

It has fixed amount of Ram , Rom , i/o ports. It is also called embedded microcontroller because it is

designed for embedded systems performing specific tasks only.

Microprocessor only has cpu , Alu, stack pointer, program counter and other registers ,clock timing circuit.

Microprocessor does not have Ram, Rom and i/o ports It requires large space and it’s cost is higher as compared

to microcontroller. 3

Page 4: Tachometer using AT89S52 microcontroller with motor control

EMBEDDED SYTEMS An embedded system is a

computer system designed for specific control functions within a larger system, often with real-time computing constraints.It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today.

4

Page 5: Tachometer using AT89S52 microcontroller with motor control

WHAT WE ARE DOING ? ? ? We , in this project are measuring the RPM of

a motor using an IR sensor. The motor speed and direction is made

variable by use of a H-bridge method. RPM is shown on LCD display for the two

directions.

5

Page 6: Tachometer using AT89S52 microcontroller with motor control

WHAT WE ARE USING ? ? ? We are using an AT89S52 microcontroller for

this project A transformer for stepping down the voltage. Full wave rectifier for conversion of AC to DC. 7805 voltage regulator to give a 5v dc

voltage. An H-bridge to control the direction and speed

of motor. Two optocouplers to prevent the

microcontroller from damage by DC 9V fed to the motor.

LCD showing the RPM with direction.6

Page 7: Tachometer using AT89S52 microcontroller with motor control

SOFTWARE WE USED ? ? ? KEIL programmer IDE

SPI flash programmer

7

Page 8: Tachometer using AT89S52 microcontroller with motor control

AT89S52

Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.

It is programmable compatible with 8051 uc.

8

Page 9: Tachometer using AT89S52 microcontroller with motor control

PIN DIAGRAM

9

Page 10: Tachometer using AT89S52 microcontroller with motor control

10

Page 11: Tachometer using AT89S52 microcontroller with motor control

TOP VIEW OF OUR PROJECT

11

Page 12: Tachometer using AT89S52 microcontroller with motor control

HARDWARE IMPLEMENTATION

Transformer Full wave rectifier 7805 voltage regulator Dc motor Direction control through H bridge Speed control using PWM Speed measurement using IR SENSOR Comparator and potentiometer optoisolator LCD Circuit diagram of project 12

Page 13: Tachometer using AT89S52 microcontroller with motor control

TRANSFORMER Centre tapped transformer. 9-0-9v at the output. Rating of 1A current. It is centre tapped to have

both -ve and +ve half cycle of

AC waveform to contribute to direct current.

Transforming energy from circuit a to b by using mutual induction.

TTL logic circuitry can not work on voltage of 220v so we are step down it to 9v

13

Page 14: Tachometer using AT89S52 microcontroller with motor control

FULL WAVE RECTIFIER Converting both

polarities of input ac voltage to one of the constant polarity at its output dc current.

Yields a higher mean output voltage .

Our circuitry can only work on dc voltage.

14

Page 15: Tachometer using AT89S52 microcontroller with motor control

LM7805-VOLTAGE REGULATOR It has 5V Regulated output

voltage. Input voltage range:- 5V-18V The voltage source in circuit

may have fluctuation and would not give fixed output voltage.

Pin1-input ,Pin2-ground, Pin3-output

Heat sink is cooling device by dissipating heat into surrounding air to protect device from damage.

15

Page 16: Tachometer using AT89S52 microcontroller with motor control

SPEED CONTROL USING PWM The speed of motor depends

on three factors load , current , Voltage.

By changing the width of pulse applied to DC motor we can change the amount of power delivered to motor, there by increasing or decreasing the speed .

We create various duty cycle pulses using software.

Large duty cycle,Higher width of pulse ,higher mean voltage,higher power delivered to motor and higher speed.

Small duty cycle,Lower width of pulse,lower mean voltage ,lower speed.

16

Page 17: Tachometer using AT89S52 microcontroller with motor control

SPEED MEASUREMENT USING IR SENSOR DC motor has white and

black surface ,reflecting and non reflecting respectively.

IR sensor has emitter (LED) and collector (photodiode).

When light strikes black surface ,PN diode does not receive photon and when light strikes white surface ,PN diode receives photon.

On receiving light from white surface comparator give input pulse to uc denoting one revolution.

No receive of light from black surface ,comparator gives low pulse to uc denoting it is rotating.

17

Page 18: Tachometer using AT89S52 microcontroller with motor control

DIRECTION CONTROL THROUGH H BRIDGE

18

Page 19: Tachometer using AT89S52 microcontroller with motor control

FLOW CHART

19

Page 20: Tachometer using AT89S52 microcontroller with motor control

CIRCUIT DIAGRAM

20

Page 21: Tachometer using AT89S52 microcontroller with motor control

HOW ? ? ? Transformer steps down 220V to 9-0-9V. Full wave rectifier converts the ac into dc. 7805 voltage regulator regulates the voltage

to 5V, which is the operating voltage of our microcontroller.

LCD is interfaced with microcontroller. IR sensor is used to count the RPM. It consists

of an emitter and a receiver. The second input terminal of photodiode is connected to a comparator which is fed to the microcontroller.

Crystal (12MHz) is used to generate a stable clock signal for the microcontroller. Duty cycle is varied so as to change the speed of motor. 21

Page 22: Tachometer using AT89S52 microcontroller with motor control

HOW ? ? ? Pin 9 is used as the reset circuit pin. Optocoupler is used to prevent damage from

9V DC as the operating voltage of uc is only 5V.

LEDS are used to indicate the supply, direction of rotation of motor & sensing the shiny surface on motor.

There’s a shiny patch on motor wheel over which the reflection takes place everywhere else it would be absorbed (black)

Code is burnt on the controller using SPI programmer.

22

Page 23: Tachometer using AT89S52 microcontroller with motor control

DC MOTOR & IR SENSOR

Silvery patch used for reflection

IR sensor23

Page 24: Tachometer using AT89S52 microcontroller with motor control

LCD PICTURES FROM OUR PROJECT

24

Page 25: Tachometer using AT89S52 microcontroller with motor control

APPLICATIONS To measure the rotating speed of disk or

shaft. To show rate of rotation of engine crankshaft

on cars ,aircrafts and other vehicles. To help the drivers in selecting appropriate

throttle and gear settings for the driving conditions.

To estimate traffic speed and volume flow in vehicles.

In analog audio recording ,it is used to measure the speed of audiotape.

25

Page 26: Tachometer using AT89S52 microcontroller with motor control

The main limitation of this project is that the IR sensor we are using for measuring RPM needs to be kept very close (< 1 inch) to the moving object, hence its practical use can become a bit limited.

26

Page 27: Tachometer using AT89S52 microcontroller with motor control

The project we have made is less expensive and it can replace the costly RPM measuring instruments. It can measure the RPM of any motor without any physical contact with it. It can also display the rotator speed of any motor with the help of microcontroller. It can measure the efficiency of any motor and determine which will be beneficial and better compatible with our system. It can also check whether any motor is properly running or not .IR senor needs to be at a very close distance from the motor, we can make use of a sensor to increase its range.

27

Page 28: Tachometer using AT89S52 microcontroller with motor control

Any Queries ? ? ?

28