Temp Sensor

29
A Seminar Report on Multi-Focus Image Fusion TEMPERATURE SENSOR USING MICROCONTROLLER USING 8051 B Tech (Telecommunication), Project Stage - I By Prateek Dua(723) Sudhanshu Sharma(742) Vimanyu Kachroo(747) Under the Guidance of Prof. Rahul Koshti Department of Electronics and Telecommunication i

Transcript of Temp Sensor

Page 1: Temp Sensor

A Seminar Report on Multi-Focus Image Fusion

TEMPERATURE SENSOR USING

MICROCONTROLLER USING 8051

B Tech (Telecommunication), Project Stage - I

By

Prateek Dua(723)

Sudhanshu Sharma(742)

Vimanyu Kachroo(747)

Under the Guidance of

Prof. Rahul Koshti

Department of Electronics and Telecommunication Engineering

S.V.K.M’s NMIMS, Mukesh Patel School of Technology

Management and Engineering.

i

Page 2: Temp Sensor

Acknowledgement

Apart from, the success of my seminar depends largely on the encouragement and

guidelines of many others. I take this opportunity to express my gratitude to the

people who have been instrumental in the successful completion of this seminar.

I would like to show my greatest appreciation to Prof. Rahul Koshti, my project

guide. I can’t say thank them enough for their tremendous support and help.

Without their encouragement and guidance this seminar would not have

materialized.

I am grateful for the guidance, support and help received from other members who

contributed and contributing to this seminar which is vital for the success of this

seminar.

Name of Student: Prateek Dua(723)

Sudhanshu Sharma(742)

Vimanyu Kachroo(747)

Btech(EXTC)

Page 3: Temp Sensor

Abstract

An analog temperature sensor is pretty easy to explain, it’s a chip that tells you

what the ambient temperature is!

These sensors use a solid-state technique to determine the temperature. That is to

say, they don’t use mercury (like old thermometers), bimetallic strips (like in some

home thermometers or stoves), nor do they use thermostats (temperature sensitive

resistors). Instead, they use the fact as temperature increases, the voltage across a

diode increases at a known rate.

By precisely amplifying the voltage change, it is easy to generate an analog signal

that is directly proportional to temperature. There have been some improvements

on the technique but, essentially that is how temperature is measured.

Because these sensors have no moving parts, they are precise, never wear out, don't

need calibration, work under many environmental conditions, and are consistent

between sensors and readings. Moreover they are very inexpensive and quiet and

quite easy to use

Page 4: Temp Sensor

Table of Contents

No. Title Page No.

Acknowledgement

Abstract

1. Introduction 1

2. Literature Review 3

3. Hardware used 4

3.1 Block diagram

4. Hardware information 6

4.1 Introduction to Micro controller

4.2 A/D Converter

4.3 LM35 Temperature Sensor

4.4 Resistors

4.5Capacitors

5. Applications 14

6. Future development 15

7. Reference 16

Page 5: Temp Sensor

List of Figures

Figure 2.1 : Flow diagram 3

Figure 3.1 : Block diagram 5

Figure 4.1 : Pin diagram of AT89C51 6

Figure 4.3 : LM 35 diagram 11

Figure 4.4 : color coded resistor 12

Figure 4.5 : Capacitor symbol 12

Page 6: Temp Sensor

1

1. Introduction

The aim of this project is to design an ambient temperature measurement circuit.

The motivation for doing this project is the fact that temperature measurement has

become an integral part of any control system operating in a temperature sensitive

environment and the various learning outcomes associated during the

implementation of the project.

In this project the ambient temperature will be displayed on a LCD. An 89s52

Microcontroller will be used for handling all the required computations and

control.

In following we have briefly discussed details of a Microcontroller and the project

in general. A temperature sensor LM 35 is used for sensing the ambient

temperature. The system will get the temperature from the IC and it will display

the temperature over the seven segment display and this temperature was compared

with the value stored by the user. The main work of the project is to sense the

temperature and display it and then control it by using relays. Now to display a

temperature we have to just convert the temperature which is analog into a digital

quantity by using an analog to digital convertor that is referred as ADC or A/D

convertor.

To control a temperature sensitive device we refer a range of temperature which

with compared by the current temperature that is sensed by the temperature sensor.

The temperature based applications are based on mostly on three types these are:-

1 .Under temperature application

2. Over temperature application

3. Power tripping application

Page 7: Temp Sensor

2

2. Literature Review

There are many aspects that should be considered when measuring temperature;

the needs of a home refrigerator are different to those of a commercial furnace, or

those for monitoring liquids flowing through pipes in a beverage-processing plant.

The previous application examples present very different challenges to those

encountered when measuring the temperature within the housing of a cell phone or

laptop computer. While each of these applications need to measure temperature,

they all have very different requirements. Some considerations are how hot, where

is the temperature being measured and how precise does the measurement need to

be.

Now for an example if equipment is working continuously then it becomes heated.

