. 1 .E.SIVA SANKAR B. which made the project a great success.I.T.I.S.. N.Sc. B. Department of Electronics and Communication Engineering.. M. constant encouragement and support in right ways to carry out our project work successfully.With deep sense of gratitude.E.. M. who systematically guided us and also gave sustained guidance. With great pleasure we express our sincere thanks to all the faculty members and Department for their kind and patient support which enabled us and wielded the essential goal at right junctures to render in completing this project. for providing us all the facilities in the college for completing our project effectively.. We also thank all our Department staff members for their co-operation. P.E.E. It is a matter of immense pleasure to express our deep profound sense of heartfelt thanks to our project guide Mr. Department of electronics and communication Engineering. timely suggestion. M. senior Lecture. S . We wish to express our of gratitude and grateful thanks to our Head of Department Mrs.. support and active participation.E. total commitment and support in all ways which paved the way for successful completion of our project. RAJAN B. for her valuable guidance.T.T. M.E. we acknowledge our thanks to our principal Prof.Tech. valuable suggestions. TAMILMANI B.S.


here automated track following robot was developed to reduce the work thing’s like don’t need need to be operated by man. In our system we are using the “PIC16F877A” microcontroller as the decision making device of the system.Today we have many kind of robots with pick and placement capablities are commenly used in manufacturing plants.By this method just a track on the ground is enough to control the movements of the robot. 2 .To sense the track IR transmitter and receiver with the frequency and ranges from 1 to5 cm is used. The track on the ground is sensed using the IR sensor whether the robot is on white or black and the IR pair send's the corresponding signal’s to the pic microcontroller and using motordriver the motor is controlled.




4 1.closed-loop system.1GENERAL EMBEDDED SYSTEMS: .the control system used must sense the line and manoeure the robot to stay on course while constantly correcting the wrong moves using feedback mechanisam. a track following robot is a self operating robot that detects and follows a line drawn on the floor.The path to be taken is indicated by a white line on a black surface. Basically.The main aim of our project is to design automated track following robot that detects and follows a line drawn on the floor. The track on the ground is sensed using the IR sensor whether the robot is on white or black and the IR pair send's the corresponding signal’s to the pic microcontroller and using motordriver the motor is controlled.

An embedded system is not a computer system that is used primarily for processing. Examples personal Digital Assistant and Mobile phones etc.Bit controllers used with OS. Access Control. E. autonomous. realtime control system. operating on diverse physical variables and in diverse environment and sold into a competitive and cost conscious market. Mankind.Bit controllers used with an minimal operating systems and hardware layout designed for the specific purpose. . software driven. • Environment connected to systems through sensor. actuators and other I/O interfaces. Lower end embedded systems – Generally 8 and16. Examples small controllers and devices in our everyday life like washing machine. A system is a part of the world that a person or group of persons during some time interval and for some purpose choose to regard as a whole. consisting of interrelated components. Body. or control an external environment. An embedded system is a microcontroller-based. each component characterized by properties that are selected as being relevant to the purpose. • Embedded system is a combination of hardware and software used to achieve a single specific task. etc. not a traditional business or scientific application. reliable. • Embedded system must meet timing & other constraints imposed on it by environment. microwave ovens. High-end embedded & lower end embedded system. not a software system on pc or UNIX. High-end embedded system – Generally 32 and 64.A system is something that maintains its existence and functions as a whole through the interaction of its parts. or human or network interactive.g. where they are embedded in. • Embedded systems are computer systems that monitor respond to.

Filter 3. It consists of four blocks. 2. They are 1. Though DC power needed. Voltage regulator The block diagram of power supply unit is shown in the figure 1 below .5 1. can be obtained from secondary storage batteries for the working of such devices.2 INTRODUCTION: For the working of the electronic equipments and circuits. So to get the required DC power supply for electronic equipments a power supply unit is needed. Battery 2. Regulator unit. DC power supply is needed.2POWER SUPPLY 1.Suitable power supply is necessary for the correct operation of electronic equipments.

Miniature cells are used to power devices such as hearing aids and wristwatches. which are designed to be used once and discarded. which are designed to be recharged and used multiple times. and secondary batteries (rechargeable batteries). .2.2BLOCK DIAGRAM The block diagram contains the parts of typical power supply and voltage at various points in the units is shown in the Figure1 i) BATTERY The figure of 6v battery is shown in the figure 2 An electrical battery is one or more electrochemical cells that convert stored chemical energy into electrical energy. Since the invention of the first battery in 1800 by Alessandro Volta. There are two types of batteries: primary batteries (disposable batteries).6 1. larger batteries provide standby power for telephone exchanges or computer data centers. batteries have become a common power source for many household and industrial applications.

