You are on page 1of 70

ORGANIZATIONAL PROFILE

The National Small Industries Corporation Limited (NSIC) was established in 1955 by the Government of India with a view to promote, aid and foster the growth of Small Industries in the country. NSIC continues to remain at the forefront, with it's various programs and projects, to assist the small-scale sector in the country. Over a period of four decades of this rescission, growth and development of smallscale sector, it has proved its strength within the country and abroad dynamically, showing its progressive attitude towards modernization, up gradation of technology, quality consciousness, strengthening linkages with large and medium scale enterprises and boosting exports of products from Small Enterprises. The small-scale sector continues to remain an important instrument for enterprise-building, dispersal of industries for even regional economic development and employment generation. NSIC has been successfully able to plan its assigned role in this endeavor. Due to changed industrial scenario and gradual globalization of the economy, small-scale sector has to face stiff competition as the insulated and protected market conditions are no more going to be available to it. To enable the small-scale industry to meet this challenge, NSIC has already initiated various steps so that SSI's can play their due role, even during polarization of various economic forces.

A SPECTRUM OF ACTIVITIES
NSIC provides diversified support through its wide spectrum of programs to TSC to cater to their different needs related to multi-products and multi-locations markets. It has adopted a multi-pronged approach to effectively serve the various needs of TSC. Assistance by NISC to Small Scale Units to sell their goods and services to government departments and agencies, through 'Single Point Registration Scheme', provides a vast marketing opportunity. The corporation also arranges indigenous as well as imported raw materials and parts to ensure that the production cycle of SSI's continues without break and they are able to produce high quality products. But that's not all. There is a lot more to NSIC. The organization operates Hire purchase and Equipment Leasing Schemes for providing machinery and equipment at doorsteps of 1

the entrepreneurs. These schemes not only have been able to generate a class of First Generation Entrepreneurs to set up enterprises with minimum investment, the schemes have also acted as stimulants to the existing entrepreneur for expansion, diversification, modernization and technology up gradation. Though a chain of five NSIC Technical Service Centers are located at different parts of the country, NSIC offers workshops, testing laboratories and common facilities to the entrepreneurs and their workmen are provided with avenues for skill up gradation through training in various technical trades. To encourage exports, NSIC has set up Software Technology Parks providing complete infrastructure to enable small entrepreneurs to undertake Software exports.

ACTIVITIES
Common facilities Prototype development Technology Transfer Human Resource Development Placements Seminars and Workshops

ASSISSTING COUNTRIES WORLDWIDE

NSIC is committed to accelerate the growth of the small-scale sector not only in India but also in similar countries worldwide NSICs efforts in assisting other countries with infrastructure facilities and support service has been worthy.

. 2

CHAPTER-1
GENERAL OVERVIEW

GENERAL OVERVIEW
3

1.1 INTRODUCTION:
Technology is the word coined for the practical application of scientific knowledge in the industry. The advancement in technology cannot be justified unless it is used for leveraging the users purpose. Technology, is today, imbibed for accomplishment of several tasks of varied complexity, in almost all walks of life. The society as a whole is exquisitely dependent on science and technology. Technology has played a very significant role in improving the quality of life. One way through which this is done is by automating several tasks using complex logic to simplify the work.

1.2 AIM:
The aim of our project is to pick the object from the place and place the object at the destination. This sort of robot is very much useful in the case of industries like where the pick and place job is carried on continuously for example in biscuit company, dairy form etc., this project is also helpful in minimizing the man power and complete the job automatically and accurately.

1.3 METHODOLOGY:

Specifications

Analysis

Product Design

High-level Design

Low-level Design

Test Design

Test Cases

Coding & Unit Testing

Documentation

Successful

System Test

Integration

Failure

The above figure gives the pictorial representation of the procedure followed in the project development. In the specifications stage, the requirements of the model were identified. In order to

identify the requirements, literature survey was carried out. The identified requirements and the specifications of the model were then analyzed to

identify whether or not they were viable. If any of the specifications seemed impracticable, the specifications were reviewed. Once the viable specifications were identified, the design of the product was developed. A

set of all possible test cases was also prepared simultaneously. The high level design document gives an overview of the design details.

The low level design document contains the intricate details of the product design. The project was then divided into separate modules and each module was individually

soldered, coded and tested. All the tested modules were then integrated. The integrated module was then tested for the

set of all possible test cases. In case the integrated module didnt work for a certain test case, the specifications were reviewed accordingly. In general, after every stage in project development, the specifications were reviewed. After the integrated module satisfied all the test cases, different stages of the project were

documented.

1.4 SIGNIFICANCE OF PROJECT WORK:


During the course of our project we developed a multi system controller that is capable of controlling devices that work on both ac and dc power supplies satisfactorily. We have developed a model that gives a demo of industrial automation.

1.5 ORGANISATION OF THE REPORT:


In the report, the second chapter deals with the introduction to the embedded systems, multi system controllers and its basic details. The third chapter gives the details about the microcontroller AT89C51.The chapters four and five, contain the details of the encoder and decoder respectively. The sixth chapter deals with the driver L293D that forms a major component of one of our application circuits. The specifications of the RF modules used for communication between the controller and the controlled devices are discussed in the seventh chapter. The eighth chapter contains information about the remote controlled car which is one of our application devices. The power supply and relay circuits are discussed in chapter nine. The tenth chapter consists of the details of the vision software that has been used to code our circuits. The eleventh chapter gives the details about the procedure followed for testing the model developed in our project. 6

CHAPTER-2
INTRODUCTION

INTRODUCTION 2.1 INTRODUCTION TO EMBEDDED SYSTEMS:

2.1.1 EMBEDDED SYSTEMS:


An embedded system is a specialized computer system that is housed in a large system in order to carry out certain specific applications. Some embedded systems include operating systems and most are so specialized such that the entire logic can be implemented as a single program.

2.1.2 APPLICATIONS OF EMBEDDED SYSTEMS:


