Project Report Engineering

download Project Report Engineering

of 48

Transcript of Project Report Engineering

  • 7/30/2019 Project Report Engineering

    1/48

    Microcontroller Based Bidirectional Routing System

    Panchkula Engineering College

    MOULI (BARWALA) HARYANA

    Submitted To: - Submitted By:-

    Mrs. POOJA MITTAL DEEPAK KUMAR SINGH

    H.O.D 6510102

    Training & placement Deptt. (Branch ECE 4th + Sem)

    Guided By:-

    Department of Electronics & Communication Engineering

  • 7/30/2019 Project Report Engineering

    2/48

    INDEX

    1. Company Profile

    2. Introduction to the Project Bidirectional Person Counter

    a. Circuit Diagram

    b. Microcontroller Pin Diagram

    3. Components List

    4. Comparison of Microprocessor & Microcontroller

    6. Embedded System

    7. Power Supply

    8. Embedded C Programming

    9. Program of the Project

  • 7/30/2019 Project Report Engineering

    3/48

    Some of the points which we want to high light for your kind knowledge

    about our organization

    Only one

    This is the fact that there is no Industry in the Northern India available offering skilllearning real Projects for Electrical, ECE & Computer Science, Electronics andInstruments, Mechanical Engineering for Engineering Colleges and Polytechnicsstudents related to their field except DEEKSHA ENGINEERING SERVICES PVT.LTD.

    Some of the facts

    It is the premier, reliable, genuine, truthful, sincere and leading organization,

    incorporating Industrial manufacturing twenty years old units. Their main resourcesare experienced and qualified Engineers, Technocrats, Professionals, Academicians,and Scientists apart from updated labs and workshops.

    Mission Vision and Objectives

    1. To provide a platform for individuals, professionals, R&D Organizations,Engineering & Software companies and to utilize the Indian youth for their

    potential.2. To provide educational, research and Practical skill training in this right

    direction and to capture opportunity for creating a talent pool of professionals

    from various fields who can contribute for the growth and prosperity of variousdisciplines.

    3. To act as Resource Centre for retrieving and dissemination facility to the passout engineers by having regular interaction with various Industries, Researchinstitutes & Laboratories.

    4. To act as Project Development Centre by providing / promoting developmentof various projects & Training Kits and its usage related to latest tools and

    technologies.5. To offer constancy Services for Entrepreneurship & Self employment from

    concept to commissioning level including investment opportunities, projectselection, project report preparation, Market surveys and setting-up entire

    project along with Technology Transfer as per requirements.

  • 7/30/2019 Project Report Engineering

    4/48

    Software & Embedded Technology DevelopmentSeeing the need of modern society and time DEEKSHA engineering has taken a major initiative topromote Software development to be used in various fields such as instrumentation, embeddedtechnology, computer engineering and its usage in related to latest tools and technologies. In thisdirection it has setup a development center with latest tools and best manpower through in-houseand by outsourcing the projects, so as to make substantial contribution to the world of Information

    and Software(s).

    Trouble Shooting & Fault FindingDEEKSHA engineering have started various courses for the candidates who wants to go in the field ofResearch & development and maintenance with a view to provide trained and ready to work trained man-power to the Industries and Service-sector with a vision. Special lectures and work-shops are also arrangedthrough experts in various fields.

    Creativity, innovation and diversity of thought

    DEEKSHA engineering supports creativity and innovation. In an evolving industry with so many

    look-alikes, we have managed to set ourselves apart through creativity, innovation and diversity ofthought. We value thought-leaders, not hierarchy. We welcome new ideas and help our peopledeliver services with a difference. We roll up our sleeves and attack our problems with all thepassion, resources and innovation the situation

    Distance Programs

    It conducts lectures, seminars, workshops and conducting events to provide expert guidance andlatest technological trends, information, tips for fault findings through our expert faculty membersand inviting eminent guest member experts of different and diversified fields working in fields ofElectronic, Communication, Instrumentation, Electrical, Computers, Soft-wares, Banking experts,Ecology & environment, Career & guidance as Industrialists, Professors, Entrepreneurs, Managers,

    NGOs and Technocrats

    Career guidance & Job Placements

    As finding and retaining human talent becomes more and more mission critical to the industry,attraction, management and retention of talent has become an integral part of the businessboardroom strategy. In turn, this has led to outsourced HR services being no longer about justidentifying the right candidates and placing them. This evolution places new demands and posesnew challenges for organizations, which were hitherto providing outsourced HR services; so peopleof DEEKSHA engineering keeps an eagles eye and provide guidance & help the candidates inchoosing the career, while running career, vocational and training courses to create a pool of

    talented, hard working coming out engineers and help them to be placed in various

    Industries working in the field of Electronic, Communication, Instrumentation, Electrical, Computerand Soft-wares.

  • 7/30/2019 Project Report Engineering

    5/48

    CERTIFICATE

    This is to certify that the work presented in the training

    report entitled Bidirectional Routing System is a

    bonafide record of the work in progress at Panchkula

    Engineering College. The project work is an authentic

    record of our own work and is being carried out under the

    supervision and guidance of

    Er. Kumar Rajender Department(ECE)

  • 7/30/2019 Project Report Engineering

    6/48

    We gratefully acknowledge the efforts of

    Er. Kumar Rajender(ECE), faculty and lab staff of in

    completing our major project. Their guidance, constructive

    criticism and timely review on thesis and project have

    resulted in completion of project. We are extending a special

    thanks to

    Er. Nivedita__for imparting us with technical support.

    ACKNOWLEDGEMENT

  • 7/30/2019 Project Report Engineering

    7/48

    Introduction to the UP/Down Counter

    Microcontroller Based (AT89S51)

    In this project we are demonstrating an Up and down counter using AT89s51. We are using two

    switches to set the direction of count. We have interfaced two seven segment displays with the

    microcontroller to display the decimal digits. Once we switch on the project the microcontroller will

    display zeros on both the seven segment displays. Now if we press the up key the microcontroller

    will increment the count and display it on two seven segment displays and the microcontroller will

    keep on incrementing the display until we release the up key. If the counter reaches 99 then it will

    roll over from 99 to zero and then start incrementing from zero to 99 again. If we release the key

    then the counter will halt at that count. Now if we press the decrement key the microcontroller will

    start decrementing the count. Now it will go on decrementing until we release the down key. If we

    hold the down key and the counter comes down to zero then the counter will roll over to 99 and

    then start decrementing from 99. Here we have used two BCD to seven segment converters for

    interfacing both the seven segment displays with the microcontroller. The BCD to seven segment

    converters used here are CD4511. We send the BCD code, of the digit to be displayed on the seven

    segment display, on the CD4511 and this converter now converts this BCD code to the

    corresponding seven segment data that the seven segment displays could understand. The seven

    segment displays used here are of common cathode type, which means that cathodes of all the seven

    segments in the seven segment display are shorted to each other internally. And it is available to us

    with two pins externally. We have connected one resistance with one of these two pins of each

    seven segment display. This resistance is used to limit the current following through the seven

    segment display and also to control the intensity of the seven segment display.

    Microcontroller AT89S51 is serving as the brain of this project, which is a family member

    of 8051 Microcontroller family. This Microcontroller is manufactured by ATMEL Corporation.

  • 7/30/2019 Project Report Engineering

    8/48

    To make the Microcontroller work properly certain pins of Microcontroller are required to be

    connected in a particular manner. These pins are pin no. 9, pin no. 18, pin no. 19, pin no. 20, pin no.

    31 & pin no. 40 and are described below:

    Pin no. 9 of the microcontroller is Reset pin. This pin has to be kept high for certain period of the

    time initially after power ON and then it has to be connected to the Ground terminal, only then the

    Microcontroller will start functioning and executing the code from 0000 Hex memory location. The

    minimum period of time for which the reset pin has to be kept high is 4 sec. To assure that the

    Reset pin be kept high for 4 sec and then connected to the Low, a reset circuit is employed which

    comprises of a 10 F capacitor and a 8.2KOhms resistance. This RC circuit provides proper Reset

    time to the Microcontroller.

    Pin no. 18 and 19 of the microcontroller AT89S51 are crystal out. AT89S51 has an internal

    Oscillator circuit to generate clock pulse for its CPU, but an external crystal has to be connected to

    these pins

    Now this crystal determines the clock frequency of the CPU. The maximum value of the

    crystal that can be used with the microcontroller depends upon the microcontroller that we are going

    to use. Here the microcontroller we are using supports a maximum crystal frequency of 24 MHz,

    but any crystal lower then this frequency can be used with it. And here a 12 MHz crystal is

    connected to the pin no. 18 and 19 of the microcontroller, which provides clock frequency to themicrocontrollers internal circuitry. Capacitors of 33pF each are also connected to the pin 18 and

    pin 19 to remove the external noise.

    Pin no. 20 of the microcontroller is the ground pin and is connected to the ground.

    Pin no. 40 of the Microcontroller is the supply pin and is connected to +5V supply.

    Pin no. 31 is the external Access pin. This is an active low pin. This pin is activated whenever we

    have to access the program written in the external memory of the Microcontroller. Whenever we

    have to access the program written in the internal memory of the Microcontroller then we will

    deactivate this pin. So here EA is connected to +5V supply.

  • 7/30/2019 Project Report Engineering

    9/48

    Circuit Diagram

    + 5 V

    + 5 V

    + 5 V

    + 5 V

    + 5 V

    + 5 V+ 5 V

    R 1

    8 . 2 K

    U 1

    A T 8 9 S 5 1

    91 81 9

    2

    0

    2 9

    3 0

    3 1

    4

    0

    123456

    78

    2 12 22 32 42 52 62 72 8

    1 01 11 21 31 41 5

    1 61 7

    3 93 83 73 63 53 43 33 2

    R S TX T A L 2X T A L 1

    G

    N

    D

    P S E N

    A L E / P R O G

    E A / V P P

    V

    C

    C

    P 1 . 0P 1 . 1P 1 . 2P 1 . 3P 1 . 4P 1 . 5P 1 . 6P 1 . 7

    P 2 . 0 / A 8P 2 . 1 / A 9

    P 2 . 2 / A 1 0P 2 . 3 / A 1 1P 2 . 4 / A 1 2P 2 . 5 / A 1 3P 2 . 6 / A 1 4P 2 . 7 / A 1 5

    P 3 . 0 / R X DP 3 . 1 / T X D

    P 3 . 2 / I N T OP 3 . 3 / I N T 1

    P 3 . 4 / T OP 3 . 5 / T 1

    P 3 . 6 / W RP 3 . 7 / R D

    P 0 . 0 / A D 0P 0 . 1 / A D 1P 0 . 2 / A D 2P 0 . 3 / A D 3P 0 . 4 / A D 4P 0 . 5 / A D 5P 0 . 6 / A D 6P 0 . 7 / A D 7

    C 11 0 u F

    C 3 3 3 p F

    C 2 3 3 p F

    Y 11 2 M H z

    R 22 7 0 E

    R 32 7 0 E

    L S BC O M C a t h o d e F N D

    1 3 5

    79

    2 4

    68

    1

    0

    M S BC O M C a t h o d e F N D

    1 3 5

    79

    2 4

    68

    1

    0

    U 24 5 1 11

    2345678 9

    1 01 11 21 31 41 5

    1 6B

    CL TB LL EDAG n d e

    dcbagf

    V c c

    U 3

    4 5 1 11234567

    8 9

    1 01 11 21 31 41 51 6

    BCL TB LL ED

    AG n d ed

    cbagf

    V c c

    S W 1 U P1 2

    S W 2 D o w n1 2

    P i n 7 o f F N D

    P i n 9 o f F N D

    P i n 9 o f F N D

    P i n 4 o f 8 0 5 1

    P i n 6 o f F N D

    P i n 7 o f 8 0 5 1

    P i n 2 o f F N D

    P i n 6 o f 8 0 5 1

    P i n 1 o f F N D

    P i n 1 0 o f F N D

    P i n 1 o f F N D

    P i n 1 0 o f F N D

    P i n 1 o f 8 0 5 1

    P i n 4 o f F N D

    P i n 5 o f 8 0 5 1 P i n 2 o f F N D

    P i n 8 o f 8 0 5 1

    P i n 7 o f F N D

    P i n 2 o f 8 0 5 1

    P i n 6 o f F N D

    P i n 3 o f 8 0 5 1

    P i n 4 o f F N D

    L S B

    L S BL S BM S B

    M S B

    M i c r o c o n t r o l l e r B a s e d U P / D O W N C o u n t e r

  • 7/30/2019 Project Report Engineering

    10/48

    Microcontroller Pin diagram

  • 7/30/2019 Project Report Engineering

    11/48

    Components List

    1. Microcontroller AT89S51 - 1

    2. IC- CD 4511 - 2

    3. Common Cathode Seven Segment Display - 2

    4. Crystal 12 MHz - 1

    5. Micro Switch - 2

    6. Capacitor 33pf - 2

    7 Electrolytic 10F - 18. Resistor 8.2K - 19. Resistor 270 - 210 IC Pin Base 40-pin - 1

    11. IC Pin Base 16-pin - 2

  • 7/30/2019 Project Report Engineering

    12/48

    COMPARISON OF MICROPROCESSOR & MICROCONTROLLER

    By Microprocessor is meant the general- purpose Microprocessor Intels x86 family (8086, 80286,

    80386, 80846 and the Pentium) or Motorolas 680x0 family (68000, 68010, 68020, 68040, etc)

    these

    Microprocessors contain no RAM, no ROM and no I/O ports on the chip itself. For this reason, they

    are commonly referred to as general purpose microprocessor. A system designer using a general

    purpose microprocessor such as the Pentium or the 68040 must add RAM, ROM and I/O ports and

    timer externally to make them functional. Although the addition of external RAM, ROM and I/O

    ports makes these systems bulkier and much more expensive, they have the advantages versatility

    such that the designer can decide on the amount of RAM, ROM, I/O ports needed to fit the task at

    hand. This is not the case with microcontroller. A microcontroller has a CPU Microprocessor in

    addition to fixed amount of RAM, ROM, I/O ports and timer on a single chip. Therefore the

    designer can not add any external memory I/O or timer to it and the fixed amount of on chip ROM,

    RAM, I/O ports in microcontroller makes them ideal for many applications cost and space are

    critical.

    Comparison of Microprocessor & Microcontroller

    Microcontrollers vs. Microprocessors:Microcontroller differs from a microprocessor in many ways. First and the mostimportant is its functionality. In order for a microprocessor to be used, other componentssuch as memory, or components for receiving and sending data must be added to it. Inshort that means that microprocessor is the very heart of the computer. On the otherhand, microcontroller is designed to be all of that in one. No other external componentsare needed for its application because all necessary peripherals are already built into it

  • 7/30/2019 Project Report Engineering

    13/48

    By Microprocessor is meant the general- purpose Microprocessor Intels x86 family

    (8086, 80286, 80386, 80846 and the Pentium) or Motorolas 680x0 family (68000,

    68010, 68020, 68040, etc) These

    Microprocessors contain no RAM, no ROM and no I/O ports on the chip itself. For

    this reason, they are commonly referred to as general purpose microprocessor. A

    system designer using a general purpose microprocessor such as the Pentium or the

    68040 must add RAM, ROM and I/O ports and timer externally to make them

    functional. Although the addition of external RAM, ROM and I/O ports makes these

    systems bulkier and much more expensive, they have the advantages versatility such

    that the designer can decide on the amount of RAM, ROM, I/O ports needed to fit the

    task at hand. This is not the case with microcontroller. A microcontroller has a CPU

    Microprocessor in addition to fixed amount of RAM, ROM, I/O ports and timer on a

    single chip. Therefore the designer can not add any external memory I/O or timer to it

    and the fixed amount of on chip ROM, RAM, I/O ports in microcontroller makes

    them ideal for many applications cost and space are critical.

    What is a Microcontroller

    The best way to explain what a microcontroller is is to start with your computer. Your desktopcomputer (or laptop) is comprised of multiple parts, a CPU (such as a Pentium or Celeron), someRAM, a hard disk, a keyboard and mouse and a monitor screen. Programs are stored on the harddisk and run on the CPU, with temporary data stored in RAM. You can run multiple programs at atime by having one 'master program' called an operating system (such as Linux, Windows or MacOS X) and that master program keeps track of things for you.

  • 7/30/2019 Project Report Engineering

    14/48

    The AVR chip has components, too. It has a CPU, some flash storage, some RAMand some EEPROM, all in one little chip!. The CPU is just like the one in a

    computer, but its much simpler and not nearly as fast (what do you expect for$2.50?) The flash storage is just like the flash storage in your mp3 player or

    digital camera card, except its used to store programs. Its kinda like the hard diskof the microcontroller, except you can only read from it. The RAM is just like

    computer RAM. The EEPROM is kinda like flash except you cant run a programfrom it, but its used as long term storage. The EEPROM doesnt get erased when

    the chip loses power.

    So, to recap: The AVR chip runs whatever program is stored in the flash, uses theRAM for temporary storage and the EEPROM for longer term storage.

    Most computers have a 32-bit CPU running at 1GHz, with 1GB of RAM and 100 GBof storage. The kinds of microcontrollers discussed here run at 10MHz, have 1KB of

    RAM and 10KB of storage. (On the order of) However, their small size, lower powerconsumption and low cost make them an excellent choice for many projects!

    Basically, a microcontroller is a device which integrates a number of the components ofa microprocessor system onto a single microchip and optimized to interact with theoutside world through on-board interfaces; i.e. it is a little gadget that houses amicroprocessor, ROM (Read Only Memory), RAM (Random Access Memory), I/O(Input Output functions), and various other specialized circuits all in one package.

    On the other hand, a microprocessor is normally optimized to co-ordinate the flow ofinformation between separate memory and peripheral devices which are located outsideitself. Connections to a microprocessor include address, control and data busses thatallow it to select one of its peripherals and send to or retrieve data from it. Because amicrocontrollers processor and peripherals are built on the same silicon, the devices areself-contained and rarely have any bus structures extending outside their packages.So a microcontroller incorporates onto the same microchip the following:

    The CPU core Memory (both ROM and RAM) Some parallel digital I/O

  • 7/30/2019 Project Report Engineering

    15/48

    Microcontroller's fundamental components

    Microcontrollers will also combine other devices such as: A Timer module to allow the microcontroller to perform tasks for certain time

    periods. A serial I/O port to allow data to flow between the microcontroller and other

    devices such as a PC or another microcontroller.

    An ADC to allow the microcontroller to accept analogue input data forprocessing.

    Basic microcontroller architecture

  • 7/30/2019 Project Report Engineering

    16/48

    The microcontroller's building blocks explained

    To illustrate the functions and interconnectivity of the building blocks of themicrocontroller, we shall construct the microcontroller block by block:

    Memory unitMemory is part of the microcontroller whose function is to store data.The easiest way to explain it is to describe it as one big closet with lots of drawers. If wesuppose that we marked the drawers in such a way that they can not be confused, any oftheir contents will then be easily accessible. It is enough to know the designation of thedrawer and so its contents will be known to us for sure.Memory components are exactly like that. For a certain input we get the contents of a

    certain addressed memory location and that's all. Two new concepts are brought to us:addressing and memory location. Memory consists of all memory locations, andaddressing is nothing but selecting one of them. This means that we need to select the

    desired memory location on one hand, and on the other hand we need to wait for thecontents of that location. Beside reading from a memory location, memory must also

    provide for writing onto it. This is done by supplying an additional line called controlline. We will designate this line as R/W (read/write). Control line is used in thefollowing way: if r/w=1, reading is done, and if opposite is true then writing is done onthe memory location. Memory is the first element, and we need a few operation of ourmicrocontroller.

    Central Processing Unit

    The block that will have a built in capability to multiply, divide, subtract, and move itscontents from one memory location onto another is called "central processing unit"(CPU). Its memory locations are called registers.

    Registers are therefore memory locations whose role is to help with performing variousmathematical operations or any other operations with data wherever data can be found.Look at the current situation. We have two independent entities (memory and CPU)which are interconnected, and thus any exchange of data is hindered, as well as itsfunctionality. If, for example, we wish to add the contents of two memory locations andreturn the result again back to memory, we would need a connection between memory

    and CPU. Simply stated, we must have some "way" through data goes from one block toanother.

    Bus

    That "way" is called "bus". Physically, it represents a group of 8, 16, or more wiresThere are two types of buses: address and data bus. The first one consists of as manylines as the amount of memory we wish to address, and the other one is as wide as data,

  • 7/30/2019 Project Report Engineering

    17/48

    in our case 8 bits or the connection line. First one serves to transmit address from CPUmemory, and the second to connect all blocks inside the microcontroller.

    As far as functionality, the situation has improved, but a new problem has also appeared:we have a unit that's capable of working by itself, but which does not have any contactwith the outside world, or with us! In order to remove this deficiency, let's add a block

    which contains several memory locations whose one end is connected to the data bus,and the other has connection with the output lines on the microcontroller which can beseen as pins on the electronic component.Input-output unit

    Those locations we've just added are called "ports". There are several types of ports :input, output or bidirectional ports. When working with ports, first of all it is necessaryto choose which port we need to work with, and then to send data to, or take it from the

    port.

    When working with it the port acts like a memory location. Something is simply beingwritten into or read from it, and it could be noticed on the pins of the microcontroller.Serial communication

    Beside stated above we've added to the already existing unit the possibility ofcommunication with an outside world. However, this way of communicating has itsdrawbacks. One of the basic drawbacks is the number of lines which need to be used inorder to transfer data. What if it is being transferred to a distance of several kilometers?The number of lines times number of kilometers doesn't promise the economy of the

    project. It leaves us having to reduce the number of lines in such a way that we don'tlessen its functionality. Suppose we are working with three lines only, and that one lineis used for sending data, other for receiving, and the third one is used as a reference linefor both the input and the output side. In order for this to work, we need to set the rulesof exchange of data. These rules are called protocol. Protocol is therefore defined inadvance so there wouldn't be any misunderstanding between the sides that arecommunicating with each other. For example, if one man is speaking in French, and theother in English, it is highly unlikely that they will quickly and effectively understandeach other. Let's suppose we have the following protocol. The logical unit "1" is set upon the transmitting line until transfer begins. Once the transfer starts, we lower the

    transmission line to logical "0" for a period of time (which we will designate as T), sothe receiving side will know that it is receiving data, and so it will activate its mechanismfor reception. Let's go back now to the transmission side and start putting logic zeros andones onto the transmitter line in the order from a bit of the lowest value to a bit of thehighest value. Let each bit stay on line for a time period which is equal to T, and in theend, or after the 8th bit, let us bring the logical unit "1" back on the line which will markthe end of the transmission of one data. The protocol we've just described is called in

  • 7/30/2019 Project Report Engineering

    18/48

    professional literature NRZ (Non-Return to Zero).

    As we have separate lines for receiving and sending, it is possible to receive and senddata (info.) at the same time. So called full-duplex mode block which enables this way ofcommunication is called a serial communication block. Unlike the parallel transmission,data moves here bit by bit, or in a series of bits what defines the term serial

    communication comes from. After the reception of data we need to read it from thereceiving location and store it in memory as opposed to sending where the process isreversed. Data goes from memory through the bus to the sending location, and then tothe receiving unit according to the protocol.Timer unit

    Since we have the serial communication explained, we can receive, send and processdata.However, in order to utilize it in industry we need a few additionally blocks. One ofthose is the timer block which is significant to us because it can give us informationabout time, duration, protocol etc. The basic unit of the timer is a free-run counter whichis in fact a register whose numeric value increments by one in even intervals, so that bytaking its value during periods T1 and T2 and on the basis of their difference we candetermine how much time has elapsed. This is a very important part of themicrocontroller whose understanding requires most of our time.Watchdog

    One more thing is requiring our attention is a flawless functioning of the microcontrollerduring its run-time. Suppose that as a result of some interference (which often does occur

    in industry) our microcontroller stops executing the program, or worse, it starts workingincorrectly.Of course, when this happens with a computer, we simply reset it and it will keepworking. However, there is no reset button we can push on the microcontroller and thussolve our problem. To overcome this obstacle, we need to introduce one more blockcalled watchdog. This block is in fact another free-run counter where our program needsto write a zero in every time it executes correctly. In case that program gets "stuck", zerowill not be written in, and counter alone will reset the microcontroller upon achieving itsmaximum value. This will result in executing the program again, and correctly this timearound. That is an important element of every program to be reliable without man's

    supervision.Analog to Digital Converter (ADC)

    As the peripheral signals usually are substantially different from the ones thatmicrocontroller can understand (zero and one), they have to be converted into a patternwhich can be comprehended by a microcontroller. This task is performed by a block foranalog to digital conversion or by an ADC. This block is responsible for converting an

  • 7/30/2019 Project Report Engineering

    19/48

    information about some analog value to a binary number and for follow it through to aCPU block so that CPU block can further process it.

    Finally, the microcontroller is now completed, and all we need to do now is to assembleit into an electronic component where it will access inner blocks through the outside

    pins. The picture below shows what a microcontroller looks like inside.

    Thin lines which lead from the center towards the sides of the microcontroller represent

    wires connecting inner blocks with the pins on the housing of the microcontroller socalled bonding lines. Chart on the following page represents the center section of amicrocontroller.

    For a real application, a microcontroller alone is not enough. Beside a microcontroller,we need a program that would be executed, and a few more elements which make up a

  • 7/30/2019 Project Report Engineering

    20/48

    interface logic towards the elements of regulation .Program

    Program writing is a special field of work with microcontrollers and is called"programming". Try to write a small program in a language that we will make upourselves first and then would be understood by anyone.

    STARTREGISTER1=MEMORY LOCATION_AREGISTER2=MEMORY LOCATION_BPORTA=REGISTER1 + REGISTER2

    END

    The program adds the contents of two memory locations, and views their sum on port A.The first line of the program stands for moving the contents of memory location "A" intoone of the registers of central processing unit. As we need the other data as well, we willalso move it into the other register of the central processing unit. The next instructioninstructs the central processing unit to add the contents of those two registers and send aresult to port A, so that sum of that addition would be visible to the outside world. For amore complex problem, program that works on its solution will be bigger.

    Programming can be done in several languages such as Assembler, C and Basicwhich are most commonly used languages. Assembler belongs to lower level languagesthat are programmed slowly, but take up the least amount of space in memory and givesthe best results where the speed of program execution is concerned. As it is the mostcommonly used language in programming microcontrollers it will be discussed in a laterchapter. Programs in C language are easier to be written, easier to be understood, but areslower in executing from assembler programs. Basic is the easiest one to learn, and itsinstructions are nearest a man's way of reasoning, but like C programming language it isalso slower than assembler. In any case, before you make up your mind about one ofthese languages you need to consider carefully the demands for execution speed, for thesize of memory and for the amount of time available for its assembly.

    After the program is written, we would install the microcontroller into a deviceand run it. In order to do this we need to add a few more external components necessaryfor its work. First we must give life to a microcontroller by connecting it to a powersupply (power needed for operation of all electronic instruments) and oscillator whoserole is similar to the role that heart plays in a human body. Based on its clocksmicrocontroller executes instructions of a program. As it receives supply microcontrollerwill perform a small check up on itself, look up the beginning of the program and start

  • 7/30/2019 Project Report Engineering

    21/48

    executing it. How the device will work depends on many parameters, the most importantof which is the skilfulness of the developer of hardware, and on programmer's expertisein getting the maximum out of the device with his program.

    Embedded System

    ABSTRACT:-

    An embedded system can be defined as the computing device that has computer hardware, either

    with software embedded in it as one of its most important component. It may be an independent

    system or a part of a larger system. The emergence of embedded systems is a recent development.

    As a scientific discipline it resembles the state of microelectronics (and VLSI design, in particular)

    around 1980. Todays challenge is similar to back then, except that the stakes are probably higher.

    Embedded systems will appear in virtually all devices, and intelligent devices have the tendency to

    oust their "stupid" counterparts from the market place, just like CD players have ousted

    gramophone players. Thanks to developments in microelectronics, the computing power of the

    desktop computers is now becoming available on the palmtops. Embedded systems are

    heterogeneous. Since they are mixtures of hardware and software, trade-off is important design

    decisions: do we realize a function in hardware or in software? But embedded systems are more

    heterogeneous than just combining computer science & digital electronics.

    This paper presents an overview of existing modes of Embedded Systems, architecture & their

    application. A look has also been given to future deployment of Embedded Systems.

    1. INTRODUCTION:-

    An embedded system can be defined as the computing device that has computer hardware with

    software embedded in it as one of its most important component. It may be either an independent

    system or a part of a larger system. As its software usually embeds in ROM ,it does not need

    secondary memories as in a computer. Nearly 99% of the processors manufactured end up in

    embedded systems. Embedded systems find applications in every industrial segment. Embedded

    systems can be categorized as stand-alone systems, real-time systems, networked information

    appliances & mobile devices. Just in the 10 years, such changes have occurred more rapidly that

    they see more revolutionaries than evolutionary. As these systems have brought about radical

    changes in Electronics and Computer, they have also begun to impact other human activities.

    INTRODUCTION TO EMBEDDED SYSTEM:-

    An embedded system is some combination of computer hardware & software, either fixed in

    capability or

  • 7/30/2019 Project Report Engineering

    22/48

    Programmable, that is specifically designed for a

    Particular kind of application device. Hardware & software that forms a component of some larger

    system & is expected to function without human intervention. Typically an embedded system

    consists of a single-board microcomputer with software in ROM, which starts running a dedicated

    application as soon as power is turned on & does not stop until power is turned off. An embedded

    system is any device controlled by instructions stored on a chip. These devices are usuallycontrolled by a microprocessor that executes the instructions stored on a Read Only Memory

    (ROM) chip. Here an example of a chip PIC is shown

    An embedded system is pre-programmed to perform a dedicated or narrow range of functions as

    part of a larger system, usually with minimal end-user or operator intervention. The term

    'embedded' implies that these chips are an integral part of the system. Broadly speaking, these

    programmable devices or systems are generally used to perform, control or monitor processes,

    machinery, environments, equipment and communications tasks.

    Embedded systems have several things to do at oncerespond to severalEvents at once; cope with unusual conditions without human intervention, while being subjected to

    a deadline. In fact a general computer system is made up of numerous embedded systems. If an

    embedded system is designed well, the existence of the processor & the software could be

    completely unnoticed by a user of the device.

    2. CATEGORIES OF EMBEDDED SYSTEM:-

    2.1 Stand-alone Embedded Systems:-As the name implies, stand-alone systems work in stand-alone mode. They take inputs, process

    them & produce the desired output. The input can be electrical signal from transducers or

    commands from a human being such as pressing of a button. The output can be electrical signals to

    drive another system, an LED or LCD display for displaying of information to the users. Embedded

    Systems used in process control,automobiles,consumer electronic items etc. fall into this category in

    a process control system, the inputs are from sensors that convert a physical entity such as

    http://2.bp.blogspot.com/_PQiHEegKgGc/Sj9k84bZqyI/AAAAAAAAAQM/SWugk88d7hU/s1600-h/1.bmp
  • 7/30/2019 Project Report Engineering

    23/48

    temperature or pressure into its equivalent electrical signal. These electrical signals are processed by

    the system and the appropriate electrical signals are produced.

    2.2. Real-time Systems:-

    Embedded Systems in which some specific work has to be done in specific time period are called

    real-time systems. For example- Consider a system that has to open a valve within 30 millisecondswhen the humidity crosses a particular threshold. If the valve is not opened within 30 milliseconds,

    a catastrophe may occur. Such systems with strict deadline are called hard real-time systems. On the

    other hand, if we consider a DVD player and we give some command from a remote control, &

    there is a delay of a milliseconds in executing the command, but this delay wont lead to a serious

    implication. Such systems are called as soft real-time systems.

    2.3 Network Information Appliances:-

    Embedded systems that are provided with network interfaces & accessed by networks such as Local

    Area Network or the Internet are called networked information appliances. Such embedded systemsare connected to a network, typically a network running TCP/IP (Transmission Control

    Protocol/Internet protocol) protocol suite, such as the Internet or the Companys Intranet. These

    systems have emerged in recent years.

    Here are some examples of such systems:-

    A networked process control system consists of a

    number of embedded systems connected as a LAN. Each embedded system can send real-time data

    to a central location from where entire process control system can be monitored. The monitoring

    can be done using a web browser such as the Internet Explorer.

    The door-lock of your home can be a small-embedded system with TCP/IP and HTTP server

    software running on it. When your children stand in front of the door-lock after they return from

    school, the web camera in the door-lock will send an alert to your desktop over the Internet and then

    you can open the door-lock just by clicking the mouse.

    http://1.bp.blogspot.com/_PQiHEegKgGc/Sj9lscW-ssI/AAAAAAAAAQc/78CdS7FJIwc/s1600-h/3.bmp
  • 7/30/2019 Project Report Engineering

    24/48

    3.OVERVIEW OF EMBEDDED SYSTEM ARCHITECTURE:-

    Every embedded system consists of custom built hardware built around a Central Processing Unit

    (CPU). This hardware also contains memory chips onto which software is loaded. The software

    residing on the memory chip is called the firmware. The embedded system architecture can be

    represented as a layered architecture as shown in fig-4. The operating system runs above the

    hardware and the application software run above the operating system. It is not compulsory to havean operating system in every embedded system. For small appliances such as remote control units,

    air conditioner, toys etc., there is no need for an operating system. For applications involving

    complex processing, it is advisable to have an operating system. In such a case, you need to

    integrate the application software with the operating system & then transfer entire software into a

    memory chip. Once the software is transferred to the memory chip, the software will continue to run

    for a long time & you dont need to reload the new software.

    3.1 Building Block of hardware of an Embedded System:-

    Central Processing Unit (CPU):-

    The CPU is a unit that centrally fetches

    & processes a set of general-purpose instructions. The CPU instruction set includes instructions for

    http://4.bp.blogspot.com/_PQiHEegKgGc/Sj9mowGzpSI/AAAAAAAAAQs/O5i9Sl1uCpc/s1600-h/5.bmphttp://4.bp.blogspot.com/_PQiHEegKgGc/Sj9mBcEdh4I/AAAAAAAAAQk/mfLWHXef-xk/s1600-h/4.bmp
  • 7/30/2019 Project Report Engineering

    25/48

    data transfer operations, ALU operations, stack operations, input &output operations & program

    control, sequencing & supervising operations. The general-purpose instruction set is always specific

    to a specific CPU. One example of an older generation Microprocessor is Intel 8085.It is an 8-bit

    processor. Another is Intel 8086 or 8088, which is a 16-bit processor.

    The CPU can be of the following:-Microcontroller, microprocessor or Digital Signal Processor (DSP).

    A micro-controller is a low-cost processor. Its main attraction is that on the chip itself, there will be

    many other components such as memory, ADC

    etc. on the other hand, microprocessors are more powerful, but you need to use many external

    computers with them. DSP is mainly used for applications in which signal processing is involved.

    Processor in the System:-

    An embedded system processor chip or Core can be one of the following.

    1. General Purpose Processor (GPP):-

    a) Microprocessor

    b) Microcontroller

    c) Embedded processor

    d) Digital signals processor (DSP)

    e) Media Processor

    2. Application Specific System Processor

    (ASSP) As Additional Processor

    3. Multiprocessor system using General

    Purpose processors (GPPS) & Application Specific Instruction Processors (ASIPs)

    4. GPP core(s) or ASIP core (s) integrated into either an Application Specific Integrated Circuit

    Circuit (ASIC) or a Very Large Scale

    Integrated Circuit (VLSI) circuit or an FPGA core integrated with processor unit(s) in a VLSI

    (ASIC) chip.

  • 7/30/2019 Project Report Engineering

    26/48

    Block diagram of Component of the Embedded System Hardware:-

    Processor:-

    A processor is the heart of the embedded system. For an embedded system designer, knowledge of

    microprocessors & Microcontrollers is a prerequisite. A processor has two essential units:

    1. Program flow Control Unit (CU)

    2. Execution Unit (EU)

    The CU includes a fetch unit for fetching instruction from the memory. The EU has circuits thatimplement the instructions pertaining to data transfer operation & data conversion from one form to

    another. The EU includes the Arithmetic and Logical Unit (ALU)& also the circuits that execute instructions for a program control tasks, say, halt, interrupt, or jumpto another set of instructions. It can also execute instructions for a call or branch to another program& for a call to a function. Processors runs the cycle of fetch & execute the instruction defined in theprocessor instruction set are executing in the sequence that they are fetched from the memory. Aprocessoris mostly in the form of an IC chip; alternatively it could be in core form in an ASIC or at a Soc.Core means a part of the functional circuit on the VLSI chip.

    A General Purpose Processor is used because of the following:-

    1) Processing by the known instructionsAvailable at redefined general-purpose instruction set result in fast system development.2) Once the board & input/output interfaces are designed for a GPP, theseCan be used for a new system by just changing the embedded software in theBoard ROM.3) Ready availability of a compilerFacilitates embedded software development in high level language.4) Ready availability of a well tested &

    http://3.bp.blogspot.com/_PQiHEegKgGc/Sj9np5j-1EI/AAAAAAAAARE/mrZrD_K30Lk/s1600-h/6.bmp
  • 7/30/2019 Project Report Engineering

    27/48

    Debugged processor specific APIs & theCodes previously designed for otherApplications results in fast developmentof new system.

    Microprocessor:-

    A microprocessor is a single VLSI chipthat has a CPU &may also have some other units (for eg: floating-point processing arithmetic unit,pipelining &super-scaling units) that are additionally present & that result in faster processing ofinstructions.

    Memory:-

    The memory is categorized as Random Access Memory (RAM) and Read Only Memory (ROM).The contents of RAM will be erased if power is switched off. So, the firmware is stored in theROM. When the power is switched on, the CPU reads the ROM, the program is transferred to RAMand program is executed.

    Input devices:-

    Unlike the desktops, the I/P devices to an embedded system have very limited capability. There willbe keyboard or a mouse, & hence interacting with the embedded system is no easy task. Manyembedded systems will have a small keypad-you press one key to give a specific command. Akeypad may be used to I/P only the digits. Many embedded system uses in process control do nothave any I/P device for user interaction; they take I/Ps from sensors or transducers & produceelectrical signals.

    Output devices:-

    The output devices of the embedded systems also have very limited capability. Some embeddedsystems will have a few Light Emitting Diodes to indicate the health status of the system modules.A small Liquid Crystal Display(LCD)may also be used to display some important parameters.

    Communication interfaces:-

    The embedded systems may need to interact with other embedded systems or they may have totransmit data to a desktop.

    Application-specific circuitry:-

    Sensors, transducers, special processing & control circuitry may be required for an embeddedsystem, depending on its application. The circuitry interacts with the processor to carry out thenecessary work.

    4. SPECIALITIES OF EMBEDDED SYSTEMS:-

    While designing the embedded systems, developers have to keep the below specialties in mind: -

    4.1 Performance:-

    Many embedded systems have time constraints. For instance, in a process control system, aconstraint can be: if the temperature exceeds 40 degrees, open a valve within 10 milliseconds.

  • 7/30/2019 Project Report Engineering

    28/48

    The system meets such deadlines. If the deadlines are missed, it may result in a catastrophe. Youcan imagine the damage that can be done if such deadlines are not met in a safety system of anuclear plant.

    4.2 Power Consumption:-

    Most of the embedded systems operate through a battery. To reduce the battery drain & avoidfrequent recharging of the battery, the power consumption of an embedded system has to be verylow.

    4.3 Cost:-

    For an embedded system used in safety applications of a nuclear plant or in a spacecraft, cost maynot be a very important factor. However, for an embedded system used in consumer electronics oroffice automation, the cost is of utmost importance. Suppose you have designed a toy in which theelectronics will cost US$20. By a careful analysis design, if you can telecom operator will changethe algorithm for the calculation of the bill amount. This is very cumbersome, considering that amemory chip will have to replace in thousands of PCO.

    4.4 Size:-

    Size is certainly a factor for many embedded systems. We do not like a mobile phone that has to becarried on our backs. The size and the weight(ie.compactness) are the important parameters in embedded systems used in aircraft, missiles etc.because in such cases, every inch & every grain matters.

    4.5 Software Up gradation capability:-

    Embedded systems are meant for a very specific task. So, once the software is transferred to theembedded system, the same software will run throughout its life. However, in some cases, it may benecessary its upgrade the software. Consider the example of a Public Call Office (PCO). At thePCO, an embedded system is used which displays the amount to be paid by a telephone user. Theamount is calculated by a firmware, based on the calling number & the duration of the call fromtime to time, the broadband & wireless network, & consumer electronic products.

    5. RECENT TRENDS IN EMBEDDED SYSTEMS:-

    In old good days, developing embedded systems was confined to very specialists. Most of theembedded systems are written only in assembly language & hence writing, debugging &maintaining the code were very difficult & time consuming. With the availability of powerfulprocessors & advanced development tools, embedded software development is no longer rocketscience.5.1 Processor Power:-

    The growing importance of embedded systems can be gauged by the availability of processors

    about 150 varieties of processors are available from around 50 semiconductor vendors. Powerful 8-bit, 16- bit, 32-bit and 64-bit micro controllers, & microprocessors are available to cater to thedifferent market segments the clock speed & memory addressing capability of these processors arealso increasing. Very powerful digital signal processors are also available for real time analyses ofaudio and video signals. As a result, the power of desktop computers is now available on palm tops.

    5.2 Mobile Devices:-

    Mobile devices such as mobile phones, Personal Digital Assistants, smart phones etc. are a special

  • 7/30/2019 Project Report Engineering

    29/48

    category of an embedded system. Though the PDA does many general-purpose tasks, they need tobe designed just like the conventional embedded systems. The limitations of the mobile devices-memory constraints, small size, display etc. are same as those found in the embedded systems.Hence mobile devices are considered as embedded systems.

    5.3 Operating Systems:-

    Unlike the desktop on which the options for an operating system are limited, a very of operatingsystems are available which can be ported on to the embedded system. The advantage of embeddingan operating system is that the software development will be very fast & marinating the code is veryeasy. The software can be developed in a high level language such as C. So time to market thesystem gets reduced. If real time performance is require a real time operating system can be used. Inaddition too many commercial embedded operating system open source software campaigned let todevelopment of many open source operating system. The attraction of open source software is thatit is free & also the complete source code is available to customize the software as per yourapplication needs.

    5.4 Communication Interfaces and Networking Capability:- With the availability of low-costchips, embedded systems can be provided networking capability through communication interfacessuch as Ethernet, 802.11b wireless LAN & infrared. Network enabling of an embedded system hasmany advantages: it can be accessed over a network for remote control or monitoring.

    5.5 Programming Languages:-

    Fig. 6Development of embedded system was done mostly in assembly languages. However, due to theavailability of cross-compilers, most of the development is now done in high-level languages suchas C. the object-oriented languages like C++ & Java are now catching up.

    5.6 Development Tools:- Availability of a number of tools for development, debugging & testingas well as for modeling the embedded systems is now paving way for the fast development of robust& reliable systems. Development tools such as BREW (Binary Routine Environment for wireless),Wireless Application Protocol (WAP) development tools facilitate easy development ofapplications for mobile devices

    5.7 Programmable Hardware:- PLDs& FPGA pave the way for reducing the components on anembedded system, leading to small, low-cost systems. After developing the prototype of anembedded system, for mass production, FPGA can be developed having all the functionality of theprocessors, peripherals & application-specific circuitry.

    6. APPLICATION AREAS:- In todays world the electronic devices have been dominated. Thechildren need embedded systems to play smart video games & to operate automatic chocolateVending machines! Young people need embedded systems to borrow smart cards from parents tosee movies! Housewives need embedded system for smart Internet compliant home appliances,such as, microwave, television, music system, & so on.Nearly 99%of the processors manufactured end up in embedded systems. The embedded systemmarket is one of the highest growth areas as these systems are used in very market segment-consumer electronics, office automation, biomedical engineering, wireless communication,& data

  • 7/30/2019 Project Report Engineering

    30/48

    communication, military and so on.

    6.1 Consumer appliances:-

    At home we use a number of embedded systems that include digital camera, digital diary, DVDplayer, electronic toy, microwave oven, remote controls for TV & air conditioner etc. Todays high-tech car has about 20 embedded systems for transmission control, spark control, navigation etc.Even wristwatches are now becoming embedded systems.

    6.2 Industrial automation:- Today a lot of industries use embedded systems for process control.These include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation& transmission. The embedded systems for industrial use are designed to carry out the specific tasksuch as monitoring the temperature, pressure, humidity, voltage, current etc. & then take appropriateaction based on monitored levels to control other devices.

    6.3 Medical electronics:- Almost every medical equipment in the hospital is an embedded system.This equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices &X-ray scanners etc.

    6.4 Computer Networking:- Computer networking products such as bridges, routers, IntegratedServices Digital Networks (ISDN), Asynchronous Transfer Mode & relay switches are theembedded systems that implement the necessary data communication protocols.

    6.5 Wireless technologies:- Advances in mobile communications are paving way for manyinteresting applications using embedded systems. The mobile phone is one of the marvels of the lastdecade of the 20th century. It is very powerful embedded system that provides voicecommunication while we are on the move.

    6.6 Instrumentation:- Testing & measurement are the fundamental requirements in all scientificand engineering activities. The measuring equipment we use in laboratories to measure parameterssuch as weight, temperature, voltage, current etc. are all embedded systems. Test equipment such asoscilloscope, logic analyzer, protocol analyzer, radio communication test set etc, are embeddedsystems built around powerful processors

    6.7 Security:- Security of persons and information has always been a major issue. We need toproject our homes and offices, & also the information we transmit & store. Developing embeddedsystems for security applications is one of the most lucrative businesses nowadays.

    6.8 Finance:- Financial dealing through cash & cheques are now slowly paving way fortransactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any TimeMoney) machine. Smart card, of the size of a credit card, has a small micro-controller and memory;

    & it interacts with the smart card reader / ATM machine & acts as an electronic wallet.

  • 7/30/2019 Project Report Engineering

    31/48

    7. SPECIFIC APPLICATIONS:-

    7.1 AUTOMATIC TELLER MACHINE (ATM):-ATM is an electronic device that allows a bank's customers to make cash withdrawals and checktheir account balances without the need for a human teller. Many ATMs also allow people todeposit cash or cheques, transfer money between their bank accounts or even buy postage stamps.The world's first ATM was developed by De la Rue & installed in Enfield Town in North Londonon June 27, 1967 by Barclays Bank. The idea of a personal identification number (PIN) stored on a

    physical card being compared with the PIN entered when retrieving the money was developed bythe British engineer James Good fellow in 1965.In modern ATMs, customers identify themselvesby using a plastic card with a magnetic stripe, which encodes the customer's account number, & byentering a four-digit pass code (PIN). If the PIN is entered incorrectly for several times in row thenthe ATM retains the card for a security purpose to avoid the use of card by an unauthorized user.There are ATMs that are accessible to blind and visually impaired peoples. This is one of the greatinventions. These are types of ATMs whose keypads are equipped with Braille system.

    7.2 EMBEDDED SYSTEM IN A SHOE:-

    The microprocessor embedded in this Adidas running shoe calculates the pressure between therunner's foot & the ground five million times per second & continuously changes the cushioning to

    match an adjustable comfort level. The computer controls a motor that lengthens & shortens a cableattached to a plastic cushioning element.

    7.3 BRAILLE INTERFACE TO MICROCONTROLLER:-

    In todays world mobile phone has become the most simplest and effective way ofcommunication .What to do if we want to send a message to our friend. Simple, we write a sms andsend it to our friend. Thats very cool and handy for us. But, what if one of our friends is blind.Being blind does not mean he should be deprived of the simplest facility available on mobile phone.

    http://4.bp.blogspot.com/_PQiHEegKgGc/Sj9oK6xLT6I/AAAAAAAAARM/4kwYYEsAiYc/s1600-h/as.bmp
  • 7/30/2019 Project Report Engineering

    32/48

    There should be some way that blind people can also read messages, isnt it? So basically our aim isto enable blind person to read sms.

    Next question how is it possible?

    This is possible through Braille. Braille is a matrix of engraved dots. There is a coding for eachEnglish character. Blind person can read the text just by touching it. This comes through training.And Brailles are used in almost all blind school nowadays. Blind person are using it extensively tocommunicate with mobiles, typewriters and even computers.The message can be transferred to the Braille structure. This is done by interfacing a microcontrollerto the mobile through a cable. This uses serial communication. The mobile communicatesmicrocontroller through AT commands .The microcontroller outputs signal to the relay drivecircuit. The message is also displayed on the LCD connected to the microcontroller. There are sixrelays which drive the mechanical structure, consisting of six thick wires. There is encoding foreach English alphabet and character. The wires corresponding to the particular alphabet or characteris raised up and the blind person can feel it through their fingers.

    10. CONCLUSION:-

    An embedded system is closely integrated with the main systemIt may not interact directly with the environment.Thus embedded systems contain programmed instruction running via processor chips. They performcontrol, protection & monitoring tasks. In broad terms embedded systems are programmabledevices or systems which are generally used to control or monitor things like processes machinery,environmental equipment & communications. The range of embedded system is vast & includes allindustrial & commercial sectors. Embedded systems are rapidly becoming a catalyst for change inthe computing, data communication, telecommunications, industrial control & entertainment sector.The objective of this study is to enlighten readers about the application of embedded systems; theembedded systems technology; & the impact of the technology on various markets.

  • 7/30/2019 Project Report Engineering

    33/48

    Soldering Technique

    SOLDERING

    The electronic depends upon very much on the solder joints. Soldering is an alloying process b/wtwo meters or soldering as a method of reliable joints is one of the widely used practiced production

    is one of the widely practiced production techniques.

    SOLDERING TECHNIQUES:-

    Soldering techniques can be broadly classified into two groups:-1. Iron solders or hand manual soldering.2. Mass soldering or automatic soldering.

    IRON SOLDERING

    If the number of PCBs and components to be soldered are less, hands soldering process is used.Following are the tools used.

    1. Soldering iron2. Solder 3. Soldering fluxes4. Tools

    1. Soldering iron

    It is reasonable priced electrical equipment. It supplies sufficient heat to melt solder by heattransformer. When the iron is applied to connection to be solder, Soldering irons are available in

    different temperature range. Following are professional use industrial grade.

    Soldering iron is divided into two groups:a. Soldering iron or pencils.b. Soldering guns

    A.) Soldering iron or pencil

    The popular type soldering iron consists of an electrical wire attachment, a heating element,a tip of heat transfer and an insulated handle. The tip is normally of copper because of its high

    conductivity is often plated nickel soldering iron consists of following parts:-1. Soldering element2. Heating element3. Insulated handle

  • 7/30/2019 Project Report Engineering

    34/48

    PROPER SELECTION OF SOLDERING IRON AND TIP

    To match soldering take following electrical and mechanical properties are to be considered:-MECHANICAL PROPERTIES:

    D. Length, weight, balance, bi-directional control, safety, artistic lookand comfort.

    ELECTRICAL PROPERTIES:-

    1.) Leakage, grounding

    2.) Solder

    It is the most widely used alloy. It is a genes name representing a host of alloys of low meltingmetals tin lead, cadmium, bismuth sodium silver and many more. An alloy is not just a mixturebut an exact combination of two or more metals to get an entirely new set of desired properties.

    OTHER SOLDERS:-

    1. Tin lead antimony: It consists of tin content of 30% to 50%. The presence of generallyrestricts the flow of solder.

    2. Tin lead silver: It is an alloy of 97% of PB, 20% of AG and 10% of SN. Tin is addedbecause of poor welding qualities of lead.

    3. Tin zinc: It is an electric combination with electric pin at 8.9% of zinc and 91.1% of tin.4. Tin silver: Tin silver combinations are used in ratio 3.5% silver and 96.5% tin.

    FLUXES

    During soldering operations an auxiliary medium is most commonly used to increase theflow properties of molten solders to improve the degree of melting and remove the oxide film fromthe bare metal which prevents from reforming so that the liquid solder display the flux and reactwith the base metal to form a bond characteristics of flux are:-

    Should dissolve any oxide on metal surface.It should prevent the re-oxidation of the metal surface.It should easily be displayed by modern solder.It should be provide a liquid cover over the materials made exclude air up to soldering

    temperature.Residues should be removable after the completion of solder.

  • 7/30/2019 Project Report Engineering

    35/48

    The following are the three categories of flux:

    1. Active or corrosive fluxes.2. Medium fluxes.3. Mild or soft or non corrosive fluxes.

    VARIOUS SOLDERING TECHNIQUES:

    Mass soldering or Automatic Soldering. Mass soldering incorporates these techniques bywhich large no of joints are made simultaneously using a solder bath, bather as the source of heat aswell as or refill material or metal. The most important mass soldering techniques employ same forcontact with a molten solder path.The major advantage of mass rigorous control is possible Overall the individual storage ofsoldering. Mass soldering is classified as:

    Dip soldering

    Drag soldering

    Wave soldering

    Ultrasonic

    A) Dip Soldering: - It is a process in which the preferred PCB assembly is levered VerticallyOn to the clean solder Surface until it makes contact and is then immersed in solder both torequired depth.

    B) Drag soldering: - In drag soldering a convey or system used the PCB so that it passessuccessfully over a floating station or flux dryer or preheating over the surface of a long andnarrow solder bath, the board is lowered at small angle to assist solder drainage.

    C) Wave Soldering:- In wave soldering instead of lowering the board onto the solder bath,solder is pumped out of narrow slot to create a standing wave is solder bath. The boardsafter passing over used floating and drying sections which are conveyed across the crest ofsolder wave by a conveyer system which flows a straight path line.

    I) Double crested

    II) Flat topped

    III) Unidirectional flow

    D) Ultrasonic Soldering: - It permits flux less soldering and timing of non ferrous materialswith no charge of residual fluxes causing future corrosion and failure of past soldering,fluxing and consequent post cleaning operations are eliminated.

    Ultrasonic can be used for soldering of considered very difficult to solderProperty such as nickel alloys.

    Circuit Description Regulated Power Supply 5V

  • 7/30/2019 Project Report Engineering

    36/48

    This circuit is a small +5V power supply, which is useful when experimenting with digitalelectronics. Small inexpensive wall transformers with variable output voltage are availablefrom any electronics shop and supermarket. Those transformers are easily available, butusually their voltage regulation is very poor, which makes then not very usable for digitalcircuit experimenter unless a better regulation can be achieved in some way. The followingcircuit is the answer to the problem.

    This circuit can give +5V output at about 150 mA current, but it can be increased to 1 Awhen good cooling is added to 7805 regulator chip. The circuit has over overload andterminal protection.

    The capacitors must have enough high voltage rating to safely handle the input voltage feedto circuit. The circuit is very easy to build for example into a piece of Vero board.

    Pin out of the 7805 regulator IC.

    1. Unregulated voltage in

    2. Ground

    3. Regulated voltage out

    Other output voltages

    If you need other voltages than +5V, you can modify the circuit by replacing the 7805 chipswith another regulator with different output voltage from regulator 78xx chip family. Thelast numbers in the the chip code tells the output voltage. Remember that the input voltagemust be at least 3V greater than regulator output voltage ot otherwise the regulator does notwork well

    http://www.tkk.fi/Misc/Electronics/circuits/7805.gif
  • 7/30/2019 Project Report Engineering

    37/48

    Power Supply 5V

    1 3V I N V O U T

    1 5

    4 81 2

    12

    M a i n A C

    M a i n A C

    -

    R e g u l a t o r

    7 8 0 5

    4

    7

    0

    -

    m

    f

    d

    /

    2

    5V

    1

    0

    m

    f

    d

    /

    1

    6

    V

    L E D - G r e e n

    5 6 0 o m h

    d i s k - c a p

    . 1 / 1 0 4

    F u s e

    L a m p

    T o g g l e - S w i t c h

    D i o d e - 4 0 0 1

    G N D

    R e g l u t o r p o w e r S u p p l y

    +

    -

    1 0 K

    1 K

    +

    -

    2

    Block Diagram of Regulated Power Supply

  • 7/30/2019 Project Report Engineering

    38/48

    PCB Layout

    Summary of circuit features

    1. Brief description of operation: Gives out well regulated +5V output, output currentcapability of 100 mA

    2. Circuit protection: Built-in overheating protection shuts down output when regulatorIC gets too hot

    3. Circuit complexity: Very simple and easy to build

    4. Circuit performance: Very stable +5V output voltage, reliable operation

    5. Availability of components: Easy to get, uses only very common basic components

    6. Design testing: Based on datasheet example circuit, I have used this circuitsuccessfully as part of many electronics projects

    7. Applications: Part of electronics devices, small laboratory power supply

    8. Power supply voltage: Unregulated DC 8-18V power supply

    9. Power supply current: Needed output current + 5 mA

  • 7/30/2019 Project Report Engineering

    39/48

    10. Component costs: Few dollars for the electronics components + the input transformercost

    List of Components

    1. Transformer 9- 0-9 V 500 m a. amp (Guru Make) 1

    2. Silicon Rectifier diodes 4007 4

    3. Voltage Regulator. 7805 2

    4. Heat sink for Regulator 1

    5. Electrolytic Capacitor 2200 MFD 25 V (Philips) 1

    470 MFD 25 V (Philips) 1

    Electrolytic Capacitor 10 MFD 25V (Philips) 2

    Disc type 0.01 MFD 25 V 2

    Resistances W carbon + - 1-%

    7. 1 K ohm, 10K ohms, 560 ohms 5 each

    8. Red LED. 3

    9. Green LED. 3

    11. Fuse Holder with fuse 500 ma. 1

    12. ON/OFF Switch. 1

    13. Neon (indicator) Mains operated 1

    14. Main Cord/Lead 1

    15. 3 pin & 2 pin connector with wires (M/F) One each

    16. Soldering Iran 10watt 1

    17 Solder wire 50gm

    18. Cater Player 1

    19. Fiber sheet 15x9ench

  • 7/30/2019 Project Report Engineering

    40/48

    Circuit Operation

    In the bridge circuit, four diodes are connected in the form of a wheat stone bridge,

    two diametrically opposite junction of the bridge are connected to the secondary of the

    transformer and the other two are connected to the load.

    A regulated power supply circuit that is an electronics circuit that is designed to

    provide a constant voltage of predetermined value across the load terminals irrespective tothe mains function. A regulated power supply circuit consists of a transformer to step down

    the ac mains voltage to the required value. The output of the transformer is fed to the

    rectifier circuit which converts the ass voltage into pulsating dc voltage.

    In series with the rectifier, the filter circuit is connected which filters out the

    pulsating dc voltage into pure dc voltage. Then the output is connected the voltage regulator

    circuit, which regulates the dc output and converts it into constant dc supply, which can be

    then fed to the electronics circuits.

    Regulator will maintain constant voltage across load in spite of change in load

    current or I/P voltage. As load current increases, the the Zener current decreases so that

    current through resistance R is constant. Since O/P voltage = Vin-IR and I is constant

    therefore O/P voltage remains unchanged. The reverse would be true should load current

    decreases should I/P voltage Vin increase more current will flow through the Zener voltage

    drop across R,will increase but load voltage would remain constant. The reverse would be

    true should I/P voltage decrease.

  • 7/30/2019 Project Report Engineering

    41/48

    Applications of the Regulated Power Supply

    The power supply is the main section of any device or we can say very comfortably

    that the power supply is the first step of trouble Shooting of any device, because if this

    section of the device is not ok then that device will not in working order. This is a regulated

    power supply of (Negative & Positive) Dual Constant Output.

    This circuit is using Regulators 7805 and 7905, so this is applied where the regulated

    or constant voltage of +ve & -ve 5Volts is required.

  • 7/30/2019 Project Report Engineering

    42/48

    IntroductionEmbeddedC.

    The use ofC language to program microcontrollers is becoming too common. And most of the timeits not easy to buld an application in assembly which instead you can make easily in C. So Itsimportant that you know C language for microcontroller which is commonly knownas EmbeddedC. As we are going to use Keil C51 Compiler, hence we also call it Keil C.

    Keywords:

    Keil C51 compiler adds few more keywords to the scope C Language:

    _at_ far sbit

    alien idata sfr

    bdata interrupt sfr16

    bit large small

    code pdata _task_ compact _priority_ using

    data reentrant xdata

    data/idata:

    Description: The variable will be stored in internal data memory of controller.

    example:CODE:

    unsignedchardata x;//orunsignedcharidata y;

    bdata:

    Description: The variable will be stored in bit addressable memory of controller.

  • 7/30/2019 Project Report Engineering

    43/48

    example:CODE:

    unsignedcharbdata x;//each bit of the variable x can be accessed as followsx ^1=1;//1st bit of variable x is setx ^0=0;//0th bit of variable x is cleared

    xdata:

    Description: The variable will be stored in external RAM memory of controller.

    example:CODE:

    unsignedcharxdata x;

    code:

    Description: This keyword is used to store a constant variable in code memory. Lets say you have abig string which is not going to change anywhere in program. Wasting ram for such string will befoolish thing. So instead we will make use of the keyword "code" as shown in example below.

    example:CODE:

    unsignedcharcode str="this is a constant string";

    pdata:

    Description: This keyword will store the variable in paged data memory. This keyword is usedoccasionally.

    example:CODE:

    unsignedcharpdata x;

    _at_:Description: This keyword is used to store a variable on a defined location in ram.

    example:CODE:

    unsignedcharidata x_at_0x30;// variable x will be stored at location 0x30

  • 7/30/2019 Project Report Engineering

    44/48

    // in internal data memory

    sbit:

    Description: This keyword is used to define a special bit from SFR (special function register)memory.

    example:CODE:

    sbit Port0_0 =0x80;// Special bit with name Port0_0 is defined at address 0x80

    sfr:

    Description: sfr is used to define an 8-bit special function register from sfr memory.

    example:CODE:

    sfrPort1 =0x90;// Special function register with name Port1 defined at addrress 0x90

    sfr16:

    Description: This keyword is used to define a two sequential 8-bit registers in SFR memory.

    example:CODE:

    sfr16 DPTR=0x82;// 16-bit special function register starting at 0x82

    // DPL at 0x82, DPH at 0x83

    using:

    Description: This keyword is used to define register bank for a function. User can specify registerbank 0 to 3.

    example:CODE:

    voidfunction()using2{// code}// Funtion named "function" uses register bank 2 while executing its code

  • 7/30/2019 Project Report Engineering

    45/48

    interrupt:

    Description: This keyword will tells the compiler that function described is an interrupt serviceroutine. C51 compiler supports interrupt functions for 32 interrupts (0-31). Use the interrupt vectoraddress in the following table to determine the interrupt number.

    example:

    CODE:void External_Int0()interrupt0{//code

    }

    Memory Models:

    There are three kind of memory models available for the user:

    1. Small: All variables in internal data memory.2. Compact: Variables in one page, maximum 256 variables (limited due to addressing

    scheme, memory accessed indirectly using r0 and r1 registers)3. large: All variables in external ram. variables are accessed using DPTR.

    Depending on our hardware configuration we can specify the momory models as shown below:

  • 7/30/2019 Project Report Engineering

    46/48

    CODE:

    //For Small Memory model#pragma small//For Compact memory model

    #pragma compact//For large memory model

    #pragma large

    Program

    #include

    main()

    {

    unsigned char count=0,msb,lsb,op;

    unsigned int i;

    P0=0;

    P1=0;

    P2=0xFF;

    P3=0;

    while(1)

    {

    while(P2_0==0)

    {

    count=count+1;

    if(count==100)

    {

    count=0;

  • 7/30/2019 Project Report Engineering

    47/48

    }

    msb=count/10;

    lsb=count%10;

    msb=msb

  • 7/30/2019 Project Report Engineering

    48/48

    for(i=0;i