Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Acknowledgement Parts List Circuit Description Construction Bibliography

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

CONTENTS

ACKNOWLEDGEMENT INTRODUCTION PARTS LIST CIRCUIT DESCRIPTION CONSTRUCTION BIBLIOGRAPHY

ACKNOWLEDGEMENT
Success is a sweet fruit, which everyone strives to taste. To achieve ones goal one puts in lot of mental and physical stress. In this process one takes all the encouraging and helping hands of the people. I take this opportunity our sincere gratitude to my esteemed guide Mr. R.P. Yadav for his valuable guidance in making this project a reality. I am thankful to him for his constant support and valuable supervision, guidance and encouragement throughout this project completion period.

Krittika

INTRODUCTION
Heres a microcontroller-based temperature indicator that displays the temperature in the range of 55C to 125C. Besides AT89C52 microcontroller, it uses a temperature sensor chip and an LCD module. The indicator outputs the calibrated data in digital form. The program for the microcontroller is written in C and not in Assembly language. Since C program has well-defined syntax, it far outweighs the merits of the Assembly language program. The circuit

Figure shows the block diagram of the temperature indicator using microcontroller AT89C52. The power supply for the circuit is regulated by IC 7805 and supplied to different parts of the unit.

PARTS LIST
Semiconductors: IC1 IC2 IC3 D1-D4 LED1 7805 regulator IC AT89C52 microcontroller DS1621 temperature sensor 1N4007 rectifier diodes Red LED

Resistors (all -watt, 5% carbon, unless stated otherwise): R1 R2 R3 R4, R5 VR1 Capacitors: C1 C2, C3, C4 C5 C6,C7 Miscellaneous: Transformer 230V AC primary to 0-9V, 250mA secondary Crystal LCD S1 12 MHz 161 LCD module On/Off SPST switch 470F, 25V electrolytic capacitor 0.1F ceramic disk 10F, 16V electrolytic capacitor 33pF ceramic capacitor 1-kilo-ohm 47-kilo-ohm 10-kilo-ohm 4.7-kilo-ohm 1-kilo-ohm preset

CIRCUIT DESCRIPTION
DS1621 is the temperature sensor chip. The microcontroller unit (MCU) reads the temperature from the sensor. The temperature data is compared with certain userdefined temperature values and processed inside the MCU as per the program and then sent to the LCD for display.

Figure shows the circuit of temperature indicator using microcontroller AT89C52. Working of each section of the circuit is covered in the following paragraphs.

Power supply. The power supply unit consists of a step-down transformer (230V AC primary to 0-9V, 250mA secondary), bridge rectifier and voltage regulator. The output of the transformer is fed to bridge rectifier diodes D1 through D4 (each 1N4007). The ripple from the output bridge rectifier is filtered by capacitor C1 and fed to regulator IC 7805. The regulated output is given to the temperature sensor, microcontroller unit and LCD module, respectively. When switch S1 is closed, LED1 glows to indicate the presence of power in the system.

Temperature sensor. Temperature sensor chip DS1621 (IC3) is an 8-pin DIP IC. Its pin details are shown in Fig. and the internal block diagram in Fig. 4. The chip can measure temperatures from 55C to +125C in 0.5C increments, which are read as 9-bit values. It can operate off 2.7V to 5.5V. Data is read/written via a 2-

wire serial interface. Pins 1 and 2 of the temperature IC are connected to pins 11 and 10 of the microcontroller, respectively. The thermal a l a rm output (Tout) of IC DS1621 activates when the temperature exceeds user - defined high temperature TH. The output remains active until the temperature drops below user-defined low temperature TL. User-defined temperature settings are stored in the non-volatile memory. Temperature settings and temperature readings are all communicated to/from IC DS1621 over a 2-wire serial cable. The most significant bit (MSB) of the data is transmitted first and the last significant bit (LSB) is transmitted last. Addressing. The chip address of DS1621 comprises internal preset code nibble 1001 (binary) followed by externally configurable address pins/bits A2, A1 and A0. The eighth bit of the address byte is determined by the type of operation (either read or write) that is to be performed. For writing to the device the eighth bit is 0 and for reading from the device the eighth bit is 1. In our case, A2, A1 and A0 pins are grounded and hence the device address for writing is 1001000b or 90(hex) and for reading the device address is 10010001b or 91(hex). Configuration/status register. This register can be accessed for reading or writing by issuing command byte AC(hex) from the master (82C52). This register is particularly required if DS1621 is used for thermostat control, since it contains flag bits THF (high-temperature flag) and TLF (low-temperature flag) which are set to 1 when temperature crosses the respective limits earlier written into TH and TL registers. It also contains the flag bit (Done), which is set to 1 when results of conversion are available after issuing of start conversion command EE(hex).