the output gets affected. As and then the AC voltage changes. This pulsating is unidirectional current may be considered as a constant amplitude direct current with an AC component (ripple) super imposed on it. Filters are used to remove or reduce the unwanted ripple voltage bypassing them to ground. 8 . Thus this can be successfully reduced here. The output voltage is maintained irrespective of the fluctuations in the input AC voltage. The regulators are mainly classified for low voltage and for high voltage. The ripple cause hum and it is undesirable.7 ii) REGULATOR UNIT: Regulator regulates the output voltage to be always constant. Also when the internal resistance of the power supply is greater than 30 ohms. So filter circuit consists of either inductor or capacitor connected in series and parallel to the circuit. The filter is used to smoothen the voltage. the DC voltage also changes. Thus to avoid this regulators are used. Further they can also be classified as: ii) FILTER: The output of the filter is unidirectional pulse.

Though there are variations in load current or in supply voltage within specified limits.iii) VOLTAGE REGULATOR: A voltage regulator is normally connected between the filter and load. The regulator circuit is to maintain nearly constant output voltage. . The output voltage of rectifier circuit changes with the variations in the load current or supply voltage. To keep the constant output voltage regulated circuits connected in the output of the rectifier circuit.

The 40-pin parts posses virtually the same array of features as the 40/44-pin parts but are housed in a smaller package and are supported by eleven fewer input/output (I/O) lines. Hence apart from CPU such a single chip microcontroller will therefore contains its own clock generator and some amount of ROM or EPROM. USART. For many years this market was dominated by 4-bit controllers i. More recently. Peripheral Interface controller. has been coined by microchip Technology to identify its single chip microcontroller. RAM and I/O ports on the same chip. These devices have been phenomenally successful in market place.9 1. It may also have other features like timer/ (DIP) packages and surface mount packages. PWM. These microcontroller are a available with a range of capabilities.. PIC controllers possess an array of features that make them attractive for a wide range of applications. 8-bit controllers have come to dominate in the market i.e. packaged in both dual. on the chip.3PIC MICROCONTROLLER: INTRODUCTION: A single chip microcontroller is obtained by integrating all the components of a microcontroller in one IC package. The term PIC. fragmented among dozens of manufactures.e. . by controllers that dealt with data 4-bit at a time. A/D etc.

But the typical 8-bit microprocessor based system. Both 8085 and Z80 system need some additional circuits to make a microprocessor system. Microcontrollers were developed to meet a need for microprocessors to be put into low cost products. I/0. a single-chip computer. or embedded in.10 MICROCONTROLLERS A microcontroller is a complete microprocessor system built on a single Ic. or events. . if you prefer. such as Toys. TIMERS. Today microcontrollers are very commonly used in wide variety of intelligent products. because the microprocessor is a natural way to implement many products. Most frequently they are called microcontroller because they are used they are used to perform control functions. or. Microcontroller also called "system on a chip" or "single chip microprocessor system" or "computer on a chip". which use the microprocessor's power to implement their function. and Serial transmission circuits. such as one using a Z80 and 8085 is expensive. For example most personal computers keyboards and implemented with a microcontroller. A microcontroller is a Computer-On-A-Chip. and also SERIAL PORTS. Another term to describe a microcontroller is embedded controller. The microcontroller contains full implementation of a standard MICROPROCESSOR. the devices they control. Even though a product design may requires only very simple system. Microwave Ovens. and controller tells you that the device' might be used to control objects. This could be called microcomputer. Many low cost products. It replaces Scanning. Electric Drills. VCR and a host of other consumer and industrial products are based on microcontrollers. ROM. Debounce. CLOCK. Building a complete microprocessor system on a single chip substantially reduces the cost of building simple products. the parts needed to make this system as a low cost product. Matrix Decoding. processes. Micro suggests that the device is small. To solve this problem microprocessor system is implemented with a single chip microcontroller. because the microcontroller and its support circuits are often built into. as all the major parts are in the IC. RAM.

1 gives details about the specifications of PIC 16F877.2 shows the complete pin diagram of the IC PIC 16F877. Table 2. 12 . Fig 2.1 ARCHITECTURE OF PIC 16F877: The complete architecture of PIC 16F877 is shown in the fig 3.11 1.3.

3.TABLE SPECIFICATIONS DEVICE PIC 16F877 PROGRAM FLASH DATA DATA MEMORY MEMORY EEPROM 8K 368 Bytes 256 Bytes 1.2 PIN DIAGRAM OF PIC 16F877 The pin details of PIC 16f877 is shown in the figure 4 .


This buffer is a Schmitt Trigger input when configured as general purpose I/O and a TTL input when used in the Parallel Slave Port mode (for interfacing to a microprocessor bus).14 Legend: I = input O = output I/O = input/output P = power = Not used TTL = TTL input ST = Schmitt Trigger input Note: 1. 3. . This buffer is a Schmitt Trigger input when configured as an external interrupt. This buffer is a Schmitt Trigger input when used in serial programming mode. 2.

