Top Banner
Final Year Project Report Microcontroller Based Floor Cleaning Robot Using Suction Principle B.S Electronics Engineering, Batch 2007 Internal Adviser Mr. Khawaja Masood Ahmed Lecturer Electronic Engineering Department SSUET Submitted by Haris Asif Saeed 2007-EE-514 Mohammed Anas Ali Kan 2007-EE-521 Adil Raza 2007-EE-522 Syed Mustafa Haider Zaidi 2007-EE-542 Shahzaib Siddiqui 2007-EE-564 Aftab Ahmed Wagho 2007-EE-565 Department of Electronic Engineering Sir Syed University Of Engineering and Technology University Road, Karachi – 75300
180

FYP reportl

Dec 26, 2014

Download

Documents

engr haris

cleaning robot
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: FYP reportl

Final Year Project Report

Microcontroller Based Floor Cleaning Robot Using Suction Principle

B.S Electronics Engineering, Batch 2007

Internal Adviser Mr. Khawaja Masood Ahmed Lecturer Electronic Engineering Department SSUET Submitted by Haris Asif Saeed 2007-EE-514

Mohammed Anas Ali Kan 2007-EE-521

Adil Raza 2007-EE-522

Syed Mustafa Haider Zaidi 2007-EE-542

Shahzaib Siddiqui 2007-EE-564

Aftab Ahmed Wagho 2007-EE-565

Department of Electronic Engineering

Sir Syed University Of Engineering and Technology University Road, Karachi – 75300

Page 2: FYP reportl

Dedication

This project is dedicated to our parents with Love and Respect, who brought us

to level of excellence where we all stand today looking for the most promising

future ahead for which they have sacrificed there past.

Page 3: FYP reportl

PREFACE

The objective to create this sort of Robot is to reduce the human

involvements in the cleaning procedure. As we are aware that to work continually

in the dusty environment will increase the Disease like Tuberculoses, Asthma

and many types of High Degree of skin Allergies to the People.

Human Resources Management is the second crucial issue in the industry. If we

consider only Subcontinent’s major countries including Pakistan, India and

Bangladesh the majority of the people are uneducated and due to this reason

they cannot perform their duties according to the instructions of HR. Department.

We will try to design a Robot, which will reduce the above-mentioned problems

and will perform the Task according to the pre-programmed instruction.

Operation and maintenance will be easy because we have the plan to use locally

available components in our design. Basically in our project we are providing fast

and easy way of cleaning large areas without human effort solution needed for

today’s affected hygienic environment through the use of “Cleaning Robots”. This

system is suited for smaller areas as well as large organization.

The working of robot is designed in such a way that will not effect by the

presence of public in cleaning area i.e. different sensors interfaced in it will sense

the public density and robot will not strike with pedestrians.

Page 4: FYP reportl

The Summary of the chapters as follows:

Chapter 1 contains the brief introduction and ideological background of the Floor

Cleaning Robot.

Chapter 2 contains the complete system and requirements of the Project.

Chapter 3 contains description of the hardware components, which we used in

our project.

Chapter 4 contains the description of the software, which we used for developing

the project.

Chapter 5 contains the complete working of the project.

Page 5: FYP reportl

ACKNOWLEDGMENT

In the name of ALLAH, the most beneficent and merciful, innumerable thanks for

his grace, this give us a bit of knowledge from the ocean of knowledge and

provides us the means, strength and divine help in completion of final year

project and completion of project report titled as Microcontroller Based Floor

Cleaning Robot Using Suction Principle. At the beginning we would like to

thank all those people who helped us and guided us, so that we could complete

this on time. We are grateful to Mr. Khawaja Masood Ahmed, Lecturer,

Department of Electronic Engineering, Sir Syed University of Engineering and

Technology, Karachi. He is an internal advisor who motivated and directed us in

a very appropriate direction to give this project a proper shape. Further more we

are thankful to our parents whose love and encouragement was the motive

behind the completion of the project. Finally we are thankful to all those who

cared to answer our queries and send us relevant concerning the project that

proves very useful and informative.

Group Members

Page 6: FYP reportl

CERTIFICATE

This is to certify that the following students Haris Asif Saeed 2007-EE-514

Mohammed Anas Ali Kan 2007-EE-521

Adil Raza 2007-EE-522

Syed Mustafa Haider Zaidi 2007-EE-542

Shahzaib Siddiqui 2007-EE-564

Aftab Ahmed Wagho 2007-EE-565

Of Electronic Engineering Department Batch 2007 have submitted the

Final Year Report on “Microcontroller Based Floor Cleaning Robot Using

Suction Principle” to the Department of Electronic Engineering, Sir Syed

University of Engineering and Technology, Karachi for partial fulfillment of the

requirements of the Degree of bachelor of Engineering, assigned to them as

prescribed by Sir Syed University of Engineering and Technology, Karachi.

Mr. Khawaja Masood Ahmed

Internal Advisor

Lecturer

Electronic Engineering Department

SSUET, Karachi

Page 7: FYP reportl

CERTIFICATE

This is to certify that the following students Haris Asif Saeed 2007-EE-514

Mohammed Anas Ali Kan 2007-EE-521

Adil Raza 2007-EE-522

Syed Mustafa Haider Zaidi 2007-EE-542

Shahzaib Siddiqui 2007-EE-564

Aftab Ahmed Wagho 2007-EE-565

Of Electronic Engineering Department Batch 2007 have submitted the

Final Year Report on “Microcontroller Based Floor Cleaning Robot Using

Suction Principle” to the Department of Electronic Engineering, Sir Syed

University of Engineering and Technology, Karachi for partial fulfillment of the

requirements of the Degree of bachelor of Engineering, assigned to them as

prescribed by Sir Syed University of Engineering and Technology, Karachi.

Mr. Bilal Alvi

Chairman

Electronic Engineering Department

SSUET, Karachi

Page 8: FYP reportl

Final Year Project Report

Microcontroller Based Floor Cleaning Robot Using Suction Principle

B.S Electronics Engineering, Batch 2007

Submitted by Haris Asif Saeed 2007-EE-514

Mohammed Anas Ali Kan 2007-EE-521

Adil Raza 2007-EE-522

Syed Mustafa Haider Zaidi 2007-EE-542

Shahzaib Siddiqui 2007-EE-564

Aftab Ahmed Wagho 2007-EE-565 Project Internal Advisor Mr. Khawaja Masood Ahmed

Internal Advisor

Lecturer

Electronic Engineering Department

SSUET

The Department of Electronic Engineering, Sir Syed University of Engineering

and Technology, Karachi has approved this Final Year Project. The project is

submitted in partial fulfillment of the requirements of the Degree of bachelor of

Science Engineering

Committee Members

Project Advisor Mr. Khawaja Masood Ahmed

Chairman of Electronic Engineering Department Mr. Bilal Alvi

Page 9: FYP reportl

SYNOPSIS

In Pakistan the cleaning of dust is still been done by the help of human, which is

very harmful for them, several diseases like Tuberculoses, Asthma and many

types of High Degree of skin Allergies to the People. If we consider only

Subcontinent’s major countries including Pakistan, India and Bangladesh the

majority of the people are uneducated and due to this reason they cannot

perform their duties according to the instructions of HR. Department, they also

work in unhygienic condition which is the third biggest flaw of human involvement

in the cleaning industry. So we should replace the humans for cleaning purpose.

Keeping this in view we have introduced “Microcontroller Based Floor Cleaning Robot Using Suction Principle” a robot which will reduce the

above mentioned problems and perform the tasks according to the

preprogrammed instructions. Operation and maintenance will be easy because

we have the plan to use locally available components in our design.

In our project we are providing fast and easy way of cleaning large

areas without human efforts solution needed for today’s hygienic environment

through the use of “Microcontroller Based Floor Cleaning Robot Using Suction Principle”. This system is suited for smaller areas as well as large

organization.

The system is not affected by the presence of public in cleaning

area i.e. different sensors interfaced in it will sense the public density and robot

will not stricken with pedestrians.

This system reduces manpower and few peoples are required to

control such a large area. These robots are not only useful for large areas but

also used for domestic purpose, these can be easily marketed. Another

advantages of this system is that we are using commonly used and easily

programmable controllers and components which are available in market.

Page 10: FYP reportl

TABLE OF CONTENTS

TITLE PAGE NO.

Chapter 1:

Ideological Background

1.1 What Is Janitor?…………………………………………………………1

1.2 Occupational Task………………………………………………………2

1.3 Outsourcing..…………………………………………………………….3

1.4 Median salaries per employee…………………………………………4

1.5 Effect’s on Janitor’s health……………………………………………..4

1.5.1 Prevalence……………………………………………………….5

1.5.2 Causes……………………………………………………………6

1.6 Prevention………………………………………………………………..7

1.7 Risk’s Of Janitors………………………………………………………..9

Chapter 2:

Detailed System Explanation

2.1 Introduction……………………………………………………………..10

2.2 Main Components……………………………………………………..11

2.3 Connections…………………………………………………………….12

2.3.1 Connections of Vacuum Unit…………………………………12

2.3.2 Connections of Remote Unit………………………………….12

2.4 Operations……………………………………………………………...13

2.4.1 Manual Operation……………………………………………...13

Page 11: FYP reportl

2.4.2 Automatic Operation…………………………………………..14

2.5 H-Bridge Relay Configuration………………………………………...15

2.6 Programming Of A Robot……………………………………………..19

2.7 Block Diagram………………………………………………………….20

Chapter 3:

Hardware Description Of System

3.1 Introduction………………..……………………………………………………21

3.2 Microcontroller 89C52…………………………………………………………22

3.2.1 History………………………………………………..…………22

3.2.2 Embedded Design……………………………………………..23

3.2.3 Interrupts………………………………………………………..23

3.2.4 ATMEL AT89…………………………………………………...24

3.2.4.1 Port Structure and Operation……………………………..24

3.3 Relays…………………………………………………………………………..25

3.3.1 Operation……………………………………………………….25

3.3.2 Types Of Relay………………………………………………...26

3.4 Sensors…………………………………………………………………………27

3.4.1 Types Of Sensors……………………………………………...27

3.4.2 Infra-Red………………………………………………………..28

3.4.2.1 Infra-Red Sensor…………………………………………..28

3.4.2.2 Design 1…………………………………………………….30

3.4.2.3 Design 2…………………………………………………….32

Page 12: FYP reportl

3.4.2.4 Components Positioning………………………………….35

3.4.3 Sonar …………………………………………………………...36

3.4.3.1 How Sonar Works………………………………………….37

3.4.3.2 Calculating Distance Vs Time…………………………….37

3.4.3.3 Power Requirements………………………………………38

3.4.3.4 Range……………………………………………………….38

3.4.3.5 Sound Reflectance………………………………………...39

3.4.3.6 Multiple Sonar……………………………………………...40

3.5 LCD Display…………………………………………………………………….41

3.5.1 Overview………………………………………………………..41

3.5.2 Specifications…………………………………………………..42

3.5.3 Color Display…………………………………………………...43

3.6 Micro Switches…………………………………………………………………44

3.7 Buzzer…………………………………………………………………………..45

3.8 Vacuum Pump………………………………………………………………….46

3.8.1 Types……………………………………………………………47

3.9 D.C Motor……………………………………………………………………….51

3.9.1 Working Of D.C Motor…………………………………………51

Page 13: FYP reportl

Chapter 4:

Software Selection

4.1 Introduction……………………………………………………………………..52

4.2 Kiel µVision……………………………………………………………………..53

4.2.1 Object File………………………………………………………53

4.2.2 Source File Drive………………………………………………53

4.3 ORCAD…………………………………………………………………………54

4.3.1 ORCAD Capture SIS………………………………………….54

4.3.2 Capture SIS Option……………………………………………55

4.4 XELTIC………………………………………………………………………….56 4.5 PROTEUS………………………………………………………………………61

Chapter 5:

Overall Operation Of System

5.1 Introduction……………………………………………………………………..62

5.2 Rotation Of D.C Motor………………………………………………………...63

5.2.1 Poles Of D.C Motor……………………………………………63

5.2.2 Description……………………………………………………...65

5.2.3 The Commutating Plane………………………………………68

5.2.3.1 Compensating for Stator Field……………………………69

5.3 Avoidance Sensor……………………………………………………………..70

5.3.1 Working…………………………………………………………70

5.4 Battery Chargeable……………………………………………………………70

5.4.1 Charging And Discharging Of Battery……………………….71

Page 14: FYP reportl

5.4.2 Battery Charger………………………………………………..71

5.4.3 Reverse Charging……………………………………………..71

Page 15: FYP reportl

List Of Component

Project Coding

Flow Chart

Schematic Diagram

Application Of The Project

Discussion & Future Recommendation

Work Load Distribution

Appendices

A Cost & Time Analysis

B Data Sheets

References

Page 16: FYP reportl

CHAPTER # 1 µC-FCR

CHAPTER # 1

IDEOLOGICAL BACKGROUND

Page 17: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

BACKGROUND OF THE PROJECT:

1.1 What is janitor?

A janitor is a person who takes care of a building such as a school, office

building or an apartment block. Janitors are responsible primarily for cleaning

and often some office maintenance and security.

Janitor is derived from the Latin word `Janus‘ meaning door keeper (building

superintendent). A female janitor was formerly called janitress (The title

custodian is sometimes given to janitors merely as a term of higher respect,

generally speaking, custodians tend to have higher salaries and more

responsibilities. They may also be required to receive training and licensing in

various fields [e.g. Hazmat, CPR, Boiler operations, etc] depending on their

employer and specific nature of the job. IN this respect a custodian may be

considered to be different from a janitor. In some settings janitors are called

housekeepers or housekeeping staff and in others they are referred to as

maintenance staff. Institutions have also come up with a number of politically

• Porter

• Custodial technician

• Sanitation Supervisor

• Environmental Service Associate

• Care Taker

• General Cleaner

• Physical Plant and Planning

Page 18: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.2 Occupational Tasks:

Typical janitorial work often consists of following tasks:

• Cleaning bathrooms

• Cleaning floors

• Emptying trash and recycling bin

• Cleaning carpeting

• Cleaning steel and other special surfaces

• Stripping and waxing floors

• Locking and unlocking building at beginning and end of the day

Page 19: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.3 Outsourcing:

Cleaning is one of the most commonly outsourced services. Some of the

reasons for this include :

• Basic cleaning tasks are standardized, with little variation among different

enterprises.

• The nature of job and required standard of performance can be clearly

defined and specified in a contract, unlike more technical and professional

jobs for which such specification is hard to develop.

• Many organizations which prominently employ higher paid workers feel

uncomfortable dealing with labor relations with low paid employs; by out

sourcing these labor relations issues are transferred to contractor whose

staff are comfortable and experienced in dealing with these issues, and

their approach can benefit from economy of scale.

If a cleaner is unavailable due to sickness or leave a contractor which employs many cleaner can easily assigned a substitute .A small organization will have much trouble doing so.

Page 20: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.4 Median salaries per employer type(US):

School – US$ 22,200

Hospital – US$ 24,000

Non-profit organizations – US$ 16,280

Federal government – US$ 30,000

College/University - US$ 29,000

McDonald’s – US$ 16,000

1.5 Effects on Janitor’s health: The most frequent health effects on janitors associated with cleaning is

diseases of asthma. Occupational asthma is generally defined as lung disorder

caused by inhaling fumes , gasses, dust or other potentially harmful substances

while `on the job.’ With occupational asthma symptoms of asthma may develop

in a previously healthy worker or childhood asthma that will reoccur due to this

exposure. In another case of work related asthma, preexisting may be

aggravated by exposure within the work place.

Chronic inflammatory disorder of the air ways that result In

• Wheezing

• Coughing

• Chest tightness

Inflammation makes the airways sensitive to allergens, chemical irritants,

tobacco smoke, cold air and exercise.

Page 21: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

Other associated symptoms may include runny nose, nasal congestion

and eye irritation. The cause may be allergic or non-allergic in nature, and the

disease last for lengthy period in some workers, even if they are no longer

exposed to the agents that cause these symptoms. Commonly the symptoms

worsen through work week, improves on the weekend and reoccur when the

worker returns to the job. Less frequently, an accident at work involving a high

exposure to irritating fumes or dust may cause asthma.

In many cases, a previous personal or family history of allergies will make

the person more likely to develop occupational asthma. However many

individuals who no such history still will develop this disease, if exposed to

conditions that trigger it. Workers who smoke have greater risk to develop this

disease following some occupational exposure. The length of occupational

exposure that triggers asthma varies, and can range from moths to years before

symptoms occur. An accidental exposure can cause symptoms within 24 hours.

Many workers with persistent asthma symptoms caused by substances are

incorrectly diagnosed as having bronchitis. If occupational asthma is not

diagnosed earlier permanent lung changes will occur and the symptoms may

persist without exposure.

1.5.1 Prevalence: Occupational asthma has become the most prevalent lung disease In

developed countries. However, the exact proportion of newly diagnosed cases of

asthma in adults due to occupational asthma is unknown. Up to 15% of asthma

cases in US may have job related factors. The incidence of occupational asthma varies within individual industries. For

example in detergent industry, inhalation of a particular enzyme used to produce

washing powder has led t develop respiratory symptoms .About 5% of workers

with laboratory animals or with powdered natural rubber latex gloves have

developed occupational asthma .Isocyanides are chemicals that are widely used

in many industries ,including spray painting ,insulations and in manufacturing

plastics ,rubber and foam. These chemicals can cause asthma in up to 10% of

exposed workers.

Page 22: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.5.2 Causes: Occupational asthma can be caused by one of the three mechanisms.

These include:

Direct irritant effect-irritants that provoke disease include hydrochloric

acid, sulfur dioxide or ammonia, which is found in petroleum and chemical

industries. Workers exposed the substances will frequently begin wheezing and

other symptoms immediately after exposure. This is an irritant reaction rather

than allergic reaction, since it does not involve immune system. Workers who

already have asthma or lung disorder are particularly affected by this exposure.

Allergy (long term exposure)-Allergies play role in many cases of disease.

This type of asthma is only caused by long-term exposure to a work related

substance. This is because body immune system needs time to develop allergic

anti bodies and other immune responses to a particular substance for example

workers in detergent industries may develop allergy to enzymes of bacteria

Bacillus Subtilis, and the workers in food processing industries develop allergies

to castor beans, green coffee beans and papain. The disease can also develop

in workers of plastic, rubber or resin industries following repeated exposure to

chemical molecules in air. Veterinarians, fishermen and animal handlers in

laborites may also develop allergies to animal proteins.

Pharmacologic mechanism-inhalation in aerosol can directly lead to

accumulation of natural occurring chemicals such as histamine and acetylcholine

within the lung which in turn lead to asthma. For example insecticides used for

agriculture work can cause a buildup of acetylcholine, which causes airway

muscle to contract there by constricting airways.

See the accompanying table for common occupational substances that

cause asthma or trigger temporary aggravation of asthma that was previously

present.

Page 23: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.6 Prevention: Once the cause is identified exposure should be reduced, for instance a

worker should be moved to another job within the plant. Employers might

consider prescreening potential employs with lung function tests and then

continue to check for symptoms after certain periods on the job once the worker

has been hired to ensure he or she has not developed asthma. Work areas

should be closely monitored so that asthma causing substances are kept at

minimum level.

Individuals with occupational asthma should see there allergist for an

evaluation. In some cases , pretreatment with specific medication to counteract

the effects of workplace substances may be helpful. In other cases permanent

avoidance may be necessary.

Page 24: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

Common substances that cause occupational asthma:

SUBSTANCES WORKERS AT RISK

Acrylate Adhesive handlers

Amines Shellac and lacquer handlers

Anhydrides Users of plastic ,epoxy resins

Animal proteins Animal handlers ,farmers

Cereal grains Bakers, millers

Chloramine-T Janitors

Drugs/Medicines Pharmaceutical worker

Dyes Textile workers

Enzymes Detergent workers ,bakers

Fluxes Electronic workers

Formaldehyde, gluterldehyde Hospital staff

Gums Carpet makers, pharmaceuticals

Isocyanides Plastic ,foam ,rubber ,insolation, paint factory workers

Latex Health care professionals

Metals Solderers , refiners ,printers

Pre sulfate Hair dressers

Sea food Sea food processors

Wood dust Forest workers ,carpenters

Pesticides, fertilizers Farmers ,grain workers

Page 25: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

1.7 What janitors have to risk?

Product type Hazardous ingredients

How these can harm you

Glass cleaner

General purpose

cleaner

Carpet spot remover

A solvent called

Butoxyethanol

The chemical is

absorbed by the skin

and can affect blood,

liver and kidney. The

use of gloves is

recommended.

Toilet cleaner Hydrochloric acid

Phosphoric acid

These are very good in

removing hard water

rings, but can burn

eyes in seconds. The

use of gloves and

goggles is highly

recommended.

Oven cleaner

Heavy duty degreaser Sodium hydroxide

Oven cleaning spray

can be very convenient

but dangerous. it can

burn eyes and its

vapors can effect

lungs. Use it in fresh air

wearing gloves and

goggles.

Page 26: FYP reportl

IDEOLOGICAL BACKGROUND µC-FCR

CONCLUTION OF CHAPTER It contains all the necessary information and theoretical background at the janitor

robot and janitors. How they work and how the dust damages their health.

Several disease can attack janitors. So for the protection of human health we

designed an automatic system that can clean the surface without blowing dust

and effecting human health.

Page 27: FYP reportl

CHAPTER # 2 µC-FCR

CHAPTER # 2

OVERALL SYSTEM EXPLANATION

Page 28: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.1 Introduction:

Our project “Microcontroller Based Floor Cleaning Robot Using Suction Principal” containing 3 main drive motors for locomotion. And Vacuum

pump, Sensing and collision avoidance will be provided through different

sensors. All the system will be powered through Batteries. Control Function will

be provided through 89C52 MCU.

89C52 MCU will be worked as a brain of the Robot. All the motions of

robot will be controlled by 89C52. Full 90 degree in horizontal plane is achieved.

Once all the parameters are set operations fully automatic. Mean set of rotation

and angle of inclination to clean the surface and object will be automatically

done. Now again repeat the procedure to clean the place through full degree

turn.

Page 29: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.2 Main Components:

The main components in circuit are micro controller, Relays, IR & Sonar

Sensors, RF module, LCD. 89C52 is heart of circuit which perform all the

required tasks like

• Accepts input from user through Remote unit.

• Generates indication on LCD panel.

• Generate suitable signals to energize or de energizes all relays to run

different motors.

Page 30: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.3 CONNECTIONS:

2.3.1 CONNECTION OF VACUUME UNIT:

We use all the ports of micro-controller 89C52. Two for input & two for

output.

PORT “0”: Five pins of port “0” are connected to TRW module through which it takes

input of remote unit

PORT “1”:

Port 1 is configured as output port; all pins are connected to LCD panel.

PORT “2”: Port 2 is configured as output port; all pins are connected to relays to drive

DC MOTORS

PORT “3”: Port 3 is configured as input port that takes input from different sensors.

2.3.2 CONNECTION OF REMOTE UNIT: PORT “0”:

Port “0” is configured as output port, five pins are connected to TRW

transceiver and 1 pin is connected to Buzzer.

PORT “1”: Port 1 is configured as output port and all pin s are connected to LCD panel

PORT “2” AND PORT “3”: Port 2 and 3 are configured as an input port. All pins are connected to ground

through push buttons switches S1 to S10. Use to provide input instruction to

vacuum unit.

Page 31: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.4 OPERATIONS: 2.4.1 MANNUAL OPERATION:

AS shown above the controller takes care of all the require tasks. The

program written in it will do required job. First thing is to detect key press and

then perform required task.10 different keys are used here for 10 different task.

Please refer the table

Switch Function

SW1 Pump ON/OFF

SW2 Forward

SW3 Reverse

SW4 Right

SW5 Left

SW6 Restart

SW7 ON/OFF

SW8 START OPERATION

Page 32: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.4.2 AUTOMATIC OPERATION: The robot will use suction pumps to suck the dust and cleans floor. The

robot is programmed to sense the direction of a collision with an obstacle using

sensors. If the robotic vacuum hits an object head-on, it backs up and changes

direction. If an obstacle is hit at an off-angle, the robotic vacuum turns away from

the direction of the impact. The robotic vacuum’s movement is based upon a

random walk around a room, which theoretically will cover the entire area of a

room given enough time. The robot is programmed to drive straight until an

obstacle is hit. At that point, it will turn and continue driving straight until another

obstacle is hit, and so on.

Page 33: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.5 H BRIDGE RELAY CONFIGURATION:

H-bridge:

Structure of an H-bridge (highlighted in red)

An H-bridge is an electronic circuit that enables a voltage to be applied

across a load in either direction. These circuits are often used in robotics and

other applications to allow DC motors to run forwards and backwards. H-bridges

are available as integrated circuits, or can be built from discrete components.

General:

The term "H-bridge" is derived from the typical graphical representation of such a

circuit. An H-bridge is built with four switches (solid-state or mechanical). When

the switches S1 and S4 (according to the first figure) are closed (and S2 and S3

are open) a positive voltage will be applied across the motor. By opening S1 and

S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing

reverse operation of the motor.

Using the nomenclature above, the switches S1 and S2 should never be closed

