Anda di halaman 1dari 52

TRAINING REPORT

OF INTEGRATED PROJECT ON AUTOMATED OBSTACLE SENSING ROBOT SUBMITTED IN PARTIAL FULFILLMENT OF THE DEGREE (BE-ECE-2009)

Under the Guidance of: Name: Ms Lipika Gupta Department: ECE

Submitted By: Name: Gaurav Godara University Roll No.: B090020133 Name: Ekansh Baja University Roll No.: B090020123 Name: Gaurav Kaul University Roll No.: B090020132

Automated Obstacle Sensing Robot

ACKNOWLEDGEMENT

The completion of any project brings with it a sense of satisfaction, but it is never complete without thanking those people who made it possible and whose constant support has crowned our efforts with success. We are also very thankful to our Dean Academics D r . R a j n i s h S h a r m a whose guidance has provided us enough strength and confidence in attaining the goal in a designed manner. We would also like to express our gratitude to the Department, Electronics & Communication Engineering, Chitkara University for encouraging and inspiring us to carry out this project and giving us the opportunity to make one. I would also like to thank our Supervisors, Ms. Lipika Gupta for her expert and dynamic guidance, encouragement and valuable suggestions at every step. We would also like to thank all the staff members of Chitkara University for providing us with the required facilities and support towards the completion of the project. We are extremely happy to acknowledge and express our sincere gratitude to our parents for their constant support and encouragement and last but not the least, friends and well wishers for their help and cooperation and solutions to t he problems during the course of the project.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

CONTENTS

1. Company Profile ........................................................(6-7) 2. AT89c51 Microcontroller ........................................(9-20) 3. Regulated Power Supply .......................................(20-23) 4. Making Of Power Supply ...........................................(24) 5. Other Important Components .............................(24-32) 6. Advantages of LCD over LED .............................(33-36) 7. Circuit Manufacturing Process ............................(37-44) 8. Source Code .......(45-50) 9. Applications and Future Aspects .........................(51-52) 10.Conclusion ...................................................................(53) 11.Bibliography ................................................................(54)

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

1.COMPANY PROFILE : DOEACC SOCIETY, CHANDIGARH

1.1 Constitution:
DOEACC Society, Chandigarh Centre is an autonomous society registered under The Societies Registration ACT XXI of 1860. It is an autonomous body of Department of Information Technology. Ministry of Communications and Information Technology, Government of India. It was established on 29th March, 1978 (Registration No. 1063). It works on no Profit no Loss basis.

1.2 Objectives:

Encourage and promote the development and progress of Electronic Data Processing towards achieving self-reliance in the field of computer sciences and technology for scientific research and development, educational governmental commercial and industrial applications both for indigenous utilization as well as for export. Advance interdisciplinary co-operation amongst scientists, technologists, engineers, administrators and commercial entrepreneurs for the growth of teaching research and practice of Electronic Data Processing Systems and allied subjects in Academic Institutions, Centre and State Govts., Industrial, Commercial and Research and Development Organisations.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

Disseminate knowledge on all aspects of Electronic Data Processing Systems and allied subjects, and to foster the development of this specialized branch of technology. Stimulate and offer aid for research and development for the benefit of manufacturers and users of Electronic Data Processing Systems. Help in the improvement of standards, terminology, equipment, methods and implementation practices in the field of Electronic Data Processing Systems. Provide support for software development on consultancy basis. Establish, manage and operate sub-Centers for all or any of the objectives of the Centre. In pursuit of these objectives, the Centre may engage in the following activities :

1. Setup Advisory and Consultancy Services. 2. Organize study programmes, symposia, conferences, lectures. 3. Maintain contacts with other learned and professional organizations. 4. Support publication activities. 5. Make available facilities of the Centre for the users.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

PROJECT REPORT

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

2. AT89C51 (MICROCONTROLLER)
A microcontroller (also MCU or c) is a computer-on-chip. It is a type of microprocessor emphasizing self-sufficiency and cost effectiveness, in contrast to a general purpose microprocessor (the kind used in PC).In addition to all arithmetic and logic elements of a general purpose microprocessor, the microcontroller usually also integrates additional elements such as read-only and read-write memory and input/output interfaces.

The AT89C51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of In-System Programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and Pinout. The On-chip Flash allows the program memory to be reprogrammed in-system. By combining a versatile 8-bit CPU with In-System Programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highlyflexible and cost-effective solution to many embedded control applications.

Figure 2.1

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

Figure 2.2: Microcontroller and its different subunits

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

FIGURE 2.3: BLOCK DIAG. OF 8051

The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable 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 contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot PINOUT DIAGRAM

10

FIGURE 2.4: PIN DIAGRAM OF 8051

PIN DESCRIPTION OF 8051

Port description:
All the four ports in the 8051 are bidirectional. Each consists of a latch (Special Function Registers P0 through P3), an output driver, and an input buffer. The output drivers of Ports 0and 2, and the input buffers of Port 0, are used in assesses to external memory. In this Port Outputs the low byte of the external memory address, time-multiplexed with the byte being written or read. Port 2 outputs the high byte of the external memory address when the

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

