You are on page 1of 37

A Project Report On TEMPERATURE MONITORING SYSTEM USING MICROCONTROLLER Submitted In Partial Fulfillment Of The Requirements For The Award

Of The Degree of BACHELOR OF TECHNOLOGY IN ELECTRONICS AND COMMUNICATION ENGINEERING Submitted by 1 D.V.Rammohan Rao. 3 B.Ravi Prasad. 2 N.Sasikala. 4 K.Savithri Devi.

UNDER THE GUIDANCE OF Department of Electronics and Communication Engineering PRAGATI ENGINEERING COLLEGE,SURAMPALEM (Affiliated to JNT University, Hyderabad) SURAMPALEM 2005

ACKNOWLEDGEMENT
The completion of project is the milestone in students life and the success greatly enhances the self-confidence of students as well as the constant inspiration through practical life. The success of project essentially lies in the hands of guide. Words are poor gratitude to bearers but I take this opportunity to offer other sincere gratitude to our esteemed HEAD OF THE DEPARTMENT For his constant valuable suggestions help and noble guidance with out this, project would have never seen light of success. My special thanks to the guide who was font of information and constant source of inspiration. I express my gratitude to our principal for his kind patronage in carrying out this project. Lastly I thank my college lab assistance and other staff for giving constant encouragement and constructive criticism, which is invaluable.

COMPANY PROFILE The National Small Industries Corporation Ltd. (NSIC) was established in 1955 by the Government of India with a view to promote, aid and foster the growth of Small Industries in the country. NSIC continues to remain at the forefront, with its various programs and projects, to assist the small-scale sector in the country. Recent Transitions of industrial climate and liberalization arena has witnessed tremendous changes in the

domestic as well as international markets. These sudden changes have thrown up as many opportunities as challenges to the small-scale enterprises in the country.

Over a period of four decades of this rescission, growth and development of small-scale sector, it has proved its strength within the country and abroad dynamically, showing its progressive attitude towards modernization, up gradation of technology, quality consciousness, strengthening linkages with large and medium scale enterprises and boosting exports of products from small enterprises. The small-scale sector continues to remain an important instrument for enterprise-building, dispersal of industries for even regional economic development and employment generation. NSIC has been successfully able to plan its assigned role in this endeavor.

Due to changed industrial scenario and gradual globalization of the economy, small-scale sector has to face stiff competition as the insulated and protected market conditions are no more going to be available to it. To enable the small-scale industry to meet this challenge, NSIC has already initiated various steps so that SSI can play their due role, even during polarization of various economic forces.

A SPECTRUM OF ACTIVITIES: NSIC provides diversified support through its wide spectrum of programs of TSC to cater to their different needs related to multi-products and multi-locations markets. It has adopted a multi-pronged approach to effectively serve the various needs of TSC. Assistance by NSIC to Small Scale Units to sell their goods and services to government

departments and agencies, through 'Single Point Registration Scheme', provides a vast marketing opportunity.

The corporation also arranges indigenous as well as imported raw materials and parts to ensure that the production cycle of SSI continues without break and they are able to produce high quality products. But that's not all. There is a lot more to NSIC. The organization operates Hire purchase and Equipment Leasing Schemes for providing machinery and equipment at doorsteps of the entrepreneurs. These schemes not only have been able to generate a class of First Generation Entrepreneurs to set up enterprises with minimum investment, the schemes have also acted as stimulants to the existing entrepreneur for expansion, diversification, modernization and technology up gradation. Through a chain of five NSIC Technical Service Centers that are located at different parts of the country, NSIC offers workshops, testing laboratories and common facilities to the entrepreneurs and their workmen are provided with avenues for skill up gradation through training in various technical trades. To encourage exports, NSIC has set up Software Technology Parks providing complete infrastructure to enable small entrepreneurs to undertake Software exports. PROGRESS CHARTS: -

Training Support: Persons Trained by NSIC-TSC/NSIC-TSEC in technical trade: 64019 Persons trained in the year 2000-2k2: 7214 . Improved toolkits developed to enhance the

productivity of rural artisans and urban technicians. 4190 toolkits supplied in the year 2000-2k.

Growth Indicators: Persons employed by units under hire purchase and equipment leasing: 3,00,000 sales turnover during 2000-2k ($ Billions)(Provisional): 9.42

NSIC TECHNICAL SERVICES CENTER: To provide technical services to small-scale industries, NSIC has Setup five Technical Service Centers (TSC) all over India. The center at Hyderabad is located at Kushaiguda Electronic complex, catering to the needs of Electronic Industries.