at the same time, as this would cause a short circuit on the input voltage source.

The same applies to the switches S3 and S4. This condition is known as shoot-

through.

Page 34: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

Operation:

The two basic states of an H-bridge.

The H-Bridge arrangement is generally used to reverse the polarity of the

motor, but can also be used to 'brake' the motor, where the motor comes to a

sudden stop, as the motor's terminals are shorted, or to let the motor 'free run' to

a stop, as the motor is effectively disconnected from the circuit. The following

table summarizes operation.

S1 S2 S3 S4 Result

1 0 0 1 Motor moves right

0 1 1 0 Motor moves left

0 0 0 0 Motor free runs

0 1 0 1 Motor brakes

1 0 1 0 Motor brakes

Page 35: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

Construction:

Typical solid state H-bridge

A solid-state H-bridge is typically constructed using reverse polarity

devices (i.e., PNP BJT or P-channel MOSFET connected to the high voltage bus

and NPN BJT or N-channel MOSFET connected to the low voltage bus).

The most efficient MOSFET designs use N-channel MOSFET on both the

high side and low side because they typically have a third of the ON resistance of

P-channel MOSFET. This requires a more complex design since the gates of the

high side MOSFET must be driven positive with respect to the DC supply rail.

However, many integrated circuit MOSFET drivers include a charge pump within

the device to achieve this.

Alternatively, a switch-mode DC-DC converter can be used to provide

isolated ('floating') supplies to the gate drive circuitry. A multiple-output fly back

converter is well-suited to this application.

Another method for driving MOSFET-bridges is the use of a specialized

transformer known as a GDT (Gate Drive Transformer), which gives the isolated

outputs for driving the upper FET gates. The transformer core is usually a ferrite

toroid, with 1:1 or 4:9 winding ratio. However, this method can only be used with

high frequency signals. The design of the transformer is also very important, as

the leakage inductance should be minimized, or cross conduction may occur.

Page 36: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

The outputs of the transformer also need to be usually clamped by zener diodes,

because high voltage spikes could destroy the MOSFET gates.

A common variation of this circuit uses just the two transistors on one side

of the load, similar to a class AB amplifier. Such a configuration is called a "half

bridge". The half bridge is used in some switched-mode power supplies that use

synchronous rectifiers and in switching amplifiers. The half H-bridge type is

commonly abbreviated to "Half-H" to distinguish it from full ("Full-H") H-bridges.

Another common variation, adding a third 'leg' to the bridge, creates a 3-phase

inverter. The 3-phase inverter is the core of any AC motor drive.

A further variation is the half-controlled bridge, where one of the high- and

low-side switching devices (on opposite sides of the bridge) are replaced with

diodes. This eliminates the shoot-through failure mode, and is commonly used to

drive variable/switched reluctance machines and actuators where bi-directional

current flow is not required.

A "double pole double throw" relay can generally achieve the

same electrical functionality as an H-bridge (considering the usual

function of the device). An H-bridge would be preferable to the relay

where a smaller physical size, high speed switching, or low driving

voltage is needed, or where the wearing out of mechanical parts is

undesirable.

Page 37: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.6 PROGRAMING OF A ROBOT: The robot is programmed to sense the direction of a collision with an

obstacle using IR sensors Pair. If the robotic vacuum hits an object head on, it

back up and changes direction. If an obstacle is hit at an off-angle, the robotic

vacuum turns away from the direction of the impact. The robotic vacuums

movement is based upon a random walk around a room, which theoretically will

cover the entire area of a room given enough time. The robot is programmed to

drive straight until an obstacle is hit.

At that point, it will turn and continue driving straight until another obstacle is hit,

and so on.

Because we have used Dc motors for our robot, it is theoretically possible

to determine the distance traveled by each wheel and perform room size

calculations, which could have been inputted to an algorithm to better cover the

room. However, we discovered a torque problem when we realized that the

wheels sometime slip on the smooth surface, and other times do not move at all.

Because of the torque inconsistencies, proper distance determination would not

have been possible, as our only option covering an entire room was to use a

random walk in which the robotic vacuum collides with an obstacle and heads off

in a different direction until the room is cleaned.

Page 38: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

2.7 BLOCK DIAGRAM: A Block diagram of entire system is shown in the figure below, followed by the

description of the Components.

Vacuum Cleaner

RF Module

MOTORS

ADC

MAX Sonar Range finder

Vacuum PUMP

RELAY Relay H-Bridge

RF MODULE

Remote Switch

Micro-Controller ATMEL 89C51

IR-Sensors Object Detector

Micro-Controller

LCD

Display

Page 39: FYP reportl

OVERALL SYSTEM EXPLANATION µC-FCR

CONCLUSION OF CHAPTER

This chapter defines the complete system and requirements of the project. It

defines all the main components that are involved in our project. The brain of our

project is microcontroller. This chapter includes all necessary information

regarding to the components and the specification of components. It also defines

the circuit diagram of the driver circuit as well as the main block diagram of our

Project.

Page 40: FYP reportl

CHAPTER # 3 µC-FCR

CHAPTER # 3

HARDWARE DISCRIPTION OF SYSTEM

Page 41: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

DISCRIPTION OF COMPONENTS:

3.1 Introduction: For our project we need variety of components for completion. The

essential components for developing the project are explained here:

89C52 Micro controller

Relays

Sensors

LCD Display

Micro Switches

Buzzer

Vacuum Pump

D.C Motors

Page 42: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.2 Microcontroller 89C52 : 3.2.1 History:

Microcontroller have existed from the very early years of the

microprocessor revolution. The first single chip Microcontroller was the 4 bit Intel

4004 released in 1971. The following year saw the first 8-bit microprocessor, the

8008 and the 8080 in 1974. Released in 1975, the first Microcontroller was the

Intel 8048 featuring RAM and ROM on the same chip, and was used in several

successful commercial products.

The popularity of microcontroller increased when EEPROM memory was

incorporated to replace one time programmable PROM memory. With EEPROM,

the development cycle of programming, testing and erasing a port could be

repeated many times with the same part until the firmware was debugged and

ready for production use. A microcontroller (also MCU or µC) is a functional

computer system-on-a-chip. It contains a processor core, memory and

programmable input/output peripherals. Microcontroller include an integrated

CPU, memory (a small amount o RAM, program memory or both) and

peripherals capable of input and output. It emphasizes high integration, in

contrast to a microprocessor which only contains a CPU (the kind used in a PC).

In addition to the usual arithmetic and logic elements of a general purpose

microprocessor, the microcontroller integrates additional elements such as read-

write memory for data storage, read-only memory for program storage, Flash

memory for permanent data storage, peripherals, and input/output interfaces. At

clock speed of as little as 32KHz, microcontroller often operate at very low speed

compared to microprocessors.

Page 43: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.2.2 Embedded Design:

The majority of computer systems in use today are embedded in other

machinery, such as automobiles, telephones, appliances and peripherals for

computer systems. These are called embedded systems. While some embedded

systems are very sophisticated, many have minimal requirements for money and

program length, with no operating system, and low software complexity. Typical

input and output devices include switches, relays, solenoids, LEDs, small or

custom LCD displays, radio frequencies devices and sensors for data such as

temperature, humidity, light level etc. Embedded systems usually have no

keyboards, screen, disks, printers, or other recognizable I/O Devices of a

personal Computer, and may lack human interaction device of any kind.

3.2.3 Interrupts:

It is mandatory that Microcontroller provide real time response to events in

the embedded systems they are controlling. When certain events occur, an

interrupt system can signal the processor to suspend processing the current

instruction sequence and to begin an interrupt service routine (ISR). The ISR will

perform any processing required based on the source of the interrupts before

returning to the original instruction sequence. Possible interrupt sources are

device dependent, and often include events such as an internal timer overflow,

an analog to digital conversation, a logic level change on an input such as from a

button being pressed, and data received on a communication link. Where power

consumption is important as in battery operated devices, interrupts ma also wake

a microcontroller from a low power sleep state where the processor is halted until

required to do something by a peripheral events.

Page 44: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.2.4 Atmel AT89:

The Atmel AT89 series is an Intel 8051-compatible family of 8 bit

microcontrollers (µCs) manufactured by the Atmel Corporation.

Based on the Intel 8051 core, the AT89 series remains very popular as general-

purpose microcontrollers, due to their industry standers instruction set, and low

unit cost. This allows a great amount of legacy code to be reused without

modification in new application. While considerably less powerful than the newer

AT90 series of AVT RISC microcontrollers, new product development has

continued with the AT89 series for the aforementioned advantages.

3.2.4.1 Port Structure and Operation:

All four ports in the AT89C51 and AT89C52 are bi-directional. Each

consists of a latch (Special Function Register P0 through P3), an output driver

and an Input buffer. The output drivers of Port 0 and Port 2, and the Input buffer

of Port 0, are used in accesses to external memory. In this application, Port 0

output the low byte of the external memory address, time-multiplexed with the

byte being written or read. Port 2 outputs the high byte of the external memory

address when the address is 16 bits wide. Otherwise the Port 2 pins continue to

emit the P2 SFR content. All the Port 3 pins and two Port 1 pins(in the AT89C52)

are multifunctional. The alternate functions can only be activated if the

corresponding bit latch in the Port SFR contains a 1. otherwise the Port pin is

stuck at 0.

Page 45: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.3 Relays:

A relay is an electrical switch that opens and closes under the control of

another electrical circuit. In the original form, the switch is operated by an

electromagnet to open or close one or many sets of contacts. Joseph Henry

invented it in 1835. Because a relay is able to control an output circuit of higher

power than the input circuit, it can be considered to be in broad sense, a form of

an electrical amplifier.

3.3.1 Operation:

When there is a current through the coil, the resulting magnetic field

attracts an armature that is mechanically linked to a moving contact. The

movement either makes or breaks a connection with a fixed contact. When the

current to the coil is switched off, a force approximately half as strong as the

magnetic force returns the armature to its relaxed position. Usually this is a

spring, bur gravity is also used commonly in industrial motor starters. Most relays

are manufactured to operate quickly. In a low voltage application, this is to

reduce noise. In a high voltage or high current application, this is to reduce

arcing.

If the coil is energized with DC, a diode is frequently installed across the

coil, to dissipate the energy from the collapsing magnetic field at deactivation,

which would otherwise generate a spike of voltage and might cause damage to

circuit components. Some automotive relays already include that diode inside the

relay case. Alternatively a contact protection network, consisting of a contractor

and resistor in series, may absorb the surge. If the coil is designed to be

energized with AC, a small copper ring can be crimped to the end of the

solenoid. This “shading ring” creates a small out-of-phase current, which

increases the minimum pull on the armature during the AC cycle.

Page 46: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.3.2 Types Of Relays:

Latching Relay

Reed Relay

Polarized Relay

Contractor Relay

Machine-Tool Relay

Solid State Relay

Page 47: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4 Sensor:

A sensor is a device that measures a physical quantity and converts it

into a signal, which can be read by an observer or by an instrument. For

example, a mercury thermometer converts the measured temperature into

expansion and contraction of a liquid which can be read on a calibrated glass

tube. A thermocouple converts temperature to an output voltage, which can be

read by a voltmeter. For accuracy, all sensors need to be calibrated against

known standards.

Sensors are used in everyday objects such as touch-sensitive elevator

buttons and lamps which dim or brighten by touching the base. There are also

innumerable applications for sensors of which most people are never aware.

Applications include cars, machines, aerospace, medicines, manufacturing and

robotics.

A sensor’s sensitivity indicates how much the sensor’s output changes

when the measured quantity changes. For instance, if the mercury in a

thermometer moves 1 cm when the temperature changes by 1 oC, the sensitivity

is 1cm/ oC. Sensors that measure very small changes must have very high

sensitivities.

3.4.1 Types Of Sensors: Thermal

Electromagnetic

Mechanical

Chemical

Optical Radiation

Page 48: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.2 Infra-Red: The name means below red, the Latin infra meaning "below". Red is the

color of the longest wavelengths of visible light. Infrared light has a longer

wavelength (and so a lower frequency) than that of red light visible to humans,

hence the literal meaning of below red.

'Infrared' (IR) light is electromagnetic radiation with a wavelength between

0.7 and 300 micrometres, which equates to a frequency range between

approximately 1 and 430 THz

IR wavelengths are longer than that of visible light, but shorter than that of

terahertz radiation microwaves. Bright sunlight provides an irradiance of just over

1 kilowatt per square meter at sea level. Of this energy, 527 watts is infrared

radiation, 445 watts is visible light, and 32 watts is ultraviolet radiation.

3.4.2.1 Infra-Red Sensor: Based on a simple basic Idea, this proximity sensor is easy to build, easy

to calibrate and still, it provides a large range of detection (range can change

depending on the ambient light intensity).

This sensor can be used for most indoor applications where no important

ambient light is present. For simplicity, this sensor doesn't provide ambient light

immunity. The solution proposed doesn't contain any special components, like

photo-diodes, phototransistors, or IR receiver ICs, only a couple if IR leds,

LM555 IC, a transistor and a couple of resistors. In need, as the title says, a

standard IR led is used for the purpose of detection. It is the same principle in ALL Infrared proximity sensors. The basic idea is

to send infra red light through IR-LEDs, which is then reflected by any object in

front of the sensor. Then all you have to do is to pick-up the reflected IR light. For

detecting the reflected IR light, we are going to use a very original technique:

We are going to use another IR-LED, to detect the IR light that was emitted from

another led of the exact same type.

Page 49: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

This is an electrical property of Light Emitting Diodes (LEDs) which is the

fact that a led Produce a voltage difference across its leads when it is subjected

to light. As if it was a photo-cell, but with much lower output current. In other

words, the voltage generated by the leds can't be - in any way - used to generate

electrical power from light, It can barely be detected. that's why as you will notice

in the schematic, we are going to use a Op-Amp (operational Amplifier) to

accurately detect very small voltage changes.

Two different designs are proposed, each one of them is more suitable for

different applications. The main difference between the 2 designs is the way

infra-red (IR) light is sent on the object. The receiver part of the circuit is exactly

the same in both designs.

Page 50: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.2.2 Design 1: Low range, Always ON: As the name implies, the sensor is always ON, meaning that the IR led is

constantly emitting light. This design of the circuit is suitable for counting objects,

or counting revolutions of a rotating object, that may be of the order of 15,000

rpm or much more. However this design is more power consuming and is not

optimized for high ranges. In this design, range can be from 1 to 10 cm,

depending on the ambient light conditions.

As you can see the schematic is divided into 2 parts the sender and the receiver.

The sender is composed of an IR LED (D2) in series with a 470-Ohm

resistor, yielding a forward current of 7.5 mA.

Page 51: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

The receiver part is more complicated; the 2 resistors R5 and R6 form a

voltage divider, which provides 2.5V at the anode of the IR LED (here, this led

will be used as a sensor). When IR light falls on the LED (D1), the voltage drop

increases, the cathode's voltage of D1 may go as low as 1.4V or more,

depending on the light intensity. This voltage drop can be detected using an Op-

Amp. You will have to adjust the variable resistor (POT.) R8 so the the voltage at

the positive input of the Op-Amp (pin No. 5) would be somewhere near 1.6 Volt. if

you understand the functioning of Op-Amps, you will notice that the output will go

High when the volt at the cathode of D1 drops under 1.6. So the output will be

High when IR light is detected, which is the purpose of the receiver. In case you're not familiar with op-amps, here is shortly and in a very

simplified manner, what you need to know to understand how this sensor

functions: The op-amp has 2 input, the +ve input, and the -ve input. If the +ve

input's voltage is higher than the -ve input's voltage, the output goes High (5v,

given the supply voltage in the schematic), otherwise, if the +ve input's voltage is

lower than the -ve input's voltage, then the output of the Op-Amp goes to Low

(0V). It doesn't matter how big is the difference between the +ve and -ve inputs,

even a 0.0001 volts difference will be detected, and the output will swing to 0v or

5v according to which input has a higher voltage.

Page 52: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.2.3 Design 2: High range, Pulsed IR: In this design, which is oriented to obstacle detection in robots,

our primary target is to reach high ranges, from 25 to 35 cm,

depending on ambient light conditions. Increasing the current flowing

in the led extends the range of the sensor. This is a delicate task, as

we need to send pulses of IR instead of constant IR emission. The duty

cycle of the pulses turning the LED ON and OFF have to be calculated

with precision, so that the average current flowing into the LED never

exceeds the LED's maximum DC current (or 10mA as a standard safe

value).

Pulsed IR, Duty cycle, Average and Instantaneous current.

The duty cycle is the ratio between the ON duration of the pulse and

the total period. A low duty cycle will enable us to inject in the LED high

instantaneous currents while shutting it OFF for enough time to cool down

from the previous cycle.

Those 2 graphs show the meaning of the duty cycle, and the

mathematical relations between the ON time, the Total period, and the

average current.

Page 53: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

In the second graph, the average current in blue is exaggerated to

be visible, but real calculations would yield a much smaller average

current. Now, hands on the circuit that will put all this theory into practice. The

CTRL input in the figure, stands for Control, and this pin should be connected to

the source of the low duty cycle pulses discussed above, whether it is a

microcontroller or an LM555 timer that generates the pulses.

The calculations yielded that a 10 ohm resistor is series with the LED D2,

would cause a current of approximately 250 mA to flow through the LED. A

current this high, would destroy the LED if applied for a long period of time (some

dozens of seconds), this is why we have to send low duty cycle pulses.

The first Op-amp will provide voltage buffer, to enable any kind of device to

control the sensor, also, it will provide the 30mA base current required to drive

the base of the transistor. The calculation of the base resistor R3 depends on the

type of transistor you use, thus on how much current you need on the base to

drive the required collector current.

The receiver part of this schematic functions in the exact same way as in the first

design, refer to the first, 'ALLWAYS ON' design for a detailed description.

Page 54: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Page 55: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.2.4 Components positioning: The correct positioning of the sender LED, the receiver LED with regard to

each other and to the Op-Amp can also increase the performance of the sensor.

First, we need to adjust the position of the sender LED with respect to the

receiver LED, in such a way they are as near as possible to each others , while

preventing any IR light to be picked up by the receiver LED before it hit and object and returns back. The easiest way to do that is to put the sender(s)

LED(s) from one side of the PCB, and the receiver LED from the other side, as

shown in the 3D model below.

This 3D model shows the position of the LEDs. The green plate is the

PCB holding the electronic components of the sensor. you can notice that the

receiver LED is positioned under the PCB, this way, there wont be ambient light

falling directly on it, as ambient light usually comes from the top.

It is also clear that this way of positioning the LEDs prevent the emitted IR

light to be detected before hitting an eventual obstacle.

Another important issue about components positioning, is the distance

between the receiver LED and the Op-Amp. Which should be as small as

possible. Generally speaking, the length of wires or PCB tracks before an

amplifier should be reduced; otherwise, the amplifier will amplify - along with the

original signal - a lot of noise picked up form the electromagnetic waves traveling

the surrounding.

Page 56: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.3 Sonar: Sonar (originally an acronym for SOund Navigation And Ranging) is a

technique that uses sound propagation (usually underwater, as in Submarine

navigation) to navigate, communicate with or detect other vessels. Two types of

technology share the name "sonar": passive sonar is essentially listening for the

sound made by vessels; active sonar is emitting pulses of sounds and listening

for echoes. Sonar may be used as a means of acoustic location and of

measurement of the echo characteristics of "targets" in the water. Acoustic

location in air was used before the introduction of radar. Sonar may also be used

in air for robot navigation, and SODAR (an upward looking in-air sonar) is used

for atmospheric investigations. The term sonar is also used for the equipment

used to generate and receive the sound. The acoustic frequencies used in sonar

systems vary from very low (infrasonic) to extremely high (ultrasonic).

Everyone knows how sonar works. A sound gets emitted, then you 'see'

your surroundings based on the sound coming echoing back. This is because

sound takes time to travel distances. Farther the distance, the longer it takes for

the sound to come back. This sonar tutorial will talk about how to implement

sonar in our robot.

Page 57: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.3.1 How Sonar Works: The microcontroller tells the sonar to go. Then the sonar emits a mostly

inaudible sound, time passes, then detects the return echo. It then immediately

sends a voltage signal to the microcontroller, which by keeping track of the time

that passes can calculate the distance of the object(s) de cted. te

3.4.3.2 Calculating Distance vs Time: The speed of sound in air is about 343 m/s, with minor dependence on

temperature and humidity. This is roughly 0.9ms/foot. The speed of sound in

saltwater is about 1500 m/s, and in freshwater 1435 m/s.

Example:

Suppose your robot is on land and has sonar. The sonar sends out a sound to

an object that is an unknown distance away. That means the sound has to travel

this unknown distance twice (there and back). Now suppose your microcontroller

says the time passed was .03 seconds. How many meters away is the object

from the robot?

Calculating:

Speed_of_Sound x Time_Passed / 2 = Distance_from_Object

343 m/s x .03 s / 2 = 5.145 m

Page 58: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.3.3 Power Requirements: Typical sonar require ground, power, signal transmit (the 'go' command), and

signal receive (signals when a sound returns) lines.

The typical sonar module consumes roughly 100 mA in standby mode, meaning

no sound pulses are being emitted. When in use, however, the power

requirement jumps momentarily up to 2 Amps. Just like with motors, they can

draw sudden large amounts of current resulting in sudden voltage drops on your

batteries (i.e. a ping causes the microcontroller to reset). This huge jump can

wreak havoc on microcontrollers and other circuitry sharing the same power

supply. A microcontroller won't work and will just reset if the voltage drops too

low.

However, if you design your power supply circuit with a capacitor, it

should suppress these sudden but short lived voltage drops. You should already

have one for your motors, but if you draw from another separate power supply, a

~500uF capacitor across the power leads should work fine. 3.4.3.4 Range (Maximum and Minimum):

Since the ping sound is spreading out radically, the signal strength as the

chirp moves farther from the transducer is reduced by 1/(distance^2). This means

that the maximum measuring distance drops off rapidly at the extreme maximum

of the sensor. There is usually amplification electronics built in to your sonar to

adjust for this, but a typical maximum range of cheap sonar is still no greater

than 6-25 feet.

There is also a minimum range, meaning that if an object is too close

(say within a inch or two) from the sonar emitter, your sonar will not detect the

object (or at least not accurately). This is because sound is really fast, so fast

that the electronics cannot work with in the time it takes for the sound to return

back to the sensor. Make sure your sonar is an inch or more back from the front

of your robot, or it will not detect wall collisions properly.

Page 59: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.3.5 Sound Reflectance / Absorbance and Object Material Properties:

Unfortunately, echos are not completely a product of distance. There are many

other factors that can alter readings. The sound reflected from a pillow and from

a solid wall will not be the same. If the object is at a sharp angle, much less

sound would be reflected back. Surface properties of the objects can also make

a difference. A carpet and a mirror would give different readings. Your sound can

also 'get lost,' bounce around various walls for some extended period of time,

then return to your sonar as a 'ghost echo' - or even worse, it might cause false

triggering making your robot 'see' objects that aren’t really there.

As an object sensor, you can use some of these 'problems' to your advantage.

Page 60: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.4.3.6 Using Multiple Sonar Simultaneously: Now suppose your robot had multiple sonar sensors on it. How would you

prevent one sonar from not detecting an echo caused by another sonar sensor?

The hardware approach would be to point your sonar at different angles (outside

of the viewing angle of the type of sonar you are using). Typically this would be

around ~20 degrees.

The electronics approach to solving this problem would be to have each

sonar operating at a different sound frequency (not easy to do!).

Lastly, there is the computational approach. With this method each of your

sonar would fire at different times. Your robot would wait for one sonar to receive

an echo, plus an additional time for ghost echos to dissipate, before the next

sonar is activated. But if you have say 16+ sonar, that can take a huge amount of

wasted time! Then you can do things like have only sonar on opposite sides of

the robot fire together. Or do some strange sonar firing pattern so that each

sonar has a small chance of interfering with each another

Page 61: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.5 LCD Display:

A Liquid Crystal Display (LCD) is an electro-optical amplitude modulator

realized as a thin, flat display device made up of any number of color or

monochrome pixels arrayed in front of a light source or reflector. It is often

utilized in battery-powered electronic devices because it uses very small amount

of electric Power.

3.5.1 Overview: Each pixel of an LCD typically consists of a layer of molecules aligned

between two transparent electrodes, and two polarizing filters, the axes of

transmission of which are (in most of the cases) perpendicular to each other.

With no liquid crystal between the polarizing filters, light passing through the first

filter would be blocked by the second (crossed) polarizer.

The surface of the electrodes that are in contact with the liquid crystal

material are treated so as to align the liquid crystal molecules in a particular

direction. This treatment typically consists of a thin polymer layer that is

unidirectionally rubbed using, for example, a cloth. The direction of the liquid

crystal alignment is then defined by the direction of rubbing. Electrodes are made

of a transparent conductor called Indium Tin Oxide (ITO).

Before applying an electric field, the orientation of the liquid crystal

molecules is determined by the alignment at the surfaces. In a twisted nematic

device (still the most common liquid crystal device), the surface alignment

directions at the two electrodes are perpendicular to each other, and so the

molecules arrange themselves in a helical structure, or twist. Because the liquid

crystal material is birefringent, light passing through one polarizing filter is rotated