Industrial machines Automobiles Medical equipment Cameras Household appliances Airplanes Vending machines Toys etc Are among the myriad possible hosts of an embedded system. 2.2 INTRODUCTION TO ROBOT

A robot is a mechanical or virtual artificial agent. In practice, it is usually an electro-mechanical system which, by its appearance or movements, conveys a sense that it has intent or agency of its own. The word robot can refer to both physical robots and virtual software agents, but the latter are usually referred to as Robots There is no consensus on which machines qualify as robots, but there is general agreement among experts and the public that robots tend to do some or all of the following: move 8

around, operate a mechanical arm, sense and manipulate their environment, and exhibit intelligent behavior, especially behavior which mimics humans or animals. 3 4 With the future production scheme already taken into consideration, operation to return to the origin is no more necessary. Adoption of the completely absolute system for all models enables quick return for production. There robots are now indispensable at the production site for higher speed production and reduction of loss time. As these models have a very rigid frame and highly accurate positioning function, they can cope with higher level applications.

CHAPTER-3
MICROCONTROLLER

10

MICROCONTROLLER 3.1 INTRODUCTION:


A microcontroller is a computer on a chip. It is an integrated chip that is usually a part of an embedded system. It is a microprocessor that is meant to be more self contained, independent and yet function as a tiny, dedicated computer. It lays emphasis on high integration, low power consumption, self sufficiency and cost effectiveness. It is typically designed using the CMOS (complementary metal oxide semiconductor) technology and has the following features: a central processing unit discrete input and output pins serial input/output ports(UARTs) peripherals such as timers, counters RAM,ROM,EPROM,Flash Memory(EEPROM) Clock generator May include analog to digital converters In-circuit programming and debugging support

Memory (RAM/ROM)

Micro controller

I/O ports

Peripherals

11

3.2 ADVANTAGES:
Design with microcontrollers has the following advantages: It has low overall system cost as all the peripherals are integrated onto a single chip. The product size is small, therefore the product is handy. System design and troubleshooting is simple. Since the peripherals are integrated on the same chip, the system is reliable. Additional RAM and ROM can be easily interfaced as and when required. Microcontrollers with on-chip ROM provides a software security feature.

3.3 ATMEL 89S52:


ATMEL 89C51 is a low power, high performance CMOS 8 bit microcomputer with 4K bytes of flash programmable and erasable read only memory (PEROM).The device is manufactured using Atmels high density, non volatile memory technology and is compatible with industry standard MCS-51 instruction set. It provides highly flexible and cost effective solution to many embedded control applications.

3.4 FEATURES OF ATMEL 89S52:


It has 4K bytes of in-system reprogrammable flash memory (1000 write/erase cycles). Fully static operation: 0-24 MHz Three level program memory lock 128 bytes internal RAM 32 programmable I/O lines(4 ports) Two 16 bit timers/counters Six interrupt sources Programmable serial channel Low power idle and Power down modes 8 bit CPU optimized for controlled applications 64 K of external program memory Full duplex UART 12

3.5 BLOCK DIAGRAM OF THE MICROCONTROLLER:

13

3.6 DESCRIPTION OF BLOCK DIAGRAM: 3.6.1 CENTRAL PROCESSING UNIT (CPU):


The microcontroller consists of 8 bit ALU with associated registers like register A, register B,Program status word(PSW),Stack pointer(SP) ,a 16 bit program counter(PC) and a 16 bit data pointer register(DTPR).

3.6.2 ARITHMETIC LOGIC UNIT(ALU):


The ALU performs arithmetic and logic functions on 8 bit variables. An important and unique feature of the microcontroller architecture is that the ALU can manipulate 1 bit as well as 8 bit data types. It performs the Operations over the operands held by the temporary registers TMP1 and TMP2.The temporary registers cannot be accessed by the user.

3.6.3

ACCUMULATOR (ACC):
It is referred to as register A or Acc.It is an 8 bit register. It holds the source

operand and stores the result of arithmetic operations. It is used as the source or destination register for logical operations. It is either explicitly or implicitly specified in the instructions.

3.6.4 B REGISTER:
It is a special function register. It can be used to store one of the operands in multiply and divide instructions. For all other instructions it is used as a scratch pad.

3.6.5 PROGRAM STATUS WORD (PSW):


It is one of the special function registers .It is an 8 bit register. It is a set of Flags that indicate the status of the microcontroller.

CY AC FO RS1 RS0 OV -CARRY BIT (CY):

This bit holds the carry bit in case of arithmetic operations. It also serves the purpose of accumulator in case of Boolean operations. It is set to one when there is a carry out from the D7 bit. It can also be rest or cleared through instructions.

AUXILLARY CARRY (AC):

14

It is used in BCD operations usually. This bit is raised when a carry occurs from lower nibble to the higher nibble during arithmetic operations on BCD numbers.

FLAG 0 (F0):
Flag 0 is available to the user for general purpose.

REGISTER SELECT BITS (RS1 AND RS0):


The two bits RS1 and RS0 are used to select one of the four available register banks As below:

RS1

RS0

REGISTER BANKS

ADDRESS

0 0 1 1

0 1 0 1

0 1 2 3

00H-07H 08H-0FH 10H-17H 18H-1FH

OVERFLOW FLAG (OF):


The overflow flag was created specifically for the purpose of informing the programmer that the result of the signed number operation is erroneous. If the result of an operation on signed numbers is too big for a register, an overflow has occurred and the programmer must be notified.

PARITY (P):
The parity bit reflects the number of 1s in the accumulator. P=0 implies that accumulator contains an even number of 1s. P=1 implies that the accumulator contains odd number of 1s. D1 bit is a user definable flag and is reserved for future use.

3.5.6 SPECIAL FUNCTION REGISTER BANK (SFR):


It is a set of special function registers that can be addressed using their respective addresses allotted to them. The addresses lie in the range 80H-FFH.

3.5.7 INPUT-OUTPUT (I/O) PORTS (P0-P3):

