Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
318 views

Digital Thermometer Using 8051 Microcontroller Project Report

The document describes a digital thermometer circuit using an 8051 microcontroller. It uses an LM35 temperature sensor to sense ambient temperature and outputs an analog voltage. An ADC0804 converts this to a digital value which is read by an AT89C51 microcontroller and displayed on an LCD. It lists the components, provides a circuit diagram, and describes the functionality of key components like the LM35 temperature sensor and AT89C51 microcontroller.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
318 views

Digital Thermometer Using 8051 Microcontroller Project Report

The document describes a digital thermometer circuit using an 8051 microcontroller. It uses an LM35 temperature sensor to sense ambient temperature and outputs an analog voltage. An ADC0804 converts this to a digital value which is read by an AT89C51 microcontroller and displayed on an LCD. It lists the components, provides a circuit diagram, and describes the functionality of key components like the LM35 temperature sensor and AT89C51 microcontroller.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 18

INDEX

 OBJECTIVE

 CIRCUIRT DESCRIPTION

 LIST OF COMPONENTS USED

 CIRCUIT DIAGRAM

 HARDWARE DETAILS OF 8051 CIRCUIT TRAINER

 COMPONENT DESCRIPTION
 LM35 Temperature Sensor
 AT89C51
 Seven Segment Display
 ADC0804
 741 op-amp
 Preset
 Resistors
 Transistor 2N2222
 Capacitors

 DESIGN SPECIFICATIONS:

1. Steps taken while preparing circuit:

(A) PCB DESIGNING


(B) PCB L AYO U T D ESIGN
(C) ETCHING PROCESS
(D) COMPONENT ASSEMBLY
(E) SOLDERING

2. Types of PCB:

(A) SINGLE SIDED PCB


(B) DOUBLE SIDED PCB
(C) MULTI LAYER PCB

 PCB Manufacturing Process


 PRACTICAL APPLICATIONS
 CONCLUSION
 OBJECTIVE:

The objective of this project is to design a digital thermometer using 8051 microcontroller. Digital

thermometer displays the ambient temperature through a LCD display. It consists of two sections.

One is that which senses the temperature. This is a temperature sensor LM 35. The other section

converts the temperature value into a suitable number in Celsius scale which is done by the

ADC0804.

 CIRCUIRT DESCRIPTION:

The circuit is based on LM35 analog temperature sensor, ADC0804 and AT89S51 microcontroller.
LM35 is an analogue temperature sensor IC which can measure a temperature range of -55 to
150°C. Its output voltage varies 10mV per °C change in temperature.

Celsius scale thermometer displays the ambient temperature through a LCD display. It consists of
two sections. One is that which senses the temperature.

This is a temperature sensor LM 35. The other section converts the temperature value into a suitable
number in Celsius scale which is done by the ADC0804.

A digital thermometer can be easily made by interfacing a temperature sensor to the


microcontroller AT89C51. The temperature sensor used in the project isLM35. The LM 35 IC
generates a 10mV variation to its output voltage for every degree Celsius change in temperature.

The Output of the temperature sensor is analog in nature so we need an analog to digital convertor
for converting the analog input to its equivalent binary output.

ADC 0804 is an analog to digital convertor IC used in the project. 0804 is a single channel convertor
which converts the analog input up to a range of 5V to an equivalent 8-bit binary output.

The step size is defined by the voltage applied at the Vref/2 pin of the ADC IC. For example, if the
voltage at Vref/2 pin is set to 1.28V then ADC has a step size of 10 mV. So if the input voltage is 1V
the equivalent binary output of ADC will be 100 or 0110 0100 in binary.

The 8 bit binary output of the ADC is incremented by one for every 10 mV rise of input
voltage. Different step size can be selected by changing the voltage input to the Vref/2 pin. The step
size of the ADC is calibrated using a preset to match the actual temperature.