by the liquid crystal helix as it passes through the crystal layer, allowing it to pass

through the second polarized filter

Page 62: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.5.2 Specification: Important factors to consider when evaluating an LCD monitor:

• Resolution: The horizontal and vertical size expressed in pixels (e.g.

1024x768) Unlike monochrome CRT monitors, LCD monitors have a

native-supported resolution for best Display effect.

• Dot Pitch: The distance between the center of two adjacent pixels. The

smaller the dot pitch size, the less granularity is present, resulting in a

sharper image. Dot pitch may be the same both vertically and horizontally,

or different (less common).

• Viewable size: The size of an LCD panel measured on the diagonal

(more specifically known as active display area).

• Response time: The minimum time necessary to change a pixel’s

color or brightness. Response time is also divided into rise and fall time.

For LCD Monitors, this is measured in btb (black to black) or gtg (gray to

gray). These different types of measurements make comparison difficult.

• Refresh Rate: The number of times per second in which the

monitors draws the data it is being given. A refresh rate that is too low can

cause flickering and will be more noticeable on larger monitors. Many

high-end LCD televisions now have a 120 Hz refresh rate (current and for

former NTSC countries Only). This allows for less distortion when movies

filmed at 24 frames per second (fps) are viewed due to the elimination of

telecine (3:2 pull down). The rate of 120 was chosen as the least common

multiple of 24 fps (cinema) and 30 fps (TV).

Page 63: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.5.3 Color Display: In color LCDs each individual pixel is divided into three cells, or sub pixels,

which are colored Red, Green and Blue respectively, by additional filters

(pigment filters, dye filters and metal oxide filters). Each sub pixel can be

controlled independently to yield thousands or millions of possible colors for each

pixel. CRT monitors employ a similar ‘Sub Pixel’ structures via phosphorus,

although the electron beam employed in CRTs do not hit exact ‘Sub Pixel’.

Color Components may be arranged in various pixel geometries,

depending on the monitor’s usage. If software knows which type of geometry is

being used in a given LCD, this can be used to increase the apparent resolution

of the monitor through sub pixel rendering. This technique is especially useful for

text anti-aliasing.

To reduce smudging in a moving picture when pixels do not respond

quickly enough to color changes, so-called pixel override may be used.

Page 64: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.6 Micro Switches: Micro switch is a generic term used to refer to an electric switch that can

be actuated by very little physical force. They are very common due to their low

cost and extreme durability, typically greater than 1 million cycles and up to 10

million cycles for heavy-duty models. This durability is a natural consequence of

the design. Internally a stiff must be bent to activate the switch. This produces a

very distinctive clicking sound a very crisp feel. When pressure is removed the

metal strip springs back to its original state. Common applications of micro

switches include computer mouse buttons and arcade game joysticks and

buttons. Micro switches are commonly used in tamper switches on gate valves

on fire sprinkler systems and other water pipes systems, where it is necessary to

know if a value has been opened or shut. They have also been used as anti-

handling devices in booby-trapped improvised explosive devices manufactured

by paramilitary groups e.g. the Provisional IRA during the troubles.

The defining features of micro switches are that a relatively small

movement at the actuator button produces a relative large movement t the

electrical contacts, which occurs at high speed (regardless of speed of

actuation). Most successful designs also exhibits hysteresis, meaning that small

reversal of the actuator is insufficient to reverse the contacts, there must be a

significant movement in the opposite direction. Both of these characteristics help

to achieve a clean and reliable interruption to the switched circuit.

The first micro switch was invented by peter McGall in 1932 in Freeport,

Illinois McGall was an employee of the burgess battery company at the time, in

1937 he started the company MICRO SWTICH, which still exists as of 2005. it is

now owned by Honeywell Sensing Control.

Page 65: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.7 Buzzer: A buzzer or beeper is an audio signaling device, which may be

mechanical, electromechanical, or electronic. Typical uses of buzzers and

beepers include alarms, timers and confirmation of user input such as a mouse

click or keystroke. A piezoelectric element may be driven by an oscillating electronic circuit or

other audio signal source. Sounds commonly used to indicate that a button has

been pressed are a click, a ring or a beep. Electronic buzzers find many

applications in modern days.

Page 66: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.8 Vacuum Pump Instrument used either to compress air in a closed vessel or to exhaust the

air from a closed vesel. When used for the former purpose it is generally known

as a "force pump," and when used for the latter purpose it is frequently called a

"vacuum pump."

To create a high vacuum in a system it is necessary to move all of the

molecules of gas out of the system. The molecules will move only if there is a

pressure difference between the two regions of the space (see Figure 4). The low

pressure region is the space with the smaller number of molecules, while the

high pressure region is the space with the larger number of molecules.

Any device, which can induce a pressure difference between the two

regions in the space, is called a pump. The pump that creates the vacuum in the

certain system is called a vacuum pump.

Page 67: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.8.1 Types:

Pumps can be broadly categorized according to three techniques:

Positive displacement pumps use a mechanism to repeatedly expand a

cavity, allow gases to flow in from the chamber, seal off the cavity, and

exhaust it to the atmosphere.

Momentum transfer pumps, also called molecular pumps, use high-

speed jets of dense fluid or high speed rotating blades to knock gas

molecules out of the chamber.

Entrapment pumps capture gases in a solid or adsorbed state. This

includes cryopumps, getters, and ion pumps.

Page 68: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Positive displacement:

Fluids cannot be pulled, so it is technically impossible to create a vacuum

by suction. Suction is the movement of fluids into a vacuum under the effect of a

higher external pressure, but the vacuum has to be created first. The easiest way

to create an artificial vacuum is to expand the volume of a container. For

example, the diaphragm muscle expands the chest cavity, which causes the

volume of the lungs to increase. This expansion reduces the pressure and

creates a partial vacuum, which is soon filled by air pushed in by atmospheric

pressure

To continue evacuating a chamber indefinitely without requiring infinite

growth, a compartment of the vacuum can be repeatedly closed off, exhausted,

and expanded again. This is the principle behind positive displacement pumps,

like the manual water pump for example. Inside the pump, a mechanism expands

a small sealed cavity to create a deep vacuum. Because of the pressure

differential, some fluid from the chamber (or the well, in our example) is pushed

into the pump's small cavity. The pump's cavity is then sealed from the chamber,

opened to the atmosphere, and squeezed back to a minute size.

Page 69: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Momentum transfer:

In a momentum transfer pump, gas molecules are accelerated from the

vacuum side to the exhaust side (which is usually maintained at a reduced

pressure by a positive displacement pump). Momentum transfer pumping is only

possible below pressures of about 0.1 kPa. Matter flows differently at different

pressures based on the laws of fluid dynamics. At atmospheric pressure and mild

vacuums, molecules interact with each other and push on their neighboring

molecules in what is known as viscous flow. When the distance between the

molecules increases, the molecules interact with the walls of the chamber more

often than the other molecules, and molecular pumping becomes more effective

than positive displacement pumping. This regime is generally called high

vacuum.

Molecular pumps sweep out a larger area than mechanical pumps, and do

so more frequently, making them capable of much higher pumping speeds. They

do this at the expense of the seal between the vacuum and their exhaust. Since

there is no seal, a small pressure at the exhaust can easily cause back streaming

through the pump; this is called stall. In high vacuum, however, pressure

gradients have little effect on fluid flows, and molecular pumps can attain their full

potential.

The two main types of molecular pumps are the diffusion pump and the

turbo molecular pump. Both types of pumps blow out gas molecules that diffuse

into the pump by imparting momentum to the gas molecules. Diffusion pumps

blow out gas molecules with jets of oil or mercury, while turbo molecular pumps

use high-speed fans to push the gas. Both of these pumps will stall and fail to

pump if exhausted directly to atmospheric pressure, so they must be exhausted

to a lower grade vacuum created by a mechanical pump.

Page 70: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Entrapment:

Entrapment pumps may be cryopumps, which use cold temperatures to

condense gases to solid or adsorbed state, chemical pumps, which react with

gases to produce a solid residue, or ionization pumps, which use strong electrical

fields to ionize gases and propel the ions into a solid substrate. A cryomodule

uses cryopumping.

Page 71: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

3.9 Dc motor

A DC motor is an electric motor that runs on direct current (DC) electricity.

3.9.1 Working Of D.C Motor A DC motor works by converting electric power into mechanical work. This

is accomplished by forcing current through a coil and producing a magnetic field

that spins the motor. The simplest DC motor is a single coil apparatus, used here

to discuss the DC motor theory.

Voltage

DC motors are non-polarized - meaning that you can reverse voltage

without any bad things happening. Typical DC motors are rated from about 6V-

12V. The larger ones are often 24V or more. But for the purposes of a robot, you

probably will stay in the 6V-12V range. Voltage is directly related to motor torque.

More voltage, higher the torque. A DC motor is rated at the voltage it is most efficient at running. If you apply too few volts, it just won’t work. If you apply too

much, it will overheat and the coils will melt. So the general rule is, try to apply as

close to the rated voltage of the motor as you can.

Page 72: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Current As with all circuitry, you must pay attention to current. Too little, and it just

won't work. Too much, and you have meltdown. There are two current ratings.

The first is operating current. This is the average amount of current the motor is

expected to draw under a typical torque. Multiply this number by the rated

voltage and you will get the average power draw required to run the motor. The

other current rating is the stall current. This is when you power up the motor, but

you put enough torque on it to force it to stop rotating. This is the maximum

amount of current the motor will ever draw, and hence the maximum amount of

power too. So you must design all control circuitry capable of handling this stall

current. Also, if you plan to constantly run your motor, or run it higher than the

rated voltage, it is wise to heat sink your motor to keep the coils from melting.

Power Spikes There is a special case for DC motors that change directions. To reverse

the direction of the motor, you must also reverse the voltage. However the motor

has a built up inductance and momentum, which resists this voltage change.

So for the short period of time it takes for the motor to reverse direction, there is

a large power spike. The voltage will spike double the operating voltage. The

current will go to around stall current.

Page 73: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Torque There are two torque value ratings. The first is operating torque. This is

the torque the motor was designed to give. Usually it is the listed torque value.

The other rated value is stall torque. This is the torque required to stop the

motor from rotating. You normally would want to design using only the operating

torque value, but there are occasions when you want to know how far you can

push your motor. If you are designing a wheeled robot, good torque means good

acceleration. If you have 2 motors on your robot, make sure the stall torque on

each is enough to lift the weight of your entire robot times your wheel radius.

Always favor torque over velocity.

Velocity Velocity is very complex when it comes to DC motors. The general rule is,

motors run the most efficient when run at the highest possible speeds. Obviously

however this is not possible. There are times we want our robot to run slowly. So

first you want gearing - this way the motor can run fast, yet you can still get good

torque out of it. Unfortunately gearing automatically reduces efficiency no higher

than about 90%. So include a 90% speed and torque reduction for every gear

meshing when you calculate gearing. For example, if you have 3 spur gears,

therefore meshing together twice, you will get a 90% x 90% = 81% efficiency.

The voltage and applied torque resistance obviously also affects speed.

Page 74: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

Control Methods The most important of DC motor control techniques is the H-Bridge. After

you have your H-Bridge hooked up to your motor, to determine your wheel

velocity/position you must use an encoder. And lastly, you should read up on

good DC Motor Braking methods.

Page 75: FYP reportl

HARDWARE DISCRIPTION OF SYSTEM µC-FCR

CONCLUSION OF CHAPTER

This chapter contains all description of the components, which are used in our

project. It includes all the necessary information regarding to the components. It

contain all the description of Microcontroller 89C52 how they work and all the

description regarding to the controller.

It also describe all the information regarding to the RELAYS, LCD,

SENSORS, MICRO SWITCHES, BUZZER, DC MOTOR, Vacuum PUMP and all

other equipments used in our project.

Page 76: FYP reportl

CHAPTER # 4 µC-FCR

CHAPTER # 4

SOTWARE SELECTION

Page 77: FYP reportl

SOTWARE SELECTION µC-FCR

Selecting software:

4.1 Introduction: In our project “Microcontroller Based Floor Cleaning Robot Using

Suction Principal” or in short “µM-FCR” we used verity of tools for designing,

analysis and development of project. We used micro controller 89C52 and for

programming KEIL µVISION (ASEM) compiler. And burner software TOP006,

CIRCAD is used for layout designing and testing the circuitry also we used

ORCAD for our circuit designs.

Page 78: FYP reportl

SOTWARE SELECTION µC-FCR

4.2 Keil µVision:

Cross assembler takes an assembly language source file created with a

text editor and translates it into a machine language file. This translation process

is done in two phases over the source file. During the first phase, the cross

assembler builds a symbol table from the symbols and labels used is the source

file. Its during the second phase that the cross assembler actually translates the

source file into machine language object file and the listings is generated. 4.2.1 Object file:

The cross assembler also creates a machine language object file. The

format of the object is standard Intel hexadecimal. This hexadecimal file can be

used to either program EPROMS using PROM programmers for prototyping, or

used to pattern masked ROM’S for production. The default drive with the same

name as the first source file and an extension of .HEX. e.g. if the source file

name was fcr.asm. The object file would be called as fcr.HEX. 4.2.2 Source file drive & name.asm:

At this point ,if you have only one floppy drive and 8051 cross assembler

and source files are on separate disks , remove the disk with 8051 cross

assembler on it and replace it with your source file disk.

Next, enter the source file name, if no extension is given ,the cross

assembler will assume an extension of .ASM . if no drive is giver the cross

assembler assumes the default drive, it is generally a good practice to change

the default drive to the drive with your source files. An alternate method for

entering the source files is in the command.

Page 79: FYP reportl

SOTWARE SELECTION µC-FCR

4.3 ORCAD:

OrCAD is a proprietary software tool suite used primarily for electronic

design automation. The software is used mainly to create electronic prints for

manufacturing of printed circuit boards, by electronic design engineers and

electronic technicians to manufacture electronic schematics and diagrams, and

for their simulation.

The name OrCAD is a portmanteau, reflecting the software's origins:

Oregon + CAD.

The OrCAD product line is fully owned by Cadence Design Systems. The

latest iteration has the ability to maintain a database of available integrated

circuits. This database may be updated by the user by downloading packages

from component manufacturers, such as Analog Devices or Texas Instruments.

Another announcement was, that ST Microelectronics will offer OrCAD PSpice

models for all the power and logic semicontuctors, since PSpice is the most used

circuit simulator[1]. Intel offers reference PCBs designed with Cadence PCB Tools

in the OrCAD Capture format for embedded and personal computers.

4.3.1 ORCAD CAPTURE SIS:

OrCAD Capture CIS is a software tool used for circuit schematic capture.

It is part of the OrCAD circuit design suite.

Capture CIS is nearly identical to the similar OrCAD tool, Capture. The

difference between the two tools comes in the addition of the component

information system (CIS). The CIS links component information, such as printed

circuit board package footprint data or simulation behavior data, with the circuit

symbol in the schematic. When exported to other tools in the OrCAD design

suite, the data stored in the CIS is also transferred to the other tool. Thus, when

a design engineer exports a schematic to the circuit board layout utility, the

majority of the circuit elements have footprints linked to them. This saves time for

the design engineer.

Page 80: FYP reportl

SOTWARE SELECTION µC-FCR

Capture CIS has the ability to export netlists, representative of the circuit

schematic which is currently open, to the OrCAD simulation utility, PSPICE.

Capture CIS also exports a simulation configuration file, accessible through the

simulation toolbar. This, coupled with the CIS, allows for quick simulations with

data representative of how the circuit will behave. Capture may also export a

netlist to the SPICE simulation utility.

Capture may export a hardware description of the circuit schematic that is

currently open, either in Verilog or VHDL.

Capture also has the ability to export netlists to several different circuit

board layout utilities, such as OrCAD Layout, Allegro, and others. When

combined with the CIS, circuit board footprints are linked to this netlist. This,

combined with the pin to pin interconnect description of the netlist, will open the

correct part footprints, and, if the CIS data that CIS exported is correct, will

connect all of the pads together with representative lines. This feature makes the

circuit board design process easier for the design engineer.

4.3.2 Capture CIS Option:

Capture CIS option is a part of Capture CIS that can interface with any

database which complies with Microsoft's ODBC standard. Data in an MRP,

ERP, or PDM system can be directly accessed for use during component

decision-making process.

Page 81: FYP reportl

SOTWARE SELECTION µC-FCR

4.4 Xeltic:

Features:

• The largest device support in the industry: Supports 62,032 IC devices

from 213 manufacturers and continuing

• Two programmers in one, a double value: PC mode for engineering and

Stand-alone mode for production. The programmer operates in either PC

hosted mode or stand-alone mode.

o Under PC hosted mode, a PC controls the programmer via a high-

speed USB connection to program a chip.

o Under stand-alone mode, the user controls the programmer via 20-

characters, 4-line LCD display with 6-KEY keypad.

o A CF (compact flash) card stores the project files.

• Ultra-Fast Programming Speed: Programs and verifies 64 Mb NOR Flash

memory in 11.3 seconds and 1 Gb NAND Flash in 108 seconds.

• Built-in 144 universal pin drivers

• Comes with one-year free device update request support.

• CE and RoHS Compliant

Page 82: FYP reportl

SOTWARE SELECTION µC-FCR

Detailed Features: • Supports 62,032 IC devices from 213 manufacturers and continuing

• Programs devices with Vcc as low as 1.2V.

• Ultra fast programming speed: Programs and verifies 64 Mb NOR FLASH

memory in 11.3 seconds and 1 GB NAND in 108 seconds.

• Built with 144 universal pin-drivers for support of today’s most complex

devices. Universal and device independent socket adapters are available

for various packages up to 144 pins.

• The programmer operates in either PC hosted mode or stand-alone mode.

o Under PC hosted mode, a PC controls the programmer via a high-

speed USB2.0 connection to program a chip.

o Under stand-alone mode, the user controls the programmer via 20-

characters, 4-line LCD display with 6-KEY

o A CF (compact flash) card stores the project files. programming

capability through optional ISP/ICP

• ISP/ICP adapter.

• In stand-alone mode, the user can operate multiple units to construct a

concurrent multiprogramming system.

• Over-current and over-voltage protection for safety of the chip and

programmer hardware.

• Compatible with Windows Vista and Windows XP x32/x64

• Only IC manufacturer approved programming algorithms provide high

reliability.

• Vcc verification at (+5%~-5%) and (10%~-10%) enhances programming

reliability.

• Includes the following advanced and powerful software functions:

o Chip operation starts immediately upon proper chip insertion in

Production Mode.

o Project function simplifies processes such as device selection, file

loading, device configuration setting, program option, and batch file

setting into one step.

Page 83: FYP reportl

SOTWARE SELECTION µC-FCR

o Password protection provides security for project files and

production volume control.

o Batch command combines device operations like program, verify,

security into a single command at any sequence.

o Serial number generators are available as standard or customer-

specific functions.

o Log file provides production quality tracking.

• CE and RoHS Compliant

Page 84: FYP reportl

SOTWARE SELECTION µC-FCR

Speed Comparison:

Device Program + Verify (Sec) Type

K8P6415UQB 11.3 64Mb NOR FLASH

AM29DL640G 27.6 64Mb NOR FLASH

K9F1208U0B 67.4 512Mb NAND FLASH

KAP21WP00M 108 1Gb NAND FLASH

K9F1G08U0A 116.5 1Gb NAND FLASH

AT28C64B 0.9 64Kb EEPROM

24AA128 4.5 128Kb EEPROM

B25F640S33 30.4 64Mb EEPROM

AT89C55 7.5 20KB FLASH MCU

ST72F324BK4B5 3.8 32KB FLASH MCU

MB89F538 1.67 32KB FLASH MCU

UPD78F9234 8.8 16KB FLASH MCU

Device Updates:

• XELTEK updates software and device algorithm regularly.

• View the latest Device List.

• Download the current software version free of charge at Download Center.

• Updates are available by mail at a nominal charge.

• XELTEK also adds devices upon customer’s request at its

Page 85: FYP reportl

SOTWARE SELECTION µC-FCR

Hardware & Electrical Specifications:

• Devices Supported: EPROM, Paged EPROM, Parallel and Serial

EEPROM, FPGA Configuration PROM, FLASH memory (NOR & NAND),

BPROM, NVRAM, SPLD, CPLD, EPLD, Firmware HUB, Microcontroller,

MCU, Standard Logic

• Package: DIP, SDIP, PLCC, JLCC, SOIC, QFP, TQFP, PQFP, VQFP,

TSOP, SOP, TSOPII, PSOP, TSSOP, SON, EBGA, FBGA, VFBGA,

uBGA, CSP, SCSP

• PC interface: USB2.0 (High speed)

• Stand-alone memory: Compact FLASH Card

• Power supply: AC Adapter: Input AC 100V- 240V; Output: 12V/1.5A

• Main unit: Dimensions 148(L) * 216(W) * 94(h) mm; Weight 3.5 lbs (1.6

Kg)

• Package: Dimensions 301(L) * 252(W) * 145(H) mm; Weight 6.2 lbs

(2.8Kg)

Page 86: FYP reportl

SOTWARE SELECTION µC-FCR

4.5 Proteus Professional Demonstration:

The Proteus Professional demonstration is intended for prospective

customers who wish to evaluate our professional level products. It differs from

Proteus Lite in that it does not allow you to save, print or design your own

microcontroller based designs (you can however write your own software

programs to run on the existing sample design suite for evaluation), but does

include all features offered by the professional system including netlist based

PCB design with auto-placement, auto-routing and graph based simulation. -

Please note using a Download Manager or Accelerator will corrupt the file.

Proteus is software for microprocessor simulation, schematic capture, and

printed circuit board (PCB) design. It is developed by Lab center Electronics.

Proteus PCB design combines the ISIS schematic capture and ARES

PCB layout programs to provide a powerful, integrated and easy to use suite of

tools for professional PCB Design..

All Proteus PCB design products include an integrated shape based auto

router and a basic SPICE simulation capability as standard. More advanced

routing modes are included in Proteus PCB Design Level 2 and higher whilst

simulation capabilities can be enhanced by purchasing the Advanced Simulation

option and/or micro-controller simulation capabilities.

The products are offered at a number of levels, which offer increasing

levels of functionality and design capacity:

"PCB design is our business. We review PCB layout software on an

ongoing basis and Lab center has topped the list for the last 10 years. Certainly

the most productive and very, very affordable. We have licenses for other very

expensive products but they don't get much use."

Customer Testimonial - Don Alan Pty Ltd

Page 87: FYP reportl

SOTWARE SELECTION µC-FCR

Proteus Professional Starter Kit:

• Full feature ISIS schematic capture with support for hierarchical design,

bus pins, configurable bill of materials and much, much more.

• Netlist based ARES PCB layout with support of up to 16 copper layers,

10nm resolution, any angle component placement, full electrical and

physical design rule checks and much more.

• Standard version of our integrated shape based auto-router (fully

automated routing only)

• External Autorouter Interface - allows export and import of designs (in the

most common format) to/from a dedicated external Autorouter.

• Support for one shaped based ground plane per layer.

• Component libraries containing over 10000 schematic parts and 1500

PCB footprints.

• Includes ProSPICE mixed mode simulator with 8000 models and 12 virtual

instruments.

• 500 pin capacity for PCB design.

Please note that the Starter Kit is limited to netlists of 500 physical pins and

does not support automatic component placement, gate-swap optimization,

partial power planes (including cut-outs), 3d Visualization, ODB++ Output or the

advanced routing modes. These features are only available in Level 2 and

above.

Page 88: FYP reportl

SOTWARE SELECTION µC-FCR

Proteus PCB Design Level 1 and Level 1+:

These products offer exactly the same functionality as the Starter Kit but offer

more realistic design capacities of 1000 or 2000 pins.

• Full feature ISIS schematic capture with support for hierarchical design,

bus pins, configurable bill of materials and much, much more.

• Netlist based ARES PCB layout with support of up to 16 copper layers,

10nm resolution, any angle component placement, full electrical and

physical design rule checks and much more.

• Standard version of our integrated shape based auto-router (fully

automated routing only).

• External Autorouter Interface - allows export and import of designs (in the

most common format) to/from a dedicated external Autorouter.

• Support for one shaped based ground plane per layer.

• Component libraries containing over 10000 schematic parts and 1500

PCB footprints.

• Includes ProSPICE mixed mode simulator with 6000 models and 12virtual

instruments.

• 1000 pin capacity in Level 1; 2000 pin capacity in Level 1+.

Please note that Level 1/1+ is limited to netlists of 1000/2000 physical pins

and does not support automatic component placement, gate-swap optimization,

partial power planes (including cut-outs), 3d Visualisation, ODB++ Output or the

advanced routing modes. These features are only available in Level 2 and

above.

Page 89: FYP reportl

SOTWARE SELECTION µC-FCR

Proteus PCB Design Level 2 and Level 2+:

These products are restricted in terms of pin count only, and same set of

features as the top of the range Level 3. Extra functionality over Level 1 includes:

• Automatic component placement - this tool will automatic place the

component specified in the netlist onto the board.

• Ability to run the integrated shape based router in interactive mode (partial

routing, fanout control, etc.) or by loading custom scripts.

• 3D Visualisation of the current board including navigation and user

application of 3D data to footprints.

