51

final report for printing (Edited).doc

  • Upload
    teamfyp

  • View
    26

  • Download
    2

Embed Size (px)

Citation preview

REPORT OF FINAL YEAR PROJECT

PREFACE

Many metals, semiconductors, and ceramics change their electrical resistance with temperature in a known reproducible manner. This change in resistance results in a change of current or voltage, so it can be measured and then displayed in an analog to digital fashion. This is the basis for digital thermometer. Digital thermometers are a quick, simple and effective way of obtaining temperature information.

Digital thermometers are quickly replacing traditional mercury thermometers mercury thermometers were used in the same way as by heating the liquid mercury in the tip would cause it to expand into the tube of the thermometer, thus fluctuating according to temperature and stopping at a point on the scale. For clinical use to prevent contamination between patients in 1990s digital thermometers began replacing traditional thermometers in medicine due to safety concerns.

ACKNOWLEDGEMENTWe would like to acknowledge and extend our heartfelt gratitude to the persons who have made possible the completion of our project. Without their timely help, the project could not have been a success, our supervisor Madam Uzma Raheem, for her vital encouragement and support. Madam Shafia Tabbassum our cosupervisor, for her understanding and assistance. Prof.Dr.M.A.Haleem, Chairman, Department of Biomedical Department for the help and inspiration he extended. Sir Zeeshan project incharge for the constant reminders and much needed motivation. All Biomedical department faculty members and Staff Sir Asif Memon, for assisting in the collection of the topics for the chapters.

Most especially we gratefully acknowledge to our family for their encouragement and financial support, and above all to God, who made all things possible.

ABSTRACTA digital thermometer is designed and built utilizing a temperature sensor LM35 and distributed control system circuit. Temperature was recorded in the range 97F to100F, 37C with an accuracy of 0.01. Numeric and graphical data were displayed on a PC using a program written in Visual Basic. The project is based on Human Machine Interface (HMI) equipment which provides a control and visualisation interface between a human and a process; machine, application or appliance. HMIs allow us to control, monitor, diagnose and manage our application. The report comprises of three chapters; CHAPTER#1 consists of theory section, CHAPTER#2 consists of project details, CHAPTER #3 consists of appendices.

Sir Syed University of Engineering & Technology

University Road, Karachi -75300, Pakistan.

Tel: - 4988000-5, 4980059, 4980072

Website: www.ssuet.edu.pk

CERTIFICATE

This is to certify that:

SYED WAHAB ALI ZAIDI 2005-BM-132

MUHAMMAD AZAM 2005-BM-113

AFSHEEN HUSSAIN 2005-BM-123

SYEDA SABIKA ZAIDI 2005-BM-130

Are student of Biomedical Engineering Department batch 2005 and have completed their final year project assign to them.

Prof.Dr.M.A.Haleem

Chairman

Biomedical Engineering DepartmentSir Syed University of Engineering & Technology

University Road, Karachi -75300, Pakistan.

Tel: - 4988000-5, 4980059, 4980072

Website: www.ssuet.edu.pk

CERTIFICATE

This is to certify that:

SYED WAHAB ALI ZAIDI

2005-BM-132

MUHAMMAD AZAM

2005-BM-113

AFSHEEN HUSSAIN

2005-BM-123

SYEDA SABIKA ZAIDI

2005-BM-130

Are student of Biomedical Engineering Department batch 2005 and have completed their final year project assign to them.

Engr.Uzma Raheem Engr.Shafia TabbasumProject Advisor

Project AdvisorLecturer

Lecturer

Dept. of Biomedical Engineering Dept. of Biomedical EngineeringTable of ContentsChapter # 1 Theory

11.1Introduction

11.2General Description

11.2.1Thermometer

11.2.2Sensor

21.2.3Analog-To-Digital Converter

41.2.4 Microcontroller

61.2.5Liquid Crystal Display (LCD)

71.3Serial Interfacing

81.3.1Popular Computer Interface Specifies the Typical Maximum91.3.2System Components

91.3.3 Computer

91.3.4 Physical Link

91.3.5 Programming

101.3.6 Languages