Due to heating the insulation of that particular device is being molten. And now it

become slow or we can say that it become less efficient.

To prevent this condition we continuously monitor the device temperature. The

work of relay to control temperature is depends on the surrounding conditions, like

if the device is over heated then the reference range of temperature. At this time we

have to avoid the overheating & provide cooling to the device.

But in those countries where the snow fall occurs then the device is become under

heating then to avoid this condition we have to provide heating to the device.

And if the device exceeds the temperature range which is previously define by us,

then the device is being turned OFF or we can say that the device is being tripped.

The above discussed three cases are operated by three different relays. One relay

provide heating by heater which is connected to the relay; this relay is activated

Page 8: Temp Sensor

3

when the “UNDER TEMPERATURE” condition occur. Once heater is on the

device starts heating & works properly as required.

The second relay provides cooling to the device by a fan or blower which is

connected with relay, this relay activated when over temperature condition occurs.

Due to this the device becomes cooled.

If the temperature range get out of the range of reference range then required to on

the fan or blower. But if in case the fan is not in working condition and the device

temperature is exceeds the relay tripped the device to prevent the damage. It is

used for safety purpose. In this whole system is using the oscillation frequency

11.0592MHz. all the relays are connected with the transistors at active high mode

so as buzzer is also connected in the active high mode with the transistor.

Figure 2.1 flow diagram

Page 9: Temp Sensor

4

3. Hardware Used

Microcontroller AT89S52(8052 derivative).

IC DS 1820 (Temperature Sensor).

LM 7805 (Regulator IC for 5 volts constant D.C supply

LCD For display at remote station.

Crystal Oscillator to produce 11.0592 MHz Frequency for microcontroller

clock.

General Purpose PCB Software Used.

Keil u-Vision 3.0:-

Keil Software is used provide you with software development tools for 8051

based microcontrollers. With the Keil tools, you can generate embedded

applications for virtually every 8051 derivative.

Page 10: Temp Sensor

5

3.1 BLOCK DIAGRAM

Figure 3.1 block diagram

4. HARDWARE INFORMATION

Page 11: Temp Sensor

6

4.1 Introduction to Micro controller

When we have to learn about a new computer we have to familiarize about the

machine capability we are using, and we can do it by studying the internal

hardware design (devices architecture), and also to know about the size, number

and the size of the registers. A microcontroller is a single chip that contains the

processor (the CPU), non-volatile memory for the program (ROM or flash),

volatile memory for input and output (RAM), a clock and an I/O control unit. Also

called a "computer on a chip," billions of microcontroller units (MCUs) are

embedded each year in a myriad of products from toys to appliances to

automobiles. For example, a single vehicle can use 70 or more microcontrollers.

Figure 4.1:

Pin diagram of

AT89C51

Page 12: Temp Sensor

7

89s52: 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 Atmelâ„¢s high-density nonvolatile memory

technology and is compatible with the industry-standard 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's AT89S52 is a powerful microcontroller which provides a highly-flexible

and cost-effective 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 The hardware is driven by a set of program instructions, or software.

Once familiar with hardware and software, the user can then apply the

microcontroller to the problems easily. The following are some of the capabilities

of 8051 microcontroller.

Internal ROM and RAM

I/O ports with programmable pins

Timers and counters

Serial data communication

The 8051 architecture consists of these specific features:

16 bit PC &data pointer (DPTR)

8 bit program status word (PSW)

Page 13: Temp Sensor

8

8 bit stack pointer (SP)

Internal ROM 4k

Internal RAM of 128 bytes.

4 register banks, each containing 8 registers

0 bits of general purpose data memory

32 input/output pins arranged as four 8 bit ports0-P3

Two 16 bit timer/counters: T0-T1

Two external and three internal interrupt sources

Oscillator and clock circuits.

4.2 A/D Converter.

Page 14: Temp Sensor

9

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 Description:

Pin No

Function Name

Page 15: Temp Sensor

10

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

4.3 LM35 Temperature Sensor

Page 16: Temp Sensor

11

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).

Figure 4.3 LM35diagram

4.4 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

Page 17: Temp Sensor

12

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.

Figure 4.4: color coded Resistors

4.5 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:

Figure 4.5 capacitor symbol

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

Page 18: Temp Sensor

13

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.

5. Applications

This project can be used in Home.

Page 19: Temp Sensor

14

This project can be used in Industry.

This will help in saving the electricity / energy.

FUTURE DEVELOPMENT

We can monitor parameters like humidity, light and at the same time control

them.

Page 20: Temp Sensor

15

We can send this data to remote location using mobile or internet.

We can draw graphs of variations in these parameters using computer.

REFERENCE:-

8051 and embedded system by Mazidi and Mazidi

All datasheets from http://www.datasheetcatalog.com

About AT89s8252 from http://www.atmel.com ,

Page 21: Temp Sensor

16

http://www.triindia.co.in

About DS1820 from http://www.dallas.com.