Objectives: To impart practical and class room training in several industrial Trades. Special training programs have been introduced for rural artisans, weaker sections of the society and physically handicapped. To provide common facilities in areas like PCB testing, designing, wave soldering, CNC jobbing and provision of test equipments for use by SSI. To develop prototypes of electronic equipments and import substitutes. These are then passed on to the manufacturing units for commercial production under Technology transfers.

Activities: -

Common facilities Prototype development Technology Transfer Human Resource Development Technical Training Placements Seminars and Workshops

Training Areas: -

Computers: Electronics:

Software Training, Hardware Maintenance Assembling & testing

Fiber Optics: Applications CNC: Milling, Tuning

Common Facilities: -

Communication Equipment Testing Electronic Components Testing Consumer Electronic Testing Product Testing PCB Designing, Art Work

Plotting PCB Fault Location and Repair PCB Assembling Job Work PCB Anti-Static Assembly Components Forming Wave Soldering DIP Soldering Precision Turning Jobs ON CNC Lathe

ASSISTING COUNTRIES WORLDWIDE: NSIC is committed to accelerate the growth of the small-scale sector not only in India but also in similar countries worldwide. NSIC efforts in assisting other countries with infrastructure facilities and support service have been worthy.

SOFTWARE TECHNOLOGY PARKS: Keeping in view the potential in the area of Software Exports and to create facility for the promotion of Small Scale Units and also provide place to negotiate with the units from abroad, NSIC has set up a NSIC-STP COMPLEX under Software Technology Parks of India (STPI).

Software Technology Parks facilitate Small Scale units to establish their units for the 100% export of software and also act as the nodal to activate software exports directly through NSIC. NSIC-STP COMPLEX at Okhla is one of such parks set up by NATIONAL SMALL INDUSTRIES CORPORATION under the STPI scheme to promote Small Entrepreneurs in software development. NSIC-STP provides high-speed data

communication facilities through VSNL/SATCOM networks, built-up office space, and uninterrupted power supply, backup power through DG sets, a modern business center and administrative support.

INDEX

1. INTRODUCTION 2. BLOCK DIAGRAM 3. THE AT89C51 MICRO CONTROLLER 4. TEMPARATURE SENSORS 5. A/D CONVERTER 6. POWER SUPPLY 7. CIRCUIT DESIGN AND WORKING 8. SOFTWARE SECTION

INTRODUCTION

Transducers convert physical data such as temperature, light intensity,flow and speed to electrical signals. Depending on the transducer, the transducer, the output produced in the form of voltage, current, resistance, or capacitance. By using temperature transducer we can convert the temperature into electrical pulses. The temperature transducers are also called as temperature sensors. The temperature sensors are mainly classified as two types. 1. Linear temperature sensors. 2. Non-Linear temperature sensors. In Linear temperature sensors the output is varied linearly according to the temperature variation at the input. Ex:- LM 35 Series. In LM35 Series ICS the ouput voltage is varied linearly according to the temperature variation of the input. In Non-Linear temperature sensors the output response is not linear to the temperature variation at the input. Ex:- Thermistor. In thermistor the output resistance is varied non linearly according to the temperature variation at the input. In this project , monitoring the temperature of the environment which is the complex system that relies on software, hardware systems working together. Also the work cycle of the system is clearly programmed in microcontroller. By using the temperature sensor we can identify variation of the temperature. In LM 35 series temperature sensors the output voltage is varied linearly proportional to the Celsius(centigrade) temperature.

BLACK DIAGRAM

SENSOR

DATA CONVERSION

CRYSTAL OSCILLATOR

MICROCONTROLLER (DATA PROCESSING)

CMOS SHIFT REGISTER

(OUTPUT) DISPLAY

MICRO-CONTROLLER
Micro controller unit is constructed with ATMEL 89C51 Micro-controller chip, The ATMEL AT89C51 is a low power, higher performance CMOS 8-bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM). Its highdensity non-volatile memory compatible with standard MCS-51 instruction set makes it a powerful controller that provides highly flexible and cost effective solution to control applications. Micro-controller works according to the program written in it. The program is written in such a way, so that the output from the ADC will be converted into its equivalent voltage and based on the magnitude of the voltage, it calculates the parameter value. Now this magnitude is again digitalized and fed to 7-segment display unit through the latch. Micro-controllers are embedded inside some other device so that they can control the features or actions of the product. Another name for a micro-controller, therefore, isembedded controller. Micro controllers are dedicated to one task and run one specific program. The program is stored in ROM (read only memory) and generally does not change. Micro-controllers are often low-power devices. A battery-operated micro-controller might consume 50 milli watts. A micro-controller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A microcontroller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. DETAILS ABOUT MICRO CONTROLLER The Micro controller is a chip, which has a computer processor with all Its support functions, memory (both program storage and RAM)), and I/O built into the device. These built in functions minimize the need for external circuits and devices to be designed in the final applications. Most micro controllers do not require a substantial