15

These four latches-drivers pairs have been allotted to the four parallel I/O ports. These latches have been allotted addresses in the special function register bank. Using these allotted addresses, the user can communicate with the ports.

3.5.8 BUFFER:
It is a special function register and consists of two registers namely transmit buffer and the receive buffer. The transmit buffer receives data parallely and transmits serially. The receive buffer on the other hand is serial in parallel out register.

3.5.9 TIMING AND CONTROL UNIT:


It derives the timing and control information required for the internal operation of the circuit and the control information required for controlling the external bus.

3.5.10 OSCILLATOR:
It generates the basic timing clock signal required for the operation of the circuit using a crystal oscillator connected externally.

3.5.11 EPROM AND PROGRAM ADDRESS REGISTER:


These blocks provide on chip EPROM and a mechanism to internally address the EPROM.

3.5.12

RAM AND RAM ADDRESS REGISTER:


They provide 128 bytes of RAM and a mechanism to internally address the RAM

3.6

PIN DESCRIPTION OF AT89S52:

16

3.7 Pin Description 3.7.1VCC (PIN 40)


Supply voltage.

3.7.2 GND (PIN 20)


Ground.

3.7.3 Port 0 (PIN 32-39)


Port 0 is an 8-bit open drain 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. Port 0 also receives the code bytes during Flash programming and outputs the code bytes dur-ing program verification. External pull-ups are required during program verification.

3.7.4 Port 1 (PIN 1-8)


Port 1 is an 8-bit bidirectional I/O port 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 inter-nal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. In addition, P1.0 and P1.1 can be configured to be the timer/counter 2 external count input (P1.0/T2) and the timer/counter 2 trigger input 17

(P1.1/T2EX), respectively, as shown in the following table. Port 1 also receives the low-order address bytes during Flash programming and verification.

3.7.5 Port 2 (PIN 21-28)


Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application, Port 2 uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash program-ming and verification. Port Pin Alternate Functions P1.0 T2 (external count input to Timer/Counter 2), clock-out P1.1 T2EX (Timer/Counter 2 capture/reload trigger and direction control) P1.5 MOSI (used for In-System Programming) P1.6 MISO (used for InSystem Programming) P1.7 SCK (used for In-System Programming)

3.7.6 Port 3 (PIN 10-17)


Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins, they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port 3 also serves the functions of various special features of the AT89S52, as shown in the following table.

3.7.7 RST (PIN 9)


Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled.

3.7.8 ALE/PROG (PIN 30)

18

Address Latch Enable (ALE) is an output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. Port Pin Alternate Functions P3.0 RXD (serial input port) P3.1 TXD (serial output port) P3.2 INT0 (external interrupt 0) P3.3 INT1 (external interrupt 1) P3.4 T0 (timer 0 external input) P3.5 T1 (timer 1 external input) P3.6 WR (external data memory write strobe) P3.7 RD (external data memory read strobe)

3.7.9 PSEN (PIN 29)


Program Store Enable (PSEN) is the read strobe to external program memory. When the AT89S52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to exter-nal data memory.

3.7.10 EA/VPP (PIN 31)


External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming.

3.7.11 XTAL1 (PIN 19)


Input to the inverting oscillator amplifier and input to the internal clock operating circuit.

3.7.12 XTAL2 (PIN 18)


Output from the inverting oscillator amplifier.

19

CHAPTER-4
20

DESIGN AND IMPLEMENTATION LIST OF COMPONENTS

4.1 DESIGN AND IMPLEMENTATION

Power supply circuit supplies +5V DC to all the passive components like resistors, capacitors,

IC and Microcontrollers.

PORER SUPPLY

MICRO CONTROLLER

21

4.2. CAPACITORS (a) INTRODUCTION

Fig4.2:Examples of capacitor package

Fig4.3: Electrolytic capacitors

A capacitor or condenser is a passive electronic component consisting of a pair of conductors separated by a dielectric. When a voltage potential difference exists between the conductors, an electric field is present in the dielectric. This field stores energy and produces a mechanical force between the plates. The effect is greatest between wide, flat, parallel, narrowly 22

separated conductors. Capacitors are widely used in electronic circuits to block the flow of direct current while allowing alternating current to pass, to filter out interference, to smooth the output of power supplies, and for many other purposes.

(i)Unpolarised
Unpolarised capacitors don't mind which direction they are charged up from, the potential difference across them can be in either direction.

Fig 4.4: Unpolarised capacitor (ii) Polarised capacitor: Polarised capacitors have a positive and a negative connection, if connected the wrong way round they will leak and often go pop! While not a huge disaster, it does make a mess you will have to clear up and the fluids inside them can be quite nasty so be careful when using them.

Fig 4.5: polarised capacitor

(iv) Capacitors in Parallel

23

Fig 4.7- Capacitors in Parallel When capacitors are connected in parallel (fig 4) their combined capacitance is equal to the individual capacitance added together. For eg: if capacitors C1 and C2 are connected in series their combined resistance, C is given by: C=C1+C2

(v) Capacitors in Series

Fig 4.8: Capacitors in series When capacitors are connected in series (figure 5) their combined resistance is less than any of the individual capacitances. There is a special equation for the combined capacitance of two capacitors C1 and C2: C = (C1C2)/(C1+C2)

4.1.4. RESISTORS
24

Fig 4.10: Resistors


Type Electronic symbol : : passive (Europe) (US)

A resistor is a two-terminal electronic component that produces a voltage across its terminals that is proportional to the electric current through it in accordance with Ohm's law: V = IR Resistors are elements of electrical networks and electronic circuits. The primary characteristics of a resistor are the resistance, the tolerance, maximum working voltage and the power rating. Other characteristics include temperature coefficient, noise, and inductance.

25

CHAPTER-5 POWER SUPPLY


26

POWER SUPPLY 5.1 1N4007: 5.1.1 FEATURES:


Low forward voltage drop High surge current capability

5.1.2 ABSOLUTE MAXIMUM RATINGS:


S Symbol Parameter IO Average Rectified Current 0.375 lead length Value 1.0 Unit A 27

If(surge)

@ TA=750C Peak forward surge current 8.3ms single half-sine-wave Superimposed on rated load Total Device Dissipation Derate above 250C Thermal Resistance, Junction to Ambient Storage Temperature Range Operating Junction Temperature

30

PD RJA Tstg TJ

2.5 20 50 -55 to +175 -55 to +150

W mW/C C/W C C

5.1.3 ELECTRICAL CHARACTERISTICS:


Parameter Peak repetitive reverse voltage Max. RMS Voltage DC Reverse Voltage(Rated VR) Max. Forward @ 1.0A Max. Reverse Current @ rated VR TA=250C TA=1000C Max. Full Load Reverse Current, Full cycle TA=750C Typical Junction Capacitance VR=4.0V,f=1.0MHz 1N4007 1000 700 1000 1.1 5.0 500 30 15 A Pf Units V V V V A

5.1.4 TYPICAL CHARACTERISTICS:

28

5.2 3-TERMINAL 500mA VOLTAGE REGULATOR:(KA7805, KA7812) 5.2.1 FEATURES:


Output current of 500mA 29

Output Voltages of 5V,12V Thermal overload protection Short circuit protection Output transistor Safe Operating Area Protection

5.2.2 DESCRIPTION:

The 3-Terminal Regulator is available in TO-220/D-PAK package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shutdown and safe operating area protection, making it essentially indestructible. If adequate heat sinking is provided, they can deliver 1A output current. Although it is designed as a fixed voltage regulator primarily, the device can be used with external components to obtain adjustable voltages and currents.

5.2.3. INTERNAL BLOCK DIAGRAM:

30

Input SERIES PASS ELEMENT

Output

Current Generator

SOA protection

Starting circuit

Reference voltage

Error Amplifier

Thermal protection

Gnd

5.2.4 ABSOLUTE MAXIMUM RATINGS:


PARAMETER Input voltage (for V0=5V,12V) Thermal resistance junction- Cases (T0-220) Thermal resistance junction- Air (T0-220) Operating Temperature Range Storage TemperatureRange SYMBOL I JC JA OPR STG VALUE 5 5 ~ + 125 55 ~ +125 UNIT C/W C/W C C

31

5.2.5 ELECTRICAL CHARACTERISTICS OF 7805 REGULATOR:


Parameter Output voltage Y Symbol C Conditions V 0 T J=+250C 5mAI01A, T yp. Max. U . Min 4. 8 5. 0 5. 2 4. 75 5. 0 5. 25 4. 0 1 00 1. 6 50 9 4 5. 0. 0. 4 7 0 03 3 0.8 2 3 1 00 MV 5 0 8. 0 0. 5 1. 3 MA Ma MV/C V/V0 D B V MA A V Unit

L Line Regulation

P 015W,V1=7V to 20V R Regline T J =250CV0=7V to 25VV I=8V to 12V 2 Regload T J=250C I0 =5mA to 1.5mA I0=250mA t -

mV

L Load Regulation

Quiescent Current QuiescentCurrent Change O Output voltage drift O Output noise voltage R Ripple Rejection

Q IQ

V VO/T I VN F RR F

o 750mA J=+250C D =5mA to 1A I=7V to 25V 0=5Ma NO=10Hz to 10kHz R=120Hz 0=8V to 18V 0=1A,TJ=+25C I=35V,TA=25C J=25C

6 2 -

V Dropout voltage VDrop I Short Circuit Current ISC V Peak current I PK T

2 2 30 2. 2 -

5.2.6 ELECTRICAL CHARACTERISTICS OF 7812 REGULATOR:


Parameter Output voltage Symbol Conditions V0 T J=+25C 5mAI01A, P 015W,V1=7V to 20V Regline TJ=25CVO=14.5V to 30V V I=16V Load Regulation Regload TJ=25C o2V I0=5mA to 1. 5mA Min. T Typ. Max Unit 11.5 1 2.0 12.5 V 11.4 1 2.0 12.6 10.0 2 40 MV 3 .0 11 120 240 MV 32

Line Regulation

I Quiescent Current I 0 Quiescent Current Change IQ Output voltage drift Output noise voltage Ripple Rejection Dropout voltage Short Circuit Current Peak current

0=250mA 5 5 -

5. 0 5 .1 0. 1 0 .5 -1 7 6 71

120 8 .0 mA 0. 5 mA 1. 0 mV/C V/V0 DB V mA A

to 750mA TJ=+25C I0=5mA to 1A V I=14.5V to 30V V0/T I0=5mA VN F=10Hz to 10kHz RR F=120Hz V0=15V to 25V VDrop I0=1A,TJ=+25C ISC VI=35V,TA=25C IPK T J=25C

2 2 30 2.2 -

5.2.7 TYPICAL PERFORMANCE CHARACTERISTICS:

fig. peak output current

33

Fig: output voltage

5.3 BC 547 TRANSISTOR:

34

5.3.1 GENERAL DIAGRAM:

Collector 1

Base 2

3 Emitter

5.3.2 MAXIMUM RATINGS:


Rating Collector-Emitter voltage Collector-Base voltage Emitter-Base voltage Collector current continuous Total device Dissipation @TA=25C Derate above 25C Symbol BC547 VCE0 45 VCB0 50 VEB0 6.0 Ic 100 PD 625 50 Unit Vdc Vdc Vdc MAdc mW mW/C

5.3.3 THERMAL CHARACTERISTICS:


Characteristics Thermal resistance, junction to ambient Thermal resistance, junction to case Symbol Max. Unit R_JA 2 00 C/W R_JC 8 3.3 C/W

35

5.3.4 ELECTRICAL CHARACTERISTICS: 1. OFF CHARACTERISTICS:


Characteristic Collector-emitter breakdown voltage ( IC=1.0mA,IB=0) Collector-base breakdown voltage ( IC=100A dc) Emitter-base breakdown voltage ( IE=10A,IC=0) Collector cutoff current (VCE=50V,VBE=0) (VCE=30V,TA=125C) 4.0 A V(BR)EB0 ICES 6.0 0.2 15 V nA Symbol Min. Typ. Max. Unit V(BR)CE0 45 V V(BR)CB0 50 V

2. ON CHARACTERISTICS:
Characteristic D current gain ( IC=2.0mA,VCE=5.0V) Collector-emitter saturation voltage ( IC=10mA,IB=0.5mA) ( IC=100mA,IB=5.0mA) ( IC=10mA) Base-emitter On voltage ( ( IC=2.0mA,VCE=5.0V) IC=10mA,VCE=5.0V) Base-emitter saturation voltage VBE(sat) IBE(on) 0.550 0.70.7 0.77 V Symbol hFE Min. Typ. 1 10 Max. Unit 800 V 0.09 0.2 0.3 0.25 0.6 0.6 V

VCE(sat) -

3. SMALL CHARACTERISTICS: Characteristic Current gain Band Width Product ( IC=10mA,VCE=5.0,f=100Mhz) 36 Symbol Min. Typ. Max. Unit fT 150 300 MHz

Output capacitance (VEB=0.5V,IC=0,f=1.0Mhz) Input capacitance (VEB=0.5V,IC=0,f=1.0Mhz) Small signal current gain ( IC=2.0mA,VCE=5.0V,f=1.0khz) Noise Figure (IC=0.2mA,VCE=5.0V,Rs=2K, F =1.0khz,f=200hz)

Cobo Cibo Hfe NF -

1. 7 10 -

4.5

pF pF

1252 .0

90010 dB

5.4 POWER SUPPLY

VIN (ac)

VIN (ac)

2 | | | | | | |

3 | | | | | | |

Regulator 4 |
1 2 3 | | | | | |

Vout (dc)

5.4.1 OPERATION:
. The input voltage to the diodes 1 and 2 is supplied from a transformer and is equal to the peak AC voltage of the secondary winding of the transformer as shown in graph 1. . The circuit consisting of the combination of the two diodes is called full wave rectifier and the output of this is graph 2 which contains high ripple. 37

. These diodes combined with a capacitor are known as full wave rectifier with a capacitor. . This capacitor is known as filtering capacitor improves the output of the rectifier considerably and the output of this stage is shown in graph 3. . The efficiency of this rectifier is 81.2%. . The resistor is used to limit the voltage and current those are supplied to the regulator in order to avoid the regulator from getting damaged. . The diode 3 is used to protect the diodes 1 and 2 from the back current discharged by the capacitor. . The output at this point is not completely regulated since there is still some amount of ripple present in the rectified voltage. . Therefore a regulator is used to ensure low voltage ripple and excellent load and line voltage regulation. . The graph 4 gives the output of the regulator and this voltage is 99.9% regulated. . The resistor after the regulator is used to limit the current supplied to the LED. .When the voltage supplied is greater than 3.8V, the LED will glow. . The regulated DC voltage output is taken across the capacitor and is further supplied to other applications.

5.4.2 OUTPUT AT DIFFERENT STAGES OF THE POWER SUPPLY:


Voltage 1

3 T 38

4 T

CHAPTER-6
KEIL VISION3 SOFTWARE

39

6. KEIL VISION3 SOFTWARE 6.1 VISION3 OVERVIEW :


The Vision3 IDE is a windows based software development platform that combines a robust editor, project manager, and integrated make facility. Vision3 integrates all tools including the C compiler, macro assembler, linker/locator, and HEX file generator. Vision3 helps expedite the development process of our embedded applications by providing the following: Full-featured source code editor Device database for configuring the development tool setting Project manager for creating and maintaining our projects Integrated make facility for assembling, compiling, and linking our embedded applications Dialogs for all development tool settings True integrated source level Debugger with high-speed CPU and peripheral simulator Advanced GDI interface for software debugging in the target hardware and for connection to Keil ULINK Flash programming utility for downloading the application program into Flash ROM Links to development tools manuals, device datasheets and users guides .In the Build Mode, we maintain the project files and generate the application. In the Debug Mode, we verify our program either with a powerful CPU and peripheral 40

simulator or with the Keil ULINK USB-JTAG Adapter (or other AGDI drivers) that connect the debugger to the target system. The ULINK allows us also to download our application into Flash ROM of our target system.

6.2 FEATURES and BENEFITS:


Feature Benefit The Vision3 Simulator is the only Write and test the application code before production Debugger that completely simulates all hardware is available. Investigate different hardware on-chip peripherals. configurations to optimize the hardware design. Simulation capabilities may be expanded Sophisticated systems can be accurately simulated by using the Advanced Simulation Interface adding our own peripheral drivers. (AGSI). The Code Coverage feature of the Safety-critical systems can be thoroughly tested and Vision3 Simulator provides analysis of validated. Execution analysis reports can be viewed our programs execution. The Vision3 Device and printed for certification requirements. Database Mistakes in tool settings are practically eliminated

automatically configures the development and tool configuration time is minimized. tools for the target micro controller. The Vision3 IDE integrates additional Quickly access development tools and third-party third-party tools like VCS, CASE, and tools. All configuration details are saved in the FLASH/Device Programming. Vision3 project. Identical Target Debugger and Simulator Shortens our learning curve. User Interface. Vision3 incorporates project manager, Accelerates application development. While editing, editor, and debugger in a single we may configure debugger features. While environment. debugging, we may make source code modifications.

41

6.3 ENVIRONMENT:
The Vision3 screen provides us with a menu bar for command entry, a tool bar where we can rapidly select command buttons, and windows for source files, dialog boxes, and information displays. Vision3 lets us simultaneously open and view multiple source files. Vision3 has two operating modes:

6.3.1 BUILD MODE:


Allows us to translate all the application files and to generate executable programs. The features of the Build Mode are described under Creating Applications. 6.3.2 DEBUG MODE: Provides us with a powerful debugger for testing our application. The Debug Mode is described in Testing Programs. In both operating modes we may use the source editor of Vision3 to modify our source code. The Debug mode adds additional windows and stores an own screen layout. The following picture shows a typical configuration of Vision3 in the Debug Mode.

42

The tabs of the Project Workspace give us access to: Files and Groups of the project. CPU Registers during debugging. Tool and project specific on-line Books. Text Templates for often used text blocks. Function in the project for quick editor navigation. The tabs of the Output Window provides: Build messages and fast error access; Debug Command input/output console; Find in Files results with quick file access. The Memory Window gives access to the memory areas in display various formats. The Watch and Call Stack Window allows us to review and modify program variables and displays the current function call tree. The Workspace is used for the file editing, disassembly output, and other debug information. 43

The Peripheral Dialogs help us to review the status of the on-chip peripherals in the microcontroller.

6.4 SOFTWARE DEVELOPMENT LIFE CYCLE:


When you use the Keil Vision3, the project development cycle is roughly the same as it is for any other software development project. 1. Create a project, select the target chip from the device database, and configure the tool settings. 2. Create source files in C or assembly. 3. Build our application with the project manager. 4. Correct errors in source files. 5. Test the linked application.

The following block diagram illustrates the complete Vision3 software development cycle. Each component is described below.

44

Vision3 IDE with editor and make

C Compiler

Macro Assembler

C Library

Library Manager

User Library

Library/ Locator

Vision3 Debugger

Third party Emulator

CPU and peripheral interfacing

Keil ULINK JTAG Adapter

AGDI Target Interface

6.4.1 VISION3 IDE:


The Vision3 IDE combines project management, a rich-featured editor with interactive error correction, option setup, make facility, and on-line help. Use Vision3 to create our source files and organize them into a project that defines our target application. Vision3 automatically

45

compiles, assembles, and links our embedded application and provides a single focal point for our development efforts.

6.4.2 C COMPILER & MACRO ASSEMBLER:


Source files are created by the Vision3 IDE and are passed to the C or EC++ Compiler or Macro Assembler. The compiler and assembler process source files and create re-locatable object files.

6.4.3 LIBRARY MANAGER:


The library manager allows us to create object library from the object files created by the compiler and assembler. Libraries are specially formatted, ordered program collections of object modules that may be used by the linker at a later time. When the linker processes a library, only those object modules in the library that are necessary to create the program are used.

6.4.4 LINKER/LOCATOR:
The Linker/Locator creates an executable program file using the object modules extracted from libraries and those created by the compiler and assembler. An executable program file (also called absolute object module) contains no re-locatable code or data. All code and data reside at fixed memory locations. This executable program file may be used: To program an Flash ROM or other memory devices, With the Vision3 Debugger for simulation and target debugging, With an in-circuit emulator for the program testing.

6.4.5 VISION3 DEBUGGER:


The Vision3 symbolic, source-level debugger is ideally suited for fast, reliable program debugging. The debugger includes a high-speed simulator that let us simulate a microcontroller system including on-chip peripherals and external hardware. The attributes of the chip you use are automatically configured when we select the device from the Device Database. 46

The Vision3 Debugger provides several ways for us to test our programs on real target hardware. Use the Keil ULINK USB-JTAG adapter for Flash downloading and software test of our program via on-chip debugging system like the Embedded ICE macro cell that is integrated in many ARM devices.

Use the AGDI interface to attach use the Vision3 Debugger front end with our target system using other debuggers like Monitor, In-System Debugger, or Emulator.

6.5 USER INTERFACE:


The Vision3 User Interface consists of menus, toolbar buttons, keyboard shortcuts, dialog boxes, and windows that you use as you interact with and manage the various aspects of your embedded project. The menu bar provides menus for editor operations, project maintenance, development tool option settings, program debugging, external tool control, window selection and manipulation, and on-line help. The toolbar buttons allow you to rapidly execute Vision3 commands. A Status Bar provides editor and debugger information. The various toolbars and the status bar can be enabled or disabled from the View Menu commands. Keyboard shortcuts offer quick access to Vision3 commands and may be configured via the menu command Edit-Configuration-Shortcut key. The following sections list the Vision3 commands that can be reached by menu commands, toolbar buttons, and keyboard shortcuts. The Vision3 commands are grouped mainly based on the appearance in the menu bar: File Menu and File Commands Edit Menu and Edit Commands View Menu Project Menu and Project Commands Debug Menu and Debug Commands 47

Peripherals Menu

6.5.1. FILE MENU AND COMMANDS:

File Menu New... Open Close Save Save as... Save All Device Database License Management Print Setup... Print Print Preview 1 .. 10 Exit

Tool bar Short cut Description Ctrl+N Ctrl+O Ctrl+S Create a new source or text file Open an existing file Close the active file Save the active file Save and rename the active file Save all open source and text files including project and the active file Maintain the Vision3 device database Maintain and review the installed software components Setup the printer Print the active file Display pages in print view Open the most recent used source or text files Quit Vision3 and prompt for saving files

Ctrl+P

6.5.2 PERIPHERALS MENU:


Menu Item Reset Sets CPU to reset state. Interrupts Opens dialog for the interrupt controller. I/O Ports 48

CPU

Opens dialogs for the on-chip I/O Ports. Serial Opens dialogs for the on-chip Serial Port. Timer Opens dialogs for the on-chip Timers/Counters. Watchdog Opens dialogs for the on-chip Watchdog Timer. A/D D/A Converter Converter Opens dialogs for the on-chip Analog to Digital Converter. Opens dialogs for the on-chip Digital to Analog Converter. IC Opens dialogs for the on-chip IC Controller. CAN Opens dialogs for the on-chip CAN Controller. Controller Controller

6.6 CREATING APPLICATIONS:

Create a Project: explains the steps required to setup a simple application and to generate HEX output. Project Target and File Groups: shows how to create application variants and organized the files that belong to a project. Tips and Tricks: provides information about the advanced features of the Vision3 Project Manager.

49

6.6.1 CREATE A PROJECT:


Vision3 includes a project manager which makes it easy to design applications for an ARM based microcontroller. We need to perform the following steps to create a new project: Create Project file and Select CPU Project Workspace-Books Create New Source Files Add Source Files to the Project Create Files Groups Set tool Options for Target Hardware Configure the CPU Start-up Code Build Project and Generate Application Program Code Create a HEX File for PROM Programming

6.6.2 Description: Create Project file and Select CPU:


To create a new project file, go to the Vision3 menu and select Project New Vision Project. The Create New Project dialog asks us for the new project file name. At this time navigate to the folder where our new project will reside. It's a good idea to use a separate folder for each project. Use the icon Create New Folder in this dialog to create a new empty folder. Select this folder and enter the file name for the new project, i.e. Project1. Vision3 creates a new project file with the name PROJECT1.UV2 which contains a default target and file group name. We can see these names in the Project Workspace Files.

Select Microcontroller from Device Database:


When we create a new project Vision3 asks us to select a CPU for our project. The Select Device dialog box shows the Vision3 device database. Just select the microcontroller you use. For the example in this chapter we are using the Philips LPC2106 controller. This selection sets necessary tool options for the LPC2106 device and simplifies the tool configuration. 50

Copy and Add the CPU Start-up Code:


An embedded program requires CPU initialization code that needs to match the configuration of our hardware design. This Start-up Code depends also on the tool chain that we are using. Since we might need to modify that file to match our target hardware, the file should be copied to our project folder. For most devices, Vision3 asks us to copy the CPU specific Start-up Code to your project. This is required on almost all projects (exceptions are library projects and add-on projects). The Start-up Code performs configuration of the microcontroller device and initialization of the compiler run-time system. Therefore we should answer with YES to this question.

Add Source Files to Project:


Once we have created our source file we can add this file to our project. Vision3 offers several ways to add source files to a project. For example, we can select the file group in the Project Workspace Files page and click with the right mouse key to open a local menu. The option Add Files opens the standard files dialog. Select the file MAIN.C we have just created.

51

Setting Tool Options:

Vision3 lets us set options for your target hardware. The dialog Options for Target opens via the toolbar icon or via the Project Options for Target menu item. In the Target tab you specify all relevant parameters of your target hardware and the on-chip components of the device we have selected. The following dialog shows the settings for our example.

52

Configure Start-up Code:


The CPU Start-up Code (on most ARM targets the file name is Startup.S) may be open from the Project Workspace Files Tab. Most start-up files have embedded comments for the Vision3 Configure Wizard which provides menu driven selections.

53

The default settings of the Start-up Code give a good starting point on most single chip applications. However you need to adapt the configuration for your target hardware. CPU/PLL clock and BUS system is target specific and cannot be automatically configured. Some devices provide options to enable or disable on-chip components (for example on-chip xdata RAM on 8051 variants).We must ensure that the settings in the start-up file match the other settings in your project. The button Edit as Text opens the Start-up Code in a standard editor window and allows us to review the source code of this file. Build a Project:

Typically, the tool settings under Options Target are all we need to start a new application. We may translate all source files and link the application by clicking on the Build Target toolbar button.

54

When we build an application, Vision3 displays errors, warnings, and any other messages in the Output Window Build page. Double-click on a message to open the corresponding source file. After building the project, may: Modify existing source code or add new source files to the project. The Build Target toolbar button translates only modified or new source files and generates the executable file. Vision3 maintains a file dependency list and knows all include files used within a source file. Even the tool options are saved in the file dependency list, so that Vision3 rebuilds files only when needed. With the Rebuild Target command, all source files are translated, regardless of modifications. Test Programs with Vision3 Debugger: The Vision3 Debugger offers two operating modes: simulator that allows you to verify your application on our PC, or Target Debugging with an Evaluation Board or our hardware platform Program your application into Flash ROM. Vision3 integrates command-line driven Flash Utilities or can use the ULINK USB-JTAG Adapter for Flash programming. We may need to create a HEX file to use Flash programming utilities.

Create HEX File:


Once we have successfully generated our application we can start debugging. After we have tested our application, it is required to create an Intel HEX file to download the software into an EPROM programmer or simulator. Vision3 creates HEX files with each build process when Create HEX file under Options for Target Output is enabled. The FLASH Fill Byte, Start and End values direct the OH166 utility to generate a sorted HEX files; sorted files are required for some Flash programming utilities.

55

We may start our PROM programming utility after the make process when us specify the program under the option User Run User Program #1 as explained under Start ExternalTools

6.7 PROJECT TARGETS AND FILE GROUPS:


By using different Project Targets Vision3 lets us create several programs from a single project. We may need one target for testing and another target for a release version of your application. Each target allows individual tool settings within the same project file. Files Groups let us group associated files together in a project. This is useful for grouping files into functional blocks or for identifying engineers in our software team. We have already used file groups in our 56

example to separate the CPU related files from other source files. With these techniques it is easily possible to maintain complex projects with several 100 files in Vision3. The dialog Project-Components, Environment, Books-Project Components allows us to create project targets and file groups. We have already used this dialog to add system configuration files in a file group. An example project structure is shown below.

The Project Workspace shows all groups and the related files. Files are built and linked in the same order as shown in this window. You can move file positions with Drag & Drop. We may select a target or group name and Click to rename it. The local menu opens with a right mouse Click and allows you for each item: to set tool options to remove the item to add files to a group to open the file.

In the build toolbar you can quickly change the current project target to build.

57

6.7.1 TIPS AND TRICKS:


The following section discusses advanced techniques we may use with the Vision3 Project Manager. Start External Tools after Build Process shows how to execute programs after a successful build command which is useful for post-processing as required for symbol information by some emulators or programmers. Specify a Separate Folder for Listing and Object Files lets us direct the object and listing files of your project to specific folders. Use a CPU that is not in the Vision Device Database explains how to define new Devices that can be selected from the Device Database. Create a Library File gives us the tool setup that is required for creating library files. File Extensions allows us to set the file extension for the various file types of a project. Import Project Files from Vision Version 1 explains you how to import existing Vision Version 1 *.PRJ files. Version and Serial Number Information allows you to view project specific tool version information.

58

File and Group Specific Options are set via Options for ... in context menu that opens via a right

mouse click on an item in the Project Workspace. Options for ... provides the following configuration options: Properties Dialog allows us to set file and group specific options. Include Always specific Library Modules specify library modules that should be always included in a project. Use a Custom Translator shows how to pre-process files with a custom specific translator. Different Compiler and Assembler Settings allows us to change tool options for a file group or even a single file.

6.8 DEBUG FUNCTIONS:


We use Debug Functions to: Extend the capabilities of the Vision3 Debugger. Generate external interrupts, Log memory contents to a file,

59

Update analog input values periodically, Input serial data to an on-chip serial port,

6.9 SIMULATION:
The Vision3 Debugger incorporates a C script language you can use to create Signal Functions. Signal functions let us simulate analog and digital input to the microcontroller. Signal functions run in the background while Vision3 simulates our target program. The Vision3 simulator simulates the timing and logical behaviour of serial communication protocols like UART, IC, SPI, and CAN. But Vision3 does not simulate the I/O port toggling of the physical communication pins on the I/O port.To provide fast simulation speed and optimum access to communication peripherals, the logic behaviour of communication peripherals is reflected in virtual registers that are listed with the DIR VTREG command. This has the benefit that we can easily write debug functions that stimulate complex peripherals.

CHAPTER-7
60

CODE

CODE 11.1 CODE FOR THE TRANSMITTER:


$MOD51 ORG 00H MOV P1,#0FFH MOV P2,#00H MOV P3,#0FFH MOV P0,#00H BACK:MOV A,P1 MOV P0,A

61

JNB P3^0,L1 JNB P3^1,L2 JNB P3^2,L3 JNB P3^3,L4 JNB P3^4,L5 JNB P3^5,L6 JNB P3^6,L7 JNB P3^7,L8 SJMP BACK L1:MOV P2,#10H SJMP BACK L2:MOV P2,#20H SJMP BACK L3:MOV P2,#30H SJMP BACK L4:MOV P2,#40H SJMP BACK L5:MOV P2,#50H SJMP BACK L6:MOV P2,#60H SJMP BACK L7:MOV P2,#70H SJMP BACK L8:MOV P2,#80H SJMP BACK END

62

LCD code

63

CHAPTER-8
TESTING

TESTING THE CIRCUIT 8.1 BASIC TESTS:


It is essential to conduct certain preliminary tests prior to testing the software to prevent the damage of the electronic components.

8.1.1 CHECKING THE POWER SUPPLY:


The power supply circuit is expected to produce a constant dc power supply of 5V (or 12V).The magnitude of the dc voltage given by the circuit depends upon the voltage regulator used. To test the circuit, a 9-0-9 step down transformer (12-0-12V) is used. The primary is connected to 230V AC and the secondary is connected to the full wave rectifier part of the circuit. Upon switching 64

on of the mains, the LED must glow and the voltage across the output terminals must show 5V (or 12V). 8.1.2 CHECKING THE ICs: The pins of various ICs used are to be checked properly for their default status in order to ensure smooth functioning. The power supply is connected to the chips and voltages across corresponding pins are checked using a digital multimeter.By default, the input ports of the microcontroller are configured to 1 and the output ports are configured to 0. When the microcontrollers havent been connected, the address and data pins of the encoder and decoders default to 0. 8.1.3 CHECKING THE WORKING OF APPLICATION DEVICES: After all the previously mentioned tests have been successful and the code has been developed, the application specific codes are dumped into the transmitter and receiver microcontrollers respectively. The power supply is switched on and the application is tested for several test cases.

8.1.4 TROUBLESHOOTING:
1) 2) 3) 4) If the circuit doesnt function as expected, check the Vcc and Ground connections. Also While designing the circuit, take into account the specifications of all the components used. Use limiting resistors, capacitors, protection diodes etc wherever possible to avoid damage of the other components. Check if the code has been dumped in the microcontroller properly or not, by checking the buffer in the SUPER-PRO software. check for short connections if any.

65

66

CHAPTER-9
CONCLUSION

CONCLUSION
In this prototype project we designed in such a way that, with the help of robot we pick the object from the place and place the object at the destination. This sort of robot is very much useful in the case of industries like where the pick and place job is carried on continuously for example in biscuit company, dairy form etc., this project is also helpful in minimizing the man power and complete the job automatically and accurately.

13.1 FUTURE SCOPE:

67

With increased complexity, this device can be successfully used in any environment where automation is desired. With the future production scheme already taken into consideration, operation to return to the origin is no more necessary. Adoption of the completely absolute system for all models enables quick return for production. There robots are now indispensable at the production site for higher speed production and reduction of loss time. As these models have a very rigid frame and highly accurate positioning function, they can cope with higher level applications.

68

APPENDIX

APPENDIX BIBLIOGRAPHY REFERENCE BOOKS: 69

8051 MICROCONTROLLERS AND EMBEDDED SYSTEMS- MAZIDI & MAZIDI ADVANCED MICROPROCESSORS AND PERIPHERALS- RAY AND BHURCHANDI REFERENCE SITES: www.keil.com www.wisegeek/microcontroller.com www.wikipedia.com www.mytutorialcafe.com www.avrfreaks.com www.softpedia.com www.rfsolutions.co.uk www.freewebs.com www.tpub.com www.electronics4u.com www.ipic.co.jp www.electronics.howstuffworks.com www.consumer.phillips.com www.amazon.co.uk www.directron.com www.remotecontroltechnology.com www.zilog.com www.atmel.com

70

You might also like