Once the ADC is calibrated it will give the correct output further. The binary output of ADC is fed
parallel to a port of the microcontroller .The microcontroller reads the input through ADC and displays
the corresponding decimal value on LCD indicating the temperature.
 LIST OF COMPONENTS USED:

 LM35 Temperature Sensor

 AT89C51 Microcontroller

 Seven segment LED display

 ADC0804

 IC 741

 Potentiometer 200K

 Resistors:
 10k – 3
 8.2k – 1
 100 ohm – 10

 Capacitors:
 150Pf – 1
 10 micro f – 1

 2n2222 Transistors
 CIRCUIT DIAGRAM:
 HARDWARE DETAILS OF 8051 CIRCUIT TRAINER:

 On Board Features of 8051 Advance Trainer with P89V51RD2 Microcontroller:


1. RS232 interface
2. 38KHZ RC5 IR receiver
3. Buzzer
4. Light Sensor (LDR)
5. Temperature Sensor
6. Three Analog Inputs via presets
7. All port open 89V51RD2 Microcontroller
8. Four 7-Segment Display
9. Real time clock with DS1307
10. EEPROM 24C256
11. Eight LEDs
12. Two Relays
13. Four Switches
14. Eight bit Analog to Digital Converter
15. Matrix keypad 4x4
16. Stepper Motor driver ULN2803
17. LCD 16 character by 2 lines
18. DC Motor Driver L293D
 COMPONENT DESCRIPTION:

 LM35 Temperature Sensor:

LM35 is a precision IC temperature sensor with its output proportional to the temperature (in oC). The
sensor circuitry is sealed and therefore it is not subjected to oxidation and other processes. With
LM35, temperature can be measured more accurately than with a thermistor. It also possess low self
heating and does not cause more than 0.1 oC temperature rise in still air.

The LM35 series are precision integrated-circuit LM35 temperature sensors, whose output voltage is
linearly proportional to the Celsius (Centigrade) temperature. The LM35 sensor does not require any
external calibration or trimming to provide typical accuracies of ±¼°C at room temperature and ±¾°C
over a full -55 to +150°C temperature range.

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.1°C in still air. The LM35 is rated to operate
over a -55° to +150°C temperature range, while the LM35C sensor is rated for a -40° to +110°C
range (-10° with improved accuracy).

Pin Diagram:

Pin Description:

Pin Function Name


No

1 Supply voltage; 5V (+35V to -2V) Vcc


2 Output voltage (+6V to -1V) Output
3 Ground (0V) Ground
 AT89C51:

AT89C51 is an 8-bit microcontroller and belongs to Atmel's 8051 family. ATMEL 89C51 has 4KB of
Flash programmable and erasable read only memory (PEROM) and 128 bytes of RAM. It can be
erased and program to a maximum of 1000 times.

In 40 pin AT89C51, there are four ports designated as P1, P2, P3 and P0. All these ports are 8-bit bi-
directional ports, i.e., they can be used as both input and output ports. Except P0 which needs
external pull-ups, rest of the ports have internal pull-ups. When 1s are written to these port pins, they
are pulled high by the internal pull-ups and can be used as inputs. These ports are also bit
addressable and so their bits can also be accessed individually.

Pin Diagram:

Pin Description:

Pin No Function Name


1 P1.0
2 P1.1
3 8 bit input/output port (P1) pins P1.2
4 P1.3
5 P1.4
6 P1.5
7 P1.6
8 P1.7
9 Reset pin; Active high Reset
Input (receiver) for serial
10 RxD P3.0
communication
Output (transmitter) for serial
11 TxD P3.1
communication
12 External interrupt 1 Int0 P3.2
13 External interrupt 2 Int1 8 bit input/output P3.3
14 Timer1 external input T0 port (P3) pins P3.4
15 Timer2 external input T1 P3.5
16 Write to external data memory Write P3.6
17 Read from external data memory Read P3.7
18 Crystal 2
Quartz crystal oscillator (up to 24 MHz)
19 Crystal 1
20 Ground (0V) Ground
21 P2.0/ A8
22 P2.1/ A9
23 P2.2/ A10
24 8 bit input/output port (P2) pins/High-order address bits when interfacing P2.3/ A11
25 with external memory P2.4/ A12
26 P2.5/ A13
27 P2.6/ A14
28 P2.7/ A15
29 Program store enable; Read from external program memory PSEN
Address Latch Enable ALE
30 Program pulse input during Flash programming Prog
External Access Enable; Vcc for internal program executions EA
31
Programming enable voltage; 12V (during Flash programming) Vpp
32 P0.7/ AD7
33 P0.6/ AD6
34 8 bit input/output port (P0) pins P0.5/ AD5
35 P0.4/ AD4
36 Low-order address bits when interfacing with external memory P0.3/ AD3
37 P0.2/ AD2
38 P0.1/ AD1
39 P0.0/ AD0
40 Supply voltage; 5V (up to 6.6V) Vcc
 Seven Segment Display:

Pin Diagram:

A seven segment display is the most basic electronic display device that can display digits from 0-9.

They find wide application in devices that display numeric information like digital clocks, radio,

microwave ovens, electronic meters etc.

The most common configuration has an array of eight LEDs arranged in a special pattern to display

these digits. They are laid out as a squared-off figure ‘8’.

Every LED is assigned a name from 'a' to 'h' and is identified by its name. Seven LEDs 'a' to 'g' are

used to display the numerals while eighth LED 'h' is used to display the dot/decimal.

A seven segment is generally available in ten pin package. While eight pins correspond to the eight

LEDs, the remaining two pins (at middle) are common and internally shorted.

These segments come in two configurations, namely, Common cathode (CC) and Common anode

(CA).In CC configuration, the negative terminals of all LEDs are connected to the common pins. The

common is connected to ground and a particular LED glows when its corresponding pin is given high.

In CA arrangement, the common pin is given a high logic and the LED pins are given low to display a

number.
 ADC0804:

ADC0804 is a very commonly used 8-bit analog to digital convertor. It is a single channel IC. The
digital outputs vary from 0 to a maximum of 255. ADC0804 needs a clock to operate. The time taken
to convert the analog value to digital value is dependent on this clock source. An external clock can
be given at the Clock IN pin.

Pin Diagram:

Pin Description:

Pin No Function Name


1 Activates ADC; Active low Chip select
2 Input pins Read
3 Input pin; Low to high pulse is given to start the conversion Write
4 Clock Input pin; to give external clock. Clock IN
5 Output pin; Goes low when conversion is complete Interrupt
6,7 Analog non-inverting input & Analog inverting Input. Vin(+) & Vin(-)
8 Ground(0V) Analog Ground
9 Input pin; sets the reference voltage for analog input Vref/2
10 Ground(0V) Digital Ground
11to18 8 bit digital output pins D7 to D0
19 Used with Clock IN pin when internal clock source is used Clock R
20 Supply voltage; 5V Vcc
 741 op-amp:

The 741 is a versatile op-amp IC. Commonly available 741 is an eight pin dual-in-line package op-

amp IC. It has only a single op-amp module inside it and it requires dual-power supply.

Pin-outs:

The pin-out of the 741 op-amp is shown below. Pin 2 & 3 are input pins and pin 6 is the output pin.

Pin 4 & 7 are provided for dual-power supply.

Pin-out of 741

An op-amp is supposed to have zero output voltage whenever the input difference voltage is zero.

But practically this is hard to achieve, because of certain current mismatch at the input terminals. The

741 has two terminals for setting the output voltage to zero, when the input voltage is zero. The pins

provided for this function are called offset null. Among the input pins, the pin2 is called inverting input

and the pin3 is called non-inverting input.


 Preset:

A preset is a three legged electronic component which can be made to offer varying resistance in a

circuit. The resistance is varied by adjusting the rotary control over it.The resistance does not vary

linearly but rather varies in exponential or logarithmic manner. Such variable resistors are commonly

used for adjusting sensitivity along with a sensor.The variable resistance is obtained across the single

terminal at front and one of the two other terminals. The two legs at back offer fixed resistance which

is divided by the front leg. So whenever only the back terminals are used, a preset acts as a fixed

resistor. Presets are specified by their fixed value resistance.

Working of presets is quite simple. It works by having a resistive track and a small plate having dents

to short the track. This small plate can be rotated using a screw driver or some similar tool. Position of