e. This is performed by clearing bit RBPU (OPTION_REG<7>).. . put the corresponding output driver in a hi-impedance mode. RB3/PGM. The corresponding data direction register is TRISB. put the contents of the output latch on the selected pin. put the corresponding output driver in a Hi-impedance mode. Setting a TRISB bit (=1) will make the corresponding PORTB pin an input. The alternate functions of these pins are described in the Special Features Section. when a peripheral is enabled. Clearing a TRISB bit (=0) will make the corresponding PORTB pin an output. i.. This buffer is a Schmitt Trigger input when configured in RC oscillator mode and a CMOS input otherwise. Three pins of PORTB are multiplexed with the Low Voltage Programming function. PORTB AND TRISB REGISTER: PORTB is an 8-bit wide bi-directional port. i. i. 15 I/O PORTS: Some pins for these I/O ports are multiplexed with an alternate function for the peripheral features on the device. The weak pull-up is automatically turned off when the port pin is configured as an output. PORTA AND THE TRISA REGISTER: PORTA is a 6-bit wide bi-directional port.e. The pull-ups are disabled on a Power-on Reset. that pin may not be used as a general purpose I/O pin.. Setting a TRISA bit (=1) will make the corresponding PORTA pin an input.4. RB6/PGC and RB7/PGD. A single control bit can turn on all the pull-ups. The corresponding data direction register is TRISA. Additional Information on I/O ports may be found in the IC micro™ Mid-Range Reference Manual.e. Clearing a TRISA bit (=0) will make the corresponding PORTA pin an output. Each of the PORTB pins has a weak internal pullup. i. In general. put the contents of the output latch on the selected pin..e.

When selected as an analog input.e. The PORTE pins become control inputs for the microprocessor port when bit PSPMODE (TRISE<4>) is set. PORTC is multiplexed with several peripheral functions. PORTC pins have Schmitt Trigger input buffers. In this mode the input buffers are TTL. PORTE pins are multiplexed with analog inputs. TRISE controls the direction of the RE pins. PORTE AND TRISE REGISTER: PORTE has three pins RE0/RD/AN5. Clearing a TRISC bit (=0) will make the corresponding PORTC pin an output. Ensure ADCON1 is configured for digital I/O. PORTD AND TRISD REGISTERS: This section is not applicable to the 28-pin devices. Each pin is individually configurable as an input or output. The user must make sure to keep the pins configured as inputs when using them as analog inputs. these pins will read as '0's. The corresponding data direction register is TRISC. the user must make sure that the TRISE<2:0> bits are set (pins are configured as digital inputs).. Setting a TRISC bit (=1) will make the corresponding PORTC pin an input. PORTD is an 8-bit port with Schmitt Trigger input buffers. i.16 PORTC AND THE TRISC REGISTER: PORTC is an 8-bit wide bi-directional port. i. which are individually configurable as inputs or outputs. These pins have Schmitt Trigger input buffers. MEMORY ORGANISATION: .. even when they are being used as analog inputs. In this mode.e. put the contents of the output latch on the selected pin. put the corresponding output driver in a hi-impedance mode. the input buffers are TTL. RE1/WR/AN6 and RE2/CS/AN7. In this mode. PORTD can be configured as an 8-bit wide microprocessor Port (parallel slave port) by setting control bit PSPMODE (TRISE<4>).

All implemented banks contain special function registers. 17 PROGRAM MEMORY ORGANISATION: The PIC16f877 devices have a 13-bit program counter capable of addressing 8K *14 words of FLASH program memory. implemented as static RAM. . RP1:RP0 Banks 00 0 01 1 10 11 2 3 Each bank extends up to 7Fh (1238 bytes). The RESET vector is at 0000h and the interrupt vector is at 0004h. The lower locations of each bank are reserved for the Special Function Registers. The program memory and Data Memory have separate buses so that concurrent access can occur. Accessing a location above the physically implemented address will cause a wraparound. Bits RP1 (STATUS<6) and RP0 (STATUS<5>) are the bank selected bits. Above the Special Function Registers are General Purpose Registers. Some frequently used special function registers from one bank may be mirrored in another bank for code reduction and quicker access.There are three memory blocks in each of the PIC16F877 MUC’s. DATA MEMORY ORGANISTION: The data memory is partitioned into multiple banks which contain the General Purpose Registers and the special functions Registers.

with customization that can be easily automated.18 EEPROM: EEPROM (electrically erasable. In this way. Other instruments use and EEPROM to allow a user to store several sets of setup information. There are six SFRS used to read and write the program and data EEPROM memory. These registers are: EECON1 EECON2 EEDATA EEDATH EEADR EEADRH . Some instruments use an EEPROM to store calibration data during manufacture. The data memory is not directly mapped in the register file space. providing backup of setup parameters and thereby bridging over power outages. this permits a user to retrieve the setup required for any one of several very Different measurements. Instead it is indirectly addressed through the special function registers (SFR). Still other devices use an EEPROM in a way that is transparent To a user. A bulk erase operation may not be issued from user code (which includes removing code protection. That is variables stored in an EEPROM will remain there even after power has been turned off and then on again. each instrument is actually custom built. For an instrument requiring a complicated setup procedure. programmable read only memory) technology supplies Nonvolatile storage of variables to a PIC-controlled device or instrument. The data EEPROM and flash program memory are readable and writable during normal operation over the entire VDD range.

The write time is controlled by timer in-built.19 EEDATA holds the 8-bit data for read/write and EEADRR holds the address of the EEPROM location being accessed. The EEPROM data memory allows bytes read and write. The EEADR register can be thought of as the indirect addressing register of the data EEPROM. Timer1 and Timer2 Timer 0  8-bit timer/counter  Software programmable prescaler  Internal or external clock select  Readable writable  Interrupt on overflow  Edge selects for external clock Timer 1  Timer 1 can be used as timer or counter  It is 16-bit register  Software programmable prescaler  Interrupt on overflow  Readable and writable The timer-1 module is a 16-bit timer/counter consisting two 8-bit register (TMR1H) and TMR1L). The 8-bit EEADR register can access up to 256 locations of data EEPROM. TIMERS  There are three timers used Timer 0. A byte write automatically erases the location and writes the new data. which are readable and writable. The TMR1 register pair (TMR1H:TMR1L) .