• The ability to export your layouts using the ODB++ CAD/CAM data

exchange format.

• Unlimited shape based power planes per layer.

• Automatic gateswap optimization.

• 1000 pin capacity in Level2; 2000 pin capacity in Level 2+

Proteus PCB Design Level 3

This is the top of the range package and offers all system features as above

plus unlimited design capacity.

Page 90: FYP reportl

SOTWARE SELECTION µC-FCR

CONCLUSION OF CHAPTER It contains all the descriptions of tools for developing the project. This chapter

describes all the necessary information regarding to the software, which is used

in our project. Keil µ vision is used as an assembler for program coding. It

describes all the description regarding to keil. Other software’s are also used in

our project such as ORCAD, Proteus and Xeltek super pro which are the

requirements of our project . all the description regarding to these software’s are

mentioned in this chapter.

Page 91: FYP reportl

CHAPTER # 5 µC-FCR

CHAPTER # 5

OVERALL OPERATION OF SYSTEM

Page 92: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

OVERALL OPERATION OF SYSTEM 5.1 Introduction:

The hardware design of this project includes various components that

meet our desired specifications. 89C52 µC will be worked as a brain of the

Robot. All the motions of robot will be controlled by 89C52. Once all the

parameters are set, operation is fully automatic. Means set the angle of rotation

and angle of inclination to clean the surface and object will be automatically

done.

D.C motor is used for moving the locomotion back and forward in main

drive. Basically this is µ-Controller based project and all the motors are controlled

with the help of µ-controller. The speed of each motor will be provided same.

In this project sensors are playing vital role to protect the locomotive from any

collision.

The project is basically chargeable battery Robot.

Page 93: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

5.2 Rotation Of D.C Motor:

A D.C motor is an internally commutated electric motor designed to be run

from a D.C power source.

5.2.1 Poles Of D.C Motor: The following Graphics illustrates a poles of D.C Motor.

Fig: 5-1 Simple D.C electric motor

This figure shows a simple D.C electric motor. When the coil is powered, a

magnetic field is generated around the armature. The left side of the armature is

pushed away from the left magnet and drawn toward the right, causing rotation.

Page 94: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

Fig: 5-2 Simple D.C electric motor

The figure shows the armature continues to rotate.

Page 95: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

Fig: 5-2 Simple D.C electric motor

The above figure illustrates that when the armature becomes horizontally

aligned, the commutator reverses the direction of current through the coil,

reversing the magnetic field. The process then repeats.

5.2.2 Description:

When a current passes through the coil wound around a soft iron core, the

side of the positive pole is acted upon by an upwards force, while the other side

is acted upon by a downward force. According to Fleming's left hand rule, the

forces cause a turning effect on the coil, making it rotate. To make the motor

rotate in a constant direction, "direct current" commutators make the current

reverse in direction every half a cycle thus causing the motor to continue to rotate

in the same direction.

A problem with the motor shown above is that when the plane of the coil is

parallel to the magnetic field i.e. when the rotor poles are 90 degrees from the

stator poles, the torque is zero. The motor would not be able to start in this

position. However, once it was started, it would continue to rotate through this

position by inertia.

Page 96: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

There is a second problem with this simple two-pole design. At the zero-

torque position, both commutator brushes are touching across both commutator

plates, resulting in a short-circuit. This short uselessly consumes power without

producing any motion. In a low-current battery-powered demonstration this short-

circuiting is generally not considered harmful. However, if a two-pole motor were

designed to do actual work with several hundred watts of power output, this

shorting could result in severe commutator overheating, brush damage, and

potential welding of the brushes to the commutator.

Unlike the demonstration motor above, DC motors are commonly

designed with more than two poles, are able to start from any position, and do

not have any position where current can flow without producing electromotive

power.

If the shaft of a DC motor is turned by an external force, the motor will act

like a generator and produce an Electromotive force (EMF). During normal

operation, the spinning of the motor produces a voltage, known as the counter-

EMF (CEMF) or back EMF, because it opposes the applied voltage on the motor.

This is the same EMF that is produced when the motor is used as a generator

(for example when an electrical load, such as a light bulb, is placed across the

terminals of the motor and the motor shaft is driven with an external torque).

Therefore, the total voltage drop across a motor consists of the CEMF voltage

drop, and the parasitic voltage drop resulting from the internal resistance of the

armature's windings. The current through a motor is given by the following

equation:

The mechanical power produced by the motor is given by:

Page 97: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

As an unloaded DC motor spins, it generates a backwards-flowing

electromotive force that resists the current being applied to the motor. The

current through the motor drops as the rotational speed increases, and a free-

spinning motor has very little current. It is only when a load is applied to the

motor that slows the rotor that the current draw through the motor increases.

"In an experiment of this kind made on a motor with separately

excited magnets, the following figures were obtained:

Revolutions per minute 0 50 100 160 180 195

Amperes 20 16.2 12.2 7.8 6.1 5.1

Apparently, if the motor had been helped on to run at 261.5 revolutions

per minute, the current would have been reduced to zero. In the last result

obtained, the current of 5.1 amperes was absorbed in driving the armature

against its own friction at the speed of 195 revolutions per minute.

Page 98: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

5.2.3 The commutating plane:

In a dynamo, the contact point of where a pair of brushes touch the

commutator is referred to as the commutating plane. In this diagram the

commutating plane is shown for just one of the brushes.

Fig: 5-4 Commutating plane is shown for just one of the brushes

Page 99: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

5.2.3.1 Compensation for stator field distortion: In a real dynamo, the field is never perfectly uniform. Instead, as the rotor

spins it induces field effects which drag and distort the magnetic lines of the outer

non-rotating stator.

The faster the rotor spins, the further the degree of field distortion.

Because the dynamo operates most efficiently with the rotor field at right angles

the stator field, it is necessary to either retard or advance the brush position to

put the rotor's field into the correct position to be at a right angle to the distorted

field.

These field effects are reversed when the direction of spin is reversed. It is

therefore difficult to build an efficient reversible commutated dynamo, since for

highest field strength it is necessary to move the brushes to the opposite side of

the normal neutral plane.

The effect can be considered to be somewhat similar to timing advance in

an internal combustion engine. Generally a dynamo that has been designed to

run at a certain fixed speed will have its brushes permanently fixed to align the

field for highest efficiency at that speed.

Page 100: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

5.3 Avoidance Sensor: In this project avoidance sensor are used to protect the locomotive from

any collision.

5.3.1 Working: Collision avoidance is accomplished with more Polaroid ultrasonic ranging

sensors, which are mounted under the front of the robot. Facing forward at some

degrees of center to the left and right, these sensors detects the object in front of

the robot as it moves forward. A basic stamp reads the distance information from

each sensor and determines if it is within a pre-determined range about 1 feet of

the robot. A signal is sent to the drive control if an object is sensed within this

range.

5.4 Battery Chargeable: A rechargeable battery, also known as a storage battery, is a group of two

or more secondary cells. These batteries can be restored to full charge by the

application of electrical energy. In other words, they are electrochemical cells in

which the electrochemical reaction that releases energy is readily reversible.

Rechargeable electrochemical cells are therefore a type of accumulator. They

come in many different designs using different chemicals. Commonly used

secondary cell chemistries are lead and sulfuric acid, rechargeable alkaline

battery (alkaline), nickel cadmium (NiCd), nickel hydrogen (NIH2), nickel metal

hydride (NiMH), lithium ion (Li-ion) and lithium ion polymer (li-ion polymer).

Rechargeable batteries can offer economic and environmental benefits

compared to disposable batteries. Some rechargeable battery type available in

same sizes as disposable types. While rechargeable cells have a higher first cost

than disposable batteries, rechargeable batteries can be discharged and

recharged many times. Proper selection of rechargeable battery system can

reduce toxic materials sent to landfill disposal compared to an equivalent series

of disposable batteries.

Page 101: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

5.4.1 Charging And Discharging Of Battery:

During charging, the positive active material is oxidized, producing

electrons and the negative material is reduced consuming electrons. These

electrons constitute the current flow in the external circuit. The electrolyte may

serve as a simple buffer for ion flow between the electrodes, as in lithium-ion and

nickel-cadmium cells or it may be active participant in the electrochemical

reaction as in lead-acid cells.

5.4.2 Battery Charger:

The energy used to charge rechargeable batteries mostly comes from AC

current (mains electricity) using an adapter unit. Mot battery chargers can take

several hours to charge a battery. Most batteries can be charge in far less time

than the most common simple battery chargers are capable of. Duracell and

Rayovac now sell chargers that can charge AA- and AAA size NiMH batteries in

just 15 minutes, Energizer sell charger that can additionally charge C/D-size and

9V NiMH batteries.

Flow batteries don’t need to be charge on place, because they can be

charged by replacing the electrolyte liquid.

Battery manufacturers technical notes often refer to VPC. This is Volts per

cell, and refers to the individual secondary cells that make up the battery. For

example, to charge a 12 V battery (containing 6 cells of 2 V each) at 2.3 VPC

requires a voltage of 13.8 V across the battery’s terminals.

5.4.3 Reverse Charging: Reverse charging, which damages batteries is when a rechargeable

battery is recharged with its polarity reversed. Reverse charging can occur under

a number of circumstances, the two most important being:

• When a battery is incorrectly inserted into a charger.

• When multiple batteries are used in series in a device. When one battery

completely charges ahead of the rest, the other batteries in series may force the

charged battery to discharge to below zero voltage.

Page 102: FYP reportl

OVERALL OPERATION OF SYSTEM µC-FCR

CONCLUSION OF CHAPTER

This chapter describes the complete working of the project. It is µC based

project. This project is basically a chargeable battery robot. This chapter

describes overall operation of the project that how it works.

Page 103: FYP reportl

LIST OF COMPONENTS

Page 104: FYP reportl

List Of Components:

LCD 16*2

RF Module TRW 24G

µC AT89C52

Relays

IC L232

IR sensors

10µF capacitors

10k resistors

30 pF capacitors

Crystal 11M0592

Max sonar

1k resisters

1M5 resister

LM555

103 capacitor

C945 transistors

LED

Diodes

1000UF/25V capacitor

Buzzer

47k resistors

220 resistors

Page 105: FYP reportl

SHEMETIC DIAGRAM

Page 106: FYP reportl

VACCUM UNIT

Page 107: FYP reportl

REMOTE UNIT

Page 108: FYP reportl

APPENDIX B

Page 109: FYP reportl

8-bit Microcontroller with 8K Bytes Flash

AT89C52

Not Recommended

Features• Compatible with MCS-51™ Products• 8K Bytes of In-System Reprogrammable Flash Memory• Endurance: 1,000 Write/Erase Cycles• Fully Static Operation: 0 Hz to 24 MHz• Three-level Program Memory Lock• 256 x 8-bit Internal RAM• 32 Programmable I/O Lines• Three 16-bit Timer/Counters• Eight Interrupt Sources• Programmable Serial Channel• Low-power Idle and Power-down Modes

DescriptionThe AT89C52 is a low-power, high-performance CMOS 8-bit microcomputer with 8Kbytes of Flash programmable and erasable read only memory (PEROM). The deviceis manufactured using Atmel’s high-density nonvolatile memory technology and iscompatible with the industry-standard 80C51 and 80C52 instruction set and pinout.The on-chip Flash allows the program memory to be reprogrammed in-system or by aconventional nonvolatile memory programmer. By combining a versatile 8-bit CPUwith Flash on a monolithic chip, the Atmel AT89C52 is a powerful microcomputerwhich provides a highly-flexible and cost-effective solution to many embedded controlapplications.

1

for New Designs. Use AT89S52.

Rev. 0313H–02/00

Pin ConfigurationsPQFP/TQFP

1234567891011

3332313029282726252423

P1.5P1.6P1.7RST

(RXD) P3.0NC

(TXD) P3.1(INT0) P3.2(INT1) P3.3

(T0) P3.4iT1) P3.5

P0.4 (AD4)P0.5 (AD5)P0.6 (AD6)P0.7 (AD7)EA/VPPNCALE/PROGPSENP2.7 (A15)P2.6 (A14)P2.5 (A13)

44 43 42 41 40 39 38 37 36 35 34

12 13 14 15 16 17 18 19 20 21 22

(WR

) P

3.6

(RD

) P

3.7

XT

AL2

XT

AL1

GN

DN

C(A

8) P

2.0

(A9)

P2.

1(A

10)

P2.

2(A

11)

P2.

3(A

12)

P2.

4

P1.

4P

1.3

P1.

2P

1.1

(T2

EX

)P

1.0

(T2)

NC

VC

CP

0.0

(AD

0)P

0.1

(AD

1)P

0.2

(AD

2)P

0.3

(AD

3)

PDIP

1234567891011121314151617181920

4039383736353433323130292827262524232221

(T2) P1.0(T2 EX) P1.1

P1.2P1.3P1.4P1.5P1.6P1.7RST

(RXD) P3.0(TXD) P3.1(INT0) P3.2(INT1) P3.3

(T0) P3.4(T1) P3.5

(WR) P3.6(RD) P3.7

XTAL2XTAL1

GND

VCCP0.0 (AD0)P0.1 (AD1)P0.2 (AD2)P0.3 (AD3)P0.4 (AD4)P0.5 (AD5)P0.6 (AD6)P0.7 (AD7)EA/VPPALE/PROGPSENP2.7 (A15)P2.6 (A14)P2.5 (A13)P2.4 (A12)P2.3 (A11)P2.2 (A10)P2.1 (A9)P2.0 (A8)

PLCC

7891011121314151617

3938373635343332313029

P1.5P1.6P1.7RST

(RXD) P3.0NC

(TXD) P3.1(INT0) P3.2(INT1) P3.3

(T0) P3.4(T1) P3.5

P0.4 (AD4)P0.5 (AD5)P0.6 (AD6)P0.7 (AD7)EA/VPPNCALE/PROGPSENP2.7 (A15)P2.6 (A14)P2.5 (A13)

6 5 4 3 2 1 44 43 42 41 40

18 19 20 21 22 23 24 25 26 27 28

(WR

) P

3.6

(RD

) P

3.7

XT

AL

2X

TA

L1G

ND

NC

(A8)

P2.

0(A

9) P

2.1

(A10

) P

2.2

(A11

) P

2.3

(A12

) P

2.4

P1.

4P

1.3

P1.

2P

1.1

(T2

EX

)P

1.0

(T2)

NC

VC

CP

0.0

(AD

0)P

0.1

(AD

1)P

0.2

(AD

2)P

0.3

(AD

3)

Page 110: FYP reportl

Block Diagram

PORT 2 DRIVERS

PORT 2LATCH

P2.0 - P2.7

QUICKFLASH

PORT 0LATCHRAM

PROGRAMADDRESSREGISTER

BUFFER

PCINCREMENTER

PROGRAMCOUNTER

DPTR

RAM ADDR.REGISTER

INSTRUCTIONREGISTER

BREGISTER

INTERRUPT, SERIAL PORT,AND TIMER BLOCKS

STACKPOINTERACC

TMP2 TMP1

ALU

PSW

TIMINGAND

CONTROL

PORT 3LATCH

PORT 3 DRIVERS

P3.0 - P3.7

PORT 1LATCH

PORT 1 DRIVERS

P1.0 - P1.7

OSC

GND

VCC

PSEN

ALE/PROG

EA / VPP

RST

PORT 0 DRIVERS

P0.0 - P0.7

AT89C52

Page 111: FYP reportl

AT89C52

The AT89C52 provides the following standard features: 8Kbytes of Flash, 256 bytes of RAM, 32 I/O lines, three 16-bittimer/counters, a six-vector two-level interrupt architecture,a full-duplex serial port, on-chip oscillator, and clock cir-cuitry. In addition, the AT89C52 is designed with static logicfor operation down to zero frequency and supports twosoftware selectable power saving modes. The Idle Modestops the CPU while allowing the RAM, timer/counters,serial port, and interrupt system to continue functioning.The Power-down mode saves the RAM contents butfreezes the oscillator, disabling all other chip functions untilthe next hardware reset.

Pin DescriptionVCCSupply voltage.

GNDGround.

Port 0

Port 0 is an 8-bit open drain bi-directional I/O port. As anoutput port, each pin can sink eight TTL inputs. When 1sare written to port 0 pins, the pins can be used as high-impedance inputs.

Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external pro-gram and data memory. In this mode, P0 has internalpullups.

Port 0 also receives the code bytes during Flash program-ming and outputs the code bytes dur ing programverification. External pullups are required during programverification.

Port 1

Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can sink/source four TTL inputs.When 1s are written to Port 1 pins, they are pulled high bythe internal pullups and can be used as inputs. As inputs,Port 1 pins that are externally being pulled low will sourcecurrent (IIL) because of the internal pullups.

In addition, P1.0 and P1.1 can be configured to be thetimer/counter 2 external count input (P1.0/T2) and thetimer/counter 2 trigger input (P1.1/T2EX), respectively, asshown in the following table.Port 1 also receives the low-order address bytes duringFlash programming and verification.

Port 2Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can sink/source four TTL inputs.When 1s are written to Port 2 pins, they are pulled high bythe internal pullups and can be used as inputs. As inputs,Port 2 pins that are externally being pulled low will sourcecurrent (IIL) because of the internal pullups.

Port 2 emits the high-order address byte during fetchesfrom external program memory and during accesses toexternal data memory that use 16-bit addresses (MOVX @DPTR). In this application, Port 2 uses strong internal pul-lups when emitting 1s. During accesses to external datamemory that use 8-bit addresses (MOVX @ RI), Port 2emits the contents of the P2 Special Function Register.

Port 2 also receives the high-order address bits and somecontrol signals during Flash programming and verification.

Port 3Port 3 is an 8-bit bi-directional I/O port with internal pullups.The Port 3 output buffers can sink/source four TTL inputs.When 1s are written to Port 3 pins, they are pulled high bythe internal pullups and can be used as inputs. As inputs,Port 3 pins that are externally being pulled low will sourcecurrent (IIL) because of the pullups.

Port 3 also serves the functions of various special featuresof the AT89C51, as shown in the following table.

Port 3 also receives some control signals for Flash pro-gramming and verification.

RSTReset input. A high on this pin for two machine cycles whilethe oscillator is running resets the device.

ALE/PROGAddress Latch Enable is an output pulse for latching thelow byte of the address during accesses to external mem-ory. This pin is also the program pulse input (PROG) duringFlash programming.

In normal operation, ALE is emitted at a constant rate of 1/6the oscillator frequency and may be used for external

Port Pin Alternate Functions

P1.0 T2 (external count input to Timer/Counter 2), clock-out

P1.1 T2EX (Timer/Counter 2 capture/reload trigger anddirection control)

Port Pin Alternate Functions

P3.0 RXD (serial input port)

P3.1 TXD (serial output port)

P3.2 INT0 (external interrupt 0)

P3.3 INT1 (external interrupt 1)

P3.4 T0 (timer 0 external input)

P3.5 T1 (timer 1 external input)

P3.6 WR (external data memory write strobe)

P3.7 RD (external data memory read strobe)

Page 112: FYP reportl

timing or clocking purposes. Note, however, that one ALEpulse is skipped during each access to external datamemory.

If desired, ALE operation can be disabled by setting bit 0 ofSFR location 8EH. With the bit set, ALE is active only dur-ing a MOVX or MOVC instruction. Otherwise, the pin isweakly pulled high. Setting the ALE-disable bit has noeffect if the microcontroller is in external execution mode.

PSENProgram Store Enable is the read strobe to external pro-gram memory.

When the AT89C52 is executing code from external pro-gram memory, PSEN is activated twice each machinecycle, except that two PSEN activations are skipped duringeach access to external data memory.

EA/VPPExternal Access Enable. EA must be strapped to GND inorder to enable the device to fetch code from external pro-gram memory locations starting at 0000H up to FFFFH.Note, however, that if lock bit 1 is programmed, EA will beinternally latched on reset.

EA should be strapped to VCC for internal programexecutions.

This pin also receives the 12-volt programming enable volt-age (VPP) during Flash programming when 12-voltprogramming is selected.

XTAL1Input to the inverting oscillator amplifier and input to theinternal clock operating circuit.

XTAL2Output from the inverting oscillator amplifier.

Table 1. AT89C52 SFR Map and Reset Values

0F8H 0FFH

0F0HB

000000000F7H

0E8H 0EFH

0E0HACC

000000000E7H

0D8H 0DFH

0D0HPSW

000000000D7H

0C8HT2CON

00000000T2MOD

XXXXXX00RCAP2L00000000

RCAP2H00000000

TL200000000

TH200000000

0CFH

0C0H 0C7H

0B8HIP

XX0000000BFH

0B0HP3

111111110B7H

0A8HIE

0X0000000AFH

0A0HP2

111111110A7H

98HSCON

00000000SBUF

XXXXXXXX9FH

90HP1

1111111197H

88HTCON

00000000TMOD

00000000TL0

00000000TL1

00000000TH0

00000000TH1

000000008FH

80HP0

11111111SP

00000111DPL

00000000DPH

00000000PCON

0XXX000087H

AT89C52

Page 113: FYP reportl

AT89C52

Special Function RegistersA map of the on-chip memory area called the Special Func-tion Register (SFR) space is shown in Table 1.

Note that not all of the addresses are occupied, and unoc-cupied addresses may not be implemented on the chip.Read accesses to these addresses will in general returnrandom data, and write accesses will have an indetermi-nate effect.

User software should not write 1s to these unlisted loca-tions, since they may be used in future products to invoke

new features. In that case, the reset or inactive values ofthe new bits will always be 0.

Timer 2 Registers Control and status bits are contained inregisters T2CON (shown in Table 2) and T2MOD (shown inTable 4) for Timer 2. The register pair (RCAP2H, RCAP2L)are the Capture/Reload registers for Timer 2 in 16-bit cap-ture mode or 16-bit auto-reload mode.

Interrupt Registers The individual interrupt enable bits arein the IE register. Two priorities can be set for each of thesix interrupt sources in the IP register.r

Data MemoryThe AT89C52 implements 256 bytes of on-chip RAM. Theupper 128 bytes occupy a parallel address space to theSpecial Function Registers. That means the upper 128bytes have the same addresses as the SFR space but arephysically separate from SFR space.

When an instruction accesses an internal location aboveaddress 7FH, the address mode used in the instruction

specifies whether the CPU accesses the upper 128 bytesof RAM or the SFR space. Instructions that use directaddressing access SFR space.

For example, the following direct addressing instructionaccesses the SFR at location 0A0H (which is P2).

MOV 0A0H, #data

Table 2. T2CON – Timer/Counter 2 Control Registe

T2CON Address = 0C8H Reset Value = 0000 0000B

Bit Addressable

Bit TF2 EXF2 RCLK TCLK EXEN2 TR2 C/T2 CP/RL2

7 6 5 4 3 2 1 0

Symbol Function

TF2 Timer 2 overflow flag set by a Timer 2 overflow and must be cleared by software. TF2 will not be set when either RCLK = 1 or TCLK = 1.

EXF2 Timer 2 external flag set when either a capture or reload is caused by a negative transition on T2EX and EXEN2 = 1. When Timer 2 interrupt is enabled, EXF2 = 1 will cause the CPU to vector to the Timer 2 interrupt routine. EXF2 must be cleared by software. EXF2 does not cause an interrupt in up/down counter mode (DCEN = 1).

RCLK Receive clock enable. When set, causes the serial port to use Timer 2 overflow pulses for its receive clock in serial port Modes 1 and 3. RCLK = 0 causes Timer 1 overflow to be used for the receive clock.

TCLK Transmit clock enable. When set, causes the serial port to use Timer 2 overflow pulses for its transmit clock in serial port Modes 1 and 3. TCLK = 0 causes Timer 1 overflows to be used for the transmit clock.

EXEN2 Timer 2 external enable. When set, allows a capture or reload to occur as a result of a negative transition on T2EX if Timer 2 is not being used to clock the serial port. EXEN2 = 0 causes Timer 2 to ignore events at T2EX.

TR2 Start/Stop control for Timer 2. TR2 = 1 starts the timer.

C/T2 Timer or counter select for Timer 2. C/T2 = 0 for timer function. C/T2 = 1 for external event counter (falling edge triggered).

CP/RL2 Capture/Reload select. CP/RL2 = 1 causes captures to occur on negative transitions at T2EX if EXEN2 = 1. CP/RL2 = 0 causes automatic reloads to occur when Timer 2 overflows or negative transitions occur at T2EX when EXEN2 = 1. When either RCLK or TCLK = 1, this bit is ignored and the timer is forced to auto-reload on Timer 2 overflow.

Page 114: FYP reportl

Instructions that use indirect addressing access the upper128 bytes of RAM. For example, the following indirectaddressing instruction, where R0 contains 0A0H, accessesthe data byte at address 0A0H, rather than P2 (whoseaddress is 0A0H).

MOV @R0, #data

Note that stack operations are examples of indirectaddressing, so the upper 128 bytes of data RAM are avail-able as stack space.

Timer 0 and 1Timer 0 and Timer 1 in the AT89C52 operate the same wayas Timer 0 and Timer 1 in the AT89C51.

