Use Of A Micro Controller example essay topic

2,013 words
1. INTRODUCTION Today, thanks to the advancement in the field of electronics, most of the manually controlled systems are getting replaced with sophisticated electronic circuits with intelligent control ls. These circuits are capable of monitoring, analyzing and controlling the systems. In earlier days these electronic circuits were fabricated around discrete hardware components such as transistors, logic ICs etc that made the system bulky and costly.

Also since the component count was more the failure rate was also more. But now due to the introduction of single chip micro controllers, the hardware part was drastically reduced; so also the cost and size of the hardware has come down to a large extent. As a result almost all of the control circuits are designed over single chip micro controllers. 2.

SCOPE OF THE PROJECTThe primary objective of this project is to make a simple circuitry for Air conditioner controller. This circuitry is based on the state of the art technology of Microcontrollers. The features of the project is has given below 1. Facility to set the temperature using a potentiometer. 2.

A Display indicates the temperature - both the set value and the actual value. 3. An indication when the set range is beyond limits. 4. The system turns ON the Air conditioner when the set temperature. 5.

A mode selector switch is provided to select between SET MODE and RUN MODE. 6. When the SET mode is selected the display indicates the set value. When RUN mode is selected the display indicates the actual room temperature. The whole circuitry works on 230 V AC. From this a series regulator is designed to derive +5 V regulated supply for the micro controller part.

The circuitry is based on the popular micro controller Atmel 89 S 8252 The project consists of necessary software and hardware for implementing the above function. 3. BLOCK SCHEMATIC OF THE PROJECTThe figure below shows the block schematic of the project. This consists of the following.

1. Power Supply Unit 2. Microcontroller Unit 3. A Potentiometer For Temperature Set. 4. A Temperature Sensor Circuit 5.

A Display Circuit 6. A Relay Driver Circuit It also consists of the following indications 1. Temperature Display on seven segment Display (2 digit) 2. A set range out indication. The circuit turns on a relay when the set temperature is less than the room temperature. This relay turns ON the Air Conditioner.

4. STUDY OF MICROCONTROLLER This project makes use of a micro controller-based circuitry for decision making such as password checking and device control. The micro controller used here is microchip make PIC series IC 16 F 870. a. Microprocessors A microprocessor, as the term has come to be known, is a general- purpose digital computer central processing unit (CPU).

Although popularly known as a "computer on a chip", the microprocessor is in no sense a complete digital computer. Figure 1.1 shows a block diagram of a microprocessor CPU, which contains an arithmetic and logic unit (ALU), a program counter (PC), a stack pointer (SP), some working registers, clock timing circuit and interrupt circuits. To make a complete microcomputer, one must add memory, usually read only program memory (ROM) and random- access data memory (RAM), memory decoders, an oscillator, and a number of input / output (I / O) devices, such as parallel and serial data ports. In addition, special-purpose devices, such as interrupt Handlers and counters, may be added to relieve the CPU from time consuming counting or timing chores.

Equipping the microcomputer with mass storage devices, commonly a floppy and hard disc drives, and I / O peripherals, such as a keyboard and a CRT display, yields a small computer that can be applied to a range of general purpose software applications The key term in describing the design of the microprocessor is general purpose. The hard ware design of a microprocessor CPU is arranged so that a small or very large system can be configured around the CPU as the application demands. Fig 5.1 Contents of Microprocessor The internal CPU architecture, as well as the resultant machine level code that operate that architecture, is comprehensive but as flexible as possible. The prime use of a microprocessor is to read data, perform extensive calculations on that data, and store those calculations in a mass storage device or display the results for human use. The programs used by the microprocessor are stored in the mass storage device and loaded in to RAM as the user directs. A few microprocessor programs are stored in ROM.

The ROM-based programs are primarily small fixed programs that operate peripherals and other fixed devices that are connected to the system. The design of the microprocessor is driven by the desire to make it as expandable and flexible as possible, in the expectation of commercial success in the marketplace. b. Microcontrollers The Figure 5.2 below shows the block diagram of a typical micro controller, which is a true computer on a chip. The design incorporates all of the features found in a micro-processor CPU: ALU, PC, SP, and registers. It is also has added the other features needed to make a complete computer: ROM, RAM, parallel I / O, serial I / O, counters and a clock circuit. Like the microprocessor, a micro controller is a general-purpose device, but one that is meant to read data, performs limited calculations on that data and control its environment based on those calculations.