The ADC module can have up to eight analog inputs for a device. The timer2 module has an 8-bit period register PR2. 20 Timer-2 Timer2 is an 8-bit timer with a prescaler and a postscaler. IT can be used as the PWM Time-base for the PWM mode of the CCP module(s). PR2 is a readable and writable register. The tmr1 interrupt. The match output of TMR2 goes through a 4-bit postscaler (which gives a 1:1 to 1:16 scaling inclusive) to generate a tmr2 interrupt Timer 2 can be shut off by clearing control bit tmr2on to minimize power consumption. This interrupt can be enabled/disabled by setting/clearing tmr1 interrupt enable bit tmr1IE. 1:4 OR 1:16. is generated on overflow. Timer2 increments from 00h until it match PR2 and then resets to 00h on the next increment cycle. which is latched in interrupt flag bit tmr1IF. The A/D conversion of the analog input signal results in a . The converter then generates a digital result of this analog level via successive approximation. if enabled. The PR2 register is initialized to FFh upon reset. The output of sample and hold capacitor is the input into the converter.Increments from 0000h to FFFFH and rolls over to 0000h. The prescaler and postscaler counters are cleared when any of the following occurs:  A write to the tmr2 register  A write to the t2con register  An any device reset  Tmr2 is not cleared when t2con is written ANALOG TO DIGITAL CONVERTER (ADC) There are two types of analog to digital converter is present in this IC. selected by control bits. and is cleared on any device reset. We use 10-bit ADC. The analog input charges a sample and hold capacitor. The input clock (Fosc/4) has a prescale option of 1:1. The TMR2 register is readable and writable.

VSS. IT also has individual interrupt requests in flag bits. INTCON Additionally if the device has peripheral interrupts. The A/D module has high and low voltage reference input that is software selectable to some combination of VDD. IT also has individual and global interrupt enables bits. then it will have registers to enable the peripheral interrupts and registers to hold the interrupt flag bits PIE1 PIE2 PIR1 PIR2 . Though some modules may generate multiple interrupts such as (USART) They have 14 sources. and RA2 or RA3. There is a minimum of one register used in the control and status of the interrupts. 21 The A/D module has four registers. The interrupt control register (INTCON) records individual interrupt requests in flag bits.Corresponding10-bit digital number. These registers are  A/D result high register (ADRESH)  A/D RESULT LOW REGISTER (ADRESL)  A/D CONTROL REGISTER 0 (ADCON0)  A/D CONTROL REGISTER 1 (ADCON1) INTERRUPTS The PIC16F87X FAMILY HAS UPTO 14 SOURCES OF INTERRUPT.

Only internal data RAM and SFR’s can be directly addressed. INDEXED ADDRESSING: Program memory can only be accessed via indexed addressing this addressing mode is intended for reading look-up tables in program memory. INDIRECT ADDRESSING: In Indirect addressing. The address register for 8-bit addresses can be either the Stack Pointer or R0 or R1 of the selected register Bank. Instructions that access the . the instruction specifies a register that contains the address of the operand. The address register for 16-bit addresses can be only the 16-bit data pointer register.3 ADDRESSING MODES: DIRECT ADDRESSING: In direct addressing. Another type of indexed addressing is used in the“ case jump ” instructions. the operand specified by an 8-bit address field in the instruction.3.22 1. Both internal and external RAM can indirectly address. In this case the destination address of a jump instruction is computed as the sum of the base pointer and the Accumulator data. REGISTER INSTRUCTION: The register banks. Adding the Accumulator data to the base pointer forms the address of the table entry in program memory. can be accessed by instructions whose opcodes carry a 3-bit register specification. A 16 bit base register (Either DPTR or the Program Counter) points to the base of the table. which contains registers R0 through R7. and the accumulator is set up with the table entry number. DPTR.