11

address is 16 bits wide. Otherwise the Port 2 pin continues to emit the P2 SFR content. All the Port 3 pins, and (in the 8052) two Port 1 pins are multifunctional

I/O Ports: There are four 8-bit I/O ports. Most of them have alternate functions which can
be explained further.

Port 0 (pin 32-39): It is a Dual purpose 8-bit open drain I/O port. In minimum
component design, it is used as a general purpose I/O port. Whereas in larger designs with external memory it becomes a multiplexed data bus. In this Low byte of address bus is strobe by the ALE, 8-bit instruction bus by PSEN and 8-bit data bus by WR and RD. with internal pull-ups. The Port 1 output buffers can

sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port

Port 1 (pin 1-8): As an I/O port it serves as the Standard bi-directional port for
interfacing to external devices as required for I/O whereas for the Alternate functions it is subjected only on some derivatives.

Port 2 (pin 21-28): It serves as the dual purpose I/O port. As an I/O port it is
used as Standard bi-directional general purpose I/O port. But whereas for the alternate functions it is used as high byte of address bus for external program and data memory accesses

Port 3 (pin 10-17): It is an 8-bit bi-directional I/O port with internal pull-ups. It
also serves the functions of various special features of the 80C51.

Port 0: Port 0 is an bidirectional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 can also be configured to be the multiplexed low-order address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

12

FIGURE 4: BASIC ARCHITECTURE OF 8051

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

13

TABLE OF ALTERNATE USES OF PORT- 3 PINS

PINS P3.0 RXD P3.1 TXD P3.2 INT0 P3.3 INT1 P3.4 T0 P3.5 T1 P3.6 WR P3.7 RD

ALTERNATE USE Serial data input Serial data output External Interrupt 0 External Interrupt 1 External Timer 0 I/P External Timer 1 I/P External Memory writes pulse External Memory read pulse -

SFR SBUF SBUF TCON.1 TCON.3 TMOD TMOD -

P1.Oand P1.1 serves these alternate functions only on 8052.

Port Pin P1.0 P1.1

Alternate Function T2 (Timer/Counter 2 external input) T2EX(Timer/Counter 2 Capture/Reload trigger) RXD (serial input port) TXD (serial output port) INT0(external interrupt) INT1(external interrupt) T0(Timer/Counter 0 external input) T1 (Timer/Counter 1 external input)

P3.0 P3.1 P3.2 P3.3 P3.4 P3.5

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot


P3.6 P3.7 WR(external Data Memory write strobe) RD(external Data Memory read strobe)

14

TABLE 1

PSEN (pin 29): (Program Store Enable) it enables external program (code) memory. It is
usually connected to EPROMs output enable (OE). It pulses low during fetch stage of an instruction. It remains high while executing a program from internal ROM.

FIGURE 5: PSEN

ALE (pin 30): (Address Latch Enable) it is used for de-multiplexing the address and data
bus when port 0 is used as the data bus and low-byte of address bus.

RST (pin 9):

(RESET) master reset of 8051. RST pin must be high for at least two

machine cycles while the oscillator is running. External reset is asynchronous to the internal clock. Internal RAM is not affected by reset. Reset sets PC to 0000H.
Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

15

EA (pin 31): (External Access) it is high to execute programs from internal ROM and low
to execute from external memory only.

Supply and Ground pins: Pin 40 is for +5V and pin 20 is for GND.

8051 Oscillator & Power Pins (Pin 18 & 19): Pins 18 and 19 are the oscillator
pins to connect the crystal of nominal frequency 12 MHz. One 8051-processor cycle consists of twelve oscillator periods. Each of the twelve oscillator periods is used for a special function by the 8051 core such as opcode fetches.

FIGURE 6: CONNECTION OF CRYSTAL OSCILLATOR The time required for any 8051 instructions can be computed by dividing the clock frequency by 12, inverting that result and multiplying it by the number of processor cycles required by the instruction.

Crystal Oscillator:
very precise frequency.

A crystal oscillator is an electronic circuit that uses the mechanical

resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

16

(a)

(b)

FIGURE 7: CYSTAL OSCILLATOR

This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters/receivers. A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a regularly ordered, repeating pattern extending in all three spatial

FIGURE 8: LOGIC SYMBOLS

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

17

PORT STRUCTURE
All the ports of 8051 are bi-directional so they have the following three components in their structure: D-type latch Output Driver/Buffer Input Buffer/Driver Ports P1-P3 basically have the same structure, P0 has a different structure.

OTHER MEMBERS OF THE FAMILY


8031 ROM RAM Timers 2 I/O pins Serial port Interrupt 32 1 6 0K 128B 2 32 1 6 8051 4K 128B 3 32 1 8 8052 8K 256B

TABLE: 2

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot OTHER 8051 MICROCONTROLLERS

18