The other bits of configuration register are defined below: NVB is the non-volatile memory busy flag, 1 is write to an E2 memory cell in progress, 0 indicates that non-volatile memory is not busy, POL is non-volatile output polarity bit (1=active-high and 0=active-low) and 1SHOT is one-shot mode. A copy to E2 may take up to 10 ms. If 1SHOT is 1, DS1621 will perform one temperature conversion upon reception of the Start Convert T protocol. If 1SHOT is 0, DS1621 will continuously perform temperature conversions. This bit is nonvolatile. Command Set. Complete command instruction set for accessing various internal registers as well as for starting and stopping of conversion process are given in Table I. For understanding the exact sequence in which Start bit, address byte, acknowledgement bit, command byte(s) and data byte(s) are to be sent along the I2C bus, please refer to the datasheet of DS1621, wherein these aspects have been explained in proper detail. This will help in understanding the contents of the main program.

Microcontroller unit. Microcontroller AT89C52 (IC2) is a 40-pin IC from Atmel. Its pin details are shown in Figure. Like AT89C51, it also belongs to the 8031/8051 family. Microcontroller AT89C52 has a 2568-bit internal randomaccess memory (RAM), eight interrupt sources and 8 kB of flash memory

compared to 128x8-bit internal RAM, six interrupt sources and 4 kB of flash memory in AT89C51. By combining a versatile 8-bit CPU with flash memory on a monolithic chip, Atmel AT89C52 is a powerful, highly flexible and cost-effective solution to many embedded control applications. Ports 0 and 2 are 8-bit bidirectional input/output (I/O) ports. These ports havent been used in this temperature indicator. Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Ports 1.0 through 1.7 are connected to pins 7 through 14 of the LCD. Port-1 output buffers can sink/source four TTL inputs. Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Ports 3.0 and 3.1 of IC2 are connected to serial clock line (SCL) and serial data line (SDA) of IC3, respectively. Ports 3.2 through 3.4 are connected to pins 4 through 6 of the LCD, respectively. Port-3 output buffers can sink/source four TTL inputs. A 12MHz crystal oscillator is connected to XTAL1 and XTAL2 pins for operation of the microcontroller. A high pulse on RST pin (pin 9) while the oscillator is running resets the microcontroller. In this circuit, this pin is connected to +Vcc through capacitor C5 (10 F, 16V). The external-access enable pin (EA) is connected to +Vcc for internal program executions. This pin also receives the 12V programming-enable voltage (VPP) during flash programming when 12V programming is selected.

Table II Pin Connections of the LCD Pin 1 Pin 2 Pin 3 Pin 4 Pin 5 Pin 6 Pin 7 Pin 8 Pin 9 Pin 10 Pin 11 Pin 12 Pin 13 Pin 14 Pin 15 Pin 16 Ground (Gnd) +Vcc V0 (display intensity control) RS (connected to P3.2 of AT89C52) R/W (connected to P3.3 of AT89C52) EN (connected to P3.4 of AT89C52) D0 (connected to P1.0 of AT89C52) D1 (connected to P1.1 of AT89C52) D2 (connected to P1.2 of AT89C52) D3 (connected to P1.3 of AT89C52) D4 (connected to P1.4 of AT89C52) D5 (connected to P1.5 of AT89C52) D6 (connected to P1.6 of AT89C52) D7 (connected to P1.7 of AT89C52) Backlight +Vcc (not used) Backlight Gnd (not used)

LCD For display, a Lampex make 16x1 LCD (model GDM1601A) was used. Pin connections of this LCD are given in Table II. Pins 15 and 16 havent been used. Pin 3 is connected to the circuit ground through a 1-kilo-ohm preset that is used to control the light intensity of the LCD. Note that the Hitachi make 161 LCD (HD44780A00) will not work in this project.

CONSTRUCTION The circuit of this temperature indicator using microcontroller AT89C52 can be assembled on any general-purpose, single side PCB. The microcontroller chip and the temperature sensor chip are mounted on the respective IC bases. Ensure a proper contact between pins of the IC bases and the solder points on the PCB. Capacitors C3 and C4 must be connected near IC2 and IC3, respectively. The actual-size, single-side PCB layout for the circuit and its component layout.

CONCLUSION ddd

You might also like