To drive the chip with an internal oscillator. minimum high and low times must be observed. For example some instruction always operates on the Accumulator. #100 loads the Accumulator with the decimal number 100. The same number could be specified in hex digit as 64h.registers this way make efficient use of code. MOV A. the opcode itself points to the correct register. 23 REGISTER . The phase 1 signal is active during the first half to each clock period and the phase 2 signals are active during the second half of each clock period. CPU TIMING: . The clock generator divides the oscillator frequency by 2 and provides a tow phase clock signal to the chip. In these cases. When the instruction is executed.SPECIFIC INSTRUCTION: Some Instructions are specific to a certain register. However. IMMEDIATE CONSTANTS: The value of a constant can follow the opcode in program memory For example. XTAL2 also the input to the internal clock generator.specific Opcodes. Instruction that register to Accumulator as A assemble as Accumulator .2 Mhz to 12 Mhz. so no address byte is needed to point OT ir. in the frequency range of 1. one would ground XTAL1 and XTAL2. one of four banks is selected at execution time by the row bank select bits in PSW. Since the input to the clock generator is divide by two filip flop there are no requirements on the duty cycle of the external oscillator signal. OSCILLATOR AND CLOCK CIRCUIT: XTAL1 and XTAL2 are the input and output respectively of an inverting amplifier which is intended for use as a crystal oscillator in the pioerce configuration. since this mode eliminates an address byte.

Today. The micro controller is the most essential IC for continuous process. To understand and apply general concepts. it is necessary to study one type in detail. they are not so great either. pharmaceutical automobile. CD players. Limited computational capabilities and enhanced I/O are special features. etc on the same chip. CVTs. I/O peripherals.A machine cycle consists of 6 states. This specific knowledge can be used to understand similar features of other MCUs. employing programmable logic systems (DCS).based applications in industries like chemical. A micro controller unit (MCU) uses the microprocessor as its central processing unit (CPU) and incorporates memory. PLC and DCS thrive on the programmability of an MCU. Micro controller devices have many similarities. There are many MCU manufacturers. . during which the phase 1 clock is active and phase 2 half. this versatile device can be found in a variety of control applications. Most common and popular MCUs are considered to be mature and well-established products. which have their individual adherents and devotees. register transfer take place during phase 2 24 TRENDS AND DEVELOPMENTS IN MICRO CONTROLLER: The manner in which the use of micro controllers is shaping our lives is breathtaking. Each stare is divided into a phase / half. data conversion. VCRs. When you look at the differences. Arithmetic and Logical operations take place during phase1 and internal register . refinery. and electrical. There are a number of variants within each family to satisfy most memory. and automotive engine systems are some of these. microwave ovens. I/O. and timing needs of enduser applications. timing reference.

The MCU is designed to operate on application-oriented sensor data-for example. 25 APPLICATIONS OF MICROCONTROLLERS Microcontrollers are designed for use in sophisticated real time applications such as • Industrial Control • Instrumentation and • Intelligent computer peripherals • They are used in industrial applications to control • Motor • Robotics • Discrete and continuous process control • In missile guidance and control • In medical instrumentation • Oscilloscopes • Telecommunication • Automobiles • For Scanning a keyboard . temperature and pressure of a blast furnace in an industrial process that is fed through its serial or operated on under the control of software and stored in ROM. Appropriate signals are fed via output ports to control external devices and systems.