UV EPROM version of 8051 is 8751 FLASH version of 8051 is 8951 OTP versions The one by ATMEL, FLASH ROM version of 8051 is AT89C51. AT89C51, AT89C1051, AT89C2051, AT89C52, etc

REGULATED POWER SUPPLY


There are many types of power supply. Most are designed to convert high voltage AC mains electricity to a suitable low voltage supply for electronics circuits and other devices. A power supply can by broken down into a series of blocks, each of which performs a particular function. In our project, we used transformer + Rectifier +smoothing + regulator.

FIGURE 9: REGULATED POWER SUPPLY

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

19

The regulated DC output is very smooth with no ripple. It is suitable for all electronic circuits. The components of power supply as follows:-

TRANSFORMER
Transformer converts AC electricity From One Voltage to another with little loss of power. Transformers work only with AC and his is one of he reasons why mains electricity is AC. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformers to reduce he dangerously high mains voltage (230V in UK) to a safer low voltage. The input coil is called the primary and the output coil is called he secondary. Here is no electrical connection between the two coils; instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core.

FIGURE 10: TRANSFORMER Transformers waste very little power so the power out is (almost) equal to the power in. Note that as voltage is stepped down current is stepped up.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot RECTIFIER

20

There are several ways of connecting diodes to make a rectifier to convert AC to DC. The bridge rectifier is the most important method producing a full-wave varying DC. A full-wave rectifier can also be made from just two diodes if a centre-tap transformer is used, but this method is rarely used now that diodes are cheaper. A single diode can be used as a rectifier but it only uses the positive (+) parts of the AC wave to produce half-wave varying DC.

BRIDGE RECTIFIER
A bridge rectifier can be made using for individual diodes, but it is also available in special package containing the four diodes required. It is called a full-wave rectifier because it uses the entire AC wave (both positive and negative sections).

FIGURE 11: BRIDGE RECTIFIER 1.4V is used up in the bridge rectifier because each diode uses 0.7V when conducting and there are always two diodes conducting, as shown in the diagram below. Bridge rectifiers are rated by the maximum current they can pass and the maximum reveres voltage they can

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

21

withstand (this must be at least three times the supply RMS voltage so the rectifier can withstand the peak voltages.)

SMOOTHING
Smoothing is performed by large value electrolytic capacitor connected across the DC supply to act as a reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling.

FIGURE 12: SMOOTHING EFFECT OF CAPACITOR

REGULATOR (LM7805)
Voltage regulator ICs are available with fixed (typically 5, 12, and 15 V) or variable output voltages. They are also rated by the maximum current they can pass. Negative voltage regulators are also available, mainly for use in dual supplies. Most regulators include some automatic protection from excessive current (overload protection) and overheating (thermal protection).

FIGURE 13: REGULATOR

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

22

4.MAKING OF POWER SUPPLY


220 V AC supply is coming. So to step-down the high voltage into low voltage step down transformer is used (0V-9V range). The current is constant and hence the flux is also of constant magnitude. So the constant flux will not induce e.m.f in secondary winding. Never connect transformer with DC as it causes heavy current in primary winding and will burn out the winding. So 220V AC is step down to 9V (approx) AC. Now 9V AC has to be converted into 9V DC for that AC to DC conversion is done through a rectifier. Rectifier used is of bridge configuration. Now we will get 9V pulsating DC. To get smoother DC filtering is done through a 1000F capacitor. Now this 9V DC is applied atom DC step down and regulator using 3 pin IC package (LM7805CV) where LM is low voltage, 78 is IC family, 05 is voltage atom output, CV is C-MOS construction. Now we get a regulated 5V DC so fine filter optionally can be used to get more or very smooth DC. Now we have to monitor the coming 5V DC by a LED with current limiting resistor.

5.OTHER IMPORTANT COMPONENTS


RESISTORS
Resistors are the passive components. These are those circuit elements which introduces electrical resistance into the circuit. Resistors are used in electronic circuits for setting biases, voltage division, controlling gain, fixing time components, matching and loading circuits, heat generation and related applications. Its function is to reduce the flow of electric current. There are two classes of resistors; fixed resistors in which the value of the resistor does not change like carbon film and metal film resistor and the variable resistors in which value is easily changed, like the volume adjustment of Radio.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

23

(a) Symbol FIGURE 13: RESISTORS

(b) different types of resistors

They are also classified according to the material from which they are made. The typical resistor is made of either carbon film or metal film. The resistance value of the resistor is not the only thing to consider when selecting a resistor for use in a circuit. The "tolerance" and the electric power ratings of the resistor are also important. The tolerance of a resistor denotes how close it is to the actual rated resistance value. There are also the other resistors like wire wound resistor which are not used for the high frequency circuits and also the Thermistor in which the value of resistance changes as there is a change in the temperature.

Color

1st band

2nd band 0 1 2 3 4 5 6 7

3rd band (multiplier) 100 101 102 103 104 105 106 107

4th band (tolerance)

Temp. Coefficient

Black 0 Brown 1 Red 2

1% (F) 2% (G)