101.4 HMI (Human Machine Interface)

101.5Distributed Control System

111.5.1Elements

111.5.2Application of DCS in Our Project

11Chapter # 2Technical Data

122.1Block Diagram

122.2Components List

132.2.1LM35

132.2.2ADC0804

132.2.3 Microcontroller 89C51

132.2.4MAX232 & RS232

142.3Circuit Description

142.3.1 Power Supply

142.3.2 Main Control Unit

142.3.3Analog Unit

152.3.4Display Unit

152.5 Programmme

152.6Key Specification Of The Project

242.6.1 Vital Statistics

24Chapter # 3Project Management

25References

1.Theory1.1IntroductionDigital Thermometer with computer Interface provides temperature readings which indicate the temperature of the three different persons at a time. No additional components are required; the device is truly a temperature-to-digital converter. Temperature readings are communicated from the 8 bit a-d- converter or a standard 3-wire serial interface. The choice of interface standard is selectable by the user. Having connectivity with PC is great we can always see current temperatures or we can collect a long term statistics or for future enhancement even publish on the web.1.2General Description1.2.1ThermometerThermometer is a device that measures temperature or temperature gradient using a variety of different principles; it comes from the Greek roots thermo, heat, and meter, to measure. A thermometer has two important elements: the temperature sensor (e.g. the bulb on a mercury thermometer) in which some physical change occurs with temperature, plus some means of converting this physical change into a value (e.g. the scale on a mercury thermometer). Industrial thermometers commonly use electronic means to provide a digital display or input to a computer.Types of ThermometersThermometers have been built which utilise a range of physical effects to measure temperature. Most thermometers are originally calibrated to a constant-volume gas thermometer. Temperature sensors are used in a wide variety of scientific and engineering applications, especially measurement systems. Temperature systems are primarily either electrical or mechanical, occasionally inseparable from the system which they control (as in the case of a mercury thermometer). Alcohol thermometer

Beckmann differential thermometer

Bi-metal mechanical thermometer

Coulomb blockade thermometer

Galileo thermometer

Infrared thermometer

Liquid crystal thermometer

Medical thermometer (e.g. oral thermometer, rectal thermometer, basal thermometer)

Mercury-in-glass thermometer

Pill thermometer

Resistance thermometer

Reversing thermometer

Silicon bandgap temperature sensor

Six's thermometer- also known as a Maximum minimum thermometer

Thermistor

Thermocouple

1.2.2SensorA sensor is a device that measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument. For example, a mercury thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube. A thermocouple converts temperature to an output voltage which can be read by a voltmeter. For accuracy, all sensors need to be calibrated against known standards.A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes. For instance, if the mercury in a thermometer moves 1 cm when the temperature changes by 1 C, the sensitivity is 1 cm/C. Sensors that measure very small changes must have very high sensitivities.

Classification of Measurement ErrorsA good sensor obeys the following rules:

1. the sensor should be sensitive to the measured property

2. the sensor should be insensitive to any other property

3. the sensor should not influence the measured

Types of Sensors Electromagnetic Chemical Mechanical Optical Radiations Ionising Radiations AcousticsTemperature SensorBig differences exist between different temperature sensor or temperature measurement device types. Using one perspective, they can be simply classified into two groups, contact and non-contact. The two links below take you to descriptive pages on each type with a breakdown by more specific, detailed types under that simple, first breakout.

There are also vendors of each sensor type, some vendors sell more than one type and some sell nearly all types, but not always all brands. There are differences between brands and the differences are most evident among those device types for which there are few if any recognized standards. Start your search either for a specific temperature measurement device type or go to the vendor page index and you can access the vendors of specific types from there.

Both contact and non-contact sensors require some assumptions and inferences in use to measure temperature. Many, many well-known uses of these sensors are very straightforward and few, if any, assumptions are required. Other uses require some careful analysis to determine the controlling aspects of influencing factors that can make the apparent temperature quite different from the indicated temperature