it is cut-off. Therefore a motor-driver IC is used: It provides sufficient current to drive the motor. turn right or move forward. Switch S2 is used for manual reset. it remains cut-off as the white surface absorbs virtually all the light falling from T1 and no light is reflected back. IR T2 goes into saturation and conducts. A 4MHZ crystal is used for providing the basic clock frequency. When sensor T2 is above the black line. T1). the light gets reflected from the black surface to fall on T2. All I/O pins are reset to ‘1’ as soon as RST pin goes high. When no light falls on the IR. the PIC microcontroller logic ‘0’ for white surface and logic ‘1’ for black surface. Collects of IR T1 and T2 are connected to the PIC microcontroller. When light falls on the IR (say. Holding RST pin high for two machine cycles white the oscillator is running resets the device. T1 and T2 are used for detecting the black path on the white background.• Driving an LCD 26 1.4 MOTOR DRIVER: The current supplied by the PIC microcontroller to drive the motor is small. The microcontroller. The PIC microcontroller is a 16-bit microcontroller having 8kb of flash data memory of EEPROM. it goes into saturation and starts conducting. When sensor T2 is above the white surface. . This way. bases on the inputs from sensor T1 (say left) controls and sensor T2 (say right) controls the motor to make the robot turn left. Power-on reset is derived from resistor R5 and capacitor C1.

7 and 2 of motor driver L293D. port pins P2. Three wheels can be used for this robot-one on the front and two at the rear.1 are used for controller the right motor. the right-side motor should stop and the left-side motor should rotate in clockwise direction. Similarly. To make the robot turn left.2 and P2.1. For forward motion. the left-side motor should stop and the right-side motor should rotate in the clockwise direction. to make the robot turn right.0 and P2. Front wheel can rotate in any direction as specified by the rear wheel. 10. both the motors should rotate in clockwise direction. P2. while port pins P2. P2.Port pins P2. 27 DRIVER PIN DIAGRAM .3 are connected to pin 15.3 are used for controlling the left motor.2 and P2.0.

5mA  No load current @ Max Efficiency: 4.5mA (6V) .The pin details of L293d is shown in the figure 5 PIN 1: +5V PIN 2: RBO PIN 3: MOTOR PIN 4: GND PIN 5: GND PIN 6: MOTOR PIN 7: RB3 PIN 8: GND PIN 9 : PIN 10: PIN 11: PIN 12: PIN 13: PIN 14: PIN 15: PIN 16: +5V RB1 MOTOR GND GND MOTOR RB0 +5V 28 1.5 GEARED MOTOR: The diagram’s of geared motor is shown in the figure 6  Operating Range: 3-6VDC  Torque @ Max Efficiency: 28 @6VDC  Torque @ Stall: 137 @6VDC  240” (6mm) Diameter Shaft  No load current: 4.

x 0.715"L Weight: 0.3 oz. .          No load speed: 30 RPM No load speed @ Max Efficiency: 23.2688 lbs. x 1.03"L Gear size: 1. (4. x .24" (6mm) Dia.9 RPM Gear ratio: 100:1 Motor size: 1.) Solder type terminal High torque construction Oil bearing design for long service life 31 1.870"L Shaft size: 0.45"Dia.30"Dia.6 IR SENSOR The figure IR pair is shown in the below figure.

or PCBs from the core of electronic equipment domestic and industrial. 32 1.7 PCB DESIGNING: Printed circuit boards.Some of the areas where PCBs are intensively used are computers process control. When the sensor is above the white background the light falling on it from the source reflects to the sensor .telecommunications and instrumentation. and when the sensor is above the black back ground the light from the source doesn’t reflect to it .The pin details of IR sensor is shown in the figure 7 The sensor senses the light reflected from the surface feeds the output to the PIC microcontroller. . so the motor rotate’s if when the sensor receive’s the light falling on the back ground and does not rotate if the light does not gets reflected.

This is called panelisation.the next operation is drilling. .required for void free through hole plating.Very small holes are drilled with high speed CNC drilling machines.plate and etch after pressing the inner layers. The production of multi layer boards uses both the methods. The signal sided PCBs are usually made using the print and etch method.The holes drilled in the board are treated both mechanically and chemically befire depositing the copper by the electro less copper plating process.For the PTH boards.The circuit is repeated conveniently to accommodate economically as many circuits as possible in panel. The double sided plate through hole (PTH) boards are made by print plate and etch method. DRILLING: PCB drilling is a state of the art operation. and print plate and etch.which can be operated in every sequence of subsequence steps in the PCB process.Types of PCB • • • Single side board Double side board Multilayer board MANUFACTURING: The manufacturing process consists of two methods print and etch.The innerlayersare printed and etch while the outer layers are produced by print. 33 PLATING: The heart of the PCB manufacturing process. PANELISATION: Here the schematic transformed into the working positive/negative films. SOFTWARE: The software used in our project to obtain the schematic layout is a wall finish with less or no smear epoxy.

HOT AIR LEVELLING: After applying the solder mask. exposed to UV.The tin plated deposit serves and etcges resist when copper in the unwanted area is removed by the conveyorised spray etching machines with chemical etchants.the image available in the form of a film is transferred on to the outside by photo printing using a dry film printing process.The etching machines are attached to an automatic dosing equipment.developed in a mind alkaline solution and finely cured by both UV and thermal energy.ETCHING: Once a multiplayer board is drilled and electro less copper is deposited. .the circuit pads are soldered using the hot air leveling process.which analyses and controls etchants concentrations.a solder mask has to be applied on the both sides of the circuitry to avoid the bridging of conductors. SOLDERMASK: Since a PCB design may call for very close spacing between conductors. 34 ADVANTAGES OF PCB: • Size of the circuit is greatly reduced.The bare bodies fluxed and dipped in to a molten solder bath.While removing the board from the solder bath.This is one of the common finishes given to the air is blown on the sides of the board through air knives in the machines.The board are than electrolytically plated on the circuit pattern with copper and tin.The solder mask is applied by screening.The ink is dried.Thus the double side plated through whole printed circuit board is manufactured and is now ready for the components to soldered.leveling the board soldered and leveled.

• Assembly of the components is very easier. • Production time is greatly reduced. • PCBs also serve as support for other assemblies in rare cases.resistance and inductors to be formed with the tracks itselt .it also increases the aesthetic appearance of it. external components with lower values can be reduced significantly. • Trouble shooting is very easier and faster. • It reduces the failure rate of the components due to rigid assembly.So. • Using PCBs although reduces the sizes of the product. 35 . • PCBs allow integration of small value of capacitance. • Since the component assembly is very easier using unskilled labors reduces the production costs.


batteries have become a common power source for many household and industrial applications. Miniature cells are used to power devices such as hearing aids and wristwatches. larger batteries provide standby power for telephone exchanges or computer data centers 36 REGULATOR UNIT . which are designed to be used once and discarded. and secondary batteries (rechargeable batteries).[ Since the invention of the first battery in 1800 by Alessandro Volta. There are two types of batteries: primary batteries (disposable batteries). which are designed to be recharged and used multiple times.The power supply circuit diagram is shown in above figure 8 Power supply unit consists of following units i) Battery ii) Regulator unit iii) Output filter BATTERY An electrical battery is one or more electrochemical cells that convert stored chemical energy into electrical energy.