100 ppm 50 ppm 15 ppm 25 ppm

Orange 3 Yellow 4 Green 5 Blue 6

0.5% (D) 0.25% (C) 0.1% (B)

Violet 7

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot


Gray 8 8 9 108 109 10-1 10-2 5% (J) 10% (K) 20% (M) 0.05% (A)

24

White 9 Gold Silver None

Note: red to violet are the colors of the rainbow where red is low energy and violet is higher energy.
TABLE 3: COLOUR CODING OF RESISTORS

CAPACITORS
A capacitor is a device capable of storing an electric charge or electric energy (static electricity). The capacitor also functions as a filter, passing alternating current (AC), and blocking direct current (DC). It consists of a metal plates separated by a dielectric material. When DC voltage is applied to the capacitor, an electric charge is stored on each electrode. While the capacitor is charging up, current flows. The current will stop flowing when the capacitor has fully charged. A capacitor is designed for deliberately providing a known amount of capacitance in the circuit. Capacitors are also available in value ranging from less than one pico farads to thousands of micro farads. While using a capacitor its rating must be carefully observed to be certain that the potential to be applied across the capacitor is not greater than the rated value.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot


SOME TYPES OF CAPACITORS

25

When using a capacitor, we must see to the maximum voltage which can be used. This is the "breakdown voltage." The breakdown voltage depends on the kind of capacitor being used. We must be especially careful with electrolytic capacitors because the breakdown voltage is comparatively low. The breakdown voltage of electrolytic capacitors is displayed as Working Voltage. The breakdown voltage is the voltage that when exceeded will cause the dielectric (insulator) inside the capacitor to break down and conduct. When this happens, the failure can be catastrophic. Capacitors can be electrolytic capacitors, tantalum capacitors, ceramic, multilayer ceramic, Polystyrene Film Capacitors, Metalized Polyester Film Capacitors and many more.

DIODES
A diode is a semiconductor device which allows current to flow through it in only one direction. Although a transistor is also a semiconductor device, it does not operate the way a diode does. A diode is specifically made to allow current to flow through it in only one direction. A diode can be used as a rectifier that converts AC (Alternating Current) to DC (Direct Current) for a power supply device. These can be used to separate the signal from radio frequencies. These can also be used as an on/off switch that controls current. These can be used as: (i) Voltage regulation diode (Zener Diode) It is used to regulate voltage, by taking advantage of the fact that Zener diodes tend to stabilize at a certain voltage when that voltage is applied in the opposite direction. (ii) Light emitting diode This type of diode emits light when current flows through it in the forward direction.

(iii) Variable capacitance diode The current does not flow when applying the voltage of the opposite direction to the diode. In this condition, the diode has a capacitance like the capacitor. It is a very small capacitance. The capacitance of the diode changes when changing voltage. With the change of this capacitance, the frequency of the oscillator can be changed.
Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

26

When voltage is applied in the reverse direction through a diode, the diode will have a great resistance to current flow.

PUSH BOTTON SWITCHES


Here we have used 5N type light touch switch. It has following features: (i) Wealth of product types: With or without a ground terminal, vertical or horizontal type, snap-in terminals, etc. (ii) Can be automatically dip-soldered: Integral molding of the terminals and main body prevents the escape of flux. It also finds its recommended applications in Operating switches for other electronic equipments.

FIGURE 15: PUSH BOTTON SWITCH These switches have an axial spring loading on the contact, which may be at the side or bottom. If it is at side on insulating cam then push locks under pressure on the spring contact, pushing it against a fixed contact. These switches are available in locking and unlocking types. Illuminated push buttons are available which has the provision for bulb inside the housing contact rating and life vary to large extend from one type of switch to another and from manufacture to manufacturer.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot STEP-DOWN TRANSFORMER

27

Step down transformers are designed to reduce electrical voltage. Their primary voltage is greater than their secondary voltage. This kind of transformer "steps down" the voltage applied to it. For instance, a step down transformer is needed to use an 110v product in a country with a 220v supply. Step down transformers convert electrical voltage from one level or phase configuration usually down to a lower level. They can include features for electrical isolation, power distribution, and control and instrumentation applications. Step down transformers typically rely on the principle of magnetic induction between coils to convert voltage and/or current levels. Step down transformers are made from two or more coils of insulated wire wound around a core made of iron. When voltage is applied to one coil (frequently called the primary or input) it magnetizes the iron core, which induces a voltage in the other coil, (frequently called the secondary or output). The turns ratio of the two sets of windings determines the amount of voltage transformation. An example of this would be: 100 turns on the primary and 50 turns on the secondary, a ratio of 2 to 1. Step down transformers can be considered nothing more than a voltage ratio device. With step down transformers the voltage ratios between Primary and secondary will mirror the "turns ratio" (except for single phase smaller than 1 kva which have compensated secondary).
A practical application of this 2 to 1 turns ratio would be a 480 to 240 voltage step down. Note that if the input were 440 volts then the output would be 220 volts. The ratio between input and output voltage will stay constant. Transformers should not be operated at voltages higher than the nameplate rating, but may be operated at lower voltages than rated. Because of this it is possible to do some non-standard applications using standard transformers. Single phase step up or step down transformers sized less than 1 KVA should not be reverse connected because the secondary windings have additional turns to overcome a voltage drop when the load is applied. If reverse connected, the output voltage will be less than desired

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