amount of time to learn how to efficiently program them, although many of them have quirks which you will have to understand before you attempt to develop your first application. Along with Micro Controllers getting faster, smaller and more power efficient they are also getting more and more features. Often, the first version of micro controller will just have memory and simple digital I/O, but as the device family matures, more and more part numbers with varying features will be available. With all the 8051 manufacturers products taken into account, there are over two hundred different 8051 part numbers, each with different features and capabilities. For most applications, we will be able to find a device with the family that meets our specifications with a minimum of external devices, or an external but which will make attaching external devices easier, both in terms of wiring and programming. For many Micro Controllers, programmers can be built very cheaply, or even built into the final application circuit eliminating the need for a separate circuit. Also simplifying this requirement is the availability of micro controllers with SRAM and EEPROM for control store, which will allow program development without having to remove the micro controller from the application circuit.

DIFFERENT TYPES OF MICRO COTROLLERS Creating applications for micro-controllers is completely different than any other development job in computing and electronic. In most other applications, we probably have a number of sub systems and interfaces already available for our use. This is not the case with a Micro-controller, where we are responsible. a) Power distribution b) System clocking c) Interface design and wiring

d) Systems programming e) Application programming f) Device programming These work items might seem be obvious, but having to do them all is really quite profound in modem computing system development. In no other aspect of electronics are all these requirements found. The process is also made more enjoyable by learning how to work with the features built in to the devices that are designed to simplify the task of directly connecting to another devices. Often, very useful applications can be created using a micro-controller and a few passive components.

EMBEDDED MICRO CONTROLLERS When all the hardware requires to run the application is provided in the chip, it is referred to as an embedded micro controller. All that is typically required to operate the device is power, reset, and a clock. Digital I/O pins are provided to allow interfacing with external devices. This complete hardware on a chip is extremely useful for some applications. Embedded micro controllers are now replacing some very common devices like 555 timers because they are actually cheaper to use in applications and they are much more precise and easier to control.

MICRO-CONTROLLER MEMORY TYPES Memory is probably not something we normally think about when we create applications for a personal computer. In a micro-controller, understanding how much memory we have and how its architect is critical, especially when we are planning on

how to implement the application code. In a micro-controller, memory for different purposes is typically segregated and arranged to allow the device to execute most efficiently.

89C51 ARCHITECTURE DETAILS This application note illustrates the in-circuit programmability of the Atmel AT89C51 Flash-based microcontroller. Guidelines for the addition of in-circuit programmability to AT89C51 applications are presented along with an application example and the modifications to it required to support in-circuit programming. A method is then shown by which the AT89C51 microcontroller in the application can be reprogrammed remotely, over a commercial telephone line. The circuitry described in this application note supports 5volts programming only, requiring the use of an AT89C51-XX-5. The standard AT89C51 requires 12 volts for programming. The software for this application may be obtained by downloading from Atmels BBS: (408) 436-4309. General Considerations Circuitry added to support AT89C51 in circuit programming should appear transparent to the application when programming is not taking place .EA/VPP must be held high during programming. In applications which do not utilize external program memory, this pin may be permanently strapped to VCC. Applications utilizing external program memory require that this pin be held low during normal operation. RST must be held active during programming. A means must be provided for overriding the application reset circuit, which typically asserts RST only briefly after power is applied. PSEN must be held low

during programming, but must not be driven during normal operation. ALE/PROG is pulsed low during programming, but must not be driven during normal operation. During programming, AT89C51 I/O ports are used for the application of mode select, addresses and data, possibly requiring that the controller be isolated from the application circuitry. How this is done is application dependent and will be addressed here only in general terms. Port Used for Input During programming, the controller must be isolated from signals sourced by the application circuitry. A buffer with three state outputs might be inserted between the application circuitry and the controller, with the buffer outputs three-stated when programming is enabled. Alternately, a multiplexer might be used to select between signal sources, with signals applied to the controller by either the application circuitry or the programmer circuitry. Port Used for Output circuitry must be maintained during programming, a latch might be inserted between the controller and the application circuitry. The latch is enabled during programming, preserving the state of the application circuitry.

An Application Example The AT89C51 application is an implementation of a moving display. This application was selected for its simplicity and ability to show graphically the results of incircuit re programming. The text to be displayed is programmed into the controller as part of its firmware, and cannot be changed without reprogramming the device.0287D-B9/97 8-Bit Micro controller with Flash Application