Timer 2Timer 2 is a 16-bit Timer/Counter that can operate as eithera timer or an event counter. The type of operation isselected by bit C/T2 in the SFR T2CON (shown in Table 2).Timer 2 has three operating modes: capture, auto-reload(up or down counting), and baud rate generator. Themodes are selected by bits in T2CON, as shown in Table 3.

Timer 2 consists of two 8-bit registers, TH2 and TL2. In theTimer function, the TL2 register is incremented everymachine cycle. Since a machine cycle consists of 12 oscil-lator periods, the count rate is 1/12 of the oscillatorfrequency.

In the Counter function, the register is incremented inresponse to a 1-to-0 transition at its corresponding external

input pin, T2. In this function, the external input is sampledduring S5P2 of every machine cycle. When the samplesshow a high in one cycle and a low in the next cycle, thecount is incremented. The new count value appears in theregister during S3P1 of the cycle following the one in whichthe transition was detected. Since two machine cycles (24oscillator periods) are required to recognize a 1-to-0 transi-tion, the maximum count rate is 1/24 of the oscillatorfrequency. To ensure that a given level is sampled at leastonce before it changes, the level should be held for at leastone full machine cycle.

Capture ModeIn the capture mode, two options are selected by bitEXEN2 in T2CON. If EXEN2 = 0, Timer 2 is a 16-bit timeror counter which upon overflow sets bit TF2 in T2CON.This bit can then be used to generate an interrupt. IfEXEN2 = 1, Timer 2 performs the same operation, but a 1-to-0 transition at external input T2EX also causes the cur-rent value in TH2 and TL2 to be captured into RCAP2H andRCAP2L, respectively. In addition, the transition at T2EXcauses bit EXF2 in T2CON to be set. The EXF2 bit, likeTF2, can generate an interrupt. The capture mode is illus-trated in Figure 1.

Auto-reload (Up or Down Counter)Timer 2 can be programmed to count up or down whenconfigured in its 16-bit auto-reload mode. This feature isinvoked by the DCEN (Down Counter Enable) bit located inthe SFR T2MOD (see Table 4). Upon reset, the DCEN bitis set to 0 so that timer 2 will default to count up. WhenDCEN is set, Timer 2 can count up or down, depending onthe value of the T2EX pin.

Table 3. Timer 2 Operating Modes

RCLK +TCLK CP/RL2 TR2 MODE

0 0 1 16-bit Auto-reload

0 1 1 16-bit Capture

1 X 1 Baud Rate Generator

X X 0 (Off)

AT89C52

Page 115: FYP reportl

AT89C52

Figure 1. Timer in Capture Mode

Figure 2 shows Timer 2 automatically counting up whenDCEN = 0. In this mode, two options are selected by bitEXEN2 in T2CON. If EXEN2 = 0, Timer 2 counts up to0FFFFH and then sets the TF2 bit upon overflow. Theoverflow also causes the timer registers to be reloaded withthe 16-bit value in RCAP2H and RCAP2L. The values inTimer in Capture ModeRCAP2H and RCAP2L are presetby software. If EXEN2 = 1, a 16-bit reload can be triggeredeither by an overflow or by a 1-to-0 transition at externalinput T2EX. This transition also sets the EXF2 bit. Both theTF2 and EXF2 bits can generate an interrupt if enabled.

Setting the DCEN bit enables Timer 2 to count up or down,as shown in Figure 3. In this mode, the T2EX pin controls

the direction of the count. A logic 1 at T2EX makes Timer 2count up. The timer will overflow at 0FFFFH and set theTF2 bit. This overflow also causes the 16-bit value inRCAP2H and RCAP2L to be reloaded into the timer regis-ters, TH2 and TL2, respectively.

A logic 0 at T2EX makes Timer 2 count down. The timerunderflows when TH2 and TL2 equal the values stored inRCAP2H and RCAP2L. The underflow sets the TF2 bit andcauses 0FFFFH to be reloaded into the timer registers.

The EXF2 bit toggles whenever Timer 2 overflows orunderflows and can be used as a 17th bit of resolution. Inthis operating mode, EXF2 does not flag an interrupt.

OSC

EXF2T2EX PIN

T2 PIN

TR2

EXEN2

C/T2 = 0

C/T2 = 1

CONTROL

CAPTURE

OVERFLOW

CONTROL

TRANSITIONDETECTOR TIMER 2

INTERRUPT

÷12

RCAP2LRCAP2H

TH2 TL2 TF2

Page 116: FYP reportl

Figure 2. Timer 2 Auto Reload Mode (DCEN = 0)

Table 4. T2MOD – Timer 2 Mode Control Register

T2MOD Address = 0C9H Reset Value = XXXX XX00B

Not Bit Addressable

– – – – – – T2OE DCEN

Bit 7 6 5 4 3 2 1 0

Symbol Function

– Not implemented, reserved for future

T2OE Timer 2 Output Enable bit.

DCEN When set, this bit allows Timer 2 to be configured as an up/down counter.

OSC

EXF2

TF2

T2EX PIN

T2 PIN

TR2

EXEN2

C/T2 = 0

C/T2 = 1

CONTROL

RELOAD

OVERFLOW

CONTROL

TRANSITIONDETECTOR

TIMER 2INTERRUPT

÷12

RCAP2LRCAP2H

TH2 TL2

AT89C52

Page 117: FYP reportl

AT89C52

Figure 3. Timer 2 Auto Reload Mode (DCEN = 1)

Figure 4. Timer 2 in Baud Rate Generator Mode

OSC

EXF2

TF2

T2EX PIN

COUNTDIRECTION1=UP0=DOWN

T2 PIN

TR2CONTROL

OVERFLOW

(DOWN COUNTING RELOAD VALUE)

(UP COUNTING RELOAD VALUE)

TOGGLE

TIMER 2INTERRUPT

12

RCAP2LRCAP2H

0FFH0FFH

TH2 TL2

C/T2 = 0

C/T2 = 1

÷

OSC

SMOD1

RCLK

TCLK

RxCLOCK

TxCLOCK

T2EX PIN

T2 PIN

TR2CONTROL

"1"

"1"

"1"

"0"

"0"

"0"

TIMER 1 OVERFLOW

NOTE: OSC. FREQ. IS DIVIDED BY 2, NOT 12

TIMER 2INTERRUPT

2

2

16

16

RCAP2LRCAP2H

TH2 TL2

C/T2 = 0

C/T2 = 1

EXF2

CONTROL

TRANSITIONDETECTOR

EXEN2

÷

÷

÷

÷

Page 118: FYP reportl

Baud Rate GeneratorTimer 2 is selected as the baud rate generator by settingTCLK and/or RCLK in T2CON (Table 2). Note that thebaud rates for transmit and receive can be different if Timer2 is used for the receiver or transmitter and Timer 1 is usedfor the other function. Setting RCLK and/or TCLK putsTimer 2 into its baud rate generator mode, as shown in Fig-ure 4.

The baud rate generator mode is similar to the auto-reloadmode, in that a rollover in TH2 causes the Timer 2 registersto be reloaded with the 16-bit value in registers RCAP2Hand RCAP2L, which are preset by software.

The baud rates in Modes 1 and 3 are determined by Timer2’s overflow rate according to the following equation.

The Timer can be configured for either timer or counteroperation. In most applications, it is configured for timeroperation (CP/T2 = 0). The timer operation is different forTimer 2 when it is used as a baud rate generator. Normally,as a timer, it increments every machine cycle (at 1/12 theoscillator frequency). As a baud rate generator, however, it

increments every state time (at 1/2 the oscillator fre-quency). The baud rate formula is given below.

where (RCAP2H, RCAP2L) is the content of RCAP2H andRCAP2L taken as a 16-bit unsigned integer.

Timer 2 as a baud rate generator is shown in Figure 4. Thisfigure is valid only if RCLK or TCLK = 1 in T2CON. Notethat a rollover in TH2 does not set TF2 and will not gener-ate an interrupt. Note too, that if EXEN2 is set, a 1-to-0transition in T2EX will set EXF2 but will not cause a reloadfrom (RCAP2H, RCAP2L) to (TH2, TL2). Thus when Timer2 is in use as a baud rate generator, T2EX can be used asan extra external interrupt.

Note that when Timer 2 is running (TR2 = 1) as a timer inthe baud rate generator mode, TH2 or TL2 should not beread from or written to. Under these conditions, the Timer isincremented every state time, and the results of a read orwrite may not be accurate. The RCAP2 registers may beread but should not be written to, because a write mightoverlap a reload and cause write and/or reload errors. Thetimer should be turned off (clear TR2) before accessing theTimer 2 or RCAP2 registers.

Figure 5. Timer 2 in Clock-out Mode

Modes 1 and 3 Baud Rates Timer 2 Overflow Rate16

------------------------------------------------------------=

Modes 1 and 3Baud Rate

--------------------------------------- Oscillator Frequency32 65536 RCAP2H RCAP2L( , )–[ ]×----------------------------------------------------------------------------------------------=

OSC

EXF2

P1.0(T2)

P1.1(T2EX)

TR2

EXEN2

C/T2 BIT

TRANSITIONDETECTOR

TIMER 2INTERRUPT

T2OE (T2MOD.1)

÷2TL2

(8-BITS)

RCAP2L RCAP2H

TH2(8-BITS)

÷2

AT89C52

Page 119: FYP reportl

AT89C52

Programmable Clock OutA 50% duty cycle clock can be programmed to come out onP1.0, as shown in Figure 5. This pin, besides being a regu-lar I /O pin, has two alternate funct ions. I t can beprogrammed to input the external clock for Timer/Counter 2or to output a 50% duty cycle clock ranging from 61 Hz to 4MHz at a 16 MHz operating frequency.

To configure the Timer/Counter 2 as a clock generator, bitC/T2 (T2CON.1) must be cleared and bit T2OE (T2MOD.1)must be set. Bit TR2 (T2CON.2) starts and stops the timer.

The clock-out frequency depends on the oscillator fre-quency and the reload value of Timer 2 capture registers(RCAP2H, RCAP2L), as shown in the following equation.

In the clock-out mode, Timer 2 roll-overs will not generatean interrupt. This behavior is similar to when Timer 2 isused as a baud-rate generator. It is possible to use Timer 2as a baud-rate generator and a clock generator simulta-neously. Note, however, that the baud-rate and clock-outfrequencies cannot be determined independently from oneanother since they both use RCAP2H and RCAP2L.

UARTThe UART in the AT89C52 operates the same way as theUART in the AT89C51.

InterruptsThe AT89C52 has a total of six interrupt vectors: two exter-nal interrupts (INT0 and INT1), three timer interrupts(Timers 0, 1, and 2), and the serial port interrupt. Theseinterrupts are all shown in Figure 6.

Each of these interrupt sources can be individually enabledor disabled by setting or clearing a bit in Special FunctionRegister IE. IE also contains a global disable bit, EA, whichdisables all interrupts at once.

Note that Table shows that bit position IE.6 is unimple-mented. In the AT89C51, bi t posit ion IE.5 is alsounimplemented. User software should not write 1s to thesebit positions, since they may be used in future AT89products.

Timer 2 interrupt is generated by the logical OR of bits TF2and EXF2 in register T2CON. Neither of these flags iscleared by hardware when the service routine is vectoredto. In fact, the service routine may have to determinewhether it was TF2 or EXF2 that generated the interrupt,and that bit will have to be cleared in software.

The Timer 0 and Timer 1 flags, TF0 and TF1, are set atS5P2 of the cycle in which the timers overflow. The valuesare then polled by the circuitry in the next cycle. However,

the Timer 2 flag, TF2, is set at S2P2 and is polled in thesame cycle in which the timer overflows.

Figure 6. Interrupt Sources

Clock-Out Frequency Oscillator Fequency4 65536 RCAP2H RCAP2L( , )–[ ]×-------------------------------------------------------------------------------------------=

Table 5. Interrupt Enable (IE) Register

(MSB) (LSB)

EA – ET2 ES ET1 EX1 ET0 EX0

Enable Bit = 1 enables the interrupt.

Enable Bit = 0 disables the interrupt.

Symbol Position Function

EA IE.7 Disables all interrupts. If EA = 0, no interrupt is acknowledged. If EA = 1, each interrupt source is individually enabled or disabled by setting or clearing its enable bit.

– IE.6 Reserved.

ET2 IE.5 Timer 2 interrupt enable bit.

ES IE.4 Serial Port interrupt enable bit.

ET1 IE.3 Timer 1 interrupt enable bit.

EX1 IE.2 External interrupt 1 enable bit.

ET0 IE.1 Timer 0 interrupt enable bit.

EX0 IE.0 External interrupt 0 enable bit.

User software should never write 1s to unimplemented bits, because they may be used in future AT89 products.

IE1

IE0

1

1

0

0

TF1

TF0

INT1

INT0

TIRI

TF2EXF2

Page 120: FYP reportl

Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively,of an inverting amplifier that can be configured for use asan on-chip oscillator, as shown in Figure 7. Either a quartzcrystal or ceramic resonator may be used. To drive thedevice from an external clock source, XTAL2 should be leftunconnected while XTAL1 is driven, as shown in Figure 8.There are no requirements on the duty cycle of the externalclock signal, since the input to the internal clocking circuitryis through a divide-by-two flip-flop, but minimum and maxi-mum voltage high and low time specifications must beobserved.

Idle Mode In idle mode, the CPU puts itself to sleep while all the on-chip peripherals remain active. The mode is invoked bysoftware. The content of the on-chip RAM and all the spe-cial functions registers remain unchanged during thismode. The idle mode can be terminated by any enabledinterrupt or by a hardware reset.

Note that when idle mode is terminated by a hardwarereset, the device normally resumes program executionfrom where it left off, up to two machine cycles before theinternal reset algorithm takes control. On-chip hardwareinhibits access to internal RAM in this event, but access tothe port pins is not inhibited. To eliminate the possibility ofan unexpected write to a port pin when idle mode is termi-nated by a reset, the instruction following the one thatinvokes idle mode should not write to a port pin or to exter-nal memory.

Power-down Mode In the power-down mode, the oscillator is stopped, and theinstruction that invokes power-down is the last instructionexecuted. The on-chip RAM and Special Function Regis-ters retain their values until the power-down mode isterminated. The only exit from power-down is a hardwarereset. Reset redefines the SFRs but does not change theon-chip RAM. The reset should not be activated before VCC

is restored to its normal operating level and must be heldactive long enough to allow the oscillator to restart andstabilize.

Figure 7. Oscillator Connections

Note: C1, C2 = 30 pF ± 10 pF for Crystals= 40 pF ± 10 pF for Ceramic Resonators

Figure 8. External Clock Drive Configuration

C2XTAL2

GND

XTAL1C1

XTAL2

XTAL1

GND

NC

EXTERNALOSCILLATOR

SIGNAL

Status of External Pins During Idle and Powe-down ModesMode Program Memory ALE PSEN PORT0 PORT1 PORT2 PORT3

Idle Internal 1 1 Data Data Data Data

Idle External 1 1 Float Data Address Data

Power-down Internal 0 0 Data Data Data Data

Power-down External 0 0 Float Data Data Data

AT89C52

Page 121: FYP reportl

AT89C52

Program Memory Lock Bits The AT89C52 has three lock bits that can be left unpro-grammed (U) or can be programmed (P) to obtain theadditional features listed in the following table.

When lock bit 1 is programmed, the logic level at the EA pinis sampled and latched during reset. If the device is pow-ered up without a reset, the latch initializes to a randomvalue and holds that value until reset is activated. Thelatched value of EA must agree with the current logic levelat that pin in order for the device to function properly.

Programming the Flash The AT89C52 is normally shipped with the on-chip Flashmemory array in the erased state (that is, contents = FFH)and ready to be programmed. The programming interfaceaccepts either a high-voltage (12-volt) or a low-voltage(VCC) program enable signal. The Low-voltage program-ming mode provides a convenient way to program theAT89C52 inside the user’s system, while the high-voltageprogramming mode is compatible with conventional third-party Flash or EPROM programmers.

The AT89C52 is shipped with either the high-voltage orlow-voltage programming mode enabled. The respectivetop-side marking and device signature codes are listed inthe following table.

The AT89C52 code memory array is programmed byte-by-byte in either programming mode. To program any non-blank byte in the on-chip Flash Memory, the entire memorymust be erased using the Chip Erase Mode.

Programming Algorithm Before programming theAT89C52, the address, data and control signals should beset up according to the Flash programming mode table andFigure 9 and Figure 10. To program the AT89C52, take thefollowing steps.

1. Input the desired memory location on the address lines.

2. Input the appropriate data byte on the data lines.

3. Activate the correct combination of control signals.

4. Raise EA/VPP to 12V for the high-voltage program-ming mode.

5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The byte-write cycle is self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.

Data Polling The AT89C52 features Data Polling to indi-cate the end of a write cycle. During a write cycle, anattempted read of the last byte written will result in the com-plement of the written data on PO.7. Once the write cyclehas been completed, true data is valid on all outputs, andthe next cycle may begin. Data Polling may begin any timeafter a write cycle has been initiated.

Ready/Busy The progress of byte programming can alsobe monitored by the RDY/BSY output signal. P3.4 is pulledlow after ALE goes high during programming to indicateBUSY. P3.4 is pulled high again when programming isdone to indicate READY.

Program Verify If lock bits LB1 and LB2 have not beenprogrammed, the programmed code data can be read backvia the address and data lines for verification. The lock bitscannot be verified directly. Verification of the lock bits isachieved by observing that their features are enabled.

Chip Erase The entire Flash array is erased electrically byusing the proper combination of control signals and byholding ALE/PROG low for 10 ms. The code array is writtenwith all 1s. The chip erase operation must be executedbefore the code memory can be reprogrammed.

Lock Bit Protection ModesProgram Lock Bits

LB1 LB2 LB3 Protection Type

1 U U U No program lock features.

2 P U U MOVC instructions executed from external program memory are disabled from fetching code bytes from internal memory, EA is sampled and latched on reset, and further programming of the Flash memory is disabled.

3 P P U Same as mode 2, but verify is also disabled.

4 P P P Same as mode 3, but external execution is also disabled.

VPP = 12V VPP = 5V

Top-side Mark AT89C52xxxx

yyww

AT89C52xxxx - 5

yyww

Signature (030H) = 1EH(031H) = 52H(032H) = FFH

(030H) = 1EH(031H) = 52H(032H) = 05H

VPP = 12V VPP = 5V

Page 122: FYP reportl

Reading the Signature Bytes The signature bytes areread by the same procedure as a normal verification oflocations 030H, 031H, and 032H, except that P3.6 andP3.7 must be pulled to a logic low. The values returned areas follows.

(030H) = 1EH indicates manufactured by Atmel(031H) = 52H indicates 89C52(032H) = FFH indicates 12V programming(032H) = 05H indicates 5V programming

Programming InterfaceEvery code byte in the Flash array can be written, and theentire array can be erased, by using the appropriate combi-nation of control signals. The write operation cycle is self-timed and once initiated, will automatically time itself tocompletion.

All major programming vendors offer worldwide support forthe Atmel microcontroller series. Please contact your localprogramming vendor for the appropriate software revision.

Note: 1. Chip Erase requires a 10 ms PROG pulse.

Flash Programming ModesMode RST PSEN ALE/PROG EA/VPP P2.6 P2.7 P3.6 P3.7

Write Code Data H L H/12V L H H H

Read Code Data H L H H L L H H

Write Lock Bit - 1 H L H/12V H H H H

Bit - 2 H L H/12V H H L L

Bit - 3 H L H/12V H L H L

Chip Erase H L H/12V H L L L

Read Signature Byte H L H H L L L L

(1)

AT89C52

Page 123: FYP reportl

AT89C52

Figure 9. Programming the Flash Memory Figure 10. Verifying the Flash Memory

Note: 1. Only used in 12-volt programming mode.

P1

P2.6

P3.6

P2.0 - P2.4

A0 - A7ADDR.

OOOOH/1FFFH

SEE FLASHPROGRAMMINGMODES TABLE

3-24 MHz

A8 - A12P0

+5V

P2.7

PGMDATA

PROG

V /VIH PP

VIH

ALE

P3.7

XTAL2 EA

RST

PSEN

XTAL1

GND

VCC

AT87F52

P1

P2.6

P3.6

P2.0 - P2.4

A0 - A7ADDR.

OOOOH/1FFFH

SEE FLASHPROGRAMMINGMODES TABLE

3-24 MHz

A8 - A12P0

+5V

P2.7

PGM DATA(USE 10KPULLUPS)

VIH

VIH

ALE

P3.7

XTAL2 EA

RST

PSEN

XTAL1

GND

VCC

AT87F52

Flash Programming and Verification Characteristics TA = 0°C to 70°C, VCC = 5.0 ± 10%

Symbol Parameter Min Max Units

VPP(1) Programming Enable Voltage 11.5 12.5 V

IPP(1) Programming Enable Current 1.0 mA

1/tCLCL Oscillator Frequency 3 24 MHz

tAVGL Address Setup to PROG Low 48tCLCL

tGHAX Address Hold after PROG 48tCLCL

tDVGL Data Setup to PROG Low 48tCLCL

tGHDX Data Hold After PROG 48tCLCL

tEHSH P2.7 (ENABLE) High to VPP 48tCLCL

tSHGL VPP Setup to PROG Low 10 µs

tGHSL(1) VPP Hold after PROG 10 µs

tGLGH PROG Width 1 110 µs

tAVQV Address to Data Valid 48tCLCL

tELQV ENABLE Low to Data Valid 48tCLCL

tEHQZ Data Float after ENABLE 0 48tCLCL

tGHBL PROG High to BUSY Low 1.0 µs

tWC Byte Write Cycle Time 2.0 ms

Page 124: FYP reportl

Flash Programming and Verification Waveforms - High-voltage Mode (VPP=12V)

Flash Programming and Verification Waveforms - Low-voltage Mode (VPP=5V)

tGLGHtGHSL

tAVGL

tSHGL

tDVGLtGHAX

tAVQV

tGHDX

tEHSH tELQV

tWC

BUSY READY

tGHBL

tEHQZ

P1.0 - P1.7P2.0 - P2.4

ALE/PROG

PORT 0

LOGIC 1LOGIC 0EA/VPP

VPP

P2.7(ENABLE)

P3.4(RDY/BSY)

PROGRAMMINGADDRESS

VERIFICATIONADDRESS

DATA IN DATA OUT

(2)

tGLGH

tAVGL

tSHGL

tDVGLtGHAX

tAVQV

tGHDX

tEHSH tELQV

tWC

BUSY READY

tGHBL

tEHQZ

P1.0 - P1.7P2.0 - P2.4

ALE/PROG

PORT 0

LOGIC 1LOGIC 0EA/VPP

P2.7(ENABLE)

P3.4(RDY/BSY)

PROGRAMMINGADDRESS

VERIFICATIONADDRESS

DATA IN DATA OUT

AT89C52

Page 125: FYP reportl

AT89C52

Notes: 1. Under steady state (non-transient) conditions, IOL must be externally limited as follows:Maximum IOL per port pin: 10 mAMaximum IOL per 8-bit port:Port 0: 26 mA Ports 1, 2, 3: 15 mAMaximum total IOL for all output pins: 71 mAIf IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test conditions.

2. Minimum VCC for Power-down is 2V.

Absolute Maximum Ratings*Operating Temperature.................................. -55°C to +125°C *NOTICE: Stresses beyond those listed under “Absolute

Maximum Ratings” may cause permanent dam-age to the device. This is a stress rating only and functional operation of the device at these or any other conditions beyond those indicated in the operational sections of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

Storage Temperature ..................................... -65°C to +150°C

Voltage on Any Pinwith Respect to Ground .....................................-1.0V to +7.0V

Maximum Operating Voltage ............................................ 6.6V

DC Output Current...................................................... 15.0 mA

DC CharacteristicsThe values shown in this table are valid for TA = -40°C to 85°C and VCC = 5.0V ± 20%, unless otherwise noted.

Symbol Parameter Condition Min Max Units

VIL Input Low-voltage (Except EA) -0.5 0.2 VCC-0.1 V

VIL1 Input Low-voltage (EA) -0.5 0.2 VCC-0.3 V

VIH Input High-voltage (Except XTAL1, RST) 0.2 VCC+0.9 VCC+0.5 V

VIH1 Input High-voltage (XTAL1, RST) 0.7 VCC VCC+0.5 V

VOL Output Low-voltage(1) (Ports 1,2,3) IOL = 1.6 mA 0.45 V

VOL1 Output Low-voltage(1)

(Port 0, ALE, PSEN)IOL = 3.2 mA 0.45 V

VOH Output High-voltage(Ports 1,2,3, ALE, PSEN)

IOH = -60 µA, VCC = 5V ± 10% 2.4 V

IOH = -25 µA 0.75 VCC V

IOH = -10 µA 0.9 VCC V

VOH1 Output High-voltage(Port 0 in External Bus Mode)

IOH = -800 µA, VCC = 5V ± 10% 2.4 V

IOH = -300 µA 0.75 VCC V

IOH = -80 µA 0.9 VCC V

IIL Logical 0 Input Current (Ports 1,2,3) VIN = 0.45V -50 µA

ITL Logical 1 to 0 Transition Current (Ports 1,2,3)

VIN = 2V, VCC = 5V ± 10% -650 µA

ILI Input Leakage Current (Port 0, EA) 0.45 < VIN < VCC ±10 µA