28

LIGHT EMMITING DIODES (IN4007)


Light emitting diodes must be chosen according to how they will be used, because there are various kinds of diodes are available in several colors. The most common colors are red and green, but there are even blue ones. As for the remains two leads, one side is for the green, the other for the red LED. When both are turned on simultaneously, it becomes orange. When an LED is new out of the package, the polarity of the device can be determined by looking at the leads. The longer lead is the Anode side, and the short one is the Cathode side. The polarity of an LED can also be determined using a resistance meter, or even a 1.5 V battery. When using a test meter to determine polarity, set the meter to a low resistance measurement range. Connect the probes of the meter to the LED. If the polarity is correct, the LED will glow. If the LED does not glow, switch the meter probes to the opposite leads on the LED.

FIGURE 16: LED

In either case, the side of the diode which is connected to the black meter probe when the LED glows, is the Anode side. Positive voltage flows out of the black probe when the meter is

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

29

set to measure resistance. It is possible to use an LED to obtain a fixed voltage. The voltage drop (forward voltage or VF) of an LED is comparatively stable at just about 2V.

sign:

terminal:

anode (A)

cathode (K)

leads:

long

Short

exterior:

round

Flat

interior:

small

Large

wiring:

red

Black

Stripe *marking: none

*pin:

*PCB:

round

Square

*Die placement:

connector

Cup

(*)Less reliable methods of determining polarity


TABLE: 4 LED SPECIFICATIONS

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot POTENTIOMETER


A potentiometer is a variable resistance that can be used as a voltage divider.

30

Originally a potentiometer was an instrument to measure the potential or voltage in a circuit by tapping of a fraction of a known voltage from a resistive slide wire and comparing it with the unknown voltage by means of a galvanometer.

FIGURE 17: POTENTIOMETER

The present popular usage of the term potentiometer describes an electrical device which has a user adjustable resistance. Usually this is a three terminal resistor with a sliding contact in the centre (the wiper).if all thee terminals are used; it can act as a variable voltage divider. If only two terminals are used (one side and wiper), it acts as a variable resistor. Its shortcoming is that of corrosion or wearing of the sliding contact, especially if it is kept in one position. A keypad is often organized as matrix of switches. They can be of mechanical, membrane, capacitive type. Mechanical switches have bulky size, membrane have small size. Capacitive keyboards are comprised of two plates parallel plate capacitor.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

31

6.ADVANTAGES OF LCD OVER LED


Declining prices of LCD. Ability to display numbers, characters and graphics. Ease of programming for characters and graphics. Relieving CPU from refreshing task of LCD

FIGURE 22 : BLOCK DIAGRAM KEY BOARD WITH PARALLEL PORTS

Pressing the cap increases the capacitance between two plates and extra circuitry is required for detection of this. Advantage is that they dont have mechanical connections.

The key board here we are interfacing is a matrix keyboard. This key board is designed with a particular rows and columns. These rows and columns are connected to the microcontroller through its ports of the micro controller 8051. We normally use 4*4 matrix key boards so only two ports of 8051 can be easily connected to the rows and columns of the key board. When ever a key is pressed, a row and a column gets shorted through that pressed key and all the other keys are left open. When a key is pressed only a bit in the port goes high. This indicates microcontroller that the key is pressed. By this high on the bit key in the corresponding column is identified. Once we are sure that one of key in the

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

32

key board is pressed next our aim is to identify that key. To do this we firstly check for particular row and then we check the corresponding column the key board. To check the row of the pressed key in the keyboard, one of the rows is made high by making one of bit in the output port of 8051 high. This is done until the row is found out. Once we get the row next out job is to find out the column of the pressed key. The column is detected by contents in the input ports with the help of a counter. The content of the input port is rotated with carry until the carry bit is set. The contents of the counter is then compared and displayed in the display. This display is designed using a seven segment display and a BCD to seven segment decoder IC 7447.The BCD equivalent number of counter is sent through output part of 8051 displays the number of pressed key. Keyboard is organized in a matrix of rows and columns as shown in the figure. The microcontroller accesses both rows and columns through the port.

BASIC CONNECTION

FIGURE 25 : BASIC CONNECTION WITH KEY BOARD

For example WRITE 00001111:

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

33

FIGURE 24 - FLOWCHART FOR WRITING

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

34

FIGURE 25 - MATRIX CONNECTION

Chitkara University, Himachal Pradesh.

7.CIRCUIT MANUFACTURING PROCESS

COMPONENT TESTING