The displayed text is presented in one of two modes selected by the four-position DIP switch. In the first mode, one character at a time enters the display from the right and moves quickly to the left through each element of the display to its final position in the assembled message. In the second mode, the message moves through the display, from right to left, with the display acting as a window onto the message. This mode is familiar as the method often used in displays of stock prices. The output consists of four DL1414T, four-digit, 17-segment alphanumeric displays with integral the coders and drivers. This yields 16 total display elements, each capable of displaying digits 0-9, the upper case alphabet, and some punctuation characters. The displayable character codes are ASCII 20H-5FH.A power-on reset circuit and a 6-MHz crystal oscillator complete the application. Neither external program memory nor external data memory is used. Modifications to the Application to Support In-Circuit Programming The application modified for in-circuit programming. It is assumed that the programmer, when inactive, will neither drive nor excessively load the application. Since the application does not use external program memory, EA/VPP on the controller is connected to VCC. This meets the requirement for programming. The reset circuit has been modified by the addition of two transistors, which allow RST on the controller to be forced high by the programmer. PSEN and ALE/PROG, unused in the basic application, are under the direct control of the programmer. Programming requires programmer access to all of the fourAT89C51 I/O ports, as documented in the data sheet. The programmer is connected directly to those controller pins which are unused by the application, while access to pins used by the application requires special treatment, as explained in the following paragraphs. The least significant four bits of the address generated by the programmer are multiplexed onto port one of the controller with the data from the DIPswitch. Note that the four resistors added at the switch are not required in the basic application, since the AT89C51 provides internal pull-ups on port one. During the normal operation of the application, controller ports zero and two provide data and control signals (respectively) to the displays. During programming and program

verification, the programmer asserts control of port zero and part of port two. The programmer is connected to ports zero and two without buffering, since, when inactive, its presence does not affect the normal operation of the application. A transparent latch has been added between port 2 of the controller and the display control inputs. The latch holds the display control signals inactive during programming, which eliminates erratic operation of the displays due to programmer activity on ports 0 and 2. No isolation of the display data inputs is required, since data applied to the inputs is ignored when the control signals are inactive. The AT89C51 reset circuit, input multiplexer and output latch are controlled by a single signal generated by the programmer. During programming, reset is asserted, the multiplexer switches inputs, and the latch freezes the display control lines. To ensure that the display control lines are in a known state before they are latched, an AT89C51 external interrupt is used to allow the programmer to signal the application before asserting reset. The application firmware responds to the interrupt by displaying a message and deactivating the display control lines. After programming, when reset is deasserted, the controller ports are high as the latch becomes transparent. Since the display control inputs are inactive high, the display contents are not disturbed until the new program writes the display. Although not essential to this application, it might be imperative in some applications that the state of the peripheral circuitry not be disturbed during programming. The Programmer The programmer generates the addresses, data and control signals necessary to program the AT89C51embedded in the application .The programmer circuitry consists of an AT89C51 and anRS-232 level translator. The controller runs at 11.0592MHz, which allows the serial port to operate at a number of standard baud rates. A Maxim MAX232 line driver/receiver produces RS-232 levels at the serial interface while requiring only a 5volt supply. Many of the signals generated by the programmer are connected directly, without buffering, to the AT89C51 in the application. These signals, when inactive, are not three stated, but are pulled high. The AT89C51 has internal pull-ups of approximately 3K ohms on ports one, two and three. Because port zero does not have internal pull-ups,

external pull-ups of 10Kohms have been added to permit proper operation of program verification mode. The sample application operates correctly in this environment. If required for compatibility with an application, programmer signals may be buffered with three-state buffers similar to the 74xx125.The AT89C51 in the programmer does not utilize external program or data memory, which would require sacrificing. Micro controller Remote Programming Over a Commercial Telephone Line The programmer and display application described previously are connected to a phone line via a modem at remote site. Using a personal computer with a modem, a user can upload a new program containing a new message, which is programmed into the AT89C51 embedded in the application. When programming is complete, the application executes the new program, which displays the new message. Local Station The local station in the test configuration consists of an IBMPC AT-class computer connected to a Hayes-compatible, Prometheus 1200baud modem. The modem was selected because it was inexpensive and available. A faster modem may be used if desired, although once the file transmission time is reduced below one minute, further reductions in transmission time do not further reduce connect time charges. A possible advantage to higher transmission speeds is the automatic error detection and correction available in some high-speed modems. Procomm Plus version 2.01, a commercial data communications package, is used to configure the modem, set up communications parameters, and establish a link with the remote modem. Procomm Plus includes a macro language called ASPECT, which allows the user to write and compile scripts, which implement custom file transfer protocols. A simple ASPECT script was written to read the contents of a program file and upload it to the remote programmer. The file transfer protocol (FTP) implemented is a simple send-and-wait, packet-oriented protocol. The transmit and receive modes of the FTP are illustrated by the flowchart in figures 4 and 5,