1.2.3Analog-To-Digital ConverterAn analog-to-digital converter (abbreviated ADC, A/D or A to D) is a device which converts continuous signals to discrete digital numbers. The reverse operation is performed by a digital-to-analog converter (DAC).ResolutionThe resolution of the converter indicates the number of discrete values it can produce over the range of analog values. The values are usually stored electronically in binary form, so the resolution is usually expressed in bits. In consequence, the number of discrete values available, or "levels", is usually a power of two. For example, an ADC with a resolution of 8 bits can encode an analog input to one in 256 different levels, since 28 = 256. The values can represent the ranges from 0 to 255 (i.e. unsigned integer) or from -128 to 127 (i.e. signed integer), depending on the application.

Linear ADCs

Most ADCs are of a type known as linear, although analog-to-digital conversion is an inherently non-linear process (since the mapping of a continuous space to a discrete space is a piecewise-constant and therefore non-linear operation). The term linear as used here means that the range of the input values that map to each output value has a linear relationship with the output value

Non-Linear ADCs

If the probability density function of a signal being digitized is uniform, then the signal-to-noise ratio relative to the quantization noise is the best possible. Because of this, it's usual to pass the signal through its cumulative distribution function (CDF) before the quantization. This is good because the regions that are more important get quantized with a better resolution. In the dequantization process, the inverse CDF is needed.AccuracyAn ADC has several sources of errors. Quantization error and (assuming the ADC is intended to be linear) non-linearity is intrinsic to any analog-to-digital conversion. There is also a so-called aperture error which is due to a clock jitter and is revealed when digitizing a time-variant signal (not a constant value).

These errors are measured in a unit called the LSB, which is an abbreviation for least significant bit. In the above example of an eight-bit ADC, an error of one LSB is 1/256 of the full signal range, or about 0.4%.

Quantization ErrorQuantization error is due to the finite resolution of the ADC, and is an unavoidable imperfection in all types of ADC. The magnitude of the quantization error at the sampling instant is between zero and half of one LSB.

Sampling RateThe analog signal is continuous in time and it is necessary to convert this to a flow of digital values. It is therefore required to define the rate at which new digital values are sampled from the analog signal. The rate of new values is called the sampling rate or sampling frequency of the converter.

AliasingAll ADCs work by sampling their input at discrete intervals of time. Their output is therefore an incomplete picture of the behaviour of the input. There is no way of knowing, by looking at the output, what the input was doing between one sampling instant and the next. If the input is known to be changing slowly compared to the sampling rate, then it can be assumed that the value of the signal between two sample instants was somewhere between the two sampled values. If, however, the input signal is changing fast compared to the sample rate, then this assumption is not valid.ApplicationsAD converters are used virtually everywhere where an analog signal has to be processed, stored, or transported in digital form. Fast video ADCs are used, for example, in TV tuner cards. Slow on-chip 8, 10, 12, or 16 bit ADCs are common in microcontrollers. Very fast ADCs are needed in digital oscilloscopes, and are crucial for new applications like software defined radio.

1.2.4 MicrocontrollerA microcontroller (also MCU or C) is a functional computer system-on-a-chip. It contains a processor core, memory, and programmable input/output peripherals. Microcontrollers include an integrated CPU, memory (a small amount of RAM, program memory, or both) and peripherals capable of input and output. Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, remote controls, office machines, appliances, power tools, and toys. By reducing the size, cost, and power consumption compared to a design using a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to electronically control many more processes.

ProgramsMicrocontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assembly language are used to turn high-level language programs into a compact machine code for storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory.

Other Microcontroller FeaturesSince embedded processors are usually used to control devices, they sometimes need to accept input from the device they are controlling. This is the purpose of the analog to digital converter. Since processors are built to interpret and process digital data, i.e. 1s and 0s, they won't be able to do anything with the analog signals that may be being sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. There is also a digital to analog converter that allows the processor to send data to the device it is controlling.In addition to the converters, many embedded microprocessors include a variety of timers as well. One of the most common types of timers is the Programmable Interval Timer, or PIT for short. A PIT just counts down from some value to zero. Once it reaches zero, it sends an interrupt to the processor indicating that it has finished counting. This is useful for devices such as thermostats, which periodically test the temperature around them to see if they need to turn the air conditioner on, the heater on, etc.