RRST Reset Pulldown Resistor 50 300 KΩ

CIO Pin Capacitance Test Freq. = 1 MHz, TA = 25° C 10 pF

ICC Power Supply Current Active Mode, 12 MHz 25 mA

Idle Mode, 12 MHz 6.5 mA

Power-down Mode(1) VCC = 6V 100 µA

VCC = 3V 40 µA

Page 126: FYP reportl

AC Characteristics Under operating conditions, load capacitance for Port 0, ALE/PROG, and PSEN = 100 pF; load capacitance for all otheroutputs = 80 pF.

External Program and Data Memory Characteristics

Symbol Parameter

12 MHz Oscillator Variable Oscillator

UnitsMin Max Min Max

1/tCLCL Oscillator Frequency 0 24 MHz

tLHLL ALE Pulse Width 127 2tCLCL-40 ns

tAVLL Address Valid to ALE Low 43 tCLCL-13 ns

tLLAX Address Hold After ALE Low 48 tCLCL-20 ns

tLLIV ALE Low to Valid Instruction In 233 4tCLCL-65 ns

tLLPL ALE Low to PSEN Low 43 tCLCL-13 ns

tPLPH PSEN Pulse Width 205 3tCLCL-20 ns

tPLIV PSEN Low to Valid Instruction In 145 3tCLCL-45 ns

tPXIX Input Instruction Hold after PSEN 0 0 ns

tPXIZ Input Instruction Float after PSEN 59 tCLCL-10 ns

tPXAV PSEN to Address Valid 75 tCLCL-8 ns

tAVIV Address to Valid Instruction In 312 5tCLCL-55 ns

tPLAZ PSEN Low to Address Float 10 10 ns

tRLRH RD Pulse Width 400 6tCLCL-100 ns

tWLWH WR Pulse Width 400 6tCLCL-100 ns

tRLDV RD Low to Valid Data In 252 5tCLCL-90 ns

tRHDX Data Hold After RD 0 0 ns

tRHDZ Data Float After RD 97 2tCLCL-28 ns

tLLDV ALE Low to Valid Data In 517 8tCLCL-150 ns

tAVDV Address to Valid Data In 585 9tCLCL-165 ns

tLLWL ALE Low to RD or WR Low 200 300 3tCLCL-50 3tCLCL+50 ns

tAVWL Address to RD or WR Low 203 4tCLCL-75 ns

tQVWX Data Valid to WR Transition 23 tCLCL-20 ns

tQVWH Data Valid to WR High 433 7tCLCL-120 ns

tWHQX Data Hold After WR 33 tCLCL-20 ns

tRLAZ RD Low to Address Float 0 0 ns

tWHLH RD or WR High to ALE High 43 123 tCLCL-20 tCLCL+25 ns

AT89C52

Page 127: FYP reportl

AT89C52

External Program Memory Read Cycle

External Data Memory Read Cycle

tLHLL

tLLIV

tPLIV

tLLAXtPXIZ

tPLPH

tPLAZtPXAV

tAVLL tLLPL

tAVIV

tPXIX

ALE

PSEN

PORT 0

PORT 2 A8 - A15

A0 - A7 A0 - A7

A8 - A15

INSTR IN

tLHLL

tLLDV

tLLWL

tLLAX

tWHLH

tAVLL

tRLRH

tAVDV

tAVWL

tRLAZ tRHDX

tRLDV tRHDZ

A0 - A7 FROM RI OR DPL

ALE

PSEN

RD

PORT 0

PORT 2 P2.0 - P2.7 OR A8 - A15 FROM DPH

A0 - A7 FROM PCL

A8 - A15 FROM PCH

DATA IN INSTR IN

Page 128: FYP reportl

External Data Memory Write Cycle

External Clock Drive Waveforms

tLHLL

tLLWL

tLLAX

tWHLH

tAVLL

tWLWH

tAVWL

tQVWXtQVWH

tWHQX

A0 - A7 FROM RI OR DPL

ALE

PSEN

WR

PORT 0

PORT 2 P2.0 - P2.7 OR A8 - A15 FROM DPH

A0 - A7 FROM PCL

A8 - A15 FROM PCH

DATA OUT INSTR IN

tCHCX

tCHCX

tCLCX

tCLCL

tCHCLtCLCHV - 0.5VCC

0.45V0.2 V - 0.1VCC

0.7 VCC

External Clock DriveSymbol Parameter Min Max Units

1/tCLCL Oscillator Frequency 0 24 MHz

tCLCL Clock Period 41.6 ns

tCHCX High Time 15 ns

tCLCX Low Time 15 ns

tCLCH Rise Time 20 ns

tCHCL Fall Time 20 ns

AT89C52

Page 129: FYP reportl

AT89C52

.

Shift Register Mode Timing Waveforms

AC Testing Input/Output Waveforms(1)

Note: 1. AC Inputs during testing are driven at VCC - 0.5V for a logic 1 and 0.45V for a logic 0. Timing measure-ments are made at VIH min. for a logic 1 and VIL max. for a logic 0.

Float Waveforms(1)

Note: 1. For timing purposes, a port pin is no longer floating when a 100 mV change from load voltage occurs. A port pin begins to float when a 100 mV change from the loaded VOH/VOL level occurs.

Serial Port Timing: Shift Register Mode Test ConditionsThe values in this table are valid for VCC = 5.0V ± 20% and Load Capacitance = 80 pF.

Symbol Parameter

12 MHz Osc Variable Oscillator

UnitsMin Max Min Max

tXLXL Serial Port Clock Cycle Time 1.0 12tCLCL µs

tQVXH Output Data Setup to Clock Rising Edge 700 10tCLCL-133 ns

tXHQX Output Data Hold After Clock Rising Edge 50 2tCLCL-117 ns

tXHDX Input Data Hold After Clock Rising Edge 0 0 ns

tXHDV Clock Rising Edge to Input Data Valid 700 10tCLCL-133 ns

tXHDV

tQVXH

tXLXL

tXHDX

tXHQX

ALE

INPUT DATA

CLEAR RI

OUTPUT DATA

WRITE TO SBUF

INSTRUCTION

CLOCK

0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

SET TI

SET RI

8

VALID VALIDVALID VALIDVALID VALIDVALID VALID

0.45V

TEST POINTS

V - 0.5VCC 0.2 V + 0.9VCC

0.2 V - 0.1VCC

VLOAD+ 0.1V

Timing ReferencePoints

V

LOAD- 0.1V

LOAD

V VOL+ 0.1V

VOL- 0.1V

Page 130: FYP reportl

Ordering InformationSpeed(MHz)

PowerSupply Ordering Code Package Operation Range

12 5V ± 20% AT89C52-12ACAT89C52-12JCAT89C52-12PC

AT89C52-12QC

44A44J40P6

44Q

Commercial(0° C to 70° C)

AT89C52-12AIAT89C52-12JIAT89C52-12PI

AT89C52-12QI

44A44J40P6

44Q

Industrial(-40° C to 85° C)

16 5V ± 20% AT89C52-16ACAT89C52-16JCAT89C52-16PC

AT89C52-16QC

44A44J40P6

44Q

Commercial(0° C to 70° C)

AT89C52-16AIAT89C52-16JIAT89C52-16PI

AT89C52-16QI

44A44J40P6

44Q

Industrial(-40° C to 85° C)

20 5V ± 20% AT89C52-20ACAT89C52-20JCAT89C52-20PC

AT89C52-20QC

44A44J40P6

44Q

Commercial(0° C to 70° C)

AT89C52-20AIAT89C52-20JIAT89C52-20PI

AT89C52-20QI

44A44J40P6

44Q

Industrial(-40° C to 85° C)

24 5V ± 20% AT89C52-24ACAT89C52-24JCAT89C52-24PC

AT89C52-24QC

44A44J40P6

44Q

Commercial(0° C to 70° C)

AT89C52-24AIAT89C52-24JIAT89C52-24PI

AT89C52-24QI

44A44J40P6

44Q

Industrial(-40° C to 85° C)

AT89C52

Package Type

44A 44-lead, Thin Plastic Gull Wing Quad Flatpack (TQFP)

44J 44-lead, Plastic J-leaded Chip Carrier (PLCC)

40P6 40-lead, 0.600" Wide, Plastic Dual Inline Package (PDIP)

44Q 44-lead, Plastic Gull Wing Quad Flatpack (PQFP)

Page 131: FYP reportl

AT89C52

Packaging Information

Controlling dimension: millimeters

1.20(0.047) MAX

10.10(0.394)9.90(0.386)

SQ

12.21(0.478)11.75(0.458)

SQ

0.75(0.030)0.45(0.018)

0.15(0.006)0.05(0.002)

0.20(.008)0.09(.003)

07

0.80(0.031) BSC

PIN 1 ID

0.45(0.018)0.30(0.012)

JEDEC STANDARD MS-026 ACB

.045(1.14) X 45° PIN NO. 1IDENTIFY

.045(1.14) X 30° - 45° .012(.305).008(.203)

.021(.533)

.013(.330)

.630(16.0)

.590(15.0)

.043(1.09)

.020(.508)

.120(3.05)

.090(2.29).180(4.57).165(4.19)

.500(12.7) REF SQ

.032(.813)

.026(.660)

.050(1.27) TYP

.022(.559) X 45° MAX (3X)

.656(16.7)

.650(16.5)

.695(17.7)

.685(17.4)SQ

SQ

2.07(52.6)2.04(51.8) PIN

1

.566(14.4)

.530(13.5)

.090(2.29)MAX

.005(.127)MIN

.065(1.65)

.015(.381)

.022(.559)

.014(.356).065(1.65).041(1.04)

015

REF

.690(17.5)

.610(15.5)

.630(16.0)

.590(15.0)

.012(.305)

.008(.203)

.110(2.79)

.090(2.29)

.161(4.09)

.125(3.18)

SEATINGPLANE

.220(5.59)MAX

1.900(48.26) REF

Controlling dimension: millimeters

13.45 (0.525)12.95 (0.506)

0.50 (0.020)0.35 (0.014)

SQ

PIN 1 ID

0.80 (0.031) BSC

10.10 (0.394)9.90 (0.386) SQ

070.17 (0.007)

0.13 (0.005)

1.03 (0.041)0.78 (0.030)

2.45 (0.096) MAX

0.25 (0.010) MAX

44A, 44-lead, Thin (1.0 mm) Plastic Gull Wing Quad Flatpack (TQFP)Dimensions in Millimeters and (Inches)*

44J, 44-lead, Plastic J-leaded Chip Carrier (PLCC)Dimensions in Inches and (Millimeters)JEDEC STANDARD MS-018 AC

40P6, 40-lead, 0.600" Wide, Plastic Dual Inline Package (PDIP)Dimensions in Inches and (Millimeters)

44Q, 44-lead, Plastic Quad Flat Package (PQFP)Dimensions in Millimeters and (Inches)*JEDEC STANDARD MS-022 AB

Page 132: FYP reportl

© Atmel Corporation 1999.Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company’s standard war-ranty which is detailed in Atmel’s Terms and Conditions located on the Company’s web site. The Company assumes no responsibility forany errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time withoutnotice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual prop-erty of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel’s products arenot authorized for use as critical components in life support devices or systems.

Atmel Headquarters Atmel Operations

Corporate Headquarters2325 Orchard ParkwaySan Jose, CA 95131TEL (408) 441-0311FAX (408) 487-2600

EuropeAtmel U.K., Ltd.Coliseum Business CentreRiverside WayCamberley, Surrey GU15 3YLEnglandTEL (44) 1276-686-677FAX (44) 1276-686-697

AsiaAtmel Asia, Ltd.Room 1219Chinachem Golden Plaza77 Mody Road TsimhatsuiEast KowloonHong KongTEL (852) 2721-9778FAX (852) 2722-1369

JapanAtmel Japan K.K.9F, Tonetsu Shinkawa Bldg.1-24-8 ShinkawaChuo-ku, Tokyo 104-0033JapanTEL (81) 3-3523-3551FAX (81) 3-3523-7581

Atmel Colorado Springs1150 E. Cheyenne Mtn. Blvd.Colorado Springs, CO 80906TEL (719) 576-3300FAX (719) 540-1759

Atmel RoussetZone Industrielle13106 Rousset CedexFranceTEL (33) 4-4253-6000FAX (33) 4-4253-6001

Fax-on-DemandNorth America:1-(800) 292-8635

International:1-(408) 441-0732

[email protected]

Web Sitehttp://www.atmel.com

BBS1-(408) 436-4309

Printed on recycled paper.

0313H–02/00/xM

Marks bearing ® and/or ™ are registered trademarks and trademarks of Atmel Corporation.

Terms and product names in this document may be trademarks of others.

Page 133: FYP reportl

®

June 2001

ICL232+5V Powered, Dual RS-232 Transmitter/Receiver

File Number 3020.6

Features

• Meets All RS-232C and V.28 Specifications

• Requires Only Single +5V Power Supply

• Onboard Voltage Doubler/Inverter

• Low Power Consumption

• 2 Drivers- ±9V Output Swing for +5V lnput - 300Ω Power-off Source Impedance- Output Current Limiting - TTL/CMOS Compatible- 30V/µs Maximum Slew Rate

• 2 Receivers- ±30V Input Voltage Range- 3kΩ to 7kΩ Input Impedance- 0.5V Hysteresis to Improve Noise Rejection

• All Critical Parameters are Guaranteed Over the Entire Commercial, Industrial and Military Temperature Ranges

Applications• Any System Requiring RS-232 Communications Port

- Computer - Portable and Mainframe- Peripheral - Printers and Terminals- Portable Instrumentation- Modems

• Dataloggers

Description

The ICL232 is a dual RS-232 transmitter/receiver interfacecircuit that meets all ElA RS-232C and V.28 specifications. Itrequires a single +5V power supply, and features twoonboard charge pump voltage converters which generate+10V and -10V supplies from the 5V supply.

The drivers feature true TTL/CMOS input compatibility, slew-rate-limited output, and 300Ω power-off source impedance.The receivers can handle up to +30V, and have a 3kΩ to 7kΩinput impedance. The receivers also have hysteresis toimprove noise rejection.

Ordering Information

PART NUMBERTEMP.

RANGE (oC) PACKAGEPKG. NO.

ICL232CPE 0 to 70 16 Ld PDIP E16.3

ICL232CBE 0 to 70 16 Ld SOIC M16.3

ICL232lPE -40 to 85 16 Ld PDIP E16.3

ICL232lBE -40 to 85 16 Ld SOIC M16.3

ICL232MJE -55 to 125 16 Ld CERDIP F16.3

PinoutICL232 (PDIP, CERDIP, SOIC)

TOP VIEW

Functional Diagram

14

15

16

9

13

12

11

10

1

2

3

4

5

7

6

8

C1+

V+

C1-

C2+

C2-

V-

R2IN

T2OUT

VCC

T1OUT

R1IN

R1OUT

T1IN

T2IN

R2OUT

GND

+5V

2

16

T1OUT

T2OUT

T1IN

T2IN

11

10

14

7

R1OUT R1IN1312

R2OUT R2IN89

1µF

6+1µF

4

5

+1µF

1

3+

1µF

+

+1.0µF

15

VCC

V+

T1

T2+5V400kΩ

+5V400kΩ

R1 5kΩ

R2 5kΩ

+10V TO -10VVOLTAGE INVERTER V-

C2+

C2-

+5V TO 10VVOLTAGE INVERTER

C1+

C1-

CAUTION: These devices are sensitive to electrostatic discharge; follow proper IC Handling Procedures.1-888-INTERSIL or 321-724-7143 | Intersil (and design) is a registered trademark of Intersil Americas Inc.Copyright © Intersil Americas Inc. 2002. All Rights Reserved

Page 134: FYP reportl

Absolute Maximum Ratings Thermal Information

VCC to Ground . . . . . . . . . . . . . . . . . . . . . .(GND -0.3V) < VCC < 6VV+ to Ground . . . . . . . . . . . . . . . . . . . . . . . (VCC -0.3V) < V+ < 12VV- to Ground . . . . . . . . . . . . . . . . . . . . . . . -12V < V- < (GND +0.3V)Input Voltages

T1IN, T2IN. . . . . . . . . . . . . . . . . . . . (V- -0.3V) < VIN < (V+ +0.3V)R1IN, R2IN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ±30V

Output VoltagesT1OUT, T2OUT . . . . . . . . . . . . (V- -0.3V) < VTXOUT < (V+ +0.3V)R1OUT, R2OUT. . . . . . . . .(GND -0.3V) < VRXOUT < (VCC +0.3V)

Short Circuit DurationT1OUT, T2OUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ContinuousR1OUT, R2OUT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Continuous

Operating ConditionsTemperature Ranges

ICL232C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .0oC to 70oCICL232I . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -40oC to 85oCICL232M . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . -55oC to 125oC

Thermal Resistance (Typical, Note 1) θJA (oC/W) θJC (oC/W)CERDIP Package . . . . . . . . . . . . . . . . 80 18PDIP Package . . . . . . . . . . . . . . . . . . . 100 N/ASOIC Package. . . . . . . . . . . . . . . . . . . 100 N/A

Maximum Junction TemperaturePlastic Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150oCCeramic Package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175oC

Maximum Storage Temperature Range . . . . . . . . . . -65oC to 150oCMaximum Lead Temperature (Soldering 10s). . . . . . . . . . . . . 300oC

CAUTION: Stresses above those listed in “Absolute Maximum Ratings” may cause permanent damage to the device. This is a stress only rating and operationof the device at these or any other conditions above those indicated in the operational sections of this specification is not implied.

NOTE:

1. θJA is measured with the component mounted on an evaluation PC board in free air.

Electrical Specifications Test Conditions: VCC = +5V ±10%, TA = Operating Temperature Range. Test Circuit as in Figure 8 Unless Otherwise Specified

PARAMETER TEST CONDITIONS MIN TYP MAX UNITS

Transmitter Output Voltage Swing, TOUT T1OUT and T2OUT Loaded with 3kΩ to Ground

±5 ±9 ±10 V

Power Supply Current, ICC Outputs Unloaded, TA = 25oC - 5 10 mA

TIN, Input Logic Low, VlL - - 0.8 V

TIN, Input Logic High, VlH 2.0 - - V

Logic Pullup Current, IP T1IN, T2IN = 0V - 15 200 µA

RS-232 Input Voltage Range, VIN -30 - +30 V

Receiver Input Impedance, RIN VIN = ±3V 3.0 5.0 7.0 kΩ

Receiver Input Low Threshold, VlN (H-L) VCC = 5V, TA = 25oC 0.8 1.2 - V

Receiver Input High Threshold, VIN (L-H) VCC = 5V, TA = 25oC - 1.7 2.4 V

Receiver Input Hysteresis, VHYST 0.2 0.5 1.0 V

TTL/CMOS Receiver Output Voltage Low, VOL IOUT = 3.2mA - 0.1 0.4 V

TTL/CMOS Receiver Output Voltage High, VOH IOUT = -1.0mA 3.5 4.6 - V

Propagation Delay, tPD RS-232 to TTL - 0.5 - µs

Instantaneous Slew Rate, SR CL = 10pF, RL = 3kΩ, TA = 25oC (Notes 2, 3)

- - 30 V/µs

Transition Region Slew Rate, SRT RL = 3kΩ, CL = 2500pF Measured from +3V to -3V or -3V to +3V

- 3 - V/µs

Output Resistance, ROUT VCC = V+ = V- = 0V, VOUT = ±2V 300 - - Ω

RS-232 Output Short Circuit Current, ISC T1OUT or T2OUT Shorted to GND - ±10 - mA

NOTES:

2. Guaranteed by design.

3. See Figure 4 for definition.

ICL232

Page 135: FYP reportl

Test Circuits

FIGURE 1. GENERAL TEST CIRCUIT FIGURE 2. POWER-OFF SOURCE RESISTANCE CONFIGURATION

Typical Performance Curves

FIGURE 3. V+, V- OUTPUT IMPEDANCES vs VCC FIGURE 4. V+, V- OUTPUT VOLTAGES vs LOAD CURRENT

Pin DescriptionsPDIP, CERDIP SOIC PIN NAME DESCRIPTION

1 1 C1+ External capacitor “+” for internal voltage doubler.

2 2 V+ Internally generated +10V (typical) supply.

3 3 C1- External capacitor “-” for internal voltage doubler.

4 4 C2+ External capacitor “+” internal voltage inverter.

5 5 C2- External capacitor “-” internal voltage inverter.

6 6 V- Internally generated -10V (typical) supply.

7 7 T2OUT RS-232 Transmitter 2 output ±10V (typical).

8 8 R2IN RS-232 Receiver 2 input, with internal 5K pulldown resistor to GND.

9 9 R2out Receiver 2 TTL/CMOS output.

10 10 T2IN Transmitter 2 TTL/CMOS input, with internal 400K pullup resistor to VCC.

14

15

16

9

13

12

11

10

1

2

3

4

5

7

6

8

C1+

V+

C1-

C2+

C2-

V-

R2IN

T2OUT

VCC

T1OUT

R1IN

R1OUT

T1IN

T2IN

R2OUT

GND

+4.5V TO+5.5V INPUT

3kΩ

T1 OUTPUTRS-232±30V INPUTTTL/CMOSOUTPUT

TTL/CMOSINPUT

TTL/CMOSINPUT

TTL/CMOSOUTPUT

+

-1µFC3

+

-1µFC1

+

-1µFC2

+ -1µF C4

3kΩ

T2 OUTPUTRS-232

±30V INPUT

14

15

16

9

13

12

11

10

1

2

3

4

5

7

6

8

C1+

V+

C1-

C2+

C2-

V-

R2IN

T2OUT

VCC

T1OUT

R1IN

R1OUT

T1IN

T2IN

R2OUT

GND

T2OUT

T1OUT

VIN = ±2V A

ROUT = VIN/I

550

500

450

400

350

300

250

200

1503 4 5 6

INPUT SUPPLY VOLTAGE VCC (V)

V- SUPPLY

V+ SUPPLY

OPERATINGRANGE

GUARANTEED

TA = 25oC

EXTERNAL SUPPLY LOAD1kΩ BETWEEN V+ + GND OR V- + GND

TRANSMITTER OUTPUTOPEN CIRCUIT

V+,

V-

SU

PP

LY

IMP

ED

AN

CE

S (Ω

)

10

|ILOAD| (mA)

V+ (VCC = 4.5V)

V+ (VCC = 5V)

V- (VCC = 5V)V- (VCC = 4.5V)

TA = 25oC

TRANSMITTER OUTPUTSOPEN CIRCUIT

9876543210

OU

TP

UT

VO

LTA

GE

(|V

|)

3

10

9

8

7

6

5

4

ICL232

Page 136: FYP reportl

Detailed DescriptionThe ICL232 is a dual RS-232 transmitter/receiver powered bya single +5V power supply which meets all ElA RS232C spec-ifications and features low power consumption. The functionaldiagram illustrates the major elements of the ICL232. The cir-cuit is divided into three sections: a voltage doubler/inverter,dual transmitters, and dual receivers Voltage Converter.

An equivalent circuit of the dual charge pump is illustrated inFigure 5.

The voltage quadrupler contains two charge pumps which usetwo phases of an internally generated clock to generate +10Vand -10V. The nominal clock frequency is 16kHz. Duringphase one of the clock, capacitor C1 is charged to VCC.During phase two, the voltage on C1 is added to VCC,producing a signal across C2 equal to twice VCC. At the sametime, C3 is also charged to 2VCC, and then during phase one,it is inverted with respect to ground to produce a signal acrossC4 equal to -2VCC. The voltage converter accepts inputvoltages up to 5.5V. The output impedance of the doubler(V+) is approximately 200Ω, and the output impedance of theinverter (V-) is approximately 450Ω . Typical graphs arepresented which show the voltage converters output vs inputvoltage and output voltages vs load characteristics. The testcircuit (Figure 3) uses 1µF capacitors for C1-C4, however, thevalue is not critical. Increasing the values of C1 and C2 willlower the output impedance of the voltage doubler andinverter, and increasing the values of the reservoir capacitors,C3 and C4, lowers the ripple on the V+ and V- supplies.

Transmitters

The transmitters are TTL/CMOS compatible inverters whichtranslate the inputs to RS-232 outputs. The input logic thresh-old is about 26% of VCC , or 1.3V for VCC = 5V. A logic 1 atthe input results in a voltage of between -5V and V- at the out-put, and a logic 0 results in a voltage between +5V and (V+- 0.6V). Each transmitter input has an internal 400kΩ pullupresistor so any unused input can be left unconnected and itsoutput remains in its low state. The output voltage swingmeets the RS-232C specification of ±5V minimum with theworst case conditions of: both transmitters driving 3kΩ mini-mum load impedance, VCC = 4.5V, and maximum allowableoperating temperature. The transmitters have an internallylimited output slew rate which is less than 30V/µs. The outputsare short circuit protected and can be shorted to ground indef-initely. The powered down output impedance is a minimum of

11 11 T1IN Transmitter 1 TTL/CMOS input, with internal 400K pullup resistor to VCC.

12 12 R1OUT Receiver 1 TTL/CMOS output.

13 13 R1IN RS-232 Receiver 1 input, with internal 5K pulldown resistor to GND.