respectively. The transmitter sends each packet without flow control and waits for a response. The programmer (the receiver) reads and dissects the packet while calculating a checksum. If the calculated checksum is valid, the programmer acknowledges the packet by sending an ACK. If the checksum is in error, the programmer negatively acknowledges the packet by sending a NAK. Upon receipt of an ACK, the transmitter sends the next packet. If the transmitter receives a NAK, it resends the same packet. Transmission proceeds in this manner until the entire file has been transferred. The programmer might respond to a packet by sending a CAN, which indicates that a nonrecoverable error has occurred and that the transmitter should immediately abort the file transfer. If the programmer fails to respond to a packet within a limited period of time, the transmitter will resend the same packet. The transmitter will continue to resend the same packet until a valid response is received or until the allowed number of attempts is exceeded, at which time the file transfer is aborted. After each packet is received and validated by the programmer, the data contained in the packet is programmed into the AT89C51 controller in the application. After programming, the data is read back from the controller and verified against the received packet data. Successful verification indicates successful programming, causing the programmer to send ACK to the transmitter. If programming fails, the programmer sends CAN to signal the transmitter to abort the file transfer. The simplicity of the FTP reduces the amount of AT89C51program memory used in the programmer. The send-and wait nature of the FTP allows inter-packet delays due to AT89C51 program and erase times to be easily absorbed. Support for program verification is transparent, requiring no explicit command or result codes, or additional data transfers. The files which are loaded up to the programmer are created with the tools in the Intel MCS-51 Software Development Package for the IBM PC, Included in the package are the MCS-51 Macro Assembler, MCS-51 Re locator and Linker, and a useful utility, OH. OH converts an absolute8051 object file to an equivalent ASCII hexadecimal object file. The records in the hex file produced by the OH utility serve, unchanged, as the packets in the FTP described above; no service fields need to be added. The colon, which begins each record, serves as the packet signature field. The load address field serves as the packet sequence number. A checksum is provided as the last field in each record. Since even-bit ASCII coding is utilized, the eighth bit of each byte is available to

be used for parity checking. Because the AT89C51 in the programmer does not utilize external data memory, necessary packet buffering must be done using internal RAM. Limited memory precludes the use of conventional FTP which utilize packets of 128bytes and larger. The hex packet format used in this application limits packet data fields to 16 or fewer entries, requiring little memory for buffering. The ready availability of a utility for creating the packet sized program file, combined with small packet size and adequate error checking, makes the hex packet format a near ideal solution for this application. A disadvantage is the use of ASCII, which requires each program data byte to be expressed as two hex characters. This demands that nearly twice as many bytes be transferred as might otherwise be required. This is not a severe limitation, however, since typical file transfer times are less than one minute. Overall, the simplicity of the custom FTP/hex packet format implementation outweighs the drawbacks.

Remote Station The remote station in the test configuration consists of the display application and programmer circuits, described previously, connected to a Hayes-compatible, Prometheus needed I/O pins. This requires that program code and I/O buffers be kept small enough to fit in on-chip memory. Microcontroller 1200baud modem. During normal operation, the application executes its internal program while the modem and programmer monitor the phone line for incoming calls. After a call has been detected and a connection established, the programmer forces the application to suspend execution of its program. The new program is then downloaded and programmed into the AT89C51 embedded in the application. When programming is complete, the application is allowed to begin execution of its new program and the programmer returns to monitoring the phone line for the next call. The programmer powers up with its programming control outputs inactive, allowing the application to run