Types of Microcontrollers ARM

MIPS (32-bit PIC32)

AVR

PIC (8-bit PIC16, PIC18, 16-bit dsPIC33 / PIC24)

V850

PowerPC ISE

AT-MEGA 16

1.2.5Liquid Crystal Display (LCD)Liquid crystal display (LCD) is an electro-optical amplitude modulator realized as a thin, flat display device made up of any number of color or monochrome pixels arrayed in front of a light source or reflector. It is often utilized in battery-powered electronic devices because it uses very small amounts of electric power.SpecificationsImportant factors to consider when evaluating an LCD monitor: Resolution: The horizontal and vertical size expressed in pixels (e.g., 1024x768). Unlike monochrome CRT monitors, LCD monitors have a native-supported resolution for best display effect.

Dot pitch: The distance between the centers of two adjacent pixels. The smaller the dot pitch size, the less granularity is present, resulting in a sharper image. Dot pitch may be the same both vertically and horizontally, or different (less common).

Viewable size: The size of an LCD panel measured on the diagonal (more specifically known as active display area).

Response time: The minimum time necessary to change a pixel's color or brightness. Response time is also divided into rise and fall time. For LCD Monitors, this is measured in btb (black to black) or gtg (gray to gray). These different types of measurements make comparison difficult. Matrix type: Active TFT or Passive. Color support: How many types of colors are supported (coll., more specifically known as color gamut). Brightness: The amount of light emitted from the display (coll., more specifically known as luminance). Contrast ratio: The ratio of the intensity of the brightest bright to the darkest dark. Input ports (e.g., DVI, VGA, LVDS, DisplayPort, or even S-Video and HDMI).1.3Serial InterfacingA serial port is a computer interface that transmits data one bit at a time. In common use, the term serial port refers to ports that use a particular asynchronous protocol.

These ports include the RS-232 ports on PCs and many serial ports in embedded systems. Most serial ports are bidirectional: they can both send and receive data. Transmitting one bit at a time might seem inefficient but has advantages, including the ability to use inexpensive cables and small connectors.

Serial ports are ideal for many communications between embedded systems or between embedded systems and PCs. Serial ports can also be a good choice when you need very long cables or a basic network among PCs, embedded systems or a combination. Some systems include a serial port that is hidden from users but available to technicians for debugging and diagnostics.

1.3.1Popular Computer Interface Specifies the Typical Maximum

1.3.2System ComponentsCommunicating via serial ports requires three things: computers with serial ports, a cable or wireless interface that provides a physical link between the ports, and programming to manage the communications.

1.3.3 ComputerJust about any computer can use serial-port communications, including inexpensive microcontrollers and PCs that dont have built-in serial ports.

1.3.4 Physical LinkThe physical link between computers consists of the wires or other medium that carries information from one computer to another and the connectors and other components that interface the medium to the computers.

RS-232 links can use just about any cable type and require one line per signal plus a common ground line. RS-485 networks typically use twisted-pair cables with a pair for each differential signal. Other options for serial communications include fiber-optic cable, which encodes data as the presence or absence of light, and wireless technologies, which enable sending data as electromagnetic (radio) or infrared signals through the air. Computers connected by wires must have a common ground reference, typically provided by a ground wire in the cable.

1.3.5 ProgrammingA computer must perform the following tasks in serial communications:

Detect and process received data.

Provide and send data as needed.

Carry out any other tasks the computer is responsible for.

If the connection is to a serial network, each computer must ignore communications intended for other computers in the network and comply with network protocols for addressing transmitted data to the appropriate computer(s). Program code carries out these tasks, often with help from hardware.

1.3.6 LanguagesThe programming for a serial interface can use any language, and the language doesnt have to be the same on every computer. The only requirement is that all of the computers must agree on a format. Microcontroller programs might access UART registers directly or use library functions or other higher-level methods to set communications parameters and exchange data. PC applications typically use higher-level functions to access ports.