Oscilloscope 201 comes with an additional facility, a built in component tester. This allows passive and active components like resistor, capacitor, inductor, transformer, silicon or germanium diodes, zener diodes, tunnel diodes, schottky diodes, transistors, JFET, MOSFET, SCR, TRIAC and even linear and digital ICs to be tested while still in circuit. While using the 201-component tester is very simple. Just push in the CT switch, plug into test probes one at the banana socket marked CT-IN, and the other at the ground socket. A horizontal line about 5-6cms will be seen while shortening the two test probe tips a vertical line is seen connected to the component under test across the probes. Some typical test patterns are shown on the figures. Only to remember is to keep the scope in the CH-1 operating mode and ground input of CH-1.

SOLDER PLATING | SOLDER RESIST


Soldering is a process in which two or more metal items are joined together by melting and following a filler metal into the joint, the filler metal having a relatively low melting point. Soldering filler materials are available in many different alloys for differing applications.Soft soldering is characterized by the melting point of the filler metal, which is below 400 C (800 F). The filler metal used in the process is called solder. In a soldering process, heat is applied to the parts to be joined, causing the solder to melt. And be drawn into the joint by capillary action and to bond to the materials to be joined by wetting action. After the metal cools, the resulting joints are not as strong as the base metal, but have adequate strength, electrical conductivity, and water-tightness for many uses. In high-temperature metal joining processes the primary purpose of flux is to prevent oxidation of the base and filler materials Pads and lands which will require components to be mounted on are plated to allow solder ability of the components. Bare copper is not readily solder able and requires the surface to be plated with a material that facilitates soldering. In the past a lead based tin was used to
Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

36

plate the surfaces, but with RoHS compliance enacted newer materials are being used such as nickel and gold to both offer solder ability and comply with RoHS standards. Areas that should not be solderable are covered with a material to resist soldering. Solder resist refers the a polymer coating that acts as a mask and prevents solder from bridging traces and possibly creating short circuits to nearby component leads.

SILK SCREEN
When visible information needs to be applied to the board such as company logos, part numbers or instructions, silk screening is used to apply the text to the outer surface of the circuit board. Where spacing allows, screened text can indicate component designators, switch setting requirements and additional features to assist in the assembly process.
NOTE: "Red Print" refers to the silk screening of a one sided printed circuit board.

FIXATION
Fixation of electronic components: Following steps should be followed: (i) clean the component leads to be soldered. (ii) Give proper shape to the terminal component and insert it from the non track side in a position in which it is to be soldered. (iii) Fix IC base on circuit plate instead of directly inserting IC in to the plate. Take care for the pin connection of IC and IC base. (iv)The assembler must be careful about defined direction if the components are especially ICs, diodes, zener, etc. (v) Switch ON the supply. Place the electrode at the point of soldering on the track side with one hand and soldering wire on the other hand. (vi) When solder wire forms a mount at that point remove the electrode and wire. (vii) Clean the solder joints with a cleaner. Fixation of pins: Following steps should be followed: (i) push the riveted pin from the non-track side through the hole. (ii) Apply flux at the points to be soldered on the track side. (iii) Then place the electrode of 35W at the point of soldering on the track side with one hand and soldering wire in the other hand. (iv) When the solder wire form a mount at the point, remove the electrode and wire. (v) Clean the point of solder with a cleaner.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

37

Fixation of wires: Following steps should be followed: (i) Scrap the insulation of wire length between 1/8 and 2/8 and twist the wire properly. (ii) Apply flux on this uncovered wire. (iii) Switch ON the supply and when electrode becomes hot apply solder to tip of electrode and touch it to uncovered wire to be soldered. (iv) Now apply flux at that point where the wire is to be soldered. (v) Hot electrode is touch at this point for 2-3 seconds, then place the wire at that point where it is to be soldered and solder the point with the help of hot electrode. (vi) Clean the point of solder with a cleaner.

Connecting hardware according to the circuit diagram doesnt work really. You need to program the components accordingly so as to work according to the algorithm you have designed in order to make the project work properly as required. Following is the description of software used.

Software
Cx51 Compiler The C programming language is a general-purpose programming language that provides code efficiency, elements of structured programming, and a rich set of operators. C is not a big language and is not designed for any one particular area of application. Its generality combined with its absence of restrictions, makes C a convenient and effective programming solution for a wide variety of software tasks. Many applications can be solved more easily and efficiently with C than with other more specialized languages. The Cx51 Optimizing C Compiler is a complete implementation of the American National Standards Institute (ANSI) standard for the C language. The Cx51 Compiler is not a universal C compiler adapted for the 8051 target. It is a ground-up implementation, dedicated to generating extremely fast and compact code for the 8051 microprocessor. The Cx51 Compiler provides you with the flexibility of programming in C and the code efficiency and speed of assembly language.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

38