The principle of the capacitor is to charge and discharge. the output gets affected. OUTPUT FILTER: The Filter circuit is often fixed after the regulator circuit. and they operate much like a water value or faucet. Also when the internal resistance of the power supply is greater than 30 ohms. There are also variable resistors such as the volume control on a portable radio. less current is passed and the bulb will be dimmer. Most resistors come with two connecting wires. By the way. most of the resistors that you will encounter are constructed of some type of carbon material 37 CAPACITORS: . Thus to avoid this regulators are used. When a resistor is inserted into either of the wires that connect a battery to alight bulb. the less current will be able to flow through it. and the higher this value is. So it allows only AC voltage and does not allow the DC voltage. Thus this can be successfully reduced here. The output voltage is maintained irrespective of the fluctuations in the input AC voltage. one at each end. This filter is fixed after the regulator circuit to filter any of the possibly found ripples in the output received finally. ii) Negative regulator 1---> ground pin 2---> input pin 3---> output pin It regulates the negative voltage. The regulators are mainly classified for low voltage and for high voltage. It charges during the positive half cycle of the AC voltage and discharges during the negative half cycle. The value of a resistor is measured in Ohms. the DC voltage also changes.Regulator regulates the output voltage to be always constant. RESISTORS: A resistor is a component that is meant to be inserted into an electrical path. As and then the AC voltage changes. Further they can also be classified as: i) Positive regulator 1---> input pin 2---> ground pin 3---> output pin It regulators the positive voltage. to restrict the flow of electricity. so they can be added to the circuit. Capacitor is most often used as filter.

Besides allowing a circuit to pass only higher frequencies. That is. Though there’s no physical connection through it. since it can hold a charge. But with an alternating current. you’re getting the general idea.2 BLOCK DIAGRAM: . a light bulb attached to a battery through a capacitor will flash briefly when they are first connected together. or the closer they are together. Further. But how can this be if there is no mental or other conductor? Before answering this question. a capacitor consists of two piece of metal in close proximity. It’s not hard to see how capacitors are valuable in the design of the treble and bass controls on your stereo receiver.Capacitors are slightly more difficult to understand than resistors because there is no physical connection through them. while direct currents cannot. BY the way. Internally. the range of frequencies is much greater. but not quite touching. the higher the frequency or rate of change. let’s first digress for a moment and consider the difference between alternating current (AC) and direct current (DC). therefore. the larger a capacitor’s metal surfaces are. and the whole thing is rolled up to save space and then dunked into go that hardens. the current flows in only one direction. With audio (0r radio) circuits. The value of a capacitor is measured in farads. 38 2. the more current will be able to get through. though some types of current can still get through. In fact. Now let’s see if we can find a suitable mechanical equivalent for a capacitor. The whole point of capacitors. If you can picture a pieces of plastic food wrap sandwiched between two strips of aluminum foil. capacitors are also useful for their storage capability. the higher its capacitance will be. A capacitor allows electricity to flow. Direct current is the type of electricity you’d think of when using the water comparisons. a capacitor is not unlike a rechargeable battery. is that alternating currents can pass through them. the direction alternates exactly fifty times per second. but only so long as the voltage is changing. A wire is attached to each strip of foil.

The block diagram of automated track following robot is shown in the above figure 8 39 BLOCK DIAGRAM DESCRIPTION: .

 Two motor’s can be drived using one driver. MOTOR DRIVER:  It provides sufficient current to drive the motor.  It consists of four tristate buffer’s.POWER SUPPLY:  This is used to provide supply to the circuit.5V. .  The +5V DC supply is used to supply voltage to the microcontroller and other IC circuit.  Operating speed: DC – 20 MHZ clock input DC – 200 ns instruction cycle. IR SENSOR  The frequency of IR sensor .  It operates in voltage range of 4. MICROCONTROLLER:  We use “PIC 16F877A” Microcontroller as the decision making device of system.\  To regulate the voltage to 5v regulator is used.  The battery is used to provide 6v DC to the circuit.5V to 5.

 The range of IR sensor is 1 to 5 cm.  It has on transmitter and a receiver.  Operating Range: 3-6VDC.9 RPM. .  No load speed @ Max Efficiency: 23.  Oil bearing design for long service life.  High torque construction. 40 GEARED MOTOR:  It Rotate’s with 30 rpm speed.  Gear ratio: 100:1.


The circuit diagram is shown in the above figure 9