1.4 HMI (Human Machine Interface)The user interface of a mechanical system, a vehicle or an industrial installation is sometimes referred to as the Human-Machine Interface (HMI). HMI equipment from Telemecanique spans from simple text displays, graphical operator panels, touchscreens, industrialised PCs (iPC), Supervisory Control and Data Acquisition (SCADA) and web-based HMI Solutions.

HMI provides a competitive advantage and significant business benefits. Optimisation of process control through full access to process data in real-time

Flexible and scalable easily adaptable solutions to different user needs

A HMI represents the front end of a machine, the visible window into the process.Good HMI aesthetics and ergonomy are often key selling features for machines.

Rapid machine set-up and changeover, via easily re-configurable hardware and software products

Improved efficiency and minimised downtime - with pin-point maintenance information, intelligent troubleshooting and on-line help1.5Distributed Control SystemA distributed control system (DCS) refers to a control system usually of a manufacturing system, process or any kind of dynamic system, in which the controller elements are not central in location (like the brain) but are distributed throughout the system with each component sub-system controlled by one or more controllers. The entire system of controllers are connected by networks for communication and monitoring.1.5.1ElementsA DCS typically uses custom designed processors as controllers and uses both proprietary interconnections and protocols for communication. Input & output modules form component parts of the DCS. The processor receives information from input modules and sends information to output modules. The input modules receive information from input instruments in the process and transmit instructions to the output. Computer buses or electrical buses connect the processor and modules through multiplexers/demultiplexers. Buses also connect the distributed controllers with the central controller and finally to the Human-Machine Interface (HMI) or control consoles1.5.2Application of DCS in Our ProjectWe investigate, design and implement distributed control systems, ranging from networked and embedded control systems to automation and control systems. Our research interests include: Time sensitive networked control systems

Real-time control systems

Control methods for recource-constrained control systems

Adaptive resource allocation

Schedulability analysis

2.Technical Data2.1Block Diagram

2.2Components List2.2.1LM35Precision Centigrade Temperature SensorsThe 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. 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.2.2.2ADC08048-Bit P Compatible A/D ConvertersThe ADC0804 are CMOS 8-bit successive approximation A/D converters that use a differential potentiometric ladder. This converter is designed to allow operation with the NSC800 and INS8080A derivative control bus with TRI-STATE output latches directly driving the data bus. This A/D appear like memory locations or I/O ports to the microprocessor and no interfacing logic is needed.

2.2.3 Microcontroller 89C518-Bit with 4k BytesThe AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pinout. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications.

2.2.4MAX232 & RS232RS-232 is an interface that is suitable for many basic communication tasks between two computers. RS-232 is designed to handle communications between two devices with a distance limit of around 80 to 130 ft, depending on the bit rate and cable type.RS-232 uses unbalanced, or single-ended, lines.

The MAX232 includes two drivers that convert TTL or CMOS inputs to RS-232 outputs and two receivers that convert RS-232 inputs to TTL/CMOS-compatible outputs. The drivers and receivers also invert the signals.2.3Circuit DescriptionOur digital thermometer consists of four units, Power Supply, Main Control Unit, Analog Unit and Digital or Display Unit.2.3.1 Power SupplyWe have separately developed a power supply for our digital thermometer. This power supply is providing 5 volts regulated power to all three units at the same time.2.3.2 Main Control UnitIn main control unit we use 89c51 microcontroller with a crystal frequency is 11.095 to achieve baud rate of 9600.it has a reset circuit and we only use internal memory and deactivate EA pin. 2.3.3Analog UnitAn 8 bit ADC is used which convert the data receive from temperature sensor connected to pin 6 of ADC, a 10 k resistor and 150 pf capacitor is used to generate clock pulse and a 10 k variable resister is required to set the reference.

The sequence of conversion of data is as follows:1. CS ( pin 1) is applied to activate the ic

2. WR (pin 3) is applied to get the analog value

3. INT (pin 5) gives the indication that the indication is complete.

4. RD ( pin 2) signal is applied to get the digital converted value

2.3.4Display UnitThe last section consists of LCD Module and output to PC. Signals are sent to the LCD for the display of temperature in degree centigrade and degree ferenheit.This can also be seen through PC by implementation of the signals to MAX232, which is connected to Serial Connector RS232.This RS232 is then connected to the printer port of the computer, so that parameter like temperature could be seen on the PC.2.5 Programmme#include

