You are on page 1of 298

Biju Patnaik University of Technology

Rourkela

PROJECT REPORT
ON

Monitor and Control of Greenhouse


Environment
The Project GreenBee
A Project report submitted in partial fulfillment of the requirement for the award of

Bachelor of Engineering
In

Applied Electronics and Instrumentation Engineering

Submitted by:

Chinmayananda Das (Regd No.0501229084)


Under the guidance of

Prof. Subhendu Behera


Dept. of Applied Electronics & Instrumentation Engineering
Dhaneswar Rath Institute of Engineering & Management Studies, Cuttack.

DEPARTMENT OF APPLIED ELECTRONICS AND INSTRUMENTATION ENGINEERING


DHANESWAR RATH INSTITUTE OF ENGINEERING & MANAGMENT STUDIES
CUTTACK

DHANESWAR RATH INSTITUTE OF ENGINEERING & MANAGMENT STUDIES


CUTTACK

(Affiliated To Biju Patnaik University of Technology)

Dept. of Applied Electronics & Instrumentation


Engineering

Certificate
Certified that the project work entitled Monitor and Control of Greenhouse
Environment is a bonafide work carried out by:

Chinmayananda Das (Regd No.0501229084)


in partial fulfillment for the award of the degree of Bachelor of Engineering in Applied
Electronics and Instrumentation Engineering under Biju Pattnaik University Of
Technology, Rourkela, during the year 2005-2009. It is certified that all corrections/ suggestions
indicated for Internal Assessment have been incorporated in the report and deposited in the
departmental library. The project report has been approved as it satisfies the academic
requirements in respect of the project work prescribed for the said degree.
Signature:

Project Guide:

HOD Dept. of AE&I:

Project Incharge:

Name:

Name:

Name:

Date:

Date:

Date:

Internal examiner:
examiner: Name:

External
Name:

ACKNOWLEDGEMENT
The completion of any project brings with it a sense of satisfaction, but it is never
complete without thanking those people who made it possible and whose constant support
has crowned our efforts with success.
One cannot even imagine the power of the force that guides us all and neither can we
succeed without acknowledging it. Our deepest gratitude to Almighty God for holding our
hands and guiding us throughout our lives.
I would also like to express our gratitude to Prof. Subhendu Behera Head of the
Department, Applied Electronics and Instrumentation DRIEMS, Cuttack for encouraging
and inspiring us to carry out the project in the department lab.
I would also like to thank our guide, Er. J. N Mishra Dept. of A p p l i e d Electronics
and Communication for his expert guidance, encouragement and valuable suggestions at
every step.
We also would like to thank all the staff members of AE&I dept. for providing us with
the required facilities and support towards the completion of the project.
We are extremely happy to acknowledge and express our sincere gratitude to our
parents for their constant support and encouragement and last but not the least, friends and
well wishers for their help and cooperation and solutions to problems during the course of
the project.
Also our friends at 8051projects.net who provided solutions at times when we were
against the wall in need of help.

iii

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

SYNOPSIS
Appropriate environmental conditions are necessary for optimum plant growth, improved
crop yields, and efficient use of water and other resources. Automating the data acquisition
process of the soil conditions and various climatic parameters that govern plant growth allows
information to be collected at high frequency with less labor requirements. The existing systems
employ PC or SMS-based systems for keeping the user continuously informed of the conditions
inside the greenhouse; but are unaffordable, bulky, difficult to maintain and less accepted by the
technologically unskilled workers.
The objective of this project is to design a simple, easy to install, microcontroller-based
circuit to monitor and record the values of temperature, humidity, soil moisture and sunlight of
the natural environment that are continuously modified and controlled in order optimize them to
achieve maximum plant growth and yield. The controller used is a low power, cost efficient chip
manufactured by ATMEL having 8K bytes of on-chip flash memory. It communicates with the
various sensor modules in real-time in order to control the light, aeration and drainage process
efficiently inside a greenhouse by actuating a cooler, fogger, dripper and lights respectively
according to the necessary condition of the crops. An integrated Liquid crystal display (LCD) is
also used for real time display of data acquired from the various sensors and the status of the
various devices. Also, the use of easily available components reduces the manufacturing and
maintenance costs. The design is quite flexible as the software can be changed any time. It can
thus be tailor-made to the specific requirements of the user.
This makes the proposed system to be an economical, portable and a low maintenance
solution for greenhouse applications, especially in rural areas and for small scale agriculturists.

DEPARTMENT OF AE & I

iv

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CONTENTS
NAME OF THE CHAPTER

1.

PAGE NO.

INTRODUCTION
1.1 CURRENT SCENARIO..2
1.1.1 MANUAL SETUP..2
1.1.2 PARTIALLY AUTOMATED SETUP...2
1.1.3 FULLY AUTOMATED SETUP....3
1.2 PROBLEM DEFINITION...3
1.3 PROPOSED MODEL FOR AUTOMATION OF GREENHOUSE...4

2.

SYSTEM MODEL
2.2 BASIC MODEL OF THE SYSTEM......6
2.3 PARTS OF THE SYSTEM.7
2.4 STEPS FOLLOWED IN DESIGNING THE SYSTEM.8

3.

BASIC THEORY
3.1 LIFE PROCESSES INSIDE A GREENHOUSE
3.1.1 PHOTOSYNTHETIC PROCESS.12
3.1.2 TRANSPIRATION...13

4.

HARDWARE DESCRIPTION
4.1 TRANSDUCERS
4.1.1 SOIL MOISTURE SENSOR...16

DEPARTMENT OF AE & I

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.1.1.1 FEATURES

16

4.1.1.2 FUNCTIONAL DESCRIPTION

17

4.1.2 LIGHT SENSOR


4.1.2.1 FEATURES

18

4.1.2.2 FUNCTIONAL DESCRIPTION

19

4.1.3 HUMIDITY SENSOR


4.1.3.1
FEATURES-------------------------------------------------------------4.1.3.2 FUNCTIONAL DESCRIPTION--------------------------------

20
21

4.1.4 TEMPERATURE SENSOR


4.1.4.1
FEATURES----------------------------------------------------------4.1.4.2 FUNCTIONAL
DESCRIPTION-----------------------------------4.2 ANALOG TO DIGITAL CONVERTER (ADC 0809)

22

4.2.1
DESCRIPTION---------------------------------------------------------------4.2.2
FEATURES------------------------------------------------------------------------4.2.3 CONVERSION METHOD
USED------------------------------------------4.2.4 PIN DIAGRAM OF ADC
0809---------------------------------------------4.2.5 SELECTING AN ANALOG
CHANNEL----------------------------------------4.3 CLOCK CIRCUITRY FOR THE ADC

24

4.3.1 FUNCTIONAL

23

24
25
26
27
29

4.4 MICROCONTROLLER
4.4.1 CRITERIA FOR CHOOSING A
MICROCONTROLLER-------------------------4.4.2
DESCRIPTION----------------------------------------------------------------4.4.2
FEATURES---------------------------------------------------------------------4.4.4 PIN CONFIGURATION---------------------------------------------------

31

4.4.5 BLOCK DIAGRAM--------------------------------------------------------

34

4.4.6 PIN
DESCRIPTION--------------------------------------------------------4.4.6.1 POWER-ON RESET
CIRCUIT----------------------------------4.4.6.2 OSCILLATOR CLOCK
CIRCUIT---------------------------------4.4.7 SPECIAL FUNCTION
REGISTERS------------------------------------4.4.8 MEMORY
ORGANIZATION---------------------------------------------4.4.9 WATCHDOG TIMER------------------------------------------------------

35

31
32
33

36
37
38
39
40

vi
DEPARTMENT OF AE & I

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.4.10 TIMERS AND COUNTERS..41


4.4.11 INTERRUPTS....42
4.4.12 MICROCONTROLLER CONFIGURATION USED IN THE SET-UP..42
4.5 LIQUID CRYSTAL DISPLAY...44
4.5.1 SIGNALS TO THE LCD..........44
4.5.1.1 LOGIC STATUS ON THE CONTROL LINES45
4.5.1.2 WRITING AND READING DATA FROM THE LCD45
4.5.2 PIN DESCRIPTION..........45
4.6 ALARM CIRCUITRY.....46
4.7 RELAYS............47
4.8 POWER SUPPLY CONNECTION....50
5. SYSTEMS USED IN WORK MODE
5.1 DRIP IRRIGATION SYSTEM FOR CONTROLLING SOIL MOISTURE.54
5.2 ARTIFICIAL GROWING LIGHTS FOR CONTROLLING ILLUMINATION......55
5.3 HEATERS AND FANS FOR CONTROLLING TEMPERATURE
5.3.1 COOLING EQUIPMENT..56
5.3.2 HEATING EQUIPMENT..56
5.4 HUMIDIFICATION SYSTEMS56
6. SOFTWARE
6.1 INTRODUCTION TO KEIL SOFTWARE
6.1.1 WHAT IS Vision3?..........................................................................................59
6.1.2 STEPS FOLLOWED IN CREATING AN APPLICATION IN Vision359
6.1.3 DEVICE DATABASE...64
6.1.4 PERIPHERAL SIMULATION..64
6.2 PROGRAMMER64
6.3 ProLoad PROGRAMMING SOFTWARE..65

DEPARTMENT OF AE & I

vii

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

7. FLOWCHART
7.1 FLOWCHART REPRESENTING THE WORKING OF THE SYSTEM...68
7.2 FLOWCHART FOR LCD INITIALIZATION.........69
7.3 FLOWCHART FOR ADC INITIALIZATION.71
8. RESULT ANALYSIS

8.1 SENSOR READINGS


8.1.1 SOIL MOISTURE SENSOR......74
8.1.2 LIGHT SENSOR........75
8.1.3 HUMIDITY SENSOR........76
8.1.4 TEMPERATURE SENSOR77
9. ADVANTAGES AND DISADVANTAGES

9.1 ADVANTAGES..80
9.2 DISADVANTAGES80
10. FUTURE SCOPE .82

11. CONCLUSION.84
I.

REFERENCES.85

II.

ANNEXURE-I.. 87

III.

ANNEXURE-II 91

IV.

ANNEXURE-III...95

V.

ANNEXURE-IV...97

VI.

ANNEXURE-V...115

DEPARTMENT OF AE & I

viii

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

LIST OF FIGURES
I.

Figure 2.1 Block diagram of the system..6

II.

Figure 3.2 Block diagram of photosynthesis..12

III.

Figure 3.2 Transpiration.14

IV.

Figure 4.1 Soil moisture sensor circuit..17

V.

Figure 4.2 Light Dependent Resistor.18

VI.

Figure 4.2.1 Structure of a Light Dependent Resistor...18

VII.

Figure 4.3 Light sensor circuit...19

VIII.

Figure 4.4 HIH-4000-001 Humidity sensor...20

IX.

Figure 4.5 Humidity sensor circuit.21

X.

Figure 4.6 LM35 temperature sensor.22

XI.

Figure 4.7 Temperature sensor circuit...23

XII.

Figure 4.8 Getting data from the analog world..24

XIII.

Figure 4.9 Block diagram of ADC 080925

XIV.

Figure 4.10 Flowchart explaining the Successive Approximation method...26

XV.

Figure 4.11 Pin diagram of ADC 0809..26

XVI.

Figure 4.12 ADC 0809 pin details for the system..28

XVII.

Figure 4.13 Timing diagram of ADC 080929

XVIII.

Figure 4.14 Clock circuitry for the ADC...30

XIX.

Figure 4.15 The effect of using a Schmitt trigger instead of a comparator30

XX.

Figure 4.16 Pin diagram of AT89S5233

XXI.

Figure 4.17 Block diagram of the microcontroller.34

XXII.

Figure 4.18 Power-on reset circuit.36

DEPARTMENT OF AE & I

ix

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

XXIII.

Figure 4.19 Oscillator clock circuit38

XXIV.

Figure 4.20 Internal memory block40

XXV.

Figure 4.21 Microcontroller Pin Details.43

XXVI.

Figure 4.22 Address locations for a 2x16 line LCD..44

XXVII.

Figure 4.23 Pin diagram of 2x16 line LCD46

XXVIII.

Figure 4.24 Electrical symbol of a buzzer..46

XXIX.

Figure 4.25 Buzzer circuitry..47

XXX.

Figure 4.26 Sugar Cube Relay...48

XXXI.

Figure 4.27 Circuit symbols of relays49

XXXII.

Figure 4.28 Relay circuitry50

XXXIII.

Figure 4.29 +5V Power supply circuit...51

XXXIV.

Figure 4.30 +12V Power supply circuit.51

XXXV.

Figure 5.1 Drip irrigation system...54

XXXVI.

Figure 6.1 Window for choosing the target device60

XXXVII.

Figure 6.2 Project workspace pane.61

XXXVIII.

Figure 6.3 Project options dialog...61

XXXIX.

Figure 6.4 Save All and Build All Target Files buttons..61

XL.

Figure 6.5 Vision3 Debugger window.62

XLI.

Figure 6.6 Reset, Run and Step into options..63

XLII.

Figure 6.7 Programming window..66

XLIII.

Annexure-I: Snapshots of the System..88-90

DEPARTMENT OF AE & I

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

LIST OF TABLES

I.

Table 2.1 Importance of the various parameters.8

II.

Table 4.1 Selection of the input channels..27

III.

Table 4.2 Alternate functions of Port 3..36

IV.

Table 4.3 Pin description of the LCD46

V.

Table 8.1 Soil moisture sensor readings74

VI.

Table 8.2 Light sensor readings.75

VII.

Table 8.3 Humidity sensor readings..76

VIII.

Table 8.4 Temperature sensor readings.77

DEPARTMENT OF AE & I

xi

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 1
INTRODUCTION

Department of AE & I

Page 1

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

INTRODUCTION
We live in a world where everything can be controlled and operated automatically,
but there are still a few important sectors in our country where automation has not been
adopted or not been put to a full-fledged use, perhaps because of several reasons one such
reason is cost. One such field is that of agriculture. Agriculture has been one of the primary
occupations of man since early civilizations and even today manual interventions in farming
are inevitable. Greenhouses form an important part of the agriculture and horticulture sectors
in our country as they can be used to grow plants under controlled climatic conditions for
optimum produce. Automating a greenhouse envisages monitoring and controlling of the
climatic parameters which directly or indirectly govern the plant growth and hence their
produce. Automation is process control of industrial machinery and processes, thereby
replacing human operators.

1.1 CURRENT SCENARIO


Greenhouses in India are being deployed in the high-altitude regions where the subzero temperature up to -40 C makes any kind of plantation almost impossible and in arid
regions where conditions for plant growth are hostile. The existing set-ups primarily are:
1.1.1 MANUAL SET-UP:
This set-up involves visual inspection of the plant growth, manual irrigation of plants,
turning ON and OFF the temperature controllers, manual spraying of the fertilizers and
pesticides. It is time consuming, vulnerable to human error and hence less accurate and
unreliable.
1.1.2 PARTIALLY AUTOMATED SET-UP:
This set-up is a combination of manual supervision and partial automation and is
similar to manual set-up in most respects but it reduces the labor involved in terms of
irrigating the set-up.

Department of AE & I

Page 2

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1.1.3 FULLY- AUTOMATED:


This is a sophisticated set-up which is well equipped to react to most of the climatic
changes occurring inside the greenhouse. It works on a feedback system which helps it to
respond to the external stimuli efficiently. Although this set-up overcomes the problems
caused due to human errors it is not completely automated and expensive.

1.2 PROBLEM DEFINITION


A number of problems associated with the above mentioned systems are enumerated
as below:
1. Complexity involved in monitoring climatic parameters like humidity, soil moisture,
illumination, soil pH, temperature, etc which directly or indirectly govern the plant
growth.
2. Investment in the automation process are high, as todays greenhouse control systems are
designed for only one parameter monitoring (as per GKVK research center); to control
more than one parameter simultaneously there will be a need to buy more than one
system.
3. High maintenance and need for skilled technical labor. The modern proposed systems use
the mobile technology as the communication schemes and wireless data acquisition
systems, providing global access to the information about ones farms. But it suffers from
various limitations like design complexity, inconvenient repairing and high price. Also
the reliability of the system is relatively low, and when there are malfunctions in local
devices, all local and tele data will be lost and hence the whole system collapses. More
over farmers in India do not work under such sophisticated environment and find no
necessity of such an advanced system, and cannot afford the same.
Keeping these issues in view, a microcontroller based monitoring and control system is
designed to find implementation in the near future that will help Indian farmers.

Department of AE & I

Page 3

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1.3 PROPOSED MODEL FOR AUTOMATION OF GREENHOUSE


The proposed system is an embedded system which will closely monitor and control
the microclimatic parameters of a greenhouse on a regular basis round the clock for
cultivation of crops or specific plant species which could maximize their production over the
whole crop growth season and to eliminate the difficulties involved in the system by reducing
human intervention to the best possible extent. The system comprises of sensors, Analog to
Digital Converter, microcontroller and actuators.
When any of the above mentioned climatic parameters cross a safety threshold which
has to be maintained to protect the crops, the sensors sense the change and the
microcontroller reads this from the data at its input ports after being converted to a digital
form by the ADC. The microcontroller then performs the needed actions by employing relays
until the strayed-out parameter has been brought back to its optimum level. Since a
microcontroller is used as the heart of the system, it makes the set-up low-cost and effective
nevertheless. As the system also employs an LCD display for continuously alerting the user
about the condition inside the greenhouse, the entire set-up becomes user friendly.
Thus, this system eliminates the drawbacks of the existing set-ups mentioned in the
previous section and is designed as an easy to maintain, flexible and low cost solution.

Department of AE & I

Page 4

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 2
SYSTEM MODEL

Department of AE & I

Page 5

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

BASIC MODEL OF THE SYSTEM

Fig. 2.1 Block diagram of the system

Department of AE & I

Page 6

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

2.1 PARTS OF THE SYSTEM:

Sensors (Data acquisition system)


Temperature sensor (LM35)
Humidity sensor (HIH4000)
Light sensor (LDR)
Moisture sensor

Analog to Digital Converter ( ADC 0808/0809)

Microcontroller (AT89S52)

Liquid Crystal Display (Hitachi's HD44780)

Actuators Relays

Devices controlled
Water Pump (simulated as a bulb)
Sprayer (simulated as a bulb)
Cooler (simulated as a fan)
Artificial Lights (simulated as 2 bulbs)

Buzzer

TRANSDUCERS (Data acquisition system):


This part of the system consists of various sensors, namely soil moisture, humidity,
temperature and light. These sensors sense various parameters- temperature, humidity, soil
moisture and light intensity and are then sent to the Analog to Digital Converter.
ANALOG TO DIGITAL CONVERDER (ADC):
The analog parameters measured by the sensors are then converted to corresponding
digital values by the ADC.
MICROCONTROLLER:
The microcontroller is the heart of the proposed embedded system. It constantly
monitors the digitized parameters of the various sensors and verifies them with the
predefined threshold values and checks if any corrective action is to be taken for the
Department of AE & I

Page 7

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

condition at that instant of time. In case such a situation arises, it activates the actuators to
perform a controlled operation.
ACTUATORS:
An array of actuators can be used in the system such as relays, contactors, and change
over switches etc. They are used to turn on AC devices such as motors, coolers, pumps,
fogging machines, sprayers. For the purpose of demonstration relays have been used to drive
AC bulbs to simulate actuators and AC devices. A complete working system can be realized
by simply replacing these simulation devices by the actual devices.
DISPLAY UNIT:
A Liquid crystal display is used to indicate the present status of parameters and the
respective AC devises (simulated using bulbs). The information is displayed in two modes
which can be selected using a push button switch which toggles between the modes. Any
display can be interfaced to the system with respective changes in driver circuitry and code.

2.2 STEPS FOLLOWED IN DESIGNING THE SYSTEM:


Three general steps can be followed to appropriately select the control system:
Step # 1: Identify measurable variables important to production.

It is very important to correctly identify the parameters that are going to be measured
by the controllers data acquisition interface, and how they are to be measured. The
set of variables typically used in greenhouse control is shown below:

Sl. No.

Variable to be monitored

Its Importance

Temperature

Affects all plant metabolic functions.

Humidity

Soil moisture

Affects transpiration rate and the plant's thermal


control mechanisms.
Affects salinity, and pH of irrigation water

Solar Radiation

Affects photosynthetic rate, responsible for most


thermal load during warm periods

Table 2.1 Importance of the various parameters


Department of AE & I

Page 8

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

An electronic sensor for measuring a variable must readily available, accurate, reliable
and low in cost. If a sensor is not available, the variable cannot be incorporated into the
control system, even if it is very important. Many times variables that cannot be directly or
continuously measured can be controlled in a limited way by the system. For example,
fertility levels in nutrient solutions for greenhouse production are difficult to measure
continuously.
Step# 2: Investigate the control strategies.

An important element in considering a control system is the control strategy that is to


be followed. The simplest strategy is to use threshold sensors that directly affect
actuation of devices. For example, the temperature inside a greenhouse can be
affected by controlling heaters, fans, or window openings once it exceeds the
maximum allowable limit. The light intensity can be controlled using four threshold
levels. As the light intensity decreases one light may be turned on. With a further
decrease in its intensity a second light would be powered, and so on; thus ensuring
that the plants are not deprived of adequate sunlight even during the winter season or
a cloudy day.

More complex control strategies are those based not only on the current values of the
controlled variables, but also on the previous history of the system, including the rates
at which the system variables are changing.

Step #3: Identify the software and the hardware to be used.

It is very important that control system functions are specified before deciding what
software and hardware system to purchase. The model chosen must have the ability
to:
1. Expand the number of measured variables (input subsystem) and controlled
devices (output subsystem) so that growth and changing needs of the
production operation can be satisfied in the future.
2. Provide a flexible and easy to use interface.
3. It must ensure high precision measurement and must have the ability resist
noise.

Department of AE & I

Page 9

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Hardware must always follow the selection of software, with the hardware required
being supported by the software selected. In addition to functional capabilities, the selection
of the control hardware should include factors such as reliability, support, previous
experiences with the equipment (successes and failures), and cost.

Department of AE & I

Page 10

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 3
BASIC THEORY

Department of AE & I

Page 11

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

BASIC THEORY

3.1 LIFE PROCESSES INSIDE GREENHOUSE:


3.1.1 PHOTOSYNTHETIC PROCESS
The two major life-processes occurring in plants are photosynthesis and transpiration.
Photosynthesis is the conversion of light energy into chemical energy by living organisms.
The raw materials are carbon dioxide and water; the energy source is sunlight; and the endproducts are oxygen and (energy rich) carbohydrates, for example sucrose, glucose and
starch. This process is arguably the most important biochemical pathway, since nearly all
life on Earth either directly or indirectly depends on it.

Fig 3.1 Block diagram of photosynthesis


Department of AE & I

Page 12

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

A commonly used but slightly simplified equation for photosynthesis is:


6 CO2(g) + 12 H2O(l) + photons C6H12O6(aq.) + 6 O2(g) + 6 H2O(l)

(3.1)

Carbon dioxide + water + light energy glucose + oxygen + water


Light energy obtained from the sun is very essential for photosynthesis. The photons
present in light are responsible for triggering the light-reaction in plants. Plants need an
optimum amount of exposure to light in a day. This optimum period is called its photoperiod. The plant sensitivity curve for photosynthesis has its peak at the red side of the
spectrum. This indicates that providing plants with the wavelengths best suited to
photosynthesis is most efficient with the use of artificial light. Tests show a mean deviation
from the average sensitivity curve of less than 5% for a wide variety of plants. The curve
shows that the maximum sensitivity for photosynthesis lies in the far red at approximately
675 nm. The plant sensitivity curve disputes two common misconceptions. The first is that an
"ideal" plant growing lamp duplicates the spectral energy distribution of the sun. Sunlight has
a continual spectrum, radiating energy in wavelengths that contribute less to photosynthesis,
and are therefore "wasted" on the plant. For this reason, many lamps are more efficient than
sunlight for plants.
Plants need dark periods. Periods of light (called photo-periods) and dark periods and
their relative lengths have an effect on plant maturity. The dark period of each day affects
flowering and seeding of most plants. Although many plants can grow under continuous
light, nearly all plants prefer a dark period each day for normal growth. All plants need some
darkness to grow well or to trigger flowering. The ideal photoperiods of plants vary, some
preferring long days and short nights; others the reverse; and some do best when the length of
the night and day periods are equal.

3.1.2 TRANSPIRATION
Transpiration is the evaporation of water from the aerial parts of plants, especially
leaves but also stems, flowers and roots Transpiration also cools plants and enables mass
flow of mineral nutrients and water from roots to shoots. Mass flow is caused by the decrease
in hydrostatic (water) pressure in the upper parts of the plants due to the diffusion of water
out of stomata into the atmosphere. Water is absorbed at the roots by osmosis, and any
dissolved mineral nutrients travel with it through the xylem.
Department of AE & I

Page 13

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

The rate of transpiration is directly related to the degree of stomatal opening, and to
the evaporative demand of the atmosphere surrounding the leaf. The amount of water lost by
a plant depends on its size, along with the surrounding light intensity, temperature, humidity,
and wind speed (all of which influence evaporative demand). Soil water supply and soil
temperature can influence stomatal opening, and thus the transpiration rate.

Fig 3.2 Transpiration


The moisture content in the soil is a very crucial factor in the process of transpiration
as the absorption of mineral salts from the soil through the process of osmosis is directly
dependent on the moisture content in the soil.
The greenhouse works best when the temperature is not too hot and not too cold.
Though it sounds simple in the spring and autumn we can easily have a wide range of
temperatures from the cold in the middle of the night to the excessive heat of the day when
the sun is shining. During the day the rays from the sun penetrate the greenhouse and warm
up and light up the surroundings. Light escapes through the glass walls but the heat in form
of infra-red radiations gets trapped inside the green house leading to an incubating effect and
the temperature inside gradually increases. This increased temperature leads to an increase in
the rate of transpiration which is harmful to the plants.
Department of AE & I

Page 14

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 4
HARDWARE DESCRIPTION

Department of AE & I

Page 15

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

HARDWARE DESCRIPTION

4.1 TRANSDUCERS:
A transducer is a device which measures a physical quantity and converts it into a
signal which can be read by an observer or by an instrument. Monitoring and controlling of a
greenhouse environment involves sensing the changes occurring inside it which can
influence the rate of growth in plants. The parameters which are of importance are the
temperature inside the greenhouse which affect the photosynthetic and transpiration
processes are humidity, moisture content in the soil, the illumination etc. Since all these
parameters are interlinked, a closed loop (feedback) control system is employed in
monitoring it. The sensors used in this system are:
1. Soil Moisture Sensor(Transistor amplifier)
2. Light Sensor ( LDR (Light Dependent Resistor) )
3. Humidity Sensor (HIH4000)
4. Temperature Sensor (LM35)

4.1.1 SOIL MOISTURE SENSOR


4.1.1.1 Features of the Soil moisture sensor:
1. The circuit designed uses a 5V supply, fixed resistance of 100, variable resistance
of 10, two copper leads as the sensor probes, 2N222N transistor.
2. It gives a voltage output corresponding to the conductivity of the soil.
3. The conductivity of soil depends upon the amount of moisture present in it. It
increases with increase in the water content of the soil.
4. The voltage output is taken at the transmitter which is connected to a variable
resistance. This variable resistance is used to adjust the sensitivity of the sensor.

Department of AE & I

Page 16

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

SENSOR LEADS
VCC

100

2N222N

ADC IN 5

10 k

Fig. 4.1 Soil moisture sensor

4.1.1.2 Functional description of Soil moisture sensor:


The two copper leads act as the sensor probes. They are immersed into the specimen soil
whose moisture content is under test. The soil is examined under three conditions:
Case#1: Dry condition- The probes are placed in the soil under dry conditions and are
inserted up to a fair depth of the soil. As there is no conduction path between the two copper
leads the sensor circuit remains open. The voltage output of the emitter in this case ranges
from 0 to 0.5V.
Case#2: Optimum condition- When water is added to the soil, it percolates through the
successive layers of it and spreads across the layers of soil due to capillary force. This water
increases the moisture content of the soil. This leads to an increase in its conductivity which
forms a conductive path between the two sensor probes leading to a close path for the current
flowing from the supply to the transistor through the sensor probes. The voltage output of the
circuit taken at the emitter of the transistor in the optimum case ranges from 1.9 to 3.4V
approximately.
Case#3: Excess water condition- With the increase in water content beyond the optimum
level, the conductivity of the soil increases drastically and a steady conduction path is
established between the two sensor leads and the voltage output from the sensor increases no
further beyond a certain limit. The maximum possible value for it is not more than 4.2V.

Department of AE & I

Page 17

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.1.2 LIGHT SENSOR


Light Dependent Resistor (LDR) also known as photoconductor or photocell, is a
device which has a resistance which varies according to the amount of light falling on its
surface. Since LDR is extremely sensitive in visible light range, it is well suited for the
proposed application.

Fig. 4.2 Light Dependent Resistor


4.1.2.1 Features of the light sensor:

The Light Dependent Resistor (LDR) is made using the semiconductor Cadmium
Sulphide (CdS).

The light falling on the brown zigzag lines on the sensor causes the resistance of
thedevice to fall. This is known as a negative co-efficient. There are some LDRs that
work in the opposite way i.e. their resistance increases with light (called positive coefficient).

he resistance of the LDR decreases as the intensity of the light falling on it increases.
Incident photons drive electrons from the valence band into the conduction band.
conduction band
Cadmium
Cadmium
Sulphide
Sulphide
track

Band gap

valence band

Fig. 4.2.1 Structure of a Light Dependent Resistor, showing Cadmium Sulphide track
and an atom to illustrate electrons in the valence and conduction bands

Department of AE & I

Page 18

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.1.2.2 Functional description

An LDR and a normal resistor are wired in series across a voltage, as shown in the
circuit below. Depending on which is tied to the 5V and which to 0V, the voltage at
the point between them, call it the sensor node, will either rise or fall with increasing
light. If the LDR is the component tied directly to the 5V, the sensor node will
increase in voltage with increasing light

The LDR's resistance can reach 10 k ohms in dark conditions and about 100 ohms in
full brightness.

The circuit used for sensing light in our system uses a 10 k fixed resistor which is
tied to +5V. Hence the voltage value in this case decreases with increase in light
intensity.
VCC
10K
ADC_IN4

LDR

GND

Fig. 4.3 Light sensor circuit

The sensor node voltage is compared with the threshold voltages for different levels
of light intensity corresponding to the four conditions- Optimum, dim, dark and night.

The relationship between the resistance RL and light intensity Lux for a
typical LDR is:
RL = 500 / Lux k

Department of AE & I

Page 19

(4.1)

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

With the LDR connected to 5V through a 10K resistor, the output voltage of the LDR
is :
Vo = 5*RL / (RL+10)

(4.2)

In order to increase the sensitivity of the sensor we must reduce the value of the fixed
resistor in series with the sensor. This may be done by putting other resistors in
parallel with it.
4.1.3 HUMIDITY SENSOR
The humidity sensor HIH4000, manufactured by Honeywell is used for sensing the
humidity. It delivers instrumentation quality RH (Relative Humidity) sensing performance in
a low cost, solder able SIP (Single In-line Package). Relative humidity is a measure, in
percentage, of the vapour in the air compared to the total amount of vapour that could be held
in the air at a given temperature.

Fig. 4.4 HIH-4000-001 Humidity Sensor


4.1.3.1 Features:

Linear voltage output vs. %RH

Laser trimmed interchangeability

Low power design

High accuracy

Fast response time

Department of AE & I

Page 20

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Stable, low drift performance

Chemically resistant

The RH sensor is a laser trimmed, thermoset polymer capacitive sensing element with
on-chip integrated signal conditioning. The sensing element's multilayer construction
provides excellent resistance to most application hazards such as wetting, dust, dirt,
oils and common environmental chemicals.

VCC

12.5 k

Vin

HIH4000 GND
Vout
3

To ADC IN6

Fig 4.5 Humidity sensor circuit

4.1.3.2 Functional description

The sensor develops a linear voltage vs. RH output that is ratiometric to the supply
voltage. That is, when the supply voltage varies, the sensor output voltage follows in
the same proportion. It can operate over a 4-5.8 supply voltage range. At 5V supply
voltage, and room temperature, the output voltage ranges from 0.8 to 3.9V as the
humidity varies from 0% to 100% (noncondensing).

The humidity sensor functions with a resolution of up to 0.5% of relative humidity


(RH).

With a typical current draw of only 200 A, the HIH-4000 Series is ideally suited for
low drain, battery operated systems.

The change in the RH of the surroundings causes an equivalent change in the voltage
output. The output is an analog voltage proportional to the supply voltage.

Department of AE & I

Page 21

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Consequently, converting it to relative humidity (RH) requires that both the supply
and sensor output voltages be taken into account according to the formula:
RH = ((Vout / Vsupply) 0.16) /0.0062, typical at 25C

.(4.3)

This voltage is converted to the digital form by the ADC and then sent as input to the
microcontroller which reads the data.

4.1.4 TEMPERATURE SENSOR


National Semiconductors LM35 IC has been used for sensing the temperature. It is
an integrated circuit sensor that can be used to measure temperature with an electrical output
o

proportional to the temperature (in C). The temperature can be measured more accurately
with it than using a thermistor. The sensor circuitry is sealed and not subject to oxidation, etc.

Fig. 4.6 LM35 temperature sensor


4.1.4.1 Features:

Calibrated directly in Celsius (Centigrade)

Linear + 10.0 mV/C scale factor

0.5C accuracy guaranteed (at +25C)

Rated for full 55 to +150C range

Suitable for remote applications

Low cost due to wafer-level trimming

Operates from 4 to 30 volts

Less than 60 A current drain

Department of AE & I

Page 22

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Low self-heating, 0.08C in still air

Nonlinearity only 14C typical

Fig. 4.7 Temperature sensor circuit


4.1.4.2 Functional description:
o

The sensor has a sensitivity of 10mV / C.

The output of LM35 is amplified using a LM324 single power supply (+5V) op-amp.

The op-amp is designed to have a gain of 5.

The circuitry measures temperatures with a resolution of up to 0.5 degree Celsius.

The output voltage is converted to temperature by a simple conversion factor. The


general equation used to convert output voltage to temperature is:
o

Temperature ( C) = (Vout * 100 ) / 5 C

(4.4)

So if Vout is 5V, then, Temperature = 100 C

The output voltage varies linearly with temperature.

Department of AE & I

Page 23

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.2 ANALOG TO DIGITAL CONVERTER (ADC 0809)


In physical world parameters such as temperature, pressure, humidity, and velocity
are analog signals. A physical quantity is converted into electrical signals. We need an analog
to digital converter (ADC), which is an electronic circuit that converts continuous signals
into discrete form so that the microcontroller can read the data. Analog to digital converters
are the most widely used devices for data acquisition.

Analog world
(temperature,
pressure, etc.)

Transducer

Signal
Conditioning

Analog to
Digital Converter

Microcontroller

Fig. 4.8 Getting data from the analog world


4.2.1 DESCRIPTION
The ADC0809 data acquisition component is a monolithic CMOS device with an 8bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control
logic. The 8-bit A/D converter uses successive approximation as the conversion technique.
The converter features a high impedance chopper stabilized comparator, a 256R voltage
divider with analog switch tree and a successive approximation register. The 8-channel
multiplexer can directly access any of 8-single-ended analog signals.
The design of the ADC0809 has been optimized by incorporating the most desirable
aspects of several A/D conversion techniques. The device offers high speed, high accuracy,
minimal temperature dependence, excellent long-term accuracy and repeatability, and
consumes minimal power. These features make it ideally suited for applications from process
and machine control to consumer and automotive applications.
4.2.2 FEATURES
1. Easy interface to all microcontrollers.
2. Operates ratiometrically or with 5 VDC or analog span adjusted voltage reference.
3. No zero or full-scale adjust required.
4. 8-channel multiplexer with address logic.
5. 0V to 5V input range with single 5V power supply.
Department of AE & I

Page 24

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

6. Outputs meet TTL voltage level specifications.


7. 28-pin molded chip carrier package.

Fig. 4.9 Block diagram of ADC 0809


4.2.3 CONVERSION METHOD USED
Following are the most used conversion methods:
Digital-Ramp ADC
Successive Approximation ADC
Flash ADC
Successive approximation ADC is suitable for the proposed application. It is much
faster than the digital ramp ADC because it uses digital logic to converge on the value closest
to the input voltage. A comparator and a DAC (Digital to Analog Converter) are used in the
process. A flowchart explaining the working is shown below.

Department of AE & I

Page 25

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Fig. 4.10 Flowchart explaining the Successive approximation method


4.2.4 PIN DIAGRAM OF ADC 0808/0809

Fig. 4.11 Pin diagram of ADC 0809


Department of AE & I

Page 26

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

We use A, B, C addresses to select IN0-IN7 and activate Address latch enable (ALE)
to latch in the address. SC is for Start Conversion. EOC is for End of Conversion and OE is
for Output Enable. The output pins D0-D7 provides the digital output from the chip. Vref (-)
and Vref (+) are the reference voltages.
4.2.5 SELECTING AN ANALOG CHANNEL
How to select the channel using three address pins A, B, C is shown in Table below:
Select Analog Channel

IN0

IN1

IN2

IN3

IN4

IN5

IN6

IN7

Table 4.1 Selection of the input channels


The ADC 0804 is most widely used chip, but since it has only one analog input, ADC
0809 is chosen as this chip allows the monitoring of up to 8 different transducers using only a
single chip. The 8 analog input channels are multiplexed and selected according to the
requirement. But for the proposed application only the last 4 channels i.e., IN4, IN5, IN6 and
IN7 are used to monitor the four parameters- temperature, humidity, soil moisture and light
intensity. Hence the address line ADD_C is given to Vcc (+ 5V) as it is always high in this
case. Vref (+) and Vref (-) set the reference voltages. If Vref (-) =Gnd and Vref (+) =5V, the step
size is 5V/256=19.53.
Since there is no self clocking in this chip, the clock must be provided from an
external source to the Clock (CLK) pin. The 8-bit output from the ADC is given to Port 0 of

Department of AE & I

Page 27

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

the microcontroller and the control signals ADD_A, ADD_B, ADD_C, ALE, START, OE,
EOC are given to Port 1 as shown in the figure below.
+5V
11
26

17
IN0

27

VCC

D0

IN1

D1

IN2

D2

IN3

D3

28

1
2
TEMPERATURE SENSOR

IN4

D4

IN5

D5

IN6

HUMIDITY SENSOR

ADC0809

IN7
12

+5v

D7

Vref+

ADD_A

Vref-

ADD_B

CLOCK

ADD_C

21

25
PIN 3.4 OF MC
PIN 3.5 OF MC
23

OE

VCC
PIN 3.1 OF MC

START

EOC

22

7
PIN 3.3 OF MC

PIN 1.7 OF MC

24

10

PIN 3.0 OF MC

PIN 1.6 OF MC

D6

16

PIN 1.5 OF MC

20

5
LIGHT SENSOR

PIN 1.3 OF MC
PIN 1.4 OF MC

18
19

PIN 1.1 OF MC

15 PIN 1.2 OF MC
8

3
MOISTURE SENSOR

PIN 1.0 OF MC
14

GND

PIN 3.7 OF MC

ALE

13

Fig. 4.12 ADC 0809 pin details as used for this application
At a certain point of time, even though there is no conversion in progress the
ADC0809 is still internally cycling through 8 clock periods. A start pulse can occur any time
during this cycle but the conversion will not actually begin until the converter internally
cycles to the beginning of the next 8 clock period sequence. As long as the start pin is held
high no conversion begins, but when the start pin is taken low the conversion will start within
Department of AE & I

Page 28

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

8 clock periods. The EOC output is triggered on the rising edge of the start pulse. It, too, is
controlled by the 8 clock period cycle, so it will go low within 8 clock periods of the rising
edge of the start pulse. One can see that it is entirely possible for EOC to go low before the
conversion starts internally, but this is not important, since the positive transition of EOC,
which occurs at the end of a conversion, is what the control logic is looking for. Once EOC
does go high this signals the interface logic that the data resulting from the conversion is
ready to be read. The output enable (OE) is then raised high.

Fig 4.13 Timing diagram of ADC 0809


4.3 CLOCK CIRCUITRY FOR ADC:
4.3.1 Functional Description:
The clock for the ADC is generated using the IC CD4093, which is a 2-input Schmitt
triggered NAND gate. A Schmitt trigger is a comparator circuit that incorporates positive
feedback.
The Control pin is pulled high and the capacitor charges and discharges producing
alternate patterns of 0s and 1, generating a square waveform. When the input is higher than a
certain chosen threshold, the output is high; when the input is below another (lower) chosen
threshold, the output is low; when the input is between the two, the output retains its value.
The trigger is so named because the output retains its value until the input changes
Department of AE & I

Page 29

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

sufficiently to trigger a change. This dual threshold action is called hysteresis, and implies
that the Schmitt trigger has some memory.

Fig. 4.14 Clock circuitry for ADC


The benefit of a Schmitt trigger over a circuit with only a single input threshold is
greater stability (noise immunity). With only one input threshold, a noisy input signal near
that threshold could cause the output to switch rapidly back and forth from noise alone. A
noisy Schmitt Trigger input signal near one threshold can cause only one switch in output
value, after which it would have to move to the other threshold in order to cause another
switch.

Fig. 4.15 The effect of using a Schmitt trigger (B) instead of a comparator (A)

Department of AE & I

Page 30

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.4 MICROCONTROLLER (AT89S52)


4.4.1 CRITERIA FOR CHOOSING A MICROCONTROLLER
The basic criteria for choosing a microcontroller suitable for the application are:
1) The first and foremost criterion is that it must meet the task at hand efficiently and cost
effectively. In analyzing the needs of a microcontroller-based project, it is seen whether an 8bit, 16-bit or 32-bit microcontroller can best handle the computing needs of the task most
effectively. Among the other considerations in this category are:
(a) Speed: The highest speed that the microcontroller supports.
(b) Packaging: It may be a 40-pin DIP (dual inline package) or a QFP (quad flat
package), or some other packaging format. This is important in terms of space,
assembling, and prototyping the end product.
(c) Power consumption: This is especially critical for battery-powered products.
(d) The number of I/O pins and the timer on the chip.
(f) How easy it is to upgrade to higher performance or lower consumption versions.
(g) Cost per unit: This is important in terms of the final cost of the product in which
a microcontroller is used.
2) The second criterion in choosing a microcontroller is how easy it is to develop products
around it. Key considerations include the availability of an assembler, debugger, compiler,
technical support.
3) The third criterion in choosing a microcontroller is its ready availability in needed
quantities both now and in the future. Currently of the leading 8-bit microcontrollers, the
8051 family has the largest number of diversified suppliers. By supplier is meant a producer
besides the originator of the microcontroller. In the case of the 8051, this has originated by
Intel several companies also currently producing the 8051.
Thus the microcontroller AT89S52, satisfying the criterion necessary for the proposed
application is chosen for the task.

4.4.2 DESCRIPTION:
The 8051 family of microcontrollers is based on an architecture which is highly
optimized for embedded control systems. It is used in a wide variety of applications from
Department of AE & I

Page 31

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

military equipment to automobiles to the keyboard. Second only to the Motorola 68HC11 in
eight bit processors sales, the 8051 family of microcontrollers is available in a wide array of
variations from manufacturers such as Intel, Philips, and Siemens. These manufacturers have
added numerous features and peripherals to the 8051 such as I2C interfaces, analog to digital
converters, watchdog timers, and pulse width modulated outputs. Variations of the 8051 with
clock speeds up to 40MHz and voltage requirements down to 1.5 volts are available. This
wide range of parts based on one core makes the 8051 family an excellent choice as the base
architecture for a company's entire line of products since it can perform many functions and
developers will only have to learn this one platform.
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with
8K bytes of in-system programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the industrystandard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to
be reprogrammed in-system or by a conventional nonvolatile memory programmer. By
combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip,
the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and costeffective solution to many embedded control applications. In addition, the AT89S52 is
designed with static logic for operation down to zero frequency and supports two software
selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM,
timer/counters, serial port, and interrupt system to continue functioning. The Power-down
mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions
until the next interrupt or hardware reset.
4.4.3 FEATURES:
The basic architecture of AT89C51 consists of the following features:

Compatible with MCS-51 Products

8K Bytes of In-System Programmable (ISP) Flash Memory

4.0V to 5.5V Operating Range

Fully Static Operation: 0 Hz to 33 MHz

256 x 8-bit Internal RAM

32 Programmable I/O Lines

Department of AE & I

Page 32

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Three 16-bit Timer/Counters

Eight Interrupt Sources

Full Duplex UART Serial Channel

Low-power Idle and Power-down Modes

Interrupt Recovery from Power-down Mode

Watchdog Timer

Fast Programming Time

Flexible ISP Programming (Byte and Page Mode)

4.4.4 PIN CONFIGURATION

Fig. 4.16 Pin diagram of AT89S52

Department of AE & I

Page 33

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.4.5 BLOCK DIAGRAM

Fig. 4.17 Block diagram of the microcontroller

Department of AE & I

Page 34

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.4.6 PIN DESCRIPTION

VCC: Supply voltage.

GND: Ground.

Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin
can sink eight TTL inputs. When 1s are 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 program and data memory. In this mode,
P0 has internal pull-ups.

Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins,
they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
1 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter
2 external count input (P1.0/T2) and the timer/counter 2 trigger input (P1.1/T2EX),
respectively, as shown in the following table.

Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2
output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins,
they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
2 pins that are externally being pulled low will source current (IIL) because of the
internal pull-ups. Port 2 emits the high-order address byte during fetches from
external program memory and during accesses to external data memory that use 16bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pullups when emitting 1s. During accesses to external data memory that uses 8-bit
addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function
register.

Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3
output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins,
they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port
3 pins that are externally being pulled low will source current (IIL) because of the
pull-ups. Port 3 receives some control signals for Flash programming an verification.

Department of AE & I

Page 35

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Port 3 also serves the functions of various special features of the AT89S52, as shown in
the following table.
Alternate functions of Port 3:

Table 4.2 Alternate functions of Port 3


RST: Reset input. A high on this pin for two machine cycles while the oscillator
is running resets the device. This pin drives high for 98 oscillator periods after the
watchdog times out.
4.4.6.1 Power-On Reset circuit

Fig. 4.18 Power-on reset circuit


Department of AE & I

Page 36

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

In order for the RESET input to be effective, it must have a minimum duration of two
machine cycles.

ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the
low byte of the address during accesses to external memory. This pin is also the
program pulse input (PROG) during Flash programming. In normal operation,
ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used
for external timing or clocking purposes. Note, however, that one ALE pulse is
skipped during each access to external data memory. If desired, ALE operation
can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is
active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly
pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in
external execution mode.

PSEN: Program Store Enable (PSEN) is the read strobe to external program
memory. When the AT89S52 is executing code from external program memory,
PSEN is activated twice each machine cycle, except that two PSEN activations
are skipped during each access to external data memory.

EA: External Access Enable. EA must be strapped to GND in order to enable the
device to fetch code from external program memory locations starting at 0000H
up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be
internally latched on reset. EA should be strapped to VCC for internal program
executions. This pin also receives the 12-volt programming enable voltage (VPP)
during Flash programming.

XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.

XTAL2: Output from the inverting oscillator amplifier.

4.4.6.2 The AT89S52 oscillator clock circuit

It uses a quartz crystal oscillator.

We can observe the frequency on the XTAL2 pin.

Department of AE & I

Page 37

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

C2
XTAL2
30pF
C1
XTAL1

30pF

GN D

Fig 4.19 The AT89S52 oscillator clock circuit

The crystal frequency is the basic internal frequency of the microcontroller.

The internal counters must divide the basic clock rate to yield standard
communication bit per second (baud) rates.

An 11.0592 megahertz crystal, although seemingly an odd value, yields a crystal


frequency of 921.6 kilohertz, which can be divided evenly by the standard
communication baud rates of 19200, 9600, 4800, 2400, 1200, and 300 hertz.

4.4.7 SPECIAL FUNCTION REGISTERS


The Special Function Registers (SFRs) contain memory locations that are used for
special tasks. Each SFR occupies internal RAM from 0x80 to 0xFF.They are 8-bits wide.
The A (accumulator) register or accumulator is used for most ALU operations and
Boolean Bit manipulations.
Register B is used for multiplication & division and can also be used for general
purpose storage.
PSW (Program Status Word) is a bit addressable register
PC or program counter is a special 16-bit register. It is not part of SFR. Program
instruction bytes are fetched from locations in memory that are addressed by the
PC.

Department of AE & I

Page 38

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Stack Pointer (SP) register is eight bits wide. It is incremented before data is
stored during PUSH and CALL executions. While the stack may reside anywhere
in on-chip RAM, the Stack Pointer is initialized to 07H after a reset. This causes
the stack to begin at location 08H.
DPTR or data pointer is a special 16-bit register that is accessible as two 8- bit
registers: DPL and DPH, which are used to used to furnish memory addresses for
internal and external code access and external data access.
Control Registers: Special Function Registers IP, IE, TMOD, TCON, SCON, and
PCON contain

control and status

bits for

the interrupt system, the

Timer/Counters, and the serial port.


Timer Registers: Register pairs (TH0, TL0) and (TH1, TL1) are the 16-bit
Counter registers for Timer/Counters 0 and 1, respectively.
4.4.8 MEMORY ORGANIZATION
MCS-51 devices have a separate address space for Program and Data Memory. Up to
64K bytes each of external Program and Data Memory can be addressed.
Program Memory: If the EA pin is connected to GND, all program fetches are
directed to external memory. On the AT89S52, if EA is connected to VCC,
program fetches to addresses 0000H through 1FFFH are directed to internal
memory and fetches to addresses 2000H through FFFFH are to external memory.
Data Memory: The AT89S52 implements 256 bytes of on-chip RAM. The upper
128 bytes occupy a parallel address space to the Special Function Registers. This
means that the upper 128 bytes have the same addresses as the SFR space but are
physically separate from SFR space. When an instruction accesses an internal
location above address 7FH, the address mode used in the instruction specifies
whether the CPU accesses the upper 128 bytes of RAM or the SFR space.
Instructions which use direct addressing access the SFR space. The lower 128
bytes of RAM can be divided into three segments:

Department of AE & I

Page 39

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1. Register Banks 0-3: locations 00H through 1FH (32 bytes). The device after reset
defaults to register bank 0. To use the other register banks, the user must select them
in software. Each register bank contains eight 1-byte registers R0-R7. Reset initializes
the stack point to location 07H, and is incremented once to start from 08H, which is
the first register of the second register bank.
2. Bit Addressable Area: 16 bytes have been assigned for this segment 20H-2FH.
Each one of the 128 bits of this segment can be directly addressed (0-7FH). Each of
the 16 bytes in this segment can also be addressed as a byte.
3. Scratch Pad Area: 30H-7FH are available to the user as data RAM. However, if
the data pointer has been initialized to this area, enough bytes should be left aside to
prevent SP data destruction.

Fig. 4.20 Internal memory block

4.4.9 WATCHDOG TIMER (One-time Enabled with Reset-out)


The WDT is intended as a recovery method in situations where the CPU may be
subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog Timer
Department of AE & I

Page 40

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset. To enable the
WDT, a user must write 01EH and 0E1H in sequence to the WDTRST register (SFR location
0A6H). When the WDT is enabled, it will increment every machine cycle while the oscillator
is running. The WDT timeout period is dependent on the external clock frequency. There is
no way to disable the WDT except through reset (either hardware reset or WDT overflow
reset). When WDT over-flows, it will drive an output RESET HIGH pulse at the RST pin.
4.4.10 TIMERS AND COUNTERS
Many microcontroller applications require the counting of external events such as the
frequency of a pulse train, or the generation of precise internal time delays between computer
actions. Both of these tasks can be accomplished using software techniques, but software
loops for counting or timing keep the processor occupied so that, other perhaps more
important, functions are not done. Hence the better option is to use interrupts & the two 16bit count- up timers. The microcontroller can programmed for either of the following:
1. Count internal - acting as timer
2. Count external - acting as counter
All counter action is controlled by the TMOD (Timer Mode) and the TCON
(Timer/Counter Control) registers. TCON Timer control SFR contains timer 1& 2 overflow
flags, external interrupt flags, timer control bits, falling edge/low level selector bit etc.
TMOD timer mode SFR comprises two four-bit registers (timer #1, timer #0) used to specify
the timer/counter mode and operation.
The timer may operate in any one of four modes that are determined by modes bits
M1 and M0 in the TMOD register:
TIMER MODE-0: Setting timer mode bits to 00b in the TMOD register results in using the
TH register as an 8-bit counter and TL as a 5-bit counter. Therefore mode0 is a 13-bit
counter.
TIMER MODE-1: Mode-1 is similar to mode-0 except TL is configured as a full 8-bit
counter when the mode bits are set to 01b in TMOD.
TIMER MODE-2: Setting the mode bits to 10b in TMOD configures the timer to use only
the TL counter as an 8-bit counter. TH is used to hold a value that is loaded into TL every
time TL overflows from FFh to 00h. The timer flag is also set when TL overflows.

Department of AE & I

Page 41

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

TIMER MODE-3: In mode-3, timer-1 simply hold its count, where as timer 0 registers TL0
and TH0 are used as two separate 8-bit counters. TL0 uses the Timer-0 control bits. TH0
counts machine cycles and takes over the use of TR1 and TF1 from Timer-1.

4.4.11 INTERRUPTS
A computer has only two ways to determine the conditions that exist in internal and
external circuits. One method uses software instructions that jump to subroutines on the
states of flags and port pins. The second method responds to hardware signals, called
interrupts that force the program to call a subroutine.
The AT89S52 has a total of six interrupt vectors: two external interrupts (INT0 and
INT1), three timer interrupts (Timers 0, 1, and 2), and the serial port interrupt. Each of these
interrupt sources can be individually enabled or disabled by setting or clearing a bit in
Special Function Register IE. IE also contains a global disable bit, EA, which disables all
interrupts at once.
Each interrupt forces the processor to jump at the interrupt location in the memory.
The interrupted program must resume operation at the instruction where the interrupt took
place. Program resumption is done by storing the interrupted PC address on to stack.
RETI instruction at the end of ISR will restore the PC address.

4.4.12 MICROCONTROLLER CONFIGURATION USED IN THE SET-UP


The microcontroller is interfaced with the ADC in polling mode. INT0 is used for the
LCD mode selection switch in order to switch between two modes of display:
1) Sensor output display
2) Actuator status display
Port details:

Port 0: Interfaced with the LCD data lines.

Port 1: Interfaced with the ADC data lines

Port 2: Interfaced with the LCD Control lines and AC Interface control

Port 3: Interfaced with the ADC control lines

Department of AE & I

Page 42

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ADC_D0

P1.0

VCC

LED+

P0.0

ADC_D1

P1.1

ADC_D2

P1.2

ADC_D3

ADC_D4
ADC_D5

ADC_D6

ADC_D7
ADC_A

ADC_ALE

P0.2

P0.3

P0.4

P1.4

DB1
DB2

DB3

DB4
P1.5

P0.5

DB5

P1.6

P0.6

DB6

P1.7

P3.4

P3.5

P0.7

AT89S52

DB7

EA

ALE

P3.1

PSEN

ADC_EOC
ADC_OE

DB0

P1.3

ADC_B
ADC_START

P0.1

P2.7

P3.7

P2.6

ENABLE
P3.3

BUZZER
MODE SELECTION SWITCH

P2.5
P3.0

R/W (Read/Write)
RS (Register select)

P2.4

COOLER
P3.6

P3.2
30 pF

PUMP
P2.3

XTAL2

SPRAYER
P2.2

LIGHT 1

XTAL1

LIGHT 2

30 pF

10uF

RST
GND

RST

P2.1

GND

P2.0

8.2 k

Fig. 4.21 Microcontroller pin details


Department of AE & I

Page 43

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

4.5 LIQUID CRYSTAL DISPLAY


A liquid crystal display (LCD) is a thin, flat display device made up of any number of
color or monochrome pixels arrayed in front of a light source or reflector. Each pixel consists
of a column of liquid crystal molecules suspended between two transparent electrodes, and
two polarizing filters, the axes of polarity of which are perpendicular to each other. Without
the liquid crystals between them, light passing through one would be blocked by the other.
The liquid crystal twists the polarization of light entering one filter to allow it to pass through
the other.
Many microcontroller devices use 'smart LCD' displays to output visual information.
LCD displays designed around Hitachi's LCD HD44780 module, are inexpensive, easy to
use, and it is even possible to produce a readout using the 8x80 pixels of the display. They
have a standard ASCII set of characters and mathematical symbols.
For an 8-bit data bus, the display requires a +5V supply plus 11 I/O lines. For a 4-bit
data bus it only requires the supply lines plus seven extra lines. When the LCD display is not
enabled, data lines are tri-state and they do not interfere with the operation of the
microcontroller.
Data can be placed at any location on the LCD. For 162 LCD, the address locations
are:
First line

80

81

Second line

C0

C1

82
C2

83

84

C3

C4

85
C5

86
C6

through

8F

through CF

Fig 4.22 Address locations for a 2x16 line LCD


4.5.1 SIGNALS TO THE LCD
The LCD also requires 3 control lines from the microcontroller:
1) Enable (E)
This line allows access to the display through R/W and RS lines. When this line
is low, the LCD is disabled and ignores signals from R/W and RS. When (E) line is
high, the LCD checks the state of the two control lines and responds accordingly.
2) Read/Write (R/W)
This line determines the direction of data between the LCD and microcontroller.

Department of AE & I

Page 44

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

When it is low, data is written to the LCD. When it is high, data is read from the
LCD.
3) Register select (RS)
With the help of this line, the LCD interprets the type of data on data lines. When it is
low, an instruction is being written to the LCD. When it is high, a character is being written
to the LCD.
4.5.1.1 Logic status on control lines:

E - 0 Access to LCD disabled


- 1 Access to LCD enabled

R/W - 0 Writing data to LCD


- 1 Reading data from LCD

RS - 0 Instruction
- 1 Character

4.5.1.2 Writing and reading the data from the LCD:


Writing data to the LCD is done in several steps:
1) Set R/W bit to low
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
Read data from data lines (if it is reading):
1) Set R/W bit to high
2) Set RS bit to logic 0 or 1 (instruction or character)
3) Set data to data lines (if it is writing)
4) Set E line to high
5) Set E line to low
4.5.2 PIN DESCRIPTION
Most LCDs with 1 controller has 14 Pins and LCDs with 2 controller has 16 Pins
(two pins are extra in both for back-light LED connections).

Department of AE & I

Page 45

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Fig 4.23 Pin diagram of 2x16 line LCD

Table 4.23 Pin description of the LCD

4.6 ALARM CIRCUITRY


BUZZER:
A buzzer or beeper is a signaling device, usually electronic, typically used in
automobiles, household appliances such as a microwave oven.

Fig. 4.24 Electrical symbol of a buzzer

Department of AE & I

Page 46

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

It is connected to the control unit through the transistor that acts as an electronic
switch for it. When the switch forms a closed path to the buzzer, it sounds a warning in the
form of a continuous or intermittent buzzing or beeping sound.
The transistor acts as a normal controlled by the base connection. It switches ON
when a positive voltage from the control unit is applied to the base. If the positive voltage is
less than 0.6V, the transistor switches OFF. No current flows through the buzzer in this case
and it will not buzz. As can be seen in the buzzer circuitry given below, a protection resistor
of 10k ohm is used in order to protect the transistor from being damaged in case of excessive
current flow. In our system, the buzzer is designed to give a small beep whenever one of the
devices such as a cooler or a bulb turns on in order to alert the user.

Fig. 4.25 Buzzer circuitry

4.7 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. It was invented by Joseph Henry 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 a broad sense, a form of an electrical amplifier.

Department of AE & I

Page 47

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Fig. 4.26 Sugar cube relay


Despite the speed of technological developments, some products prove so popular
that their key parameters and design features remain virtually unchanged for years. One such
product is the sugar cube relay, shown in the figure above, which has proved useful to
many designers who needed to switch up to 10A, whilst using relatively little PCB area
Since relays are switches, the terminology applied to switches is also applied to
relays. A relay will switch one or more poles, each of whose contacts can be thrown by
energizing the coil in one of three ways:
1.Normally - open (NO) contacts connect the circuit when the relay is activate d; the circuit
is disconnected when the relay is inactive. It is also called a FORM A contact or make
contact.
2.Normally - closed (NC) contacts disconnect the circuit when the relay is activated ; the
circuit is connected when relay is inactive. It is also called FORM B contact or
break contact
3.Change-over or double-throw contacts control two circuits ; one normally open contact
and one normally closed contact with a common terminal. It is also called a Form C
transfer contact.
The following types of relays are commonly encountered:

Department of AE & I

Page 48

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

"C" denotes the common terminal in SPDT and DPDT types


Fig. 4.27 Different types of Relays

SPST - Single Pole Single Throw: These have two terminals which can be connected
or disconnected. Including two for the coil, such a relay has four terminals in total. It
is ambiguous whether the pole is normally open or normally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the ambiguity.

SPDT - Single Pole Double Throw: A common terminal connects to either of two
others. Including two for the coil, such a relay has five terminals in total.

DPST - Double Pole Single Throw: These have two pairs of terminals. Equivalent to
two SPST switches or relays actuated by a single coil. Including two for the coil, such
a relay has six terminals in total. It is ambiguous whether the poles are normally open,
normally closed, or one of each.

DPDT - Double Pole Double Throw: These have two rows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has
eight terminals, including the coil.

QPDT - Quadruple Pole Double Throw: Often referred to as Quad Pole Double
Throw, or 4PDT. These have four rows of change-over terminals. Equivalent to four
SPDT switches or relays actuated by a single coil, or two DPDT relays. In total,
fourteen terminals including the coil.
The Relay interfacing circuitry used in the application is:

Department of AE & I

Page 49

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1N4148

Fig. 4.28 Relay circuitry

4.8 POWER SUPPLY CONNECTION


The power supply section consists of step down transformers of 230V primary to 9V
and 12V secondary voltages for the +5V and +12V power supplies respectively. The stepped
down voltage is then rectified by 4 1N4007 diodes. The high value of capacitor 1000 F
charges at a slow rate as the time constant is low, and once the capacitor charges there is no
resistor for capacitor to discharge. This gives a constant value of DC. IC 7805 is used for
regulated supply of +5 volts and IC 7812 is used to provide a regulated supply of +12 volts in
order to prevent the circuit ahead from any fluctuations. The filter capacitors connected after
this IC filters the high frequency spikes. These capacitors are connected in parallel with
supply and common so that spikes filter to the common. These give stability to the power
supply circuit.
As can be seen from the above circuit diagrams, the rectified voltage from the 4
diodes is given to pin 1 of the respective regulators. Pin 2 of the regulators is connected to
ground and pin 3 to Vcc. With adequate heat sinking the regulator can deliver 1A output
current. If internal power dissipation becomes too high for the heat sinking provided, the
thermal shutdown circuit takes over preventing the IC from overheating.

Department of AE & I

Page 50

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Vin

7805

3
Vout

GND
2

1000uf
10uf

230V, 50Hz

1uf

Fig. 4.29 +5V Power supply circuit

Fig. 4.30 +12V Power supply Circuit

Department of AE & I

Page 51

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


CIRCUIT SCHEMATIC OF THE SYSTEM

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 5
SYSTEMS USED IN WORK MODE

Department of AE & I

Page 53

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

5.1 DRIP IRRIGATION SYSTEM FOR CONTROLLING SOIL MOISTURE


Drip, or micro-irrigation, technology uses a network of plastic pipes to carry a low
flow of water under low pressure to plants.
Polyethylene tubing is run from the source of water to the plant, where the emitter is
attached for dripping water. Emitter line (poly tubing with pre-installed emitters) is used
where a continuous band of water is needed. Fittings are available to make sharp turns
(elbows), branch lines (tees), and to make the transition between different sizes of tubing.
When plants are removed or die, drip lines should be plugged.

Fig. 5.1 Drip irrigation system


Drip irrigation (sometimes called trickle irrigation) works by applying water slowly,
directly to the soil. The high efficiency of drip irrigation results from two primary factors.
The first is that the water soaks into the soil before it can evaporate or run off. The second is
that the water is only applied where it is needed, (at the plant's roots) rather than sprayed
everywhere.
A drip irrigation system slowly provides water to the plant's root system. Regular
watering prevents plant dehydration, but roots don't get overly soaked and in turn, plant
growth can increase up to 50%. Drip systems irrigate all types of landscape: shrubs, trees,
perennial beds, ground covers, annuals and lawns. Drip is the best choice to water roof garDepartment of AE & I

Page 54

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

dens, containers on decks and patios, row crops and kitchen gardens, orchards, and
vineyards.
5.2 ARTIFICIAL GROWING LIGHTS FOR CONTROLLING ILLUMINATION
Growing lights enable cultivators to extend daylight hours - useful for winter and
spring growing when levels of natural lights can be low, and one can therefore improve plant
growth. Three basic types of lamps used in greenhouse lighting are:

Fluorescent lamps - These have the advantage of higher light efficiency with low
heat. This type of lamp is the most widely used for supplemental light. It is available
in a variety of colors but cool-white lamps are the most common. High intensity
(1500 ma) fluorescent tubes that require higher wattage are also commonly used to
reach 2000 foot candles.

Incandescent lamps - These vary in size from 60 watts to 500 watts. The grower can
vary foot-candle levels by adjusting the spacing and mounting height above the
plants.

High-intensity discharge (HID) lamps - These have a long life (5000 hours or
more). With improvements made possible by the addition of sodium and metalhalides, the lamp has a high emission of light in the regions utilized by plants.

The following generally accepted cultural divisions describe light levels:

Very high: Over 5000 footcandles--nearly full sun except at midday, when full
summer sun in most latitudes may reach 10,000 fc.

High: 4000-5000 footcandles--bright light, just under 50% of the full midday sun.

Intermediate: 1800-4000 footcandles--dappled sunlight.

Low: 1000-1800 footcandles--reduced sunlight, so that if a hand is passed over the


leaves it does not produce a shadow.
One footcandle is equal to 10.76 lux, although in the lighting industry, typically this

is approximated as 1 footcandle being equal to 10 lux.

Department of AE & I

Page 55

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

5.3 TEMPERATURE CONTROLLERS


5.3.1 COOLING EQUIPMENT
There are three primary cooling devices in most greenhouses. These are the vent system,
exhaust fan, and swamp cooler. Some greenhouses may make use of air conditioners and/or
misting systems as well.

Vents are hinged or track connected panels in the roof or sides of greenhouses. They
open up the greenhouse to outside natural air. Hot air that builds up in the greenhouse
can escape, and fresh air can enter the house. The microcontroller can be used to
automate the opening and closing of these vents depending upon requirement.
But during hot summer days, venting alone will not get the job done.

Exhaust fans can move a large volume of the hot greenhouse air out and pull fresh
air in through the rear vent. They're powerful for a reason, as full sun on a hot
summer day can cause temperatures inside the greenhouse to superheat. An exhaust
fan must be able to pull this air out, or the temperatures will continue to rise.

Swamp coolers: come in different widths and lengths. They can be configured to the
appropriate size, as this varies depending on the length and width of the greenhouse,
location where you live, and type of plants you wish to grow.

5.3.2 HEATING EQUIPMENT

Hot-water or steam heater: A hot-water system with circulator or a steam system


linked with automatic ventilation will give adequate temperature control. In some
areas, coal or natural gas is readily available at low cost. This fuel is ideal for hotwater or a central steam system. Steam has an advantage in that it can be used to
sterilize growing beds and potting soils.

Electric heaters: Overhead infrared heating equipment combined with soil cable heat
provides a localized plant environment, which allows plants to thrive even though the
surrounding air is at a lower than normal temperature. Electric resistance-type heaters
are used as space heaters or in a forced air system.

Department of AE & I

Page 56

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

5.4 HUMIDIFCATION SYSTEMS


Many evaporative cooling and humidifying systems are available: Foggers, Mist
systems, Roof Sprinklers, and Pan & Fan Systems. They add water vapour to the air, and
may subsequently reduce the amount of water that the plants need to transpire.

Roof sprinklers add water vapour and cool the incoming air. On large ranges, it is
possible to decrease the temperature by 3 - 5 C and increase the humidity by 5-10%.

Pad and fan systems consist of porous wet pads at the inlet end of a fan ventilated
greenhouse. As the exhaust fans draw air through the wet pads, water evaporates, cooling
and humidifying the air. Temperatures tend to be coolest nearer the fans and hottest at the
exhaust when using these systems.

Mist and fog systems produce tiny water droplets that evaporate, thereby cooling and
humidifying the greenhouse air. A misting system can provide needed moisture
to maintain a healthy humidity level of 50 to 70%.

Department of AE & I

Page 57

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 6
SOFTWARE

Department of AE & I

Page 58

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

6.1 INTRODUCTION TO KEIL SOFTWARE


Keil MicroVision is an integrated development environment used to create software
to be run on embedded systems (like a microcontroller). It allows for such software to be
written either in assembly or C programming languages and for that software to be simulated
on a computer before being loaded onto the microcontroller.
6.1.1 WHAT IS Vision3?
Vision3 is an IDE (Integrated Development Environment) that helps write, compile,
and debug embedded programs. It encapsulates the following components:

A project manager.
A make facility.
Tool configuration.
Editor.
A powerful debugger.
6.1.2 STEPS FOLLOWED IN CREATING AN APPLICATION IN uVision3:
To create a new project in uVision3:
1. Select Project - New Project.
2. Select a directory and enter the name of the project file.
3. Select Project Select Device and select a device from Device Database.
4. Create source files to add to the project
5. Select Project - Targets, Groups, and Files. Add/Files, select Source Group1, and add
the source files to the project.
6. Select Project - Options and set the tool options. Note that when the target device is
selected from the Device Database all-special options are set automatically. Default
memory model settings are optimal for most applications.
7. Select Project - Rebuild all target files or Build target
To create a new project, simply start MicroVision and select Project=>New
Project from the pulldown menus. In the file dialog that appears, choose a name and base
Department of AE & I

Page 59

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

directory for the project. It is recommended that a new directory be created for each project,
as several files will be generated. Once the project has been named, the dialog shown in the
figure below will appear, prompting the user to select a target device. In this lab, the chip
being used is the AT89S52, which is listed under the heading Atmel.

Fig. 6.1 Window for choosing the target device


Next, MicroVision must be instructed to generate a HEX file upon program
compilation. A HEX file is a standard file format for storing executable code that is to be
loaded onto the microcontroller.
In the Project Workspace pane at the left, rightclick on Target 1 and select
Options for Target 1 .Under the Output tab of the resulting options dialog, ensure that
both the Create Executable and Create HEX File options are checked. Then click OK
as shown in the two figures below.

Department of AE & I

Page 60

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Fig. 6.2 Project Workspace Pane

Fig. 6.3 Project Options Dialog

Next, a file must be added to the project that will contain the project code. To do this,
expand the Target 1 heading, rightclick on the Source Group 1 folder, and select Add
files Create a new blank file (the file name should end in .asm), select it, and click
Add. The new file should now appear in the Project Workspace pane under the Source
Group 1 folder. Double-click on the newly created file to open it in the editor. All code for
this lab will go in this file. To compile the program, first save all source files by clicking on
the Save All button, and then click on the Rebuild All Target Files to compile the
program as shown in the figure below. If any errors or warnings occur during compilation,
they will be displayed in the output window at the bottom of the screen. All errors and
warnings will reference the line and column number in which they occur along with a
description of the problem so that they can be easily located. Note that only errors indicate
that the compilation failed, warnings do not (though it is generally a good idea to look into
them anyway).

Fig. 6.4 Save All and Build All Target Files Buttons
Department of AE & I

Page 61

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

When the program has been successfully compiled, it can be simulated using the
integrated debugger in Keil MicroVision. To start the debugger, select Debug=>Start/Stop
Debug Session from the pulldown menus.
At the left side of the debugger window, a table is displayed containing several key
parameters about the simulated microcontroller, most notably the elapsed time (circled in the
figure below). Just above that, there are several buttons that control code execution. The
Run button will cause the program to run continuously until a breakpoint is reached,
whereas the Step Into button will execute the next line of code and then pause (the current
position in the program is indicated by a yellow arrow to the left of the code).

Fig. 6.5 Vision3 Debugger window

Department of AE & I

Page 62

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Breakpoints can be set by doubleclicking on the grey bar on the left edge of the
window containing the program code. A breakpoint is indicated by a red box next to the line
of code.

Fig. 6.6 Reset, Run and Step into options


The current state of the pins on each I/O port on the simulated microcontroller can
also be displayed. To view the state of a port, select Peripherals=>I/O Ports=>Port n
from the pulldown menus, where n is the port number. A checked box in the port window
indicates a high (1) pin, and an empty box indicates a low (0) pin. Both the I/O port data and
the data at the left side of the screen are updated whenever the program is paused.
The debugger will help eliminate many programming errors, however the simulation
is not perfect and code that executes properly in simulation may not always work on the
actual microcontroller.
Department of AE & I

Page 63

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

6.1.3 DEVICE DATABASE


A unique feature of the Keil Vision3 IDE is the Device Database, which contains
information about more than 400 supported microcontrollers. When you create a new
Vision3 project and select the target chip from the database, Vision3 sets all assembler,
compiler, linker, and debugger options for you. The only option you must configure is the
memory map.
6.1.4 PERIPHERAL SIMULATION
The Vision3 Debugger provides complete simulation for the CPU and on-chip
peripherals of most embedded devices. To discover which peripherals of a device are
supported, in Vision3 select the Simulated Peripherals item from the Help menu. You may
also use the web-based Device Database. We are constantly adding new devices and
simulation support for on-chip peripherals so be sure to check Device Database often.

6.2 PROGRAMMER
The programmer used is a powerful programmer for the Atmel 89 series of
microcontrollers that includes 89C51/52/55, 89S51/52/55 and many more.
It is simple to use & low cost, yet powerful flash microcontroller programmer for the
Atmel 89 series. It will Program, Read and Verify Code Data, Write Lock Bits, Erase and
Blank Check. All fuse and lock bits are programmable. This programmer has intelligent
onboard firmware and connects to the serial port. It can be used with any type of computer
and requires no special hardware. All that is needed is a serial communication port which all
computers have.
All devices also have a number of lock bits to provide various levels of software and
programming protection. These lock bits are fully programmable using this programmer.
Lock bits are useful to protect the progam to be read back from microcontroller only
allowing erase to reprogram the microcontroller.
Major parts of this programmer are Serial Port, Power Supply and Firmware
microcontroller. Serial data is sent and received from 9 pin connector and converted to/from

Department of AE & I

Page 64

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

TTL logic/RS232 signal levels by MAX232 chip. A Male to Female serial port cable,
connects to the 9 pin connector of hardware and another side connects to back of computer.
All the programming intelligence is built into the programmer so you do not need
any special hardware to run it. Programmer comes with window based software for easy
programming of the devices.

6.3 ProLoad PROGRAMMING SOFTWARE


ProLoad is a software working as a user friendly interface for programmer boards
from Sunrom Technologies. Proload gets its name from Program Loader term, because
that is what it is supposed to do. It takes in compiled HEX file and loads it to the hardware.
Any compiler can be used with it, Assembly or C, as all of them generate compiled HEX
files. ProLoad accepts the Intel HEX format file generated from compiler to be sent to target
microcontroller. It auto detects the hardware connected to the serial port. It also auto detects
the chip inserted and bytes used. The software is developed in Delphi and requires no
overhead of any external DLL.
The programmer connects to the computers serial port (Comm 1, 2, 3 or 4) with a
standard DB9 Male to DB9 Female cable. Baud Rate - 57600, COMx Automatically selected
by window software. No PC Card Required.
After making the necessary selections, the Auto Program button is clicked as shown
in the figure below which burns the selected hex file onto the microcontroller.

Department of AE & I

Page 65

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Fig. 6.7 Programming window

Department of AE & I

Page 66

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 7
FLOWCHART

Department of AE & I

Page 67

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

7.1 FLOWCHART REPRESENTING THE WORKING OF THE SYSTEM:

START

INITIALISE THE LCD

DISPLAY INITIALISATION MESSAGE


B
INITIALISE THE ADC

OBTAIN THE SENSOR DATA


OBTAIN DIGITIZED DATA FROM ADC

STORE DIGITAL OUTPUT IN THE BUFFER MEMORY OF


THE MICROCONTROLLER
CLEAR THE LCD

IS MODE
BUTTON
PRESSED

YES

NO

DISPLAY THE DEVICE STATUS

DISPLAY THE SENSOR DATA

A
Department of AE & I

Page 68

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

YES

NO

SENSOR
THRESHOLD
CROSSED?

TURN ON ACTUATOR

TURN OFF ACTUATOR

7.2 FLOWCHART FOR LCD INITIALIZATION

START

INTILIAZE THE LCD WITH 2LINES, 5X7 MATRIX

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY


C

Department of AE & I

Page 69

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

SET THE DISPLAY ON AND THE CURSOR ON

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE LCD AND SHIFT THE CURSOR TO RIGHT

CLEAR REGISTER SELECT, READ/WRITE


AND SET THE ENABLE PIN OF THE LCD

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

SHIFT THE CURSOR AT LINE 1, POSITION 0


CLEAR REGISTER SELECT, READ/WRITE
AND SET THE ENABLE PIN OF THE LCD
D

Department of AE & I

Page 70

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CALL SOME DELAY

CLEAR THE ENABLE PIN OF THE LCD

CALL SOME DELAY

STOP

7.3 FLOWCHART FOR ADC INITIALIZATION

START

SELECT AN ANALOG CHANNEL BY SETTING


THE ADDRESS LINES A, B AND C
CLEAR THE OUTPUT ENABLE PIN
ACTIVATE THE ALE PIN WITH
A LOW TO HIGH PULSE
ACTIVATE THE START PIN BY A HIGH TO
LOW PULSE TO INITIATE CONVERSION

NO

Department of AE & I

IS
EOC =0?

Page 71

YES

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

SET THE OUTPUT ENABLE PIN

CALL SOME DELAY

READ DATA OUT OF THE ADC CHIP

CLEAR THE OUTPUT ENABLE PIN

STOP

Department of AE & I

Page 72

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 8
RESULT ANALYSIS

Department of AE & I

Page 73

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

RESULT ANALYSIS
0

Readings taken at room temperature of 27 C

8.1 TRANSDUCER READINGS


8.1.1 SOIL MOISTURE SENSOR
Tolerance= 0.2 V

Table 8.1 Soil moisture sensor readings

Soil Condition

Transducer
Optimum Range

Soil is dry

0V

Optimum level of

1.9- 3.5V

soil moisture

Slurry soil

Department of AE & I

>3.5V

Page 74

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

8.1.2 LIGHT SENSOR


Tolerance = 0.1V
Table 8.2 Light sensor readings

Illumination Status

Transducer Optimum
Range

OPTIMUM

0V-0.69V

ILLUMINATION

Department of AE & I

DIM LIGHT

0.7V-2.5V

DARK

2.5V- 3V

NIGHT

3V-3.47V

Page 75

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

8.1.3 HUMIDITY SENSOR


8.1.3.1 FORMULA:
RH = ((Vout / Vcc) 0.16 )/0.0062, typical at 25C

(Ref. Eq.4.3)

where, Vsupply = 4.98V


Tolerance= 0.1V
Table 8.3 Humidity sensor readings

Percentage RH

Transducer Optimum Range

(RELATIVE HUMIDITY)
0%

0-0.8V

0% to 9.81%

0.8-1.1V

12.9% to 20.1%

1.2-1.45V

22.7% to 30.06%

1.5-1.725V

30.8% to 40.5%

1.75-2.05V

41.3%to50.3%

2.075-2.35V

51%to 60.02%

2.375-2.65

61.6%to70.5%

2.7-2.975V

71%to80.2%

3-3.275V

81.1%to 90%

3.3-3.6V

91%to 100%

3.6-3.9V

Department of AE & I

Page 76

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

8.1.4 TEMPERATURE SENSOR


8.1.4.1 FORMULA:
o

(Ref. Eq.4.4)

Temperature ( C ) = (Vout/5) *100( C/V)

Table 8.4 Temperature sensor readings

Temperature range in

Temperature sensor

degree Celsius

output(Vout)

100 C

0.5V

150 to 200 C

0.75-1.0V

20 0to 250 C

1.0-1.25V

250 to 30 0C

1.25-1.5V

30 0to 35 0C

1.5-1.75V

350 to 400 C

1.75-2.0V

400 to 45 0C

2.0-2.25V

450 to 500 C

2.25-2.5V

500 to 55 0C

2.5-2.75V

550 to 600C

2.75-3.0V

600 to 650 C

3.0-3.25V

650 to 70 0C

3.25-3.5V

70 0to 750 C

3.5-3.75V

Department of AE & I

Page 77

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Department of AE & I

75 0to 80 0C

3.75-4.0V

80 0to 850 C

4.0-4.25V

85 0to 900 C

4.25-4.5V

900 to 95 0C

4.5-4.75V

950 to 1000 C

4.75-5V

Page 78

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 9
ADVANTAGES AND DISADVANTAGES

Department of AE & I

Page 79

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ADVANTAGES AND DISADVANTAGES


9.1 ADVANTAGES
1. Sensors used have high sensitivity and are easy to handle.
2. Low cost system, providing maximum automation.
3. Closed loop design prevents any chances of disturbing the greenhouse environment.
4. User is indicated for changes in actuator state thereby giving an option for manual
override.
5. Low maintenance and low power consumption.
6. The system is more compact compared to the existing ones, hence is easily portable.
7. Can be used for different plant species by making minor changes in the ambient
environmental parameters.
8. Can be easily modified for improving the setup and adding new features.
9. Labour saving.
10. Provides a user-friendly interface hence will have a greater acceptance by the
technologically unskilled workers.
11. In response to the sensors, the system will adjust the heating, fans, lighting, irrigation
immediately, hence protect greenhouse from damage.
12. Malfunctioning of single sensor will not affect the whole system.
13. Natural resource like water saved to a great extent.

9.2 DISADVANTAGES
1. Complete automation in terms of pest and insect detection and eradication cannot
be achieved.
2. No self-test system to detect malfunction of sensors.
3. Requires uninterrupted power supply.
4. Facility to remotely monitor the greenhouse is not possible.

Department of AE & I

Page 80

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 10
FUTURE SCOPE

Department of AE & I

Page 81

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

SCOPE FOR FURTHER DEVELOPMENT


1) The performance of the system can be further improved in terms of the operating speed,
memory capacity, instruction cycle period of the microcontroller by using other
controllers such as AVRs and PICs. The number of channels can be increased to interface
more number of sensors which is possible by using advanced versions of
microcontrollers.
2) The system can be modified with the use of a datalogger and a graphical LCD panel
showing the measured sensor data over a period of time.
3) A speaking voice alarm could be used instead of the normal buzzer.
4) This system can be connected to communication devices such as modems, cellular phones
or satellite terminal to enable the remote collection of recorded data or alarming of certain
parameters.
5) The device can be made to perform better by providing the power supply with the help of
battery source which can be rechargeable or non-rechargeable, to reduce the requirement
of main AC power.
6) Time bound administration of fertilizers, insecticides and pesticides can be introduced.
7) A multi-controller system can be developed that will enable a master controller along with
its slave controllers to automate multiple greenhouses simultaneously.

Department of AE & I

Page 82

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CHAPTER 11
CONCLUSION

Department of AE & I

Page 83

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

CONCLUSION
A step-by-step approach in designing the microcontroller based system for
measurement and control of the four essential parameters for plant growth, i.e. temperature,
humidity, soil moisture, and light intensity, has been followed. The results obtained from the
measurement have shown that the system performance is quite reliable and accurate.
The system has successfully overcome quite a few shortcomings of the existing
systems by reducing the power consumption, maintenance and complexity, at the same time
providing a flexible and precise form of maintaining the environment.
The continuously decreasing costs of hardware and software, the wider acceptance of
electronic systems in agriculture, and an emerging agricultural control system industry in
several areas of agricultural production, will result in reliable control systems that will
address several aspects of quality and quantity of production. Further improvements will be
made as less expensive and more reliable sensors are developed for use in agricultural
production.
Although the enhancements mentioned in the previous chapter may seem far in the
future, the required technology and components are available, many such systems have been
independently developed, or are at least tested at a prototype level. Also, integration of all
these technologies is not a daunting task and can be successfully carried out.

Department of AE & I

Page 84

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

REFERENCES
[1] Dr. R. Jayanthi, Prof. of Horticulture, UAS, GKVK, Bangalore.

IEEE Papers
[2] Stipanicev D., Marasovic J., Networked embedded greenhouse monitoring and control,
Proceedings of 2003 IEEE Conference on Control Applications, June 2003.
[3] Turnell, D.J. de Fatima, Q.V., Turnell, M., Deep, G.S., Freire, R.C.S., FarmWeb-an
integrated, modular farm automation system, Proceedings of IEEE International
Conference on Systems, Man, and Cybernetics, Vol. 2, Oct. 1998.

Books
[3] Rebecca Tyson Northen, Orchids As House Plants, Dover Publications, New York, 2
Edition, 1985.

nd

[4] Muhammad Ali Mazidi, Janice Gillispie Mazidi, Rolin D. Mc Kinlay , The 8051
nd
Microcontroller & Embedded Systems, Pearson Education Inc. 2 Edition, 2008.
[5] Myke Predko, Programming and Customising the 8051 Microcontroller, TMH, 1999.
[6] Kenneth J Ayala, The 8051 Microcontroller Architecture, Programming & Applications,
nd
Penram International, 2 Edition, 1996.
[7] Ramakant Gayakwad, Operational Amplifiers Linear Integrated Circuits, Prentice Hall of
rd
India, 3 Edition.
[8] National Semiconductors, CMOS Logic Databook
[9] SENSORS- The Journal of Applied Sensing Technology, Advanstar Communications Inc

Department of AE & I

Page 85

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Web Resources
[10]

http://freewebs.com/maheshwankede

[11]

http://www.faludi.com

[12]

http://www.electro-tech-online.com

[12]

http://www.8052.com

[13]

http://www.8051projects.net/forum

[14]

http://www.roboticsindia.com

[15]

http://www.datasheetdirect.com

[16]
[17]

http://www.keil.com/appnotes
http://www.google.com

Department of AE & I

Page 86

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ANNEXURE - I

Department of AE & I

Page 87

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1. Final Prototype:

19

21

20

22

18

17
1

16

10

15
14

13

4
9
14

5
7

12

1. Power Supply +5V


2. Temperature Sensor
3. Humidity Sensor
4. Light sensor
5. Moisture Sensor
6. Power supply junction
7. ADC and Clock circuit board
8. Relay board.
9. Buzzer circuit board
10. Microcontroller board
11. Buzzer
12. Mode selection switch
13. DC -switch
14. LCD Display

Department of AE & I

15. AC- switch


16. AC fan
17. Power Supply +12V
18. 230V- 9V transformer
19. AC- bulb simulating light1
20. AC- bulb simulating light2
21. AC- bulb simulating sprayer
22. AC-bulb simulating pump

Page 88

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Light Sensor

Soil Moisture Sensor

Humidity Sensor

Temperature Sensor

ADC and Clock Circuit

Department of AE & I

Page 89

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Microcontroller Board and Buzzer Circuitry

The Two Display Modes of LCD

AC Interface Relay Board

Department of AE & I

Page 90

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ANNEXURE - II

Department of AE & I

Page 91

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Bill Of Materials:
Sl. No.
1.
2.

List of electrical components


230V, 50Hz,9V transformer
12-0-12V, 500mA,

Quantity in
numbers
1
1

3.

Bridge rectifier

4.

1000uF Electrolytic capacitor

5.

10uF Electrolytic capacitor

6.

1uF Electrolytic capacitor

7.

30pF Ceramic capacitor

8.

1nF Ceramic capacitor

9.

10k resistance

20

10.

8.2k resistance

11.

1.2k resistance

12.

1k resistance

13.

1.8k resistance

14.

330 resistance

15.

100 resistance

16.

12.5k resistance

17.

LM7805

18.

LM7812

19.

2x16 Matrix LCD

Department of AE & I

Page 92

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


20.

ADC0809

21.

AT89S52 Microcontroller

22.

Push to ON button

23.

Toggle switches

24.

BC107

25.

Buzzer

26.

8-pin connectors

27.

3-pin connectors

28.

2-pin connectors

15

Single connectors

35

29.

CD4093 Schmitt trigger IC

30.

BC547 Transistor

10

31.

Sugar cube relays

32.

11.0592 MHz Crystal

33.

LDR 12mm

34.

LM324

35.

LM35

36.

2N222N Transistor

37.

HIH4000-001

38.

12.5 k Resistor

39.

AC 5W bulbs

40.

AC 230V Cooling Fan

Department of AE & I

Page 93

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

41.

16 Pin Connector

42.

10 Preset

43.

10k Bourns Pot

44.

2.2K Resistor

45.

10k Strip Resistor

46.

0.1uF Tantalum Capacitor

47.

Heat Sink

48.

LED

10

49.

Copper Wire 32AWG

0.5 m

50.

AC Power Cord

2m

51.

Wire Cap

1m

52.

Varo Board(Shoted, Non Shoted )

4 pc, 5pc

53.

HOT GLUE GUN

54.

Fevi Quick

As per
requirement

55.

Connecting Wires

2m

Department of AE & I

Page 94

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ANNEXURE - III

Department of AE & I

Page 95

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

1. SYSTEM INSTALLATION AND FAULT REDUCTION:


The system has to be provided with uninterrupted power supply and should be
installed with care, in a place where the changes in microclimatic parameters are well
pronounced.
For best results with the moisture sensor, the probes must be inserted into the
specimen soil when the soil is dry.
For best results with the humidity sensor HIH4000

Do not expose sensor to condensing environments. Exposure to condensing


environments will cause sensor output to indicate 0 %RH.

Sensor is light sensitive. For best performance, shield sensor from bright light.

Sensor is static sensitive. Sensor connection protected to 15 kV maximum.


For best results with the temperature sensor, the LM35 and accompanying wiring and

circuits must be kept insulated and dry, to avoid leakage and corrosion. Printed-circuit
coatings and varnishes such as Humiseal and epoxy paints or dips can be used to insure that
moisture does not corrode the LM35 or its connections.

2. TROUBLE SHOOTING:
In case of a system hang-up condition, the reset button in the vicinity of the
Microcontroller can be used to revive the system.
In case of anomalies in the readings of the humidity sensor, it is recommended that
the sensor be kept in an air -tight container with silica-gel inside.
In case of anomalies with the moisture sensor, the probes can be stripped off the soil
or mud particles deposited on its surface and in case of sensor-leads-oxidation, it is
recommended that the leads be replaced.

Department of AE & I

Page 96

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ANNEXURE - IV

Department of AE & I

Page 97

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

Source Code
;Chinmaynanda Das, Chandan kumar Singh ,Summit Jindal, Asish Nanda,
Shrideep ;Mohapatra,Nisith Kumar Roy
;Dhaneswar Rath Institute of Engineering and Medical Science, Cuttack
;--------------------------------------------------------;ADC inputs
;IN4 - LM35
;IN5 - MOISTURE SENSOR
;IN6 - HIH4000
;IN7 - LIGHT SENSOR
;ADD_C Connected to Vcc
;--------------------------------------------------------; Microcontroller connections to LCD.
RS
RW
E

BIT
BIT
BIT

P2.5
P2.6
P2.7

; P2.5 is connected to RS pin of LCD


; P2.6 is connected to R/W pin of LCD
; P2.5 is connected to E pin of LCD

LCDDATA

equ

P0

; P0.0-P0.7 are connected to LCD data pins D0-D7

SWITCH

equ

P3.2

; P3.2 (INT0) is connected to SWITCH for LCD

; Microcontroller connections to ADC0808/9 lines.


OE
START
EOC
ADD_A
ADD_B
ALE

EQU
EQU
EQU
EQU
EQU
EQU

P3.0
P3.1
P3.3
P3.4
P3.5
P3.7

ADCDATA

EQU

P1

;
;
;
;
;
;

Pin
Pin
Pin
Pin
Pin
Pin

9 Output Enable
6 Start
7 EOC
25 ADD A
24 ADD B
22 ALE
; Data Lines

; Microcontroller connections to Actuators


COOLER
EQU
P2.4
PUMP EQU
P2.3
SPRAYER
EQU
P2.2
LIGHT1
EQU
P2.1
LIGHT2
EQU
P2.0
BUZZER
EQU
P3.6
;--------------------------------------------------------; Register definitions.
LCD_INTR

BIT

BUZZ
BUZZ1
BUZZ2
BUZZ3

BIT
BIT
BIT
BIT

00h
01h
02h
03h
04h

Department of AE & I

;LCD Interrupt flag bit


;Buzzer
;Buzzer
;Buzzer
;Buzzer

flag
flag
flag
flag

Page 98

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


T_BUFFER
M_BUFFER
RH_BUFFER
L_BUFFER
LIGHT_LEVEL
MOIST_LEVEL

EQU
EQU
EQU
EQU
EQU
EQU

30h
31h
32h
33h
34h
35h

;Temperature buffer (ADC o/p)


;Soil Moisture buffer (ADC o/p)
;RH buffer (ADC o/p)
;Light buffer (ADC o/p)
;Buffer to store light level
;Buffer to store moisture level

;---------------------------------------------------------org 00h
LJMP main
org 03h
LJMP int_isr ; Interrupt for the LCD switch
org 07h
main:
CLR 0A0h
CLR 0B0h
SETB BUZZER
LCALL DELAY
CLR BUZZER
MOV
MOV
MOV
MOV
MOV
MOV

60h,
61h,
62h,
63h,
64h,
65h,

#'C'
#':'
#' '
#'O'
#'F'
#'F'

;Clear Port 2 for the actuators to turn off


;Clear port 3 for the buzzer to turn off
;Turn off buzzer
; Intitialising Actuator status message

MOV 66h, #' '


MOV 67h, #' '
MOV
MOV
MOV
MOV
MOV
MOV
MOV

68h,
69h,
6Ah,
6Bh,
6Ch,
6Dh,
6Eh,

#'P'
#'U'
#':'
#'O'
#'F'
#'F'
#0

MOV
MOV
MOV
MOV
MOV
MOV

70h,
71h,
72h,
73h,
74h,
75h,

#'S'
#'P'
#':'
#'O'
#'F'
#'F'

MOV 76h, #' '


MOV 77h, #' '
MOV
MOV
MOV
MOV
MOV
MOV
MOV

78h,
79h,
7Ah,
7Bh,
7Ch,
7Dh,
7Eh,

#'L'
#'I'
#':'
#'O'
#'F'
#'F'
#0

Department of AE & I

Page 99

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


;Main Code
;----------------------------------------------------------------------MOV TMOD, #01h
;Timer 0 Mode 1, 16 bit timer (for generating 5
second delay for LCD)
SETB TCON.0
;Make INT0 edge triggered
MOV IE, #81h ;Enable INT0
CLR LCD_INTR ;Make LCD interrupt flag =0
ACALL lcd_init
;LCD initialisation
ACALL line_1 ;Display welcome message
back:
ACALL adcread
;Read sensor data from ADC
ACALL data_display ;call routine to display to LCD
ACALL threshold_check
;call routine to check threshold
SJMP back
;repeat ADC process
lcd_init:
MOV A, #38H
ACALL comnwrt
ACALL lcddelay
MOV A, #0EH
ACALL comnwrt
ACALL lcddelay
MOV A, #01
ACALL comnwrt
ACALL lcddelay
MOV A, #06H
ACALL comnwrt
ACALL lcddelay
RET

;LCD initialisation
;init. LCD 2 lines,5x7 matrix (CHANGE THIS!!!)
;call command subroutine
;give LCD some time
;display on, cursor on
;call command subroutine
;give LCD some time
;clear LCD
;call command subroutine
;give LCD some time
;shift cursor right
;call command subroutine
;give LCD some time

line_1:
MOV A, #080H
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init1
repeat1:
CLR A
MOVC A, @A+DPTR
JZ line_2
ACALL datawrt
ACALL lcddelay
INC DPTR
SJMP repeat1

;Displaying initialisation message


;cursor at line 1, position 0
;call command subroutine
;give LCD some time
;address of line 1 of initialisation message

line_2:
MOV A, #0C0h
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init2
repeat2:
CLR A
MOVC A, @A+DPTR
JZ line_3
LCALL datawrt
LCALL lcddelay
INC DPTR
SJMP repeat2

Department of AE & I

;moving the data to accumulator


;call data display routine
;give LCD some time
;increment address

;cursor at line 2, position 0


;call command subroutine
;give LCD some time
;address of line 2 of initialisation message
;moving the data to accumulator
;call data display routine
;give LCD some time
;increment address
;jump to label repeat2

Page 100

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


line_3:
MOV A, #080H
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init3
repeat3:
CLR A
MOVC A, @A+DPTR
JZ line_4
ACALL datawrt
ACALL lcddelay
INC DPTR
SJMP repeat3
line_4:
MOV A, #0C0h
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init4
repeat4:
CLR A
MOVC A, @A+DPTR
JZ line_5
LCALL datawrt
LCALL lcddelay
INC DPTR
SJMP repeat4
line_5:
MOV A, #080H
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init5
repeat5:
CLR A
MOVC A, @A+DPTR
JZ line_6
ACALL datawrt
ACALL lcddelay
INC DPTR
SJMP repeat5
line_6:
MOV A, #080H
ACALL comnwrt
ACALL lcddelay
MOV DPTR, #init6
repeat6:
CLR A
MOVC A, @A+DPTR
JZ line_7
LCALL datawrt
LCALL lcddelay
INC DPTR
SJMP repeat6

;Displaying initialisation message


;cursor at line 1, position 0
;call command subroutine
;give LCD some time
;address of line 1 of initialisation message
;moving the data to accumulator
;call data display routine
;give LCD some time
;increment address

;cursor at line 2, position 0


;call command subroutine
;give LCD some time
;address of line 2 of initialisation message
;moving the data to accumulator
;call data display routine
;give LCD some time
;increment address
;jump to label repeat4
;Displaying initialisation message
;cursor at line 1, position 0
;call command subroutine
;give LCD some time
;address of line 1 of initialisation message
;moving the data to accumulator
;call data display routine
;give LCD some time
;increment address

;cursor at line 1, position 0


;call command subroutine
;give LCD some time
;address of line 2 of initialisation message
;moving the data to accumulator
;call data display routine
;give LCD some time
;increment address
;jump to label repeat4

line_7:
MOV A, #0C0h
ACALL comnwrt

Department of AE & I

;cursor at line 2, position 0


;call command subroutine

Page 101

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


ACALL lcddelay
;give LCD some time
MOV DPTR, #init7
;address of line 2 of initialisation message
repeat7:
CLR A
MOVC A, @A+DPTR
;moving the data to accumulator
JZ exit
LCALL datawrt
;call data display routine
LCALL lcddelay
;give LCD some time
INC DPTR
;increment address
SJMP repeat7
;jump to label repeat7
exit:
MOV A, #01h
;clear LCD
LCALL comnwrt
LCALL
lcddelay
;give LCD some time
RET
comnwrt:
;send command to LCD
MOV LCDDATA, A
;copy reg A to port1
CLR RS
;RS=0 for command
CLR RW
;R/W=0 for write
SETB E
;E=1 for high pulse
MOV R3,#50
REG_3:
MOV R4,#255
DJNZ R4,$
DJNZ R3,REG_3
CLR E
;E=0 for H-to-L pulse
RET
datawrt:
;write data to LCD
MOV LCDDATA, A
;copy reg A to port1
SETB RS
;RS=1 for data
CLR RW
;R/W=0 for write
SETB E
;E=1 for high pulse
MOV R3,#50
REG_4:
MOV R4,#255
DJNZ R4,$
DJNZ R3,REG_4
CLR E
;E=0 for H-to-L pulse
RET
lcddelay:
;Delay routine for LCD
MOV R3, #50
here2:
MOV R4, #255
here3:
DJNZ R4, here3
;stay until R4 becomes 0
DJNZ R3, here2
RET
adcread:
;Initializing ADC
;SENSOR 1
MOV ADCDATA, #0FFH ; Data lines for input
SETB EOC
; Make EOC i/p
ACALL delay
CLR ALE
; clearing ALE
CLR START
; Make start high
CLR OE
; Disable o/p
CLR ADD_A
;A=0
CLR ADD_B
;B=0 ;Select IN4
ACALL delay
SETB ALE
;latching the address

Department of AE & I

Page 102

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


ACALL delay
SETB START
ACALL delay
CLR ALE
CLR START
JB EOC,$
JNB EOC,$
ACALL delay
SETB OE
ACALL delay
MOV T_BUFFER, ADCDATA
CLR OE
;SENSOR 2
MOV ADCDATA, #0FFH
SETB EOC
ACALL delay
CLR ALE
CLR START
CLR OE
SETB ADD_A
CLR ADD_B
ACALL delay
SETB ALE
ACALL delay
SETB START
ACALL delay
CLR ALE
CLR START
JB EOC,$
JNB EOC,$
ACALL delay
SETB OE
ACALL delay
MOV M_BUFFER, ADCDATA
CLR OE
;SENSOR 3
MOV ADCDATA, #0FFH
SETB EOC
ACALL delay
CLR ALE
CLR START
CLR OE
CLR ADD_A
SETB ADD_B
ACALL delay
SETB ALE
ACALL delay
SETB START
ACALL delay
CLR ALE
CLR START
JB EOC,$
JNB EOC,$
ACALL delay
SETB OE
ACALL delay
MOV RH_BUFFER, ADCDATA
CLR OE

Department of AE & I

;start conversion pulse


;ALE H-L transition
;START H-L transition

;enable o/p
;store adc data to buffer
;disable o/p
; Data lines for input
; Make EOC i/p
; clearing ALE
; Make start high
; Disable o/p
;A=1
;B=0 Select IN5
;latching the address
;start conversion pulse
;ALE H-L transition
;START H-L transition

;enable o/p
;store adc data to buffer
;disable o/p
; Data lines for input
; Make EOC i/p
; clearing ALE
; Make start high
; Disable o/p
;A=0
;B=1 Select IN6
;latching the address
;start conversion pulse
;ALE H-L transition
;START H-L transition

;enable o/p
;store adc data to buffer
;disable o/p

Page 103

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


;SENSOR 4
MOV ADCDATA, #0FFH ; Data lines for input
SETB EOC
; Make EOC i/p
ACALL delay
CLR ALE
; clearing ALE
CLR START
; Make start high
CLR OE
; Disable o/p
SETB ADD_A
;A=1
SETB ADD_B
;B=1 Select IN7
ACALL delay
SETB ALE
;latching the address
ACALL delay
SETB START
;start conversion pulse
ACALL delay
CLR ALE
;ALE H-L transition
CLR START
;START H-L transition
JB EOC,$
JNB EOC,$
ACALL delay
SETB OE
ACALL delay
MOV L_BUFFER, ADCDATA
CLR OE
RET
delay:
MOV R3, #250
here1:
MOV R4, #255
here:
DJNZ R4, here
DJNZ R3, here1
RET
data_display:
data

;enable o/p
;store adc data to buffer
;disable o/p
;Delay subroutine

;LCD routine to display sensor and actuator

JNB LCD_INTR, sensor_display

;if ACT=0, jump to display sensor data

label
MOV A, #01h
ACALL comnwrt
ACALL lcddelay
MOV A,#80H
ACALL comnwrt
ACALL lcddelay
MOV R0, #60h
line1:
CLR A
MOV A, @R0
JZ nxt_line
LCALL datawrt
LCALL lcddelay
INC R0
SJMP line1
nxt_line:
MOV

A, #0C0h

Department of AE & I

;clear LCD
;give LCD some time
;cursor at line 1, position 0
;call command subroutine
;give LCD some time
;address of display message line 1
;moving the data to accumulator
;exit loop on completion of display and start
;display of LCD next line
;call data display routine
;give LCD some time
;increment address
;repeat display till end of message
;Displaying on line 2 of LCD
;cursor at line 2, position 0

Page 104

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


LCALL
comnwrt
LCALL
lcddelay
MOV R0, #70h
line2:
CLR A
MOV A, @R0
JZ delay_5s
LCALL datawrt
LCALL lcddelay
INC R0
SJMP line2

;call command subroutine


;give LCD some time
;address of display message line 2
;moving the data to accumulator
;exit loop on completion of display & call routine
;to wait 5 sec
;call data display routine
;give LCD some time
;increment address
;repeat display till end of message

delay_5s:
MOV R7, #100
sec_5:
MOV TL0, #0FDh
MOV TH0, #4Bh
SETB TR0
JNB TF0, $
CLR TR0
CLR TF0
DJNZ R7, sec_5

;5 second delay routine


;REPEAT 100 TIMES (50ms*100= 5sec)

MOV A, #01h
LCALL comnwrt
LCALL
lcddelay

;clear LCD

sensor_display:
MOV
A,#80H
LCALL
comnwrt
LCALL
lcddelay

;displaying sensor data


;cursor at line 1, position 0
;call command subroutine
;give LCD some time

MOV
LCALL
LCALL
MOV
LCALL
LCALL

;display letter T
;call display subroutine
;give LCD some time
;display : symbol
;call display subroutine
;give LCD some time

A, #'T'
datawrt
lcddelay
A, #':'
datawrt
lcddelay

;load 4BFDh for 5ms delay


;Start timer 0
;Check for end of count
;Stop timer
;Clear timer 0 flag
;Repeat till R7=0

;give LCD some time

MOV A, T_BUFFER
MOV DPTR, #temp_tens
MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator


;address of ASCII code look up table (tens place)
;store corresponding ASCII code to Accumulator
;call display subroutine
;give LCD some time

MOV A, T_BUFFER
MOV DPTR, #temp_ones
MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator


;address of ASCII code look up table (ones place)
;store corresponding ASCII code to Accumulator
;call display subroutine
;give LCD some time

MOV
LCALL
LCALL

;display . symbol
;call display subroutine
;give LCD some time

A, #'.'
datawrt
lcddelay

MOV A, T_BUFFER
MOV DPTR, #temp_dec

Department of AE & I

;move sensor data from buffer to accumulator


;address of ASCII code look up table (dec. place)

Page 105

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;store corresponding ASCII code to Accumulator


;call display subroutine
;give LCD some time

MOV
LCALL
LCALL
MOV
LCALL
LCALL

A, #0DFh
datawrt
lcddelay
A, #'C'
datawrt
lcddelay

;display degree symbol


;call display subroutine
;give LCD some time
;display letter C
;call display subroutine
;give LCD some time

MOV
LCALL
LCALL

A, #' '
datawrt
lcddelay

;display space
;call display subroutine
;give LCD some time

;DISPLAYING SENSOR 2: SOIL MOISTURE


MOV
LCALL
LCALL
MOV
LCALL
LCALL

A, #'S'
datawrt
lcddelay
A, #':'
datawrt
lcddelay

MOV A, M_BUFFER
CJNE A, #67h, dry
dry:
JNC optimum
MOV MOIST_LEVEL, #1
MOV
A, #'D'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'r'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'y'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #' '
LCALL
datawrt
LCALL
lcddelay
MOV
A, #' '
LCALL
datawrt
LCALL
lcddelay
SJMP moist_over
optimum:
MOV A, M_BUFFER
CJNE A, #78h, disp_opt
disp_opt:
JNC slurry
MOV MOIST_LEVEL, #2
MOV
A, #'O'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'p'
LCALL
datawrt
LCALL
lcddelay

Department of AE & I

;display letter S
;call display subroutine
;give LCD some time
;display : symbol
;call display subroutine
;give LCD some time
;move sensor data from buffer to accumulator

;Store level in a buffer (for threshold check)


;display D
;call display subroutine
;give LCD some time
;display r
;call display subroutine
;give LCD some time
;display y
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time
;normal condition
;move sensor data from buffer to accumulator

;Store level in a buffer (for threshold check)


;display O
;call display subroutine
;give LCD some time
;display p
;call display subroutine
;give LCD some time

Page 106

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


MOV
A, #'t'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'.'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #' '
LCALL
datawrt
LCALL
lcddelay
SJMP moist_over
slurry:
MOV MOIST_LEVEL, #3
MOV
A, #'E'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'x'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'c'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'e'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'s'
LCALL
datawrt
LCALL
lcddelay

;display t
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time

;Store level in a buffer (for threshold check)


;display E
;call display subroutine
;give LCD some time
;display x
;call display subroutine
;give LCD some time
;display c
;call display subroutine
;give LCD some time
;display e
;call display subroutine
;give LCD some time
;display s
;call display subroutine
;give LCD some time

moist_over:
;DISPLAYING SENSOR 3: RELATIVE HUMIDITY
MOV
LCALL
LCALL

A, #0C0H
comnwrt
lcddelay

;cursor at line 2, position 0


;call command subroutine
;give LCD some time

MOV
LCALL
LCALL
MOV
LCALL
LCALL
MOV
LCALL
LCALL

A, #'R'
datawrt
lcddelay
A, #'H'
datawrt
lcddelay
A, #':'
datawrt
lcddelay

;display letter R
;call display subroutine
;give LCD some time
;display letter H
;call display subroutine
;give LCD some time
;display : symbol
;call display subroutine
;give LCD some time

MOV A, RH_BUFFER
MOV DPTR, #rh_tens
MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator


;address of ASCII code look up table (tens place)
;store corresponding ASCII code to Accumulator
;call display subroutine
;give LCD some time

MOV A, RH_BUFFER
MOV DPTR, #rh_ones
MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator


;address of ASCII code look up table (ones place)
;store corresponding ASCII code to Accumulator
;call display subroutine
;give LCD some time

Department of AE & I

Page 107

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

MOV
LCALL
LCALL

A, #'.'
datawrt
lcddelay

;display . symbol
;call display subroutine
;give LCD some time

MOV A, RH_BUFFER
MOV DPTR, #rh_dec
MOVC A, @A+DPTR
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator


;address of ASCII code look up table (ones place)
;store corresponding ASCII code to Accumulator
;call display subroutine
;give LCD some time

MOV
LCALL
LCALL

A, #'%'
datawrt
lcddelay

;display % symbol
;call display subroutine
;give LCD some time

MOV
LCALL
LCALL

A, #' '
datawrt
lcddelay

;display space
;call display subroutine
;give LCD some time

;DISPLAYING SENSOR 4: LIGHT


MOV
LCALL
LCALL
MOV
LCALL
LCALL

A, #'L'
datawrt
lcddelay
A, #':'
datawrt
lcddelay

MOV A, L_BUFFER
CJNE A, #25h, bright
bright:
JNC normal
MOV LIGHT_LEVEL, #1
MOV
A, #'O'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'p'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'t'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'.'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #' '
LCALL
datawrt
LCALL
lcddelay
LJMP light_over
normal:
MOV A, L_BUFFER
CJNE A, #82h, disp_norm
disp_norm:
JNC dim
MOV LIGHT_LEVEL, #2
MOV
A, #'D'
LCALL
datawrt

Department of AE & I

;display letter L
;call display subroutine
;give LCD some time
;display : symbol
;call display subroutine
;give LCD some time
;move sensor data from buffer to accumulator

;Store level in a buffer (for threshold check)


;display S
;call display subroutine
;give LCD some time
;display u
;call display subroutine
;give LCD some time
;display n
;call display subroutine
;give LCD some time
;display n
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time

;move sensor data from buffer to accumulator

;Store level in a buffer (for threshold check)


;display D
;call display subroutine

Page 108

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


LCALL
MOV
LCALL
LCALL
MOV
LCALL
LCALL
MOV
LCALL
LCALL
MOV
LCALL
LCALL

lcddelay
A, #'i'
datawrt
lcddelay
A, #'m'
datawrt
lcddelay
A, #' '
datawrt
lcddelay
A, #' '
datawrt
lcddelay

;give LCD some time


;display i
;call display subroutine
;give LCD some time
;display m
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time

SJMP light_over
dim:
MOV A, L_BUFFER
CJNE A, #9Dh, disp_dim
disp_dim:
JNC dark
MOV LIGHT_LEVEL, #3
MOV
A, #'D'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'a'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'r'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'k'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #' '
LCALL
datawrt
LCALL
lcddelay

;move sensor data from buffer to accumulator

;Store level in a buffer (for threshold check)


;display D
;call display subroutine
;give LCD some time
;display a
;call display subroutine
;give LCD some time
;display r
;call display subroutine
;give LCD some time
;display k
;call display subroutine
;give LCD some time
;display space
;call display subroutine
;give LCD some time

SJMP light_over
dark:
MOV LIGHT_LEVEL, #4
MOV
A, #'N'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'i'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'g'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'h'
LCALL
datawrt
LCALL
lcddelay
MOV
A, #'t'
LCALL
datawrt
LCALL
lcddelay

Department of AE & I

;Store level in a buffer (for threshold check)


;display N
;call display subroutine
;give LCD some time
;display i
;call display subroutine
;give LCD some time
;display g
;call display subroutine
;give LCD some time
;display h
;call display subroutine
;give LCD some time
;display t
;call display subroutine
;give LCD some time

Page 109

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


light_over:
RET
threshold_check:
temp_check:
;CHECKING TEMPERATURE THRESHOLD
MOV A, T_BUFFER
;read sensor data from buffer
CJNE A, #83, t_not_equal
;check for ambient temp (32deg C)
SJMP t_within_thresh
;end of threshold checking routine
t_not_equal:
JC t_within_thresh
;jump to within threshold routine
t_outside_thresh:
SETB COOLER
JB BUZZ, no_buzz
SETB BUZZER
ACALL delay
CLR BUZZER
SETB BUZZ
no_buzz:
MOV 63h, #' '
MOV 64h, #'O'
MOV 65h, #'N'
SJMP light_check
t_within_thresh:
MOV A, T_BUFFER
CJNE A, #73, ht_off
ht_off:
JNC light_check
CLR COOLER
CLR BUZZ
MOV 63h, #'O'
MOV 64h, #'F'
MOV 65h, #'F'
light_check:
MOV A, LIGHT_LEVEL
CJNE A, #1, lev2
CLR LIGHT1
CLR LIGHT2
CLR BUZZ1
MOV 7Bh, #'O'
MOV 7Ch, #'F'
MOV 7Dh, #'F'
SJMP humid_check
lev2:
MOV A, LIGHT_LEVEL
CJNE A, #2, lev3
SETB LIGHT1
CLR LIGHT2
JB BUZZ1, no_buzz1
SETB BUZZER
ACALL delay
CLR BUZZER
SETB BUZZ1
no_buzz1:

Department of AE & I

;turn on heater
;turn on buzzer
;turn off buzzer
;set the buzzer flag high

;turn off heater

;CHECKING LIGHT THRESHOLDS

;turn off light 1


;turn off light 2

;turn on light1
;turn off light2
;turn on buzzer
;turn off buzzer

Page 110

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


MOV 7Bh, #' '
MOV 7Ch, #'O'
MOV 7Dh, #'N'
SJMP humid_check
lev3:
MOV A, LIGHT_LEVEL
CJNE A, #3, lev4
SETB LIGHT1
SETB LIGHT2
JB BUZZ1, no_buzz11
SETB BUZZER
ACALL delay
CLR BUZZER
SETB BUZZ1
no_buzz11:
MOV 7Bh, #' '
MOV 7Ch, #'O'
MOV 7Dh, #'N'
SJMP humid_check
lev4:
CLR LIGHT1
CLR LIGHT2
CLR BUZZ1
MOV 7Bh, #'O'
MOV 7Ch, #'F'
MOV 7Dh, #'F'
humid_check:
MOV A, RH_BUFFER
CJNE A, #40, h_not_equal
SJMP h_within_thresh
h_not_equal:
JNC h_within_thresh
h_outside_thresh:
SETB SPRAYER
JB BUZZ2, no_buzz2
SETB BUZZER
ACALL delay
CLR BUZZER
SETB BUZZ2
no_buzz2:
MOV 73h, #' '
MOV 74h, #'O'
MOV 75h, #'N'
SJMP moist_check

;turn on light1
;turn on light2
;turn on buzzer
;turn off buzzer

;turn off light1


;turn off light2

;read sensor data from buffer


;check for ambient RH
;end of threshold checking routine
;jump to within threshold routine
;turn on sprayer
;turn on buzzer
;turn off buzzer

h_within_thresh:
CJNE A,#70, sp_off
sp_off:
JC moist_check
CLR
CLR
MOV
MOV
MOV

SPRAYER
BUZZ2
73h, #'O'
74h, #'F'
75h, #'F'

;turn off sprayer

moist_check:
;CHECKING MOISTURE THRESHOLDS
MOV A, MOIST_LEVEL
CJNE A, #1, level2
SETB PUMP

Department of AE & I

;turn on pump

Page 111

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


JB BUZZ3, no_buzz3
SETB BUZZER
ACALL delay
CLR BUZZER
SETB BUZZ3
no_buzz3:
MOV 6Bh, #' '
MOV 6Ch, #'O'
MOV 6Dh, #'N'
SJMP th_end_check
level2:
MOV A, MOIST_LEVEL
CJNE A, #2, level3
CLR PUMP
CLR BUZZ3
MOV 6Bh, #'O'
MOV 6Ch, #'F'
MOV 6Dh, #'F'
SJMP th_end_check
level3:
CLR PUMP
CLR BUZZ3
MOV 6Bh, #'O'
MOV 6Ch, #'F'
MOV 6Dh, #'F'

;turn on buzzer
;turn off buzzer

;turn off pump

th_end_check:
end_check: RET
int_isr:
MOV IE, #00h
PUSH 0E0h
PUSH 00h
PUSH 03h
PUSH 04h
PUSH 07h
PUSH 82h
PUSH 83h
SETB LCD_INTR
POP 83h
POP 82h
POP 07h
POP 04h
POP 03h
POP 00h
POP 0E0h
MOV IE, #81h
RETI

;interrupt routine for LCD button


;Disable interrupts
;Push A to stack
;Push R0
;Push R3
;Push R4
;Push R7
;Push DPL
;Push DPH
;Set flag to check interrupt
;Pop DPH
;Pop DPL
;Pop R7 from stack
;Pop R4
;Pop R3
;Pop reg R0
;Pop Accumulator
;Enable INT0

org 600h
init1:
init2:
init3:
init4:
init5:
init6:
init7:

DB
DB
DB
DB
DB
DB
DB

"
Welcome to
",
"Project GreenBee",
"
",
"
",
"
DRIEMS
",
"Initializing the",
"Sensors.........",

Department of AE & I

0
0
0
0
0
0
0 ; System initialization message

Page 112

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

temp_tens:
DB '0','0','0','0','0','0','0','0','0','0'
DB 30h, 30h, 30h, 30h, 30h, 30h, 30h, 30h,
DB 30h, 30h, 30h, 30h, 30h, 30h, 31h, 31h,
DB 31h, 31h, 31h, 31h, 31h, 31h, 31h, 31h,
DB 31h, 31h, 31h, 31h, 31h, 31h, 31h, 31h,
DB 31h, 31h, 32h, 32h, 32h, 32h, 32h, 32h,
DB 32h, 32h, 32h, 32h, 32h, 32h, 32h, 32h,
DB 32h, 32h, 32h, 32h, 32h, 32h, 32h, 32h,
DB 33h, 33h, 33h, 33h, 33h, 33h, 33h, 33h,
DB 33h, 33h, 33h, 33h, 33h, 33h, 33h, 33h,
DB 33h, 33h, 33h, 33h, 34h, 34h, 34h, 34h,
DB 34h, 34h, 34h, 34h, 34h, 34h, 34h, 34h,
DB 34h, 34h, 34h, 34h, 34h, 34h, 34h, 34h,
DB 35h, 35h, 35h, 35h, 35h, 35h, 35h, 35h,
DB 35h, 35h, 35h, 35h, 35h, 35h, 35h, 35h,
DB 35h, 35h, 35h, 35h, 35h, 35h, 36h, 36h,
DB 36h, 36h, 36h, 36h, 36h, 36h, 36h, 36h,

30h, 30h
31h, 31h
31h, 31h
31h, 31h
32h, 32h
32h, 32h
33h, 33h
33h, 33h
33h, 33h
34h, 34h
34h, 34h
34h, 34h
35h, 35h
35h, 35h
36h, 36h
36h, 36h

temp_ones:
DB '0', '0',
DB '4', '4',
DB '8', '8',
DB '3', '3',
DB '6', '6',
DB '9', '0',
DB '3', '4',
DB '7', '7',
DB '1', '1',
DB '5', '5',
DB '9', '9',
DB '2', '3',
DB '6', '6',
DB '0', '0',

'3', '3', '4'


'7', '7'
'2', '2'
'5', '6'
'9', '9'
'2', '3'
'6', '7'
'0', '1'
'4', '4'
'8', '8'
'2', '2'
'6', '6'
'0', '0'
'0', '0'

'1',
'5',
'8',
'4',
'7',
'0',
'4',
'8',
'2',
'5',
'9',
'3',
'7',
'0',

'1',
'5',
'8',
'4',
'7',
'1',
'4',
'8',
'2',
'6',
'0',
'4',
'7',
'0',

'2',
'5',
'9',
'5',
'7',
'1',
'5',
'9',
'2',
'6',
'0',
'4',
'0',
'0',

'2',
'6',
'1',
'5',
'8',
'1',
'5',
'9',
'3',
'7',
'0',
'4',
'0',
'0',

'2',
'6',
'1',
'5',
'8',
'2',
'6',
'9',
'3',
'7',
'1',
'5',
'0',
'0',

'3',
'7',
'1',
'5',
'8',
'2',
'6',
'0',
'4',
'7',
'1',
'5',
'0',
'0',

temp_dec:
DB '0', '0','0','0','0','5','5','5','5','5','0'
DB '0', '0','0','5','5','5','5','0','0','0'
DB '0', '5','5','5','5','0','0','0','0','0'
DB '5', '5','5','5','0','0','0','0','5','0'
DB '0', '5','0','5','0','5','0','5','0','0'
DB '5', '0','5','0','5','5','0','5','5','0'
DB '5', '0','0','5','0','5','0','0','5','0'
DB '5', '5','0','5','0','0','5','0','5','0'
DB '0', '5','0','5','5','0','5','0','0','5'
DB '0', '5','5','0','5','0','5','5','0','5'
DB '0', '0','5','0','5','5','0','5','0','0'
DB '5', '5','0','0','5','5','0','0','5','5'
DB '0', '5','0','5','5','5','0','0','5','5'
DB '0', '0','0','0','0','0','0','0','0','0'
rh_tens:
DB '0','0', '0', '0', '0','0','0','0','0','0','0'
DB '0', '0', '0', '0', '0', '0', '0', '0', '0',
DB '0', '0', '0', '0', '0', '0', '0', '0', '0',
DB '0', '0', '0', '0', '0', '0', '0', '0', '0',
DB '0', '0', '0', '0', '0', '0', '0', '0', '0',

Department of AE & I

Page 113

;10TH
;20TH
;30TH
;40TH
;50TH
;60TH
;70TH
;80TH
;90TH
;100TH
;110TH
;120TH
;130TH
;140TH

'0'
'0'
'0'
'0'

;10th
;20th
;30th
;40th
;50th

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB

'0',
'1',
'1',
'2',
'3',
'3',
'4',
'5',
'5',
'6',
'6',
'7',
'8',
'9',
'9',
'0',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'1',
'2',
'3',
'3',
'4',
'5',
'5',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'1',
'2',
'3',
'3',
'4',
'5',
'5',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'2',
'2',
'3',
'3',
'4',
'5',
'5',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',
'*',

'0',
'1',
'2',
'2',
'3',
'4',
'4',
'5',
'5',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',
'*'

'0',
'1',
'2',
'2',
'3',
'4',
'4',
'5',
'6',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'2',
'2',
'3',
'4',
'4',
'5',
'6',
'6',
'7',
'7',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'2',
'3',
'3',
'4',
'4',
'5',
'6',
'6',
'7',
'8',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',

'0',
'1',
'2',
'3',
'3',
'4',
'4',
'5',
'6',
'6',
'7',
'8',
'8',
'9',
'9',
'0',
'*',
'*',
'*',
'*',

'0'
'1'
'2'
'3'
'3'
'4'
'5'
'5'
'6'
'6'
'7'
'8'
'9'
'9'
'9'
'0'
'*'
'*'
'*'
'*'

rh_ones:
DB '0', '0',
DB '0', '0',
DB '0', '0',
DB '0', '0',
DB '1', '1',

'0',
'0',
'0',
'0',
'2',

'0',
'0',
'0',
'0',
'2',

'0',
'0',
'0',
'0',
'3',

'0',
'0',
'0',
'0',
'3',

'0',
'0',
'0',
'0',
'4',

'0',
'0',
'0',
'0',
'4',

'0',
'0',
'0',
'0',
'5',

'0', '0' ;10th


'0'
;20th
'0'
;30th
'0'
;40th
'5'
;50th

DB
DB
DB
DB
DB
DB
DB
DB
DB
DB

'6',
'3',
'9',
'5',
'1',
'8',
'4',
'0',
'6',
'3',

'7',
'4',
'9',
'6',
'2',
'8',
'4',
'1',
'7',
'4',

'7',
'4',
'0',
'7',
'3',
'8',
'5',
'1',
'8',
'4',

'8',
'4',
'1',
'7',
'3',
'9',
'6',
'2',
'9',
'4',

'8',
'5',
'1',
'7',
'4',
'0',
'7',
'3',
'0',
'5',

'9',
'5',
'1',
'8',
'4',
'1',
'7',
'3',
'0',
'6',

'0',
'6',
'2',
'9',
'5',
'2',
'8',
'4',
'0',
'7',

'0',
'6',
'3',
'0',
'6',
'2',
'9',
'5',
'1',
'7',

'1',
'7',
'4',
'0',
'6',
'3',
'9',
'5',
'1',
'8',

'1'
'8'
'5'
'0'
'7'
'3'
'0'
'6'
'2'
'8'

;60th
;70th
;80th
;90th
;100th
;110th
;120th
;130th
;140th
;150th

DB
DB
DB
DB
DB

'9',
'6',
'1',
'8',
'4',

'9',
'7',
'2',
'8',
'4',

'1',
'7',
'3',
'9',
'5',

'1',
'7',
'4',
'9',
'6',

'2',
'5',
'5',
'0',
'7',

'2',
'8',
'5',
'1',
'7',

'3',
'9',
'6',
'2',
'8',

'4',
'0',
'6',
'3',
'8',

'4',
'1',
'7',
'3',
'9',

'5'
'1'
'7'
'4'
'0'

;160th
;170th
;180th
;190th
;200th

DB
DB
DB
DB
DB
DB

'*',
'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',
'*'

'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',

'*',
'*',
'*',
'*',
'*',

'*'
'*'
'*'
'*'
'*'

;210th
;220th
;230th
;240th
;250th
;256th

rh_dec:
DB '0', '0', '0', '0', '0',
DB '0', '0', '0', '0', '0',
DB '0', '0', '0', '1', '2',

Department of AE & I

;60th
;70th
;80th
;90th
;100th
;110th
;120th
;130th
;140th
;150th
;160th
;170th
;180th
;190th
;200th
;210th
;220th
;230th
;240th
;250th

'0', '0', '0', '0', '0', '0'


'0', '0', '0', '0', '0'
'3', '4', '5', '6', '6'

Page 114

;10th
;20th
;30th

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT


DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB
DB

'7',
'1',
'6',
'0',
'5',
'6',
'6',
'1',
'6',
'0',
'7',
'2',
'7',
'6',
'9',
'8',
'0',
'*',
'*',
'*',
'*',
'*',
'*',

'7',
'1',
'7',
'1',
'5',
'0',
'4',
'9',
'8',
'1',
'5',
'0',
'5',
'4',
'6',
'6',
'4',
'*',
'*',
'*',
'*',
'*',
'*',

'8',
'2',
'7',
'1',
'5',
'0',
'3',
'8',
'4',
'9',
'4',
'8',
'1',
'7',
'5',
'5',
'5',
'*',
'*',
'*',
'*',
'*',
'*',

'8',
'2',
'8',
'1',
'5',
'6',
'5',
'7',
'2',
'7',
'2',
'4',
'9',
'7',
'3',
'3',
'6',
'*',
'*',
'*',
'*',
'*',
'*',

'8',
'3',
'8',
'2',
'6',
'7',
'1',
'5',
'0',
'5',
'0',
'6',
'7',
'6',
'5',
'7',
'2',
'*',
'*',
'*',
'*',
'*',
'*'

'9', '9', '9', '0', '0'


'3', '4', '4', '5', '5'
'8', '9', '9', '0', '0'
'2', '3', '3', '3', '4'
'6', '7', '1', '3', '5'
'9', '2', '0', '8', '7'
'9', '7', '5', '6', '3'
'3', '2', '6', '0', '8'
'7', '8', '6', '4', '3'
'4', '3', '1', '9', '6'
'0', '8', '6', '1', '4'
'4', '3', '7', '1', '8'
'9', '3', '7', '5', '9'
'8', '4', '2', '5', '8'
'4', '7', '6', '5', '7'
'1', '2', '3', '5', '4'
'7', '8', '8', '9', '0'
*', '*', '*', '*', '*'
*', '*', '*', '*', '*'
*', '*', '*', '*', '*'
'*', '*', '*', '*', '*'
*', '*', '*', '*', '*'

;40th
;50th
;60th
;70th
;80th
;90th
;100th
;110th
;120th
;130th
;140th
;150th
;160th
;170th
;180th
;190th
;200th
;210th
;220th
;230th
;240th
;250th
;256th

END

Department of AE & I

Page 115

2009-2010

MONITOR AND CONTROL OF GREENHOUSE ENVIRONMENT

ANNEXURE - V

Department of AE & I

Page 116

2009-2010

ADC0808/ADC0809
8-Bit P Compatible A/D Converters with 8-Channel
Multiplexer
General Description

Features

The ADC0808, ADC0809 data acquisition component is a


monolithic CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible
control logic. The 8-bit A/D converter uses successive approximation as the conversion technique. The converter features a high impedance chopper stabilized comparator, a
256R voltage divider with analog switch tree and a successive approximation register. The 8-channel multiplexer can
directly access any of 8-single-ended analog signals.

n Easy interface to all microprocessors


n Operates ratiometrically or with 5 VDC or analog span
adjusted voltage reference
n No zero or full-scale adjust required
n 8-channel multiplexer with address logic
n 0V to 5V input range with single 5V power supply
n Outputs meet TTL voltage level specifications
n ADC0808 equivalent to MM74C949
n ADC0809 equivalent to MM74C949-1

The device eliminates the need for external zero and


full-scale adjustments. Easy interfacing to microprocessors
is provided by the latched and decoded multiplexer address
inputs and latched TTL TRI-STATE outputs.
The design of the ADC0808, ADC0809 has been optimized
by incorporating the most desirable aspects of several A/D
conversion techniques. The ADC0808, ADC0809 offers high
speed, high accuracy, minimal temperature dependence,
excellent long-term accuracy and repeatability, and consumes minimal power. These features make this device
ideally suited to applications from process and machine
control to consumer and automotive applications. For
16-channel multiplexer with common output (sample/hold
port) see ADC0816 data sheet. (See AN-247 for more information.)

Key Specifications
n Resolution
n Total Unadjusted Error
n Single Supply

8 Bits

12 LSB and 1 LSB


5 VDC

n Low Power
n Conversion Time

15 mW
100 s

Block Diagram

00567201

See Ordering
Information

2002 National Semiconductor Corporation

DS005672

www.national.com

ADC0808/ADC0809 8-Bit P Compatible A/D Converters with 8-Channel Multiplexer

October 2002

ADC0808/ADC0809

Connection Diagrams
Dual-In-Line Package

Molded Chip Carrier Package

00567212

00567211

Order Number ADC0808CCV or ADC0809CCV


See NS Package V28A

Order Number ADC0808CCN or ADC0809CCN


See NS Package J28A or N28A

Ordering Information
TEMPERATURE RANGE
Error

LSB Unadjusted
1 LSB Unadjusted
12

Package Outline

www.national.com

40C to +85C
ADC0808CCN

ADC0808CCV

ADC0809CCN

ADC0809CCV

N28A Molded DIP

V28A Molded Chip Carrier

(Notes 2,

Dual-In-Line Package (plastic)

1)

260C

Molded Chip Carrier Package

If Military/Aerospace specified devices are required,


please contact the National Semiconductor Sales Office/
Distributors for availability and specifications.
Supply Voltage (VCC) (Note 3)

0.3V to
(VCC+0.3V)

ADC0808CCV, ADC0809CCV
Range of VCC (Note 1)

65C to +150C

(Notes 1, 2)
TMINTATMAX

ADC0808CCN,ADC0809CCN

0.3V to +15V

Storage Temperature Range

400V

Temperature Range (Note 1)

(START, OE, CLOCK, ALE, ADD A, ADD B, ADD C)


Package Dissipation at TA =25C

220C

Operating Conditions

Except Control Inputs


Voltage at Control Inputs

215C

Infrared (15 seconds)


ESD Susceptibility (Note 8)

6.5V

Voltage at Any Pin

Vapor Phase (60 seconds)

40CTA+85C
40CTA+85C
4.5 VDC to 6.0 VDC

875 mW

Lead Temp. (Soldering, 10 seconds)

Electrical Characteristics
Converter Specifications: VCC =5 VDC =VREF+, VREF() =GND, TMINTATMAX and fCLK =640 kHz unless otherwise stated.
Symbol
Parameter
Conditions
Min
Typ
Max
Units
ADC0808
LSB

TMIN to TMAX

1 2
3 4

0C to 70C
TMIN to TMAX

1
114

LSB

VCC+0.10

VDC

VCC

VCC+0.1

VCC/2

VCC/2+0.1

Total Unadjusted Error

25C

(Note 5)

LSB

ADC0809
Total Unadjusted Error
(Note 5)

VREF(+)

Input Resistance

From Ref(+) to Ref()

1.0

Analog Input Voltage Range

(Note 4) V(+) or V()

GND0.10

Voltage, Top of Ladder

Measured at Ref(+)

Voltage, Center of Ladder

VCC/2-0.1

VREF()

Voltage, Bottom of Ladder

Measured at Ref()

IIN

Comparator Input Current

fc =640 kHz, (Note 6)

2.5

0.1

0.5

LSB
k

Electrical Characteristics
Digital Levels and DC Specifications: ADC0808CCN, ADC0808CCV, ADC0809CCN and ADC0809CCV, 4.75VCC5.25V,
40CTA+85C unless otherwise noted
Symbol

Parameter

Conditions

Min

Typ

Max

Units

10

200

nA

1.0

ANALOG MULTIPLEXER
IOFF(+)

OFF Channel Leakage Current

VCC =5V, VIN =5V,


TA =25C
TMIN to TMAX

IOFF()

OFF Channel Leakage Current

VCC =5V, VIN =0,


TA =25C

200

TMIN to TMAX

1.0

10

nA
A

CONTROL INPUTS
VIN(1)

Logical 1 Input Voltage

VIN(0)

Logical 0 Input Voltage

IIN(1)

Logical 1 Input Current

VCC1.5

VIN =15V

1.5

1.0

(The Control Inputs)


IIN(0)

Logical 0 Input Current

VIN =0

1.0

(The Control Inputs)


ICC

Supply Current

fCLK =640 kHz


3

0.3

3.0

mA
www.national.com

ADC0808/ADC0809

Absolute Maximum Ratings

ADC0808/ADC0809

Electrical Characteristics

(Continued)
Digital Levels and DC Specifications: ADC0808CCN, ADC0808CCV, ADC0809CCN and ADC0809CCV, 4.75VCC5.25V,
40CTA+85C unless otherwise noted
Symbol

Parameter

Conditions

Min

Typ

Max

Units

DATA OUTPUTS AND EOC (INTERRUPT)


VOUT(1)

Logical 1 Output Voltage

VCC = 4.75V
2.4
4.5

IOUT = 360A
IOUT = 10A

V(min)
V(min)

VOUT(0)

Logical 0 Output Voltage

IO =1.6 mA

0.45

VOUT(0)

Logical 0 Output Voltage EOC

IO =1.2 mA

0.45

IOUT

TRI-STATE Output Current

VO =5V

A
A

VO =0

Electrical Characteristics
Timing Specifications VCC =VREF(+) =5V, VREF() =GND, tr =tf =20 ns and TA =25C unless otherwise noted.
Typ

Max

Units

tWS

Symbol

Minimum Start Pulse Width

Parameter
(Figure 5)

Conditions

MIn

100

200

ns

tWALE

Minimum ALE Pulse Width

(Figure 5)

100

200

ns

ts

Minimum Address Set-Up Time

(Figure 5)

25

50

ns

tH

Minimum Address Hold Time

(Figure 5)

25

50

ns

tD

Analog MUX Delay Time

RS =0 (Figure 5)

2.5

s
ns

From ALE
tH1, tH0

OE Control to Q Logic State

CL =50 pF, RL =10k (Figure 8)

125

250

t1H, t0H

OE Control to Hi-Z

CL =10 pF, RL =10k (Figure 8)

125

250

ns

tc

Conversion Time

fc =640 kHz, (Figure 5) (Note 7)

90

100

116

fc

Clock Frequency

10

640

tEOC

EOC Delay Time

(Figure 5)

1280

kHz

8+2 S

Clock
Periods

CIN

Input Capacitance

At Control Inputs

10

15

pF

COUT

TRI-STATE Output

At TRI-STATE Outputs

10

15

pF

Capacitance
Note 1: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. DC and AC electrical specifications do not apply when operating
the device beyond its specified operating conditions.
Note 2: All voltages are measured with respect to GND, unless othewise specified.
Note 3: A zener diode exists, internally, from VCC to GND and has a typical breakdown voltage of 7 VDC.
Note 4: Two on-chip diodes are tied to each analog input which will forward conduct for analog input voltages one diode drop below ground or one diode drop
greater than the VCCn supply. The spec allows 100 mV forward bias of either diode. This means that as long as the analog VIN does not exceed the supply voltage
by more than 100 mV, the output code will be correct. To achieve an absolute 0VDC to 5VDC input voltage range will therefore require a minimum supply voltage of
4.900 VDC over temperature variations, initial tolerance and loading.
Note 5: Total unadjusted error includes offset, full-scale, linearity, and multiplexer errors. See Figure 3. None of these A/Ds requires a zero or full-scale adjust.
However, if an all zero code is desired for an analog input other than 0.0V, or if a narrow full-scale span exists (for example: 0.5V to 4.5V full-scale) the reference
voltages can be adjusted to achieve this. See Figure 13.
Note 6: Comparator input current is a bias current into or out of the chopper stabilized comparator. The bias current varies directly with clock frequency and has
little temperature dependence (Figure 6). See paragraph 4.0.
Note 7: The outputs of the data register are updated one clock cycle before the rising edge of EOC.
Note 8: Human body model, 100 pF discharged through a 1.5 k resistor.

www.national.com

The bottom resistor and the top resistor of the ladder network in Figure 1 are not the same value as the remainder of
the network. The difference in these resistors causes the
output characteristic to be symmetrical with the zero and
full-scale points of the transfer curve. The first output transition occurs when the analog signal has reached +12 LSB
and succeeding output transitions occur every 1 LSB later up
to full-scale.

Multiplexer. The device contains an 8-channel single-ended


analog signal multiplexer. A particular input channel is selected by using the address decoder. Table 1 shows the input
states for the address lines to select any channel. The
address is latched into the decoder on the low-to-high transition of the address latch enable signal.

The successive approximation register (SAR) performs 8


iterations to approximate the input voltage. For any SAR
type converter, n-iterations are required for an n-bit converter. Figure 2 shows a typical example of a 3-bit converter.
In the ADC0808, ADC0809, the approximation technique is
extended to 8 bits using the 256R network.

TABLE 1.
SELECTED

ADDRESS LINE

ANALOG CHANNEL

IN0

IN1

IN2

IN3

IN4

IN5

IN6

IN7

The A/D converters successive approximation register


(SAR) is reset on the positive edge of the start conversion
start pulse. The conversion is begun on the falling edge of
the start conversion pulse. A conversion in process will be
interrupted by receipt of a new start conversion pulse. Continuous conversion may be accomplished by tying the
end-of-conversion (EOC) output to the SC input. If used in
this mode, an external start conversion pulse should be
applied after power up. End-of-conversion will go low between 0 and 8 clock pulses after the rising edge of start
conversion.

CONVERTER CHARACTERISTICS

The most important section of the A/D converter is the


comparator. It is this section which is responsible for the
ultimate accuracy of the entire converter. It is also the comparator drift which has the greatest influence on the repeatability of the device. A chopper-stabilized comparator provides the most effective method of satisfying all the
converter requirements.

The Converter
The heart of this single chip data acquisition system is its
8-bit analog-to-digital converter. The converter is designed to
give fast, accurate, and repeatable conversions over a wide
range of temperatures. The converter is partitioned into 3
major sections: the 256R ladder network, the successive
approximation register, and the comparator. The converters
digital outputs are positive true.

The chopper-stabilized comparator converts the DC input


signal into an AC signal. This signal is then fed through a
high gain AC amplifier and has the DC level restored. This
technique limits the drift component of the amplifier since the
drift is a DC component which is not passed by the AC
amplifier. This makes the entire A/D converter extremely
insensitive to temperature, long term drift and input offset
errors.

The 256R ladder network approach (Figure 1) was chosen


over the conventional R/2R ladder because of its inherent
monotonicity, which guarantees no missing digital codes.
Monotonicity is particularly important in closed loop feedback
control systems. A non-monotonic relationship can cause
oscillations that will be catastrophic for the system. Additionally, the 256R network does not cause load variations on the
reference voltage.

Figure 4 shows a typical error curve for the ADC0808 as


measured using the procedures outlined in AN-179.

www.national.com

ADC0808/ADC0809

Functional Description

ADC0808/ADC0809

Functional Description

(Continued)

00567202

FIGURE 1. Resistor Ladder and Switch Tree

00567213
00567214

FIGURE 2. 3-Bit A/D Transfer Curve

FIGURE 3. 3-Bit A/D Absolute Accuracy Curve

00567215

FIGURE 4. Typical Error Curve

www.national.com

ADC0808/ADC0809

Timing Diagram

00567204

FIGURE 5.

www.national.com

ADC0808/ADC0809

Typical Performance Characteristics

00567216

FIGURE 6. Comparator IIN vs VIN


(VCC =VREF =5V)

00567217

FIGURE 7. Multiplexer RON vs VIN


(VCC =VREF =5V)

www.national.com

ADC0808/ADC0809

TRI-STATE Test Circuits and


Timing Diagrams
t1H, tH1

t0H, tH0

00567218

00567221

t1H, CL = 10 pF

t0H, CL = 10 pF

00567222

00567219

tH0, CL = 50 pF

tH1, CL = 50 pF

00567223
00567220

FIGURE 8.

Applications Information

DMIN =Minimum data limit


A good example of a ratiometric transducer is a potentiometer used as a position sensor. The position of the wiper is
directly proportional to the output voltage which is a ratio of
the full-scale voltage across it. Since the data is represented
as a proportion of full-scale, reference requirements are
greatly reduced, eliminating a large source of error and cost
for many applications. A major advantage of the ADC0808,
ADC0809 is that the input voltage range is equal to the
supply range so the transducers can be connected directly
across the supply and their outputs connected directly into
the multiplexer inputs, (Figure 9).

OPERATION
1.0 RATIOMETRIC CONVERSION
The ADC0808, ADC0809 is designed as a complete Data
Acquisition System (DAS) for ratiometric conversion systems. In ratiometric systems, the physical variable being
measured is expressed as a percentage of full-scale which is
not necessarily related to an absolute standard. The voltage
input to the ADC0808 is expressed by the equation

Ratiometric transducers such as potentiometers, strain


gauges, thermistor bridges, pressure transducers, etc., are
suitable for measuring proportional relationships; however,
many types of measurements must be referred to an absolute standard such as voltage or current. This means a
system reference must be used which relates the full-scale
voltage
to the standard
volt. For
example,
if
VCC =VREF =5.12V, then the full-scale range is divided into
256 standard steps. The smallest standard step is 1 LSB
which is then 20 mV.

(1)
VIN =Input voltage into the ADC0808
Vfs =Full-scale voltage
VZ =Zero voltage
DX =Data point being measured
DMAX =Maximum data limit

www.national.com

ADC0808/ADC0809

Applications Information

(Continued)

not be more negative than ground. The center of the ladder


voltage must also be near the center of the supply because
the analog switch tree changes from N-channel switches to
P-channel switches. These limitations are automatically satisfied in ratiometric systems and can be easily met in ground
referenced systems.

2.0 RESISTOR LADDER LIMITATIONS


The voltages from the resistor ladder are compared to the
selected into 8 times in a conversion. These voltages are
coupled to the comparator via an analog switch tree which is
referenced to the supply. The voltages at the top, center and
bottom of the ladder must be controlled to maintain proper
operation.

Figure 10 shows a ground referenced system with a separate supply and reference. In this system, the supply must be
trimmed to match the reference voltage. For instance, if a
5.12V is used, the supply should be adjusted to the same
voltage within 0.1V.

The top of the ladder, Ref(+), should not be more positive


than the supply, and the bottom of the ladder, Ref(), should

00567207

FIGURE 9. Ratiometric Conversion System


The ADC0808 needs less than a milliamp of supply current
so developing the supply from the reference is readily accomplished. In Figure 11 a ground referenced system is
shown which generates the supply from the reference. The
buffer shown can be an op amp of sufficient drive to supply
the milliamp of supply current and the desired bus drive, or if
a capacitive bus is driven by the outputs a large capacitor will
supply the transient supply current as seen in Figure 12. The
LM301 is overcompensated to insure stability when loaded
by the 10 F output capacitor.

www.national.com

The top and bottom ladder voltages cannot exceed VCC and
ground, respectively, but they can be symmetrically less than
VCC and greater than ground. The center of the ladder
voltage should always be near the center of the supply. The
sensitivity of the converter can be increased, (i.e., size of the
LSB steps decreased) by using a symmetrical reference
system. In Figure 13, a 2.5V reference is symmetrically
centered about VCC/2 since the same current flows in identical resistors. This system with a 2.5V reference allows the
LSB bit to be half the size of a 5V reference system.

10

ADC0808/ADC0809

Applications Information

(Continued)

00567224

FIGURE 10. Ground Referenced


Conversion System Using Trimmed Supply

00567225

FIGURE 11. Ground Referenced Conversion System with


Reference Generating VCC Supply

11

www.national.com

ADC0808/ADC0809

Applications Information

(Continued)

00567226

FIGURE 12. Typical Reference and Supply Circuit

00567227

RA =RB
*Ratiometric transducers
FIGURE 13. Symmetrically Centered Reference
3.0 CONVERTER EQUATIONS

The output code N for an arbitrary input are the integers


within the range:

The transition between adjacent codes N and N+1 is given


by:

(4)
Where: VIN =Voltage at comparator input

(2)

VREF(+) =Voltage at Ref(+)

The center of an output code N is given by:

VREF() =Voltage at Ref()


VTUE =Total unadjusted error voltage (typically
VREF(+)512)

(3)
www.national.com

12

(Continued)

If no filter capacitors are used at the analog inputs and the


signal source impedances are low, the comparator input
current should not introduce converter errors, as the transient created by the capacitance discharge will die out before the comparator output is strobed.

4.0 ANALOG COMPARATOR INPUTS


The dynamic comparator input current is caused by the
periodic switching of on-chip stray capacitances. These are
connected alternately to the output of the resistor ladder/
switch tree network and to the comparator input as part of
the operation of the chopper stabilized comparator.

If input filter capacitors are desired for noise reduction and


signal conditioning they will tend to average out the dynamic
comparator input current. It will then take on the characteristics of a DC bias current whose effect can be predicted
conventionally.

The average value of the comparator input current varies


directly with clock frequency and with VIN as shown in
Figure 6.

Typical Application

00567210

*Address latches needed for 8085 and SC/MP interfacing the ADC0808 to a microprocessor

TABLE 2. Microprocessor Interface Table


PROCESSOR

READ

WRITE

INTERRUPT (COMMENT)

8080

MEMR

MEMW

INTR (Thru RST Circuit)

8085

RD

WR

INTR (Thru RST Circuit)

Z-80

RD

WR

INT (Thru RST Circuit, Mode 0)

SC/MP

NRDS

NWDS

SA (Thru Sense A)

6800

VMA 2 R/W

VMA R/W

IRQA or IRQB (Thru PIA)

13

www.national.com

ADC0808/ADC0809

Applications Information

ADC0808/ADC0809

Physical Dimensions

inches (millimeters)

unless otherwise noted

Molded Dual-In-Line Package (N)


Order Number ADC0808CCN or ADC0809CCN
NS Package Number N28B

www.national.com

14

inches (millimeters) unless otherwise noted (Continued)

Molded Chip Carrier (V)


Order Number ADC0808CCV or ADC0809CCV
NS Package Number V28A

LIFE SUPPORT POLICY


NATIONALS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL
COUNSEL OF NATIONAL 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
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 to the user.
National Semiconductor
Corporation
Americas
Email: support@nsc.com

www.national.com

National Semiconductor
Europe
Fax: +49 (0) 180-530 85 86
Email: europe.support@nsc.com
Deutsch Tel: +49 (0) 69 9508 6208
English Tel: +44 (0) 870 24 0 2171
Franais Tel: +33 (0) 1 41 91 8790

2. A critical component is 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.

National Semiconductor
Asia Pacific Customer
Response Group
Tel: 65-2544466
Fax: 65-2504466
Email: ap.support@nsc.com

National Semiconductor
Japan Ltd.
Tel: 81-3-5639-7560
Fax: 81-3-5639-7507

National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.

ADC0808/ADC0809 8-Bit P Compatible A/D Converters with 8-Channel Multiplexer

Physical Dimensions

PRELIMINARY 3-25-04

Humidity/Moisture Sensors
Humidity Sensor

HIH-4000 Series

FEATURES
Molded thermoset plastic
housing
Linear voltage output vs
%RH
Laser trimmed
interchangeability
Low power design
High accuracy
Fast response time
Stable, low drift
performance
Chemically resistant
TYPICAL APPLICATIONS
Refrigeration Equipment
HVAC Equipment
Medical Equipment
Drying
Metrology
Battery -powered systems
OEM assemblies

WARNING
PERSONAL INJURY DO
NOT USE these products as
safety or emergency stop
devices or in any other
application where failure of
the product could result in
personal injury.
Failure to comply with these
instructions could result in
death or serious injury.

WARNING
MISUSE OF
DOCUMENTATION
The information presented in
this product sheet is for
reference only. Do not use
this document as system
installation information
Complete installation,
operation, and maintenance
information is provided in the
instructions supplied with
each product.
Failure to comply with these
instructions could result in
death or serious injury.

Sensing and Control

The HIH-4000 Series humidity sens or is designed specifically for high


volume OEM (Original Equipment Manufacturer) users. Direct input to a
controller or other device is made possible by this sensors linear voltage
output. With a typical current draw of only 200 A, the HIH-4000 Series is
ideally suited for low drain, battery operated systems. Tight sensor
interchangeability reduces or eliminates OEM production calibration costs.
Individual sensor calibration data is available.
The HIH-4000 Series delivers instrumentation-quality RH (Relative
Humidity) sensing performance in a low cost, solderable SIP (Single In-line
Package). Available in two lead spacing configurations, the RH sensor is a
laser trimmed thermoset polymer capacitive sensing element with on-chip
integrated signal conditioning. The sensing element's multilayer
construction provides excellent resistance to application hazards such as
wetting, dust, dirt, oils, and common environmental chemicals.

Humidity/Moisture Sensors
Humidity Sensor

HIH- 4000 Series

TABLE 1: PRELIMINARY PERFORMANCE SPECIFICATIONS


@ 5.0 VDC SUPPLY AND 25C UNLESS OTHERWISE NOTED
% RH PERFORMANCE SPECIFICATIONS INCLUDE TEST SYSTEM MEASUREMENT ERRORS (0.5% TYPICAL)
PARAMETER

MINIMUM

TYPICAL

MAXIMUM

UNITS

INTERCHANGEABILITY (Best fit straight line)


0 TO 60% RH

-5

% RH

60% TO 100%

-8

INTERCHANGEABILITY (2nd order curve)

3.5

% RH
%RH

*ACCURACY (Best fit straight line)


**ACCURACY (2nd order curve)

3.5
2.5

% RH
% RH

%RH

0.5

%RH

HYSTERESIS
REPEATABILITY
SETTLING TIME
RESPONSE TIME (1/e in slow moving air)

15

70

mS
Sec

***STABILITY (@ 50% RH in 1 year)

1.2

%RH

****STABILITY (@ 50% RH)

TBD

%RH

POWER REQUIREMENTS
VOLTAGE SUPPLY
CURRENT SUPPLY
VOLTAGE OUPUT (1st order fit)
VOLTAGE OUPUT (2nd order curve fit)
TEMPERATURE COMPENSATION

5.8
500

VDC
A

Vout=Vsupply(0.0062(Sensor RH)+0.16)
Vout=0.00003(Sensor RH)+0.0281(Sensor RH)+0.820
Typical
@ 25C
Vout=(0.0305+0.000044T-0.0000011T)(Sensor RH)+(0.92370.0041T+0.000040T)
T=Temperature in C

OPERATING TEMPERATURE
OPERATING HUMIDITY
STORAGE TEMPERATURE

-40

SEE FIGURE 1

85

-40
0

SEE FIGURE 1

185
100

F
% RH

-40

125

-40

257

STORAGE HUMIDITY

SEE FIGURE 2

F
% RH

*For HIH-4000-003 & -004 Only


**For HIH-4000-003 & -004 Only (Not available at time of publication. Please contact your Honeywell Sales Representative)
***Specification includes testing outside of recommended operating zone
****Specification for recommended operating zone only
Notes:
1. Do not expose sensor to condensing environments
2. Exposure to liquid water will cause sensor output to indicate 0% RH
3. Sensor is light sensitive. For best performance, shield the sensor from bright light.
4. Exposure to > 90% RH causes a reversible shift of 3% RH
5. Sensor is static sensitive. Sensor connection protected to 15kV maximum
6. Sensor output is ratiometric to supply voltage.

2 Honeywell

Sensing and Control

For application help: call 1-800-537-6945

Humidity/Moisture Sensors
Humidity Sensor

HIH- 4000 Series

FIGURE 1: RECOMMENDED OPERATING CONDITIONS

FIGURE 3: TYPICAL BEST FIT STRAIGHT LINE


4

100%

Relative Humidity

90%
80%

3.5

70%
60%

RECOMMENDED
OPERATING ZONE

50%
40%

30%
20%

0%
-40

-30

-20

-10

10

Operation limited to < 50 hours (Survivability only)


Undefined

20

30

40

50

60

70

80

90

100

Temperature C

FIGURE 2: STORAGE ENVIRONMENT

Voltage Out

2.5

10%

1.5

100%
90%

70%
60%

STORAGE ZONE

50%

0.5

40%
30%
20%

10%

25

0%
-40

-30

-20

-10

10

20

30

40

50

60

70

80

90

50

75

100

%RH

100 110 120 130 140

Temperature C

FACTORY CALIBRATION DATA

FIGURE 4: TYPICAL 2ND ORDER CURVE FIT


4

HIH-4000 sensors may be ordered with a calibration and


data printout (Table 2). See order guide on back page.

3.5

TABLE 2: EXAMPLE DATA PRINTOUT

Model
Channel
Wafer
MRP
Calculated values at 5 V
Vout @ 0% RH
Vout @ 75.3% RH
Linear output for 2% RH
accuracy @ 25 C
Zero offset
Slope
RH
Ratiometric response for 0
to 100% RH
Vout

HIH-4000-001
92
030996M
337313
0.958 V
3.268 V

2.5

Voltage Out

Relative Humidity

80%

1.5

0.958 V
30.680 mV/%RH
(Vout- zero offset)/slope
(Vout-0.958)/0.0307

0.5

Vsupply (0.1915 to 0.8130)

0
0

25

50

75

100

%RH

For application help: call 1-800-537-6945

Honeywell

Sensing and Control

Humidity/Moisture Sensors
Humidity Sensor

HIH- 4000 Series

ORDER GUIDE
Catalog Listing

Description

HIH-4000-001

Integrated circuitry humidity sensor, 0.100 in lead


pitch SIP
Integrated circuitry humidity sensor, 0.050 in lead
pitch SIP
Integrated circuitry humidity sensor, 0.100 in lead
pitch SIP with calibration and data printout
Integrated circuitry humidity sensor, 0.050 in lead
pitch SIP with calibration and data printout

HIH-4000-002
HIH-4000-003
HIH-4000-004

FIGURE 5: MOUNTING DIMENSIONS


for reference only mm/[in]
HIH-4000-002
HIH-4000-004

HIH-4000-001
HIH-4000-003

4,27
[0.168]

4,27
[0.168]

9,47
[0.373]

9,47
[0.373]

1,90
[0.075]

12,19 MIN
[0.480])

12,70 MIN
[0.50]

OUT

1,27
[0.050]

+
3X 0,38
[0.015]

2,03
[0.080]

2,54
[0.100]

2,54
[0.100]

Sensing and Control


www.honeywell.com/sensing
Honeywell
11 West Spring Street
Freeport, Illinois 61032
00XXXX-1-EN IL50 GLO 0204 Printed in USA
Copyright 2003 Honeywell International Inc. All Rights Reserved.

OUT

5,08
[0.200]

+
3X 0,38
[0.015]

WARRANTY/REMEDY
Honeywell warrants goods of its
manufacture as being free of defective
materials and fa ulty workmanship.
Contact your local sales office for
warranty information. If warranted
goods are returned to Honeywell
during the period of coverage,
Honeywell will repair or replace
without charge those items it finds
defective. The foregoing is Buyers
sole remedy and is in lieu of all
other warranties, expressed or
implied, including those of
merchantability and fitness for a
particular purpose.
Specifications may change without
notice. The information we supply is
believed to be accurate and reliable
as of this printing. However, we
assume no responsibility for its use.
While we provide application
assistance personally, through our
literature and the Honeywell web site,
it is up to the customer to determine
the suitability of the product in the
application.
For application assistance, current
specifications, or name of the nearest
Authorized Distributor, check the
Honeywell web site or call:
1-800-537-6945 USA
1-800-737-3360 Canada
1-815-235-6847 International
FAX
1-815-235-6545 USA
INTERNET
www.honeyw ell.com/sensing
info.sc@honeywell.com

LM35
Precision Centigrade Temperature Sensors
General Description
The LM35 series are precision integrated-circuit temperature
sensors, whose output voltage is linearly proportional to the
Celsius (Centigrade) temperature. The LM35 thus has an
advantage over linear temperature sensors calibrated in
Kelvin, as the user is not required to subtract a large
constant voltage from its output to obtain convenient Centigrade scaling. The LM35 does not require any external
calibration or trimming to provide typical accuracies of 14C
at room temperature and 34C over a full 55 to +150C
temperature range. Low cost is assured by trimming and
calibration at the wafer level. The LM35s low output impedance, linear output, and precise inherent calibration make
interfacing to readout or control circuitry especially easy. It
can be used with single power supplies, or with plus and
minus supplies. As it draws only 60 A from its supply, it has
very low self-heating, less than 0.1C in still air. The LM35 is
rated to operate over a 55 to +150C temperature range,
while the LM35C is rated for a 40 to +110C range (10
with improved accuracy). The LM35 series is available pack-

aged in hermetic TO-46 transistor packages, while the


LM35C, LM35CA, and LM35D are also available in the
plastic TO-92 transistor package. The LM35D is also available in an 8-lead surface mount small outline package and a
plastic TO-220 package.

Features
n
n
n
n
n
n
n
n
n
n
n

Calibrated directly in Celsius (Centigrade)


Linear + 10.0 mV/C scale factor
0.5C accuracy guaranteeable (at +25C)
Rated for full 55 to +150C range
Suitable for remote applications
Low cost due to wafer-level trimming
Operates from 4 to 30 volts
Less than 60 A current drain
Low self-heating, 0.08C in still air
Nonlinearity only 14C typical
Low impedance output, 0.1
for 1 mA load

Typical Applications

DS005516-4
DS005516-3

FIGURE 1. Basic Centigrade Temperature Sensor


(+2C to +150C)

Choose R1 = VS/50 A
V

OUT =+1,500

mV at +150C
= +250 mV at +25C
= 550 mV at 55C

FIGURE 2. Full-Range Centigrade Temperature Sensor

2000 National Semiconductor Corporation

DS005516

www.national.com

LM35 Precision Centigrade Temperature Sensors

November 2000

LM35

Connection Diagrams
TO-46
Metal Can Package*

SO-8
Small Outline Molded Package

DS005516-1

DS005516-21

*Case is connected to negative pin (GND)

N.C. = No Connection

Order Number LM35H, LM35AH, LM35CH, LM35CAH or


LM35DH
See NS Package Number H03H

Top View
Order Number LM35DM
See NS Package Number M08A

TO-92
Plastic Package

TO-220
Plastic Package*

DS005516-2

Order Number LM35CZ,


LM35CAZ or LM35DZ
See NS Package Number Z03A

DS005516-24

*Tab is connected to the negative pin (GND).


Note: The LM35DT pinout is different than the discontinued LM35DP.

Order Number LM35DT


See NS Package Number TA03F

www.national.com

(Note 10)

TO-92 and TO-220 Package,


(Soldering, 10 seconds)
SO Package (Note 12)
Vapor Phase (60 seconds)

If Military/Aerospace specified devices are required,


please contact the National Semiconductor Sales Office/
Distributors for availability and specifications.
Supply Voltage

+35V to 0.2V

Output Voltage
Output Current
Storage Temp.;

+6V to 1.0V
10 mA

260C
215C

Infrared (15 seconds)

220C

ESD Susceptibility (Note 11)


Specified Operating Temperature Range: TMIN to T
(Note 2)

2500V
MAX

LM35, LM35A

55C to +150C

TO-46 Package,

60C to +180C

LM35C, LM35CA

40C to +110C

TO-92 Package,

60C to +150C

LM35D

SO-8 Package,
TO-220 Package,
Lead Temp.:
TO-46 Package,
(Soldering, 10 seconds)

0C to +100C

65C to +150C
65C to +150C

300C

Electrical Characteristics
(Notes 1, 6)
LM35A
Parameter

Conditions
Typical

Accuracy

=+25C

(Note 7)

=10C

T
T

A =TMIN
MIN TA TMAX

0.2
0.3
0.4
0.4
0.18

MIN

TA TMAX

+10.0

Nonlinearity

=TMAX

LM35CA

Tested

Design

Tested

Design

Units

Limit

Limit

Limit

Limit

(Max.)

(Note 4)

(Note 5)

(Note 4)

(Note 5)

0.5
1.0
1.0
0.35

Typical

0.2
0.3
0.4
0.4
0.15

0.5

1.0
1.0

C
C

1.5
0.3

+9.9,

mV/C

(Note 8)
Sensor Gain
(Average Slope)

+9.9,

+10.0

+10.1
=+25C

0.4
0.5
0.01
0.02

Load Regulation

(Note 3) 0 IL 1 mA

MIN

Line Regulation

A =+25C

(Note 3)

4V V

Quiescent Current

=+5V, +25C

56

(Note 9)

=+5V

105

S =+30V, +25C

TA TMAX

30V

V S =+30V

56.2

+10.1

1.0
3.0
0.05
0.1
67

56
131
133

3.0
0.05

mV/mA
mV/V

0.1
67

mV/V
A

114

116

68

91.5

4V VS 30V, +25C

0.2

Quiescent Current

4V V

0.5

2.0

0.5

2.0

+0.39

+0.5

+0.39

+0.5

A/C

+1.5

+2.0

+1.5

+2.0

0.2

mV/mA

Change of

30V

1.0

1.0

91
56.2

68

105.5

0.4
0.5
0.01
0.02

1.0

(Note 3)
Temperature
Coefficient of
Quiescent Current
Minimum Temperature

In circuit of

for Rated Accuracy

Figure 1, IL =0

Long Term Stability

T J =TMAX, for

0.08

0.08

1000 hours

www.national.com

LM35

Absolute Maximum Ratings

LM35

Electrical Characteristics
(Notes 1, 6)
LM35
Parameter

Conditions
Typical

Accuracy,

=+25C

LM35, LM35C

=10C

(Note 7)

A =TMAX

Accuracy, LM35D
(Note 7)
Nonlinearity

T
T

0.4
0.5
0.8
0.8

=TMIN
A =+25C
A

LM35C, LM35D

Tested

Design

Limit

Limit

(Note 4)

(Note 5)

1.0
1.5
1.5

TA =TMAX
TA =TMIN
T MIN TA TMAX

0.3

+10.0

0.5

Typical

0.4
0.5
0.8
0.8
0.6
0.9
0.9
0.2

Tested

Design

Units

Limit

Limit

(Max.)

(Note 4)

(Note 5)

1.0

1.5
1.5
2.0
1.5

C
C
C
C

2.0
2.0
0.5

+9.8,

mV/C

C
C

(Note 8)
Sensor Gain

MIN

TA TMAX

(Average Slope)

+9.8,

+10.0

+10.2

2.0

30V

0.4
0.5
0.01
0.02

=+5V, +25C

56

80

Load Regulation

(Note 3) 0 IL 1 mA

MIN

Line Regulation

A =+25C

=+25C
TA TMAX

(Note 3)

4V V

Quiescent Current

(Note 9)

S =+5V

5.0
0.1
0.2

105

=+30V, +25C

56.2

=+30V

105.5

+10.2

158

0.4
0.5
0.01
0.02

2.0

56

80

161

mV/V
A

138

A
A

82
141
2.0

4V VS 30V, +25C

0.2

Quiescent Current

4V V

0.5

3.0

0.5

3.0

+0.39

+0.7

+0.39

+0.7

A/C

+1.5

+2.0

+1.5

+2.0

0.2

mV/V

0.2

91.5

mV/mA

Change of

30V

2.0

0.1

91
56.2

82

mV/mA

5.0

(Note 3)
Temperature
Coefficient of
Quiescent Current
Minimum Temperature

In circuit of

for Rated Accuracy

Figure 1, IL =0

Long Term Stability

T J =TMAX, for

0.08

0.08

1000 hours
Note 1: Unless otherwise noted, these specifications apply: 55C TJ +150C for the LM35 and LM35A; 40 TJ +110C for the LM35C and LM35CA; and
0 TJ +100C for the LM35D. VS =+5Vdc and ILOAD =50 A, in the circuit of Figure 2. These specifications also apply from +2C to TMAX in the circuit of Figure 1.
Specifications in boldface apply over the full rated temperature range.
Note 2: Thermal resistance of the TO-46 package is 400C/W, junction to ambient, and 24C/W junction to case. Thermal resistance of the TO-92 package is
180C/W junction to ambient. Thermal resistance of the small outline molded package is 220C/W junction to ambient. Thermal resistance of the TO-220 package
is 90C/W junction to ambient. For additional thermal resistance information see table in the Applications section.
Note 3: Regulation is measured at constant junction temperature, using pulse testing with a low duty cycle. Changes in output due to heating effects can be
computed by multiplying the internal dissipation by the thermal resistance.
Note 4: Tested Limits are guaranteed and 100% tested in production.
Note 5: Design Limits are guaranteed (but not 100% production tested) over the indicated temperature and supply voltage ranges. These limits are not used to
calculate outgoing quality levels.
Note 6: Specifications in boldface apply over the full rated temperature range.
Note 7: Accuracy is defined as the error between the output voltage and 10mv/C times the devices case temperature, at specified conditions of voltage, current,
and temperature (expressed in C).
Note 8: Nonlinearity is defined as the deviation of the output-voltage-versus-temperature curve from the best-fit straight line, over the devices rated temperature
range.
Note 9: Quiescent current is defined in the circuit of Figure 1.
Note 10: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. DC and AC electrical specifications do not apply when operating
the device beyond its rated operating conditions. See Note 1.
Note 11: Human body model, 100 pF discharged through a 1.5 k

resistor.

Note 12: See AN-450 Surface Mounting Methods and Their Effect on Product Reliability or the section titled Surface Mount found in a current National
Semiconductor Linear Data Book for other methods of soldering surface mount devices.

www.national.com

LM35

Typical Performance Characteristics


Thermal Resistance
Junction to Air

Thermal Response
in Still Air

Thermal Time Constant

DS005516-26
DS005516-25

Thermal Response in
Stirred Oil Bath

DS005516-27

Minimum Supply
Voltage vs. Temperature

Quiescent Current
vs. Temperature
(In Circuit of Figure 1.)

DS005516-29

DS005516-28

DS005516-30

Quiescent Current
vs. Temperature
(In Circuit of Figure 2.)

Accuracy vs. Temperature


(Guaranteed)

Accuracy vs. Temperature


(Guaranteed)

DS005516-32

DS005516-33

DS005516-31

www.national.com

LM35

Typical Performance Characteristics

(Continued)

Noise Voltage

Start-Up Response

DS005516-34

DS005516-35

Applications

The TO-46 metal package can also be soldered to a metal


surface or pipe without damage. Of course, in that case the
V terminal of the circuit will be grounded to that metal.
Alternatively, the LM35 can be mounted inside a sealed-end
metal tube, and can then be dipped into a bath or screwed
into a threaded hole in a tank. As with any IC, the LM35 and
accompanying wiring and circuits must be kept insulated and
dry, to avoid leakage and corrosion. This is especially true if
the circuit may operate at cold temperatures where condensation can occur. Printed-circuit coatings and varnishes such
as Humiseal and epoxy paints or dips are often used to
insure that moisture cannot corrode the LM35 or its connections.

The LM35 can be applied easily in the same way as other


integrated-circuit temperature sensors. It can be glued or
cemented to a surface and its temperature will be within
about 0.01C of the surface temperature.
This presumes that the ambient air temperature is almost the
same as the surface temperature; if the air temperature were
much higher or lower than the surface temperature, the
actual temperature of the LM35 die would be at an intermediate temperature between the surface temperature and the
air temperature. This is expecially true for the TO-92 plastic
package, where the copper leads are the principal thermal
path to carry heat into the device, so its temperature might
be closer to the air temperature than to the surface temperature.

These devices are sometimes soldered to a small


light-weight heat fin, to decrease the thermal time constant
and speed up the response in slowly-moving air. On the
other hand, a small thermal mass may be added to the
sensor, to give the steadiest reading despite small deviations
in the air temperature.

To minimize this problem, be sure that the wiring to the


LM35, as it leaves the device, is held at the same temperature as the surface of interest. The easiest way to do this is
to cover up these wires with a bead of epoxy which will
insure that the leads and wires are all at the same temperature as the surface, and that the LM35 dies temperature will
not be affected by the air temperature.

Temperature Rise of LM35 Due To Self-heating (Thermal Resistance,


TO-46,

TO-46*,

TO-92,

TO-92**,

SO-8

SO-8**

TO-220

no heat
sink

small heat fin

no heat
sink

small heat fin

no heat
sink

small heat fin

no heat
sink

Still air

400C/W

100C/W

180C/W

140C/W

220C/W

110C/W

90C/W

Moving air

100C/W

40C/W

90C/W

70C/W

105C/W

90C/W

26C/W

Still oil

100C/W

40C/W

90C/W

70C/W

Stirred oil

50C/W

30C/W

45C/W

40C/W

(Clamped to metal,
Infinite heat sink)

(24C/W)

(55C/W)

*Wakefield type 201, or 1" disc of 0.020" sheet brass, soldered to case, or similar.
**TO-92 and SO-8 packages glued and leads soldered to 1" square of 1/16" printed circuit board with 2 oz. foil or similar.

www.national.com

JA

LM35

Typical Applications

DS005516-19

FIGURE 3. LM35 with Decoupling from Capacitive Load

DS005516-6

FIGURE 6. Two-Wire Remote Temperature Sensor


(Output Referred to Ground)
DS005516-20

FIGURE 4. LM35 with R-C Damper


CAPACITIVE LOADS
Like most micropower circuits, the LM35 has a limited ability
to drive heavy capacitive loads. The LM35 by itself is able to
drive 50 pf without special precautions. If heavier loads are
anticipated, it is easy to isolate or decouple the load with a
resistor; see Figure 3. Or you can improve the tolerance of
capacitance with a series R-C damper from output to
ground; see Figure 4.
When the LM35 is applied with a 200 load resistor as
shown in Figure 5, Figure 6 or Figure 8 it is relatively
immune to wiring capacitance because the capacitance
forms a by- pass from ground to input, not on the output.
However, as with any linear circuit connected to wires in a
hostile envi- ronment, its performance can be affected
adversely by in- tense electromagnetic sources such as
relays, radio trans- mitters, motors with arcing brushes, SCR
transients, etc, as its wiring can act as a receiving
antenna and its internal junctions can act as rectifiers. For
best results in such cases, a bypass capacitor from VIN to
ground and a series R-C
damper such as 75 in series with 0.2 or 1 F from output to
ground are often useful. These are shown in Figure 13,
Figure 14, and Figure 16.

DS005516-7

FIGURE 7. Temperature Sensor, Single Supply, 55 to


+150C

DS005516-8

FIGURE 8. Two-Wire Remote Temperature Sensor


(Output Referred to Ground)

DS005516-5

FIGURE 5. Two-Wire Remote Temperature Sensor


(Grounded Sensor)
DS005516-9

FIGURE 9. 4-To-20 mA Current Source (0C to +100C)

www.national.com

LM35

Typical Applications

(Continued)

DS005516-11

FIGURE 11. Centigrade Thermometer (Analog Meter)

DS005516-10

FIGURE 10. Fahrenheit Thermometer


DS005516-12

FIGURE 12. Fahrenheit ThermometerExpanded Scale


Thermometer
(50 to 80 Fahrenheit, for Example Shown)

DS005516-13

FIGURE 13. Temperature To Digital Converter (Serial Output) (+128C Full Scale)

DS005516-14

FIGURE 14. Temperature To Digital Converter (Parallel TRI-STATE Outputs for


Standard Data Bus to P Interface) (128C Full Scale)

www.national.com

LM35

Typical Applications

(Continued)

DS005516-16

* =1% or 2% film resistor

Trim RB for VB =3.075V


Trim RC for VC =1.955V
Trim RA for VA =0.075V + 100mV/C x Tambient
Example, VA =2.275V at 22C

FIGURE 15. Bar-Graph Temperature Display (Dot Mode)

DS005516-15

FIGURE 16. LM35 With Voltage-To-Frequency Converter And Isolated Output


(2C to +150C; 20 Hz to 1500 Hz)

www.national.com

LM35

Block Diagram

DS005516-23

www.national.com

10

LM35

Physical Dimensions

inches (millimeters) unless otherwise noted

TO-46 Metal Can Package (H)


Order Number LM35H, LM35AH, LM35CH,
LM35CAH, or LM35DH
NS Package Number H03H

SO-8 Molded Small Outline Package (M)


Order Number LM35DM
NS Package Number M08A

11

www.national.com

LM35

Physical Dimensions

inches (millimeters) unless otherwise noted (Continued)

Power Package TO-220 (T)


Order Number LM35DT
NS Package Number TA03F

www.national.com

12

LM35 Precision Centigrade Temperature Sensors

Physical Dimensions

inches (millimeters) unless otherwise noted (Continued)

TO-92 Plastic Package (Z)


Order Number LM35CZ, LM35CAZ or LM35DZ
NS Package Number Z03A

LIFE SUPPORT POLICY


NATIONALS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL
COUNSEL OF NATIONAL 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
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 to the user.
National Semiconductor
Corporation
Americas
Tel: 1-800-272-9959
Fax: 1-800-737-7018
Email: support@nsc.com
www.national.com

National Semiconductor
Europe
Fax: +49 (0) 180-530 85 86
Email: europe.support@nsc.com
Deutsch Tel: +49 (0) 69 9508 6208
English Tel: +44 (0) 870 24 0 2171
Franais Tel: +33 (0) 1 41 91 8790

2. A critical component is 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.

National Semiconductor
Asia Pacific Customer
Response Group
Tel: 65-2544466
Fax: 65-2504466
Email: ap.support@nsc.com

National Semiconductor
Japan Ltd.
Tel: 81-3-5639-7560
Fax: 81-3-5639-7507

National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.

LM124/LM224/LM324/LM2902
Low Power Quad Operational Amplifiers
General Description

Advantages

The LM124 series consists of four independent, high gain,


internally frequency compensated operational amplifiers
which were designed specifically to operate from a single
power supply over a wide range of voltages. Operation from
split power supplies is also possible and the low power
supply current drain is independent of the magnitude of the
power supply voltage.

n Eliminates need for dual supplies


n Four internally compensated op amps in a single
package
n Allows directly sensing near GND and VOUT also goes
to GND
n Compatible with all forms of logic
n Power drain suitable for battery operation

Application areas include transducer amplifiers, DC gain


blocks and all the conventional op amp circuits which now
can be more easily implemented in single power supply
systems. For example, the LM124 series can be directly
operated off of the standard +5V power supply voltage which
is used in digital systems and will easily provide the required
interface electronics without requiring the additional 15V
power supplies.

Unique Characteristics
n In the linear mode the input common-mode voltage
range includes ground and the output voltage can also
swing to ground, even though operated from only a
single power supply voltage
n The unity gain cross frequency is temperature
compensated
n The input bias current is also temperature compensated

Features
n Internally frequency compensated for unity gain
n Large DC voltage gain 100 dB
n Wide bandwidth (unity gain) 1 MHz
(temperature compensated)
n Wide power supply range:
Single supply 3V to 32V
or dual supplies 1.5V to 16V
n Very low supply current drain (700 A) essentially
independent of supply voltage
n Low input biasing current 45 nA
(temperature compensated)
n Low input offset voltage 2 mV
and offset current: 5 nA
n Input common-mode voltage range includes ground
n Differential input voltage range equal to the power
supply voltage
n Large output voltage swing 0V to V+ 1.5V

Connection Diagrams
Dual-In-Line Package

00929901

Top View
Order Number LM124J, LM124AJ, LM124J/883 (Note 2), LM124AJ/883 (Note 1), LM224J, LM224AJ, LM324J,
LM324M, LM324MX, LM324AM, LM324AMX, LM2902M, LM2902MX, LM324N, LM324AN, LM324MT,
LM324MTX or LM2902N LM124AJRQML and LM124AJRQMLV(Note 3)
See NS Package Number J14A, M14A or N14A

2004 National Semiconductor Corporation

DS009299

www.national.com

LM124/LM224/LM324/LM2902 Low Power Quad Operational Amplifiers

August 2000

LM124/LM224/LM324/LM2902

Connection Diagrams

(Continued)

00929933

Order Number LM124AW/883, LM124AWG/883, LM124W/883 or LM124WG/883


LM124AWRQML and LM124AWRQMLV(Note 3)
See NS Package Number W14B LM124AWGRQML
and LM124AWGRQMLV(Note 3) See NS Package
Number WG14A
Note 1: LM124A available per JM38510/11006
Note 2: LM124 available per JM38510/11005
Note 3: See STD Mil DWG 5962R99504 for Radiation Tolerant Device

Schematic Diagram

(Each Amplifier)

00929902

www.national.com

Distributors for availability and specifications.

(Note 12)

If Military/Aerospace specified devices are required,


please contact the National Semiconductor Sales Office/
LM124/LM224/LM324

LM2902

LM124A/LM224A/LM324A
Supply Voltage, V+

32V

Differential Input Voltage

26V

32V

26V

0.3V to +32V

0.3V to +26V

50 mA

50 mA

Molded DIP

1130 mW

1130 mW

Cavity DIP

1260 mW

1260 mW

Small Outline Package

800 mW

800 mW

Continuous

Continuous

Input Voltage
Input Current
(VIN

<

0.3V) (Note 6)

Power Dissipation (Note 4)

Output Short-Circuit to GND


(One Amplifier) (Note 5)
V+ 15V and TA = 25C
Operating Temperature Range

40C to +85C

LM324/LM324A

0C to +70C

LM224/LM224A

25C to +85C

LM124/LM124A

55C to +125C

Storage Temperature Range

65C to +150C

65C to +150C

260C

260C

260C

260C

Vapor Phase (60 seconds)

215C

215C

Infrared (15 seconds)

220C

220C

Lead Temperature (Soldering, 10 seconds)


Soldering Information
Dual-In-Line Package
Soldering (10 seconds)
Small Outline Package

See AN-450 Surface Mounting Methods and Their Effect on Product Reliability for other methods of soldering surface mount
devices.
ESD Tolerance (Note 13)

250V

250V

Electrical Characteristics
V+ = +5.0V, (Note 7), unless otherwise stated
Parameter

LM124A

Conditions

Input Offset Voltage

(Note 8) TA = 25C

Input Bias Current

IIN(+) or IIN(), VCM = 0V,

(Note 9)

TA = 25C

Input Offset Current

IIN(+) or IIN(), VCM = 0V,

Min

Typ

LM224A

Max Min

Typ

LM324A

Max Min

Typ

Max

Units

mV

20

50

40

80

45

100

nA

10

15

30

nA

TA = 25C
Input Common-Mode

V+ = 30V, (LM2902, V+ = 26V),

Voltage Range (Note


10)

TA = 25C

Supply Current

Over Full Temperature Range

V+1.5

V+1.5

V+1.5

RL = On All Op Amps
+

mA

V = 30V (LM2902 V = 26V)


V+ = 5V
Large Signal

V+ = 15V, RL 2k,

Voltage Gain

(VO = 1V to 11V), TA = 25C

Common-Mode

DC, VCM = 0V to V+ 1.5V,

1.5

0.7

1.2

1.5

0.7

1.2

1.5

0.7

1.2

50

100

50

100

25

100

V/mV

70

85

70

85

65

85

dB
www.national.com

LM124/LM224/LM324/LM2902

Absolute Maximum Ratings

LM124/LM224/LM324/LM2902

Electrical Characteristics

(Continued)
V+ = +5.0V, (Note 7), unless otherwise stated
Parameter

LM124A

Conditions

Rejection Ratio

TA = 25C

Power Supply

V+ = 5V to 30V

Rejection Ratio

(LM2902, V+ = 5V to 26V),

LM224A

LM324A
Max

Units

Min

Typ

Max Min

Typ

Max Min

Typ

65

100

65

100

65

100

dB

120

dB

TA = 25C
Amplifier-to-Amplifier

f = 1 kHz to 20 kHz, TA = 25C

Coupling (Note 11)

(Input Referred)

Output
Current

VIN+ = 1V, VIN = 0V,

Source

120

120

20

40

20

40

20

40

10

20

10

20

10

20

12

50

12

50

12

50

mA

V+ = 15V, VO = 2V, TA = 25C


Sink

VIN = 1V, V

+
IN

= 0V,

V+ = 15V, VO = 2V, TA = 25C


VIN = 1V, VIN+ = 0V,

V = 15V, VO = 200 mV, TA = 25C


Short Circuit to Ground

(Note 5) V+ = 15V, TA = 25C

Input Offset Voltage

(Note 8)

VOS Drift

RS = 0

Input Offset Current

IIN(+) IIN(), VCM = 0V

IOS Drift

RS = 0

10

200

10

200

Input Bias Current

IIN(+) or IIN()

40

100

40

100

Input Common-Mode

V+ = +30V

60

40

60

20

V+2

20

30

30

V+2

mA
mV
V/C

75

nA

10

300

pA/C

40

200

nA

V+2

Large Signal

V+ = +15V (VOSwing = 1V to 11V)


25

25

15

V/mV

V = 30V

RL = 2 k

26

26

26

(LM2902, V+ = 26V)

RL = 10 k

27

RL 2 k
VOH

40

30

(LM2902, V = 26V)

Output

60
4

Voltage Range (Note


10)
Voltage Gain

40

Voltage
Swing
Output
Current

VOL

V+ = 5V, RL = 10 k

Source

VO = 2V

28
5

VIN+ = +1V,

10

27
20

20

28

27

5
10

20

20

28
5

10

20

20

VIN = 0V,

mA

V+ = 15V
VIN = +1V,

Sink

mV

10

15

VIN+ = 0V,
V+ = 15V

Electrical Characteristics
V+ = +5.0V, (Note 7), unless otherwise stated
Parameter

LM124/LM224

Conditions

Input Offset Voltage

(Note 8) TA = 25C

Input Bias Current

IIN(+) or IIN(), VCM = 0V,

(Note 9)

TA = 25C

Input Offset Current

IIN(+) or IIN(), VCM = 0V,

Min

Typ

LM324

Max Min

Typ

LM2902
Max Min

Typ

Max

Units

mV

45

150

45

250

45

250

nA

30

50

50

nA

TA = 25C
Input Common-Mode

V+ = 30V, (LM2902, V+ = 26V),

Voltage Range (Note


10)

TA = 25C

www.national.com

V+1.5

V+1.5

V+1.5

(Continued)
V+ = +5.0V, (Note 7), unless otherwise stated
Parameter

Supply Current

LM124/LM224

Conditions

Min

Typ

LM324

Max Min

Typ

LM2902
Max Min

Typ

Max

Units

Over Full Temperature Range


RL = On All Op Amps
+

mA

V = 30V (LM2902 V = 26V)

1.5

1.5

1.5

V+ = 5V

0.7

1.2

0.7

1.2

0.7

1.2

Large Signal

V+ = 15V, RL 2k,

Voltage Gain

(VO = 1V to 11V), TA = 25C

Common-Mode

DC, VCM = 0V to V+ 1.5V,

Rejection Ratio

TA = 25C

Power Supply

V+ = 5V to 30V

Rejection Ratio

(LM2902, V+ = 5V to 26V),

50

100

25

100

25

100

V/mV

70

85

65

85

50

70

dB

65

100

65

100

50

100

dB

120

dB

TA = 25C
Amplifier-to-Amplifier

f = 1 kHz to 20 kHz, TA = 25C

Coupling (Note 11)

(Input Referred)

Output
Current

VIN+ = 1V, VIN = 0V,

Source

120

120

20

40

20

40

20

40

10

20

10

20

10

20

12

50

12

50

12

50

mA

V+ = 15V, VO = 2V, TA = 25C


Sink

VIN = 1V, V

+
IN

= 0V,

V+ = 15V, VO = 2V, TA = 25C


VIN = 1V, VIN+ = 0V,

V = 15V, VO = 200 mV, TA = 25C


Short Circuit to Ground

(Note 5) V+ = 15V, TA = 25C

Input Offset Voltage

(Note 8)

VOS Drift

RS = 0

Input Offset Current

IIN(+) IIN(), VCM = 0V

IOS Drift

RS = 0

10

Input Bias Current

IIN(+) or IIN()

40

Input Common-Mode

40

60

V = +30V

7
150

45

10
300
V 2

40

500
V 2

40

200

mV
nA
pA/C

500
+

mA
V/C

10
+

60
10

7
100

40

V 2

nA
V

(LM2902, V = 26V)

Large Signal

V+ = +15V (VOSwing = 1V to 11V)

Voltage Gain

RL 2 k
VOH

60
7

Voltage Range (Note


10)

Output

40

25

15

15

V/mV

26

22

V = 30V

RL = 2 k

26

(LM2902, V+ = 26V)

RL = 10 k

27

Voltage
Swing
Output
Current

VOL

V+ = 5V, RL = 10 k

Source

VO = 2V

28
5

27
20

28
5

23
20

24
5

VIN = +1V,

10

20

10

20

10

mV

20

VIN = 0V,
Sink

100

mA

V+ = 15V
VIN = +1V,

VIN+ = 0V,
V+ = 15V
Note 4: For operating at high temperatures, the LM324/LM324A/LM2902 must be derated based on a +125C maximum junction temperature and a thermal
resistance of 88C/W which applies for the device soldered in a printed circuit board, operating in a still air ambient. The LM224/LM224A and LM124/LM124A can
be derated based on a +150C maximum junction temperature. The dissipation is the total of all four amplifiers use external resistors, where possible, to allow the
amplifier to saturate of to reduce the power which is dissipated in the integrated circuit.
Note 5: Short circuits from the output to V+ can cause excessive heating and eventual destruction. When considering short circuits to ground, the maximum output
current is approximately 40 mA independent of the magnitude of V+. At values of supply voltage in excess of +15V, continuous short-circuits can exceed the power
dissipation ratings and cause eventual destruction. Destructive dissipation can result from simultaneous shorts on all amplifiers.
Note 6: This input current will only exist when the voltage at any of the input leads is driven negative. It is due to the collector-base junction of the input PNP
transistors becoming forward biased and thereby acting as input diode clamps. In addition to this diode action, there is also lateral NPN parasitic transistor action

www.national.com

LM124/LM224/LM324/LM2902

Electrical Characteristics

LM124/LM224/LM324/LM2902

Electrical Characteristics

(Continued)

on the IC chip. This transistor action can cause the output voltages of the op amps to go to the V+voltage level (or to ground for a large overdrive) for the time
duration that an input is driven negative. This is not destructive and normal output states will re-establish when the input voltage, which was negative, again returns to
a value greater than 0.3V (at 25C).
Note 7: These specifications are limited to 55C TA +125C for the LM124/LM124A. With the LM224/LM224A, all temperature specifications are limited to
25C TA +85C, the LM324/LM324A temperature specifications are limited to 0C TA +70C, and the LM2902 specifications are limited to 40C TA
+85C.
Note 8: VO . 1.4V, RS = 0 with V+ from 5V to 30V; and over the full input common-mode range (0V to V+ 1.5V) for LM2902, V+ from 5V to
26V.
Note 9: The direction of the input current is out of the IC due to the PNP input stage. This current is essentially constant, independent of the state of the output so
no loading change exists on the input lines.
Note 10: The input common-mode voltage of either input signal voltage should not be allowed to go negative by more than 0.3V (at 25C). The upper end of the
common-mode voltage range is V+ 1.5V (at 25C), but either or both inputs can go to +32V without damage (+26V for LM2902), independent of the magnitude
of V+.
Note 11: Due to proximity of external components, insure that coupling is not originating via stray capacitance between these external parts. This typically can be
detected as this type of capacitance increases at higher frequencies.
Note 12: Refer to RETS124AX for LM124A military specifications and refer to RETS124X for LM124 military specifications.
Note 13: Human body model, 1.5 k in series with 100 pF.

Typical Performance Characteristics


Input Voltage Range

Input Current

00929934

00929935

Supply Current

Voltage Gain

00929936

www.national.com

00929937

LM124/LM224/LM324/LM2902

Typical Performance Characteristics

(Continued)

Open Loop Frequency


Response

Common Mode Rejection


Ratio

00929938
00929939

Voltage Follower Pulse


Response

Voltage Follower Pulse


Response (Small Signal)

00929940

00929941

Large Signal Frequency


Response

Output Characteristics
Current Sourcing

00929942

00929943

www.national.com

LM124/LM224/LM324/LM2902

Typical Performance Characteristics

(Continued)

Output Characteristics
Current Sinking

Current Limiting

00929944

00929945

Input Current (LM2902 only)

Voltage Gain (LM2902 only)

00929946

00929947

Application Hints

should be provided to prevent the input voltages from going


negative more than 0.3 VDC (at 25C). An input clamp diode
with a resistor to the IC input terminal can be used.

The LM124 series are op amps which operate with only a


single power supply voltage, have true-differential inputs,
and remain in the linear mode with an input common-mode
voltage of 0 VDC. These amplifiers operate over a wide range
of power supply voltage with little change in performance
characteristics. At 25C amplifier operation is possible down
to a minimum supply voltage of 2.3 VDC.

To reduce the power supply drain, the amplifiers have a


class A output stage for small signal levels which converts to
class B in a large signal mode. This allows the amplifiers to
both source and sink large output currents. Therefore both
NPN and PNP external current boost transistors can be used
to extend the power capability of the basic amplifiers. The
output voltage needs to raise approximately 1 diode drop
above ground to bias the on-chip vertical PNP transistor for
output current sinking applications.

The pinouts of the package have been designed to simplify


PC board layouts. Inverting inputs are adjacent to outputs for
all of the amplifiers and the outputs have also been placed at
the corners of the package (pins 1, 7, 8, and 14).

For ac applications, where the load is capacitively coupled to


the output of the amplifier, a resistor should be used, from
the output of the amplifier to ground to increase the class A
bias current and prevent crossover distortion.

Precautions should be taken to insure that the power supply


for the integrated circuit never becomes reversed in polarity
or that the unit is not inadvertently installed backwards in a
test socket as an unlimited current surge through the resulting forward diode within the IC could cause fusing of the
internal conductors and result in a destroyed unit.

Where the load is directly coupled, as in dc applications,


there is no crossover distortion.
Capacitive loads which are applied directly to the output of
the amplifier reduce the loop stability margin. Values of
50 pF can be accommodated using the worst-case noninverting unity gain connection. Large closed loop gains or
resistive isolation should be used if larger load capacitance
must be driven by the amplifier.

Large differential input voltages can be easily accommodated and, as input differential voltage protection diodes are
not needed, no large input currents result from large differential input voltages. The differential input voltage may be
larger than V+ without damaging the device. Protection

www.national.com

(Continued)

output source current which is available at 25C provides a


larger output current capability at elevated temperatures
(see typical performance characteristics) than a standard IC
op amp.

The bias network of the LM124 establishes a drain current


which is independent of the magnitude of the power supply
voltage over the range of from 3 VDC to 30 VDC.

The circuits presented in the section on typical applications


emphasize operation on only a single power supply voltage.
If complementary power supplies are available, all of the
standard op amp circuits can be used. In general, introducing a pseudo-ground (a bias voltage reference of V+/2) will
allow operation above and below this value in single power
supply systems. Many application circuits are shown which
take advantage of the wide input common-mode voltage
range which includes ground. In most cases, input biasing is
not required and input voltages which range to ground can
easily be accommodated.

Output short circuits either to ground or to the positive power


supply should be of short time duration. Units can be destroyed, not as a result of the short circuit current causing
metal fusing, but rather due to the large increase in IC chip
dissipation which will cause eventual failure due to excessive junction temperatures. Putting direct short-circuits on
more than one amplifier at a time will increase the total IC
power dissipation to destructive levels, if not properly protected with external dissipation limiting resistors in series
with the output leads of the amplifiers. The larger value of

Typical Single-Supply Applications

(V+ = 5.0 VDC)

Non-Inverting DC Gain (0V Input = 0V Output)

00929905

*R not needed due to temperature independent IIN

DC Summing Amplifier
(VINS 0 VDC and VO VDC)

Power Amplifier

00929907

00929906

V0 = 0 VDC for VIN = 0 VDC

Where: V0 = V1 + V2 V3 V4
(V1 + V2) (V3 + V4) to keep VO

AV = 10

> 0 VDC

www.national.com

LM124/LM224/LM324/LM2902

Application Hints

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

LED Driver

BI-QUAD RC Active Bandpass Filter

00929908

00929909

fo = 1 kHz
Q = 50
AV = 100 (40 dB)

Fixed Current Sources

Lamp Driver

00929911

00929910

www.national.com

10

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

Pulse Generator

(V+ = 5.0 VDC) (Continued)


Current Monitor

00929915

Squarewave Oscillator
00929912

*(Increase R1 for IL small)

Driving TTL

00929916

Pulse Generator
00929913

Voltage Follower

00929914

00929917

11

www.national.com

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

High Compliance Current Sink

00929918

IO = 1 amp/volt VIN
(Increase RE for Io small)

Low Drift Peak Detector

00929919

www.national.com

12

(V+ = 5.0 VDC) (Continued)

Comparator with Hysteresis

Ground Referencing a Differential Input Signal

00929920

00929921

VO = VR

Voltage Controlled Oscillator Circuit

00929922

*Wide control voltage range: 0 VDC VC 2 (V 1.5 VDC)

Photo Voltaic-Cell Amplifier

00929923

13

www.national.com

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

AC Coupled Inverting Amplifier

00929924

AC Coupled Non-Inverting Amplifier

00929925

www.national.com

14

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

DC Coupled Low-Pass RC Active Filter

00929926

fO = 1 kHz
Q=1
AV = 2

High Input Z, DC Differential Amplifier

00929927

15

www.national.com

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

High Input Z Adjustable-Gain


DC Instrumentation Amplifier

00929928

Using Symmetrical Amplifiers to


Reduce Input Current (General Concept)

Bridge Current Amplifier

00929930

00929929

www.national.com

16

LM124/LM224/LM324/LM2902

Typical Single-Supply Applications

(V+ = 5.0 VDC) (Continued)

Bandpass Active Filter

00929931

fO = 1 kHz
Q = 25

17

www.national.com

LM124/LM224/LM324/LM2902

Physical Dimensions

inches (millimeters) unless otherwise noted

Ceramic Dual-In-Line Package (J)


Order Number JL124ABCA, JL124BCA, JL124ASCA, JL124SCA, LM124J,
LM124AJ, LM124AJ/883, LM124J/883, LM224J, LM224AJ or LM324J
NS Package Number J14A

MX S.O. Package (M)


Order Number LM324M, LM324MX, LM324AM, LM324AMX, LM2902M or LM2902MX
NS Package Number M14A

www.national.com

18

LM124/LM224/LM324/LM2902

Physical Dimensions

inches (millimeters) unless otherwise noted (Continued)

Molded Dual-In-Line Package (N)


Order Number LM324N, LM324AN or LM2902N
NS Package Number N14A

Ceramic Flatpak Package


Order Number JL124ABDA, JL124ABZA, JL124ASDA, JL124BDA, JL124BZA,
JL124SDA, LM124AW/883, LM124AWG/883, LM124W/883 or LM124WG/883
NS Package Number W14B

19

www.national.com

LM124/LM224/LM324/LM2902 Low Power Quad Operational Amplifiers

Physical Dimensions

inches (millimeters) unless otherwise noted (Continued)

14-Pin TSSOP
Order NumberLM324MT or LM324MTX
NS Package Number MTC14

LIFE SUPPORT POLICY


NATIONALS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL
COUNSEL OF NATIONAL 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
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 to the user.

2. A critical component is 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.

BANNED SUBSTANCE COMPLIANCE


National Semiconductor certifies that the products and packing materials meet the provisions of the Customer Products
Stewardship Specification (CSP-9-111C2) and the Banned Substances and Materials of Interest Specification
(CSP-9-111S2) and contain no Banned Substances as defined in CSP-9-111S2.
National Semiconductor
Americas Customer
Support Center
Email: new.feedback@nsc.com
Tel: 1-800-272-9959
www.national.com

National Semiconductor
Europe Customer Support Center
Fax: +49 (0) 180-530 85 86
Email: europe.support@nsc.com
Deutsch Tel: +49 (0) 69 9508 6208
English Tel: +44 (0) 870 24 0 2171
Franais Tel: +33 (0) 1 41 91 8790

National Semiconductor
Asia Pacific Customer
Support Center
Email: ap.support@nsc.com

National Semiconductor
Japan Customer Support Center
Fax: 81-3-5639-7507
Email: jpn.feedback@nsc.com
Tel: 81-3-5639-7560

National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.

LM78XX/LM78XXA
3-Terminal 1A Positive Voltage
Regulator
Features

General Description

Output Current up to 1A

The LM78XX series of three terminal positive regulators


are available in the TO-220 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 sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage
regulators, these devices can be used with external components to obtain adjustable voltages and currents.

Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24


Thermal Overload Protection
Short Circuit Protection
Output Transistor Safe Operating Area Protection

Ordering Information
Product Number

Output Voltage Tolerance

Package

Operating Temperature

4%

TO-220

-40C to +125C

LM7805CT
LM7806CT
LM7808CT
LM7809CT
LM7810CT
LM7812CT
LM7815CT
LM7818CT
LM7824CT
LM7805ACT

0C to +125C

2%

LM7806ACT
LM7808ACT
LM7809ACT
LM7810ACT
LM7812ACT
LM7815ACT
LM7818ACT
LM7824ACT

2006 Fairchild Semiconductor Corporation

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

May 2006

LM78XX/LM78XXA Rev. 1.0.1

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Block Diagram
Input

Series Pass
Element

1
Current
Generator

Starting
Circuit

Output
3

SOA
Protection

Reference
Voltage

Error
Amplifier

Thermal
Protection
GND
2

Figure 1.

Pin Assignment
TO-220
GND

1. Input
2. GND
3. Output

Figure 2.

Absolute Maximum Ratings


Absolute maximum ratings are those values beyond which damage to the device may occur. The datasheet
specifications should be met, without exception, to ensure that the system design is reliable over its power supply,
temperature, and output/input loading variables. Fairchild does not recommend operation outside datasheet
specifications.

Symbol
VI

Parameter
Input Voltage

Value

Unit

VO = 5V to 18V

35

VO = 24V

40

RJC

Thermal Resistance Junction-Cases (TO-220)

C/W

RJA

Thermal Resistance Junction-Air (TO-220)

65

C/W

TOPR

Operating Temperature
Range

-40 to +125

TSTG

LM78xx
LM78xxA

Storage Temperature Range

LM78XX/LM78XXA Rev. 1.0.1

0 to +125
-65 to +150

www.fairchildsemi.com

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 10V, CI = 0.1F, unless otherwise specified.

Symbol
VO

Parameter

Conditions

Output Voltage

Min.

Typ.

Max.

Unit

4.8

5.0

5.2

4.75

5.0

5.25

VO = 7V to 25V

4.0

100

VI = 8V to 12V

1.6

50.0

IO = 5mA to 1.5A

9.0

100

IO = 250mA to 750mA

4.0

50.0

5.0

8.0

mA

0.03

0.5

mA

VI = 7V to 25V

0.3

1.3

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

42.0

V/VO

62.0

73.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C
5mA IO 1A, PO 15W,
VI = 7V to 20V

Regline

Line Regulation(1)

TJ = +25C

(1)

Regload Load Regulation


IQ
IQ
VO/T
VN

TJ = +25C

Quiescent Current

TJ = +25C

Quiescent Current Change IO = 5mA to 1A


Output Voltage Drift

(2)

Output Noise Voltage


(2)

RR

Ripple Rejection

VDROP

Dropout Voltage
(2)

f = 120Hz, VO = 8V to 18V

mV
mV

rO

Output Resistance

f = 1kHz

15.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

230

mA

TJ = +25C

2.2

IPK

Peak Current

(2)

Notes:
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.
2. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7805)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 11V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Parameter

Conditions

Output Voltage

Min

Typ.

Max.

Unit

5.75

6.0

6.25

5.7

6.0

6.3

VI = 8V to 25V

5.0

120

VI = 9V to 13V

1.5

60.0

IO = 5mA to 1.5A

9.0

120

IO = 250mA to 750mA

3.0

60.0

TJ = +25C
5mA IO 1A, PO 15W,
VI = 8.0V to 21V

Regline
Regload

Line Regulation(3)

TJ = +25C

(3)

TJ = +25C

Load Regulation

mV
mV

IQ

Quiescent Current

TJ = +25C

5.0

8.0

mA

IQ

Quiescent Current
Change

IO = 5mA to 1A

0.5

mA

VI = 8V to 25V

1.3

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

45.0

V/VO

62.0

73.0

dB

IO = 1A, TJ = +25C

2.0

VO/T
VN

Output Voltage Drift

(4)

Output Noise Voltage


(4)

RR

Ripple Rejection

VDROP

Dropout Voltage
(4)

f = 120Hz, VO = 8V to 18V

rO

Output Resistance

f = 1kHz

19.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(4)

Notes:
3. 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.
4. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7806)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 14V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter
Output Voltage

Line Regulation(5)

Regload Load Regulation

IQ
VO/T
VN

Min.

Typ.

Max.

Unit

TJ = +25C

7.7

8.0

8.3

5mA IO 1A, PO 15W,


VI = 10.5V to 23V

7.6

8.0

8.4

VI = 10.5V to 25V

5.0

160

VI = 11.5V to 17V

2.0

80.0

IO = 5mA to 1.5A

10.0

160

IO = 250mA to 750mA

5.0

80.0

TJ = +25C

(5)

IQ

Conditions

TJ = +25C

mV
mV

Quiescent Current

TJ = +25C

5.0

8.0

mA

Quiescent Current Change

IO = 5mA to 1A

0.05

0.5

mA

VI = 10.5V to 25V

0.5

1.0

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

52.0

V/VO

f = 120Hz, VO = 11.5V to 21.5V

56.0

73.0

dB

IO = 1A, TJ = +25C

2.0

Output Voltage Drift

(6)

Output Noise Voltage


(6)

RR

Ripple Rejection

VDROP

Dropout Voltage
(6)

rO

Output Resistance

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

230

mA

TJ = +25C

2.2

IPK

Peak Current

(6)

Notes:
5. 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.
6. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7808)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 15V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Parameter

Conditions

Output Voltage

Min.

Typ.

Max.

Unit

8.65

9.0

9.35

8.6

9.0

9.4

6.0

180

2.0

90.0

12.0

180

4.0

90.0

5.0

8.0

mA

0.5

mA

VI = 11.5V to 26V

1.3

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

58.0

V/VO

56.0

71.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C
5mA IO 1A, PO 15W,
VI = 11.5V to 24V

Regline

Line Regulation(7)

TJ = +25C VI = 11.5V to 25V


VI = 12V to 17V

(7)

Regload Load Regulation

TJ = +25C IO = 5mA to 1.5A


IO = 250mA to 750mA

IQ
IQ
VO/T
VN

Quiescent Current

TJ = +25C

Quiescent Current Change IO = 5mA to 1A


Output Voltage Drift

(8)

Output Noise Voltage


(8)

RR

Ripple Rejection

VDROP

Dropout Voltage
(8)

f = 120Hz, VO = 13V to 23V

mV
mV

rO

Output Resistance

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(8)

Notes:
7. 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.
8. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7809)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 16V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol

Min.

Typ.

Max.

Unit

TJ = +25C

9.6

10.0

10.4

5mA IO 1A, PO 15W,


VI = 12.5V to 25V

9.5

10.0

10.5

VI = 12.5V to 25V

10.0

200

VI = 13V to 25V

3.0

100

IO = 5mA to 1.5A

12.0

200

IO = 250mA to 750mA

4.0

400

5.1

8.0

mA

0.5

mA

VI = 12.5V to 29V

1.0

Output Voltage Drift(10)

IO = 5mA

-1.0

mV/C

VN

Output Noise Voltage

f = 10Hz to 100kHz, TA = +25C

58.0

V/VO

RR

Ripple Rejection(10)

f = 120Hz, VO = 13V to 23V

56.0

71.0

dB

Dropout Voltage

IO = 1A, TJ = +25C

2.0

rO

Output Resistance(10)

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

IPK

Peak Current(10)

TJ = +25C

2.2

VO

Regline

Parameter
Output Voltage

Line Regulation(9)

Regload Load Regulation(9)


IQ
IQ

VO/T

VDROP

Quiescent Current

Conditions

TJ = +25C

TJ = +25C

TJ = +25C

Quiescent Current Change IO = 5mA to 1A

mV

mV

Notes:
9. 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.
10. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7810)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 19V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(11)

Min.

Typ.

Max.

Unit

TJ = +25C

11.5

12.0

12.5

5mA IO 1A, PO 15W,


VI = 14.5V to 27V

11.4

12.0

12.6

10.0

240

3.0

120

11.0

240

5.0

120

5.1

8.0

mA

0.1

0.5

mA

VI = 14.5V to 30V

0.5

1.0

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

76.0

V/VO

55.0

71.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C VI = 14.5V to 30V


VI = 16V to 22V

Regload

(11)

TJ = +25C IO = 5mA to 1.5A

Load Regulation

IO = 250mA to 750mA
IQ

Quiescent Current

TJ = +25C

IQ

Quiescent Current Change IO = 5mA to 1A

VO/T

(12)

VN

Output Voltage Drift

Output Noise Voltage


(12)

RR

Ripple Rejection

VDROP

Dropout Voltage
(12)

f = 120Hz, VI = 15V to 25V

mV
mV

rO

Output Resistance

f = 1kHz

18.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

230

mA

TJ = +25C

2.2

IPK

Peak Current

(12)

Notes:
11. 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.
12. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7812)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 23V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter
Output Voltage

Line Regulation(13)

Conditions

Min.

Typ.

Max.

Unit

TJ = +25C

14.4

15.0

15.6

5mA IO 1A, PO 15W,


VI = 17.5V to 30V

14.25

15.0

15.75

11.0

300

3.0

150

12.0

300

4.0

150

5.2

8.0

mA

0.5

mA

VI = 17.5V to 30V

1.0

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

90.0

V/VO

54.0

70.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C VI = 17.5V to 30V


VI = 20V to 26V

(13)

Regload Load Regulation

TJ = +25C IO = 5mA to 1.5A


IO = 250mA to 750mA

IQ
IQ
VO/T
VN

Quiescent Current

TJ = +25C

Quiescent Current Change IO = 5mA to 1A


Output Voltage Drift

(14)

Output Noise Voltage


(14)

RR

Ripple Rejection

VDROP

Dropout Voltage
(14)

f = 120Hz, VI = 18.5V to 28.5V

mV
mV

rO

Output Resistance

f = 1kHz

19.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(14)

Notes:
13. 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.
14. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7815)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 27V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(15)
(15)

Regload Load Regulation

Min.

Typ.

Max.

Unit

TJ = +25C

17.3

18.0

18.7

5mA IO 1A, PO 15W,


VI = 21V to 33V

17.1

18.0

18.9

TJ = +25C VI = 21V to 33V

15.0

360

VI = 24V to 30V

5.0

180

15.0

360

5.0

180

5.2

8.0

mA
mA

TJ = +25C IO = 5mA to 1.5A


IO = 250mA to 750mA

IQ

Quiescent Current

TJ = +25C

mV
mV

IQ

Quiescent Current Change IO = 5mA to 1A

0.5

VI = 21V to 33V

1.0

VO/T

(16)

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

110

V/VO

53.0

69.0

dB

IO = 1A, TJ = +25C

2.0

VN

Output Voltage Drift

Output Noise Voltage


(16)

RR

Ripple Rejection

VDROP

Dropout Voltage
(16)

f = 120Hz, VI = 22V to 32V

rO

Output Resistance

f = 1kHz

22.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(16)

Notes:
15. 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.
16. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

10

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7818)

(Continued)

Refer to the test circuits. -40C < TJ < 125C, IO = 500mA, VI = 33V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(17)

Typ.

Max.

Unit

TJ = +25C

23.0

24.0

25.0

5mA IO 1A, PO 15W,


VI = 27V to 38V

22.8

24.0

25.25

VI = 27V to 38V

17.0

480

VI = 30V to 36V

6.0

240

IO = 5mA to 1.5A

15.0

480

IO = 250mA to 750mA

5.0

240

5.2

8.0

mA
mA

TJ = +25C

(17)

Regload Load Regulation


IQ

Min.

TJ = +25C

Quiescent Current

TJ = +25C

mV
mV

IQ

Quiescent Current Change IO = 5mA to 1A

0.1

0.5

VI = 27V to 38V

0.5

1.0

VO/T

(18)

IO = 5mA

-1.5

mV/C

f = 10Hz to 100kHz, TA = +25C

60.0

V/VO

50.0

67.0

dB

IO = 1A, TJ = +25C

2.0

VN

Output Voltage Drift

Output Noise Voltage


(18)

RR

Ripple Rejection

VDROP

Dropout Voltage
(18)

f = 120Hz, VI = 28V to 38V

rO

Output Resistance

f = 1kHz

28.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

230

mA

TJ = +25C

2.2

IPK

Peak Current

(18)

Notes:
17. 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.
18. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

11

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7824)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 10V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(19)

Min.

Typ.

Max.

Unit

TJ = +25C

4.9

5.0

5.1

IO = 5mA to 1A, PO 15W,


VI = 7.5V to 20V

4.8

5.0

5.2

VI = 7.5V to 25V, IO = 500mA

5.0

50.0

VI = 8V to 12V

3.0

50.0

VI = 7.3V to 20V

5.0

50.0

VI = 8V to 12V

1.5

25.0

TJ = +25C, IO = 5mA to 1.5A

9.0

100

IO = 5mA to 1A

9.0

100

IO = 250mA to 750mA

4.0

50.0

TJ = +25C
(19)

Regload Load Regulation

mV

mV

IQ

Quiescent Current

TJ = +25C

5.0

6.0

mA

IQ

Quiescent Current
Change

IO = 5mA to 1A

0.5

mA

VI = 8V to 25V, IO = 500mA

0.8

VI = 7.5V to 20V, TJ = +25C

0.8

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA, VI = 8V to 18V

68.0

dB

IO = 1A, TJ = +25C

2.0

VO/T
VN

Output Voltage Drift

(20)

Output Noise Voltage


(20)

RR

Ripple Rejection

VDROP

Dropout Voltage
(20)

rO

Output Resistance

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(20)

Notes:
19. 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.
20. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

12

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7805A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 11V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Regload

IQ
IQ

VO/T
VN

Parameter

Conditions

Output Voltage

Line Regulation(21)

(21)

Load Regulation

Quiescent Current

Min.

Typ.

Max.

Unit

TJ = +25C

5.58

6.0

6.12

IO = 5mA to 1A, PO 15W,


VI = 8.6V to 21V

5.76

6.0

6.24

VI = 8.6V to 25V, IO = 500mA

5.0

60.0

VI = 9V to 13V

3.0

60.0

TJ = +25C

VI = 8.3V to 21V

5.0

60.0

VI = 9V to 13V

1.5

30.0

TJ = +25C, IO = 5mA to 1.5A

9.0

100

IO = 5mA to 1A

9.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C

4.3

6.0

mA

0.5

mA

VI = 19V to 25V, IO = 500mA

0.8

VI = 8.5V to 21V, TJ = +25C

0.8

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA, VI = 9V to 19V

65.0

dB

IO = 1A, TJ = +25C

2.0

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(22)

Output Noise Voltage


(22)

RR

Ripple Rejection

VDROP

Dropout Voltage
(22)

mV

mV

rO

Output Resistance

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(22)

Notes:
21. 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.
22. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

13

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7806A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 14V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Parameter

Conditions

Output Voltage

Min.

Typ.

Max.

Unit

7.84

8.0

8.16

7.7

8.0

8.3

VI = 10.6V to 25V, IO = 500mA

6.0

80.0

VI = 11V to 17V

3.0

80.0

TJ = +25C

VI = 10.4V to 23V

6.0

80.0

VI = 11V to 17V

2.0

40.0

TJ = +25C, IO = 5mA to 1.5A

12.0

100

IO = 5mA to 1A

12.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C

5.0

6.0

mA

0.5

mA

VI = 11V to 25V, IO = 500mA

0.8

VI = 10.6V to 23V, TJ = +25C

0.8

IO = 5mA

-0.8

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA,
VI = 11.5V to 21.5V

62.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C
IO = 5mA to 1A, PO 15W,
VI = 10.6V to 23V

Regline

Regload

IQ
IQ

VO/T
VN

Line Regulation(23)

(23)

Load Regulation

Quiescent Current

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(24)

Output Noise Voltage


(24)

RR

Ripple Rejection

VDROP

Dropout Voltage
(24)

mV

mV

rO

Output Resistance

f = 1kHz

18.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(24)

Notes:
23. 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.
24. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

14

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7808A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 15V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Regload

IQ
IQ

VO/T

Parameter

Conditions

Output Voltage

Line Regulation(25)

(25)

Load Regulation

Quiescent Current

Min.

Typ.

Max.

Units

TJ = +25C

8.82

9.0

9.16

IO = 5mA to 1A, PO 15W,


VI = 11.2V to 24V

8.65

9.0

9.35

VI = 11.7V to 25V, IO = 500mA

6.0

90.0

VI = 12.5V to 19V

4.0

45.0

TJ = +25C

VI = 11.5V to 24V

6.0

90.0

VI = 12.5V to 19V

2.0

45.0

TJ = +25C, IO = 5mA to 1.5A

12.0

100

IO = 5mA to 1A

12.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C

5.0

6.0

mA

0.5

mA

VI = 12V to 25V, IO = 500mA

0.8

VI = 11.7V to 25V, TJ = +25C

0.8

IO = 5mA

-1.0

mV/C

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(26)

mV

mV

VN

Output Noise Voltage

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

RR

Ripple Rejection(26)

f = 120Hz, IO = 500mA,
VI = 12V to 22V

62.0

dB

Dropout Voltage

IO = 1A, TJ = +25C

2.0

rO

Output Resistance(26)

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

IPK

Peak Current(26)

TJ = +25C

2.2

VDROP

Notes:
25. 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.
26. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

15

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7809A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 16V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(27)

Min.

Typ.

Max.

Units

TJ = +25C

9.8

10.0

10.2

IO = 5mA to 1A, PO 15W,


VI = 12.8V to 25V

9.6

10.0

10.4

VI = 12.8V to 26V, IO = 500mA

8.0

100

VI = 13V to 20V

4.0

50.0

VI = 12.5V to 25V

8.0

100

VI = 13V to 20V

3.0

50.0

TJ = +25C, IO = 5mA to 1.5A

12.0

100

IO = 5mA to 1A

12.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C
Regload

(27)

Load Regulation

mV

mV

IQ

Quiescent Current

TJ = +25C

5.0

6.0

mA

IQ

Quiescent Current
Change

IO = 5mA to 1A

0.5

mA

VI = 12.8V to 25V, IO = 500mA

0.8

VI = 13V to 26V, TJ = +25C

0.5

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA, VI = 14V to 24V

62.0

dB

IO = 1A, TJ = +25C

2.0

VO/T
VN

Output Voltage Drift

(28)

Output Noise Voltage


(28)

RR

Ripple Rejection

VDROP

Dropout Voltage
(28)

rO

Output Resistance

f = 1kHz

17.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(28)

Notes:
27. 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.
28. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

16

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7810A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 19V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Regload

IQ
IQ

VO/T
VN

Parameter

Conditions

Output Voltage

Line Regulation(29)

(29)

Load Regulation

Quiescent Current

Min.

Typ.

Max.

Units

TJ = +25C

11.75

12.0

12.25

IO = 5mA to 1A, PO 15W,


VI = 14.8V to 27V

11.5

12.0

12.5

VI = 14.8V to 30V, IO = 500mA

10.0

120

VI = 16V to 22V

4.0

120

TJ = +25C

VI = 14.5V to 27V

10.0

120

VI = 16V to 22V

3.0

60.0

TJ = +25C, IO = 5mA to 1.5A

12.0

100

IO = 5mA to 1A

12.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C

5.1

6.0

mA

0.5

mA

VI = 14V to 27V, IO = 500mA

0.8

VI = 15V to 30V, TJ = +25C

0.8

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA,
VI = 14V to 24V

60.0

dB

IO = 1A, TJ = +25C

2.0

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(30)

Output Noise Voltage


(30)

RR

Ripple Rejection

VDROP

Dropout Voltage
(30)

mV

mV

rO

Output Resistance

f = 1kHz

18.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(30)

Note:
29. 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.
30. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

17

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7812A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 23V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Regload

IQ
IQ

VO/T
VN

Parameter

Conditions

Output Voltage

Line Regulation(31)

(31)

Load Regulation

Quiescent Current

Min.

Typ.

Max.

Units

TJ = +25C

14.75

15.0

15.3

IO = 5mA to 1A, PO 15W,


VI = 17.7V to 30V

14.4

15.0

15.6

VI = 17.4V to 30V, IO = 500mA

10.0

150

VI = 20V to 26V

5.0

150

TJ = +25C VI = 17.5V to 30V

11.0

150

VI = 20V to 26V

3.0

75.0

TJ = +25C, IO = 5mA to 1.5A

12.0

100

IO = 5mA to 1A

12.0

100

IO = 250mA to 750mA

5.0

50.0

TJ = +25C

5.2

6.0

mA

0.5

mA

VI = 17.5V to 30V, IO = 500mA

0.8

VI = 17.5V to 30V, TJ = +25C

0.8

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA,
VI = 18.5V to 28.5V

58.0

dB

IO = 1A, TJ = +25C

2.0

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(32)

Output Noise Voltage


(32)

RR

Ripple Rejection

VDROP

Dropout Voltage
(32)

mV

mV

rO

Output Resistance

f = 1kHz

19.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(32)

Notes:
31. 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.
32. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

18

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7815A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 27V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Regload

IQ
IQ

VO/T
VN

Parameter

Min.

Typ.

Max.

Units

TJ = +25C

17.64

18.0

18.36

IO = 5mA to 1A, PO 15W,


VI = 21V to 33V

17.3

18.0

18.7

VI = 21V to 33V, IO = 500mA

15.0

180

VI = 21V to 33V

5.0

180

TJ = +25C

VI = 20.6V to 33V

15.0

180

VI = 24V to 30V

5.0

90.0

TJ = +25C, IO = 5mA to 1.5A

15.0

100

IO = 5mA to 1A

15.0

100

IO = 250mA to 750mA

7.0

50.0

Quiescent Current

TJ = +25C

5.2

6.0

mA

Quiescent Current Change

IO = 5mA to 1A

0.5

mA

VI = 12V to 33V, IO = 500mA

0.8

VI = 12V to 33V, TJ = +25C

0.8

IO = 5mA

-1.0

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA,
VI = 22V to 32V

57.0

dB

IO = 1A, TJ = +25C

2.0

Output Voltage

Line Regulation(33)

(33)

Load Regulation

Output Voltage Drift

(34)

Output Noise Voltage


(34)

RR

Ripple Rejection

VDROP

Dropout Voltage
(34)

Conditions

mV

mV

rO

Output Resistance

f = 1kHz

19.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(34)

Notes:
33. 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.
34. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

19

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7818A)

(Continued)
Refer to the test circuits. 0C < TJ < 125C, IO = 1A, VI = 33V, CI = 0.33F, CO = 0.1F, unless otherwise specified.

Symbol
VO

Regline

Parameter

Conditions

Output Voltage

Line Regulation(35)

Min.

Typ.

Max.

Units

TJ = +25C

23.5

24.0

24.5

IO = 5mA to 1A, PO 15W,


VI = 27.3V to 38V

23.0

24.0

25.0

VI = 27V to 38V, IO = 500mA

18.0

240

VI = 21V to 33V

6.0

240

VI = 26.7V to 38V

18.0

240

VI = 30V to 36V

6.0

120

TJ = +25C, IO = 5mA to 1.5A

15.0

100

IO = 5mA to 1A

15.0

100

IO = 250mA to 750mA

7.0

50.0

TJ = +25C

5.2

6.0

mA

0.5

mA

VI = 27.3V to 38V, IO = 500mA

0.8

VI = 27.3V to 38V, TJ = +25C

0.8

IO = 5mA

-1.5

mV/C

f = 10Hz to 100kHz, TA = +25C

10.0

V/VO

f = 120Hz, IO = 500mA,
VI = 28V to 38V

54.0

dB

IO = 1A, TJ = +25C

2.0

TJ = +25C
Regload

IQ
IQ

VO/T
VN

(35)

Load Regulation

Quiescent Current

Quiescent Current Change IO = 5mA to 1A

Output Voltage Drift

(36)

Output Noise Voltage


(36)

RR

Ripple Rejection

VDROP

Dropout Voltage
(36)

mV

mV

rO

Output Resistance

f = 1kHz

20.0

ISC

Short Circuit Current

VI = 35V, TA = +25C

250

mA

TJ = +25C

2.2

IPK

Peak Current

(36)

Notes:
35. 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.
36. These parameters, although guaranteed, are not 100% tested in production.

LM78XX/LM78XXA Rev. 1.0.1

20

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Electrical Characteristics (LM7824A)

5.75

VI = 10V
VO = 5V
IO = 5mA

TJ = 25C
VO = 100mV

2.5
OUTPUT CURRENT (A)

QUIESCENT CURRENT (mA)

5.5
5.25
5
4.75

2
1.5
1
.5

4.5
-50

-25

25

50

75

100

125

JUNCTION TEMPERATURE (C)

QUIESCENT CURRENT (mA)

NORMALIZED OUTPUT VOLTAGE (V)

1.01

0.99

-25

25

50

75

100

JUNCTION TEMPERATURE (C)

Figure 5. Output Voltage

15

20

25

30

35

Figure 4. Peak Output Current

VI VO = 5V
IO = 5mA

0.98
-50

10

INPUT-OUTPUT DIFFERENTIAL (V)

Figure 3. Quiescent Current

1.02

125

TJ = 25C
VO = 5V
IO = 10mA

6
5.5
5
4.5

10

15

20

25

30

INPUT VOLTAGE (V)

Figure 6. Quiescent Current

LM78XX/LM78XXA Rev. 1.0.1

35

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Typical Performance Characteristics

21
www.fairchildsemi.com

Input
CI

LM78XX

Output
CO

0.33F

0.1F

Figure 7. DC Parameters

LM78XX

Input

Output

270pF

RL

2N6121
or EQ

0.33F

VO

VO

100

30S

0V

Figure 8. Load Regulation

5.1

Input

LM78XX

0.33F

3
Output
RL

470F
120Hz

Figure 9. Ripple Rejection

LM78XX/LM78XXA Rev. 1.0.1

22

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Typical Applications

LM78XX

Input
CI

Output
CO

0.33F

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

0.1F

Figure 10. Fixed Output Regulator

Input
CI

LM78XX

Output

CO

0.33F

0.1F

IQ

R1

V XX

IO
RL

V XX
IO =
+I
R1 Q

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
input ripple voltage.
2. CI is required if regulator is located an appreciable distance from power supply filter.
3. CO improves stability and transient response.

Figure 11.

Input
CI

LM78XX

CO

0.33F

Output

0.1F

V XX

R1

IQ

R2
IRI 5 IQ
VO = VXX(1 + R2 / R1) + IQR2

Figure 12. Circuit for Increasing Output Voltage

LM78XX/LM78XXA Rev. 1.0.1

23

www.fairchildsemi.com

Output

LM7805
2

CI

0.33F

CO

- 2
LM741
+ 3
4

10k

0.1F

IRI 5 IQ
VO = VXX(1 + R2 / R1) + IQR2

Figure 13. Adjustable Output Regulator (7V to 30V)

Input

Q1 BD536
IQ1
R1

R1 =

LM78XX

IREG

V BEQ1

Output

3
IO

0.1F

0.33F

IREGIQ1 BQ1

IO = IREG + BQ1 (IREGVBEQ1/R1)

Figure 14. High Current Voltage Regulator

Input

Q1

RSC

Q2
R1

3
0.33F

Q1 = TIP42
Q2 = TIP42
RSC =

LM78XX
2

3
0.1F

V BEQ2
I SC

Figure 15. High Output Current with Short Circuit Protection


LM78XX/LM78XXA Rev. 1.0.1

Output

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Input

24
www.fairchildsemi.com

LM78XX

VI

VO

0.33F

0.1F

COMMON

COMMON

LM741
4

-VIN

4.7k

4.7k

-VO

TIP42

Figure 16. Tracking Voltage Regulator

1
+20V
0.33F

LM7815
2

3
+15V
0.1F

1N4001

2.2F
1F +
1
2

-20V

1N4001

MC7915

3
-15V

Figure 17. Split Power Supply (15V 1A)

LM78XX/LM78XXA Rev. 1.0.1

25

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Input
+
0.1F
2
1

LM78XX

Figure 18. Negative Output Voltage Circuit

D45H11

Input

1mH

Output

470

4.7
Z1

0.33F

10F

LM78XX

2
+

0.5

2000F

Figure 19. Switching Regulator

LM78XX/LM78XXA Rev. 1.0.1

26

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Output

Dimensions in millimeters

TO-220
4.50

0.20
0.10

0.10

2.54TYP
[2.54 0.20]

LM78XX/LM78XXA Rev. 1.0.1

18.95MAX.

15.90

1.52

0.10

0.80

0.10

+0.10

0.50 0.05

2.54TYP
[2.54 0.20]

10.00

+0.10

1.30 0.05

0.30

0.10

0.20

10.08

(1.00)

(3.00)

(1.46)

9.20
0.20

13.08

1.27

0.20

(3.70)

1.30

3.60

2.80

0.10

(8.70)

0.20

(1.70)

9.90

2.40

0.20

0.20

27

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

Mechanical Dimensions

The following are registered and unregistered trademarks Fairchild Semiconductor owns or is authorized to use and is not
intended to be an exhaustive list of all such trademarks.
ACEx
ActiveArray
Bottomless
Build it Now
CoolFET
CROSSVOLT
DOME
EcoSPARK
E2CMOS
EnSigna
FACT

FAST
FASTr
FPS
FRFET
GlobalOptoisolator
GTO
HiSeC
I2C
i-Lo
ImpliedDisconnect
IntelliMAX
FACT Quiet Series
Across the board. Around the world.
The Power Franchise
Programmable Active Droop

ISOPLANAR
LittleFET
MICROCOUPLER
MicroFET
MicroPak
MICROWIRE
MSX
MSXPro
OCX
OCXPro
OPTOLOGIC
OPTOPLANAR
PACMAN
POP
Power247

PowerEdge
PowerSaver
PowerTrench
QFET
QS
QT Optoelectronics
Quiet Series
RapidConfigure
RapidConnect
SerDes
ScalarPump
SILENT SWITCHER
SMART START
SPM
Stealth

SuperFET
SuperSOT-3
SuperSOT-6
SuperSOT-8
SyncFET
TCM
TinyLogic
TINYOPTO
TruTranslation
UHC
UniFET
UltraFET
VCX
Wire

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. THESE
SPECIFICATIONS DO NOT EXPAND THE TERMS OF FAIRCHILDS WORLDWIDE TERMS AND CONDITIONS,
SPECIFICALLY THE WARRANTY THEREIN, WHICH COVERS THESE PRODUCTS.

LIFE SUPPORT POLICY


FAIRCHILDS PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL 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, or (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 significant injury to the user.

2. A critical component is 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.

PRODUCT STATUS DEFINITIONS


Definition of Terms
Datasheet Identification

Product Status

Definition

Advance Information

Formative or In
Design

This datasheet contains the design specifications for


product development. Specifications may change in
any manner without notice.

Preliminary

First Production

This datasheet contains preliminary data, and


supplementary data will be published at a later date.
Fairchild Semiconductor reserves the right to make
changes at any time without notice in order to improve
design.

No Identification Needed

Full Production

This datasheet contains final specifications. Fairchild


Semiconductor reserves the right to make changes at
any time without notice in order to improve design.

Obsolete

Not In Production

This datasheet contains specifications on a product


that has been discontinued by Fairchild semiconductor.
The datasheet is printed for reference information only.
Rev. I19

LM78XX/LM78XXA Rev. 1.0.1

28

www.fairchildsemi.com

LM78XX/LM78XXA 3-Terminal 1A Positive Voltage Regulator

TRADEMARKS

Order this document


by P2N2222A/D

SEMICONDUCTOR TECHNICAL DATA

NPN Silicon
COLLECTOR
1
2
BASE
3
EMITTER

MAXIMUM RATINGS
Rating

Symbol

Value

Unit

Collector Emitter Voltage

VCEO

40

Vdc

Collector Base Voltage

VCBO

75

Vdc

Emitter Base Voltage

VEBO

6.0

Vdc

Collector Current Continuous

IC

600

mAdc

Total Device Dissipation @ TA = 25C


Derate above 25C

PD

625
5.0

mW
mW/C

Total Device Dissipation @ TC = 25C


Derate above 25C

PD

1.5
12

Watts
mW/C

TJ, Tstg

55 to +150

Symbol

Max

Unit

Operating and Storage Junction


Temperature Range

CASE 2904, STYLE 17


TO92 (TO226AA)

THERMAL CHARACTERISTICS
Characteristic
Thermal Resistance, Junction to Ambient

R JA

200

C/W

Thermal Resistance, Junction to Case

R JC

83.3

C/W

ELECTRICAL CHARACTERISTICS (TA = 25C unless otherwise noted)


Characteristic

Symbol

Min

Max

Unit

Collector Emitter Breakdown Voltage


(IC = 10 mAdc, IB = 0)

V(BR)CEO

40

Vdc

Collector Base Breakdown Voltage


(IC = 10 Adc, IE = 0)

V(BR)CBO

75

Vdc

Emitter Base Breakdown Voltage


(IE = 10 Adc, IC = 0)

V(BR)EBO

6.0

Vdc

Collector Cutoff Current


(VCE = 60 Vdc, VEB(off) = 3.0 Vdc)

ICEX

10

nAdc

Collector Cutoff Current


(VCB = 60 Vdc, IE = 0)
(VCB = 60 Vdc, IE = 0, TA = 150C)

ICBO

0.01
10

Emitter Cutoff Current


(VEB = 3.0 Vdc, IC = 0)

IEBO

10

nAdc

Collector Cutoff Current


(VCE = 10 V)

ICEO

10

nAdc

Base Cutoff Current


(VCE = 60 Vdc, VEB(off) = 3.0 Vdc)

IBEX

20

nAdc

OFF CHARACTERISTICS

Motorola SmallSignal Transistors, FETs and Diodes Device Data


Motorola, Inc. 1996

Adc

ELECTRICAL CHARACTERISTICS (TA = 25C unless otherwise noted) (Continued)


Characteristic

Symbol

Min

Max

Unit

35
50
75
35
100
50
40

300

0.3
1.0

0.6

1.2
2.0

fT

300

MHz

Output Capacitance
(VCB = 10 Vdc, IE = 0, f = 1.0 MHz)

Cobo

8.0

pF

Input Capacitance
(VEB = 0.5 Vdc, IC = 0, f = 1.0 MHz)

Cibo

25

pF

2.0
0.25

8.0
1.25

8.0
4.0

50
75

300
375

5.0
25

35
200

ON CHARACTERISTICS
DC Current Gain
(IC = 0.1 mAdc, VCE = 10 Vdc)
(IC = 1.0 mAdc, VCE = 10 Vdc)
(IC = 10 mAdc, VCE = 10 Vdc)
(IC = 10 mAdc, VCE = 10 Vdc, TA = 55C)
(IC = 150 mAdc, VCE = 10 Vdc)(1)
(IC = 150 mAdc, VCE = 1.0 Vdc)(1)
(IC = 500 mAdc, VCE = 10 Vdc)(1)

hFE

Collector Emitter Saturation


Voltage(1) (IC = 150 mAdc, IB = 15
mAdc)
(IC = 500 mAdc, IB = 50 mAdc)
Base Emitter Saturation
Voltage(1) (IC = 150 mAdc, IB = 15
mAdc)
(IC = 500 mAdc, IB = 50 mAdc)

VCE(sat)

VBE(sat)

Vdc

Vdc

SMALL SIGNAL CHARACTERISTICS


Current Gain Bandwidth Product(2)
(IC = 20 mAdc, VCE = 20 Vdc, f = 100 MHz)

Input Impedance
(IC = 1.0 mAdc, VCE = 10 Vdc, f = 1.0 kHz)
(IC = 10 mAdc, VCE = 10 Vdc, f = 1.0 kHz)

hie

Voltage Feedback Ratio


(IC = 1.0 mAdc, VCE = 10 Vdc, f = 1.0 kHz)
(IC = 10 mAdc, VCE = 10 Vdc, f = 1.0 kHz)

hre

SmallSignal Current Gain


(IC = 1.0 mAdc, VCE = 10 Vdc, f = 1.0 kHz)
(IC = 10 mAdc, VCE = 10 Vdc, f = 1.0 kHz)

hfe

Output Admittance
(IC = 1.0 mAdc, VCE = 10 Vdc, f = 1.0 kHz)
(IC = 10 mAdc, VCE = 10 Vdc, f = 1.0 kHz)

hoe

Collector Base Time Constant


(IE = 20 mAdc, VCB = 20 Vdc, f = 31.8 MHz)

rb Cc

150

ps

NF

4.0

dB

(VCC = 30 Vdc, VBE(off) = 2.0 Vdc,


IC = 150 mAdc, IB1 = 15 mAdc) (Figure 1)

td

10

ns

tr

25

ns

(VCC = 30 Vdc, IC = 150 mAdc,


IB1 = IB2 = 15 mAdc) (Figure 2)

ts

225

ns

tf

60

ns

Noise Figure
(IC = 100 Adc, VCE = 10 Vdc, RS = 1.0 k , f = 1.0 kHz)

X 10 4

mhos

SWITCHING CHARACTERISTICS
Delay Time
Rise Time
Storage Time
Fall Time

1. Pulse Test: Pulse Width


300 s, Duty Cycle
2.0%.
2. fT is defined as the frequency at which |hfe| extrapolates to unity.

Motorola SmallSignal Transistors, FETs and Diodes Device Data

SWITCHING TIME EQUIVALENT TEST CIRCUITS


+ 30 V

+ 30 V
1.0 to 100 s,
DUTY CYCLE 2.0%

+16 V
0
2V

200

1.0 to 100 s,
DUTY CYCLE 2.0%

+16 V
0

1k

< 2 ns

1k

14 V

CS* < 10 pF

< 20 ns

Figure 1. TurnOn Time

CS* < 10 pF

1N914

Scope rise time < 4 ns


*Total shunt capacitance of test jig,
connectors, and oscilloscope.

4V

Figure 2. TurnOff Time

1000
700
500
hFE, DC CURRENT GAIN

200

TJ = 125C

300
200
25C

100
70
50

55C

30

VCE = 1.0 V
VCE = 10 V

20
10
0.1

0.2

0.3

0.5 0.7

1.0

2.0

3.0

5.0 7.0 10
20
30
IC, COLLECTOR CURRENT (mA)

50

70

100

200

300

500 700 1.0 k

VCE , COLLECTOREMITTER VOLTAGE (VOLTS)

Figure 3. DC Current Gain

1.0
TJ = 25C
0.8
0.6

IC = 1.0 mA

10 mA

150 mA

500 mA

0.4

0.2
0
0.005

0.01

0.02 0.03

0.05

0.1

0.2

0.3
0.5
1.0
IB, BASE CURRENT (mA)

2.0

3.0

5.0

10

20

30

50

Figure 4. Collector Saturation Region

Motorola SmallSignal Transistors, FETs and Diodes Device Data

200

500
IC/IB = 10
TJ = 25C

100
70

t, TIME (ns)

30

t, TIME (ns)

tr @ VCC = 30 V
td @ VEB(off) = 2.0 V
td @ VEB(off) = 0

50
20
10
7.0
5.0

200

ts = ts 1/8 tf

100
70
50

tf

30
20
10
7.0
5.0

3.0
2.0
5.0 7.0

10

20 30
50 70 100
200 300
IC, COLLECTOR CURRENT (mA)

500

5.0 7.0 10

20

70

100

200

300

500

10
RS = OPTIMUM
SOURCE
RESISTANCE

IC = 1.0 mA, RS = 150


500 A, RS = 200
100 A, RS = 2.0 k
50 A, RS = 4.0 k

8.0
6.0

f = 1.0 kHz
8.0
NF, NOISE FIGURE (dB)

NF, NOISE FIGURE (dB)

50

Figure 6. Turn Off Time

10

4.0

2.0

IC = 50 A
100 A
500 A
1.0 mA

6.0

4.0

2.0

0
0.01 0.02 0.05 0.1 0.2

0.5 1.0 2.0

5.0 10

20

50

0
50

100

100 200

f, FREQUENCY (kHz)

Ceb
10
7.0
5.0
Ccb

0.2 0.3

0.5 0.7 1.0


2.0 3.0 5.0 7.0 10
REVERSE VOLTAGE (VOLTS)

Figure 9. Capacitances

20 30

50

f T, CURRENTGAIN BANDWIDTH PRODUCT (MHz)

20

0.1

5.0 k 10 k 20 k

50 k 100 k

Figure 8. Source Resistance Effects

30

3.0

500 1.0 k 2.0 k

RS, SOURCE RESISTANCE (OHMS)

Figure 7. Frequency Effects

CAPACITANCE (pF)

30

IC, COLLECTOR CURRENT (mA)

Figure 5. Turn On
Time

2.0

VCC = 30 V
IC/IB = 10
IB1 = IB2
TJ = 25C

300

500
VCE = 20 V
TJ = 25C

300
200

100
70
50

1.0

2.0

3.0
5.0 7.0 10
20 30
IC, COLLECTOR CURRENT (mA)

50

70 100

Figure 10. CurrentGain Bandwidth Product

Motorola SmallSignal Transistors, FETs and Diodes Device Data

1.0

+0.5
TJ = 25C
0
VBE(sat) @ IC/IB = 10

0.6

COEFFICIENT (mV/C)

V, VOLTAGE (VOLTS)

0.8
1.0 V

VBE(on) @ VCE = 10 V
0.4
0.2
0

R VC for VCE(sat)

0.5
1.0
1.5
R VB for VBE

2.0
VCE(sat) @ IC/IB = 10
0.1 0.2

0.5 1.0 2.0 5.0 10 20


50 100 200
IC, COLLECTOR CURRENT (mA)

500 1.0 k

Figure 11. On Voltages

Motorola SmallSignal Transistors, FETs and Diodes Device Data

2.5
0.1 0.2

0.5

1.0 2.0

5.0

10

20

50 100 200

500

IC, COLLECTOR CURRENT (mA)

Figure 12. Temperature Coefficients

PACKAGE DIMENSIONS

NOTES:
1. DIMENSIONING AND TOLERANCING PER ANSI
Y14.5M, 1982.
2. CONTROLLING DIMENSION: INCH.
3. CONTOUR OF PACKAGE BEYOND DIMENSION R
IS UNCONTROLLED.
4. DIMENSION F APPLIES BETWEEN P AND L.
DIMENSION D AND J APPLY BETWEEN L AND K
MINIMUM. LEAD DIMENSION IS UNCONTROLLED
IN P AND BEYOND DIMENSION K MINIMUM.

R
P
L

SEATING
PLANE

K
DIM
A
B
C
D
F
G
H
J
K
L
N
P
R
V

D
X X

H
V

SECTION XX

N
N

CASE 02904
(TO226AA)
ISSUE AD

INCHES
MIN
MAX
0.175
0.205
0.170
0.210
0.125
0.165
0.016
0.022
0.016
0.019
0.045
0.055
0.095
0.105
0.015
0.020
0.500

0.250

0.080
0.105

0.100
0.115

0.135

MILLIMETERS
MIN
MAX
4.45
5.20
4.32
5.33
3.18
4.19
0.41
0.55
0.41
0.48
1.15
1.39
2.42
2.66
0.39
0.50
12.70

6.35

2.04
2.66

2.54
2.93

3.43

STYLE 17:
PIN 1. COLLECTOR
2. BASE
3. EMITTER

Motorola reserves the right to make changes without further notice to any products herein. Motorola makes no warranty, representation or guarantee
regarding the suitability of its products for any particular purpose, nor does Motorola assume any liability arising out of the application or use of any product or
circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters which may be
provided in Motorola data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating
parameters, including Typicals must be validated for each customer application by customers technical experts. Motorola does not convey any license
under its patent rights nor the rights of others. Motorola products are not designed, intended, or authorized for use as components in systems intended for
surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the Motorola product
could create a situation where personal injury or death may occur. Should Buyer purchase or use Motorola products for any such unintended or unauthorized
application, Buyer shall indemnify and hold Motorola and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs,
damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such
unintended or unauthorized use, even if such claim alleges that Motorola was negligent regarding the design or manufacture of the part. Motorola andare
registered trademarks of Motorola, Inc. Motorola, Inc. is an Equal Opportunity/Affirmative Action Employer.
How to reach us:
USA / EUROPE / Locations Not Listed: Motorola Literature Distribution;
JAPAN: Nippon Motorola Ltd.; TatsumiSPDJLDC, 6F SeibuButsuryu
Center, P.O. Box 20912; Phoenix, Arizona 85036. 18004412447 or 6023035454
3142 Tatsumi KotoKu, Tokyo 135, Japan. 038135218315
MFAX: RMFAX0@email.sps.mot.com TOUCHTONE 6022446609
INTERNET: http://DesignNET.com

ASIA / PACIFIC: Motorola Semiconductors H.K. Ltd.; 8B Tai Ping Industrial Park,
51 Ting Kok Road, Tai Po, N.T., Hong Kong. 85226629298

P2N2222A/D

Motorola SmallSignal Transistors, FETs and Diodes Device Data

DISCRETE SEMICONDUCTORS

M3D125

BC107; BC108; BC109


NPN general purpose transistors
Product specification
Supersedes data of 1997 Jun 03
File under Discrete Semiconductors, SC04

1997 Sep 03

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109

FEATURES

PINNING

Low current (max. 100 mA)

PIN

Low voltage (max. 45 V).


APPLICATIONS

DESCRIPTION

emitter

base

collector, connected to the case

General purpose switching and amplification.


DESCRIPTION

3
2
2

PNP complement: BC177.


3

MAM264

Fig.1

Simplified outline (TO-18; SOT18)


and symbol.

QUICK REFERENCE DATA


SYMBOL
VCBO

VCEO

PARAMETER
collector-base voltage

CONDITIONS

UNIT

BC107

50

BC108; BC109

30

BC107

45

BC108; BC109

20

200

mA

300

mW

collector-emitter voltage

open base

peak collector current

Ptot

total power dissipation

Tamb

hFE

DC current gain

IC = 2 mA; VCE = 5 V

25 C

BC107

110

450

BC108

110

800

200

800

BC109
transition frequency

1997 Sep 03

MAX.

open emitter

ICM

fT

MIN.

IC = 10 mA; VCE = 5 V; f = 100 MHz

100

MHz

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109

LIMITING VALUES
In accordance with the Absolute Maximum Rating System (IEC 134).
SYMBOL
VCBO

VCEO

VEBO

PARAMETER
collector-base voltage

CONDITIONS

MIN.

MAX.

UNIT

open emitter

BC107

50

BC108; BC109

30

BC107

45

BC108; BC109

20

BC107

BC108; BC109

collector-emitter voltage

emitter-base voltage

open base

open collector

IC

collector current (DC)

100

mA

ICM

peak collector current

200

mA

IBM

peak base current

200

mA

Ptot

total power dissipation

300

mW

Tstg

storage temperature

+150

Tj

junction temperature

175

Tamb

operating ambient temperature

+150

Tamb

25 C
65
65

THERMAL CHARACTERISTICS
SYMBOL

PARAMETER

CONDITIONS

VALUE

UNIT

Rth j-a

thermal resistance from junction to ambient note 1

0.5

K/mW

Rth j-c

thermal resistance from junction to case

0.2

K/mW

Note
1. Transistor mounted on an FR4 printed-circuit board.

1997 Sep 03

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109

CHARACTERISTICS
Tj = 25 C unless otherwise specified.
SYMBOL

PARAMETER

CONDITIONS

MIN.

TYP.

MAX.

UNIT

IE = 0; VCB = 20 V

15

nA

ICBO

collector cut-off current

IE = 0; VCB = 20 V; Tj = 150 C

15

IEBO

emitter cut-off current

IC = 0; VEB = 5 V

50

nA

hFE

DC current gain

IC = 10 A; VCE = 5 V

BC107A; BC108A

hFE

VCEsat
VBEsat
VBE

90

BC107B; BC108B; BC109B

40

150

BC108C; BC109C

100

270

BC107A; BC108A

110

180

220

BC107B; BC108B; BC109B

200

290

450

BC108C; BC109C

420

520

800

90

250

mV

IC = 100 mA; IB = 5 mA

200

600

mV

IC = 10 mA; IB = 0.5 mA; note 1

700

mV

IC = 100 mA; IB = 5 mA; note 1

900

mV

DC current gain

IC = 2 mA; VCE = 5 V

collector-emitter saturation voltage IC = 10 mA; IB = 0.5 mA


base-emitter saturation voltage
base-emitter voltage

IC = 2 mA; VCE = 5 V; note 2

550

620

IC = 10 mA; VCE = 5 V; note 2

700

mV

770

mV

pF

Cc

collector capacitance

IE = ie = 0; VCB = 10 V; f = 1 MHz

2.5

Ce

emitter capacitance

IC = ic = 0; VEB = 0.5 V; f = 1 MHz

fT

transition frequency

IC = 10 mA; VCB = 5 V; f = 100 MHz 100

noise figure

IC = 200 A; VCE = 5 V; RS = 2 k ;
f = 30 Hz to 15.7 kHz

dB

IC = 200 A; VCE = 5 V; RS = 2 k ;
f = 1 kHz; B = 200 Hz

10

dB

dB

BC109B; BC109C
F

noise figure
BC107A; BC108A
BC107B; BC108B; BC108C
BC109B; BC109C

Notes
1. VBEsat decreases by about 1.7 mV/K with increasing temperature.
2. VBE decreases by about 2 mV/K with increasing temperature.

1997 Sep 03

pF
MHz

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109

PACKAGE OUTLINE
Metal-can cylindrical single-ended package; 3 leads

SOT18/13

seating plane

j
B

D1

2
3

a
A

10 mm

scale

DIMENSIONS (millimetre dimensions are derived from the original inch dimensions)
UNIT

D1

mm

5.31
4.74

2.54

0.47
0.41

5.45
5.30

4.70
4.55

1.03
0.94

1.1
0.9

15.0
12.7

0.40

REFERENCES

OUTLINE
VERSION

IEC

JEDEC

SOT18/13

B11/C7 type 3

TO-18

1997 Sep 03

EIAJ

45

EUROPEAN
PROJECTION

ISSUE DATE
97-04-18

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109

DEFINITIONS
Data Sheet Status
Objective specification

This data sheet contains target or goal specifications for product development.

Preliminary specification

This data sheet contains preliminary data; supplementary data may be published later.

Product specification

This data sheet contains final product specifications.

Limiting values
Limiting values given are in accordance with the Absolute Maximum Rating System (IEC 134). Stress above one or
more of the limiting values may cause permanent damage to the device. These are stress ratings only and operation
of the device at these or at any other conditions above those given in the Characteristics sections of the
specification is not implied. Exposure to limiting values for extended periods may affect device reliability.
Application information
Where application information is given, it is advisory and does not form part of the specification.
LIFE SUPPORT APPLICATIONS
These products are not designed for use in life support appliances, devices, or systems where malfunction of these
products can reasonably be expected to result in personal injury. Philips customers using or selling these products for
use in such applications do so at their own risk and agree to fully indemnify Philips for any damages resulting from
such improper use or sale.

1997 Sep 03

Philips Semiconductors

Product specification

NPN general purpose transistors

BC107; BC108; BC109


NOTES

1997 Sep 03

Philips Semiconductors a worldwide company


Argentina: see South America
Australia: 34 Waterloo Road, NORTH RYDE, NSW 2113,
Tel. +61 2 9805 4455, Fax. +61 2 9805 4466
Austria: Computerstr. 6, A-1101 WIEN, P.O. Box 213, Tel. +43 160 1010,
Fax. +43 160 101 1210
Belarus: Hotel Minsk Business Center, Bld. 3, r. 1211, Volodarski Str. 6,
220050 MINSK, Tel. +375 172 200 733, Fax. +375 172 200 773
Belgium: see The Netherlands
Brazil: see South America
Bulgaria: Philips Bulgaria Ltd., Energoproject, 15th floor,
51 James Bourchier Blvd., 1407 SOFIA,
Tel. +359 2 689 211, Fax. +359 2 689 102
Canada: PHILIPS SEMICONDUCTORS/COMPONENTS,
Tel. +1 800 234 7381
China/Hong Kong: 501 Hong Kong Industrial Technology Centre,
72 Tat Chee Avenue, Kowloon Tong, HONG KONG,
Tel. +852 2319 7888, Fax. +852 2319 7700

Netherlands: Postbus 90050, 5600 PB EINDHOVEN, Bldg. VB,


Tel. +31 40 27 82785, Fax. +31 40 27 88399
New Zealand: 2 Wagener Place, C.P.O. Box 1041, AUCKLAND,
Tel. +64 9 849 4160, Fax. +64 9 849 7811
Norway: Box 1, Manglerud 0612, OSLO,
Tel. +47 22 74 8000, Fax. +47 22 74 8341
Philippines: Philips Semiconductors Philippines Inc.,
106 Valero St. Salcedo Village, P.O. Box 2108 MCC, MAKATI,
Metro MANILA, Tel. +63 2 816 6380, Fax. +63 2 817 3474
Poland: Ul. Lukiska 10, PL 04-123 WARSZAWA,
Tel. +48 22 612 2831, Fax. +48 22 612 2327
Portugal: see Spain
Romania: see Italy
Russia: Philips Russia, Ul. Usatcheva 35A, 119048 MOSCOW,
Tel. +7 095 755 6918, Fax. +7 095 755 6919

Colombia: see South America

Singapore: Lorong 1, Toa Payoh, SINGAPORE 1231,


Tel. +65 350 2538, Fax. +65 251 6500
Slovakia: see Austria

Czech Republic: see Austria

Slovenia: see Italy

Denmark: Prags Boulevard 80, PB 1919, DK-2300 COPENHAGEN S,


Tel. +45 32 88 2636, Fax. +45 31 57 0044
Finland: Sinikalliontie 3, FIN-02630 ESPOO,
Tel. +358 9 615800, Fax. +358 9 61580920

South Africa: S.A. PHILIPS Pty Ltd., 195-215 Main Road Martindale,
2092 JOHANNESBURG, P.O. Box 7430 Johannesburg 2000,
Tel. +27 11 470 5911, Fax. +27 11 470 5494
South America: Rua do Rocio 220, 5th floor, Suite 51,
04552-903 So Paulo, SO PAULO - SP, Brazil,
Tel. +55 11 821 2333, Fax. +55 11 829 1849
Spain: Balmes 22, 08007 BARCELONA,
Tel. +34 3 301 6312, Fax. +34 3 301 4107

France: 4 Rue du Port-aux-Vins, BP317, 92156 SURESNES Cedex,


Tel. +33 1 40 99 6161, Fax. +33 1 40 99 6427
Germany: Hammerbrookstrae 69, D-20097 HAMBURG,
Tel. +49 40 23 53 60, Fax. +49 40 23 536 300
Greece: No. 15, 25th March Street, GR 17778 TAVROS/ATHENS,
Tel. +30 1 4894 339/239, Fax. +30 1 4814 240
Hungary: see Austria
India: Philips INDIA Ltd, Band Box Building, 2nd floor,
254-D, Dr. Annie Besant Road, Worli, MUMBAI 400 025,
Tel. +91 22 493 8541, Fax. +91 22 493 0966
Indonesia: see Singapore
Ireland: Newstead, Clonskeagh, DUBLIN 14,
Tel. +353 1 7640 000, Fax. +353 1 7640 200
Israel: RAPAC Electronics, 7 Kehilat Saloniki St, PO Box 18053,
TEL AVIV 61180, Tel. +972 3 645 0444, Fax. +972 3 649 1007
Italy: PHILIPS SEMICONDUCTORS, Piazza IV Novembre 3,
20124 MILANO, Tel. +39 2 6752 2531, Fax. +39 2 6752 2557
Japan: Philips Bldg 13-37, Kohnan 2-chome, Minato-ku, TOKYO 108,
Tel. +81 3 3740 5130, Fax. +81 3 3740 5077
Korea: Philips House, 260-199 Itaewon-dong, Yongsan-ku, SEOUL,
Tel. +82 2 709 1412, Fax. +82 2 709 1415
Malaysia: No. 76 Jalan Universiti, 46200 PETALING JAYA, SELANGOR,
Tel. +60 3 750 5214, Fax. +60 3 757 4880
Mexico: 5900 Gateway East, Suite 200, EL PASO, TEXAS 79905,
Tel. +9-5 800 234 7381
Middle East: see Italy

Sweden: Kottbygatan 7, Akalla, S-16485 STOCKHOLM,


Tel. +46 8 632 2000, Fax. +46 8 632 2745
Switzerland: Allmendstrasse 140, CH-8027 ZRICH,
Tel. +41 1 488 2686, Fax. +41 1 481 7730
Taiwan: Philips Semiconductors, 6F, No. 96, Chien Kuo N. Rd., Sec. 1,
TAIPEI, Taiwan Tel. +886 2 2134 2865, Fax. +886 2 2134 2874
Thailand: PHILIPS ELECTRONICS (THAILAND) Ltd.,
209/2 Sanpavuth-Bangna Road Prakanong, BANGKOK 10260,
Tel. +66 2 745 4090, Fax. +66 2 398 0793
Turkey: Talatpasa Cad. No. 5, 80640 GLTEPE/ISTANBUL,
Tel. +90 212 279 2770, Fax. +90 212 282 6707
Ukraine: PHILIPS UKRAINE, 4 Patrice Lumumba str., Building B, Floor 7,
252042 KIEV, Tel. +380 44 264 2776, Fax. +380 44 268 0461
United Kingdom: Philips Semiconductors Ltd., 276 Bath Road, Hayes,
MIDDLESEX UB3 5BX, Tel. +44 181 730 5000, Fax. +44 181 754 8421
United States: 811 East Arques Avenue, SUNNYVALE, CA 94088-3409,
Tel. +1 800 234 7381
Uruguay: see South America
Vietnam: see Singapore
Yugoslavia: PHILIPS, Trg N. Pasica 5/v, 11000 BEOGRAD,
Tel. +381 11 625 344, Fax.+381 11 635 777

For all other countries apply to: Philips Semiconductors, Marketing & Sales Communications,
Building BE-p, P.O. Box 218, 5600 MD EINDHOVEN, The Netherlands, Fax. +31 40 27 24825

Internet: http://www.semiconductors.philips.com

Philips Electronics N.V. 1997

SCA55

All rights are reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner.
The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed
without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license
under patent- or other industrial or intellectual property rights.

Printed in The Netherlands

117047/00/04/pp8

Date of release: 1997 Sep 03

Document order number:

9397 750 02817

DISCRETE SEMICONDUCTORS

M3D186

BC546; BC547
NPN general purpose transistors
Product specification
Supersedes data of 1997 Mar 04

1999 Apr 15

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

FEATURES

PINNING

Low current (max. 100 mA)

PIN

Low voltage (max. 65 V).


APPLICATIONS

DESCRIPTION

emitter

base

collector

General purpose switching and amplification.


DESCRIPTION
NPN transistor in a TO-92; SOT54 plastic package.
PNP complements: BC556 and BC557.

Fig.1

Simplified outline (TO-92; SOT54)


and symbol.

LIMITING VALUES
In accordance with the Absolute Maximum Rating System (IEC 134).
SYMBOL
VCBO

VCEO

VEBO

PARAMETER
collector-base voltage

CONDITIONS

MIN.

MAX.

UNIT

open emitter

BC546

80

BC547

50

BC546

65

BC547

45

BC546

BC547

collector-emitter voltage

emitter-base voltage

open base

open collector

IC

collector current (DC)

100

mA

ICM

peak collector current

200

mA

IBM

peak base current

200

mA

Ptot

total power dissipation

500

mW

Tstg

storage temperature

+150

Tj

junction temperature

150

Tamb

operating ambient temperature

+150

Tamb

65
65

Note
1. Transistor mounted on an FR4 printed-circuit board.

1999 Apr 15

25 C; note 1

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

THERMAL CHARACTERISTICS
SYMBOL
Rth j-a

PARAMETER

CONDITIONS

thermal resistance from junction to ambient

note 1

VALUE

UNIT

0.25

K/mW

Note
1. Transistor mounted on an FR4 printed-circuit board.
CHARACTERISTICS
Tj = 25 C unless otherwise specified.
SYMBOL
ICBO

PARAMETER
collector cut-off current

CONDITIONS

TYP.

15

nA

100

IC = 0; VEB = 5 V

hFE

DC current gain

IC = 10 A; VCE = 5 V;
see Figs 2, 3 and 4

150

BC547C

270
IC = 2 mA; VCE = 5 V;
see Figs 2, 3 and 4

nA

90

BC546B; BC547B

BC546A

UNIT

IE = 0; VCB = 30 V; Tj = 150 C
emitter cut-off current

DC current gain

MAX.

IE = 0; VCB = 30 V

IEBO

BC546A

MIN.

110

180

220

BC546B; BC547B

200

290

450

BC547C

420

520

800

BC547

110

800

BC546

110

450

collector-emitter saturation
voltage

IC = 10 mA; IB = 0.5 mA

90

250

mV

IC = 100 mA; IB = 5 mA

200

600

mV

VBEsat

base-emitter saturation voltage

IC = 10 mA; IB = 0.5 mA; note 1

700

VBE

base-emitter voltage

VCEsat

IC = 100 mA; IB = 5 mA; note 1


IC = 2 mA; VCE = 5 V; note 2

mV

900
580

660

IC = 10 mA; VCE = 5 V

mV
700

mV

770

mV

Cc

collector capacitance

IE = ie = 0; VCB = 10 V; f = 1 MHz

1.5

pF

Ce

emitter capacitance

IC = ic = 0; VEB = 0.5 V; f = 1 MHz

11

pF

fT

transition frequency

IC = 10mA; VCE = 5 V; f = 100 MHz 100

noise figure

IC = 200 A; VCE = 5 V;
RS = 2 k ; f = 1 kHz; B = 200 Hz

Notes
1. VBEsat decreases by about 1.7 mV/K with increasing temperature.
2. VBE decreases by about 2 mV/K with increasing temperature.

1999 Apr 15

MHz
2

10

dB

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

MBH723

250
hFE
200
VCE = 5 V

150

100

50

0
10

10

102

10

IC (mA)

103

BC546A.

Fig.2 DC current gain; typical values.

MBH724

300

hFE

VCE = 5 V

200

100

0
10 2

10 1

10

BC546B; BC547B.

Fig.3 DC current gain; typical values.

1999 Apr 15

102

IC (mA)

103

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

MBH725

600
VCE = 5 V

hFE

400

200

0
10

10

10

BC547C.

Fig.4 DC current gain; typical values.

1999 Apr 15

102

IC (mA)

103

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

PACKAGE OUTLINE
Plastic single-ended leaded (through hole) package; 3 leads

SOT54

E
d

L
b

1
e1

3
b1

L1

2.5

5 mm

scale

DIMENSIONS (mm are the original dimensions)


UNIT

b1

e1

L1(1)

mm

5.2
5.0

0.48
0.40

0.66
0.56

0.45
0.40

4.8
4.4

1.7
1.4

4.2
3.6

2.54

1.27

14.5
12.7

2.5

Note
1. Terminal dimensions within this zone are uncontrolled to allow for flow of plastic and terminal irregularities.
OUTLINE
VERSION
SOT54

1999 Apr 15

REFERENCES
IEC

JEDEC

EIAJ

TO-92

SC-43

EUROPEAN
PROJECTION

ISSUE DATE
97-02-28

Philips Semiconductors

Product specification

NPN general purpose transistors

BC546; BC547

DEFINITIONS
Data Sheet Status
Objective specification

This data sheet contains target or goal specifications for product development.

Preliminary specification

This data sheet contains preliminary data; supplementary data may be published later.

Product specification

This data sheet contains final product specifications.

Limiting values
Limiting values given are in accordance with the Absolute Maximum Rating System (IEC 134). Stress above one or
more of the limiting values may cause permanent damage to the device. These are stress ratings only and operation
of the device at these or at any other conditions above those given in the Characteristics sections of the
specification is not implied. Exposure to limiting values for extended periods may affect device reliability.
Application information
Where application information is given, it is advisory and does not form part of the specification.
LIFE SUPPORT APPLICATIONS
These products are not designed for use in life support appliances, devices, or systems where malfunction of these
products can reasonably be expected to result in personal injury. Philips customers using or selling these products for
use in such applications do so at their own risk and agree to fully indemnify Philips for any damages resulting from
such improper use or sale.

1999 Apr 15

Philips Semiconductors a worldwide company


Argentina: see South America

Netherlands: Postbus 90050, 5600 PB EINDHOVEN, Bldg. VB,


Tel. +31 40 27 82785, Fax. +31 40 27 88399

Australia: 34 Waterloo Road, NORTH RYDE, NSW 2113,


Tel. +61 2 9805 4455, Fax. +61 2 9805 4466
Austria: Computerstr. 6, A-1101 WIEN, P.O. Box 213,
Tel. +43 1 60 101 1248, Fax. +43 1 60 101 1210

New Zealand: 2 Wagener Place, C.P.O. Box 1041, AUCKLAND,


Tel. +64 9 849 4160, Fax. +64 9 849 7811
Norway: Box 1, Manglerud 0612, OSLO,
Tel. +47 22 74 8000, Fax. +47 22 74 8341

Belarus: Hotel Minsk Business Center, Bld. 3, r. 1211, Volodarski Str. 6,


220050 MINSK, Tel. +375 172 20 0733, Fax. +375 172 20 0773

Pakistan: see Singapore

Belgium: see The Netherlands

Philippines: Philips Semiconductors Philippines Inc.,


106 Valero St. Salcedo Village, P.O. Box 2108 MCC, MAKATI,
Metro MANILA, Tel. +63 2 816 6380, Fax. +63 2 817 3474

Brazil: see South America


Bulgaria: Philips Bulgaria Ltd., Energoproject, 15th floor,
51 James Bourchier Blvd., 1407 SOFIA,
Tel. +359 2 68 9211, Fax. +359 2 68 9102
Canada: PHILIPS SEMICONDUCTORS/COMPONENTS,
Tel. +1 800 234 7381, Fax. +1 800 943 0087

Poland: Ul. Lukiska 10, PL 04-123 WARSZAWA,


Tel. +48 22 612 2831, Fax. +48 22 612 2327
Portugal: see Spain
Romania: see Italy

China/Hong Kong: 501 Hong Kong Industrial Technology Centre,


72 Tat Chee Avenue, Kowloon Tong, HONG KONG,
Tel. +852 2319 7888, Fax. +852 2319 7700

Russia: Philips Russia, Ul. Usatcheva 35A, 119048 MOSCOW,


Tel. +7 095 755 6918, Fax. +7 095 755 6919
Singapore: Lorong 1, Toa Payoh, SINGAPORE 319762,
Tel. +65 350 2538, Fax. +65 251 6500
Slovakia: see Austria

Colombia: see South America


Czech Republic: see Austria
Denmark: Sydhavnsgade 23, 1780 COPENHAGEN V,
Tel. +45 33 29 3333, Fax. +45 33 29 3905
Finland: Sinikalliontie 3, FIN-02630 ESPOO,
Tel. +358 9 615 800, Fax. +358 9 6158 0920

Slovenia: see Italy


South Africa: S.A. PHILIPS Pty Ltd., 195-215 Main Road Martindale,
2092 JOHANNESBURG, P.O. Box 7430 Johannesburg 2000,
Tel. +27 11 470 5911, Fax. +27 11 470 5494
South America: Al. Vicente Pinzon, 173, 6th floor,
04547-130 SO PAULO, SP, Brazil,
Tel. +55 11 821 2333, Fax. +55 11 821 2382

France: 51 Rue Carnot, BP317, 92156 SURESNES Cedex,


Tel. +33 1 4099 6161, Fax. +33 1 4099 6427
Germany: Hammerbrookstrae 69, D-20097 HAMBURG,
Tel. +49 40 2353 60, Fax. +49 40 2353 6300

Spain: Balmes 22, 08007 BARCELONA,


Tel. +34 93 301 6312, Fax. +34 93 301 4107

Hungary: see Austria

Sweden: Kottbygatan 7, Akalla, S-16485 STOCKHOLM,


Tel. +46 8 5985 2000, Fax. +46 8 5985 2745
Switzerland: Allmendstrasse 140, CH-8027 ZRICH,
Tel. +41 1 488 2741 Fax. +41 1 488 3263

India: Philips INDIA Ltd, Band Box Building, 2nd floor,


254-D, Dr. Annie Besant Road, Worli, MUMBAI 400 025,
Tel. +91 22 493 8541, Fax. +91 22 493 0966
Indonesia: PT Philips Development Corporation, Semiconductors Division,
Gedung Philips, Jl. Buncit Raya Kav.99-100, JAKARTA 12510,
Tel. +62 21 794 0040 ext. 2501, Fax. +62 21 794 0080

Taiwan: Philips Semiconductors, 6F, No. 96, Chien Kuo N. Rd., Sec. 1,
TAIPEI, Taiwan Tel. +886 2 2134 2886, Fax. +886 2 2134 2874
Thailand: PHILIPS ELECTRONICS (THAILAND) Ltd.,
209/2 Sanpavuth-Bangna Road Prakanong, BANGKOK 10260,
Tel. +66 2 745 4090, Fax. +66 2 398 0793
Turkey: Talatpasa Cad. No. 5, 80640 GLTEPE/ISTANBUL,
Tel. +90 212 279 2770, Fax. +90 212 282 6707

Ireland: Newstead, Clonskeagh, DUBLIN 14,


Tel. +353 1 7640 000, Fax. +353 1 7640 200
Israel: RAPAC Electronics, 7 Kehilat Saloniki St, PO Box 18053,
TEL AVIV 61180, Tel. +972 3 645 0444, Fax. +972 3 649 1007
Italy: PHILIPS SEMICONDUCTORS, Piazza IV Novembre 3,
20124 MILANO, Tel. +39 2 6752 2531, Fax. +39 2 6752 2557

Ukraine: PHILIPS UKRAINE, 4 Patrice Lumumba str., Building B, Floor 7,


252042 KIEV, Tel. +380 44 264 2776, Fax. +380 44 268 0461

Japan: Philips Bldg 13-37, Kohnan 2-chome, Minato-ku,


TOKYO 108-8507, Tel. +81 3 3740 5130, Fax. +81 3 3740 5077

United Kingdom: Philips Semiconductors Ltd., 276 Bath Road, Hayes,


MIDDLESEX UB3 5BX, Tel. +44 181 730 5000, Fax. +44 181 754 8421

Korea: Philips House, 260-199 Itaewon-dong, Yongsan-ku, SEOUL,


Tel. +82 2 709 1412, Fax. +82 2 709 1415
Malaysia: No. 76 Jalan Universiti, 46200 PETALING JAYA, SELANGOR,
Tel. +60 3 750 5214, Fax. +60 3 757 4880

United States: 811 East Arques Avenue, SUNNYVALE, CA 94088-3409,


Tel. +1 800 234 7381, Fax. +1 800 943 0087
Uruguay: see South America

Mexico: 5900 Gateway East, Suite 200, EL PASO, TEXAS 79905,


Tel. +9-5 800 234 7381, Fax +9-5 800 943 0087
Middle East: see Italy

Vietnam: see Singapore


Yugoslavia: PHILIPS, Trg N. Pasica 5/v, 11000 BEOGRAD,
Tel. +381 11 62 5344, Fax.+381 11 63 5777

For all other countries apply to: Philips Semiconductors,


International Marketing & Sales Communications, Building BE-p, P.O. Box 218,
5600 MD EINDHOVEN, The Netherlands, Fax. +31 40 27 24825

Internet: http://www.semiconductors.philips.com

Philips Electronics N.V. 1999

SCA63

All rights are reserved. Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner.
The information presented in this document does not form part of any quotation or contract, is believed to be accurate and reliable and may be changed
without notice. No liability will be accepted by the publisher for any consequence of its use. Publication thereof does not convey nor imply any license
under patent- or other industrial or intellectual property rights.

Printed in The Netherlands

115002/00/03/pp8

Date of release: 1999 Apr 15

Document order number:

9397 750 05677

HD44780U (LCD-II)
(Dot Matrix Liquid Crystal Display Controller/Driver)

ADE-207-272(Z)
'99.9
Rev. 0.0
Description
The HD44780U dot-matrix liquid crystal display controller and driver LSI displays alphanumerics,
Japanese kana characters, and symbols. It can be configured to drive a dot-matrix liquid crystal display
under the control of a 4- or 8-bit microprocessor. Since all the functions such as display RAM, character
generator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internally
provided on one chip, a minimal system can be interfaced with this controller/driver.
A single HD44780U can display up to one 8-character line or two 8-character lines.
The HD44780U has pin function compatibility with the HD44780S which allows the user to easily replace
an LCD-II with an HD44780U. The HD44780U character generator ROM is extended to generate 208 5

8 dot character fonts and 32 5 10 dot character fonts for a total of 240 different character
fonts.
The low power supply (2.7V to 5.5V) of the HD44780U is suitable for any portable battery-driven product
requiring low power dissipation.

Features
5 8 and 5 10 dot matrix
possible
Low power operation support:
2.7 to 5.5V
Wide range of liquid crystal display driver power
3.0 to 11V
Liquid crystal drive waveform
A (One line frequency AC waveform)
Correspond to high speed MPU bus interface
2 MHz (when VCC = 5V)
4-bit or 8-bit MPU interface enabled

80 8-bit display RAM (80 characters


max.)
9,920-bit character generator ROM for a total of 240 character fonts
208 character fonts (5 8 dot)
32 character fonts (5 10 dot)

HD44780U
64 8-bit character generator RAM
8 character fonts (5 8 dot)
4 character fonts (5 10 dot)
16-common 40-segment liquid crystal display driver
Programmable duty cycles
1/8 for one line of 5 8 dots with cursor
1/11 for one line of 5 10 dots with cursor
1/16 for two lines of 5 8 dots with cursor
Wide range of instruction functions:
Display clear, cursor home, display on/off, cursor on/off, display character blink, cursor shift,
display shift
Pin function compatibility with HD44780S
Automatic reset circuit that initializes the controller/driver after power on
Internal oscillator with external resistors
Low power consumption

Ordering Information
Type No.

Package

CGROM

HD44780UA00FS
HCD44780UA00
HD44780UA00TF
HD44780UA02FS
HCD44780UA02
HD44780UA02TF

FP-80B
Chip
TFP-80F

Japanese standard font

FP-80B
Chip
TFP-80F

European standard font

HD44780UBxxFS
HCD44780UBxx
HD44780UBxxTF

FP-80B
Chip
TFP-80F

Custom font

Note: xx: ROM code No.

HD44780U
HD44780U Block Diagram
OSC1 OSC2

Reset
circuit
ACL

Timing
generator

CPG

RS
R/W
E

Instruction
register (IR)

Address
counter

DB0 to
DB3

40-bit
shift
register

DB4 to
DB7

Display
data RAM
(DDRAM)
80 8 bits

Instruction
decoder

MPU
interface

Input/
output
buffer

CL1
CL2

16-bit
shift
register

Common
signal
driver

40-bit
latch
circuit

Segment
signal
driver

SEG1 to
SEG40

Data
register
(DR)

8
40
8

LCD drive
voltage
selector

Busy
flag

GND

COM1 to
COM16

Character
generator
ROM
(CGROM)
9,920 bits

Character
generator
RAM
(CGRAM)
64 bytes
5

Cursor
and
blink
controller

Parallel/serial converter
and
attribute circuit
VCC
V1

V2

V3

V4

V5

HD44780U

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
SEG35
SEG36
SEG37
SEG38

HD44780U Pin Arrangement (FP-80B)

SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14

64

63

62

61

60

59

58

57

56

SEG13
SEG12
SEG11
SEG10
SEG9
SEG8
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1
GND
OSC1

10

55

11

54

12

FP-80B
(Top view)

13

53
52

40

39

38

OSC2
V1
V2
V3
V4
V5
CL1
CL2
VCC
M
D
RS
R/W
E
DB0
DB1

37

41
36

42

24
35

43

23

34

44

22

33

45

21

32

46

20

31

47

19

30

48

18

29

49

17

28

16

27

50

26

51

15

25

14

SEG39
SEG40
COM16
COM15
COM14
COM13
COM12
COM11
COM10
COM9
COM8
COM7
COM6
COM5
COM4
COM3
COM2
COM1
DB7
DB6
DB5
DB4
DB3
DB2

HD44780U

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

60

59

58

57

56

55

54

53

52

TFP-80F
(Top view)

10
11

51
50

40

39

38

37

36

COM16
COM15
COM14
COM13
COM12
COM11
COM10
COM9
COM8
COM7
COM6
COM5
COM4
COM3
COM2
COM1
DB7
DB6
DB5
DB4

DB0
DB1
DB2
DB3

35

33

34

RS
R/W

32

31

30

41

29

42

20

28

43

19

27

44

18

26

45

17

25

46

16

24

47

15

23

48

14

22

49

13

21

12

GND
OSC1
OSC2
V1
V2
V3
V4
V5
CL1
CL2
VCC

SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
SEG10
SEG9
SEG8
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1

79

80

SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
SEG35
SEG36
SEG37
SEG38
SEG39
SEG40

HD44780U Pin Arrangement (TFP-80F)

HD44780U
HD44780U Pad Arrangement
Chip size:

4.90

4.90 mm2

Coordinate: Pad center (m)


Origin:
Chip center
Pad size:
2

114

80

114 m2
63

Type code

HD44780U

23

42
X

HD44780U
HCD44780U Pad Location Coordinates
Pad No.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

Function
SEG22
SEG21
SEG20
SEG19
SEG18
SEG17
SEG16
SEG15
SEG14
SEG13
SEG12
SEG11
SEG10
SEG9
SEG8
SEG7
SEG6
SEG5
SEG4
SEG3
SEG2
SEG1
GND
OSC1
OSC2
V1
V2
V3
V4
V5
CL1
CL2
VCC
M
D
RS
R/W
E
DB0
DB1

Coordinate
X (um)
Y (um)
2100
2313
2280
2313
2313
2089
2313
1833
2313
1617
2313
1401
2313
1186
2313
970
2313
755
2313
539
2313
323
2313
108
2313
108
2313
323
2313
539
2313
755
2313
970
2313
1186
2313
1401
2313
1617
2313
1833
2313
2073
2280
2290
2080
2290
1749
2290
1550
2290
1268
2290
941
2290
623
2290
304
2290
48
2290
142
2290
309
2290
475
2290
665
2290
832
2290
1022
2290
1204
2290
1454
2290
1684
2290

Pad No.
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

Function
DB2
DB3
DB4
DB5
DB6
DB7
COM1
COM2
COM3
COM4
COM5
COM6
COM7
COM8
COM9
COM10
COM11
COM12
COM13
COM14
COM15
COM16
SEG40
SEG39
SEG38
SEG37
SEG36
SEG35
SEG34
SEG33
SEG32
SEG31
SEG30
SEG29
SEG28
SEG27
SEG26
SEG25
SEG24
SEG23

Coordinate
X (um)
Y (um)
2070
2290
2260
2290
2290
2099
2290
1883
2290
1667
2290
1452
2313
1186
2313
970
2313
755
2313
539
2313
323
2313
108
2313
108
2313
323
2313
539
2313
755
2313
970
2313
1186
2313
1401
2313
1617
2313
1833
2313
2095
2296
2313
2100
2313
1617
2313
1401
2313
1186
2313
970
2313
755
2313
539
2313
323
2313
108
2313
108
2313
323
2313
539
2313
755
2313
970
2313
1186
2313
1401
2313
1617
2313

HD44780U
Pin Functions
Signal

No. of
Lines

I/O

Device
Interfaced with

RS

MPU

Selects registers.
0: Instruction register (for write) Busy flag:
address counter (for read)
1: Data register (for write and read)

R/W

MPU

Selects read or write.


0: Write
1: Read

MPU

Starts data read/write.

DB4 to DB7

I/O

MPU

Four high order bidirectional tristate data bus


pins. Used for data transfer and receive between
the MPU and the HD44780U. DB7 can be used
as a busy flag.

DB0 to DB3

I/O

MPU

Four low order bidirectional tristate data bus pins.


Used for data transfer and receive between the
MPU and the HD44780U.
These pins are not used during 4-bit operation.

CL1

Extension driver

Clock to latch serial data D sent to the extension


driver

CL2

Extension driver

Clock to shift serial data D

Extension driver

Switch signal for converting the liquid crystal


drive waveform to AC

Extension driver

Character pattern data corresponding to each


segment signal

COM1 to COM16 16

LCD

Common signals that are not used are changed


to non-selection waveforms. COM9 to COM16
are non-selection waveforms at 1/8 duty factor
and COM12 to COM16 are non-selection
waveforms at 1/11 duty factor.

SEG1 to SEG40 40

LCD

Segment signals

V1 to V5

Power supply

Power supply for LCD drive


VCC V5 = 11 V (max)

VCC, GND

Power supply

VCC: 2.7V to 5.5V, GND: 0V

OSC1, OSC2

Oscillation
resistor clock

When crystal oscillation is performed, a resistor


must be connected externally. When the pin input
is an external clock, it must be input to OSC1.

Function

HD44780U
Function Description
Registers
The HD44780U has two 8-bit registers, an instruction register (IR) and a data register (DR).
The IR stores instruction codes, such as display clear and cursor shift, and address information for display
data RAM (DDRAM) and character generator RAM (CGRAM). The IR can only be written from the MPU.
The DR temporarily stores data to be written into DDRAM or CGRAM and temporarily stores data to be
read from DDRAM or CGRAM. Data written into the DR from the MPU is automatically written into
DDRAM or CGRAM by an internal operation. The DR is also used for data storage when reading data
from DDRAM or CGRAM. When address information is written into the IR, data is read and then stored
into the DR from DDRAM or CGRAM by an internal operation. Data transfer between the MPU is then
completed when the MPU reads the DR. After the read, data in DDRAM or CGRAM at the next address is
sent to the DR for the next read from the MPU. By the register selector (RS) signal, these two registers can
be selected (Table 1).
Busy Flag (BF)
When the busy flag is 1, the HD44780U is in the internal operation mode, and the next instruction will not
be accepted. When RS = 0 and R/ W = 1 (Table 1), the busy flag is output to DB7. The next instruction
must be written after ensuring that the busy flag is 0.
Address Counter (AC)
The address counter (AC) assigns addresses to both DDRAM and CGRAM. When an address of an
instruction is written into the IR, the address information is sent from the IR to the AC. Selection of either
DDRAM or CGRAM is also determined concurrently by the instruction.
After writing into (reading from) DDRAM or CGRAM, the AC is automatically incremented by 1
(decremented by 1). The AC contents are then output to DB0 to DB6 when RS = 0 and R/W = 1 (Table 1).
Table 1

Register Selection

RS

R/W

Operation

IR write as an internal operation (display clear, etc.)

Read busy flag (DB7) and address counter (DB0 to DB6)

DR write as an internal operation (DR to DDRAM or CGRAM)

DR read as an internal operation (DDRAM or CGRAM to DR)

HD44780U
Display Data RAM (DDRAM)
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended
capacity is 80 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used
for display can be used as general data RAM. See Figure 1 for the relationships between DDRAM
addresses and positions on the liquid crystal display.
The DDRAM address (ADD ) is set in the address counter (AC) as hexadecimal.
1-line display (N = 0) (Figure 2)
When there are fewer than 80 display characters, the display begins at the head position. For
example, if using only the HD44780, 8 characters are displayed. See Figure 3.
When the display shift operation is performed, the DDRAM address shifts. See Figure 3.
High order
bits

Low order
bits

Example: DDRAM address 4E

AC
(hexadecimal) AC6 AC5 AC4 AC3 AC2 AC1 AC0

Figure 1 DDRAM Address


Display position
(digit)

DDRAM
00
address
(hexadecimal)

01

02

79

..................

03 04

Figure 2 1-Line Display


Display
position

DDRAM
address

00 01 02 03 04 05 06 07

For
shift left

01 02 03 04 05 06 07 08

For
shift right 4F 00 01 02 03 04 05 06

Figure 3 1-Line by 8-Character Display Example

10

80

4E 4F

HD44780U
2-line display (N = 1) (Figure 4)
Case 1: When the number of display characters is less than 40 2 lines, the two lines are
displayed from the head. Note that the first line end address and the second line start address are not
consecutive. For example, when just the HD44780 is used, 8 characters 2 lines are displayed.
See Figure 5.
When display shift operation is performed, the DDRAM address shifts. See Figure 5.
Display
position

00
DDRAM
address
(hexadecimal) 40

39

40

01

02

03 04

..................

26 27

41

42

43 44

..................

66 67

Figure 4 2-Line Display


Display
position

DDRAM
address

00 01 02 03 04 05 06 07

For
shift left

01 02 03 04 05 06 07 08

40 41 42 43 44 45 46 47

41 42 43 44 45 46 47 48

27 00 01 02 03 04 05 06
For
shift right
67 40 41 42 43 44 45 46

Figure 5 2-Line by 8-Character Display Example

11

HD44780U
Case 2: For a 16-character 2-line display, the HD44780 can be extended using one 40output extension driver. See Figure 6.
When display shift operation is performed, the DDRAM address shifts. See Figure 6.
Display
position
DDRAM
address

9 10 11 12 13 14 15 16

00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F

HD44780U display

For
shift left

Extension driver
display

01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10
41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50

27 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E
For
shift right
67 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E

Figure 6 2-Line by 16-Character Display Example

12

HD44780U
Character Generator ROM (CGROM)
The character generator ROM generates 5 8 dot or 5 10 dot character patterns from 8-bit
character codes (Table 4). It can generate 208 5 8 dot character patterns and 32 5 10 dot character
patterns. User- defined character patterns are also available by mask-programmed ROM.
Character Generator RAM (CGRAM)
In the character generator RAM, the user can rewrite character patterns by program. For 5 8 dots,
eight character patterns can be written, and for 5 10 dots, four character patterns can be written.
Write into DDRAM the character codes at the addresses shown as the left column of Table 4 to show the
character patterns stored in CGRAM.
See Table 5 for the relationship between CGRAM addresses and data and display patterns.
Areas that are not used for display can be used as general data RAM.
Modifying Character Patterns
Character pattern development procedure
The following operations correspond to the numbers listed in Figure 7:
1. Determine the correspondence between character codes and character patterns.
2. Create a listing indicating the correspondence between EPROM addresses and data.
3. Program the character patterns into the EPROM.
4. Send the EPROM to Hitachi.
5. Computer processing on the EPROM is performed at Hitachi to create a character pattern listing, which
is sent to the user.
6. If there are no problems within the character pattern listing, a trial LSI is created at Hitachi and samples
are sent to the user for evaluation. When it is confirmed by the user that the character patterns are
correctly written, mass production of the LSI proceeds at Hitachi.

13

HD44780U
Hitachi

User
Start

Computer
processing
Create character
pattern listing

Evaluate
character
patterns
No

Determine
character patterns

Create EPROM
address data listing

Write EPROM

EPROM

OK?

Hitachi

Yes
Art work

M/T

Masking

Trial

Sample

Sample
evaluation
OK?

6
No

Yes
Mass
production
Note: For a description of the numbers used in this figure, refer to the preceding page.

Figure 7 Character Pattern Development Procedure

14

HD44780U
Programming character patterns
This section explains the correspondence between addresses and data used to program character patterns
in EPROM. The HD44780U character generator ROM can generate 208 5 8 dot character patterns
and
32 5 10 dot character patterns for a total of 240 different character patterns.
Character patterns
EPROM address data and character pattern data correspond with each other to form a 5 8 or 5
10 dot character pattern (Tables 2 and 3).
Table 2

Example of Correspondence between EPROM Address Data and Character Pattern


(5 8 Dots)
EPROM Address

Data
LSB
O 4 O3 O2 O1 O0

A 1 1A 1 0 A 9 A 8 A 7 A 6 A 5 A 4 A 3 A 2 A 1
A0

Character code
Notes: 1.
2.
3.
4.
5.
6.

Cursor position

Line
position

EPROM addresses A11 to A4 correspond to a character code.


EPROM addresses A3 to A0 specify a line position of the character pattern.
EPROM data O4 to O0 correspond to character pattern data.
EPROM data O5 to O7 must be specified as 0.
A lit display position (black) corresponds to a 1.
Line 9 and the following lines must be blanked with 0s for a 5 8 dot character fonts.

15

HD44780U
Handling unused character patterns
1. EPROM data outside the character pattern area: Always input 0s.
2. EPROM data in CGRAM area: Always input 0s. (Input 0s to EPROM addresses 00H to FFH.)
3. EPROM data used when the user does not use any HD44780U character pattern: According to the user
application, handled in one of the two ways listed as follows.
a. When unused character patterns are not programmed: If an unused character code is written into
DDRAM, all its dots are lit. By not programing a character pattern, all of its bits become lit. (This is
due to the EPROM being filled with 1s after it is erased.)
b. When unused character patterns are programmed as 0s: Nothing is displayed even if unused
character codes are written into DDRAM. (This is equivalent to a space.)
Table 3

Example of Correspondence between EPROM Address Data and Character Pattern


(5 10 Dots)
EPROM Address

Data

LSB
A 1 1A 1 0 A9 A 8 A7 A 6 A5 A 4 A3 A 2 A1 A 0 O 4 O3 O2 O1 O0

Character code

Notes: 1.
2.
3.
4.
5.
6.

16

Cursor position

Line
position

EPROM addresses A11 to A3 correspond to a character code.


EPROM addresses A3 to A0 specify a line position of the character pattern.
EPROM data O4 to O0 correspond to character pattern data.
EPROM data O5 to O7 must be specified as 0.
A lit display position (black) corresponds to a 1.
Line 11 and the following lines must be blanked with 0s for a 5 10 dot character fonts.

HD44780U
Table 4
Lower
4 Bits

Upper 4
Bits

Correspondence between Character Codes and Character Patterns (ROM Code: A00)
0000 0001 0010

xxxx0000

CG
RAM
(1)

xxxx0001

(2)

xxxx0010

(3)

xxxx0011

(4)

xxxx0100

(5)

xxxx0101

(6)

xxxx0110

(7)

xxxx0111

(8)

xxxx1000

(1)

xxxx1001

(2)

xxxx1010

(3)

0011 0100 0101

0110

0111 1000

1001 1010

1011 1100 1101

1110 1111

xxxx1011
xxxx1100
xxxx1101
xxxx1110
xxxx1111

(4)
(5)
(6)
(7)
(8)

Note: The user can specify any pattern for character-generator RAM.

17

HD44780U
Table 4
Lower
4 Bits

Upper 4
Bits

Correspondence between Character Codes and Character Patterns (ROM Code: A02)
0000 0001 0010

xxxx0000

CG
RAM
(1)

xxxx0001

(2)

xxxx0010

(3)

xxxx0011

(4)

xxxx0100

(5)

xxxx0101

(6)

xxxx0110

(7)

xxxx0111

(8)

xxxx1000

(1)

xxxx1001

(2)

xxxx1010

(3)

xxxx1011
xxxx1100
xxxx1101
xxxx1110
xxxx1111

(4)
(5)
(6)
(7)
(8)

18

0011 0100 0101

0110

0111 1000 1001 1010

1011 1100 1101

1110 1111

HD44780U
Table 5

For 5

Relationship between CGRAM Addresses, Character Codes (DDRAM) and Character


Patterns (CGRAM Data)
8 dot character patterns
Character Codes
(DDRAM data)

CGRAM Address

Character Patterns
(CGRAM data)

7 6 5 4 3 2 1 0

5 4 3 2 1 0

7 6 5 4 3 2 1 0

High

High

High

Low

0 0 0 0 * 0 0 0

0 0 0 0 * 0 0 1

0 0 0 0 * 1 1 1

0 0 0

0 0 1

1 1 1

Low
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0

0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0

0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

1
1
1
1

0
0
1
1

0
1
0
1

* * *

* * *
* * *

* * *
* * *

Low
1
1
1
1
1
1
1
0
1
0
1
0
1
0
0
0

1
0
0
1
0
0
0
0
0
1
1
0
1
0
0
0

1
0
0
1
1
0
0
0
0
0
1
1
1
1
1
0

1
0
0
1
0
1
0
0
0
1
1
0
1
0
0
0

0
1
1
0
0
0
1
0
1
0
1
0
1
0
0
0

Character
pattern (1)

Cursor position

Character
pattern (2)

Cursor position

* * *

Notes: 1. Character code bits 0 to 2 correspond to CGRAM address bits 3 to 5 (3 bits: 8 types).
2. CGRAM address bits 0 to 2 designate the character pattern line position. The 8th line is the
cursor position and its display is formed by a logical OR with the cursor.
Maintain the 8th line data, corresponding to the cursor display position, at 0 as the cursor display.
If the 8th line data is 1, 1 bits will light up the 8th line regardless of the cursor presence.
3. Character pattern row positions correspond to CGRAM data bits 0 to 4 (bit 4 being at the left).
4. As shown Table 5, CGRAM character patterns are selected when character code bits 4 to 7 are
all 0. However, since character code bit 3 has no effect, the R display example above can be
selected by either character code 00H or 08H.
5. 1 for CGRAM data corresponds to display selection and 0 to non-selection.
* Indicates no effect.

19

HD44780U
Table 5

For 5

Relationship between CGRAM Addresses, Character Codes (DDRAM) and Character


Patterns (CGRAM Data) (cont)
10 dot character patterns
Character Codes
(DDRAM data)

CGRAM Address

Character Patterns
(CGRAM data)

7 6 5 4 3 2 1 0

5 4 3 2 1 0

7 6 5 4 3 2 1 0

High

High

High

Low

0 0 0 0 * 0 0 *

0 0 0 0 * 1 1 *

0 0

1 1

Low
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
0
0

0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
0
0

0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0

0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1

1
1
1
1
1
1
1

0
0
0
1
1
1
1

0
1
1
0
0
1
1

1
0
1
0
1
0
1

* * *

* * *
* * *

* * *
* * *

Low
0
0
1
1
1
1
1
1
1
1
0
*

0
0
0
1
0
0
1
0
0
0
0
*

0
0
1
0
0
0
1
0
0
0
0
*

0
0
1
0
0
0
1
0
0
0
0
*

0
0
0
1
1
1
0
0
0
0
0
*

Character
pattern

Cursor position

* * * * *

* * *
* * *

* * * * *

* * *

* * * * *

Notes: 1. Character code bits 1 and 2 correspond to CGRAM address bits 4 and 5 (2 bits: 4 types).
2. CGRAM address bits 0 to 3 designate the character pattern line position. The 11th line is the
cursor position and its display is formed by a logical OR with the cursor.
Maintain the 11th line data corresponding to the cursor display positon at 0 as the cursor display.
If the 11th line data is 1, 1 bits will light up the 11th line regardless of the cursor presence.
Since lines 12 to 16 are not used for display, they can be used for general data RAM.
3. Character pattern row positions are the same as 5 8 dot character pattern positions.
4. CGRAM character patterns are selected when character code bits 4 to 7 are all 0.
However, since character code bits 0 and 3 have no effect, the P display example above can be
selected by character codes 00H, 01H, 08H, and 09H.
5. 1 for CGRAM data corresponds to display selection and 0 to non-selection.
* Indicates no effect.

20

HD44780U
Timing Generation Circuit
The timing generation circuit generates timing signals for the operation of internal circuits such as
DDRAM, CGROM and CGRAM. RAM read timing for display and internal operation timing by MPU
access are generated separately to avoid interfering with each other. Therefore, when writing data to
DDRAM, for example, there will be no undesirable interferences, such as flickering, in areas other than the
display area.
Liquid Crystal Display Driver Circuit
The liquid crystal display driver circuit consists of 16 common signal drivers and 40 segment signal
drivers. When the character font and number of lines are selected by a program, the required common
signal drivers automatically output drive waveforms, while the other common signal drivers continue to
output non-selection waveforms.
Sending serial data always starts at the display data character pattern corresponding to the last address of
the display data RAM (DDRAM).
Since serial data is latched when the display data character pattern corresponding to the starting address
enters the internal shift register, the HD44780U drives from the head display.
Cursor/Blink Control Circuit
The cursor/blink control circuit generates the cursor or character blinking. The cursor or the blinking will
appear with the digit located at the display data RAM (DDRAM) address set in the address counter (AC).
For example (Figure 8), when the address counter is 08H, the cursor position is displayed at DDRAM
address 08H.
AC6 AC5 AC4 AC3 AC2 AC1 AC0
AC

Display position

10

11

DDRAM address
(hexadecimal)

00

01

02

03

04

05

06

07

08

09

0A

Display position

10

11

DDRAM address
(hexadecimal)

00

01

02

03

04

05

06

07

08

09

0A

40

41

42

43

44

45

46

47

48

49

4A

For a 1-line display

For a 2-line display

cursor position

cursor position
Note: The cursor or blinking appears when the address counter (AC) selects the
character generator RAM (CGRAM). However, the cursor and blinking become
meaningless.
The cursor or blinking is displayed in the meaningless position when the AC is a CGRAM address.

Figure 8 Cursor/Blink Display Example

21

HD44780U
Interfacing to the MPU
The HD44780U can send data in either two 4-bit operations or one 8-bit operation, thus allowing
interfacing with 4- or 8-bit MPUs.
For 4-bit interface data, only four bus lines (DB4 to DB7) are used for transfer. Bus lines DB0 to DB3
are disabled. The data transfer between the HD44780U and the MPU is completed after the 4-bit data
has been transferred twice. As for the order of data transfer, the four high order bits (for 8-bit operation,
DB4 to DB7) are transferred before the four low order bits (for 8-bit operation, DB0 to DB3).
The busy flag must be checked (one instruction) after the 4-bit data has been transferred twice. Two
more 4-bit operations then transfer the busy flag and address counter data.
For 8-bit interface data, all eight bus lines (DB0 to DB7) are used.

RS
R/W
E

DB7

IR7

IR3

BF

AC3

DR7

DR3

DB6

IR6

IR2

AC6

AC2

DR6

DR2

DB5

IR5

IR1

AC1

DR5

DR1

DB4

IR4

IR0

AC0

DR4

DR0

Instruction register (IR)


write

AC5
AC4

Busy flag (BF) and


address counter (AC)
read

Figure 9 4-Bit Transfer Example

22

Data register (DR)


read

HD44780U
Reset Function
Initializing by Internal Reset Circuit
An internal reset circuit automatically initializes the HD44780U when the power is turned on. The
following instructions are executed during the initialization. The busy flag (BF) is kept in the busy state
until the initialization ends (BF = 1). The busy state lasts for 10 ms after VCC rises to 4.5 V.
1. Display clear
2. Function set:
DL = 1; 8-bit interface data
N = 0; 1-line display
F = 0; 5 8 dot character font
3. Display on/off control:
D = 0; Display off
C = 0; Cursor off
B = 0; Blinking off
4. Entry mode set:
I/D = 1; Increment by 1
S = 0; No shift
Note:

If the electrical characteristics conditions listed under the table Power Supply Conditions Using
Internal Reset Circuit are not met, the internal reset circuit will not operate normally and will fail to
initialize the HD44780U. For such a case, initial-ization must be performed by the MPU as
explained in the section, Initializing by Instruction.

Instructions
Outline
Only the instruction register (IR) and the data register (DR) of the HD44780U can be controlled by the
MPU. Before starting the internal operation of the HD44780U, control information is temporarily stored
into these registers to allow interfacing with various MPUs, which operate at different speeds, or various
peripheral control devices. The internal operation of the HD44780U is determined by signals sent from the
MPU. These signals, which include register selection signal (RS), read/
write signal (R/W), and the data bus (DB0 to DB7), make up the HD44780U instructions (Table 6). There
are four categories of instructions that:
Designate HD44780U functions, such as display format, data length, etc.
Set internal RAM addresses
Perform data transfer with internal RAM
Perform miscellaneous functions

23

HD44780U
Normally, instructions that perform data transfer with internal RAM are used the most. However, autoincrementation by 1 (or auto-decrementation by 1) of internal HD44780U RAM addresses after each data
write can lighten the program load of the MPU. Since the display shift instruction (Table 11) can perform
concurrently with display data write, the user can minimize system development time with maximum
programming efficiency.
When an instruction is being executed for internal operation, no instruction other than the busy flag/address
read instruction can be executed.
Because the busy flag is set to 1 while an instruction is being executed, check it to make sure it is 0 before
sending another instruction from the MPU.
Note:

Be sure the HD44780U is not in the busy state (BF = 0) before sending an instruction from the
MPU to the HD44780U. If an instruction is sent without checking the busy flag, the time between
the first instruction and next instruction will take much longer than the instruction time itself. Refer
to Table 6 for the list of each instruc-tion execution time.

Table 6

Instructions
Code

Execution Time
(max) (when f cp or
f OSC is 270 kHz)

Instruction RS

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description

Clear
display

Clears entire display and


sets DDRAM address 0 in
address counter.

Return
home

Sets DDRAM address 0 in


address counter. Also
returns display from being
shifted to original position.
DDRAM contents remain
unchanged.

1.52 ms

Entry
mode set

I/D

Sets cursor move direction


and specifies display shift.
These operations are
performed during data write
and read.

37 s

Display
on/off
control

Sets entire display (D) on/off, 37 s


cursor on/off (C), and
blinking of cursor position
character (B).

Cursor or
display
shift

S/C R/L

Moves cursor and shifts


display without changing
DDRAM contents.

Function
set

DL

Sets interface data length


37 s
(DL), number of display lines
(N), and character font (F).

Set
CGRAM
address

ACG ACG ACG ACG ACG ACG Sets CGRAM address.


CGRAM data is sent and
received after this setting.

37 s

Set
DDRAM
address

ADD ADD ADD ADD ADD ADD ADD Sets DDRAM address.
DDRAM data is sent and
received after this setting.

37 s

Read busy 0
flag &
address

BF

AC

0 s

24

AC

AC

AC

AC

AC

AC

Reads busy flag (BF)


indicating internal operation
is being performed and
reads address counter
contents.

37 s

HD44780U
Table 6

Instructions (cont)
Execution Time
(max) (when f cp or
f OSC is 270 kHz)

Code
Instruction RS

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description

Write data
to CG or
DDRAM

Write data

Writes data into DDRAM or


CGRAM.

37 s
tADD = 4 s*

Read data 1
from CG or
DDRAM

Read data

Reads data from DDRAM or


CGRAM.

37 s
tADD = 4 s*

= 1:
= 0:
= 1:
= 1:
= 0:
= 1:
= 0:
= 1:
= 1:
= 1:

Increment
Decrement
Accompanies display shift
Display shift
Cursor move
Shift to the right
Shift to the left
8 bits, DL = 0: 4 bits
2 lines, N = 0: 1 line
5 10 dots, F = 0: 5 8

DDRAM: Display data RAM


CGRAM: Character generator
RAM
ACG:
CGRAM address
ADD:
DDRAM address
(corresponds to cursor
address)
AC: Address counter used for
both DD and CGRAM
addresses

Execution time
changes when
frequency changes
Example:
When fcp or fOSC is
250 kHz,
37 s 270 = 40 s
250

= 1:
= 0:

Internally operating
Instructions acceptable

I/D
I/D
S
S/C
S/C
R/L
R/L
DL
N
F
dots
BF
BF

Note:

indicates no effect.
* After execution of the CGRAM/DDRAM data write or read instruction, the RAM address counter
is incremented or decremented by 1. The RAM address counter is updated after the busy flag
turns off. In Figure 10, tADD is the time elapsed after the busy flag turns off until the address
counter is updated.

Busy signal
(DB7 pin)

Address counter
(DB0 to DB6 pins)

Busy state

A+1
t ADD

Note: t ADD depends on the operation frequency


t ADD = 1.5/(f cp or f OSC ) seconds

Figure 10 Address Counter Update

25

HD44780U
Instruction Description
Clear Display
Clear display writes space code 20H (character pattern for character code 20H must be a blank pattern) into
all DDRAM addresses. It then sets DDRAM address 0 into the address counter, and returns the display to
its original status if it was shifted. In other words, the display disappears and the cursor or blinking goes to
the left edge of the display (in the first line if 2 lines are displayed). It also sets I/D to 1 (increment mode)
in entry mode. S of entry mode does not change.
Return Home
Return home sets DDRAM address 0 into the address counter, and returns the display to its original status
if it was shifted. The DDRAM contents do not change.
The cursor or blinking go to the left edge of the display (in the first line if 2 lines are displayed).
Entry Mode Set
I/D: Increments (I/D = 1) or decrements (I/D = 0) the DDRAM address by 1 when a character code is
written into or read from DDRAM.
The cursor or blinking moves to the right when incremented by 1 and to the left when decremented by 1.
The same applies to writing and reading of CGRAM.
S: Shifts the entire display either to the right (I/D = 0) or to the left (I/D = 1) when S is 1. The display does
not shift if S is 0.
If S is 1, it will seem as if the cursor does not move but the display does. The display does not shift when
reading from DDRAM. Also, writing into or reading out from CGRAM does not shift the display.
Display On/Off Control
D: The display is on when D is 1 and off when D is 0. When off, the display data remains in DDRAM, but
can be displayed instantly by setting D to 1.
C: The cursor is displayed when C is 1 and not displayed when C is 0. Even if the cursor disappears, the
function of I/D or other specifications will not change during display data write. The cursor is displayed
using 5 dots in the 8th line for 5 8 dot character font selection and in the 11th line for the 5 10
dot character font selection (Figure 13).
B: The character indicated by the cursor blinks when B is 1 (Figure 13). The blinking is displayed as
switching between all blank dots and displayed characters at a speed of 409.6-ms intervals when fcp or f OSC
is 250 kHz. The cursor and blinking can be set to display simultaneously. (The blinking frequency changes
according to f OSC or the reciprocal of fcp. For example, when fcp is 270 kHz, 409.6 250/270 = 379.2 ms.)

26

HD44780U
Cursor or Display Shift
Cursor or display shift shifts the cursor position or display to the right or left without writing or reading
display data (Table 7). This function is used to correct or search the display. In a 2-line display, the cursor
moves to the second line when it passes the 40th digit of the first line. Note that the first and second line
displays will shift at the same time.
When the displayed data is shifted repeatedly each line moves only horizontally. The second line display
does not shift into the first line position.
The address counter (AC) contents will not change if the only action performed is a display shift.
Function Set
DL: Sets the interface data length. Data is sent or received in 8-bit lengths (DB7 to DB0) when DL is 1,
and in 4-bit lengths (DB7 to DB4) when DL is 0.When 4-bit length is selected, data must be sent or
received twice.
N: Sets the number of display lines.
F: Sets the character font.
Note:

Perform the function at the head of the program before executing any instructions (except for the
read busy flag and address instruction). From this point, the function set instruction cannot be
executed unless the interface data length is changed.

Set CGRAM Address


Set CGRAM address sets the CGRAM address binary AAAAAA into the address counter.
Data is then written to or read from the MPU for CGRAM.

27

HD44780U
RS
Clear
display

Code

0
RS

Return
home

Code

RS
Entry
mode set

Code

0
RS

Display
on/off control

Code

RS
Cursor or
display shift

Code

0
RS

Function set

Code

RS
Set CGRAM
address

Code

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

Note: * Dont care.

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

I/D

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

S/C

R/L

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

DL

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

Higher
order bit

Figure 11 Instruction (1)

28

Lower
order bit

Note: * Dont care.

HD44780U
Set DDRAM Address
Set DDRAM address sets the DDRAM address binary AAAAAAA into the address counter.
Data is then written to or read from the MPU for DDRAM.
However, when N is 0 (1-line display), AAAAAAA can be 00H to 4FH. When N is 1 (2-line display),
AAAAAAA can be 00H to 27H for the first line, and 40H to 67H for the second line.
Read Busy Flag and Address
Read busy flag and address reads the busy flag (BF) indicating that the system is now internally operating
on a previously received instruction. If BF is 1, the internal operation is in progress. The next instruction
will not be accepted until BF is reset to 0. Check the BF status before the next write operation. At the same
time, the value of the address counter in binary AAAAAAA is read out. This address counter is used by
both CG and DDRAM addresses, and its value is determined by the previous instruction. The address
contents are the same as for instructions set CGRAM address and set DDRAM address.
Table 7

Shift Function

S/C

R/L

Shifts the cursor position to the left. (AC is decremented by one.)

Shifts the cursor position to the right. (AC is incremented by one.)

Shifts the entire display to the left. The cursor follows the display shift.

Shifts the entire display to the right. The cursor follows the display shift.

Table 8

Function Set

No. of
Display
Lines

5 8 dots

1/8

5 10 dots

1/11

5 8 dots

1/16

Note:

Character Font

Duty
Factor

Remarks

Cannot display two lines for 5 10 dot character font

Indicates dont care.

29

HD44780U

Cursor
5 8 dot
character font

5 10 dot
character font

Alternating display

Cursor display example

Blink display example

Figure 12 Cursor and Blinking


RS
Set DDRAM
address

Code

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

Higher
order bit

RS
Read busy flag
and address

Code

Lower
order bit

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


1

BF

Higher
order bit

Figure 13 Instruction (2)

30

Lower
order bit

HD44780U
Write Data to CG or DDRAM
Write data to CG or DDRAM writes 8-bit binary data DDDDDDDD to CG or DDRAM.
To write into CG or DDRAM is determined by the previous specification of the CGRAM or DDRAM
address setting. After a write, the address is automatically incremented or decremented by 1 according to
the entry mode. The entry mode also determines the display shift.
Read Data from CG or DDRAM
Read data from CG or DDRAM reads 8-bit binary data DDDDDDDD from CG or DDRAM.
The previous designation determines whether CG or DDRAM is to be read. Before entering this read
instruction, either CGRAM or DDRAM address set instruction must be executed. If not executed, the first
read data will be invalid. When serially executing read instructions, the next address data is normally read
from the second read. The address set instructions need not be executed just before this read instruction
when shifting the cursor by the cursor shift instruction (when reading out DDRAM). The operation of the
cursor shift instruction is the same as the set DDRAM address instruction.
After a read, the entry mode automatically increases or decreases the address by 1. However, display shift
is not executed regardless of the entry mode.
Note:

The address counter (AC) is automatically incremented or decremented by 1 after the write
instructions to CGRAM or DDRAM are executed. The RAM data selected by the AC cannot be
read out at this time even if read instructions are executed. Therefore, to correctly read data,
execute either the address set instruction or cursor shift instruction (only with DDRAM), then just
before reading the desired data, execute the read instruction from the second time the read
instruction is sent.
RS
Write data to
CG or DDRAM

Code

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


0

Higher
order bits
RS
Read data from
CG or DDRAM

Code

Lower
order bits

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0


1

Higher
order bits

Lower
order bits

Figure 14 Instruction (3)

31

HD44780U
Interfacing the HD44780U
Interface to MPUs
Interfacing to an 8-bit MPU
See Figure 16 for an example of using a I/O port (for a single-chip microcomputer) as an interface
device.
In this example, P30 to P37 are connected to the data bus DB0 to DB7, and P75 to P77 are connected to
E, R/W, and RS, respectively.
RS
R/W
E
Internal
operation

Functioning

DB7

Data

Busy

Busy

Instruction
write

Busy flag
check

Busy flag
check

Not
busy

Data

Busy flag
check

Instruction
write

Figure 15 Example of Busy Flag Check Timing Sequence


H8/325

HD44780U

P30 to P37

P77
P76
P75

DB0 to DB7

E
RS
R/W

COM1 to
COM16

LCD
SEG1 to
SEG40

Figure 16 H8/325 Interface (Single-Chip Mode)

32

16

40

HD44780U
Interfacing to a 4-bit MPU
The HD44780U can be connected to the I/O port of a 4-bit MPU. If the I/O port has enough bits, 8-bit
data can be transferred. Otherwise, one data transfer must be made in two operations for 4-bit data. In
this case, the timing sequence becomes somewhat complex. (See Figure 17.)
See Figure 18 for an interface example to the HMCS4019R.
Note that two cycles are needed for the busy flag check as well as for the data transfer. The 4-bit
operation is selected by the program.
RS
R/W
E
Internal
operation
DB7

Functioning

IR7

IR3

Instruction
write

Busy AC3

Not
busy AC3

Busy flag
check

Busy flag
check

D7

D3

Instruction
write

Note: IR7 , IR3 are the 7th and 3rd bits of the instruction.
AC3 is the 3rd bit of the address counter.

Figure 17 Example of 4-Bit Data Transfer Timing Sequence


HMCS4019R

HD44780

D15

RS

D14

R/W

D13

R10 to R13

4
DB4 to DB7

COM1 to
COM16

16

LCD
SEG1 to
SEG40

40

Figure 18 Example of Interface to HMCS4019R

33

HD44780U
Interface to Liquid Crystal Display
Character Font and Number of Lines: The HD44780U can perform two types of displays, 5 8 dot
and
5 10 dot character fonts, each with a cursor.
Up to two lines are displayed for 5 8 dots and one line for 5 10 dots. Therefore, a total of
three types of common signals are available (Table 9).
The number of lines and font types can be selected by the program. (See Table 6, Instructions.)
Connection to HD44780 and Liquid Crystal Display: See Figure 19 for the connection examples.
Table 9

Common Signals

Number of Lines

Character Font

Number of Common Signals

Duty Factor

5 8 dots + cursor

1/8

5 10 dots + cursor

11

1/11

5 8 dots + cursor

16

1/16

HD44780
COM1

COM8
SEG1

SEG40
Example of a 5

8 dot, 8-character

1-line display (1/4 bias, 1/8 duty cycle)

HD44780
COM1

COM11
SEG1

SEG40
Example of a 5

10 dot, 8-character

1-line display (1/4 bias, 1/11 duty cycle)

Figure 19 Liquid Crystal Display and HD44780 Connections

34

HD44780U
Since five segment signal lines can display one digit, one HD44780U can display up to 8 digits for a 1-line
display and 16 digits for a 2-line display.
The examples in Figure 19 have unused common signal pins, which always output non-selection
waveforms. When the liquid crystal display panel has unused extra scanning lines, connect the extra
scanning lines to these common signal pins to avoid any undesirable effects due to crosstalk during the
floating state.
HD44780
COM1

COM8
COM9

COM16

SEG1

SEG40
Example of a 5

8 dot, 8-character

2-line display (1/5 bias, 1/16 duty cycle)

Figure 19 Liquid Crystal Display and HD44780 Connections (cont)

35

HD44780U
Connection of Changed Matrix Layout: In the preceding examples, the number of lines correspond to the
scanning lines. However, the following display examples (Figure 20) are made possible by altering the
matrix layout of the liquid crystal display panel. In either case, the only change is the layout. The display
characteristics and the number of liquid crystal display characters depend on the number of common
signals or on duty factor. Note that the display data RAM (DDRAM) addresses for 4 characters 2
lines and for 16 characters 1 line are the same as in Figure 19.
HD44780
COM1

COM8
SEG1
SEG40
COM9

COM16
5 8 dot, 16-character 1-line display
(1/5 bias, 1/16 duty cycle)

Figure 20 Changed Matrix Layout Displays

36

HD44780U
Power Supply for Liquid Crystal Display Drive
Various voltage levels must be applied to pins V1 to V5 of the HD44780U to obtain the liquid crystal
display drive waveforms. The voltages must be changed according to the duty factor (Table 10).
VLCD is the peak value for the liquid crystal display drive waveforms, and resistance dividing provides
voltages V1 to V5 (Figure 21).
Table 10

Duty Factor and Power Supply for Liquid Crystal Display Drive
Duty Factor
1/8, 1/11

1/16
Bias

Power Supply

1/4

1/5

V1

VCC1/4 VLCD

VCC1/5 VLCD

V2

VCC1/2 VLCD

VCC2/5 VLCD

V3

VCC1/2 VLCD

VCC3/5 VLCD

V4

VCC3/4 VLCD

VCC4/5 VLCD

V5

VCCVLCD

VCCVLCD

VCC (+5 V)

VCC (+5 V)

VCC
V1

VCC
R

V2

V3

V4

V5

V1
VLCD

V2
V3
V4
V5

VR

R
R

VLCD

R
R
VR

5 V
1/4 bias
(1/8, 1/11 duty cycle)

5 V
1/5 bias
(1/16, duty cycle)

Figure 21 Drive Voltage Supply Example

37

HD44780U
Relationship between Oscillation Frequency and Liquid Crystal Display Frame
Frequency
The liquid crystal display frame frequencies of Figure 22 apply only when the oscillation frequency is 270
kHz (one clock pulse of 3.7 s).
1/8 duty cycle
COM1
VCC

400 clocks
1

11

V1
V2 (V3)
V4
V5
1 frame
1 frame = 3.7 s

400

Frame frequency =

8 = 11850 s = 11.9 ms

1
= 84.3 Hz
11.9 ms

1/11 duty cycle


COM1
VCC

400 clocks
1

V1
V2 (V3)
V4
V5
1 frame
1 frame = 3.7 s

400

Frame frequency =

11 = 16300 s = 16.3 ms

1
= 61.4 Hz
16.3 ms

1/16 duty cycle


COM1
VCC

200 clocks
1

16

V1
V2
V3
V4
V5
1 frame
1 frame = 3.7 s

200

Frame frequency =

16 = 11850 s = 11.9 ms

1
= 84.3 Hz
11.9 ms

Figure 22 Frame Frequency

38

HD44780U
Instruction and Display Correspondence
8-bit operation, 8-digit 1-line display with internal reset
Refer to Table 11 for an example of an 8-digit 1-line display in 8-bit operation. The HD44780U
functions must be set by the function set instruction prior to the display. Since the display data RAM
can store data for 80 characters, as explained before, the RAM can be used for displays such as for
advertising when combined with the display shift operation.
Since the display shift operation changes only the display position with DDRAM contents unchanged,
the first display data entered into DDRAM can be output when the return home operation is performed.
4-bit operation, 8-digit 1-line display with internal reset
The program must set all functions prior to the 4-bit operation (Table 12). When the power is turned on,
8-bit operation is automatically selected and the first write is performed as an 8-bit operation. Since
DB0 to DB3 are not connected, a rewrite is then required. However, since one operation is completed in
two accesses for 4-bit operation, a rewrite is needed to set the functions (see Table 12). Thus, DB4 to
DB7 of the function set instruction is written twice.
8-bit operation, 8-digit 2-line display
For a 2-line display, the cursor automatically moves from the first to the second line after the 40th digit
of the first line has been written. Thus, if there are only 8 characters in the first line, the DDRAM
address must be again set after the 8th character is completed. (See Table 13.) Note that the display shift
operation is performed for the first and second lines. In the example of Table 13, the display shift is
performed when the cursor is on the second line. However, if the shift operation is performed when the
cursor is on the first line, both the first and second lines move together. If the shift is repeated, the
display of the second line will not move to the first line. The same display will only shift within its own
line for the number of times the shift is repeated.
Note:

When using the internal reset, the electrical characteristics in the Power Supply Conditions Using
Internal Reset Circuit table must be satisfied. If not, the HD44780U must be initialized by
instructions. See the section, Initializing by Instruction.

39

HD44780U
Table 11

8-Bit Operation, 8-Digit 1-Line Display Example with Internal Reset


Instruction

Step
No.

RS

Power supply on (the HD44780U is initialized by the internal


reset circuit)

Initialized. No display.

Function set
0
0
0

Sets to 8-bit operation and


selects 1-line display and 5
8 dot character font. (Number
of display lines and character
fonts cannot be changed after
step #2.)

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display

Display on/off control


0
0
0
0

Entry mode set


0
0
0

Write data to CGRAM/DDRAM


1
0
0
1
0
0

Write data to CGRAM/DDRAM


1
0
0
1
0
0

8
9
10

40

Write data to CGRAM/DDRAM


1
0
0
1
0
0

Entry mode set


0
0
0

Write data to CGRAM/DDRAM


1
0
0
0
1
0

Turns on display and cursor.


Entire display is in space mode
because of initialization.

Sets mode to increment the


address by one and to shift the
cursor to the right at the time of
write to the DD/CGRAM.
Display is not shifted.

Writes H. DDRAM has already


been selected by initialization
when the power was turned on.
The cursor is incremented by
one and shifted to the right.

H_

Writes I.

HI_

Operation

HITACHI_

HITACHI_
ITACHI _

Writes I.

Sets mode to shift display at


the time of write.
Writes a space.

HD44780U
Table 11

8-Bit Operation, 8-Digit 1-Line Display Example with Internal Reset (cont)
Instruction

Step
No.

RS

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display

11

Write data to CGRAM/DDRAM


1
0
0
1
0
0

12

13
14
15

16
17
18
19

TACHI M_

Cursor or display shift


0
0
0
0

MICROKO_

Cursor or display shift


0
0
0
0

MICROK_
O

Write data to CGRAM/DDRAM


1
0
0
1
0
0

Cursor or display shift


0
0
0
0

Cursor or display shift


0
0
0
0

Write data to CGRAM/DDRAM


1
0
0
1
0
0

MICROKO_

Writes O.

Shifts only the cursor position


to the left.
Shifts only the cursor position
to the left.

ICROCO_

Writes C over K.
The display moves to the left.

MICROCO_

Shifts the display and cursor


position to the right.

MICROCO_

Shifts the display and cursor


position to the right.

ICROCOM_

Writes M.

Return home
0
0
0

Writes M.

Write data to CGRAM/DDRAM


1
0
0
1
0
0

20

21

Operation

H_
ITACHI

Returns both display and


cursor to the original position
(address 0).

41

HD44780U
Table 12

4-Bit Operation, 8-Digit 1-Line Display Example with Internal Reset


Instruction

Step
No.

RS

Power supply on (the HD44780U is initialized by the internal


reset circuit)

Initialized. No display.

Function set
0
0
0

Sets to 4-bit operation.


In this case, operation is
handled as 8 bits by initialization, and only this instruction
completes with one write.

Function set
0
0
0
0
0
0

0
0

1
*

0
*

Display on/off control


0
0
0
0
0
0
1
1

0
1

0
0

Entry mode set


0
0
0
0
0
0

0
1

0
0

Note:

42

R/W DB7 DB6 DB5 DB4

0
1

Write data to CGRAM/DDRAM


1
0
0
1
0
0
1
0
1
0
0
0

Display

Operation

Sets 4-bit operation and


selects 1-line display and 5
8 dot character font. 4-bit
operation starts from this step
and resetting is necessary.
(Number of display lines and
character fonts cannot be
changed after step #3.)
_

H_

The control is the same as for 8-bit operation beyond step #6.

Turns on display and cursor.


Entire display is in space mode
because of initialization.
Sets mode to increment the
address by one and to shift the
cursor to the right at the time of
write to the DD/CGRAM.
Display is not shifted.
Writes H.
The cursor is incremented by
one and shifts to the right.

HD44780U
8-Bit Operation, 8-Digit 2-Line Display Example with Internal Reset

Table 13

Instruction

Step
No.

RS

Power supply on (the HD44780U is initialized by the internal


reset circuit)

Initialized. No display.

Function set
0
0
0

Sets to 8-bit operation and


selects 2-line display and 5
8 dot character font.

Display on/off control


0
0
0
0

Write data to CGRAM/DDRAM


1
0
0
1
0
0

Operation

Turns on display and cursor.


All display is in space mode
because of initialization.

Entry mode set


0

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display

Sets mode to increment


the
address by one and
cursor to the right at the time of
write to the DD/CGRAM.
Display is not shifted.
Writes H. DDRAM has already
been selected by initialization
when the power was turned on.
The cursor is incremented by
one and shifted to the right.

H_

Write data to CGRAM/DDRAM


1
0
0
1
0
0

Set DDRAM address


0
0
1
1

HITACHI_

HITACHI
_

Writes I.

Sets DDRAM address so that


the cursor is positioned at the
head of the second line.

43

HD44780U
Table 13

8-Bit Operation, 8-Digit 2-Line Display Example with Internal Reset (cont)
Instruction

Step
No.

RS

R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display

Write data to CGRAM/DDRAM


1
0
0
1
0
0

10

11

12

13

44

HITACHI
M_

HITACHI
MICROCO_

Entry mode set


0
0
0

HITACHI
MICROCO_

Write data to CGRAM/DDRAM


1
0
0
1
0
0

ITACHI
ICROCOM_

Writes O.

Sets mode to shift display at


the time of write.
Writes M. Display is shifted to
the left. The first and second
lines both shift at the same
time.

Return home
0
0
0

Writes M.

Write data to CGRAM/DDRAM


1
0
0
1
0
0

14

15

Operation

H_ ITACHI
MICROCOM

Returns both display and


cursor to the original position
(address 0).

HD44780U
Initializing by Instruction
If the power supply conditions for correctly operating the internal reset circuit are not met, initialization by
instructions becomes necessary.
Refer to Figures 23 and 24 for the procedures on 8-bit and 4-bit initializations, respectively.

Power on

Wait for more than 15 ms


after VCC rises to 4.5 V

Wait for more than 40 ms


after VCC rises to 2.7 V

RS R/WDB7 DB6 DB5 DB4 DB3DB2 DB1


DB0
0 0 0
0 1 1
* *
*
*

BF cannot be checked before this instruction.


Function set (Interface is 8 bits long.)

Wait for more than 4.1 ms

RS R/WDB7 DB6 DB5 DB4 DB3 DB2 DB1


DB0
0 0 0
0 1 1
* *
*
*

BF cannot be checked before this instruction.


Function set (Interface is 8 bits long.)

Wait for more than 100 s

RS R/WDB7 DB6 DB5 DB4 DB3 DB2 DB1


DB0
0 0 0
0 1 1
* *
*
*

BF cannot be checked before this instruction.


Function set (Interface is 8 bits long.)

BF can be checked after the following instructions.


When BF is not checked, the waiting time between
instructions is longer than the execution instuction
time. (See Table 6.)
RS R/WDB7 DB6 DB5 DB4 DB3 DB2 DB1
DB0
0 0 0
0 1 1 N F
* *

Function set (Interface is 8 bits long. Specify the


number of display lines and character font.)
The number of display lines and character font
cannot be changed after this point.

0
0

0
0

0
0

0
0

0
0

0
0

Display off

I/D

Display clear
Entry mode set

Initialization ends

Figure 23 8-Bit Interface

45

HD44780U
Power on

Wait for more than 15 ms


after VCC rises to 4.5 V

RS R/W DB7 DB6 DB5


DB4
0 0 0 0 1 1

Wait for more than 40 ms


after VCC rises to 2.7 V
BF cannot be checked before this instruction.
Function set (Interface is 8 bits long.)

Wait for more than 4.1 ms

RS R/W DB7 DB6 DB5


DB4
0 0 0 0 1 1

BF cannot be checked before this instruction.


Function set (Interface is 8 bits long.)

Wait for more than 100 s

RS R/W DB7 DB6 DB5


DB4
0 0 0 0 1 1

RS R/W DB7 DB6 DB5


DB4
0 0 0 0 1 0
0
0
0
0

0
0
0
0

0
N
0
1

0
F
0
0

1
*
0
0

0
*
0
0

0
0

0
0

0
0

0
0

0
0

0
1

0
0

0
0

0
0

0
1

0
I/D

0
S

BF cannot be checked before this instruction.


Function set (Interface is 8 bits long.)

BF can be checked after the following instructions.


When BF is not checked, the waiting time between
instructions is longer than the execution instuction
time. (See Table 6.)
Function set (Set interface to be 4 bits long.)
Interface is 8 bits in length.
Function set (Interface is 4 bits long. Specify the
number of display lines and character font.)
The number of display lines and character font
cannot be changed after this point.
Display off
Display clear

Initialization ends

Entry mode set

Figure 24 4-Bit Interface

46

HD44780U
Absolute Maximum Ratings*
Item

Symbol

Value

Unit

Notes

Power supply voltage (1)

VCCGND

0.3 to +7.0

Power supply voltage (2)

VCCV5

0.3 to +13.0

1, 2

Input voltage

Vt

0.3 to VCC +0.3

Operating temperature

Topr

30 to +75

Storage temperature

Tstg

55 to +125

Note:

If the LSI is used above these absolute maximum ratings, it may become permanently damaged.
Using the LSI within the following electrical characteristic limits is strongly recommended for
normal operation. If these electrical characteristic conditions are also exceeded, the LSI will
malfunction and cause poor reliability.

47

HD44780U
DC Characteristics (VCC = 2.7 to 4.5 V, Ta = 30 to +75C*3)
Item

Symbol

Min

Typ

Max

Unit

Input high voltage (1)


(except OSC1)

VIH1

0.7V CC

VCC

Input low voltage (1)


(except OSC1)

VIL1

0.3

0.55

Input high voltage (2)


(OSC1)

VIH2

0.7V CC

VCC

15

Input low voltage (2)


(OSC1)

VIL2

0.2V CC

15

Output high voltage (1) VOH1


(DB0DB7)

0.75V CC

I OH = 0.1 mA

Output low voltage (1)


(DB0DB7)

0.2V CC

I OL = 0.1 mA

Output high voltage (2) VOH2


(except DB0DB7)

0.8V CC

I OH = 0.04 mA

Output low voltage (2)


(except DB0DB7)

VOL2

0.2V CC

I OL = 0.04 mA

Driver on resistance
(COM)

RCOM

20

Id = 0.05 mA,
VLCD = 4 V

13

Driver on resistance
(SEG)

RSEG

30

Id = 0.05 mA,
VLCD = 4 V

13

Input leakage current

I LI

VIN = 0 to VCC

Pull-up MOS current


(DB0DB7, RS, R/W)

I p

10

50

120

VCC = 3 V

Power supply current

I CC

150

300

Rf oscillation,
external clock
VCC = 3 V,
f OSC = 270 kHz

LCD voltage

VLCD1

3.0

11.0

VCCV5, 1/5 bias 16

VLCD2

3.0

11.0

VCCV5, 1/4 bias 16

Note:

48

VOL1

Test Condition Notes*

Refer to the Electrical Characteristics Notes section following these tables.

10, 14

HD44780U
AC Characteristics (VCC = 2.7 to 4.5 V, Ta = 30 to +75C*3)
Clock Characteristics
Item

Symbol Min

Typ

Max

Unit

External External clock frequency


clock
External clock duty
operation
External clock rise time

f cp

125

250

350

kHz

Duty

45

50

55

t rcp

0.2

t fcp

0.2

190

270

350

kHz

External clock fall time

Rf
Clock oscillation frequency f OSC
oscillation
Note:

Test Condition Note*


11

Rf = 75 k,
VCC = 3 V

12

Refer to the Electrical Characteristics Notes section following these tables.

Bus Timing Characteristics


Write Operation
Item

Symbol

Min

Typ

Max

Unit

Test Condition

Enable cycle time

t cycE

1000

ns

Figure 25

Enable pulse width (high level)

PWEH

450

Enable rise/fall time

t Er, t Ef

25

Address set-up time (RS, R/W to E) t AS

60

Address hold time

t AH

20

Data set-up time

t DSW

195

Data hold time

tH

10

Item

Symbol

Min

Typ

Max

Unit

Test Condition

Enable cycle time

t cycE

1000

ns

Figure 26

Enable pulse width (high level)

PWEH

450

Enable rise/fall time

t Er, t Ef

25

Address set-up time (RS, R/W to E) t AS

60

Address hold time

t AH

20

Data delay time

t DDR

360

Data hold time

t DHR

Read Operation

49

HD44780U
Interface Timing Characteristics with External Driver
Item

Symbol

Min

Typ

Max

Unit

Test Condition

High level

t CWH

800

ns

Figure 27

Low level

t CWL

800

Clock set-up time

t CSU

500

Data set-up time

t SU

300

Data hold time

t DH

300

M delay time

t DM

1000

1000

Clock rise/fall time

t ct

200

Clock pulse width

Power Supply Conditions Using Internal Reset Circuit


Item

Symbol

Min

Typ

Max

Unit

Test Condition

Power supply rise time

t rCC

0.1

10

ms

Figure 28

Power supply off time

t OFF

50

HD44780U
DC Characteristics (VCC = 4.5 to 5.5 V, Ta = 30 to +75C*3)
Item

Symbol

Min

Typ

Max

Unit

Input high voltage (1)


(except OSC1)

VIH1

2.2

VCC

Input low voltage (1)


(except OSC1)

VIL1

0.3

0.6

Input high voltage (2)


(OSC1)

VIH2

VCC1.0

VCC

15

Input low voltage (2)


(OSC1)

VIL2

1.0

15

Output high voltage (1) VOH1


(DB0DB7)

2.4

I OH = 0.205 mA

Output low voltage (1)


(DB0DB7)

0.4

I OL = 1.2 mA

Output high voltage (2) VOH2


(except DB0DB7)

0.9 VCC

I OH = 0.04 mA

Output low voltage (2)


(except DB0DB7)

VOL2

0.1 VCC

I OL = 0.04 mA

Driver on resistance
(COM)

RCOM

20

Id = 0.05 mA,
VLCD = 4 V

13

Driver on resistance
(SEG)

RSEG

30

Id = 0.05 mA,
VLCD = 4 V

13

Input leakage current

I LI

VIN = 0 to VCC

Pull-up MOS current


(DB0DB7, RS, R/W)

I p

50

125

250

VCC = 5 V

Power supply current

I CC

350

600

Rf oscillation,
external clock
VCC = 5 V,
f OSC = 270 kHz

10, 14

LCD voltage

VLCD1

3.0

11.0

VCCV5, 1/5 bias

16

VLCD2

3.0

11.0

VCCV5, 1/4 bias

16

Note:

VOL1

Test Condition

Notes*

Refer to the Electrical Characteristics Notes section following these tables.

51

HD44780U
AC Characteristics (VCC = 4.5 to 5.5 V, Ta = 30 to +75C*3)
Clock Characteristics
Item

Symbol Min

Typ

Max

Unit

External External clock frequency


clock
External clock duty
operation
External clock rise time

f cp

125

250

350

kHz

11

Duty

45

50

55

11

t rcp

0.2

11

t fcp

0.2

11

190

270

350

kHz

External clock fall time

Rf
Clock oscillation frequency f OSC
oscillation
Note:

Test Condition Notes*

Rf = 91 k
VCC = 5.0 V

12

Refer to the Electrical Characteristics Notes section following these tables.

Bus Timing Characteristics


Write Operation
Item

Symbol

Min

Typ

Max

Unit

Test Condition

Enable cycle time

t cycE

500

ns

Figure 25

Enable pulse width (high level)

PWEH

230

Enable rise/fall time

t Er, t Ef

20

Address set-up time (RS, R/W to E) t AS

40

Address hold time

t AH

10

Data set-up time

t DSW

80

Data hold time

tH

10

Item

Symbol

Min

Typ

Max

Unit

Test Condition

Enable cycle time

t cycE

500

ns

Figure 26

Enable pulse width (high level)

PWEH

230

Enable rise/fall time

t Er, t Ef

20

Address set-up time (RS, R/W to E) t AS

40

Address hold time

t AH

10

Data delay time

t DDR

160

Data hold time

t DHR

Read Operation

52

HD44780U
Interface Timing Characteristics with External Driver
Item

Symbol

Min

Typ

Max

Unit

Test Condition

High level

t CWH

800

ns

Figure 27

Low level

t CWL

800

Clock set-up time

t CSU

500

Data set-up time

t SU

300

Data hold time

t DH

300

M delay time

t DM

1000

1000

Clock rise/fall time

t ct

100

Clock pulse width

Power Supply Conditions Using Internal Reset Circuit


Item

Symbol

Min

Typ

Max

Unit

Test Condition

Power supply rise time

t rCC

0.1

10

ms

Figure 28

Power supply off time

t OFF

53

HD44780U
Electrical Characteristics Notes
1. All voltage values are referred to GND = 0 V.
VCC
B
V1

A = VCC V5
B = VCC V1
A 1.5 V
B 0.25 A

A
V5

The conditions of V1 and V5 voltages are for proper


operation of the LSI and not for the LCD output level.
The LCD drive voltage condition for the LCD output
level is specified as LCD voltage VLCD.

2. VCC V1 V2 V3 V4 V5 must be maintained.


3. For die products, specified at 75C.
4. For die products, specified by the die shipment specification.
5. The following four circuits are I/O pin configurations except for liquid crystal display output.
Input pin
Pin: E (MOS without pull-up)

Output pin
Pins: CL1, CL2, M, D

Pins: RS, R/W (MOS with pull-up)


VCC

PMOS

VCC

PMOS

VCC
PMOS

PMOS

NMOS

NMOS

(pull up MOS)
NMOS

I/O Pin
Pins: DB0 DB7
(MOS with pull-up)

VCC

(pull-up MOS)

VCC
(input circuit)
PMOS

PMOS
Input enable

NMOS
VCC
NMOS
PMOS

Output enable
Data

NMOS
(output circuit)
(tristate)

54

HD44780U
6. Applies to input pins and I/O pins, excluding the OSC1 pin.
7. Applies to I/O pins.
8. Applies to output pins.
9. Current flowing through pullup MOSs, excluding output drive MOSs.
10. Input/output current is excluded. When input is at an intermediate level with CMOS, the excessive
current flows through the input circuit to the power supply. To avoid this from happening, the input
level must be fixed high or low.
11. Applies only to external clock operation.
Th
Oscillator

Tl

OSC1

Open

0.7 VCC
0.5 VCC
0.3 VCC

OSC2

t rcp
Duty =

Th
Th + Tl

t fcp

100%

12. Applies only to the internal oscillator operation using oscillation resistor Rf.
OSC1
Rf
OSC2

R f : 75 k 2% (when VCC = 3 V)
R f : 91 k 2% (when VCC = 5 V)
Since the oscillation frequency varies depending on the OSC1 and
OSC2 pin capacitance, the wiring length to these pins should be minimized.

VCC = 5 V

500

400

300
(270)

max.
200

typ.
min.
50

(91)100

R f (k )

150

f OSC (kHz)

f OSC (kHz)

400

100

VCC = 3 V

500

300
(270)

max.
200
100

typ.
50

(75)

100

min.
150

R f (k )

55

HD44780U
13. RCOM is the resistance between the power supply pins (VCC, V1, V4, V5) and each common signal pin
(COM1 to COM16).
RSEG is the resistance between the power supply pins (VCC, V2, V3, V5) and each segment signal pin
(SEG1 to SEG40).
14. The following graphs show the relationship between operation frequency and current consumption.
VCC = 3 V
1.8

1.6

1.6

1.4

1.4

1.2

1.2

1.0

max.

0.8

typ.

0.6

ICC (mA)

ICC (mA)

VCC = 5 V
1.8

1.0
0.8
0.6

0.4

0.4

0.2

0.2

0.0

0.0
0

100

200

300

fOSC or fcp (kHz)

400

500

max.
typ.

100

200

300

400

500

fOSC or fcp (kHz)

15. Applies to the OSC1 pin.


16. Each COM and SEG output voltage is within 0.15 V of the LCD voltage (V CC, V1, V2, V3, V4, V5)
when there is no load.

56

HD44780U
Load Circuits
Data Bus DB0 to DB7
VCC = 5 V
For VCC = 4.5 to 5.5 V

For VCC = 2.7 to 4.5 V


3.9 k

Test
point
90 pF

11 k

Test
point

IS2074 H
diodes

50 pF

External Driver Control Signals: CL1, CL2, D, M


Test
point
30 pF

57

HD44780U
Timing Characteristics
VIH1
VIL1

RS

VIH1
VIL1

tAS

R/W

tAH

VIL1

VIL1
tAH

PWEH

tEf
VIH1
VIL1

VIH1
VIL1
tEr

tDSW

tH

VIH1
VIL1

DB0 to DB7

VIL1

VIH1
VIL1

Valid data
tcycE

Figure 25 Write Operation


VIH1
VIL1

RS

VIH1
VIL1

tAS

tAH

VIH1

R/W

VIH1
tAH

PWEH

tEf
VIH1
VIL1

VIH1
VIL1

VIL1

tEr
tDDR

DB0 to DB7

tDHR

VOH1
VOL1 *

Valid data
tcycE

Note:

* VOL1 is assumed to be 0.8 V at 2 MHz operation.

Figure 26 Read Operation

58

VOH1
* VOL1

HD44780U
tct
VOH2

CL1

VOH2
tCWH
tCSU

CL2

VOL2
tCWH
VOH2

VOL2
tCSU

tCWL
tct
VOH2
VOL2

D
tDH
tSU
VOH2

t DM

Figure 27 Interface Timing with External Driver

VCC

2.7 V/4.5 V*2

0.2 V

0.2 V

0.2 V

tOFF*1

trcc
0.1 ms

trcc 10 ms

tOFF

1 ms

Notes: 1. tOFF compensates for the power oscillation period caused by momentary power supply
oscillations.
2. Specified at 4.5 V for 5-V operation, and at 2.7 V for 3-V operation.
3. For if 4.5 V is not reached during 5-V operation, the internal reset circuit will not operate
normally.
In this case, the LSI must be initialized by software. (Refer to the Initializing by
Instruction section.)

Figure 28 Internal Power Supply Reset

59

HD44780U
Cautions
1. Hitachi neither warrants nor grants licenses of any rights of Hitachis or any third partys patent,
copyright, trademark, or other intellectual property rights for information contained in this document.
Hitachi bears no responsibility for problems that may arise with third partys rights, including
intellectual property rights, in connection with use of the information contained in this document.
2. Products and product specifications may be subject to change without notice. Confirm that you have
received the latest product standards or specifications before final design, purchase or use.
3. Hitachi makes every attempt to ensure that its products are of high quality and reliability. However,
contact Hitachis sales office before using the product in an application that demands especially high
quality and reliability or where its failure or malfunction may directly threaten human life or cause risk
of bodily injury, such as aerospace, aeronautics, nuclear power, combustion control, transportation,
traffic, safety equipment or medical equipment for life support.
4. Design your application so that the product is used within the ranges guaranteed by Hitachi particularly
for maximum rating, operating supply voltage range, heat radiation characteristics, installation
conditions and other characteristics. Hitachi bears no responsibility for failure or damage when used
beyond the guaranteed ranges. Even within the guaranteed ranges, consider normally foreseeable
failure rates or failure modes in semiconductor devices and employ systemic measures such as failsafes, so that the equipment incorporating Hitachi product does not cause bodily injury, fire or other
consequential damage due to operation of the Hitachi product.
5. This product is not designed to be radiation resistant.
6. No one is permitted to reproduce or duplicate, in any form, the whole or part of this document without
written approval from Hitachi.
7. Contact Hitachis sales office for any questions regarding this document or Hitachi semiconductor
products.

Hitachi, Ltd.

Semiconductor & Integrated Circuits.


Nippon Bldg., 2-6-2, Ohte-machi, Chiyoda-ku, Tokyo 100-0004, Japan
Tel: Tokyo (03) 3270-2111 Fax: (03) 3270-5109

URL

NorthAmerica
: http:semiconductor.hitachi.com/
Europe
: http://www.hitachi-eu.com/hel/ecg
Asia (Singapore) : http://www.has.hitachi.com.sg/grp3/sicd/index.htm
Asia (Taiwan)
: http://www.hitachi.com.tw/E/Product/SICD_Frame.htm
Asia (HongKong) : http://www.hitachi.com.hk/eng/bo/grp3/index.htm
Japan
: http://www.hitachi.co.jp/Sicd/indx.htm
For further information write to:
Hitachi Semiconductor
(America) Inc.
179 East Tasman Drive,
San Jose,CA 95134
Tel: <1> (408) 433-1990
Fax: <1>(408) 433-0223

Hitachi Europe GmbH


Electronic components Group
Dornacher Strae 3
D-85622 Feldkirchen, Munich
Germany
Tel: <49> (89) 9 9180-0
Fax: <49> (89) 9 29 30 00
Hitachi Europe Ltd.
Electronic Components Group.
Whitebrook Park
Lower Cookham Road
Maidenhead
Berkshire SL6 8YA, United Kingdom
Tel: <44> (1628) 585000
Fax: <44> (1628) 778322

Hitachi Asia Pte. Ltd.


16 Collyer Quay #20-00
Hitachi Tower
Singapore 049318
Tel: 535-2100
Fax: 535-1533
Hitachi Asia Ltd.
Taipei Branch Office
3F, Hung Kuo Building. No.167,
Tun-Hwa North Road, Taipei (105)
Tel: <886> (2) 2718-3666
Fax: <886> (2) 2718-8180

Hitachi Asia (Hong Kong) Ltd.


Group III (Electronic Components)
7/F., North Tower, World Finance Centre,
Harbour City, Canton Road, Tsim Sha Tsui,
Kowloon, Hong Kong
Tel: <852> (2) 735 9218
Fax: <852> (2) 730 0281
Telex: 40815 HITEC HX

Copyright Hitachi, Ltd., 1998. All rights reserved. Printed in Japan.

60

You might also like