Power supply unit consists of battery, regulator unit, output filter .
The 6v dc supply is given to the regulator 7805 which regulate’s voltage from 6v to 5v dc
supply . The voltage is regulated because the PIC microcontroller can with stand only from
4.5v to 5.5v . So the voltage is regulated and the regulated voltage is given to the output
filter and the output of the filter is given to the light emitting diode this LED show’s whether
the output is present or not 220 ohm’s resistor is provided in order to resist the voltage
required for the LED.
An actual –size, single side PCB for the automated track following robot is shown in
the figure. It shows the path of the track following robot, where ‘L’ is the left sensor and ‘R’
is the right sensor. At the start , when the robot is at point ‘A’ sensors T1 and T2 are above
the white surface and port pins RA0 and RA1 of the microcontroller receive logic’1’. As the
result robot moves forward in straight direction. At the point ‘B’, a left turn is encountered
and left sensor comes above the black surface, where as the right sensor remains above the
white surface. Port pin RA.0 of the microcontroller receives logic ‘1’ from the right sensor.
As a result, the left motor stops and right motor rotates, to make the robot turn left. This
process continues until the left sensor comes out of the black track.
Similarly, at the point ‘C’, where a right turn is encountered , the same procedure for right
turn is executed. When both sensors are at the black surface , the robot should stop. The
output of the microcontroller depends on the input received at the port pins RA0 and RA1 as
shown in the table.


 Place the robot on the track.

 Turn ON the power supply switch.

 The robot follows the track as demonstrated.

 The robot stop’s when both the sensor’s are on the black background.



because it is • Very Reliable • Easy to write • Flexible MPLAB: MPLAB Integrated Development Environment (IDE) is a free. Both Assembly and C programming languages can be used with MPLAB. integrated gcc. hardware simulation and debugging. We use C language. MPLAB also serves as a single. WinPic: WinPic – A PIC Programmer for Windows PIC programmer for Windows 95 / 98 / XP .1INTRODUCTION: The PIC16F877A MICROCONTROLLER used in our project needs a program for its working.3. Other may be supported through the use of third party programs. We have written the program for our project in C language. and includes several free software components for application development.based toolset for the development of embedded applications employing Microchip’s PIC and dsPIC microcontrollers. The MPLAB IDE runs as a 32-bit application on Microsoft Windows. unified graphical user interface for additional Microchip and third party software and hardware development tools.

. not a simple ROM).12F675. search the net for”WinPic”AND”DL4YHF”to find the right one. Most modern PICs (like the PICI16F84. Note: Meanwhile there are other programs called “WinPic” on the web. because the program can be erased electrically (the code is stored in a FLASH. Originally I wrote this program for myself to get the PICkeyer firmware into a PIC16F84.45 DESCRIPTION: This is a simple program for Win95/98/XP to program the PIC firmware from a HEXFILE (the type generated by microchip’s MPLABTM) into a PIC microcontroller.Some of the “very simple” programmer interfaces can be used. a few of them are described in the manual.after discovering that the once-famous DOS program called”PIP-02”refused to work under Windows. dsPIC30Fxxxx) can be reprogrammed many times. 16F628. If you look for an update.

} Else { Right = 0. } If (value2<175) { Right = 1.h> #include“pic-adc. value2.2 PROGRAM CODING: #include<pic. PORTB = 0. Void main ( ) { TRISB = 0. If (value1<175) { Left = 1. While (1) { Value 1 = Adcs-cha (0). TRISA = 0xff.46 3.h” #define left RB3 #define Right RB1 Unsigned char value. Value 2 = Adcs-cha (1). } Else { Left = 0. } }} .

Industrial automated equipment carriers 2. Working cost is very less. It is very cheap. 5. Circuit is very simple. 2. 48 . 4. APPLICATIONS: 1. 3. Simple to operate. Reduces the man power and time.47 ADVANTAGES AND APPLICATIONS: ADVANTAGES: 1.Tour guides in museums and other similar applications.


.  Distance sensing and position logging & transmission. The robot follows the track as demonstrated.CONCLUSION: The system was operated successfully. FUTURE ENHANCEMENT:  Software control of the line type (dark or light) to make automatic detection possible.  “Obstacle detecting sensors” to avoid physical obstacles and continue on the line.


4th Edition WEBSITES: www. Page no: 240-349  JOHN PEATMEN. “Electronics Communication System” Tata mc-Grawhills. “Embedded PIC microcontroller”  Onathan . “Embedded microcomputer system” –(2009).BIBILOGRAPY REFERENCES:  George www.microchips.


COST ESTIMATION S.220ohm 10 15 7 Capacitor 10 .NO MATERIAL 1 Microcontroller RANGE PIC 16F877A 6v QUANTITY 2 AMOUNT 800 1 300 2 Battery 3 Crystal Oscillator 4 MHz 2 80 4 Geared Motor 30rpm 2 800 5 Motor Driver L 293D 1 100 6 Resistor 1k.1 15 54 8 PCB Board * 4 1300 9 Fitting Screws * 15 60 10 Cables & Wires * * 30 11 * * 1500 12 Hardware Assembly Bracket * 1 40 13 LED 2mA.0.3v 2 6 14 Wheels * 2 240 15 Chase * 1 150 16 ON & OFF Switch 5A 1 40 17 IR Sensor’s * 2 150 18 Regulator 7805 2 40 19 Miscellaneous * * 1000 TOTAL 6705 .