#include

#define ADDRESS 'B'

sfrldata = 0x80;

sfradc = 0x90;

sbitadccs=P3^0;

sbitadcrd=P3^1;

sbitadcwr=P3^2;

sbitadcint=P3^3;

sbitrelay=P3^7;

sbit rs

= P2^7;

sbit rw

= P2^6;

sbit en

= P2^5;

sbitcheck = P1^0;

unsigned charADC;

void MSDelay(unsigned char itime)

{

unsigned int i,j;

for(i=0;i9)

{

r = r2/10;

r2 = ceil(r);

if(r2 != r)

r2--;

r = (r-r2)*10;

r = RoundOff(r);

ValString[0] = ((char)r2)+48;

r2 = r;

}

ValString[1] = ((char)r2)+48;

LCDString(ValString);

}

void PrintInteger(float PInt)

{

unsigned char ValString[6] = {' ', ' ',' ', '.', ' ', '$'};

floatValPint = PInt;

floatRoundPint;

floatDecPint;

floatr;

RoundPint = ceil(ValPint);

if (RoundPint > ValPint)

RoundPint--;

DecPint = (ValPint-RoundPint)*10;

DecPint = RoundOff(DecPint);

ValString[4] = ((char)DecPint)+48;

ValPint = RoundPint;

DecPint = RoundPint/10;

RoundPint = ceil(DecPint);

if(RoundPint > DecPint)

RoundPint--;

DecPint = (DecPint-RoundPint)*10;

DecPint = RoundOff(DecPint);

ValString[2]= ((char)DecPint)+48;

ValPint = (ValPint-DecPint)/10;

if (ValPint > 9)

{

RoundPint = ValPint / 10;

DecPint = ceil(RoundPint);

if (DecPint > RoundPint)

DecPint--;

RoundPint = (RoundPint-DecPint)*10;

ValPint = RoundPint;

ValString[0]= ((char)DecPint)+48;

}

ValString[1]= ((char)RoundPint)+48;

LCDString(ValString);

}unsigned char GetADC()

{

unsigned char AdcData;

adc = 0x0ff;

adccs = 0;

MSDelay(10);

adcwr = 0;

MSDelay(10);

adcwr = 1;

MSDelay(5);

adcrd = 0;

MSDelay(10);

AdcData = adc;

adcrd = 1;

adccs = 1;

return(AdcData);

}

unsigned int C2F(unsigned char DC)

{

return (135.8);

}

voidIntilizeTimer(void)

{

TMOD = 0x20;

TH1 = -3;

SCON = 0x50;

TR1 = 1;

}

voidTransmit(unsigned char Trans)

{

SBUF = Trans;

while (TI == 0);

TI = 0;

}

unsigned charReceive(void)

{

unsigned char Rec = '%';

while (RI == 1)

{

Rec = SBUF;

RI = 0;

}

return (Rec);

}

voidTransmitAscii(unsigned char AsciiData)

{

floatUnit,Ten;

floatHund = 0;

floatx = AsciiData;

floatx2;

x = x / 10;

x2 = ceil(x);

if (x2 > x)

x2--;

x = ((x- x2)*10);

Unit = ceil(x);

if(Unit > x)

Unit--;

Unit = Unit;

x = AsciiData;

x2 = (x - Unit)/10;

if (x2 > 9)

{

Ten = x2;

//Temp

x = x2 / 10;

x2 = ceil(x);

if(x2 > x)

x2--;

Hund = x2;

x2 = (x -x2)*10;

}

Ten = x2;

Transmit(((char)Hund)+48);

MSDelay(10);

Transmit(((char)Ten)+48);

MSDelay(10);

Transmit(((char)Unit)+48);

MSDelay(10);

Transmit('$');

MSDelay(10);

}

void main(void)

