Complete Circuit Diagra1

Embed Size (px)

Citation preview

  • 7/28/2019 Complete Circuit Diagra1

    1/43

    A

    MINOR PROJECT

    On

    TEMPERATURE SENSOR & CONTROLLER

    Submitted in the practical fulfillment for the award of Degree of Bachelor of Technology

    In

    ELECTRONICS & COMMUNICATION ENGINEERING

    From

    KURUKSHETRA UNIVERSITY KURUKSHETRA

    Submitted by: Guided by:

    Navdeep Yadav (2509024) Mr. C.C TRIPATHI

    Robin Singh (2509040) (HOD,ECE)Rahul Rana (2509151)

    DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGG.

    UNIVERSITY INSTITUTE OF ENGINEERING & TECHNOLOGY,

    KURUKSHETRA-136119

  • 7/28/2019 Complete Circuit Diagra1

    2/43

    DECLARATION

    We hereby certify the work which is being presented in the project entitled Temperature

    sernsor & controller by Navdeep yadav, Robin singh and Rahul Rana in partial fulfillmentof requirements for the award of degree B.Tech (Electronics & Communication Engg.)

    submitted in the Department of Electronics & Communication Engg. at UNIVERSITYINSTITUTE OF ENGINEERING & TECHNOLOGY under Kurukshetra University,Kurukshetra is carried out during a period from Aug. 2012 to Dec. 2012 under thesupervision of Mr.C.C TRIPATHI, HOD( Electronics & Communication Engineering),

    UIET, Kurukshetra. The matter presented in this project has not been submitted by me in anyother University/ Institute for the award of B.Tech. Degree.

    Navdeep Yadav (2509024)

    Robin Singh (2509040)

    Rahul Rana (2509151)

    This is to certify that the above statement made by the candidate is correct to the best ofmy/our knowledge.

    C.C TRIPATHI

    Project Guide

    The B.Tech Viva Voce Examination ofNavdeep Yadav, Robin Singh and Rahul Rana has been held on

    _____________ and accepted.

    (Dr. C.C.Tripathi)

    F/I, ECE

  • 7/28/2019 Complete Circuit Diagra1

    3/43

    ABSTRACT

    This project shows the potential system benefits of simple tracking solar system using amotor and light sensor. This method is increasing power collection efficiency by developing adevice that tracks the sun to keep the panel at a right angle to its rays. A solar tracking systemis designed, implemented and experimentally tested.

    The solar tracking system changes the position of the solar panel according to the position ofsun during different day times. This results in greater efficiency as the solar panel faces thesun for the maximum possible time.

    The system is based on microcontroller 89C51 driven stepper motor with an LDR used tosense the change in position of sun. The LDR senses the position by change in resistance andgives a signal to microcontroller which drives the stepper motor to change the position of thesolar panel.

  • 7/28/2019 Complete Circuit Diagra1

    4/43

    ACKNOWLEDGEMENT

    Many lives & destinies are destroyed due to the lack of proper guidance, directions &opportunities. It is in this respect we feel that we are in much better condition today due tocontinuous process of completion of this project was a tedious job & requires careful &support at all stages. We would like to highlight the role by individuals towards this.

    Firstly we are very thankful to our parents and family members for the providing us theopportunity for providing to build our carrier in field of engineering. Their invaluableinspiration, guidance & our decisions are worthwhile, without which this project will might

    be a dream in our eyes.

    We are eternally grateful to honorable Director- Dr. Dinesh Aggarwal for providing us theopportunity & infrastructure to complete the project as a fulfillment of B.Tech degree.

    We are very thankful to Dr. C.C Tripathi Head of the Department, for his kind support &faith in us.

    We would like to express our sincere thanks Mr. C.C Tripathi for showing the keen interest

    and continuous support to our project.

    We are also thankful to all the visible hands, which helped us to complete this project with afeeling of success.

    Navdeep Yadav

    Robin Singh

    Rahul Rana

  • 7/28/2019 Complete Circuit Diagra1

    5/43

    INTRODUCTION

    Our minor project involved the design of a fully functional TEMPERATURE SENSINGAND CONTROLLING USING MICROCONTROLLER 8051.This was our attempt at

    producing a portable device that could be widely used for a variety of different purposes. For

    example, think of the many situations where the precise measurement of temperature is ofhigh importance. Temperature control and monitoring is important in homes for the comfortof its occupants, it is important for gardeners who want to carefully monitor the atmosphericconditions within greenhouse.

    Furthermore, our portable digital thermometer could be valuable as a scientific tool in thelaboratory. Its ability to accurately measure temperature to within 1degree per celsius . As ahousehold device, our multi-functioning digital thermometer is useful for its ability tocarefully display the extreme temperatures reached in its environment. By simply pressingthe appropriate button on its user interface, you can easily set the reference value oftemperature.

    This is accomplished by entering lower and upper bound temperatures via two push buttonson the user interface. When the temperature recorded by this device crosses one of theseboundary points, the LED glows to indicate the rise or fall of temperature. Additional

    functionality has been added to this feature regarding the options for changing theseboundary temperatures. As the temperature rises above the reference temperature a fan isswitched on and as the temperature falls below the reference bulb starts glowing indicatingthe fall in temperature. Thus the temperature can be monitored usingMICROCONTROLLER BASED TEMPERATURE SENSING AND CONTROLLING

  • 7/28/2019 Complete Circuit Diagra1

    6/43

    BLOCK DIAGRAM

    POWERSUPPLY

    MICROCONTROLLER RELAY

    AIR

    CONDITIONER

    CRISTAL

    OSCILLATOR

    ANALOG TO

    DIGITAL

    CONVERTERTEMPRATURE

    SENSOR

  • 7/28/2019 Complete Circuit Diagra1

    7/43

    COMPLETE CIRCUIT DIAGRAM

  • 7/28/2019 Complete Circuit Diagra1

    8/43

    LIST OF COMPONENT

    1. Microcontroller 01

    2. Crystal oscillator 01

    3. Capacitor 33pF 02

    4. Capacitor 25v,10uF 01

    5. Resistance 10k 10

    6. regulator 7805 2

    7. 10 k resistance network 3

    8. Pcb 1

    9. Transistor cl100 1

    10.In 4007 diode 08

    11.Transformer 12-0-12 01

    12.Lm-35 Sensor 01

    13.25V 2200uF Capacitor 01

    14.10K Potential meter 03

    15.ADC 0804 IC 01

    16.150 pf capacitor 01

    17.16x2 LCD 01

    18.220ohm resistance 04

    19.12 v DC fan 01

  • 7/28/2019 Complete Circuit Diagra1

    9/43

    8051 MICROCONTROLLER

    8051 microcontroller was first introduced by INTEL in 1981. It becomes popular afterallowing other manufacturers to make the same. It is an 8 bit microcontroller i.e. the CPU canwork on 8 bits of data at a time.

    8051 contains-

    128 Bytes of RAM

    4K Bytes of on-chip ROM

    Two Timers

    One serial Port

    Four I/O ports, each 8 bits wide

    6 Interrupts Sources

    8051 MICROCONTROLLER ARCHITECTURE

    All 80C51 devices have separate address spaces for program and data memory, as shown infigure.

    Figure 2- 8051 architecture

  • 7/28/2019 Complete Circuit Diagra1

    10/43

    The 8051 architecture consists of these specific features-

    8 bit CPU with registers A( the accumulator) and B

    16 bit program counter(PC) and data pointer(DPTR)

    8 bit program status word(PSW) and stack pointer(SP)

    Internal ROM (4K)

    Internal RAM (128 bytes)

    4 register banks(bank 0 to bank 3) each containing 7 registers

    16 bytes which are bit addressable

    Rest 80 bytes for special function registers(SFRs)

    32 input/output pins arranged as four 8 bit ports

    Two 16 bit timers/counters T0 and T1

    Serial data receiver and transmitter

    Two external and three internal interrupt sourcesOscillator and clock circuit

    8051 is a collection of 8 bit and 16 bit registers and 8 bit memory locations. These registersand memory locations can be operated by using software instructions. Program memory(ROM) can only be read. There can be up to 64K bytes of program memory. In 8051, thelowest 4KB of program memory is on chip.

    Data memory (RAM) occupies a separate address space from ROM. In 8051, the lowest128 bytes of data memory is on chip. Up to 64K bytes of external RAM can be addressed in

    the external data memory space.

  • 7/28/2019 Complete Circuit Diagra1

    11/43

    PIN DIAGRAM OF 8051

    8051 is a 40 pin IC. These 40 pins are dedicated to different for various functions such as I/O,-RD, -WR, address, data and interrupts.

    Figure 3- pin diagram of 8051

  • 7/28/2019 Complete Circuit Diagra1

    12/43

    PIN 18(XTAL2) & PIN 19(XTAL1)

    The 8051 has an on-chip oscillator but requires an external clock to run it. A quartz crystaloscillator is connected to inputs XTAL1 and XTAL2. The quartz crystal oscillator also needstwo capacitors of 30 pF value. If we use a frequency source other than a crystal oscillator,such as a TTL oscillator. It will be connected to XTAL1 and XTAL2 is left unconnected.

    Figure 4- Oscillator Circuit

    The quartz crystal oscillator also needs two capacitors of 30 pF value. The speed ofmicrocontroller depends on the maximum frequency of the oscillator.

    PIN 9(RESET)

    It is an input and is active high (normally low). Upon applying a high pulse to this pin, themicrocontroller will reset and terminate all activities. This is also called power-on reset.Activating this pin will cause all values in the registers to be lost.

    Figure 5- Reset circuit

  • 7/28/2019 Complete Circuit Diagra1

    13/43

    PIN 31(EA/VPP)

    When EA is held high the CPU executes out of internal program memory. Holding EA lowforces the CPU to execute out of external memory regardless to the program counter value. Itis connected to VCC in 8051 as program is fetched from internal memory.

    PIN 29 (PSEN)

    Program Store Enable is the read strobe to external memory. This pin is connected to OE ofthe external ROM. It is an output pin. When the device is executing out of external programmemory, PSEN is activated twice each machine cycle. PSEN is not activated when the deviceis executing out of internal program memory.

    PIN 30 (ALE/PROG)

    Address latch enable output pulse for latching the low byte of the address during accesses to

    external memory. ALE is emitted at the constant rate of 1/6

    th

    of the oscillator frequency, forexternal timing or clocking purposes, even when there are no accesses to external memory.This pin is used for demultiplexing of address and data.

    Port 0

    Port 0 is an 8-bit open drain bidirectional port. As an open drain output port, it can sink eightLS TTL loads. Port 0 pins that have 1s written to them float, and in that state will function ashigh impedance inputs. Port 0 is also the multiplexed low-order address and data bus during

    External pull up for port 0

  • 7/28/2019 Complete Circuit Diagra1

    14/43

    Port 1

    Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 1 pins that have 1s writtento them are pulled high by the internal pull-ups, and in that state can be used as inputs. Asinputs, port 1 pins that are externally being pulled low will source current because of theinternal pull-ups.

    Port 2

    Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 emits the high-orderaddress byte during accesses to external memory that use 16-bit addresses. In this application,it uses the strong internal pull-ups when emitting 1s.

    Port 3

    Port 3 is an 8-bit bi directional I/O port with internal pull-ups. It also serves the functions of

    various special features of the 80C51 Family as follows:

    Port Pin Alternate Function

    P3.0 RxD (serial input port)

    P3.1 TxD (serial output port)

    P3.2 INT0 (external interrupt 0)

    P3.3 INT1 (external interrupt 1)

    P3.4 T0 (timer 0 external input)

    P3.5 T1 (timer 1 external input)

    P3.6 WR (external data memory write strobe)

    P3.7 RD (external data memory read strobe)

    VCC: Supply voltage

    VSS: Circuit ground potential

  • 7/28/2019 Complete Circuit Diagra1

    15/43

    BASIC CONNECTION

    As seen in the figure above, in order to enable the microcontroller to operate properly it isnecessary to provide:

    Power supply:

    Reset signal: and

    Clock signal.

  • 7/28/2019 Complete Circuit Diagra1

    16/43

    Clearly, it is about very simple circuits, but it does not have to be always like that. If thetarget device is used for controlling expensive machines or maintaining vital functions,everything gets increasingly complicated. However, this solution is sufficient for the time

    being...

    Power supply

    Even though this microcontroller can operate at different power supply voltages, why to testMurphys low?! A 5V DC is most commonly used. The circuit, shown in the figure, uses a

    cheap integrated three-terminal positive regulator LM7805, and provides high-quality voltagestability and quite enough current to enable the microcontroller and peripheral electronics tooperate normally (enough current in this case means 1Amp).

    Reset signal

    In order that the mucrocontroller can operate properly, a logic 0 (0V) must be applied to thereset pin RS. The push button connecting the reset pin RS to power supply VCC is notnecessary. However, it is almost always provided because it enables the microcontroller safe

    return to normal operating conditions if something goes wrong. 5V is brought to this pin, themicrocontroller is reset and program starts execution from the beginning.

    Clock signal

    Even though the microcontroller has a built-in oscillator, it cannot operate without twoexternal capacitors and quartz crystal which stabilize its operation and determines itsfrequency (operating speed of the microcontroller).

  • 7/28/2019 Complete Circuit Diagra1

    17/43

    CRYSTAL OSCILLATOR

    What are crystal oscillators?

    A crystal oscillator is an electronic oscillator circuit that uses an mechanical resonance of

    vibrating crystal of pizeo electric materialto create anelectrical signal with a very precise

    frequency This frequency is commonly used to keep track of time to provide a stable clock

    signal for digital integrated circuits , and to stabilize frequencies for radio transmitter and

    receivers. The most common type of piezoelectricresonator used is the quartz crystal , but

    other piezoelectric materials including polycrystaline ceramics are used in similar circuits.

    Quartz crystals are manufactured for frequencies from a few tens ofkilohertz to tens of

    megahertz.

    A practical example of a Crystal Oscillator

    This is a typical example of the type of crystal oscillators which may be used for sayconverters. Some points of interest on crystal oscillators in relation to figure 1.

    Figure 1 - schematic of a crystal oscillator

  • 7/28/2019 Complete Circuit Diagra1

    18/43

    The transistor could be a general purpose type with an Ft of at least 150 Mhz for HF use. Atypical example would be a 2N2222A.

    The turns ratio on the tuned circuit depicts an anticipated nominal load of 50 ohms. Thisallows a theoretical 2K5 ohms on the collector. If it is followed by a buffer amplifier (highlyrecommended) I would simply maintain the typical 7:1 turns ratio. I have included a formulafor determining L and C in the tuned circuits of crystal oscillators in case you have forgotten

    earlier tutorials. Personally I would make L a reactance of around 250 ohms. In this case I'dmake C a smaller trimmer in parallel with a standard fixed value.

    We can use an overtone crystal for the crystal and set L * C for the odd particular multiple ofovertone wanted in your crystal oscillators.

  • 7/28/2019 Complete Circuit Diagra1

    19/43

    CAPACITORS

    The capacitor's function is to store electricity, or electrical energy.The capacitor also functions as a filter, passing alternating current

    (AC), and blocking direct current (DC).This symbol is used to indicate a capacitor in a circuit diagram.

    The capacitor is constructed with two electrode plates facingeachother, but separated by an insulator. When DC voltage is appliedto the capacitor, an electric charge is stored on each electrode. Whilethe capacitor is charging up, current flows. The current will stopflowing when the capacitor has fully charged. When a circuit tester,

    such as an analog meter set to measure resistance, is connected to a 10 microfarad (F) electrolytic capacitor, acurrent will flow, but only for a moment. You can confirm that the meter's needle moves off of zero, but returnsto zero right away.

    When you connect the meter's probes to the capacitor in reverse, you will note that current once again flows for amoment. Once again, when the capacitor has fully charged, the current stops flowing. So the capacitor can beused as a filter that blocks DC current. (A "DC cut" filter.)However, in the case of alternating current, the current will be allowed to pass. Alternating current is similar torepeatedly switching the test meter's probes back and forth on the capacitor. Current flows every time the probesare switched.

    The value of a capacitor (the capacitance), is designated in units called the Farad ( F ).The capacitance of a capacitor is generally very small, so units such as the microfarad ( 10-6F ), nanofarad ( 10-9F), and picofarad (10-12F ) are used.Recently, an new capacitor with very high capacitance has been developed. The Electric Double Layer capacitorhas capacitance designated in Farad units. These are known as "Super Capacitors." Sometimes, a three-digit code

    is used to indicate the value of a capacitor. There are two ways in which the capacitance can be written. One usesletters and numbers, the other uses only numbers. In either case, there are only three characters used. [10n] and[103] denote the same value of capacitance. The method used differs depending on the capacitor supplier. In thecase that the value is displayed with the three-digit code, the 1st and 2nd digits from the left show the 1st figureand the 2nd figure, and the 3rd digit is a multiplier which determines how many zeros are to be added to thecapacitance. Picofarad ( pF ) units are written this way.For example, when the code is [103], it indicates 10 x 103, or 10,000pF = 10 nanofarad( nF ) = 0.01 microfarad(F ). If the code happened to be [224], it would be 22 x 10 4 = or 220,000pF = 220nF = 0.22F. Values under100pF are displayed with 2 digits only. For example, 47 would be 47pF. The capacitor has an insulator( thedielectric ) between 2 sheets of electrodes. Different kinds of capacitors use different materials for the dielectric.

    Breakdown voltageWhen using a capacitor, you must pay attention to the maximum voltage which can be used. This is the"breakdown voltage." The breakdown voltage depends on the kind of capacitor being used. You must beespecially careful with electrolytic capacitors because the breakdown voltage is comparatively low. The

    breakdown voltage of electrolytic capacitors is displayed as Working Voltage.The breakdown voltage is the voltage that when exceeded will cause the dielectric (insulator) inside the capacitorto break down and conduct. When this happens, the failure can be catastrophic.I will introduce the different types of capacitors below

  • 7/28/2019 Complete Circuit Diagra1

    20/43

    Electrolytic Capacitors (Electrochemical type capacitors)

    Aluminum is used for the electrodes by using a thin oxidization membrane.Large values of capacitance can be obtained in comparison with the size of the capacitor, because the dielectricused is very thin.The most important characteristic of electrolytic capacitors is that they have polarity. They have a positive and a

    negative electrode.[Polarised]This means that it is very important which way round they are connected. If thecapacitor is subjected to voltage exceeding its working voltage, or if it is connected with incorrect polarity, itmay burst. It is extremely dangerous, because it can quite literally explode. Make absolutely no mistakes.Generally, in the circuit diagram, the positive side is indicated by a "+" (plus) symbol.Electrolytic capacitors range in value from about 1F to thousands of F. Mainly this type of capacitor is used asa ripple filter in a power supply circuit, or as a filter to bypass low frequency signals, etc. Because this type ofcapacitor is comparatively similar to the nature of a coil in construction, it isn't possible to use for high-frequency circuits. (It is said that the frequency characteristic is bad.) The photograph on the left is an exampleof the different values of electrolytic capacitors in which the capacitance and voltage differ.From the left to right:1F (50V) [diameter 5 mm, high 12 mm]

    47F (16V) [diameter 6 mm, high 5 mm]100F (25V) [diameter 5 mm, high 11 mm]220F (25V) [diameter 8 mm, high 12 mm]1000F (50V) [diameter 18 mm, high 40 mm]

    The size of the capacitor sometimes depends on the manufacturer. So the sizes shown here on this page are justexamples.

    In the photograph to the right, the mark indicating the negative lead of the component can be seen. You need topay attention to the polarity indication so as not to make a mistake when you assemble the circuit.

    Ceramic Capacitors

    Ceramic capacitors are constructed with materials such as titanium acid barium used as the dielectric. Internally,these capacitors are not constructed as a coil, so they can be used in high frequency applications. Typically, theyare used in circuits which bypass high frequency signals to ground.These capacitors have the shape of a disk. Their capacitance is comparatively small.

    The capacitor on the left is a 100pF capacitor with a diameter of about 3 mm.The capacitor on the right side is printed with 103, so 10 x 103pF becomes 0.01 F. The diameter of the disk is

    about 6 mm.Ceramic capacitors have no polarity.Ceramic capacitors should not be used for analog circuits, because they can distort the signal.

    Multilayer Ceramic Capacitors

    The multilayer ceramic capacitor has a many-layered dielectric. These capacitors are small in size, and havegood temperature and frequency characteristics.

    Square wave signals used in digital circuits can have a comparatively high frequency component included.This capacitor is used to bypass the high frequency to ground.

    In the photograph, the capacitance of the component on the left is displayed as 104. So, the capacitance is 10 x104 pF = 0.1 F. The thickness is 2 mm, the height is 3 mm, the width is 4 mm. The capacitor to the right has a

  • 7/28/2019 Complete Circuit Diagra1

    21/43

    capacitance of 103 (10 x 10 pF = 0.01 F). The height is 4 mm, the diameter of the round part is 2 mm. Thesecapacitors are not polarized. That is, they have no polarity.

    Mica Capacitors

    These capacitors use Mica for the dielectric. Mica capacitors have good stability because their temperaturecoefficient is small. Because their frequency characteristic is excellent, they are used for resonance circuits, andhigh frequency filters. Also, they have good insulation, and so can be utilized in high voltage circuits. It wasoften used for vacuum tube style radio transmitters, etc.Mica capacitors do not have high values of capacitance, and they can be relatively expensive.

    Pictured at the right are "Dipped mica capacitors." These can handle up to 500 volts.The capacitance from the leftCapacitance: 47pF (printed with 470J)[the width 7mm, the height 5mm, the thickness 4mm]

    Capacitance: 220pF (printed with 221J)[the width 10mm, the height 6mm, the thickness 4mm]Capacitance: 1000pF (printed with 102J)[the width 14mm, the height 9mm, the thickness 4mm]

    Variable capacitors are used for adjustment etc. of frequency mainly.On the left in the photograph is a "trimmer," which uses ceramic as the dielectric. Next to it on the right is one

    that uses polyester film for the dielectric.The pictured components are meant to be mounted on a printed circuit board.

    When adjusting the value of a variable capacitor, it is advisable to be careful.One of the component's leads is connected to the adjustment screw of the capacitor. This means that the value ofthe capacitor can be affected by the capacitance of the screwdriver in your hand. It is better to use a specialscrewdriver to adjust these components.

    Pictured in the upper left photograph are variable capacitors with the following specifications:Capacitance: 20pF (3pF - 27pF measured)[Thickness 6 mm, height 4.8 mm]In the same photograph, the device on the right has the following specifications:Capacitance: 30pF (5pF - 40pF measured)[The width (long) 6.8 mm, width (short) 4.9 mm, and the height 5 mm]The components in the photograph on the right are used for radio tuners, etc. They are called "Varicons" but thismay be only in Japan.The variable capacitor on the left in the photograph, uses air as the dielectric. It combines three independentcapacitors.

    For each one, the capacitance changed 2pF - 18pF. When the adjustment axis is turned, the capacitance of all 3

  • 7/28/2019 Complete Circuit Diagra1

    22/43

    capacitors change simultaneously.Physically, the device has a depth of 29 mm, and 17 mm width and height. (Not including the adjustment rod.)There are various kinds of variable capacitor, chosen in accordance with the purpose for which they are needed.The pictured components are very small.

    To the right in the photograph is a variable capacitor using polyester film as the dielectric. Two independent

    capacitors are combined.The capacitance of one side changes 12pF - 150pF, while the other side changes from 11pF - 70pF.Physically, it has a depth of 11mm, and 20mm width and height. (Not including the adjustment rod.)The pictured device also has a small trimmer built in to each capacitor to allow for precise adjustment up to15pF.

  • 7/28/2019 Complete Circuit Diagra1

    23/43

    TRANSFORMER

    A transformer is a static device, which transfer electric power from one circuit to another ofsame frequency. It can raise or low the voltage in a circuit but with a corresponding increaseor decrease in current. The transformer has two windings primary or secondary. The winding,

    which is to source of supply is called primary & other from which the power is obtained iscalled secondary.

    CLASSIFICATION OF TRANSFORMER :-

    Transformer may be classified into following types:-

    1. Classification according to purpose for which they are used

    (a) Power transformers.

    Distribution transformers.Instruments transformers.

    2. Classification according to the method of cooling

    (a) Air blast type.

    (b) Oil filled, self cooled, water cooled.

    3. Classification according to frequency used

    (a) Audio frequency transformers.

    Radio frequency transformers.

  • 7/28/2019 Complete Circuit Diagra1

    24/43

    RESISTORS

    Resistance is a passive component. It is defined as opposition to flow of current and isdefined by OHMS law ,which states that current in circuit, is directly proportional toelectromagnetic force and inversely to resistance. it is measured in ohms. Material shows a

    great variability in there resistively & in fact it is one of the most widely used physicalquantity. Material such as silver & copper have very low resistance, steal & nickel offer sucha high resistance that it can be considered to be virtually infinite & in fact they are regardingas insulator.

    To match various requirement of there many applications, resistor vary wide in size&composition. Although in general ,resistor are cylindrical in shape with a lead at either ends,there physical size ranges from larger than a pin head to over all the dimension of several cmmaterial used in there construction vary.

    Resistors are two types:-

    Fixed resistors.Variable resistors.

    TYPES OF RESISTORS

    Fixed Resistors

    The most common fixed resistor is the composition type. The resistance element is made of

    graphite, or some other form of carbon, and alloy materials. These resistors generally have

    Another kind of fixed resistor is the wire wound type. The resistance element is usually made of

    nickel-chromium wire wound on a ceramic rod. These resistors generally have resistance values

    Variable Resistors

    Variable resistors are used to adjust the amount of resistance in a circuit. A variable resistor

    consists of a sliding contact arm that makes contact with a stationary resistance element. As the

    sliding arm moves across the element, its point of contact on the element changes, effectively

    changing the length of the element. The rating of a variable resistor is its resistance at its highest

    setting.

    Variable resistors are also called rheostats or potentiometers. Potentiometers generally have

    composition elements. They are used as control devices in radios, amplifiers, televisions, and

    electrical instruments.

  • 7/28/2019 Complete Circuit Diagra1

    25/43

    Rating Tolerances

    The actual resistance of a resistor may be greater or less than its indicated rating. The possible

    range of variance from the indicated rating is called its tolerance. Common tolerances for

    composition resistors are 5, 10, and 20 percent. Wire wound resistors usually have a

    tolerance of 5 percent.

    Resistor rating color code

    Composition resistors are color coded to indicate resistance values or ratings. The color code

    consists of various color bands that indicate the resistance values of resistors in ohms as well as

    the tolerance rating. The Resistor Rating Color Code Table below is used to identify the

    resistance rating of resistors.

    Color1st

    Band

    2nd

    Band3rd Band

    4th

    Band

    Black 0 0 1 1

    Brown 1 1 10

    Red 2 2 100

    Orange 3 3 1,000

    Yellow 4 4 10,000

    Green 5 5 100,000

    Blue 6 6 1,000,000

    Violet 7 7 10,000,000

    Gray 8 8 100,000,000

  • 7/28/2019 Complete Circuit Diagra1

    26/43

    White 9 9 1,000,000,000

    Gold 0.1 5%

    Silver 0.01 10%

    None 20%

    Resistor Rating Color Code Table

    The resistor is the simplest, most basic electronic component. In an electronic circuit, theresistor opposes the flow of electrical current through itself. It accomplishes this by absorbingsome of the electrical energy applied to it, and then dissipating that energy as heat. By doingthis, the resistor provides a means of limiting or controlling the amount of electrical currentthat can pass through a given circuit.

    A newer, more precise method is shown to the left. The manufacturer coats a cylindricalceramic core with a uniform layer of resistance material, with a ring or cap of conductingmaterial over each end. Instead of varying the thickness or length of the resistance materialalong the middle of the ceramic core, the manufacturer cuts a spiral groove around theresistor body. By changing the angle of the spiral cut, the manufacturer can very accuratelyadjust the length and width of the spiral stripe, and therefore the resistance of the unit.

  • 7/28/2019 Complete Circuit Diagra1

    27/43

    VOLTAGE REGULAT0R

    A dc voltage regulator requires many components such as zener diode, transistors, resistors &potentiometer etc. all these components were provided in a single integrated circuit chipa722.it is a monolithic voltage regulator developed by fair child semiconductor ltd. in 1868.an improved IC was then developed as 7805 by fair child semiconductor & LM309 bynational semiconductor. These IC are three terminal fixed voltage regulator. This required anunregulated supply between input and common terminal. It has internal protection againstoverload to give a fixed output voltage at +5v.

    The three terminal voltage regulator is a single I.C. does not require many externalcomponents, has in built circuit for overload protection, saves spaces and cost.

    Building the Regulator

    To build the regulator, you need three parts:

    A 7805 5-volt voltage regulator in a TO-220 case (Radio Shack part number 276-1770)

    Two electrolytic capacitors, anywhere between 100 and 1,000 microfarads (typical RadioShack part number 272-958)

    The 7805 takes in a voltage between 7 and 30 volts and regulates it down to exactly 5 volts.The firstcapacitortakes out any ripple coming from the transformer so that the 7805 isreceiving a smooth input voltage, and the second capacitor acts as a load balancer to ensureconsistent output from the 7805.

    The 7805 has three leads. If you look at the 7805 from the front (the side with printing on it),the three leads are, from left to right, input voltage (7 to 30 volts), ground, and output voltage(5 volts).

    To connect the regulator to the transformer, you can use this configuration:

    http://www.howstuffworks.com/capacitor.htmhttp://www.howstuffworks.com/capacitor.htmhttp://www.howstuffworks.com/capacitor.htmhttp://www.howstuffworks.com/capacitor.htm
  • 7/28/2019 Complete Circuit Diagra1

    28/43

    The two capacitors are represented by parallel lines. The "+" sign indicates that electrolyticcapacitors are polarized: There is a positive and a negative terminal on an electrolyticcapacitor (one of which will be marked). You need to make sure you get the polarity rightwhen you install the capacitor.

    You can build this regulator on your breadboard. To do this, you need to understand how abreadboard is internally wired. The following figure shows you the wiring:

    On the outer edges of the breadboard are two lines of terminals running the length of theboard. All of these terminals are internally connected. Typically, you run +5 volts down oneof them and ground down the other. Down the center of the board is a channel. On either sideof the channel are sets of five interconnected terminals. You can use your volt-ohm meter tosee the interconnections. Set the meter's dial to its ohm setting, and then stick wires atdifferent points in the breadboard (the test leads for the meter are likely too thick to fit in the

    breadboard's holes).

    In the ohm setting, the meter measures resistance. Resistance will be zero if there is aconnection between two points (touch the leads together to see this), and infinite if there is noconnection (hold the leads apart to see this). You will find that points on the board really areinterconnected as shown in the diagram. Another way to see the connections is to pull backthe sticker on the back of the breadboard a bit and see the metal connectors.

    Now connect the parts for your regulator:

    Connect the ground wire of the transformer to one of the long outer strips on the breadboard.

    Plug the 7805 into three of the five-hole rows.

    Connect ground from the terminal strip to the middle lead of the 7805 with a wire -- simply

    cut a short piece of wire, strip off both ends and plug them in.Connect the positive wire from the transformer to the left lead (input) of the 7805.

    Connect a capacitor from the left lead of the 7805 to ground, paying attention to the polarity.

    Connect the 5-volt lead of 7805 to the other long outer terminal strip on the breadboard.

    Connect the second capacitor between the 5-volt and ground strips.

    You have created your regulator. It might look like this when you are done (two views):

    In both of the above figures, the lines from the transformer come in from the left. You can seethe ground line of the transformer connected directly into the ground strip running the length

    of the board at the bottom. The top strip supplies +5 volts and is connected directly to the +5pin of the 7805. The left capacitor filters the transformer voltage, while the right capacitor

  • 7/28/2019 Complete Circuit Diagra1

    29/43

    filters the +5 volts produced by the 7805. The LED connects between the +5 and groundstrips, through the resistor, and lets you know when the power supply is "on."

    Plug in the transformer and measure the input and output voltage of the 7805. You should seeexactly 5 volts coming out of the 7805, and whatever voltage your transformer delivers goingin. If you do not, then immediately disconnect the transformer and do the following:

    Pull out the capacitors. Plug the transformer back in for a moment and see if that changed

    anything.

    Make sure the ground wire and positive wire from the transformer are not reversed (if theyare, it is likely the 7805 is very hot, and possibly fried).

    Make sure the transformer is producing any voltage at all by disconnecting it and checking itwith your volt meter.

    Once you see 5 volts coming out of the regulator, you can test it further and see that it is onby connecting an LED to it. You need to connect an LED and a resistor in series -- somethingthat is easy to do on your breadboard. You must use the resistor or the LED will burn outimmediately. A good value for the resistor is 330 ohms, although anything between 200 and

    500 ohms will work fine. LEDs, being diodes, have a polarity, so if your LED does not light,try reversing the leads and see if that helps.

    It might seem like we've had to go to a tremendous amount of trouble just to get the powersupply wired up and working. But you've learned a couple of things in the process. Now wecan experiment with Boolean gates!

  • 7/28/2019 Complete Circuit Diagra1

    30/43

    ADC 0804

    Description

    The ADC0802 family are CMOS 8-Bit, successive-approximation A/D converters which use

    a modified potentiometric ladder and are designed to operate with the 8080A control bus viathree-state outputs.These converters appear to the processor as memory locations or I/O ports,and hence no interfacing logic is required. The differential analog voltage input has good co--mmonmode-rejection and permits offsetting analog zero-input voltage value.In addition, thevoltage reference input can beadjusted to allow encoding any smaller analog voltage span tothe full 8 bits of resolution.

    Features

    80C48 and 80C80/85 Bus Compatible - No Interfacing Logic Required

    Conversion Time < 100s

    Easy Interface to Most Microprocessors

    Will Operate in a Stand Alone Mode

    Differential Analog Voltage Inputs

    Works with Bandgap Voltage References

    TTL Compatible Inputs and Outputs

    On-Chip Clock Generator 0V to 5V Analog Voltage Input Range (Single + 5V Supply)

    No Zero-Adjust Required

  • 7/28/2019 Complete Circuit Diagra1

    31/43

    Sensors LM35

    Precision Centigrade Temperature

    General Description

    The LM35 series are precision integrated-circuit temperature sensors, whose output voltageis linearly . LM35 thus has an advantage over linear temperature sensors calibrated in Kelvin,as user is not required to subtract a large constant voltage from its output to obtainconvenient ce-

    ntigrade scaling. The LM35 does not require any external calibration or trimming to providetypical accuracies of 14C at room temperature and 34C over a full 55 to +150Ctemperature range. Low cost is assured by trimming and calibration at the wafer level.TheLM35s low

    output impedance, linear output, and precise inherent calibration make interfacing to readoutor control circuitry especially easy. It can be used with single power supplies, or with plusand minus supplies.As it draws only 60 A from its supply,it has very low self-heating,lessthan 0.1C in still air. The LM35 is rated to operate over a 55 to +150C temperature

    range,while the LM -35C is rated for a 40 to +110C range (10 with improvedaccuracy). The LM35 series is available packaged in hermetic TO-46 transistor packages,while the LM35C, LM35CA,and LM--35D are also available in the plastic TO-92 transistor

    package. The LM35D is also in an 8 lead

    - surface mount small outline package and a plastic TO-220 package.

    Features

    Calibrated directly in Celsius (Centigrade)

    Linear + 10.0 mV/C scale factor

    0.5C accuracy guaranteeable (at +25C)

    Rated for full 55 to +150C range

    Suitable for remote applications

    Low cost due to wafer-level trimming

    Operates from 4 to 30 volts Less than 60 A current drain

    Low self-heating, 0.08C in still air

    Nonlinearity only 14C typical

    Low impedance output, 0.1 W for 1 mA load

  • 7/28/2019 Complete Circuit Diagra1

    32/43

    RELAY

    A relays is an electrical switch that opens and closes under control of another electricalcircuit. It is therefore connected to ouput pins of the microcontroller and used to turn on/offhigh-power devices such as motors, transformers, heaters, bulbs, antenna systems etc. Theseare almost always placed away from the board sensitive components. There are various typesof relays but all of them operate in the same way. When a current flows through the coil, therelay is operated by an electromagnet to open or close one or many sets of contacts. Similarto optocouplers, there is no galvanic connection (electrical contact) between input and outputcircuits. Relays usually demand both higher voltage and current to start operation, but there

    are also miniature ones which can be activated by a low current directly obtained from amicrocontroller pin.

    The figure shows the solution specific to the 8051 microcontroller. A darlington transistor isused here to activate relays because of its high current gain. This is not in accordance withrules, but is necessary in the event that logic one activation is applied since the output

    current is then very low (pin acts as an input).

  • 7/28/2019 Complete Circuit Diagra1

    33/43

    In order to prevent the appearance of self-induction high voltage, caused by a sudden stop ofcurrent flow through the coil, an inverted polarized diode is connected in parallel to the coil.

    The purpose of this diode is to cut off the voltage peak.

  • 7/28/2019 Complete Circuit Diagra1

    34/43

    Liquid Crystal Displays (LCD)

    An LCD display is specifically manufactured to be used with microcontrollers, which meansthat it cannot be activated by standard IC circuits. It is used for displaying different messageson a miniature liquid crysal display.

    The model described here is for its low price and great capabilities most frequently used inpractice. It is based on the HD44780 microcontroller (Hitachi) and can display messages intwo lines with 16 characters each. It displays all the letters of alphabet, Greek letters,

    punctuation marks, mathematical symbols etc. In addition, it is possible to display symbolsmade up by the user. Other useful features include automatic message shift (left and right),cursor appearance, LED backlight etc.

    LCD Pins

    There are pins along one side of a small printed board. These are used for connecting to themicrocontroller. There are in total of 14 pins marked with numbers (16 if it has backlight).Their function is described in the table bellow:

    F U N C T I O NP I N

    N U M B E RN A M E

    L O G I C

    S T A T ED E S C R I P T I O N

    Ground 1 Vss - 0V

    Power supply 2 Vdd - +5V

    Contrast 3 Vee - 0 - Vdd

    Control of

    operating

    4 RS0

    1

    D0 D7 are interpreted as

    commands

    D0 D7 are interpreted as data

    5 R/W0

    1

    Write data (from controller to LCD)

    Read data (from LCD to controller)

    6 E 01

    Access to LCD disabledNormal operating

  • 7/28/2019 Complete Circuit Diagra1

    35/43

    From 1 to 0 Data/commands are transferred to

    LCD

    Data / commands

    7 D0 0/1 Bit 0 LSB

    8 D1 0/1 Bit 1

    9 D2 0/1 Bit 2

    10 D3 0/1 Bit 3

    11 D4 0/1 Bit 4

    12 D5 0/1 Bit 5

    13 D6 0/1 Bit 6

    14 D7 0/1 Bit 7 MSB

  • 7/28/2019 Complete Circuit Diagra1

    36/43

    INTERFACING OF LCD

    Depending on how many lines are used for connecting the LCD to the microcontroller, thereare 8-bit and 4-bit LCD modes. The appropriate mode is selected at the beginning of theoperation. This process is called initialization. 8-bit LCD mode uses outputs D0-D7 totransfer data in the way explained on the previous page. The main purpose of 4-bit LEDmode is to save valuable I/O pins of the microcontroller. Only 4 higher bits (D4-D7) are usedfor communication, while other may be left unconnected. Each data is sent to the LCD in twosteps: four higher bits are sent first (normally through the lines D4-D7), then four lower bits.Initialization enables the LCD to link and interpret received bits correctly. Data is rarely readfrom the LCD (it is mainly transferred from the microcontroller to LCD) so that it is often

    possible to save an extra I/O pin by simple connecting R/W pin to ground. Such saving has itsprice. Messages will be normally displayed, but it will not be possible to read the busy flagsince it is not possible to read the display either.

  • 7/28/2019 Complete Circuit Diagra1

    37/43

    INTERFACING OF ADC 0804 WITH AT89C51

    Circuit diagram:-

    Fortunately, there is a simple solution. After sending a character or a command it is importantto give the LCD enough time to do its job. Owing to the fact that execution of the slowestcommand lasts for approximately 1.64mS, it will be sufficient to wait approximately 2mS forLCD.

    The figure above shows the schematic for interfacing ADC0804 to 8051. The circuit initiatesthe ADC to convert a given analogue input , then accepts the corresponding digital data anddisplays it on the LED array connected at P0. For example, if the analogue input voltage Vin

    is 5V then all LEDs will glow indicating 11111111 in binary which is the equivalent of 255in decimal. AT89s51 is the microcontroller used here. Data out pins (D0 to D7) of theADC0804 are connected to the port pins P1.0 to P1.7 respectively. LEDs D1 to D8 areconnected to the port pins P0.0 to P0.7 respectively. Resistors R1 to R8 are current limitingresistors. In simple words P1 of the microcontroller is the input port and P0 is the output port.Control signals for the ADC (INTR, WR, RD and CS) are available at port pins P3.4 to P3.7respectively. Resistor R9 and capacitor C1 are associated with the internal clock circuitry ofthe ADC. Preset resistor R10 forms a voltage divider which can be used to apply a particularinput analogue voltage to the ADC. Push button S1, resistor R11 and capacitor C4 forms adebouncing reset mechanism. Crystal X1 and capacitors C2,C3 are associated with the clockcircuitry of the microcontroller.

  • 7/28/2019 Complete Circuit Diagra1

    38/43

    PROGRAMMING:-

    //********port pins name declaration***************/

    R_S Bit p1.0

    R_W Bit p1.1

    Enable Bit p1.2

    Lcd_Port Equ P0

    //*************************************************

    //********* Adc Pins Declaration *************/

    Read Bit P1.3

    Write Bit p1.4

    Interupt Bit p1.5

    Adc_Port Equ p2 ;0a0h

    //************data segment declaration*************/

    DSEG AT 0030H

    Temp : DS 4

    Time: DS 3

    //**************************************************

    //***********code segment starts here **************/

    CSEG AT 0000H

    org 0000h

    acall init_LCD

    clr p1.6 ; relay 1

    clr p1.7 ; relay 2

    mov r0,#00h ;; compensation reg

    loop : mov Temp,#080h

    call sendCmd2LCD

    upper_1 : mov dptr,#Display

    next_char:

    clr a

  • 7/28/2019 Complete Circuit Diagra1

    39/43

    movc a,@a+dptr

    jz Disp_2

    mov Temp,a

    acall sendData2LCD

    inc dptr

    sjmp next_char

    Disp_2: mov Temp,#0c3h

    call sendCmd2LCD

    mov dptr,#Display2

    next_char2:

    clr a

    movc a,@a+dptrjz Go_4_adc

    Go_4_adc:

    mov Temp,#0c0h

    call sendCmd2LCD

    //*********** Adc Initialization *********

    mov Adc_Port,#0ffh

    setb Interupt

    Start_conv: clr Write ; Send low to High pulse to START conv.

    nop

    setb Write

    Wait_4_conv:jb Interupt,Wait_4_conv

    clr Read ; Conversion End

    mov a,Adc_Port

    ret_form_comp:

    call Hex_2_Ascii

    mov Temp,Save_1 ; Send 1st digit

    acall sendData2LCD

    mov Temp,Save_1+1 ; Send 2nd digit

    acall sendData2LCD

    mov Temp,Save_1+2 ; Send 3rd digit

    acall sendData2LCD

    resum_Srvc: mov Temp,#0c0h

  • 7/28/2019 Complete Circuit Diagra1

    40/43

    call sendCmd2LCD

    setb Read ; Ready for Next Round

    call time_pass

    ljmp Start_conv

    //***************************************************/

    Hex_2_Ascii:

    mov b,#100

    div ab

    orl a,#30h

    mov Save_1,a

    mov a,b

    mov b,#10

    div ab

    orl a,#30h

    mov Save_1+1,a

    mov a,b

    orl a,#30h

    mov Save_1+2,a

    ret

    sendCmd2LCD

    clr R_W

    clr R_S

    nop

    mov Lcd_Port,Temp

    setb Enable

    nop

    nop

    clr Enable

    ret

    sendData2LCD:

    clr R_W

    setb R_S

    nop

    mov Lcd_Port,Temp

  • 7/28/2019 Complete Circuit Diagra1

    41/43

    setb Enable

    nop

    nop

    clr Enable

    ret

    delay_sec_LCD:

    MOV R3,#250

    _LOOP7: MOV R2,#255

    _LOOP8: DJNZ R2,_LOOP8

    DJNZ R3,_LOOP7

    NOP

    delay_miNT_LCD:

    MOV R7,#2_LOOP_F: MOV R3,#50

    _LOOP9: MOV R2,#255

    _LOOP6: DJNZ R2,_LOOP6

    DJNZ R3,_LOOP9

    ; DJNZ R7,_LOOP_F

    NOP

    RET

    init_LCD:

    call delay_sec_LCD

    mov Temp,#30H

    call sendCmd2LCD

    mov Temp,#38H

    call sendCmd2LCD

    mov Temp,#08H

    call sendCmd2LCDmov Temp,#01H

    call sendCmd2LCD

    mov Temp,#06H

    call sendCmd2LCD

    mov Temp,#0cH

    call sendCmd2LCD

    mov Temp,#14H

    call sendCmd2LCD

  • 7/28/2019 Complete Circuit Diagra1

    42/43

  • 7/28/2019 Complete Circuit Diagra1

    43/43

    PROJECT IMAGE