The prime use of a micro controller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system. The design approach of the micro controller mirrors that of the microprocessor: make a signal design that can be used in as many applications possible in order to sell, hopefully, as many as possible. The microprocessor design accomplishes this goal by having a very flexible and extensive repertoire of multi - byte instructions. These instructions work in a hard ware configuration that enables large amounts of memory and I / O to be connected to address and data bus pins on the integrated circuit package.

Much of the activity in the microprocessor has to do with moving code and data to and from external memory to the CPU. Fig 5.2 Contents of Microcontroller The architecture features working registers that can be programmed to take part in the memory access process and the instruction set is aimed at expediting this activity in order to improve throughput. The pins that connect the microprocessor to external memory are unique, each having a single function. Data is handled in byte, or larger, sizes.

The micro controller design uses a much more limited set of single - and double - byte instructions that are used to move code and data from internal memory to the ALU. Many instructions are coupled with pins on the integrated circuit package; the pins are "programmable" - that is, capable of having several different functions depending on the wishes of the programmer. The micro controller is concerned with getting data from and to its own pins; the architecture and instructions set are optimized to handle data in bit and byte size. c. Microcontroller - PIC 16 F 870 The Microchip; fifth largest micro controller manufacturer in the world released the PIC (Programmable IC) series in the 1998. These RISC (Reduced Instruction Set) CPUs gained a lot of fame because of its powerful instructions and also special features included in it. The micro controller used in this project is microchip's PIC series 16 F 870.

The 16 F 870 is an 8- bit micro controller having the following features. o High performance RISC Cpu Powerful 35 instruction so Operating speed - 20 Mhz 5. CIRCUIT SCHEMATIC OF THE PROJECTThe circuit schematic of the project consists of the following 1. Power Supply Unit 2. Microcontroller unit 3. Potentiometer For Temperature Set. 4.

Temperature Sensor Circuit 5. Display Circuit 6. Relay Driver Circuit 1. Power Supply Unit The power supply circuit is one, which supplies the power to the various circuits of the system. This project requires the following Power Sources. +12 V/500 mA and +5 V / 1 A. The 12 VDC is taken directly from the mains supply through a step transformer and rectifier circuits.

This +12 V is used for energizing the relay, which turns ON the Air Conditioner. The 5 V-regulated source is derived from the +12 V supply using series regulator, circuit which is shown below. with two diodes each, connected to 10 V windings respectively. 2. The Microcontroller PCB This operates on +5 V regulated power supply. It consists of the micro controller PIC 16 f 70, the 4 MHz crystal oscillator and the reset circuit. The different pins of the i / o ports are terminated on single line connectors.

The other peripheral circuits are plugged into this micro controller using pin connectors... An external potentiometer is provided for setting the temperature. This potentiometer enables to give a variable voltage to one of the ADC pins of the micro controller. The program is so written to read this analog value as the set temperature reference 3.

Temperature Sensor Circuit The chip AD 590 is used as the temperature sensor. this gives the current variation with reference to the contact temperature. This current variation is converted to a voltage variation by using a resistor in series with it. This voltage variation is taken as the actual temperature 4. Display Circuit This consists of a two seven segment LED displays with BCD to Seven Segment Decoder as shown in the diagram. This receives display data in BCD format from the micro controller and with the help of the display driver indicates in decimal format. 6.

Relay Driver Circuit The relay driver circuit receives signals from micro controller and drives relay... The relay works on +12 V supply. The contacts of the relay switches 230 volt AC to the Air conditioner. The circuit schematic of the relay driver unit is as below. Relays The relay is one of the most widely used components in industrial electronics. In combination with transistors, S CRs, electron tubes, and other circuit elements, this electromagnetic device performs countless tasks.

Thus relays are used as protective devices, for switching, for indicating, and for transmission. Relays are electromagnetic components, which has an operating coil and contacts. The coil shall be energized with ac or dc supply. Accordingly relays are available with AC / DC operating coils of various magnitude say from 6 V dc to 220 V dc or for AC voltages ranging from 12 V ac to 440 AC The operating principle of relay is as follows when the coil is energized, an iron core attached to this assembly gets magnetized.

This then attracts an armature which has electrical terminals connected to it. The electrical terminals shall be fabricated in such a way that there shall be one common terminal, one normally closed (N. C) contact and one normally Open (N. O) contacts. When the relay is not energized the connection is closed between common and N. C terminals, connection is open between common and N. O contacts. This state is reversed when the relay is energized.

This relay circuit shall be used to switch ON other power circuits, using low control voltage. The power circuit and control circuit are practically isolated..