Since the Cx51 Compiler is a cross compiler, some aspects of the C programming language and standard libraries are altered or enhanced to address the peculiarities of an embedded target processor. The Keil C51 C Compiler for the 8051 microcontroller is the most popular 8051 C compiler in the world. It provides more features than any other 8051 C compiler available today. The C51 Compiler allows you to write 8051 microcontroller applications in C that, once compiled, have the efficiency and speed of assembly language. Language extensions in the C51 Compiler give you full access to all resources of the 8051. The C51 Compiler translates C source files into relocatable object modules which contain full symbolic information for debugging with the Vision Debugger or an in-circuit emulator. In addition to the object file, the compiler generates a listing file which may optionally include symbol table and cross reference information. Features

Nine basic data types, including 32-bit IEEE floating-point, Flexible variable allocation with bit, data, bdata, idata, xdata, and pdata memory types,

Interrupt functions may be written in C, Full use of the 8051 register banks, Complete symbol and type information for source-level debugging, Use of AJMP and ACALL instructions, Bit-addressable data objects, Built-in interface for the RTX51 Real-Time Kernel, Support for dual data pointers on Atmel, AMD, Cypress, Dallas Semiconductor, Infineon, Philips, and Triscend microcontrollers,

Support for the Philips 8xC750, 8xC751, and 8xC752 limited instruction sets, Support for the Infineon 80C517 arithmetic unit.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

39

The 8051 Family is one of the fastest growing Microcontroller Architectures. More than 500 device variants from various silicon vendors are available today. New extended 8051 devices, like the Philips 80C51MX architecture, are dedicated for large applications with several megabytes of code and data space. For optimum support of these different 8051 variants, Keil provides several development tools that are listed in the table below. A new output file format (OMF2) allows direct support of up to 16MB code and data space. The CX51 Compiler is a variant of the C51 compiler that is designed for the new Philips 80C51MX architecture.

KEIL SOFTWARE

Keil MicroVision is an integrated development environment used to create software to be run on embedded systems (like a microcontroller). It allows for such software to be written either in assembly or C programming languages and for that software to be simulated on a computer before being loaded onto the microcontroller.

Vision3 Vision3 is an IDE (Integrated Development Environment) that helps write, compile, and debug embedded programs. It encapsulates the following components: A project manager. A make facility. Tool configuration. Editor. A powerful debugger.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

40

Open the Keil Vision2


1. Go to Project Open Project and browse for Hello in Ch03_00 in Pont and open it. SCREENSHOT 1 2. Go to Project Select Device for Target Target1

SCREENSHOT 2

3. Select Atmel 89c51(all variants) and click OK

SCREENSHOT 3

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

41

4. Now we need to check the oscillator frequency: Go to project Options for Target Target1

SCREENSHOT 4

5. Make sure that the oscillator frequency is 12MHz.

SCREENSHOT 5

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

42

6. Building the Target Build the target as illustrated in the figure below

SCREENSHOT 6

7. Running the Simulation Having successfully built the target, we are now ready to start the debug session and run the simulator. First start a debug session

SCREENSHOT 7

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

43

8.SOURCE CODE
#include<reg51.h> #define LCDDATA P2 #define KEYPAD P1

sbit RS = P3^1; sbit E =P3^2 ;

// //

P0^0 ; P0^1;

sbit C1 = KEYPAD^0; sbit C2 = KEYPAD^1; sbit C3 = KEYPAD^2; //X C1 C2 C3 R4 R3 R2 R1

char msg1[16] ={"Enter Password"}; char msg2[16] ={"Passwd Incorrect"}; char msg3[16] ={"Passwd CORRECT -"}; char msgLock[16] ={"System is Locked"};

void delay()

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

44

int i ;

for ( i=0;i<20000;i++) ; } void lcd_datawrite (unsigned int i ) { LCDDATA = i; RS = 1; E =1; } void lcd_command (unsigned int i ) { LCDDATA = i; RS = 0; E =1; } void lcd_init() { lcd_command (0x38 ) ; delay(); lcd_command (0x0e ) ; delay(); lcd_command (0x01 ) ; delay(); lcd_command (0x06 ) ; delay(); lcd_command (0x0c ) ; delay(); } void main() { int i, s, upass=0,count =0; delay(); E=0; delay(); E=0;

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

45

lcd_init(); for (i=0; msg1[i] != '\0' ; i++) lcd_datawrite(msg1[i]); lcd_command(0xc0) ; while (1){

KEYPAD = 0xff; if (count >=3) { lcd_command(0x01) ; for (i=0; msgLock[i] != '\0' ; i++) lcd_datawrite(msgLock[i]); }else { C1=0; C2=C3= 1; if ( KEYPAD == 0xBe ) {

s= 1; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xBD ) { }

s= 4; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xBB ) { }

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

46

s= 7; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xB7 ) upass=0; lcd_command(0x01); // clear screen for (i=0; msg1[i] != '\0' ; i++) lcd_datawrite(msg1[i]); lcd_command(0xc0) ; } }

{ // CLEAR

C2=0; C1=C3=1; if ( KEYPAD == 0xDE ) {

s= 2; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xDD ) { }

s= 5; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xDB ) { }

s= 8; upass = upass*10+s ; lcd_datawrite('*'); }

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

47

if ( KEYPAD == 0xD7 )