14 14 T1OUT RS-232 Transmitter 1 output ±10V (typical).

15 15 GND Supply Ground.

16 16 VCC Positive Power Supply +5V ±10%

Pin Descriptions (Continued)

PDIP, CERDIP SOIC PIN NAME DESCRIPTION

+

- C1+

-C3

+

-C2

+

-C4

S1 S2 S5 S6

S3 S4 S7 S8VCC GND

RCOSCILLATOR

VCC

GND

V+ = 2VCCGND

V- = -(V+)

C1+

C1- C2-

C2+

VOLTAGE INVERTERVOLTAGE DOUBLER

FIGURE 5. DUAL CHARGE PUMP

T1IN, T2IN

T1OUT, T2OUTVOH

VOLtrtf

90%10%

InstantaneousSlew Rate (SR) =

(0.8) (VOH - VOL)

tror

(0.8) (VOL - VOH)

tfFIGURE 6. SLEW RATE DEFINITION

ICL232

Page 137: FYP reportl

300Ω with ±2V applied to the outputs and VCC = 0V.

Receivers

The receiver inputs accept up to ±30V while presenting therequired 3kΩ to 7kΩ input impedance even it the power is off(VCC = 0V). The receivers have a typical input threshold of1.3V which is within the ±3V limits, known as the transitionregion, of the RS-232 specification. The receiver output is0V to VCC. The output will be low whenever the input isgreater than 2.4V and high whenever the input is floating ordriven between +0.8V and -30V. The receivers feature 0.5Vhysteresis to improve noise rejection.

ApplicationsThe ICL232 may be used for all RS-232 data terminal andcommunication links. It is particularly useful in applicationswhere ±12V power supplies are not available for conven-tional RS-232 interface circuits. The applications presentedrepresent typical interface configurations.

A simple duplex RS-232 port with CTS/RTS handshaking isillustrated in Figure 10. Fixed output signals such as DTR(data terminal ready) and DSRS (data signaling rate select)is generated by driving them through a 5kΩ resistor

connected to V+.

In applications requiring four RS-232 inputs and outputs(Figure 11), note that each circuit requires two charge pumpcapacitors (C1 and C2) but can share common reservoircapacitors (C3 and C4). The benefit of sharing common res-ervoir capacitors is the elimination of two capacitors and thereduction of the charge pump source impedance whicheffectively increases the output swing of the transmitters.

TOUT

V- < VTOUT < V+

300Ω400kΩ

TXIN

GND < TXIN < VCC

V-

V+

VCC

FIGURE 7. TRANSMITTER

ROUT

GND < VROUT < VCC5kΩ

RXIN

-30V < RXIN < +30V

GND

VCC

FIGURE 8. RECEIVER

T1IN, T2IN

VOH

VOLtPLHtPHL

Average Propagation Delay =tPHL + tPLH

2

ORR1IN, R2IN

T1OUT, T2OUTOR

R1OUT, R2OUT

FIGURE 9. PROPAGATION DELAY DEFINITION

-+

-+

-+

CTR (20) DATATERMINAL READYDSRS (24) DATASIGNALING RATE

RS-232INPUTS AND OUTPUTS

TD (2) TRANSMIT DATA

RTS (4) REQUEST TO SEND

RD (3) RECEIVE DATA

CTS (5) CLEAR TO SEND

SIGNAL GROUND (7)15

8

13

7

14

16

-+

6

R2 R1

T2

T1

9

12

10

11

4

5

3

1

ICL232

C11µF

C21µF

TD

RTS

RD

CTS

SELECT

+5V

INPUTSOUTPUTSTTL/CMOS

C31µF

C41µF

2 5kΩ

5kΩ

FIGURE 10. SIMPLE DUPLEX RS-232 PORT WITH CTS/RTS HANDSHAKING

ICL232

Page 138: FYP reportl

All Intersil U.S. products are manufactured, assembled and tested utilizing ISO9000 quality systems.Intersil Corporation’s quality certifications can be viewed at www.intersil.com/design/quality

Intersil products are sold by description only. Intersil Corporation reserves the right to make changes in circuit design, software and/or specifications at any time withoutnotice. Accordingly, the reader is cautioned to verify that data sheets are current before placing orders. Information furnished by Intersil is believed to be accurate andreliable. However, no responsibility is assumed by Intersil or its subsidiaries for its use; nor for any infringements of patents or other rights of third parties which may resultfrom its use. No license is granted by implication or otherwise under any patent or patent rights of Intersil or its subsidiaries.

For information regarding Intersil Corporation and its products, see www.intersil.com

-+

RS-232INPUTS AND

DTR (20) DATA TERMINAL

DSRS (24) DATA SIGNALING

DCD (8) DATA CARRIER

R1 (22) RING INDICATOR

SIGNAL GROUND (7)15

8

13

7

14

2

-+

4

R2 R1

T2

T1

9

12

10

11

3

1ICL232

C11µF

DTR

DSRS

DCD

R1

+5V

INPUTSOUTPUTSTTL/CMOS

-+

-+

TD (2) TRANSMIT DATA

RTS (4) REQUEST TO SEND

RD (3) RECEIVE DATA

CTS (5) CLEAR TO SEND8

13

7

14

15

R2 R1

T2

T1

9

12

10

11

4

53

1

ICL232C11µF

C21µF

TD

RTS

RD

CTS

INPUTSOUTPUTSTTL/CMOS

-+

5C21µF

16

C3

26

26

V- V+-+

C4

2µF

OUTPUTS

RATE SELECT

READY

DETECT

FIGURE 11. COMBINING TWO ICL232s FOR 4 PAIRS OF RS-232 INPUTS AND OUTPUTS

µF

Page 139: FYP reportl

©2002 Fairchild Semiconductor Corporation

www.fairchildsemi.com

Rev. 1.0.2

Features• High Current Drive Capability (200mA)• Adjustable Duty Cycle• Temperature Stability of 0.005%/°C• Timing From µSec to Hours• Turn off Time Less Than 2µSec

Applications• Precision Timing• Pulse Generation• Time Delay Generation• Sequential Timing

DescriptionThe LM555/NE555/SA555 is a highly stable controllercapable of producing accurate timing pulses. Withmonostable operation, the time delay is controlled by oneexternal resistor and one capacitor. With astable operation,the frequency and duty cycle are accurately controlled withtwo external resistors and one capacitor.

8-DIP

8-SOP

1

1

Internal Block Diagram

F/FOutPutStage

1

7

5

2

3

4

6

8R R R

Comp.

Comp.

Discharging Tr.

Vref

Vcc

Discharge

Threshold

ControlVoltage

GND

Trigger

Output

Reset

LM555/NE555/SA555Single Timer

Page 140: FYP reportl

LM555/NE555/SA555

Absolute Maximum Ratings (TA = 25°°°°C)Parameter Symbol Value UnitSupply Voltage VCC 16 VLead Temperature (Soldering 10sec) TLEAD 300 °CPower Dissipation PD 600 mWOperating Temperature Range LM555/NE555SA555 TOPR

0 ~ +70-40 ~ +85 °C

Storage Temperature Range TSTG -65 ~ +150 °C

Page 141: FYP reportl

LM555/NE555/SA555

Electrical Characteristics(TA = 25°C, VCC = 5 ~ 15V, unless otherwise specified)

Notes:1. Supply current when output is high is typically 1mA less at VCC = 5V2. Tested at VCC = 5.0V and VCC = 15V3. This will determine maximum value of RA + RB for 15V operation, the max. total R = 20MΩ, and for 5V operation the max.

total R = 6.7MΩ

Parameter Symbol Conditions Min. Typ. Max. UnitSupply Voltage VCC - 4.5 - 16 V

Supply Current *1(Low Stable) ICCVCC = 5V, RL = ∞ - 3 6 mAVCC = 15V, RL = ∞ - 7.5 15 mA

Timing Error *2 (Monostable)Initial AccuracyDrift with TemperatureDrift with Supply Voltage

ACCUR∆t/∆T

∆t/∆VCC

RA = 1kΩ to100kΩC = 0.1µF

- 1.0500.1

3.0

0.5

%ppm/°C

%/V

Timing Error *2(Astable)Intial AccuracyDrift with TemperatureDrift with Supply Voltage

ACCUR∆t/∆T

∆t/∆VCC

RA = 1kΩ to 100kΩC = 0.1µF

- 2.251500.3

- %ppm/°C

%/V

Control Voltage VCVCC = 15V 9.0 10.0 11.0 VVCC = 5V 2.6 3.33 4.0 V

Threshold Voltage VTHVCC = 15V - 10.0 - VVCC = 5V - 3.33 - V

Threshold Current *3 ITH - - 0.1 0.25 µA

Trigger Voltage VTRVCC = 5V 1.1 1.67 2.2 VVCC = 15V 4.5 5 5.6 V

Trigger Current ITR VTR = 0V 0.01 2.0 µAReset Voltage VRST - 0.4 0.7 1.0 VReset Current IRST - 0.1 0.4 mA

Low Output Voltage VOL

VCC = 15VISINK = 10mAISINK = 50mA

- 0.060.3

0.250.75

VV

VCC = 5VISINK = 5mA - 0.05 0.35 V

High Output Voltage VOH

VCC = 15VISOURCE = 200mAISOURCE = 100mA 12.75

12.513.3

- VV

VCC = 5VISOURCE = 100mA 2.75 3.3 - V

Rise Time of Output tR - - 100 - nsFall Time of Output tF - - 100 - nsDischarge Leakage Current ILKG - - 20 100 nA

Page 142: FYP reportl

LM555/NE555/SA555

Application InformationTable 1 below is the basic operating table of 555 timer:

When the low signal input is applied to the reset terminal, the timer output remains low regardless of the threshold voltage or the trigger voltage. Only when the high signal is applied to the reset terminal, timer's output changes according to threshold voltage and trigger voltage.When the threshold voltage exceeds 2/3 of the supply voltage while the timer output is high, the timer's internal discharge Tr. turns on, lowering the threshold voltage to below 1/3 of the supply voltage. During this time, the timer output is maintained low. Later, if a low signal is applied to the trigger voltage so that it becomes 1/3 of the supply voltage, the timer's internal discharge Tr. turns off, increasing the threshold voltage and driving the timer output again at high.

1. Monostable Operation

Table 1. Basic Operating TableThreshold Voltage

(Vth)(PIN 6)Trigger Voltage

(Vtr)(PIN 2) Reset(PIN 4) Output(PIN 3) Discharging Tr.(PIN 7)

Don't care Don't care Low Low ONVth > 2Vcc / 3 Vth > 2Vcc / 3 High Low ON

Vcc / 3 < Vth < 2 Vcc / 3 Vcc / 3 < Vth < 2 Vcc / 3 High - -Vth < Vcc / 3 Vth < Vcc / 3 High High OFF

10-5 10-4 10-3 10-2 10-1 100 101 10210-3

10-2

10-1

100

101

102

10M

ΩΩΩΩ

1MΩΩΩΩ10

kΩΩΩΩ10

0kΩΩΩΩ

R A=1k

ΩΩΩΩ

C

apac

itanc

e(uF

)

Time Delay(s)

Figure 1. Monoatable Circuit Figure 2. Resistance and Capacitance vs. Time delay(td)

Figure 3. Waveforms of Monostable Operation

1

5

6

7

84

2

3

RESET VccDISCH

THRES

CONTGND

OUT

TRIG

+Vcc

RA

C1

C2RL

Trigger

Page 143: FYP reportl

LM555/NE555/SA555

Figure 1 illustrates a monostable circuit. In this mode, the timer generates a fixed pulse whenever the trigger voltage falls below Vcc/3. When the trigger pulse voltage applied to the #2 pin falls below Vcc/3 while the timer output is low, the timer's internal flip-flop turns the discharging Tr. off and causes the timer output to become high by charging the external capacitor C1and setting the flip-flop output at the same time. The voltage across the external capacitor C1, VC1 increases exponentially with the time constant t=RA*C and reaches 2Vcc/3 at td=1.1RA*C. Hence, capacitor C1 is charged through resistor RA. The greater the time constant RAC, the longer it takes for the VC1 to reach 2Vcc/3. In other words, the time constant RAC controls the output pulse width. When the applied voltage to the capacitor C1 reaches 2Vcc/3, the comparator on the trigger terminal resets the flip-flop, turning the discharging Tr. on. At this time, C1 begins to discharge and the timer output converts to low.In this way, the timer operating in monostable repeats the above process. Figure 2 shows the time constant relationship based on RA and C. Figure 3 shows the general waveforms during monostable operation. It must be noted that, for normal operation, the trigger pulse voltage needs to maintain a minimum of Vcc/3 before the timer output turns low. That is, although the output remains unaffected even if a different trigger pulse is applied while the output is high, it may be affected and the waveform not operate properly if the trigger pulse voltage at the end of the output pulse remains at below Vcc/3. Figure 4 shows such timer output abnormality.

2. Astable Operation

Figure 4. Waveforms of Monostable Operation (abnormal)

100m 1 10 100 1k 10k 100k1E-3

0.01

0.1

1

10

100

10M

1M

100k

10k

1k

(RA+2RB)

Cap

acita

nce(

uF)

Frequency(Hz)

Figure 5. Astable Circuit Figure 6. Capacitance and Resistance vs. Frequency

1

5

6

7

84

2

3

RESET VccDISCH

THRES

CONTGND

OUT

TRIG

+Vcc

RA

C1

C2RL

RB

Page 144: FYP reportl

LM555/NE555/SA555

An astable timer operation is achieved by adding resistor RB to Figure 1 and configuring as shown on Figure 5. In astable operation, the trigger terminal and the threshold terminal are connected so that a self-trigger is formed, operating as a multi vibrator. When the timer output is high, its internal discharging Tr. turns off and the VC1 increases by exponential function with the time constant (RA+RB)*C. When the VC1, or the threshold voltage, reaches 2Vcc/3, the comparator output on the trigger terminal becomes high,resetting the F/F and causing the timer output to become low. This in turn turns on the discharging Tr. and the C1 discharges through the discharging channel formed by RB and the discharging Tr. When the VC1 falls below Vcc/3, the comparator output on the trigger terminal becomes high and the timer output becomes high again. The discharging Tr. turns off and the VC1 rises again. In the above process, the section where the timer output is high is the time it takes for the VC1 to rise from Vcc/3 to 2Vcc/3, and the section where the timer output is low is the time it takes for the VC1 to drop from 2Vcc/3 to Vcc/3. When timer output is high, the equivalent circuit for charging capacitor C1 is as follows:

Since the duration of the timer output high state(tH) is the amount of time it takes for the VC1(t) to reach 2Vcc/3,

Figure 7. Waveforms of Astable Operation

Vcc

RA RB

C1 Vc1(0-)=Vcc/3

C1dvc1

dt-------------

Vcc V 0-( )–

RA RB+-------------------------------= 1( )

VC1 0+( ) VCC 3⁄= 2( )

VC1 t( ) VCC 1 23---e

- tRA RB+( )C1

------------------------------------–

= 3( )

Page 145: FYP reportl

LM555/NE555/SA555

The equivalent circuit for discharging capacitor C1 when timer output is low as follows:

Since the duration of the timer output low state(tL) is the amount of time it takes for the VC1(t) to reach Vcc/3,

Since RD is normally RB>>RD although related to the size of discharging Tr.,tL=0.693RBC1 (10)

Consequently, if the timer operates in astable, the period is the same with 'T=tH+tL=0.693(RA+RB)C1+0.693RBC1=0.693(RA+2RB)C1' because the period is the sum of the charge time and discharge time. And since frequency is the reciprocal of the period, the following applies.

3. Frequency dividerBy adjusting the length of the timing cycle, the basic circuit of Figure 1 can be made to operate as a frequency divider. Figure 8. illustrates a divide-by-three circuit that makes use of the fact that retriggering cannot occur during the timing cycle.

VC1 t( ) 23---VCC V=

CC1 2

3---e

-tH

RA RB+( )C1------------------------------------–

= 4( )

tH C1 RA RB+( )In2 0.693 RA RB+( )C1== 5( )

C1

RB

RDVC1(0-)=2Vcc/3

C1dvC1

dt-------------- 1

RA RB+-----------------------VC1 0=+ 6( )

VC1 t( ) 23---V

CCe

- tRA RD+( )C1

-------------------------------------

= 7( )

13---VCC

23---V

CCe

-tL

RA RD+( )C1-------------------------------------

= 8( )

tL C1 RB RD+( )In2 0.693 RB RD+( )C1== 9( )

frequency, f 1T--- 1.44

RA 2RB+( )C1----------------------------------------= = 11( )

Page 146: FYP reportl

LM555/NE555/SA555

4. Pulse Width ModulationThe timer output waveform may be changed by modulating the control voltage applied to the timer's pin 5 and changing the reference of the timer's internal comparators. Figure 9. illustrates the pulse width modulation circuit.When the continuous trigger pulse train is applied in the monostable mode, the timer output width is modulated according to the signal applied to the control terminal. Sine wave as well as other waveforms may be applied as a signal to the control terminal. Figure 10 shows an example of pulse width modulation waveform.

5. Pulse Position ModulationIf the modulating signal is applied to the control terminal while the timer is connected for astable operation as in Figure 11, the timer becomes a pulse position modulator.In the pulse position modulator, the reference of the timer's internal comparators is modulated which in turn modulates the timer output according to the modulation signal applied to the control terminal.Figure 12 illustrates a sine wave for modulation signal and the resulting output pulse position modulation : however, any wave shape could be used.

Figure 8. Waveforms of Frequency Divider Operation

Figure 9. Circuit for Pulse Width Modulation Figure 10. Waveforms of Pulse Width Modulation

84

7

1

2

3

5

6

CONTGND

Vcc

DISCH

THRES

RESET

TRIG

OUT

+Vcc

Trigger

RA

C

OutputInput

Page 147: FYP reportl

LM555/NE555/SA555

6. Linear RampWhen the pull-up resistor RA in the monostable circuit shown in Figure 1 is replaced with constant current source, the VC1 increases linearly, generating a linear ramp. Figure 13 shows the linear ramp generating circuit and Figure 14 illustrates the generated linear ramp waveforms.

In Figure 13, current source is created by PNP transistor Q1 and resistor R1, R2, and RE.

For example, if Vcc=15V, RE=20kΩ, R1=5kW, R2=10kΩ, and VBE=0.7V, VE=0.7V+10V=10.7VIc=(15-10.7)/20k=0.215mA

84

7

1

2

3

5

6

CONTGND

Vcc

DISCH

THRES

RESET

TRIG

OUT

+Vcc

RA

C

RB

Modulation

Output

Figure 11. Circuit for Pulse Position Modulation Figure 12. Waveforms of pulse position modulation

Figure 13. Circuit for Linear Ramp Figure 14. Waveforms of Linear Ramp

1

5

6

7

84

2

3

RESET VccDISCH

THRES

CONTGND

OUT

TRIG

+Vcc

C2

R1

R2

C1

Q1

Output

RE

ICVCC VE–

RE---------------------------= 12( )

Here, VE is

VE VBER2

R1 R2+----------------------VCC+= 13( )

Page 148: FYP reportl

LM555/NE555/SA555

When the trigger is started in a timer configured as shown in Figure 13, the current flowing to capacitor C1 becomes a constant current generated by PNP transistor and resistors. Hence, the VC is a linear ramp function as shown in Figure 14. The gradient S of the linear ramp function is defined as follows:

Here the Vp-p is the peak-to-peak voltage.If the electric charge amount accumulated in the capacitor is divided by the capacitance, the VC comes out as follows:

V=Q/C (15)

The above equation divided on both sides by T gives us

and may be simplified into the following equation.

S=I/C (17)

In other words, the gradient of the linear ramp function appearing across the capacitor can be obtained by using the constant current flowing through the capacitor. If the constant current flow through the capacitor is 0.215mA and the capacitance is 0.02uF, the gradient of the ramp function at both ends of the capacitor is S = 0.215m/0.022u = 9.77V/ms.

SVp p–

T----------------= 14( )

VT---- Q T⁄

C------------= 16( )

Page 149: FYP reportl

LM555/NE555/SA555

Mechanical DimensionsPackage

Dimensions in millimeters

6.40 ±0.20

3.30 ±0.30

0.130 ±0.012

3.40 ±0.20

0.134 ±0.008

#1

#4 #5

#8

0.252 ±0.008

9.20

±0.

20

0.79

2.54

0.10

0

0.03

1(

)

0.46

±0.

10

0.01

8 ±0

.004

0.06

0 ±0

.004

1.52

4 ±0

.10

0.36

2 ±0

.008

9.60

0.37

8M

AX

5.080.200

0.330.013

7.62

0~15°

0.300

MAX

MIN

0.25+0.10–0.05

0.010+0.004–0.002

8-DIP

Page 150: FYP reportl

LM555/NE555/SA555

Mechanical Dimensions (Continued)

PackageDimensions in millimeters

4.9

2 ±

0.2

0

0.1

94

±0.0

08

0.4

1 ±

0.1

0

0.0

16

±0.0

04

1.2

70

.05

0

5.720.225

1.55 ±0.20

0.061 ±0.008

0.1~0.250.004~0.001

6.00 ±0.30

0.236 ±0.012

3.95 ±0.20

0.156 ±0.008

0.50 ±0.20

0.020 ±0.008

5.1

30

.20

2M

AX

#1

#4 #5

0~8°

#8

0.5

60.0

22

()

1.800.071

MA

X0.1

0M

AX

0.0

04

MAX

MIN

+0.1

0-0

.05

0.1

5

+0.0

04

-0.0

02

0.0

06

8-SOP

Page 151: FYP reportl

LM555/NE555/SA555

Ordering InformationProduct Number Package Operating Temperature

LM555CN 8-DIP0 ~ +70°C

LM555CM 8-SOP

Product Number Package Operating TemperatureNE555N 8-DIP

0 ~ +70°CNE555D 8-SOP

Product Number Package Operating TemperatureSA555 8-DIP

-40 ~ +85°CSA555D 8-SOP

Page 152: FYP reportl

LM555/NE555/SA555

7/16/02 0.0m 001Stock#DSxxxxxxxx

2002 Fairchild Semiconductor Corporation

LIFE SUPPORT POLICY FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION. As used herein:

1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury of the user.

2. A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness.

www.fairchildsemi.com

DISCLAIMER FAIRCHILD SEMICONDUCTOR RESERVES THE RIGHT TO MAKE CHANGES WITHOUT FURTHER NOTICE TO ANY PRODUCTS HEREIN TO IMPROVE RELIABILITY, FUNCTION OR DESIGN. FAIRCHILD DOES NOT ASSUME ANY LIABILITY ARISING OUT OF THE APPLICATION OR USE OF ANY PRODUCT OR CIRCUIT DESCRIBED HEREIN; NEITHER DOES IT CONVEY ANY LICENSE UNDER ITS PATENT RIGHTS, NOR THE RIGHTS OF OTHERS.

Page 153: FYP reportl

©2001 Fairchild Semiconductor Corporation

www.fairchildsemi.com

Rev. 1.0.1

Features• Output Current up to 1A • Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V • Thermal Overload Protection • Short Circuit Protection• Output Transistor Safe Operating Area Protection

DescriptionThe MC78XX/LM78XX/MC78XXA series of three terminal positive regulators are available in the TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting,thermal shut down and safe operating area protection, making it essentially indestructible. If adequate heat sinkingis provided, they can deliver over 1A output current.Although designed primarily as fixed voltage regulators,these devices can be used with external components toobtain adjustable voltages and currents.

TO-220

D-PAK

1. Input 2. GND 3. Output

1

1

Internal Block Digram

MC78XX/LM78XX/MC78XXA3-Terminal 1A Positive Voltage Regulator

Page 154: FYP reportl

MC78XX/LM78XX/MC78XXA

Absolute Maximum Ratings

Electrical Characteristics (MC7805/LM7805)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI = 10V, CI= 0.33µF, CO= 0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in Vo due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Value UnitInput Voltage (for VO = 5V to 18V)(for VO = 24V)

VIVI

3540

VV

Thermal Resistance Junction-Cases (TO-220) RθJC 5 oC/WThermal Resistance Junction-Air (TO-220) RθJA 65 oC/WOperating Temperature Range TOPR 0 ~ +125 oCStorage Temperature Range TSTG -65 ~ +150 oC

Parameter Symbol ConditionsMC7805/LM7805

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 4.8 5.0 5.25.0mA ≤ Io ≤ 1.0A, PO ≤ 15WVI = 7V to 20V 4.75 5.0 5.25 V

Line Regulation (Note1) Regline TJ=+25 oCVO = 7V to 25V - 4.0 100

mVVI = 8V to 12V - 1.6 50

Load Regulation (Note1) Regload TJ=+25 oCIO = 5.0mA to1.5A - 9 100

mVIO =250mA to 750mA - 4 50

Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - 0.03 0.5

mAVI= 7V to 25V - 0.3 1.3

Output Voltage Drift ∆VO/∆T IO= 5mA - -0.8 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA=+25 oC - 42 - µV/Vo

Ripple Rejection RR f = 120HzVO = 8V to 18V 62 73 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - VOutput Resistance rO f = 1KHz - 15 - mΩShort Circuit Current ISC VI = 35V, TA =+25 oC - 230 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 155: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7806)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =11V, CI= 0.33µF, CO= 0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7806

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 5.75 6.0 6.255.0mA ≤ IO ≤ 1.0A, PO ≤ 15WVI = 8.0V to 21V 5.7 6.0 6.3 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 8V to 25V - 5 120