normally. After configuring the modem to answer incoming calls, the programmer puts itself to sleep. The programmer will not disturb the application until a new program is to be downloaded. The programmer controls the modem by sending ASCII command strings over the serial interface, to which the modem responds with Hayes-style ASCII numeric codes. The software is designed for use with Hayes-compatible modems, which includes the Prometheus Pro Modem 1200used here. The serial interface, through which the programmer connects to the modem, supports two handshaking signals, DTR and DSR. On power up, the programmer asserts DTR, to which the modem responds by asserting DSR. If the modem should fail to respond to any command, including the command to hang up, the programmer deasserts DTR, which forces the modem to drop the line. The modem monitors the phone line while the programmer sleeps, waiting for an incoming call. When a call is detected, the modem answers and attempts to establish communication with the caller. If a connection is established, the modem sends a code to the programmer, waking it up. The programmer verifies the connect code and begins polling for a valid packet header. Incoming packets must arrive fewer than thirty seconds apart, or the modem drops the line (hangs up) and the programmer returns to sleep, waiting for the next call. If the caller hangs up, the thirty-second period must expire before another call will be answered. Calls incoming during their set delay period are ignored. If a valid packet header is received prior to the expiration of the reset delay period, the programmer will attempt to read and validate the incoming packet. At any time during packet reception, an invalid character, parity error or timeout during character reception will cause the partial packet to be declared invalid and discarded. Two packet types are defined: data and end-of-file. A data packet contains five fields in addition to the packet header, one of which is a variable length data field. The data field contains program data to be written into the AT89C51 controller in the application. The load address field contains the address at which the data is to be written. The end-of-file packet contains the same fields as the data packet, except that the data field is empty. This packet type has special meaning to the programmer, as explained below any packet, which contains an invalid record type, record length or checksum is invalid. Program data accumulated during the processing of an invalid packet is discarded. The programmer sends a NAK to the transmitter to signal reception of an invalid packet and resumes

polling for a valid packet header. Receipt of the first valid data packet causes the programmer to interrupt the application controller. The controller responds to the interrupt by abandoning execution of its usual program and displaying a message indicating that programming is taking place. If this is the first valid data packet since power was applied or an end-of-file packet was received, the programmer asserts the control signals necessary to erase the program memory in the application controller. The programmer then places the controller in programming mode. The first and subsequent valid data packets are dissected as they are received and the data which they contain is programmed into the application controller at the address indicated in the packet load address field. After programming, the data is read back from the controller and verified against the received packet data. Successful verification indicates that programming was successful, causing the programmer to send ACK to the transmitter. The programmer then resumes polling for a valid packet header, subject to the thirty-second reset delay. If programming fails, the programmer sends CAN to signal the transmitter to abort the file transfer. The modem drops the line and the programmer returns to sleep, waiting for the next call. The application controller is left in programming mode, preventing it from executing the incomplete or invalid program which it contains. It is important to note that invalid packets are NEVER programmed into the application controller. To do so would require that the program memory in the controller be completely erased before the error could be corrected, causing the non-recoverable loss of all previous program data. Upon receipt of an end-of-file packet, the programmer returns its control outputs to the inactive, power on state, allowing the application controller to begin execution of the new program. The programmer then resumes polling for a valid packet header, subject to the thirty-second reset delay. If a valid packet is received prior to the expiration of the thirtysecond delay, another programming cycle begins, which can only be terminated by the reception of a valid end-of-file packet.

Micro controller

If the reset delay expires prior to the reception of a valid end-of-file packet, the modem will drop the line and the programmer will return to sleep, waiting for the next call. In this case, the application controller is left in programming mode, preventing it from executing its program. To return the application to normal operation, another call must be received, and a valid program file uploaded, terminated by an end-of-file packet. Setting Up the Hardware Local Station Connect the IBM PC to the ProModem 1200 through one of the system COM ports. Connect the modem to an analog telephone line and set the modem switches as indicated below. Remote Station Connect the display application/programmer to the second ProModem 1200 through the programmer serial port. Connect the modem to an analog telephone line and set the modem switches as indicated below. Turn the modem on and apply power to the display application/programmer. The application will begin executing its program, if it contains one. The programmer will initialize the modem, as shown by the activity on the modem status indicators.

Installing and Configuring Procomm Plus, Version 2.01 Install ProComm Plus as instructed in the User Manual. When prompted to specify the modem in use, select Prometheus ProModem 1200 from the list. Run Procomm Plus and create a dialing directory entry for the remote station. The baud rate must be set to 1200, parity to EVEN, number of data bits to 7, number of stop bits to1, plex to HALF. Enter the Setup utility (ALT-S). Select PROTOCOLOPTIONS, then

EXTERNAL PROTOCOL OPTIONS from the menus and modify the entry for EXTERNAL PROTOCOL1 as indicated below. EXTERNAL PROTOCOL 1: A - NAME: <any name> B - TYPE: ASPECT C - UPLOAD COMMAND: ATX.ASX Note: ATX.ASX. is the filename of the compiled ASPECT Script to be associated with External Protocol 1. Save the changes and exit the Setup utility. Creating a Hex File The hex files, which are up loaded to the programmer, are created with the tools in the Intel MCS-51 Software Development Package for the IBM PC. In the example below, the8051 assembler source file is called TEST.ASM Assemble the source file TEST.ASM and create the object file TEST.OBJ: ASM51 TEST. ASM Link and locate the object file TEST.OBJ and create the absolute object file TEST.ABS: RL51 TEST.OBJ TO TEST.ABS Convert the absolute object file TEST.ABS to the hex file TEST.HEX: OH TEST.ABS TO TEST. HEX the resulting file, TEST.HEX is ready to be uploaded. Note: ASM51 is version 2.3; RL51 is version 3.1; OH is version 1.1.

