Train Report

Embed Size (px)

Citation preview

  • 7/30/2019 Train Report

    1/58

    MICROCONTROLLER BASED Automated Train Signal System

    SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENT FOR AWARD OF

    THE DEGREE

    OF

    B.TECH (ELECTRONICS & COMMUNICATION)

    (2007-2011)

    SUBMITTED

    BY:

    . RAJIV

    KUMAR(07/EL/70)

    . RAVINDER

    KUMAR(07/EL/74)

  • 7/30/2019 Train Report

    2/58

    . SHAINKI

    BANSAL(07/EL/82)

    Maharshi Dayanand Universty (MDU)Rohtak

    DEPARMENT OF:

    ELECTRONICS & COMMUNICATION ENGINEERING

    B.S.A.I.T.M FARIDABAD

    ACKNOWLEDGMENT

    THE authors gratefully acknowledgw the guidance provided by the project supervisor

    Mr. Deepak Arora (project coordinator) throughout the development of the project.

    The authors wish to thank Mr. jaspal jindal,HOD ELECTRONICS & COMMUNICATION

    ENGINEERING

    DEPARTMENT for his consistent support, valuable suggestion and directions.

  • 7/30/2019 Train Report

    3/58

    The authors also thank their batch mates for providing constant encouragement,

    support and suggestions during the development of the project.

    . RAJIV KUMAR (07/EL/70)

    . RAVINDER KUMAR(07/EL/74)

    . SHAINKI BANSAL(07/EL/82)

    CANDIDATES DECLARATION

    We hereby declare that this project report titled microcontroller based code lock

    submitted towords the completion of major project in 8th semester of B.TECH(E.C.E) in

    B.S.ANANGPURIA INSTITUTE OF TECHNOLOGY AND MANAGEMENT,FARIDABAD

    is an authentic record of work carried out under the guidance of

    Mr. JASPAL JINDAL Mr.DEEPAK ARORA

    (HOD,ECE DEPT) (PROJECT COORDINATOR)

    DATE:APRIL 8,2011

    PLACE: FARIDABAD

  • 7/30/2019 Train Report

    4/58

    CERTIFICATE

    This is to certify that the declaration made by Mr. Rajiv Kumar,Ravinder Kumar,Shainki

    Bansal is true the best of my knowledge and belief.

    DATE:APRIL 8,2011

    PLACE: FARIDABAD

    Mr. JASPAL JINDAL

    (HOD,ECE DEPT)

  • 7/30/2019 Train Report

    5/58

    Abstract

    Automated train signaling system project is a prototype of Indian railways signal system

    and also proposed a way for AUTOMATIC CONTROL FOR UNMANNED RAILWAY

    GATE. This use three led (red, green, yellow) controlled by microcontroller 8051 to

    represent train signals. Microcontroller sense the Location/position of train is done by

    using magnetic reed switch and control all signal and Gate. Unmanned gate is

    controlled by interfacing a stepper motor to microcontroller which provide fixed step to

    open and close the gate.

    This simple train signal prototype project is based on a 20-pin ATMEL microcontroller

    T89C2051. It employs a 4-digit sequential code with time-out security feature. In

    addition to the microcontroller, the circuit uses a single additional IC (ULN2003) .

  • 7/30/2019 Train Report

    6/58

    INDEX

    1. INTRODUCTION

    2. CIRCUIT DIAGRAM

    3. LAYOUT

    4. EXPLANATION OF CIRCUIT DIAGRAM

    5. COMPONENTS DISCRIPTION

    6. INTRODUCTION TO MICROCONTROLLER

    7. 8051 ARCHTECTURE

    8. 8051 PIN FUNCTION

    9. PROGRAMING

  • 7/30/2019 Train Report

    7/58

    This diagram shows a line with three aspect of signal. The block is occupied by Train 1is protected by the red signal at the entrance.The block behind IS Clear of train but a yellow signal is provide adavance warning ofthe red aspect ahead. This block provide the safe braking distance for the train 2.Thenext block in rear is also clear of train and shows green.

  • 7/30/2019 Train Report

    8/58

  • 7/30/2019 Train Report

    9/58

    Circuit Description-:

    As already mentioned, the project makes use of ATMEL AT89C2051 microcontroller,

    in 20-pin DIP package, which supports 2 kB of flash-based program memory. Signal

    LED are connected to the Port P3 and Port P1. Which are controlled when signal are

    received from magnetic reed switch. Magnetic reed switch are connected to Port P1.

    Mocrocontroller received the signal from reed switch and and command LED and

    stepper motor.

    A 4 pole stepper motor is connected to port P2 through a IC ULN2003 which is used

    to drive the Stepper motor.

    ADD here more about microcontroller reset,circuit,

    Description of power supply

    ******************************************

    POWER SUPPLY:Power supply is a reference to a source of electrical power. A device or system thatsuppliesElectrical or other types of energy to an output load or group of loads is called a powersupply unitOrPSU. The term is most commonly applied to electrical energy supplies, less often tomechanicalones, and rarely to others.Here in our application we need a 5v DC power supply for all electronics involved in the

    project.This requires step down transformer, rectifier, voltage regulator, and filter circuit forgeneration of5v DC power. Here a brief description of all the components is given as follows:

  • 7/30/2019 Train Report

    10/58

    TRANSFORMER:A transformeris a device that transfers electrical energy from one circuit to anotherthrough inductively coupled conductors the transformer's coils or "windings". Exceptfor air-core transformers, the conductors are commonly wound around a single iron-richcore, or around separate but magnetically coupled cores. A varying current in the first or

    "primary" winding creates a varying magnetic field in the core (or cores) of thetransformer. This varying magnetic field induces a varying electromotive force (EMF) or"voltage" in the "secondary" winding. This effect is called mutual induction.

    If a load is connected to the secondary circuit, electric charge will flow in the secondary

    winding of the transformer and transfer energy from the primary circuit to the loadconnected in the secondary circuit.The secondary induced voltage VS, of an ideal transformer, is scaled from the primaryVPby a factor equal to the ratio of the number of turns of wire in their respectivewindings:By appropriate selection of the numbers of turns, a transformer thus allows analternating voltage to be stepped up by making NS more than NP or steppeddown, by making it.

    BASIC PARTS OF A TRANSFORMERIn its most basic form a transformer consists of:

    A primary coil or winding.A secondary coil or winding.A core that supports the coils or windings.

  • 7/30/2019 Train Report

    11/58

    Refer to the transformer circuit in figure as you read the following explanation: Theprimary winding is connected to a 60-hertz ac voltage source. The magnetic field (flux)builds up (expands) and collapses (contracts) about the primary winding. Theexpanding and contracting magnetic field around the primary winding cuts thesecondary winding and induces an alternating voltage into the winding. This voltage

    causes alternating current to flow through the load. The voltage may be stepped up ordown depending on the design of the primary and secondary windings.

    THE COMPONENTS OF A TRANSFORMER

    Two coils of wire (called windings) are wound on some type of core material. In somecases the coils of wire are wound on a cylindrical or rectangular cardboard form. Ineffect, the core material is air and the transformer is called an AIR-CORETRANSFORMER. Transformers used at low frequencies, such as 60 hertz and 400hertz, require a core of low-reluctance magneticMaterial usually iron. This type of transformer is called an IRON-CORE TANSFORMER.Most power transformers are of the iron-core type. The principle parts of a transformerand theirfunctions are:The CORE, which provides a path for the magnetic lines of flux.The PRIMARY WINDING, which receives energy from the ac source.

    The SECONDARY WINDING, which receives energy from the primary winding anddelivers it to the load.The ENCLOSURE, which protects the above components from dirt, moisture, andmechanical damage.

    BRIDGE RECTIFIER

  • 7/30/2019 Train Report

    12/58

    A bridge rectifier makes use of four diodes in a bridge arrangement to achieve full-waverectification.This is a widely used configuration, both with individual diodes wired as shown and withsinglecomponent bridges where the diode bridge is wired internally.

    BASIC OPERATIONAccording to the conventional model of current flow originally established by BenjaminFranklin and still followed by most engineers today, current is assumedto flow throughelectrical conductors from the positive to the negative pole. In actuality, free electronsin a conductor nearly always flow from the negative to the positive pole. In the vastmajority of applications, however, the actualdirection of current flow is irrelevant.Therefore, in the discussion below the conventional model is retained.In the diagrams below, when the input connected to the left corner of the diamond ispositive, and the input connected to the right corner is negative, current flows from theuppersupply terminal to the right along the red (positive) path to the output, andreturns to the lowersupply terminal via the blue (negative) path.

    When the input connected to the left corner is negative, and the input connected to theright corner is positive, current flows from the lowersupply terminal to the right alongthe red path to the output, and returns to the uppersupply terminal via the blue path.

  • 7/30/2019 Train Report

    13/58

    In each case, the upper right output remains positive and lower right output negative.

    Since thisis true whether the input is AC or DC, this circuit not only produces a DC output from an

    AC input, it can also provide what is sometimes called "reverse polarity protection". Thatis, it permits normal functioning of DC-powered equipment when batteries have beeninstalled backwards, or when the leads (wires) from a DC power source have beenreversed, and protects the equipment from potential damage caused by reversepolarity. Prior to availability of integrated electronics, such a bridge rectifier was alwaysconstructed from discrete components. Since about 1950, a single four-terminalcomponent containing the four diodes connected in the bridge configuration became astandard commercial component and is now available with various voltage and currentratings.

    OUTPUT SMOOTHINGFor many applications, especially with single phase AC where the full-wave bridgeserves to convert an AC input into a DC output, the addition of a capacitor may bedesired because the bridge alone supplies an output of fixed polarity but continuouslyvarying or "pulsating" magnitude (see diagram above).

  • 7/30/2019 Train Report

    14/58

    The function of this capacitor, known as a reservoir capacitor (or smoothing capacitor) is

    to lessen the variation in (or 'smooth') the rectified AC output voltage waveform from thebridge. One explanation of 'smoothing' is that the capacitor provides a low impedancepath to the AC component of the output, reducing the AC voltage across, and ACcurrent through, the resistive load. In less technical terms, any drop in the outputvoltage and current of the bridge tends to be canceled by loss of charge in thecapacitor. This charge flows out as additional current through the load. Thus thechange of load current and voltage is reduced relative to what would occurwithout the capacitor. Increases of voltage correspondingly store excess charge in thecapacitor,thus moderating the change in output voltage / current. The simplified circuitshown has a well-deserved reputation for being dangerous, because, in someapplications, the capacitor can retain a lethalcharge after the AC power source is

    removed. If supplying a dangerous voltage, a practical circuit should include a reliableway to safely discharge the capacitor. If the normal load cannot be guaranteed toperform this function, perhaps because it can be disconnected, the circuit shouldinclude a bleeder resistor connected as close as practical across the capacitor. Thisresistor should consume a current large enough to discharge the capacitor in areasonable time, but small enough to minimize unnecessary power waste.

    Because a bleeder sets a minimum current drain, the regulation of the circuit, defined aspercentage voltage change from minimum to maximum load, is improved. However inmany cases the improvement is of insignificant magnitude. The capacitor and the load

    resistance have a typical time constant = RCwhere Cand Rare the capacitance andload resistance respectively. As long as the load resistor is large enough so thatthis time constant is much longer than the time of one ripple cycle, the aboveconfiguration will produce a smoothed DC voltage across the load.In some designs, a series resistor at the load side of the capacitor is added. Thesmoothing can then be improved by adding additional stages of capacitorresistor pairs,often done only for subsupplies to critical high-gain circuits that tend to be sensitive tosupply voltage noise. The idealized waveforms shown above are seen for both voltage

  • 7/30/2019 Train Report

    15/58

    and current when the load on the bridge is resistive. When the load includes asmoothing capacitor, both the voltage and the current waveforms will be greatlychanged. While the voltage is smoothed, as described above, current will flow throughthe bridge only during the time when the input voltage is greater thanthe capacitor voltage. For example, if the load draws an average current of n Amps, and

    the diodes conduct for 10% of the time, the average diode current during conductionmust be 10n Amps. This non-sinusoidal current leads to harmonic distortion and a poorpower factor in the

    AC supply.In a practical circuit, when a capacitor is directly connected to the output of a bridge, thebridge diodes must be sized to withstand the current surge that occurs when the poweris turned on at the peak of the AC voltage and the capacitor is fully discharged.Sometimes a small series resistor is included before the capacitor to limit this current,though in most applications the power supply transformer's resistance is already

    sufficient. Output can also be smoothed using a choke and second capacitor. Thechoke tends to keep the current (rather than the voltage) more constant. Due to therelatively high cost of an effective choke compared to a resistor and capacitor this is notemployed in modern equipment.Some early console radios created the speaker's constant field with the current from thehigh voltage ("B +") power supply, which was then routed to the consuming circuits,(permanent magnets were then too weak for good performance) to create the speaker'sconstant magneticfield. The speaker field coil thus performed 2 jobs in one: it acted as a choke, filteringthe power supply, and it produced the magnetic field to operate the speaker.

    REGULATOR IC (78XX)

    It is a three pin IC used as a voltage regulator. It converts unregulated DC current intoregulated DCcurrent.

  • 7/30/2019 Train Report

    16/58

    Normally we get fixed output by connecting the voltage regulator at the output of thefiltered DC (see in above diagram). It can also be used in circuits to get a low DC

    voltage from a high DC voltage (for example we use 7805 to get 5V from 12V). Thereare two types of voltage regulators 1. fixed voltage regulators (78xx, 79xx) 2. variablevoltage regulators (LM317) In fixed voltage regulators there is another classification 1.+ve voltage regulators 2. -ve voltage regulators POSITIVE VOLTAGE REGULATORSThis include 78xx voltage regulators. The most commonly used ones are 7805 and7812. 7805 gives fixed 5V DC voltage if input voltage is in (7.5V, 20V).

    The CAPACITOR FILTERThe simple capacitor filter is the most basic type of power supply filter. The applicationof the simple capacitor filter is very limited. It is sometimes used on extremely high-voltage, lowcurrent power supplies for cathode ray and similar electron tubes, whichrequire very little load current from the supply. The capacitor filter is also used wherethe power-supply ripple frequency is not critical; this frequency can be relatively high.The capacitor (C1) shown in figure 4-15 is a simple filter connected across the output ofthe rectifier in parallel with the load.

    Full-wave rectifier with a capacitor filter.

  • 7/30/2019 Train Report

    17/58

  • 7/30/2019 Train Report

    18/58

    UNFILTERED

    Half-wave rectifier with and without filtering

    FILTER

    The value of the capacitor is fairly large (several microfarads), thus it presents a

    relatively low reactance to the pulsating current and it stores a substantial charge.The rate of charge for the capacitor is limited only by the resistance of the conductingdiode, which is relatively low. Therefore, the RC charge time of the circuit is relativelyshort. As a result, when the pulsating voltage is first applied to the circuit, the capacitorcharges rapidly and almost reaches the peak value of the rectified voltage within thefirst few cycles. The capacitor attempts to charge to the peak value of the rectifiedvoltage anytime a diode is conducting, and tends to retain its charge when the rectifieroutput falls to zero. (The capacitor cannot discharge immediately.) The capacitor slowly

  • 7/30/2019 Train Report

    19/58

    discharges through the load resistance (RL) during the time the rectifier is non-conducting. The rate of discharge of the capacitor is determined by the value ofcapacitance and the value of the load resistance. If the capacitance and load-resistancevalues are large, the RC discharge time for the circuit is relatively long. A comparison ofthe waveforms shown in figure 4-16 (view A and view B) illustrates that the addition of

    C1 to the circuit results in an increase in the average of the output voltage (Eavg) and areduction in the amplitude of the ripple component (Er) which is normally present acrossthe load resistance.

    Now, let's consider a complete cycle of operation using a half-wave rectifier, acapacitive filter (C1), and a load resistor (RL). As shown in view A of figure 4-17, thecapacitive filter (C1) is assumed to be large enough to ensure a small reactance to thepulsating rectified current. The resistance of RL is assumed to be much greater than thereactance of C1 at the input frequency. When the circuit is energized, the diodeconducts on the positive half cycle and current flows through the circuit, allowing C1 tocharge. C1 will charge to approximately the peak value of the input voltage. (The charge

    is less than the peak value because of the voltage drop across the diode (D1)). In viewof the figure, the heavy solid line on the waveform indicates the charge on C1. Asillustrated in view B, the diode cannot conduct on the negative half cycle because the

    Anode of D1 is negative with respect to the cathode. During this interval, C1 dischargesthrough the load resistor (RL). The discharge of C1 produces the downward slope asindicated by the solid line on the waveform in view B. In contrast to the abrupt fall of theapplied ac voltage from peak value to zero, the voltage across C1 (and thus across RL)during the discharge period gradually decreases until the time of the next half cycle ofrectifier operation. Keep in mind that for good filtering, the filter capacitor should chargeup as fast as possible and discharge as little as possible.

    Figure 4-17A. - Capacitor filter circuit (positive and negative half cycles). POSITIVEHALFCYCLE

  • 7/30/2019 Train Report

    20/58

    Since practical values of C1 and RL ensure a more or less gradual decrease of thedischarge voltage, a substantial charge remains on the capacitor at the time of the nexthalf cycle of operation. As a result, no current can flow through the diode until the risingac input voltage at the anode of the diode exceeds the voltage on the charge remainingon C1. The charge on C1 is the cathode potential of the diode. When the potential onthe anode exceeds the potential on the cathode (the charge on C1), the diode againconducts and C1 begins to charge to approximately the peak value of the appliedvoltage. After the capacitor has charged to its peak value, the diode will cut off and thecapacitor will start to discharge. Since the fall of the ac input voltage on the anode isconsiderably more rapid than the decrease on the capacitor voltage, the cathodequickly become more positive than the anode, and the diode ceases to conduct.

    Operation of the simple capacitor filter using a full-wave rectifier is basically the same asthat discussed for the half-wave rectifier. Referring to figure 4-18, you should notice thatbecause one of the diodes is always conducting on. Either alternation, the filtercapacitor charges and discharges during each half cycle. (Note that each diodeconducts only for that portion of time when the peak secondary voltage is greater thanthe charge across the capacitor.)

    Figure 4-18. - Full-wave rectifier (with capacitor filter).

  • 7/30/2019 Train Report

    21/58

    Another thing to keep in mind is that the ripple component (E r) of the output voltage isan ac voltage and the average output voltage (Eavg) is the dc component of the output.Since the filter capacitor offers relatively low impedance to ac, the majority of the accomponent flow through the filter capacitor. The ac component is therefore bypassed(shunted) around the load resistance, and the entire dc component (or Eavg) flows

    through the load resistance. This statement can be clarified by using the formula for XCin a half-wave and full-wave rectifier. First, you must establish some values for thecircuit.

    CIRCUIT DIAGRAM OF POWER SUPPLY

    When we have to learn about a new computer we have to familiarize about the machineCapability we are using, and we can do it by studying the internal hardware design

    (devices Architecture), and also to know about the size, number and the size of theregisters. A microcontroller is a single chip that contains the processor (the CPU), non-volatile memory for the program (ROM or flash), volatile memory for input and output(RAM), a clock and an I/O control unit. Also called a "computer on a chip," billions ofmicrocontroller units (MCUs) are embedded each year in a myriad of products from toysto appliances to automobiles. For example, a single vehicle can use 70 or moremicrocontrollers. The following picture describes a general block diagram ofmicrocontroller

  • 7/30/2019 Train Report

    22/58

    89S52: The AT89S52 is a low-power, high-performance CMOS 8-bit microcontrollerwith 8K bytes of in-system programmable Flash memory. The device is manufacturedusing Atmels high-density nonvolatile memory technology and is compatible with theindustry-stand and 80C51instruction set and pin out. The on-chip Flash allows the

    program memory to be reprogrammed in-system or by a conventional nonvolatilememory pro-grammar. By combining a versatile 8-bit CPU with in-systemprogrammable Flash on a monolithic chip, the Atmel AT89S52 is a powerfulmicrocontroller, which provides a highly flexible and cost-effective solution to many,embedded control applications. The AT89S52 provides the following standard features:8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers,three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplexserial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designedwith static logic for operation down to zero frequency and supports two softwareselectable power saving modes. The Idle Mode stops the CPU while allowing the RAM,timer/counters, serial port, and interrupt system to continue functioning. The Power-

    down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip

  • 7/30/2019 Train Report

    23/58

    functions until the next interrupt

    The hardware is driven by a set of program instructions, or software. Once familiar withhardware and software, the user can then apply the microcontroller to the problemseasily.

    The pin diagram of the 8051 shows all of the input/output pins unique tomicrocontrollers:The following are some of the capabilities of 8051 microcontroller Internal

  • 7/30/2019 Train Report

    24/58

  • 7/30/2019 Train Report

    25/58

    The following are some of the capabilities of 8051 microcontroller.Internal ROM and RAMI/O ports with programmable pinsTimers and countersSerial data communication

    The 8051 architecture consists of these specific features:16 bit PC &data pointer (DPTR)8 bit program status word (PSW)8 bit stack pointer (SP)Internal ROM 4kInternal RAM of 128 bytes.4 register banks, each containing 8 registers80 bits of general purpose data memory32 input/output pins arranged as four 8 bit ports: P0-P3Two 16 bit timer/counters: T0-T1

    Two external and three internal interrupt sources Oscillator andClock circuits.

    RESISTOR

  • 7/30/2019 Train Report

    26/58

  • 7/30/2019 Train Report

    27/58

  • 7/30/2019 Train Report

    28/58

    A resistoris a two-terminalelectronic component that produces a voltage across itsterminals that is proportional to the electric current through it in accordance with Ohm'slaw:V= IR

    UnitsThe ohm (symbol: ) is the SI unit ofelectrical resistance, named afterGeorg SimonOhm. Commonly used multiples and submultiples in electrical and electronic usage arethe milliohm (1x103), kilohm (1x103), and megohm (1x106).

    Theory of operation

    Ohm's lawThe behavior of an ideal resistor is dictated by the relationship specified in Ohm's law:

    Ohm's law states that the voltage (V) across a resistor is proportional to the current (I)through it where the constant of proportionality is the resistance (R).Equivalently, Ohm's law can be stated:

    This formulation of Ohm's law states that, when a voltage (V) is maintained across aresistance (R), a current (I) will flow through the resistance.This formulation is often used in practice. For example, if V is 12 volts and R is400 ohms, a current of 12 / 400 = 0.03 amperes will flow through the resistance R.[edit]Series and parallel resistorsMain article: Series and parallel circuitsResistors in a parallel configuration each have the same potential difference (voltage).To find their total equivalent resistance (Req):

    The parallel property can be represented in equations by two vertical lines "||" (as ingeometry) to simplify equations. For two resistors,

    http://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Proportionality_(mathematics)#Direct_proportionhttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Ohm_(unit)http://en.wikipedia.org/wiki/%CE%A9http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Georg_Simon_Ohmhttp://en.wikipedia.org/wiki/Georg_Simon_Ohmhttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Voltshttp://en.wikipedia.org/wiki/Ohmshttp://en.wikipedia.org/wiki/Ampereshttp://en.wikipedia.org/w/index.php?title=Resistor&action=edit&section=4http://en.wikipedia.org/wiki/Series_and_parallel_circuitshttp://en.wikipedia.org/wiki/Series_and_parallel_circuitshttp://en.wikipedia.org/wiki/File:Resistors_in_parallel.svghttp://en.wikipedia.org/wiki/Terminal_(electronics)http://en.wikipedia.org/wiki/Electronic_componenthttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Proportionality_(mathematics)#Direct_proportionhttp://en.wikipedia.org/wiki/Electric_currenthttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Ohm_(unit)http://en.wikipedia.org/wiki/%CE%A9http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Georg_Simon_Ohmhttp://en.wikipedia.org/wiki/Georg_Simon_Ohmhttp://en.wikipedia.org/wiki/Ohm's_lawhttp://en.wikipedia.org/wiki/Voltshttp://en.wikipedia.org/wiki/Ohmshttp://en.wikipedia.org/wiki/Ampereshttp://en.wikipedia.org/w/index.php?title=Resistor&action=edit&section=4http://en.wikipedia.org/wiki/Series_and_parallel_circuitshttp://en.wikipedia.org/wiki/Series_and_parallel_circuits
  • 7/30/2019 Train Report

    29/58

    The current through resistors in seriesstays the same, but the voltage across eachresistor can be different. The sum of the potential differences (voltage) is equal to thetotal voltage. To find their total resistance:

    A resistor network that is a combination of parallel and series can be broken up intosmaller parts that are either one or the other. For instance,

    CAPACITOR

    http://en.wikipedia.org/wiki/Series_and_parallel_circuitshttp://en.wikipedia.org/wiki/Series_and_parallel_circuitshttp://en.wikipedia.org/wiki/File:Resistors_in_series_and_parallel.svghttp://en.wikipedia.org/wiki/File:Resistors_in_series.svghttp://en.wikipedia.org/wiki/Series_and_parallel_circuits
  • 7/30/2019 Train Report

    30/58

    TYPE- PASSIVE

    Invented Ewald Georg von Kleist (October 1745)

    Electronic symbol

    http://en.wikipedia.org/wiki/Ewald_Georg_von_Kleisthttp://en.wikipedia.org/wiki/Electronic_symbolhttp://en.wikipedia.org/wiki/File:Capacitor_Symbol_alternative.svghttp://en.wikipedia.org/wiki/Ewald_Georg_von_Kleisthttp://en.wikipedia.org/wiki/Electronic_symbol
  • 7/30/2019 Train Report

    31/58

    Theory of operationCapacitance

    Charge separation in a parallel-platecapacitor causes an internal electricfield. A dielectric (orange) reduces thefield and increases the capacitance.

    A simple demonstration of a parallel-plate capacitor

    A capacitor consists of two conductors separated by a non-conductive region[8]

    calledthe dielectric medium though it may be a vacuum or a semiconductordepletionregion chemically identical to the conductors. A capacitor is assumed to be self-contained and isolated, with no net electric chargeand no influence from any external

    electric field. The conductors thus hold equal and opposite charges on their facingsurfaces,[9] and the dielectric develops an electric field. In SI units, a capacitance ofone farad means that one coulomb of charge on each conductor causes a voltage ofone volt across the device.The capacitor is a reasonably general model for electric fields within electric circuits. An

    ideal capacitor is wholly characterized by a constant capacitance C, defined as the ratioof charge Q on each conductor to the voltage Vbetween them

    Sometimes charge build-up affects the capacitor mechanically, causing its capacitance

    to vary. In this case, capacitance is defined in terms of incremental changes:

    http://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Dielectric_mediumhttp://en.wikipedia.org/wiki/Vacuumhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p157-8http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Coulombhttp://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/File:Plattenkondensator_hg.jpghttp://en.wikipedia.org/wiki/File:Plattenkondensator_hg.jpghttp://en.wikipedia.org/wiki/File:Capacitor_schematic_with_dielectric.svghttp://en.wikipedia.org/wiki/Capacitancehttp://en.wikipedia.org/wiki/Electrical_conductorhttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p168-7http://en.wikipedia.org/wiki/Dielectric_mediumhttp://en.wikipedia.org/wiki/Vacuumhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Depletion_regionhttp://en.wikipedia.org/wiki/Electric_chargehttp://en.wikipedia.org/wiki/Capacitor#cite_note-Ulaby_p157-8http://en.wikipedia.org/wiki/SIhttp://en.wikipedia.org/wiki/Faradhttp://en.wikipedia.org/wiki/Coulombhttp://en.wikipedia.org/wiki/Volt
  • 7/30/2019 Train Report

    32/58

    Applications of capacitors

    Capacitors have many uses in electronic and electrical systems. They are so commonthat it is a rare electrical product that does not include at least one for some purpose.

    Light-emitting diode

    Light-emitting diode

    Red, green and blue LEDs of the 5mm type

    Type Passive, optoelectronic

    Working principle Electroluminescence

    Invented Nick Holonyak Jr. (1962)

    Electronic symbol

    Pin configuration Anode and Cathode

    A light-emitting diode (LED) is a semiconductorlight source. LEDs are used as indicatorlamps in many devices, and are increasingly used for lighting. Introduced as a practical

    http://en.wikipedia.org/wiki/Applications_of_capacitorshttp://en.wikipedia.org/wiki/Passive_componenthttp://en.wikipedia.org/wiki/Optoelectronichttp://en.wikipedia.org/wiki/Electroluminescencehttp://en.wikipedia.org/wiki/Nick_Holonyak_Jr.http://en.wikipedia.org/wiki/Electronic_symbolhttp://en.wikipedia.org/wiki/Anodehttp://en.wikipedia.org/wiki/Cathodehttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Lightinghttp://en.wikipedia.org/wiki/File:LED_symbol.svghttp://en.wikipedia.org/wiki/File:RBG-LED.jpghttp://en.wikipedia.org/wiki/Applications_of_capacitorshttp://en.wikipedia.org/wiki/Passive_componenthttp://en.wikipedia.org/wiki/Optoelectronichttp://en.wikipedia.org/wiki/Electroluminescencehttp://en.wikipedia.org/wiki/Nick_Holonyak_Jr.http://en.wikipedia.org/wiki/Electronic_symbolhttp://en.wikipedia.org/wiki/Anodehttp://en.wikipedia.org/wiki/Cathodehttp://en.wikipedia.org/wiki/Semiconductorhttp://en.wikipedia.org/wiki/Lighting
  • 7/30/2019 Train Report

    33/58

    electronic component in 1962, early LEDs emitted low-intensity red light, but modernversions are available across the visible, ultraviolet and infrared wavelengths, with veryhigh brightness.

    Advantages

    Efficiency: LEDs emit more light per watt than incandescent bulbs. Theirefficiency is not affected by shape and size, unlike Fluorescent light bulbs ortubes.

    Color: LEDs can emit light of an intended color without using any color filters astraditional lighting methods need. This is more efficient and can lower initialcosts.

    Size: LEDs can be very small (smaller than 2 mm) and are easily populated ontoprinted circuit boards.

    On/Off time: LEDs light up very quickly. A typical red indicator LED will achievefull brightness in under a microsecond. LEDs used in communications devices

    can have even faster response times. Lifetime: LEDs can have a relatively long useful life. One report estimates 35,000

    to 50,000 hours of useful life, though time to complete failure may belonger. Fluorescent tubes typically are rated at about 10,000 to 15,000 hours,depending partly on the conditions of use, and incandescent light bulbs at 1,0002,000 hours.

    . Low toxicity: LEDs do not contain mercury, unlikefluorescent lamps

    Disadvantages

    Some Fluorescent lamps can be more efficient. High initial price: LEDs are currently more expensive, price per lumen, on aninitial capital cost basis, than most conventional lighting technologies. Theadditional expense partially stems from the relatively low lumen output and thedrive circuitry and power supplies needed.

    Voltage sensitivity: LEDs must be supplied with the voltage above the thresholdand a current below the rating. This can involve series resistors or current-regulated power supplies.

    . Droop: The efficiency of LEDs tends to decrease as one increases current

    Crystal oscillator

    A crystal oscillatoris an electronic oscillatorcircuit that uses themechanical resonance of a vibrating crystalofpiezoelectric material to create anelectrical signal with a very precise frequency. This frequency is commonly used to

    http://en.wikipedia.org/wiki/Visible_spectrumhttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Microsecondhttp://en.wikipedia.org/wiki/Mercury_(element)http://en.wikipedia.org/wiki/Mercury_(element)http://en.wikipedia.org/wiki/Fluorescent_lamphttp://en.wikipedia.org/wiki/Fluorescent_lamphttp://en.wikipedia.org/wiki/Fluorescent_lampshttp://en.wikipedia.org/wiki/Efficient_energy_usehttp://en.wikipedia.org/wiki/Electrical_currenthttp://en.wikipedia.org/wiki/Electronic_oscillatorhttp://en.wikipedia.org/wiki/Resonancehttp://en.wikipedia.org/wiki/Crystalhttp://en.wikipedia.org/wiki/Crystalhttp://en.wikipedia.org/wiki/Piezoelectricity#Materialshttp://en.wikipedia.org/wiki/Frequencyhttp://en.wikipedia.org/wiki/Visible_spectrumhttp://en.wikipedia.org/wiki/Ultraviolethttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Microsecondhttp://en.wikipedia.org/wiki/Mercury_(element)http://en.wikipedia.org/wiki/Fluorescent_lamphttp://en.wikipedia.org/wiki/Fluorescent_lampshttp://en.wikipedia.org/wiki/Efficient_energy_usehttp://en.wikipedia.org/wiki/Electrical_currenthttp://en.wikipedia.org/wiki/Electronic_oscillatorhttp://en.wikipedia.org/wiki/Resonancehttp://en.wikipedia.org/wiki/Crystalhttp://en.wikipedia.org/wiki/Piezoelectricity#Materialshttp://en.wikipedia.org/wiki/Frequency
  • 7/30/2019 Train Report

    34/58

    keep track of time (as in quartz wristwatches), to provide a stable clock signal fordigital integrated circuits, and to stabilize frequencies forradiotransmitters and receivers. The most common type of piezoelectric resonator used isthe quartz crystal, so oscillator circuits designed around them became known as "crystaloscillators."]

    Operation

    A crystal is a solidin which the constituentatoms, molecules, orions are packed in aregularly ordered, repeating pattern extending in all three spatial dimensions.

    Almost any object made of an elastic material could be used like a crystal, withappropriate transducers, since all objects have natural resonant frequenciesofvibration. For example, steel is very elastic and has a high speed of sound. It wasoften used in mechanical filters before quartz. The resonant frequency depends on size,shape,elasticity, and the speed of soundin the material. High-frequency crystals aretypically cut in the shape of a simple, rectangular plate. Low-frequency crystals, such asthose used in digital watches, are typically cut in the shape of a tuning fork. For

    http://en.wikipedia.org/wiki/Quartz_clockhttp://en.wikipedia.org/wiki/Clock_signalhttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Radio_transmitterhttp://en.wikipedia.org/wiki/Radio_transmitterhttp://en.wikipedia.org/wiki/Radio_receiverhttp://en.wikipedia.org/wiki/Radio_receiverhttp://en.wikipedia.org/wiki/Quartz_crystalhttp://en.wikipedia.org/wiki/Crystalhttp://en.wikipedia.org/wiki/Solidhttp://en.wikipedia.org/wiki/Solidhttp://en.wikipedia.org/wiki/Atomhttp://en.wikipedia.org/wiki/Atomhttp://en.wikipedia.org/wiki/Moleculehttp://en.wikipedia.org/wiki/Ionhttp://en.wikipedia.org/wiki/Elasticity_(physics)http://en.wikipedia.org/wiki/Transducerhttp://en.wikipedia.org/wiki/Resonancehttp://en.wikipedia.org/wiki/Vibrationhttp://en.wikipedia.org/wiki/Steelhttp://en.wikipedia.org/wiki/Mechanical_filterhttp://en.wikipedia.org/wiki/Elasticity_(physics)http://en.wikipedia.org/wiki/Speed_of_soundhttp://en.wikipedia.org/wiki/Speed_of_soundhttp://en.wikipedia.org/wiki/Tuning_forkhttp://en.wikipedia.org/wiki/Quartz_clockhttp://en.wikipedia.org/wiki/Clock_signalhttp://en.wikipedia.org/wiki/Integrated_circuitshttp://en.wikipedia.org/wiki/Radio_transmitterhttp://en.wikipedia.org/wiki/Radio_transmitterhttp://en.wikipedia.org/wiki/Radio_receiverhttp://en.wikipedia.org/wiki/Quartz_crystalhttp://en.wikipedia.org/wiki/Crystalhttp://en.wikipedia.org/wiki/Solidhttp://en.wikipedia.org/wiki/Atomhttp://en.wikipedia.org/wiki/Moleculehttp://en.wikipedia.org/wiki/Ionhttp://en.wikipedia.org/wiki/Elasticity_(physics)http://en.wikipedia.org/wiki/Transducerhttp://en.wikipedia.org/wiki/Resonancehttp://en.wikipedia.org/wiki/Vibrationhttp://en.wikipedia.org/wiki/Steelhttp://en.wikipedia.org/wiki/Mechanical_filterhttp://en.wikipedia.org/wiki/Elasticity_(physics)http://en.wikipedia.org/wiki/Speed_of_soundhttp://en.wikipedia.org/wiki/Tuning_fork
  • 7/30/2019 Train Report

    35/58

    applications not needing very precise timing, a low-cost ceramic resonatoris often usedin place of a quartz crystal.When a crystal ofquartz is properly cut and mounted, it can be made to distort inan electric field by applying a voltageto anelectrode near or on the crystal. Thisproperty is known as piezoelectricity. When the field is removed, the quartz will

    generate an electric field as it returns to its previous shape, and this can generate avoltage. The result is that a quartz crystal behaves like a circuit composed ofan inductor, capacitorand resistor, with a precise resonant frequency. (See RLCcircuit.)Quartz has the further advantage that its elastic constants and its size change in such away that the frequency dependence on temperature can be very low. The specificcharacteristics will depend on the mode of vibration and the angle at which the quartz iscut (relative to its crystallographic axes). [7]Therefore, the resonant frequency of theplate, which depends on its size, will not change much, either. This means that a quartzclock, filter or oscillator will remain accurate. For critical applications the quartz oscillatoris mounted in a temperature-controlled container, called acrystal oven, and can also be

    mounted on shock absorbers to prevent perturbation by external mechanical vibrations.

    Commonly used crystal frequencies

    Crystal oscillator circuits are often designed around relatively few standard frequencies,such as 3.579545 MHz, 4.433619 MHz, 10 MHz, 14.318182 MHz, 17.734475 MHz,20 MHz, 33.33 MHz, and 40 MHz. The popularity of the 3.579545 MHz crystals is due tolow cost since they are used forNTSC colortelevision receivers. Usingfrequencydividers, frequency multipliers and phase locked loopcircuits, it is practical to derive awide range of frequencies from one reference frequency. 14.318182 MHz (four times3.579545 MHz) is used in computer video displays to generate a bitmapped videodisplay for NTSC color monitors, such as the CGA used with the original IBM PC. (TheIBM PC used 14.318182 MHz, divided by three, as its 4.77 MHz clock source, usingone crystal for two purposes.) The 4.433619 MHz and 17.734475 MHz values are usedin PAL color television equipment and devices intended to produce PAL signals.Crystals can be manufactured for oscillation over a wide range of frequencies, from afew kilohertz up to several hundred megahertz. Many applications call for a crystaloscillator frequency conveniently related to some other desired frequency, so hundreds

    http://en.wikipedia.org/wiki/Ceramic_resonatorhttp://en.wikipedia.org/wiki/Quartzhttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electrodehttp://en.wikipedia.org/wiki/Electrodehttp://en.wikipedia.org/wiki/Piezoelectricityhttp://en.wikipedia.org/wiki/Inductorhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Resistorhttp://en.wikipedia.org/wiki/RLC_circuithttp://en.wikipedia.org/wiki/RLC_circuithttp://en.wikipedia.org/wiki/Crystal_oscillator#cite_note-Virgil1982-6http://en.wikipedia.org/wiki/Crystal_oscillator#cite_note-Virgil1982-6http://en.wikipedia.org/wiki/Crystal_ovenhttp://en.wikipedia.org/wiki/Crystal_ovenhttp://en.wikipedia.org/wiki/NTSChttp://en.wikipedia.org/wiki/Televisionhttp://en.wikipedia.org/wiki/Frequency_dividerhttp://en.wikipedia.org/wiki/Frequency_dividerhttp://en.wikipedia.org/wiki/Frequency_dividerhttp://en.wikipedia.org/wiki/Frequency_multiplierhttp://en.wikipedia.org/wiki/Phase_locked_loophttp://en.wikipedia.org/wiki/Bitmaphttp://en.wikipedia.org/wiki/Bitmaphttp://en.wikipedia.org/wiki/Color_Graphics_Adapterhttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/PALhttp://en.wikipedia.org/wiki/Ceramic_resonatorhttp://en.wikipedia.org/wiki/Quartzhttp://en.wikipedia.org/wiki/Electric_fieldhttp://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Electrodehttp://en.wikipedia.org/wiki/Piezoelectricityhttp://en.wikipedia.org/wiki/Inductorhttp://en.wikipedia.org/wiki/Capacitorhttp://en.wikipedia.org/wiki/Resistorhttp://en.wikipedia.org/wiki/RLC_circuithttp://en.wikipedia.org/wiki/RLC_circuithttp://en.wikipedia.org/wiki/Crystal_oscillator#cite_note-Virgil1982-6http://en.wikipedia.org/wiki/Crystal_ovenhttp://en.wikipedia.org/wiki/NTSChttp://en.wikipedia.org/wiki/Televisionhttp://en.wikipedia.org/wiki/Frequency_dividerhttp://en.wikipedia.org/wiki/Frequency_dividerhttp://en.wikipedia.org/wiki/Frequency_multiplierhttp://en.wikipedia.org/wiki/Phase_locked_loophttp://en.wikipedia.org/wiki/Bitmaphttp://en.wikipedia.org/wiki/Color_Graphics_Adapterhttp://en.wikipedia.org/wiki/IBM_PChttp://en.wikipedia.org/wiki/PAL
  • 7/30/2019 Train Report

    36/58

    of standard crystal frequencies are made in large quantities and stocked by electronicsdistributors.

    Temperature effects

    A crystal's frequency characteristic depends on the shape or 'cut' of the crystal. A tuningfork crystal is usually cut such that its frequency over temperature is a parabolic curvecentered around 25 C. This means that a tuning fork crystal oscillator will resonateclose to its target frequency at room temperature, but will slow down when thetemperature either increases or decreases from room temperature. A common paraboliccoefficient for a 32 kHz tuning fork crystal is 0.04 ppm/C.

    In a real application, this means that a clock built using a regular 32 kHz tuning forkcrystal will keep good time at room temperature, lose 2 minutes per year at 10 degreesCelsius above (or below) room temperature and lose 8 minutes per year at 20 degreesCelsius above (or below) room temperature due to the quartz crystal.

    Voltage regulator

    A voltage regulatoris an electricalregulatordesigned to automatically maintain aconstant voltage level. A voltage regulator may be a simple "feed-forward" design ormay include negative feedbackcontrol loops. It may use anelectromechanical mechanism, or electronic components. Depending on the design, itmay be used to regulate one or moreAC orDC voltages.Electronic voltage regulators are found in devices such as computerpowersupplies where they stabilize the DC voltages used by the processor and otherelements. In automobile alternators and centralpower station generator plants, voltageregulators control the output of the plant. In an electric power distribution system,voltage regulators may be installed at a substation or along distribution lines so that allcustomers receive steady voltage independent of how much power is drawn from theline.

    Measures of regulator quality

    The output voltage can only be held roughlyconstant; the regulation is specified by twomeasurements:

    http://en.wikipedia.org/wiki/Electricityhttp://en.wikipedia.org/wiki/Regulator_(automatic_control)http://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Mechanism_(technology)http://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Alternatorhttp://en.wikipedia.org/wiki/Power_stationhttp://en.wikipedia.org/wiki/Power_stationhttp://en.wikipedia.org/wiki/Electric_power_distributionhttp://en.wikipedia.org/wiki/Electricityhttp://en.wikipedia.org/wiki/Regulator_(automatic_control)http://en.wikipedia.org/wiki/Voltagehttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Mechanism_(technology)http://en.wikipedia.org/wiki/Alternating_currenthttp://en.wikipedia.org/wiki/Direct_currenthttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Power_supplyhttp://en.wikipedia.org/wiki/Alternatorhttp://en.wikipedia.org/wiki/Power_stationhttp://en.wikipedia.org/wiki/Electric_power_distribution
  • 7/30/2019 Train Report

    37/58

    load regulation is the change in output voltage for a given change in loadcurrent (for example: "typically 15mV, maximum 100mV for load currentsbetween 5mA and 1.4A, at some specified temperature and input voltage").

    line regulation orinput regulation is the degree to which output voltage

    changes with input (supply) voltage changes - as a ratio of output to input change(for example "typically 13mV/V"), or the output voltage change over the entirespecified input voltage range (for example "plus or minus 2% for input voltagesbetween 90V and 260V, 50-60Hz").

    Other important parameters are: Temperature coefficient of the output voltage is the change in output voltage

    with temperature (perhaps averaged over a given temperature range), while...

    Initial accuracy of a voltage regulator (or simply "the voltage accuracy") reflectsthe error in output voltage for a fixed regulator without taking into accounttemperature or aging effects on output accuracy.

    Dropout voltage is the minimum difference between input voltage and outputvoltage for which the regulator can still supply the specified current. ALow Drop-Out (LDO) regulator is designed to work well even with an input supply onlya Volt or so above the output voltage.

    Absolute maximum ratings are defined for regulator components, specifyingthe continuous and peak output currents that may be used (sometimes internally

    limited), the maximum input voltage, maximum power dissipation at a giventemperature, etc.

    Output noise (thermal white noise) and output dynamic impedance may bespecified as graphs versus frequency, while output ripple noise (mains "hum" orswitch-mode "hash" noise) may be given as peak-to-peak orRMS voltages, or interms of their spectra.

    Quiescent current in a regulator circuit is the current drawn internally, notavailable to the load, normally measured as the input current while no load isconnected (and hence a source of inefficiency; some linear regulators are,surprisingly, more efficient at very low current loads than switch-mode designsbecause of this).

    http://en.wikipedia.org/wiki/Low-dropout_regulatorhttp://en.wikipedia.org/wiki/Low-dropout_regulatorhttp://en.wikipedia.org/wiki/Low-dropout_regulatorhttp://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/White_noisehttp://en.wikipedia.org/wiki/Root_mean_squarehttp://en.wikipedia.org/wiki/Low-dropout_regulatorhttp://en.wikipedia.org/wiki/Low-dropout_regulatorhttp://en.wikipedia.org/wiki/Volthttp://en.wikipedia.org/wiki/White_noisehttp://en.wikipedia.org/wiki/Root_mean_square
  • 7/30/2019 Train Report

    38/58

    Electronic voltage regulatorsA simple voltage regulator can be made from a resistor in series with a diode (or seriesof diodes). Due to the logarithmic shape of diode V-I curves, the voltage across thediode changes only slightly due to changes in current drawn. When precise voltagecontrol is not important, this design may work fine.Feedback voltage regulators operate by comparing the actual output voltage to somefixed reference voltage. Any difference is amplified and used to control the regulationelement in such a way as to reduce the voltage error. This forms a negativefeedbackcontrol loop; increasing the open-loop gain tends to increase regulationaccuracy but reduce stability (avoidance of oscillation, or ringing during step changes).There will also be a trade-off between stability and the speed of the response tochanges. If the output voltage is too low (perhaps due to input voltage reducing or loadcurrent increasing), the regulation element is commanded, up to a point, to produce ahigher output voltageby dropping less of the input voltage (for linear series regulatorsand buckswitching regulators), or to draw input current for longer periods (boost-type switching regulators); if the output voltage is too high, the regulation element willnormally be commanded to produce a lower voltage. However, many regulators haveover-current protection, so that they will entirely stop sourcing current (or limit thecurrent in some way) if the output current is too high, and some regulators may alsoshut down if the input voltage is outside a given range (see also: crowbar circuits).

    http://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Open-loop_gainhttp://en.wikipedia.org/wiki/Buck_converterhttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Crowbar_(circuit)http://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Negative_feedbackhttp://en.wikipedia.org/wiki/Control_theoryhttp://en.wikipedia.org/wiki/Open-loop_gainhttp://en.wikipedia.org/wiki/Buck_converterhttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Switching_regulatorhttp://en.wikipedia.org/wiki/Crowbar_(circuit)
  • 7/30/2019 Train Report

    39/58

    Microcontroller 8051

    Intel P8051 microcontroller.

    The Intel MCS-51 is a Harvard architecture, single chip microcontroller(C) serieswhich was developed by Intelin 1980 for use in embedded systems.[1][2]Intel's originalversions were popular in the 1980s and early 1990s, but has today largely beensuperseded by a vast range of faster and/or functionally enhanced 8051-compatibledevices manufactured by more than 20 independent manufacturersincludingAtmel, Infineon Technologies (formerly Siemens AG), Maxim IntegratedProducts (via its DallasSemiconductorsubsidiary), NXP (formerly Philips Semiconductor), Nuvoton

    (formerly Winbond), ST Microelectronics,Silicon Laboratories (formerly Cygnal), TexasInstruments, Ramtron International, Silicon Storage Technology, and CypressSemiconductor.

    Intel's original MCS-51 family was developed using NMOS technology, but laterversions, identified by a letter C in their name (e.g., 80C51) used CMOStechnology andwere less power-hungry than their NMOS predecessors. This made them more suitablefor battery-powered devices.

    http://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Intelhttp://en.wikipedia.org/wiki/Intelhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Intel_8051#cite_note-0http://en.wikipedia.org/wiki/Intel_8051#cite_note-1http://en.wikipedia.org/wiki/Atmelhttp://en.wikipedia.org/wiki/Infineon_Technologieshttp://en.wikipedia.org/wiki/Siemens_AGhttp://en.wikipedia.org/wiki/Maxim_Integrated_Productshttp://en.wikipedia.org/wiki/Maxim_Integrated_Productshttp://en.wikipedia.org/wiki/Dallas_Semiconductorhttp://en.wikipedia.org/wiki/Dallas_Semiconductorhttp://en.wikipedia.org/wiki/NXP_Semiconductorshttp://en.wikipedia.org/wiki/Philipshttp://en.wikipedia.org/wiki/Winbondhttp://en.wikipedia.org/wiki/ST_Microelectronicshttp://en.wikipedia.org/wiki/ST_Microelectronicshttp://en.wikipedia.org/wiki/Silicon_Laboratorieshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Ramtron_Internationalhttp://en.wikipedia.org/wiki/Silicon_Storage_Technologyhttp://en.wikipedia.org/wiki/Cypress_Semiconductorhttp://en.wikipedia.org/wiki/Cypress_Semiconductorhttp://en.wikipedia.org/wiki/NMOS_logichttp://en.wikipedia.org/wiki/CMOShttp://en.wikipedia.org/wiki/File:KL_Intel_P8051.jpghttp://en.wikipedia.org/wiki/Harvard_architecturehttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Intelhttp://en.wikipedia.org/wiki/Embedded_systemhttp://en.wikipedia.org/wiki/Intel_8051#cite_note-0http://en.wikipedia.org/wiki/Intel_8051#cite_note-1http://en.wikipedia.org/wiki/Atmelhttp://en.wikipedia.org/wiki/Infineon_Technologieshttp://en.wikipedia.org/wiki/Siemens_AGhttp://en.wikipedia.org/wiki/Maxim_Integrated_Productshttp://en.wikipedia.org/wiki/Maxim_Integrated_Productshttp://en.wikipedia.org/wiki/Dallas_Semiconductorhttp://en.wikipedia.org/wiki/Dallas_Semiconductorhttp://en.wikipedia.org/wiki/NXP_Semiconductorshttp://en.wikipedia.org/wiki/Philipshttp://en.wikipedia.org/wiki/Winbondhttp://en.wikipedia.org/wiki/ST_Microelectronicshttp://en.wikipedia.org/wiki/Silicon_Laboratorieshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Texas_Instrumentshttp://en.wikipedia.org/wiki/Ramtron_Internationalhttp://en.wikipedia.org/wiki/Silicon_Storage_Technologyhttp://en.wikipedia.org/wiki/Cypress_Semiconductorhttp://en.wikipedia.org/wiki/Cypress_Semiconductorhttp://en.wikipedia.org/wiki/NMOS_logichttp://en.wikipedia.org/wiki/CMOS
  • 7/30/2019 Train Report

    40/58

    `

    Important features and applications

    .The 8051 architecture provides many functions

    (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.) in a single package

    8-bitALU, Accumulator and 8-bit Registers; hence it is an 8-bitmicrocontroller

    8-bit data bus It can access 8 bits of data in one operation

    16-bit address bus It can access 216

    memory locations 64 KB (65536locations) each of RAM and ROM

    On-chip RAM 128 bytes (data memory)

    On-chip ROM 4 kByte (program memory)

    Fourbyte bi-directional input/output port

    http://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Integrated_circuit_packaginghttp://en.wikipedia.org/wiki/Arithmetic_logic_unithttp://en.wikipedia.org/wiki/8-bithttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Data_bushttp://en.wikipedia.org/wiki/Address_bushttp://en.wikipedia.org/wiki/Kilobytehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Central_processing_unithttp://en.wikipedia.org/wiki/Random_access_memoryhttp://en.wikipedia.org/wiki/Read-only_memoryhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Integrated_circuit_packaginghttp://en.wikipedia.org/wiki/Arithmetic_logic_unithttp://en.wikipedia.org/wiki/8-bithttp://en.wikipedia.org/wiki/Microcontrollerhttp://en.wikipedia.org/wiki/Data_bushttp://en.wikipedia.org/wiki/Address_bushttp://en.wikipedia.org/wiki/Kilobytehttp://en.wikipedia.org/wiki/Byteshttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Input/output
  • 7/30/2019 Train Report

    41/58

    UART (serial port)

    Two 16-bit Counter/timers

    Two-level interrupt priority

    Power saving mode (on some derivatives)ALE/PROG: Address Latch Enable output pulse for latching the low byte of the addressduring accesses to external memory. ALE is emitted at a constant rate of 1/6 of theoscillator frequency, for external timing or clocking purposes, even when there are noaccesses to external memory.

    microcontroller Pin Diagram and Pin Functions

    EA must be externally wired low. In the EPROM devices, this pin also receives theprogramming supply voltage (VPP) during EPROM programming.

    http://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Power_managementhttp://en.wikipedia.org/wiki/Serial_porthttp://en.wikipedia.org/wiki/Timerhttp://en.wikipedia.org/wiki/Interrupthttp://en.wikipedia.org/wiki/Power_management
  • 7/30/2019 Train Report

    42/58

    XTAL1: Input to the inverting oscillator amplifier.XTAL2: Output from the inverting oscillator amplifier.

    ALE/PROG: Address Latch Enable output pulse for latching the low byte of the addressduring accesses to external memory. ALE is emitted at a constant rate of 1/6 of the

    oscillator frequency, for external timing or clocking purposes, even when there are noaccesses to external memory. (However, one ALE pulse is skipped during each accessto external Data Memory.) This pin is also the program pulse input (PROG) duringEPROM programming.

    PSEN: Program Store Enable is the read strobe to external Program Memory. When thedevice is executing out of external Program Memory, PSEN is activated twice eachmachine cycle (except that two PSEN activations are skipped during accesses toexternal Data Memory). PSEN is not activated when the device is executing out ofinternal Program Memory.

    EA/VPP: When EA is held high the CPU executes out of internal Program Memory(unless the Program Counter exceeds 0FFFH in the 80C51). Holding EA low forces theCPU to execute out of external memory regardless of the Program Counter value. In the80C31, EA must be externally wired low. In the EPROM devices, this pin also receivesthe programming supply voltage (VPP) during EPROM programming

    XTAL1: Input to the inverting oscillator amplifier.

    XTAL2:Output from the inverting oscillator amplifier.

    Port 0: Port 0 is an 8-bit open drain bidirectional port. As an open drain output port, itcan sink eight LS TTL loads. Port 0 pins that have 1s written to them float, and in thatstate will function as high impedance inputs.

    Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pullups. Port 1 pins that have1s written to them are pulled high by the internal pullups, and in that state can be usedas inputs. As inputs, port 1 pins that are externally being pulled low will source currentbecause of the internal pullups.

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

  • 7/30/2019 Train Report

    43/58

    Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pullups. It also serves thefunctions of various special features of the 80C51 Family as follows:Port Pin AlternateFunction

    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)

    Programming

    There are various high-level programming languagecompilers for the 8051.Several C compilers are available for the 8051, most of which feature extensions thatallow the programmer to specify where each variable should be stored in its six types ofmemory, and provide access to 8051 specific hardware features such as the multipleregister banks and bit manipulation instructions. There are many commercial Ccompilers. SDCC is a popular open source C compiler.Other high level languages such as Forth,BASIC,Pascal/Object

    Pascal, PL/M and Modula-2 are available for the 8051, but they are less widely usedthan C and assembly.

    Educational Use

    In many engineering schools the 8051 microcontroller is used in introductorymicrocontroller courses

    http://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/8051_compilerhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_programming_languagehttp://en.wikipedia.org/wiki/Pascal_programming_languagehttp://en.wikipedia.org/wiki/Pascal_programming_languagehttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/PL/Mhttp://en.wikipedia.org/wiki/Modula-2http://en.wikipedia.org/wiki/Assembly_languagehttp://en.wikipedia.org/wiki/High-level_programming_languagehttp://en.wikipedia.org/wiki/8051_compilerhttp://en.wikipedia.org/wiki/C_(programming_language)http://en.wikipedia.org/wiki/Small_Device_C_Compilerhttp://en.wikipedia.org/wiki/Forth_(programming_language)http://en.wikipedia.org/wiki/BASIC_programming_languagehttp://en.wikipedia.org/wiki/Pascal_programming_languagehttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/Object_Pascalhttp://en.wikipedia.org/wiki/PL/Mhttp://en.wikipedia.org/wiki/Modula-2http://en.wikipedia.org/wiki/Assembly_language
  • 7/30/2019 Train Report

    44/58

    ULN2003

    HIGH VOLTAGE AND HIGH CURRENT DARLINGTON TRANSISTOR ARRAYDESCRIPTIONThe ULN2003 is a monolithic high voltage and high current Darlington transistor arrays.

    It consists of seven NPN darlington pairs that features high-voltage outputs withcommon-cathodeclamp diode for switching inductive loads. The collector-current rating of a singledarlington pair is 500mA. The darlington pairs may be parrlleled for higher currentcapability. Applications includerelay drivers,hammer drivers, lampdrivers,display drivers(LED gas discharge),linedrivers, and logic buffers.The ULN2003 has a 2.7kW series base resistor for each darlington pair for operationdirectly with TTL or 5V CMOS devices.

    FEATURES

    * 500mA rated collector current (Single output)* High-voltage outputs: 50V* Inputs compatible with various types of logic.* Relay driver application_

  • 7/30/2019 Train Report

    45/58

  • 7/30/2019 Train Report

    46/58

    Stepper Motors

    Stepper motors consist of a permanent magnet rotating shaft, called the rotor, andelectromagnets on the stationary portion that surrounds the motor, called the stator.Figure 1 illustrates one complete rotation of a stepper motor. At position 1, we can seethat the rotor is beginning at the upper electromagnet, which is currently active (hasvoltage applied to it). To move the rotor clockwise (CW), the upper electromagnet isdeactivated and the right electromagnet is activated, causing the rotor to move 90degrees CW, aligning itself with the active magnet. This process is repeated in thesame manner at the south and west electromagnets until we once again reach thestarting position.

    http://www.imagesco.com/articles/picstepper/02.html#fig1http://www.imagesco.com/articles/picstepper/02.html#fig1
  • 7/30/2019 Train Report

    47/58

    In the above example, we used a motor with a resolution of 90 degrees ordemonstration purposes. In reality, this would not be a very practical motor for mostapplications. The average stepper motor's resolution -- the amount of degrees rotatedper pulse -- is much higher than this. For example, a motor with a resolution of 5degrees would move its rotor 5 degrees per step, thereby requiring 72 pulses (steps) to

    complete a full 360 degree rotation.

    You may double the resolution of some motors by a process known as "half-stepping".Instead of switching the next electromagnet in the rotation on one at a time, with halfstepping you turn on both electromagnets, causing an equal attraction between, therebydoubling the resolution. As you can see in Figure 2, in the first position only the upperelectromagnet is active, and the rotor is drawn completely to it. In position 2, both thetop and right electromagnets are active, causing the rotor to position itself between thetwo active poles. Finally, in position 3, the top magnet is deactivated and the rotor isdrawn all the way right. This process can then be repeated for the entire rotation.

    There are several types of stepper motors. 4-wire stepper motors contain only twoelectromagnets; however the operation is more complicated than those with three orfour magnets, because the driving circuit must be able to reverse the current after eachstep. For our purposes, we will be using a 6-wire motor.

    Unlike our example motors which rotated 90 degrees per step, real-world motorsemploy a series of mini-poles on the stator and rotor to increase resolution. Although

    this may seem to add more complexity to the process of driving the motors, theoperation is identical to the simple 90 degree motor we used in our example. Anexample of a multiple motor can be seen in Figure 3. In position 1, the north pole of therotor's permanent magnet is aligned with the south pole of the stator's electromagnet.Note that multiple positions are aligned at once. In position 2, the upper electromagnetis deactivated and the next one to its immediate left is activated, causing the rotor torotate a precise amount of degrees. In this example, after eight steps the sequencerepeats.

    http://www.imagesco.com/articles/picstepper/02.html#fig2http://www.imagesco.com/articles/picstepper/02.html#fig3http://www.imagesco.com/articles/picstepper/02.html#fig3http://www.imagesco.com/articles/picstepper/02.html#fig2http://www.imagesco.com/articles/picstepper/02.html#fig3
  • 7/30/2019 Train Report

    48/58

    The specific stepper motor we are using for our experiments (ST-02: 5VDC, 5 degreesper step) has 6 wires coming out of the casing. If we follow Figure 5, the electricalequivalent of the stepper motor, we can see that 3 wires go to each half of the coils, andthat the coil windings are connected in pairs. This is true for all four-phase stepper

    motors.

    http://www.imagesco.com/articles/picstepper/02.html#fig5http://www.imagesco.com/articles/picstepper/02.html#fig5
  • 7/30/2019 Train Report

    49/58

    However, if you do not have an equivalent diagram for the motor you want to use, youcan make a resistance chart to decipher the mystery connections. There is a 13 ohmresistance between the center-tap wire and each end lead, and 26 ohms between the

    two end leads. Wires originating from separate coils are not connected, and thereforewould not read on the ohm meter.

  • 7/30/2019 Train Report

    50/58

    Magnetic Reed Switch

    The reed switch is an electrical switch operated by an applied magnetic field. It wasinvented at Bell Telephone Laboratories in 1936 by W. B. Ellwood. It consists of a pairofcontacts on ferrous metal reeds in a hermetically sealedglass envelope. The

    contacts may be normally open, closing when a magnetic field is present, or normallyclosed and opening when a magnetic field is applied. The switch may be actuated by acoil, making a reed relay,[1]or by bringing a magnet near to the switch. Once the magnetis pulled away from the switch, the reed switch will go back to its original position.

    An example of a reed switch's application is to detect the opening of a door, when usedas a proximity switch for a burglar alarm.

    The reed switch contains a pair (or more) of magnetizable, flexible, metal reeds whoseend portions are separated by a small gap when the switch is open. The reeds arehermetically sealed in opposite ends of a tubular glass envelope.

    Reed switch diagrams from Ellwood's patent, U.S. Patent 2,264,746, Electromagnetic

    switch

    http://en.wikipedia.org/wiki/Electrical_switchhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Inventhttp://en.wikipedia.org/wiki/Bell_Telephone_Laboratorieshttp://en.wikipedia.org/wiki/Electrical_connectorhttp://en.wikipedia.org/wiki/Hermetic_sealhttp://en.wikipedia.org/wiki/Glasshttp://en.wikipedia.org/wiki/Glasshttp://en.wikipedia.org/wiki/Electromagnetic_coilhttp://en.wikipedia.org/wiki/Reed_relayhttp://en.wikipedia.org/wiki/Reed_switch#cite_note-0http://en.wikipedia.org/wiki/Reed_switch#cite_note-0http://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Proximity_detectorhttp://en.wikipedia.org/wiki/Burglar_alarmhttp://www.google.com/patents?vid=2264746http://en.wikipedia.org/wiki/Electrical_switchhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Inventhttp://en.wikipedia.org/wiki/Bell_Telephone_Laboratorieshttp://en.wikipedia.org/wiki/Electrical_connectorhttp://en.wikipedia.org/wiki/Hermetic_sealhttp://en.wikipedia.org/wiki/Glasshttp://en.wikipedia.org/wiki/Electromagnetic_coilhttp://en.wikipedia.org/wiki/Reed_relayhttp://en.wikipedia.org/wiki/Reed_switch#cite_note-0http://en.wikipedia.org/wiki/Magnethttp://en.wikipedia.org/wiki/Proximity_detectorhttp://en.wikipedia.org/wiki/Burglar_alarmhttp://www.google.com/patents?vid=2264746
  • 7/30/2019 Train Report

    51/58

    A magnetic field (from an electromagnet or a permanent magnet) will cause the reeds tocome together, thus completing an electrical circuit. The stiffness of the reeds causesthem to separate, and open the circuit, when the magnetic field ceases. Anotherconfiguration contains a non-ferrous normally-closed contact that opens when theferrous normally-open contact closes. Good electrical contact is assured by plating a

    thin layer of non-ferrous precious metal over the flat contact portions of the reeds; low-resistivity silveris more suitable than corrosion-resistant gold in the sealed envelope.There are also versions of reed switches with mercury "wetted" contacts. Such switchesmust be mounted in a particular orientation otherwise drops of mercury may bridge thecontacts even when not activated.

    Since the contacts of the reed switch are sealed away from the atmosphere, they areprotected against atmospheric corrosion. The hermetic sealing of a reed switch makethem suitable for use in explosive atmospheres where tiny sparks from conventionalswitches would constitute a hazard.

    One important quality of the switch is its sensitivity, the amount ofmagnetic fieldnecessary to actuate it. Sensitivity is measured in units ofAmpere-turns, correspondingto the current in a coil multiplied by the number of turns. Typical pull-in sensitivities forcommercial devices are in the 10 to 60 AT range. The lower the AT, the more sensitivethe reed switch. Also, smaller reed switches, which have smaller parts, are moresensitive to magnetic fields, so the smaller the reed switch's glass envelope is, the moresensitive it is.

    In production, a metal reed is inserted in each end of a glass tube and the end of thetube heated so that it seals around a shank portion on the reed. Infrared-absorbingglass is used, so an infrared heat source can concentrate the heat in the small sealing

    zone of the glass tube. The thermal coefficient of expansion of the glass material andmetal parts must be similar to prevent breaking the glass-to-metal seal. The glass usedmust have a high electrical resistanceand must not contain volatile components suchas lead oxide and fluorides. The leads of the switch must be handled carefully toprevent breaking the glass envelope.

    How Reed Switches are used with a Permanent Magnet

    Using Reed Switches in a sensing environment, one generally uses a magnet foractuation. It is important to understand this interaction clearly for proper sensorfunctioning. Sensors may operate in a normally open mode, a normally closed mode ora latching mode. In the normally open mode, when a magnet is broughttoward the Reed Switch (or vice versa) the reed bladeswill close. When the magnet iswithdrawn the reed blades will open. With the normally closed sensor, bringing amagnet to the Reed Switch the reed blades will open, and withdrawing the magnet, thereed blades will re-close. In a latching mode the reed blades may be in either an openor closed state. When a magnet is brought close to the Reed Switch the contacts willchange their state. If they

    http://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Electromagnethttp://en.wikipedia.org/wiki/Permanent_magnethttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Silverhttp://en.wikipedia.org/wiki/Corrosionhttp://en.wikipedia.org/wiki/Goldhttp://en.wikipedia.org/wiki/Mercury_(element)http://en.wikipedia.org/wiki/Corrosionhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Ampere-turnhttp://en.wikipedia.org/wiki/Ampere-turnhttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Glass-to-metal_sealhttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Lead_oxidehttp://en.wikipedia.org/wiki/Fluoridehttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Electromagnethttp://en.wikipedia.org/wiki/Permanent_magnethttp://en.wikipedia.org/wiki/Electrical_circuithttp://en.wikipedia.org/wiki/Silverhttp://en.wikipedia.org/wiki/Corrosionhttp://en.wikipedia.org/wiki/Goldhttp://en.wikipedia.org/wiki/Mercury_(element)http://en.wikipedia.org/wiki/Corrosionhttp://en.wikipedia.org/wiki/Magnetic_fieldhttp://en.wikipedia.org/wiki/Ampere-turnhttp://en.wikipedia.org/wiki/Infraredhttp://en.wikipedia.org/wiki/Glass-to-metal_sealhttp://en.wikipedia.org/wiki/Electrical_resistancehttp://en.wikipedia.org/wiki/Lead_oxidehttp://en.wikipedia.org/wiki/Fluoride
  • 7/30/2019 Train Report

    52/58

    were initially open, the contacts will close. Withdrawing the magnet the contacts willremain closed. When the magnet is again brought close to the Reed Switch, with achanged magnetic polarity, the contacts will now open.Withdrawing the magnet the contacts will remain open. Again, reversing the magneticpolarity, and bringing the magnet again close to the Reed Switch the contacts will again

    close and remain closed when the magnet is withdrawn. In this manner, one has alatching sensor or a bi-stable state sensor. In the following diagrams, we will outline theguidelines

    one must be aware of when using a magnet. Please keep in mind the magnetic field isthree-dimensional. A permanent magnet is the most common source for operating theReed Switch. The methods used depend on the actual application. Some of thesemethods are the following: front to back motion (see Figure #19);

  • 7/30/2019 Train Report

    53/58

    the use of a magnetic shield to deflect the magnetic fluxflow (see Figure #22);

  • 7/30/2019 Train Report

    54/58

  • 7/30/2019 Train Report

    55/58

    The complete programming

    #include#include

    #define seg_data P1#define seg_select P3

    void DelayMS(unsigned char ms){

    unsigned long us = 500*ms;

    while (us--){_nop_();}

    }

    sbit switch1=P1^0;sbit switch2= P1^1;sbit switch3=P1^2;sbit switch4=P1^3;sbit signal11=P1^4; //green

    sbit signal12=P1^5;//orangesbit signal13=P1^6; //redsbit signal21=P1^7; //greensbit signal22=P3^0; //orangesbit signal23=P3^1; //redsbit signal31=P3^2; //green

    sbit signal32=P3^3; //orangesbit signal33=P3^4; //red

    sbit signal41=P3^5; //greensbit signal42=P3^6; //orangesbit signal43=P3^7; //red

    #define motor P2//unsigned char step[8]={0x11, 0x33, 0x22, 0x66, 0x44, 0xCC, 0x88, 0x99};

    unsigned char step[8]={0xEE, 0xDD, 0xBB, 0x77, 0xEE, 0xDD, 0xBB, 0x77};

    void motor_clock(){

    char i=0,j=0;

  • 7/30/2019 Train Report

    56/58

    for(i=0; i

  • 7/30/2019 Train Report

    57/58

    signal41=1;signal42=0;signal43=1;

    while(!switch1);

    }

    if(!switch2){

    DelayMS(10);signal11=1;signal12=0;signal13=1;

    signal41=0;signal42=1;

    signal43=1;

    signal21=1;signal22=1;signal23=0;

    while(!switch2);}

    if(!switch3){

    DelayMS(10);signal21=1;signal22=0;signal23=1;

    signal11=0;signal12=1;signal13=1;

    signal31=1;signal32=1;signal33=0;

    motor_clock();while(!switch3);

    }

    if(!switch4){

    DelayMS(10);signal31=1;signal32=0;signal33=1;

    signal21=0;

  • 7/30/2019 Train Report

    58/58

    signal22=1;signal23=1;

    signal41=1;signal42=1;signal43=0;motor_anti();

    while(!switch4);}

    }}

    *************************end of main******************************