s= 0; upass = upass*10+s ; lcd_datawrite('*'); }

C3=0; C2=C1=1; if ( KEYPAD == 0xEE ) {

s= 3; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xED ) { }

s= 6; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xEB ) { }

s= 9; upass = upass*10+s ; lcd_datawrite('*'); if ( KEYPAD == 0xE7 ) { }

// enter is pressed lcd_command(0x01); // clear screen if (upass ==6969 ) { for (i=0; msg3[i] != '\0' ; i++) lcd_datawrite(msg3[i]);//display Y

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

48

count = 0 ; }else{ for (i=0; msg2[i] != '\0' ; i++) lcd_datawrite(msg2[i]); // display E -Error count++; } upass = 0; delay();delay();delay(); lcd_command(0x01) ; if (count<3) for (i=0; msg1[i] != '\0' ; i++) lcd_datawrite(msg1[i]); lcd_command(0xc0) ; } } delay(); } }

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

49

9.APPLICATIONS & FUTURE ASPECTS


Electronic Code Lock System is very useful to provide security to any appliances. The designed system can be used for controlling any electrical appliance, if the respective appliance gets connected to the circuit. Like a door lock system, alarming system etc.

This project can be used in wide variety of areas such as i. ii. Home Automation i.e for house hold purposes Industrial Automation like schools, offices etc.

FUTURE ASPECTS:
Some of the pins of the microcontroller are left unused & hence can be used in the future by defining the functions. We can control many devices by increasing the ULN2003 ICs (which are connected to the microcontroller). We may implement this project for the industrial purposes also.

This system will act according to the parameters given by the user.
3-Wire LCD Interface RS-232 Data-Logging Software Add our new RS-232 Data-Logging software to your next 8051 application, and capture/view data to a log file. It also comes as an ActiveX control to simplify designing your own custom version. High-Powered, 4-Bit, Infrared Remote Control Add 4-Bit Infrared Remote Control to your next 8051 project.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

50

Moving Message Display Build a scrolling marquee sign using an Intelligent alphanumeric display and the Phillips 87C750 Micro.

DS5000T Programmable Relay Controller/Alarm Clock Build a programmable relay controller for up to 8 relays, it even has an "Alarm Clock" with battery backup.

Programmable Alarm Clock Using the Atmel AT89C2051 Using the Atmel AT89C2051 2K Flash Microcontroller/Dallas DS1307 to build an Alarm Clock.

8051 Development System Build a complete 8051 development system using the Dallas DS5000T for under $100.

DS1620 Programmer & Programmable Thermostat Build your own temperature chip programmer or programmable thermostat using the Dallas DS1620.

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

51

10.CONCLUSION
The objective of this project was to illustrate the design and implementation of a microcontroller ( at89c51 is 8051 microcontroller with 64kB flash and 1024 B of data RAM ) controlled system that could be programmed in keil software. It is monitored by LCD and controlled with Keypad. The program is dumped in microcontroller by using Flash Magic software and interfaced with keyboard. The testing as well as design and system integration is an important feature of this project. This is an example of how a practical application can be used to allow a user to control with an industrial system using the password security and firm software. This project develops essential skills and knowledge for a process control system, here a Password controlled one, but this technique could be

applied to almost any industrial setting including robotics and also door lock system by using an appliance like door lock as appliance. The project is an example of a practical application which can be performed in an industrial setting as well as in a control laboratory. This experience develops skills in designing an security system and process control system with practical applications in an industrial setting. Through numerous experiments on the manual password entry process, it was verified that the project is an effective module for an graduate capstone project course.
After completing the project, we learnt much things.Our interest in practical work also increased.We had learned the following things: How to read the circuit Diagram? How to identify the components? How to assemble the given components with the help of circuit Diagram on the PCB? To know how the interfacing of LCD can be done with microcontroller 8051? How the micro-controller works? How to eliminate any fault if occurs? How to solder/desolder the components efficiently?

What practical works provide us and how accuracy,efficiency can be got in the work?

Chitkara University, Himachal Pradesh.

Automated Obstacle Sensing Robot

52

11.BIBLIOGRAPHY
11.1 Books: 11.1.1Douglas V.Hall, Microprocessor And Interfacing, Tata McGraw- Hill,2nd edition, 2002. 11.1.2. Kenneth J. Ayala, The 8051 Microcontroller programming application, Penram International ,2nd edition, 2003. 11.1.3. Muhammad Ali Mazidi and Janice Gillispie Mazidi, The 8051 Microcontroller and Embedded system,PEARSON nd Education, 2 edition 2002. 11.1.4. Roy Chowdary, Linear Integrated Circuits, New Age International Publications ,2nd Edition,2000. 11.2 Websites: 11.2.1 http://www.8051projects.net/forum 11.2.2http://www.datasheetdirect.com 11.2.3http://www.keil.com/appnotes 11.2.4http://www.alldatasheets.com 11.2.5www.geocities.com

Chitkara University, Himachal Pradesh.

Anda mungkin juga menyukai