Uploading a Hex File Run ProComm Plus and use the proper dialing directory entry to dial the remote station. After the connection with the remote station is established, press the PgUp key and select 1 (External Protocol 1) from the menu of upload protocols. This will execute the ASPECT script associated with External Protocol 1.When prompted enter the name of the file to be uploaded, including the extension and path, if required. When the upload is complete, press ALT-H to hang up and ALT-X to exit Procomm Plus and return to DOS.

Micro controller Appendix I: Intel Hex File Definition Hexadecimal object file format (Intel hex) is produced by most 80C51assembler products. Each record in the file contains the following fields <:>< reek length><load address><reek type><data><checksum>the colon is the record header. The record length field consists of two hex digits, and represents the number of entries in the data field. OH output records containing 16 or fewer data field entries. The load address field consists of four hex digits, and indicates the absolute address at which the data in the data field is to be loaded. The record type field consists of two hex digits, which are always zero in data records. The data field contains from one to 16 pairs of hex digits. The last two hex digits are a checksum on the record length, load address, record type, and data fields. The sum of the binary equivalents of these fields and the checksum itself is zero. Each record in the file is terminated by a carriage return and line feed. A type one record marks the end of the file. The record always contains the following value: :00000001FF.

TEMPERATURE SENSOR For sensing the temperature of the given device or an element for ex: Oil, Core, Motor body etc., a sensor has to be choosen based on the following requirements. 1. Sensitivity and accuracy. 2. Temperature Range 3. Desired life of sensor 4. Budget In the prototype module for the simulation purpose LM35 Transistor is used as sensor because semiconductor Temperature sensors are best suited for embedded applications as they tend to be electrically and mechanically more delicate than other temperature sensor types. In general silicon temperature sensors resistance is given by the equation R= Rr (1+a (T-Tr)+b (T-Tr) 2-c (T-Ti) d); where Rr-->Resistance at temperature Tr; a, b, c -->constants. Ti-->inflection point temperature resistance, such that c=0 for T<Ti. Also resistance is dependent to some extent on the excitation current. In the present module, as the resistance property of the transistor cannot be used directly for interfacing, this transistor is employed as a feedback element in the following configuration.

Let Rf be the resistance offered by the sensor under normal conditions (i.e given by Vo1=Vi1 (1+Rf /R1)(Rb+Ry/ (Ra+Rb+P)) -(1) P=Px+Py;

at S.T.P).

The first stage is configured in Non-inverting amplifier mode, whose output voltage is

The second stage is designed as summing amplifier whose output is given by (Using superposition Principle) Vo=-V01 (Rf2/R1) + Vi2 (R4/R3+R4) (1+Rf2/R2) Substituting the value of Vo1 from eq (1) in eq (2) we get Vo=Vi [1+Rf/R1] [Rb+Py/Ra+Rb+P] [Rf2/R2] + Vi2 (R4/R3+R4) (1+Rf2/R2) Vo=-Vi1 Rx (1+Rf/R1) + Vi2Ry - (2)

As Temperature increases Rf decreases and so from above equation (2) it can be concluded that "Vo increases with Temperature". After fabricating the circuit as per above configuration and with the resistor values as specified in list of components, it is experimentally observed that the output voltage is increasing by 10mv for each degree rise in temperature, after room temperature. The initial output voltage can be to desired value by varying preset 'P'. The Transistor junction (Base& emitter or Base& collector) characteristics are depending upon the temperature. For a transistor, the maximum average power that it can dissipate is limited by the temperature that collector base junction can with stand. Therefore, maximum allowable junction temperature should not be exceeded. The

average power dissipated in collector circuit is given by the average of the product of the collector current and collector baser voltage. At any other temperature the de-rating curves are supplied by the manufacturer to calculate maximum allowable power (Pj). Where TC is case temperature, Tj is temperature and Qj is the thermal resistance. The entire circuit design of the temperature sensing circuit is given below.