mVVI = 9V to 13V - 1.5 60

Load Regulation (Note1) Regload TJ =+25 oCIO =5mA to 1.5A - 9 120

mVIO =250mA to750A - 3 60

Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1A - - 0.5

mAVI = 8V to 25V - - 1.3

Output Voltage Drift ∆VO/∆T IO = 5mA - -0.8 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 45 - µV/Vo

Ripple Rejection RR f = 120HzVI = 9V to 19V 59 75 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - VOutput Resistance rO f = 1KHz - 19 - mΩShort Circuit Current ISC VI= 35V, TA=+25 oC - 250 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 156: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7808)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =14V, CI= 0.33µF, CO= 0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7808

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 7.7 8.0 8.35.0mA ≤ IO ≤ 1.0A, PO ≤ 15WVI = 10.5V to 23V 7.6 8.0 8.4 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 10.5V to 25V - 5.0 160

mVVI = 11.5V to 17V - 2.0 80

Load Regulation (Note1) Regload TJ =+25 oCIO = 5.0mA to 1.5A - 10 160

mVIO= 250mA to 750mA - 5.0 80

Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - 0.05 0.5

mAVI = 10.5A to 25V - 0.5 1.0

Output Voltage Drift ∆VO/∆T IO = 5mA - -0.8 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 52 - µV/VoRipple Rejection RR f = 120Hz, VI= 11.5V to 21.5V 56 73 - dBDropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25 oC - 230 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 157: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7809)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =15V, CI= 0.33µF, CO= 0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7809

UnitMin. Typ. Max.

Output Voltage VOTJ =+25°C 8.65 9 9.355.0mA≤ IO ≤1.0A, PO ≤15WVI= 11.5V to 24V 8.6 9 9.4 V

Line Regulation (Note1) Regline TJ=+25°CVI = 11.5V to 25V - 6 180

mVVI = 12V to 17V - 2 90

Load Regulation (Note1) Regload TJ=+25°CIO = 5mA to 1.5A - 12 180

mVIO = 250mA to 750mA - 4 90

Quiescent Current IQ TJ=+25°C - 5.0 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - - 0.5

mAVI = 11.5V to 26V - - 1.3

Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ °COutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 °C - 58 - µV/VoRipple Rejection RR f = 120Hz

VI = 13V to 23V 56 71 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25°C - 2 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25°C - 250 - mAPeak Current IPK TJ= +25°C - 2.2 - A

Page 158: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7810)(Refer to test circuit ,0°C< TJ < 125°C, IO = 500mA, VI =16V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7810

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 °C 9.6 10 10.45.0mA ≤ IO≤1.0A, PO ≤15WVI = 12.5V to 25V 9.5 10 10.5 V

Line Regulation (Note1) Regline TJ =+25°CVI = 12.5V to 25V - 10 200

mVVI = 13V to 25V - 3 100

Load Regulation (Note1) Regload TJ =+25°CIO = 5mA to 1.5A - 12 200

mVIO = 250mA to 750mA - 4 400

Quiescent Current IQ TJ =+25°C - 5.1 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - - 0.5

mAVI = 12.5V to 29V - - 1.0

Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/°COutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 °C - 58 - µV/Vo

Ripple Rejection RR f = 120HzVI = 13V to 23V 56 71 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25 °C - 2 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI = 35V, TA=+25 °C - 250 - mAPeak Current IPK TJ =+25 °C - 2.2 - A

Page 159: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7812)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =19V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7812

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 11.5 12 12.55.0mA ≤ IO≤1.0A, PO≤15WVI = 14.5V to 27V 11.4 12 12.6 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 14.5V to 30V - 10 240

mVVI = 16V to 22V - 3.0 120

Load Regulation (Note1) Regload TJ =+25 oCIO = 5mA to 1.5A - 11 240

mVIO = 250mA to 750mA - 5.0 120

Quiescent Current IQ TJ =+25 oC - 5.1 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - 0.1 0.5

mAVI = 14.5V to 30V - 0.5 1.0

Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 76 - µV/Vo

Ripple Rejection RR f = 120HzVI = 15V to 25V 55 71 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - VOutput Resistance rO f = 1KHz - 18 - mΩShort Circuit Current ISC VI = 35V, TA=+25 oC - 230 - mAPeak Current IPK TJ = +25 oC - 2.2 - A

Page 160: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7815)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =23V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7815

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 14.4 15 15.65.0mA ≤ IO ≤ 1.0A, PO ≤ 15WVI = 17.5V to 30V 14.25 15 15.75 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 17.5V to 30V - 11 300

mVVI = 20V to 26V - 3 150

Load Regulation (Note1) Regload TJ =+25 oCIO = 5mA to 1.5A - 12 300

mVIO = 250mA to 750mA - 4 150

Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - - 0.5

mAVI = 17.5V to 30V - - 1.0

Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 90 - µV/Vo

Ripple Rejection RR f = 120HzVI = 18.5V to 28.5V 54 70 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - VOutput Resistance rO f = 1KHz - 19 - mΩShort Circuit Current ISC VI = 35V, TA=+25 oC - 250 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 161: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7818)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =27V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7818

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 17.3 18 18.75.0mA ≤ IO ≤1.0A, PO ≤15WVI = 21V to 33V 17.1 18 18.9 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 21V to 33V - 15 360

mVVI = 24V to 30V - 5 180

Load Regulation (Note1) Regload TJ =+25 oCIO = 5mA to 1.5A - 15 360

mVIO = 250mA to 750mA - 5.0 180

Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - - 0.5

mAVI = 21V to 33V - - 1

Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 110 - µV/Vo

Ripple Rejection RR f = 120HzVI = 22V to 32V 53 69 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - VOutput Resistance rO f = 1KHz - 22 - mΩShort Circuit Current ISC VI = 35V, TA=+25 oC - 250 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 162: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7824)(Refer to test circuit ,0°C < TJ < 125°C, IO = 500mA, VI =33V, CI= 0.33µF, CO=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol ConditionsMC7824

UnitMin. Typ. Max.

Output Voltage VOTJ =+25 oC 23 24 255.0mA ≤ IO ≤ 1.0A, PO ≤ 15WVI = 27V to 38V 22.8 24 25.25 V

Line Regulation (Note1) Regline TJ =+25 oCVI = 27V to 38V - 17 480

mVVI = 30V to 36V - 6 240

Load Regulation (Note1) Regload TJ =+25 oCIO = 5mA to 1.5A - 15 480

mVIO = 250mA to 750mA - 5.0 240

Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA

Quiescent Current Change ∆IQIO = 5mA to 1.0A - 0.1 0.5

mAVI = 27V to 38V - 0.5 1

Output Voltage Drift ∆VO/∆T IO = 5mA - -1.5 - mV/ oCOutput Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 60 - µV/Vo

Ripple Rejection RR f = 120HzVI = 28V to 38V 50 67 - dB

Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - VOutput Resistance rO f = 1KHz - 28 - mΩShort Circuit Current ISC VI = 35V, TA=+25 oC - 230 - mAPeak Current IPK TJ =+25 oC - 2.2 - A

Page 163: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7805A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 10V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VOTJ =+25 oC 4.9 5 5.1

VIO = 5mA to 1A, PO ≤ 15WVI = 7.5V to 20V 4.8 5 5.2

Line Regulation (Note1) Regline

VI = 7.5V to 25VIO = 500mA - 5 50

mVVI = 8V to 12V - 3 50

TJ =+25 oCVI= 7.3V to 20V - 5 50VI= 8V to 12V - 1.5 25

Load Regulation (Note1) Regload

TJ =+25 oCIO = 5mA to 1.5A - 9 100

mVIO = 5mA to 1A - 9 100IO = 250mA to 750mA - 4 50

Quiescent Current IQ TJ =+25 oC - 5.0 6 mA

Quiescent Current Change ∆IQ

IO = 5mA to 1A - - 0.5mAVI = 8 V to 25V, IO = 500mA - - 0.8

VI = 7.5V to 20V, TJ =+25 oC - - 0.8Output Voltage Drift ∆V/∆T Io = 5mA - -0.8 - mV/ oC

Output Noise Voltage VNf = 10Hz to 100KHzTA =+25 oC - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mAVI = 8V to 18V - 68 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25 oC - 250 - mAPeak Current IPK TJ= +25 oC - 2.2 - A

Page 164: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7806A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I =11V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VOTJ =+25 oC 5.58 6 6.12

VIO = 5mA to 1A, PO ≤ 15WVI = 8.6V to 21V 5.76 6 6.24

Line Regulation (Note1) Regline

VI= 8.6V to 25VIO = 500mA - 5 60

mVVI= 9V to 13V - 3 60

TJ =+25 oCVI= 8.3V to 21V - 5 60VI= 9V to 13V - 1.5 30

Load Regulation (Note1) Regload

TJ =+25 oCIO = 5mA to 1.5A - 9 100

mVIO = 5mA to 1A - 4 100IO = 250mA to 750mA - 5.0 50

Quiescent Current IQ TJ =+25 oC - 4.3 6 mA

Quiescent Current Change ∆IQ

IO = 5mA to 1A - - 0.5mAVI = 9V to 25V, IO = 500mA - - 0.8

VI= 8.5V to 21V, TJ =+25 oC - - 0.8Output Voltage Drift ∆V/∆T IO = 5mA - -0.8 - mV/ oC

Output Noise Voltage VNf = 10Hz to 100KHzTA =+25 oC - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mAVI = 9V to 19V - 65 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25 oC - 250 - mAPeak Current IPK TJ=+25 oC - 2.2 - A

Page 165: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7808A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 14V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VOTJ =+25 oC 7.84 8 8.16

VIO = 5mA to 1A, PO ≤15WVI = 10.6V to 23V 7.7 8 8.3

Line Regulation (Note1) Regline

VI= 10.6V to 25VIO = 500mA - 6 80

mVVI= 11V to 17V - 3 80

TJ =+25 oCVI= 10.4V to 23V - 6 80VI= 11V to 17V - 2 40

Load Regulation (Note1) Regload

TJ =+25 oCIO = 5mA to 1.5A - 12 100

mVIO = 5mA to 1A - 12 100IO = 250mA to 750mA - 5 50

Quiescent Current IQ TJ =+25 oC - 5.0 6 mA

Quiescent Current Change ∆IQIO = 5mA to 1A - - 0.5

mAVI = 11V to 25V, IO = 500mA - - 0.8VI= 10.6V to 23V, TJ =+25 oC - - 0.8

Output Voltage Drift ∆V/∆T IO = 5mA - -0.8 - mV/ oC

Output Noise Voltage VNf = 10Hz to 100KHzTA =+25 oC - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mAVI = 11.5V to 21.5V - 62 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - VOutput Resistance rO f = 1KHz - 18 - mΩShort Circuit Current ISC VI= 35V, TA =+25 oC - 250 - mAPeak Current IPK TJ=+25 oC - 2.2 - A

Page 166: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7809A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 15V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant, junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VOTJ =+25°C 8.82 9.0 9.18

VIO = 5mA to 1A, PO≤15WVI = 11.2V to 24V 8.65 9.0 9.35

Line Regulation (Note1) Regline

VI= 11.7V to 25VIO = 500mA - 6 90

mVVI= 12.5V to 19V - 4 45

TJ =+25°C VI= 11.5V to 24V - 6 90 VI= 12.5V to 19V - 2 45

Load Regulation (Note1) Regload

TJ =+25°CIO = 5mA to 1.0A - 12 100

mVIO = 5mA to 1.0A - 12 100IO = 250mA to 750mA - 5 50

Quiescent Current IQ TJ =+25 °C - 5.0 6.0 mA

Quiescent Current Change ∆IQ

VI = 11.7V to 25V, TJ=+25 °C - - 0.8mAVI = 12V to 25V, IO = 500mA - - 0.8

IO = 5mA to 1.0A - - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.0 - mV/ °C

Output Noise Voltage VNf = 10Hz to 100KHzTA =+25 °C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mAVI = 12V to 22V - 62 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 °C - 2.0 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25 °C - 250 - mAPeak Current IPK TJ=+25°C - 2.2 - A

Page 167: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7810A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 16V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VO TJ =+25°C 9.8 10 10.2

V IO = 5mA to 1A, PO ≤ 15W VI =12.8V to 25V 9.6 10 10.4

Line Regulation (Note1) Regline

VI= 12.8V to 26V IO = 500mA - 8 100

mV VI= 13V to 20V - 4 50

TJ =+25 °C VI= 12.5V to 25V - 8 100 VI= 13V to 20V - 3 50

Load Regulation (Note1) Regload

TJ =+25 °C IO = 5mA to 1.5A - 12 100

mV IO = 5mA to 1.0A - 12 100 IO = 250mA to 750mA - 5 50

Quiescent Current IQ TJ =+25 °C - 5.0 6.0 mA

Quiescent Current Change ∆IQ

VI = 13V to 26V, TJ=+25 °C - - 0.5mA VI = 12.8V to 25V, IO = 500mA - - 0.8

IO = 5mA to 1.0A - - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.0 - mV/ °C

Output Noise Voltage VN f = 10Hz to 100KHz TA =+25 °C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mA VI = 14V to 24V - 62 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25°C - 2.0 - VOutput Resistance rO f = 1KHz - 17 - mΩShort Circuit Current ISC VI= 35V, TA =+25 °C - 250 - mAPeak Current IPK TJ=+25 °C - 2.2 - A

Page 168: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7812A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 19V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VO TJ =+25 °C 11.75 12 12.25

V IO = 5mA to 1A, PO ≤15W VI = 14.8V to 27V 11.5 12 12.5

Line Regulation (Note1) Regline

VI= 14.8V to 30V IO = 500mA - 10 120

mV VI= 16V to 22V - 4 120

TJ =+25 °C VI= 14.5V to 27V - 10 120 VI= 16V to 22V - 3 60

Load Regulation (Note1) Regload

TJ =+25 °C IO = 5mA to 1.5A - 12 100

mV IO = 5mA to 1.0A - 12 100 IO = 250mA to 750mA - 5 50

Quiescent Current IQ TJ =+25°C - 5.1 6.0 mA

Quiescent Current Change ∆IQ

VI = 15V to 30V, TJ=+25 °C - 0.8mA VI = 14V to 27V, IO = 500mA - 0.8

IO = 5mA to 1.0A - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.0 - mV/°C

Output Noise Voltage VN f = 10Hz to 100KHz TA =+25°C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mA VI = 14V to 24V - 60 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25°C - 2.0 - VOutput Resistance rO f = 1KHz - 18 - mΩShort Circuit Current ISC VI= 35V, TA =+25 °C - 250 - mAPeak Current IPK TJ=+25 °C - 2.2 - A

Page 169: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7815A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I =23V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VO TJ =+25 °C 14.7 15 15.3

V IO = 5mA to 1A, PO ≤15W VI = 17.7V to 30V 14.4 15 15.6

Line Regulation (Note1) Regline

VI= 17.9V to 30V IO = 500mA - 10 150

mV VI= 20V to 26V - 5 150

TJ =+25°C VI= 17.5V to 30V - 11 150 VI= 20V to 26V - 3 75

Load Regulation (Note1) Regload

TJ =+25 °C IO = 5mA to 1.5A - 12 100

mV IO = 5mA to 1.0A - 12 100 IO = 250mA to 750mA - 5 50

Quiescent Current IQ TJ =+25 °C - 5.2 6.0 mA

Quiescent Current Change ∆IQ

VI = 17.5V to 30V, TJ =+25 °C - - 0.8mA VI = 17.5V to 30V, IO = 500mA - - 0.8

IO = 5mA to 1.0A - - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.0 - mV/°C

Output Noise Voltage VN f = 10Hz to 100KHz TA =+25 °C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mA VI = 18.5V to 28.5V - 58 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 °C - 2.0 - VOutput Resistance rO f = 1KHz - 19 - mΩShort Circuit Current ISC VI= 35V, TA =+25 °C - 250 - mAPeak Current IPK TJ=+25°C - 2.2 - A

Page 170: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7818A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 27V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VO TJ =+25 °C 17.64 18 18.36

V IO = 5mA to 1A, PO ≤15W VI = 21V to 33V 17.3 18 18.7

Line Regulation (Note1) Regline

VI= 21V to 33V IO = 500mA - 15 180

mV VI= 21V to 33V - 5 180

TJ =+25 °C VI= 20.6V to 33V - 15 180 VI= 24V to 30V - 5 90

Load Regulation (Note1) Regload

TJ =+25°C IO = 5mA to 1.5A - 15 100

mV IO = 5mA to 1.0A - 15 100 IO = 250mA to 750mA - 7 50

Quiescent Current IQ TJ =+25 °C - 5.2 6.0 mA

Quiescent Current Change ∆IQ

VI = 21V to 33V, TJ=+25 °C - - 0.8mA VI = 21V to 33V, IO = 500mA - - 0.8

IO = 5mA to 1.0A - - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.0 - mV/ °C

Output Noise Voltage VN f = 10Hz to 100KHz TA =+25°C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mA VI = 22V to 32V - 57 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25°C - 2.0 - VOutput Resistance rO f = 1KHz - 19 - mΩShort Circuit Current ISC VI= 35V, TA =+25°C - 250 - mAPeak Current IPK TJ=+25 °C - 2.2 - A

Page 171: FYP reportl

MC78XX/LM78XX/MC78XXA

Electrical Characteristics (MC7824A)(Refer to the test circuits. 0°C < TJ < 125°C, Io =1A, V I = 33V, C I=0.33µF, C O=0.1µF, unless otherwise specified)

Note:1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken

into account separately. Pulse testing with low duty is used.

Parameter Symbol Conditions Min. Typ. Max. Unit

Output Voltage VO TJ =+25 °C 23.5 24 24.5

V IO = 5mA to 1A, PO ≤15W VI = 27.3V to 38V 23 24 25

Line Regulation (Note1) Regline

VI= 27V to 38V IO = 500mA - 18 240

mV VI= 21V to 33V - 6 240

TJ =+25 °C VI= 26.7V to 38V - 18 240 VI= 30V to 36V - 6 120

Load Regulation (Note1) Regload

TJ =+25 °C IO = 5mA to 1.5A - 15 100

mV IO = 5mA to 1.0A - 15 100 IO = 250mA to 750mA - 7 50

Quiescent Current IQ TJ =+25 °C - 5.2 6.0 mA

Quiescent Current Change ∆IQ

VI = 27.3V to 38V, TJ =+25 °C - - 0.8mA VI = 27.3V to 38V, IO = 500mA - - 0.8

IO = 5mA to 1.0A - - 0.5Output Voltage Drift ∆V/∆T IO = 5mA - -1.5 - mV/ °C

Output Noise Voltage VN f = 10Hz to 100KHz TA = 25 °C - 10 - µV/Vo

Ripple Rejection RR f = 120Hz, IO = 500mA VI = 28V to 38V - 54 - dB

Dropout Voltage VDrop IO = 1A, TJ =+25 °C - 2.0 - VOutput Resistance rO f = 1KHz - 20 - mΩShort Circuit Current ISC VI= 35V, TA =+25 °C - 250 - mAPeak Current IPK TJ=+25 °C - 2.2 - A

Page 172: FYP reportl

MC78XX/LM78XX/MC78XXA

Typical Perfomance Characteristics

Figure 1. Quiescent Current

Figure 3. Output Voltage

Figure 2. Peak Output Current

Figure 4. Quiescent Current

I

Page 173: FYP reportl

MC78XX/LM78XX/MC78XXA

Typical Applications

Figure 5. DC Parameters

Figure 6. Load Regulation

Figure 7. Ripple Rejection

Figure 8. Fixed Output Regulator

Input OutputMC78XX/LM78XX

Input OutputMC78XX/LM78XX

Input OutputMC78XX/LM78XX

Input OutputMC78XX/LM78XX

Page 174: FYP reportl

MC78XX/LM78XX/MC78XXA

Figure 9. Constant Current Regulator

Notes:(1) To specify an output voltage. substitute voltage value for "XX." A common ground is required between the input and the

Output voltage. The input voltage must remain typically 2.0V above the output voltage even during the low point on the inputripple voltage.

(2) CI is required if regulator is located an appreciable distance from power Supply filter.(3) CO improves stability and transient response.

VO = VXX(1+R2/R1)+IQR2Figure 10. Circuit for Increasing Output Voltage

IRI ≥5 IQVO = VXX(1+R2/R1)+IQR2

Figure 11. Adjustable Output Regulator (7 to 30V)

Input OutputMC78XX/LM78XX

CI

Co

Input OutputMC78XX/LM78XX

CICo

IRI 5IQ≥

Input OutputMC7805LM7805

LM741Co

CI

Page 175: FYP reportl

MC78XX/LM78XX/MC78XXA

Figure 12. High Current Voltage Regulator

Figure 13. High Output Current with Short Circuit Protection

Figure 14. Tracking Voltage Regulator

Input

OutputMC78XX/LM78XX

Input

OutputMC78XX/LM78XX

MC78XX/LM78XX

LM741

Page 176: FYP reportl

MC78XX/LM78XX/MC78XXA

Figure 15. Split Power Supply ( ±15V-1A)

Figure 16. Negative Output Voltage Circuit

Figure 17. Switching Regulator

MC7815

MC7915

Input

Output

MC78XX/LM78XX

Input Output

MC78XX/LM78XX

Page 177: FYP reportl

MC78XX/LM78XX/MC78XXA

Mechanical DimensionsPackage

4.50 ±0.209.90 ±0.20

1.52 ±0.10

0.80 ±0.102.40 ±0.20

10.00 ±0.20

1.27 ±0.10

ø3.60 ±0.10

(8.70)

2.80

±0.

1015

.90

±0.2

0

10.0

8 ±0

.30

18.9

5MA

X.

(1.7

0)

(3.7

0)(3

.00)

(1.4

6)

(1.0

0)

(45°)

9.20

±0.

2013

.08

±0.2

0

1.30

±0.

10

1.30+0.10–0.05

0.50+0.10–0.05

2.54TYP[2.54 ±0.20]

2.54TYP[2.54 ±0.20]

TO-220

Page 178: FYP reportl

MC78XX/LM78XX/MC78XXA

Mechancal Dimensions (Continued)

Package

6.60 ±0.20

2.30 ±0.10

0.50 ±0.10

5.34 ±0.30

0.70

±0.

20

0.60

±0.

200.

80 ±

0.20

9.50

±0.

30

6.10

±0.

20

2.70

±0.

209.

50 ±

0.30

6.10

±0.

20

2.70

±0.

20

MIN

0.55

0.76 ±0.10 0.50 ±0.10

1.02 ±0.20

2.30 ±0.20

6.60 ±0.20

0.76 ±0.10

(5.34)

(1.50)

(2XR0.25)

(5.04)

0.89

±0.

10

(0.1

0)(3

.05)

(1.0

0)

(0.9

0)

(0.7

0)

0.91

±0.

10

2.30TYP[2.30±0.20]

2.30TYP[2.30±0.20]

MAX0.96

(4.34)(0.50) (0.50)

D-PAK

Page 179: FYP reportl

MC78XX/LM78XX/MC78XXA

Ordering InformationProduct Number Output Voltage Tolerance Package Operating Temperature

LM7805CT ±4% TO-220 0 ~ + 125°C

Product Number Output Voltage Tolerance Package Operating TemperatureMC7805CT

±4%

TO-220

0 ~ + 125°C

MC7806CTMC7808CTMC7809CTMC7810CTMC7812CTMC7815CTMC7818CTMC7824CT

MC7805CDT

D-PAK

MC7806CDTMC7808CDTMC7809CDTMC7810CDTMC7812CDTMC7805ACT

±2% TO-220

MC7806ACTMC7808ACTMC7809ACTMC7810ACTMC7812ACTMC7815ACTMC7818ACTMC7824ACT

Page 180: FYP reportl

MC78XX/LM78XX/MC78XXA

7/2/01 0.0m 001Stock#DSxxxxxxxx

2001 Fairchild Semiconductor Corporation

LIFE SUPPORT POLICY FAIRCHILD’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF FAIRCHILD SEMICONDUCTOR CORPORATION. As used herein:

1. Life support devices or systems are devices or systems which, (a) are intended for surgical implant into the body, or (b) support or sustain life, and (c) whose failure to perform when properly used in accordance with instructions for use provided in the labeling, can be reasonably expected to result in a significant injury of the user.

2. A critical component in any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system, or to affect its safety or effectiveness.

www.fairchildsemi.com

DISCLAIMER FAIRCHILD SEMICONDUCTOR RESERVES THE RIGHT TO MAKE CHANGES WITHOUT FURTHER NOTICE TO ANY PRODUCTS HEREIN TO IMPROVE RELIABILITY, FUNCTION OR DESIGN. FAIRCHILD DOES NOT ASSUME ANY LIABILITY ARISING OUT OF THE APPLICATION OR USE OF ANY PRODUCT OR CIRCUIT DESCRIBED HEREIN; NEITHER DOES IT CONVEY ANY LICENSE UNDER ITS PATENT RIGHTS, NOR THE RIGHTS OF OTHERS.