{

char loop = 0;

unsigned chardeg_c = 0;

floatdeg_f = 0;

unsigned char Instruction;

//TransmitAscii(155);

Intilize();

IntilizeTimer();

relay = 0;

Location(1,2);

LCDString("Deg C$");

Location(2,2);

LCDString("Deg F$");

while(loop == 0)

{

Location(1,8);

deg_c = GetADC();

Instruction = Receive();

if (Instruction != '%')

{

switch (Instruction)

{

case 'Q':

relay = 0;

break;

case 'q':

relay = 0;

break;

case ADDRESS:

relay = 1;

Transmit('$');

break;

case 'd':

TransmitAscii(deg_c);

break;

}

}

PrintChar(deg_c);

//

Location(2,2);

//

PrintInteger(deg_f);

//

deg_c++;

//

deg_f = deg_f + 0.1;

//

deg_c = GetADC();

//

deg_f = C2F(deg_c);

}

}

2.6Key Specification Of The Project2.6.1 Vital StatisticsTemperature Range: 37o C, (97-100o F)Accuracy: 0.5 C. Sensor: Uses LM 35 in two units B & C, potentiometer used in unit A to show variation in temperature for dummy reading.Data Connection: RS-232 PC serial computer interface9600 baud rate. COM1 connector to computer.Size Of Main Unit: 3.5" x 2.25" x 1".

Power Supply: 5V battery

Weight: 280 grams (9.9 ounces) including batteryDisplay: Large, easy to read VGA monochrome LCD.

3.Project ManagementAprilAs soon as project was selected, an extensive research was being done covering all the aspects of the project. Internet was the primary source to gather information about working principle and components used in digital thermometer.

May & JuneIt is also necessary to study and collect data about distributed control system (DCS) on which basically our project works, study and selection of suitable microcontroller was the next task to be done. July & AugustPurchasing of components was the next step, which is a long and tedious job with multiple visits to Electronic market during the period of our semester break. Finally we selected MCS 89C51 as our controller, several small practical were performed on it to check its performance. SeptemberInterfacing of MCS51 with ADC and LCD was the next task to be performed by us, which is not the easy job because firstly experiment with ADC had to be done then the interfacing and then test codes for ADC was performed. Same procedure was applied for LCD, after experiment with LCD module interfacing was done and then test codes for LCD module.OctoberTo complete the analog part Designing and fabrication of PCBs was done by taking help with our supervisors Madam Uzma and Madam Shafia. Fabrication of PCBs required much time in the mean while we acquire knowledge about RS 232 port and Max232 port for serial communication.NovemberAssembling of components was done on PCBs so that analog part should be completed before final semester exams. Programming of C language for microcontroller was the major step done in this month.DecemberDigital part was the next step so test codes for serial communication via HyperTerminal for LCD and also for PC interfacing for that we require VB programming. We have faced many problems in interfacing with PC because when we interface 3 of our modules with computer and on giving 0 1 logic we are getting noise instead of any result, this actually happens because we do not know the tristate. After studying the tristate we came to know that the basic logic behind it is that PC first calls all the modules then it interfaces with one module at a time and the other two stay at rest , but this is happening so quickly that we are getting all the three results at the same time.After the successful testing of project by achieving temperature in Centigrade and in Fahrenheit on both LCD and on PC, we work on the last step of our project which is finalizing of our project report and preparing for poster presentation. ReferencesWebsites1. www.linuxfocus.org/English/February2005/article365.shtml - 2. www.beyondlogic.org/serial/serial.htm - 3. www.arcelect.com/rs232.html - 4. www.datasheetcatalog.com/datasheets_pdf/L/M/3/5/LM35.shtml -5. dcs.upc.edu/

6. www.schneider-electric.co.uk/electricity.nsf/automation-control/hmi-human-machine-interfaces-

Books1. Lakeview.Research.Serial.Port.Complete.2nd.Edition.Dec.2007

COMPUTER

PC

COMPUTER INTERFACING UNIT

LCD

SENSOR

LM35

A/D

UNIT

MCU

ATMEL

80C51

LCD

SENSOR

LM35

A/D

UNIT

MCU

ATMEL

80C51

LCD

MCU

ATMEL

80C51

A/D

UNIT

SENSOR

LM35

PAGE