the dents on the track determines the amount of resistance that is to be used in the circuit.

Pin Diagram:
 RESISTORS:

Resistor is a passive component used to control current in a circuit. Its resistance is given by the ratio
of voltage applied across its terminals to the current passing through it. Resistors can be either fixed
or variable. Negative temperature coefficient (NTC), positive temperature coefficient (PTC) and light
dependent resistor (LDR) are some such resistors. These special resistors are commonly used as
sensors. Read and learn about internal structure and working of a resistor.

Pin Diagram:

How to Read Resistor Color Coding Scheme:

The resistor color code is always read one band at a time starting from left to the right, with the larger
width tolerance band oriented to the right side indicating its tolerance. By matching the color of the
first band with its associated number in the digit column of the color chart below, the first digit is
identified and this represents the first digit of the resistive value. The second digit of the resistance is
obtained by matching again the color of the second band with its associated number in the digit
column of the color chart. The tolerance band is usually gold or silver but some may have none.

 Transistor 2N2222:
Pin Diagram:

2N2222 is an NPN BJT transistor. It is used for general purpose low-power amplification and
switching applications. These are designed for high speed switching application at collector current
up to 800mA.It provides useful current gain over a wide range of collector current.

Other features include, low leakage currents and low saturation voltage. 2N2222A is another variant
with improved characteristics. The emitter leg of 2N2222 is indicated by a protruding edge in the
transistor case.
 CAPACITORS:

A capacitor is a passive two terminal component which stores electric charge. This component
consists of two conductors which are separated by a dielectric medium. The potential difference when
applied across the conductors polarizes the dipole ions to store the charge in the dielectric medium.
The circuit symbol of a capacitor is shown below:

Pin Diagram:

As you turn on the power supply, the current begins to flow through the capacitor inducing the

positive and negative potentials across its plates. The capacitor continues to charge until the

capacitor voltage equalizes up to the supply voltage which is called as the charging phase of the

capacitor. Once the capacitor is fully charged at the end of this phase, it gets open circuited for DC. It

begins to discharge when the power of the capacitor is switched off. There are different types of

capacitors. The symbol of capacitors from each group is shown below:


 DESIGN SPECIFICATIONS:

1. Steps taken while preparing circuit:

(A) PCB DESIGNING:

T he m a in pu rpo se of p r in ted c i r cui t i s i n the r out ing of e lec t r i c cu r ren t


s and s i gn a l t h r o u g h a t h i n c o p p e r l a y e r t h a t i s b o u n d e d f i r
m l y t o a n i n s u l a t i n g b a s e m a t e r i a l sometimes called the substrate. This base
is manufactured with an integrally bounded layer of thin copper foil, which has to be partly
etched or removed to arrive at a pre-designed pattern to suit the circuit connections, or other
applications as required.

The term printed circuit board is derived from the original method where a printed pattern is used as
the mask over wanted areas of copper. The PCB provides an ideal baseboard upon which
to assemble and hold firmly most of the small components.

From the constructor’s point of view, the main attraction of using PCB is its role as the
mechanical support for small components. There is less need for complicated and time-
consuming metal work of chassis contraception except perhaps in providing the final
enclosure. Most straight forward circuit designs can be easily converted in to printed
wi r i n g la ye r t he thou gh t re qu i red to c ar r y ou t the i n ver s ion cab f oo ted h i
gh l i ght an possible error that would otherwise be missed in conventional point to point wiring .The
finished project is usually neater and truly a work of art. Actual size PCB layout for the circuit shown is
drawn on the copper board. The board is then immersed in FeCl3 solution for 12 hours. In this
process only the exposed copper portion is etched out by the solution.

Now the petrol washes out the paint and the copper layout on PCB is rubbed with asmooth sand
paper slowly and lightly such that only the oxide layers over th e Cu arer e m o ved. No w
th e ho le s are d r i l l ed at the resp ect i ve p la ces a cco rd in g to com po nent layout
as shown in figure.

(B) PCB LA YO U T D ES I G N :