ANALOG TO DIGITAL CONVERTER An analog to digital converter (ADC) converts a continuous analog input signal, into an n-bit binary number, which is easily acceptable to a micro-controller. As the input increases from zero to full scale, the output code stair steps. The width of an ideal step represents the size of the least significant bit (LSB) of the converter and corresponds to an input voltage of VES/2n for an n-bit converter. Obviously for an input voltage range of one LSB, the output code is constant. For a given output code, the input voltage can be any where within a one LSB quantisation interval. An actual converter has integral linearity and differential linearity errors. Differential linearity error is the difference between the actual code-step width and one LSB. Integral linearity error is a measure of the deviation of the code transition points from the fitted line. The errors of the converter are determined by the fitting of a line through the code transition points, using least square fit, the terminal point method, are the zero base technique to provide the reference line.

A good converter will have less than 0.5 LSB linearity error and no missing code over its full temperature range. In the basic conversion scheme of ADC, the unknown input voltage Vx is connected to one input of an analog signal comparator, and a time dependent reference voltage Vr is connected to the input of the comparator. In this project work ADC 0809(8-bit A/D converter) is used to convert an analog voltage of an instrumentation amplifier output into an output binary word that can be used by a micro-controller.

Power supply circuit:

In this power supply circuit we have to create a +5V DC which is given to the micro controller. The below components are used to create the power supply

230V AC

Step down transformer

Bridge rectifier

Filter

Regulator

Description: 230V AC supply is given to the step down transformer. It may be a 230V to 9V or 12V step down transformer. The output of the step down transformer is given to bridge rectifier. The bridge rectifier is formed with 1N4007 diodes. The bridge rectifier converts the AC Voltage into DC Voltage. But the output DC Voltage contains sone AC component (ripples). So we have to use a capacitor-2200uF/25V as a filter for removing ripples. That output DC Voltage is given to the positive voltage regulator 7805. the output will be the regulated +5V DC.

CIRCUIT DESCRIPTION

The circuit which has shown in the above consists of the following components. 1. LM 35

2. ADC 0804 3. MICROCONTROLLER AT89C51 4. LCD The LM 35 is the precision integrated circuit temperature sensor whose output is linearly proportional to the Celsius(centigrade) temperature. It outputs 10 mV for each degree of centigrade temperature. The output of the LM 35 is in the form of analog which is from 0V to 5V ,which is applied to the A/D Converter. The conversion process in ADC 0804 is successive approximation method. The ADC has 8-bit resolution with a maximum of 256 steps and the LM 35 produces 10mV for every degree of temperature change,we can condition Vin of the ADC 0804 to produce a V out of 2560 mV(2.56 V) for full-scale output. Therefore, in order to produce the full-scale Vout of 2.56 V for the ADC 0804, we need to set Vref/2 = 1.28. This makes Vout of the ADC 0804 correspond directly to the temperature as monitored by the LM 35. The digital pulses from the ADC 0804 are from DB0 to DB7 applied to port0 of the Microcontroller AT89c51. And the 3 pins of the port3 are used to control the LCD. The port3.2 is applied to the RS Pin , port3.1 is applied to the R/W Pin, and port3.0 is applied to the E pin of the LCD. And the output pulses from the port2 of the AT89C51 are connected to the data pins D0 to D7 of the LCD.The contrast of the LCD is changed by the 3 pin of the LCD. The pin 1 of the LCD is connected to the Vss and pin 2 of the LCD is connected to the Vcc. The output of the micro controller is used to drive LCD display. This LCD display is used to read the value of temperature and it continuously displays the temperature value.

FABRICATION DETAILS The fabrication of one demonstration unit is carried out in the following sequence. 1) Finalizing the circuit diagram, listing out the components and their sources of procurement. 2) Procuring the components, testing the components and screening the components 3) Making layout, preparing the interconnection diagram as per the circuit diagram. 4) Assembling the components as per the component layout and circuit diagram and soldering components. 5) Integrating the total unit inter wiring the unit and final testing the unit. 6) Keeping the circuit for demonstration.

CONCLUSION: This project work Temperature Monitoring System Using Micro controller is successfully designed, tested and a demonstration module is fabricated. This is a prototype module. The analog to digital converter employed in the project work is an 8-bit, ADC and it has only 1 channel . We are interfacing the ADC and the LCD display with the Microcontroller AT89C51. We used the ATMEL Microcontroller for constructing this project, because it has FLASH memory and cost of this Microcontroller is very less.

REFERENCES 1) 8051 Micro Controller Ayala 2) Digital Communications Simon Haykin 3) Introduction To 8051 Micro Controllers Mazidi 4) Linear And Digital Integrated Circuits Ramakanth Gyakwad

www.texasinstruments.com www.national.com www.nationalsemiconductors.com www.electronics123.com www.electronictutorials.com

You might also like