W hen des i gn in g the la yout one shou ld o bse r ve the m in im um s i ze ( com


p o ne n t bod y l e n g t h a n d w e i g h t ) . B e f o r e s t a r t i n g t o d e s i g n t h e l a y
o u t w e n e e d a l l t h e r e q u i r e d components in hand so that an accurate assessment
of space can be made. Other space considerations might also be included from case to case of
mounted components over the printed circuit board or to access path of present components.

It might be necessary to turn some components around to a different angular position so that
terminals are closer to the connections of the components. The scale can be checked by positioning
the components on the squared paper. If any connection crosses, then one can reroute to avoid such
condition.

All common or earth lines should ideally be connected to a common line routed around
the perimeter of the layout. This will act as the ground plane. If possible try to route the outer supply
line to the ground plane. If possible try to route the other supply lines around the opposite edge of
the layout through the centre. The first set is tearing the circuit to eliminate the crossover
without altering the circuit detail in any way.
P lan the la yout l ook in g at the top s i de to th i s boa rd. F i rs t th i s s hou
ld be t ran s la ted inversely; later for the etching pattern large areas are recommended to
maintain good copper adhesion. It is important to bear in mind always that copper track
width must be according to the recommended minimum dimensions and allowance must be
made for increased width where termination holes are needed. From this aspect, it can
become little tricky to negotiate the route to connect small transistors.

There are basically two ways of copper interconnection patterns underside the board. The first is the
removal of only the amount of copper necessary to isolate the junctions of the components to one
another. The second is to make the interconnection pattern looking more like conventional point
wiring by routing uniform width of copper from component to component.

(C) ETCHING PROCESS:

Etching process requires the use of chemicals. Acid resistant dishes and running water
s u ppl y. Fer r i c c h lo r ide i s m ost l y u sed so lu t io n bu t o the r etch in g m ate r ia l
s s uch as ammonium per sulphate can be used. Nitric acid can be used but in general it is not used
due to poisonous fumes. The pattern prepared is glued to the copper surface of the board
using a latex type of adhesive that can be cubed after use. The pattern is laid firmly on the copper
using a very sharp knife to cut round the pattern carefully to remove the paper
corresponding to the required copper pattern areas.

Then apply the resistant solution, which can be a kind of ink solution for the purpose of
maintaining smooth clean outlines as far as possible. While the board is drying, test all the
components. Bef ore go in g t o ne xt stage , che ck t he who le pat te rn and cro ss chec k
wi t h the c i rcu i t diagram. Check for any free metal on the copper. The etching bath should be in
a glass or enamel disc. If using crystal of ferric- chloride these should be thoroughly
dissolved in water to the proportion suggested. There should be 0.5 lt. of water for 125 gm of
crystal.

To prevent particles of copper hindering further etching, agitate the solutions carefully by gently
twisting or rocking the tray. The board should not be left in the bath a moment longer than is
needed to remove just t h e r i g h t a m o u n t o f c o p p e r . I n s p i t e o f t h e r e b e i
n g a r e s i s t i v e c o a t i n g t h e r e i s n o protection against etching away through exposed
copper edges. This leads to over etching. Have running water ready so that etched board can
be removed properly and rinsed. This will halt etching immediately.

Drilling is one of those operations that call for great care. For most purposes a
0.5mmdrill is used. Drill all holes with this size first those that need to be larger can be
easily drilled again with the appropriate larger size.

(D) COMPONENT ASSEMBLY:

From the greatest variety of electronic components available, which runs into thousands of different
types it is often a perplexing task to know which is right for a given job. T her e cou ld be dam age s
uch a s hai r l ine cr ac k on P CB. I f the re a re, th en the y ca n be repaired by soldering a short link
of bare copper wire over the affected part. The most popular method of holding all the items is to
bring the wires far apart after they have been inserted in the appropriate holes. This will hold the
component in position ready for soldering.
Some components will be considerably larger .So it is best to start mounting the smallest first and
progressing through to the largest. Before starting, be certain that no further drilling is
likely to be necessary because access may be impossible later. Next will probably be the resistor,
small signal diodes or other similar size components. Some capacitors are also very small but it
would be best to fit these afterwards. When fitting each group of components mark off each one
on the circuit as it is fitted so that if we have to leave the job we know where to recommence.

Although transistors and integrated circuits are small items there are good reasons
for leaving the soldering of these until the last step. The main point is that these components are very
sensitive to heat and if subjected to prolonged application of the soldering iron, they could be
internally damaged. All the components before mounting are rubbed with sand paper so
that oxide layer is removed from the tips. Now they are mounted according to the component
layout.

(E) SOLDERING :

This is the operation of joining the components with PCB after this operation the circuit will be ready
to use to avoid any damage or fault during this operation following care must be taken.

 A longer duration contact between soldering iron bit & comp


o n e n t s l e a d c a n exceed the temperature rating of device & cause partial or total
damage of the device. Hence before soldering we must carefully read the maximum
soldering temperature & soldering time for device.
 T he wa tta ge of sol de r i n g i ron shou ld be se lect ed as m in im um a s pe rmi s
s i b le f or that soldering place
 To protect the devices by leakage current of iron its bit should
b e e a r t h e d properly.
 We shou ld se lec t t he so lde r i n g wi re wi th p rope r rat io of Pb & T n to pr o v
ide th e suitable melting temperature.
 P rope r am oun t of good qual i t y f lu x m us t be app l ied on t he so lde r in g po in
t to avoid dry soldering.

2. Types of PCB:
PCBs can be divided into three main categories:
Single Sided.
Double Sided.
Multi Layered.

 SINGLE SIDED PCB:


A single sided PCB contains copper tracks on one side of the board only. Holes are drilled at
appropriate points on the track so that each component can be inserted from the non copper side
of the board. Each pin is soldered to the copper track.

 DOUBLE SIDED PCB:


Double sided PCBs have copper tracks on both sides of the board. The track layout is designed
so as not to allow shorts from one side to another. If it is required to link points between the two
sides, electrical connections are made by small interconnecting holes which are placed with
copper during manufacture.
 MULTI LAYER PCB:
In multi layer PCBs, each side contains several layers of track patterns which are insulated from
one another. They are laminated under heat and high pressure.

 PCB Manufacturing Process:

It is an important process in the design of electronic equipment. The design of PCBs (Printed Circuit
Boards) depends on circuit requirements like noise immunity, working frequency and voltage levels
etc. High power PCBs requires a special design strategy.

The fabrication process to the printed circuit board will determine to a large extent the price and
reliability of the equipment. A common target aimed is the small series of highly reliable professional
quality PCBs with low investment.

The layout of PCB has to incorporate all the information of the board before one can go on the
artwork preparation. This means that a concept that clearly defines all the details of the circuit and
partly defines the final equipment is prerequisite before the actual layout can start. The detailed circuit
diagram is very important for the layout designer but he must also be familiar with the design concept
and with the philosophy behind the equipment.

 PRACTICAL APPLICATIONS:

Common applications for digital thermometers include:

 Medicine: Digital thermometers are often used in clinical settings on patients.


 HVAC thermometers are rated for HVAC applications such as duct or flume monitoring.
 Laboratory use includes monitoring experiments and chemical reactions as well as
maintaining an optimal laboratory environment.
 Meteorological thermometers are used to give air, atmosphere and water temperature
readings.

 CONCLUSION:

The circuit is based on LM35 analog temperature sensor, ADC0804 and AT89S51 microcontroller. It
consists of two sections. One is that which senses the temperature i.e. LM 35. The other section
converts the temperature value into a suitable number in Celsius scale which is done by
the ADC0804.

A digital thermometer can be easily made by interfacing a temperature sensor to the


microcontroller AT89C51.The LM 35 IC generates a 10mV variation to its output voltage for every
degree Celsius change in temperature. The Output of the temperature sensor is analog in nature so
we need an analog to digital convertor for converting the analog input to its equivalent binary
output.ADC 0804 is an analog to digital convertor IC used in the project. 0804 is a single channel
convertor which converts the analog input up to a range of 5V to an equivalent 8-bit binary output.

You might also like