You are on page 1of 37

MULTIPURPOSE ROBOT 2012

ABSTRACT
The robot will be a edge avoider robot. It will be able to detect edges and retrace its steps to prevent from falling down. As our project name is multipurpose robotic system,so it has the capacity of performing multiple task but we are taking edge avoiding as the main task. Right now it can do the following:: a. It can move freely where there is no edge b. When there is and edge, it moves away from that edge. c. It can indicate on which side the edge is present, right or left. Due to time constraints only these three tasks are added.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 1

MULTIPURPOSE ROBOT 2012

INTRODUCTION
Robots and robotic technologies have an intellectual and emotional appeal that transcends any other type of engineered product, and this appeal is felt no more so than with children and young adults. Robots and robotic technologies represent a practical application of physics, computer science, engineering, and mathematics, and provide a very powerful and flexible approach to demonstrate a variety of engineering concepts. In addition, robotics appeals to a broad range of interests and allows multiple points of access to science, mathematics, and engineering for many types of learners. As a result, robotic technology and robots are being used by an increasing number of educators at the college level to reinforce computer science and engineering theory, and to teach basic software and mechanical engineering at the grammar school, middle school and high school levels. An edge avoider is an autonomous bot that can follow edges. If the robot finds edges than it will sense the edges with the help of its sensors and so return back and prevent itself from falling down.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 2

MULTIPURPOSE ROBOT 2012

CHAPTER 1 POWER SUPPLY


1. POWER SUPPLY The power supply circuit comprises a step down transformer, a bridge rectifier, filter capacitors, followed by a regulator IC 7805. The circuit is shown below:

Here in the above circuit, first the step down transformer (T1) will steps down 230 V AC to 5V AC. Again, the bridge rectifier circuit will rectify 5V AC into 5V DC. But it is not fixed. So, to obtain a fixed voltage of 5V IC 1 7805 regulator is used. Capacitors C1, C2 and C3 are used for filtering purpose.

1.1 Block diagram of Power Supply

7805

5V DC OUT

FIG 1: POWER SUPPLY

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 3

MULTIPURPOSE ROBOT 2012

1.1.1 TRANSFORMER Transformers convert AC electricity from one voltage to another with little loss of power. Transformers work only with AC and this is one of the reasons why mains electricity is AC.

FIG: TRANSFORMER

Step-up transformers increase voltage, step-down transformers reduce voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains voltage (230V in UK) to a safer low voltage. The input coil is called the primary and the output coil is called the secondary. There is no electrical connection between the two coils, instead they are linked by an alternating magnetic field created in the soft-iron core of the transformer. The two lines in the middle of the circuit symbol represent the core. The ratio of the number of turns on each coil, called the turns ratio, determines the ratio of the voltages. A step-down transformer has a large number of turns on its primary (input) coil which is connected to the high voltage mains supply, and a small number of turns on its secondary (output) coil to give a low output voltage. 1.1.2 BRIDGE RECTIFIER A diode bridge is an arrangement of four (or more) diodes in a bridge configuration that provides the same polarity of output for either polarity of input. When used in its most common application, for conversion of an alternating current (AC) input into direct current a (DC) output, it is known as a bridge rectifier. A bridge rectifier provides full-wave rectification from a two-wire AC input, resulting in lower cost and weight as compared to a rectifier with a 3-wire input from a transformer with a center-tapped secondary winding. Full-wave bridge rectifier. Current directions for the full-wave bridge rectifier circuit are as shown in Figure below for positive half-cycle and Figure below for negative half-cycles of the AC source waveform. Note that regardless of the polarity of the input, the current flows in the same direction through the load. That is, the negative half-cycle of source is a positive half-cycle at the load. The current flow is through two diodes in series for both polarities. Thus, two diode drops of the source voltage are lost (0.72=1.4 V for Si) in the diodes. This is a disadvantage compared with a full-wave center-tap design. This disadvantage is only a problem in very low voltage power supplies.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION Page 4

MULTIPURPOSE ROBOT 2012

1.1.3 7805 IC REGULATOR It is a three terminal positive regulator. It converts a varying input voltage into a constant regulated output voltage. Pin diagram of 7805 IC regulator is shown below:

1. Unregulated voltage In 2. Ground 3. Regulated Voltage Out A voltage regulator (also called a regulator) with only three terminals appears to be a simple device, but it is in fact a very complex integrated circuit. It converts a varying input voltage into a constant regulated output voltage. Voltage regulators are available in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage regulators are designed for positive input. For applications requiring negative input, the LM79XX series is used. 1.1.4 ADVANTAGES OF IC 7805

The main advantage is they are very robust. They can withstand over current draw due to short circuits and also due to overheating. In both the cases the voltage regulator will cut off immediately, before any damage occurs. 1.1.5 DISADVANTAGE OF IC 7805 1. 2. Reverse polarity destroys the voltage regulator instantly. It is not possible to obtain a voltage lower than the stated rating.
Page 5

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

MULTIPURPOSE ROBOT 2012

CHAPTER 2: P89V51RD2 DEVELOPMENT BOARD

2.1 INTRODUCTION

P89V51RD2 Development Board is a low cost development board which have all the basic components needed for gaining a headstart on your first 8051 microcontroller projects. It is made from double sided PTH PCB board to provide extra strength to the connector joints for increased reliability. Board can work on 7 to 15V AC or DC supply. It has built-in reverse polarity protection. 7805 voltage regulator has heat sink for heat dissipation so that it can supply 1Amp current continuously without getting over heated. It has switches for reset and power. It also has RS232 interface with DB9 female connector based on MAX232. All the ports are connected to standard 10 pin FRC connectors. Open pads for connecting microcontrollers pins to external devices are also provided. It can be programmed using Flash Magic programming utility of NXPs own programming utility via serial port. 2.1.1 SPECIFICATIONS Microcontroller: P89V51RD2 with 11.0592MHz crystal Double side high quality PTH PCB board to provide extra strength to the connector joints for increased reliability Power: 7 to 15V, AC or DC, Heat sink on 7805 for better current rating Reverse polarity protected Switches: Reset, Power RS232 serial interface 10 pin FRC connectors and soldering pads on all ports Compatible with General purpose prototyping board for development board for stackable design Application examples in Keil provided in the documentation CD

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 6

MULTIPURPOSE ROBOT 2012

FIG:P89V51RD2 Development Board

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 7

MULTIPURPOSE ROBOT 2012

PORT FRC connector pin connections

Power port is used to give power to the accessories boards compatible to the microcontroller development board

Power Port pin connections

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 8

MULTIPURPOSE ROBOT 2012

CHAPTER 3: USB TO RS-232 CONVERTER


3.1 INTRODUCTION The USB to RS-232 converter provides the conversion of USB data from PC into RS-232 format and vice versa. The USB to RS-232 converter plays a vital role in replacing the legacy RS-232 based communication with USB communication. The laptop or PC treats the USB to RS-232 converter as virtual comport (VCP) device and assigns com port number. This device finds applications in USB modems, MCU based designs, hand held gadgets ,etc. 3.2 FEATURES USB 2.0 compatible USB powered Rx and Tx indicator LEDs Achievable data rates: 2400-115200bps Compatible with existing GUI(RS-232based) PDA driver support Low power consumption USB cable included

FIG:: USB TO RS-232 CONVERTER

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 9

MULTIPURPOSE ROBOT 2012

CHAPTER 4: P89V51RD2
4.1 INTRODUCTION
The P89V51RD2 is an 80C51 microcontroller with 64 kB Flash and 1024 bytes of data RAM. A key feature of the P89V51RD2 is its X2 mode option. The design engineer can choose to run the application with the conventional 80C51 clock rate (12 clocks per machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice the throughput at the same clock frequency. Another way to benefit from this feature is to keep the same performance by reducing the clock frequency by half, thus dramatically reducing the EMI. The Flash program memory supports both parallel programming and in serial In-System Programming (ISP). Parallel programming mode offers gang-programming at high speed, reducing programming costs and time to market. ISP allows a device to be reprogrammed in the end product under software control. The capability to field/update the application firmware makes a wide range of applications possible. The P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash program memory to be reconfigured even while the application is running.

4.1.1 FEATURES
80C51 Central Processing Unit 5 V Operating voltage from 0 to 40 MHz 64 kB of on-chip Flash program memory with ISP (In-System Programming) and IAP (In-Application Programming) Supports 12-clock (default) or 6-clock mode selection via software or ISP SPI (Serial Peripheral Interface) and enhanced UART PCA (Programmable Counter Array) with PWM and Capture/Compare functions Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each) Three 16-bit timers/counters Programmable Watchdog timer (WDT) Eight interrupt sources with four priority levels Second DPTR register Low EMI mode (ALE inhibit) TTL- and CMOS-compatible logic levels Brown-out detection Low power modes:Power-down mode with external interrupt wake-up Idle mode PDIP40, PLCC44 and TQFP44 packages

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 10

MULTIPURPOSE ROBOT 2012

4.1.2 BLOCK DIAGRAM

Fig :. P89V51RD2 block diagram

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 11

MULTIPURPOSE ROBOT 2012

4.1.3: PINNING INFORMATION

Fig : Pin configuration

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 12

MULTIPURPOSE ROBOT 2012

4.2 PIN DESCRIPTION

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 13

MULTIPURPOSE ROBOT 2012

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 14

MULTIPURPOSE ROBOT 2012

4.3 SPECIAL FUNCTION REGISTERS


Remark: Special Function Registers (SFRs) accesses are restricted in the following ways: User must not attempt to access any SFR locations not defined. Accesses to any defined SFR locations must be strictly for the functions for the SFRs. SFR bits labeled -, 0 or 1 can only be written and read as follows: - Unless otherwise specified, must be written with 0, but can return any value when read (even if it was written with 0). It is a reserved bit and may be used in future derivatives. 0 must be written with 0, and will return a 0 when read. 1 must be written with 1, and will return a 1 when read.

4.4 FUNCTIONAL DESCRIPTION Memory organization


The device has separate address spaces for program and data memory. Flash program memory There are two internal flash memory blocks in the device. Block 0 has 64 kbytes and contains the users code. Block 1 contains the Philips-provided ISP/IAP routines and may be enabled such that it overlays the first 8 kbytes of the user code memory. The 64 kB Block 0 is organized as 512 sectors, each sector consists of 128 bytes. Access to the IAP routines may be enabled by clearing the BSEL bit in the FCF register. However, caution must be taken when dynamically changing the BSEL bit.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 15

MULTIPURPOSE ROBOT 2012


Since this will cause different physical memory to be mapped to the logical program address space, the user must avoid clearing the BSEL bit when executing user code within the address range 0000H to 1FFFH. Data RAM memory The data RAM has 1024 bytes of internal memory. The device can also address up to 64 kB for external data memory. Expanded data RAM addressing The P89V51RD2 has 1 kB of RAM. The device has four sections of internal data memory: 1. The lower 128 bytes of RAM (00H to 7FH) are directly and indirectly addressable. 2. The higher 128 bytes of RAM (80H to FFH) are indirectly addressable. 3. The special function registers (80H to FFH) are directly addressable only. 4. The expanded RAM of 768 bytes (00H to 2FFH) is indirectly addressable by the move external instruction (MOVX) and clearing the EXTRAM bit. Since the upper 128 bytes occupy the same addresses as the SFRs, the RAM must be accessed indirectly. The RAM and SFRs space are physically separate even though they have the same addresses. 4.5 Dual data pointers The device has two 16-bit data pointers. The DPTR Select (DPS) bit in AUXR1 determines which of the two data pointers is accessed. When DPS = 0, DPTR0 is selected; when DPS = 1, DPTR1 is selected. Quickly switching between the two data pointers can be accomplished by a single INC instruction on AUXR1. 4.6 FLASH MEMORY IN APPLICATION PROGRAMMING 4.6.1 Flash organization The P89V51RD2 program memory consists of a 64 kB block. An In-System Programming (ISP) capability, in a second 8 kB block, is provided to allow the user code to be programmed in-circuit through the serial port. There are three methods of erasing or programming of the Flash memory that may be used. First, the Flash may be programmed or erased in the end-user application by calling low-level routines through a common entry point (IAP). Second, the on-chip ISP boot loader may be invoked. This ISP boot loader will, in turn, call low-level routines through the same common entry point that can be used by the end-user application. Third, the Flash may be programmed or erased using the parallel method by using a commercially available EPROM programmer which supports this device. 4.6.2 Boot block When the microcontroller programs its own Flash memory, all of the low level details are handled by code that is contained in a Boot block that is separate from the user Flash memory. A user program calls the common entry point in the Boot block with appropriate parameters to accomplish the desired operation. Boot block operations include erase user code, program user code, program security bits, etc. A Chip-Erase operation can be performed using a commercially available parallel programer. This operation will erase the contents of this Boot Block and it will be necessary for the user to reprogram this Boot Block (Block 1) with the Philips-provided ISP/IAP code in order to use the ISP or IAP capabilities of this device. 4.6.3 Power-On reset code execution Following reset, the P89V51RD2 will either enter the SoftICE mode (if previously enabled via ISP command) or attempt to autobaud to the ISP boot loader. If this autobaud is not successful within about 400 ms, the device will begin execution of the user code. 4.6.4 In-System Programming (ISP) In-System Programming is performed without removing the microcontroller from the

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 16

MULTIPURPOSE ROBOT 2012


system. The In-System Programming facility consists of a series of internal hardware resources coupled with internal firmware to facilitate remote programming of the P89V51RD2 through the serial port. This firmware is provided by Philips and embedded within each P89V51RD2 device. The Philips In-System Programming facility has made in-circuit programming in an embedded application possible with a minimum of additional expense in components and circuit board area. The ISP function uses five pins (VDD, VSS, TxD, RxD, and RST). Only a small connector needs to be available to interface your application to an external circuit in order to use this feature. 4.6.5 Using the In-System Programming The ISP feature allows for a wide range of baud rates to be used in your application, independent of the oscillator frequency. It is also adaptable to a wide range of oscillator frequencies. This is accomplished by measuring the bit-time of a single bit in a received character. This information is then used to program the baud rate in terms of timer counts based on the oscillator frequency. The ISP feature requires that an initial character (an uppercase U) be sent to the P89V51RD2 to establish the baud rate. The ISP firmware provides auto-echo of received characters. Once baud rate initialization has been performed, the ISP firmware will only accept Intel Hex-type records. Intel Hex records consist of ASCII characters used to represent hexadecimal values and are summarized below: :NNAAAARRDD..DDCC<crlf> In the Intel Hex record, the NN represents the number of data bytes in the record. The P89V51RD2 will accept up to 32 data bytes. The AAAA string represents the address of the first byte in the record. If there are zero bytes in the record, this field is often set to 0000. The RR string indicates the record type. A record type of 00 is a data record. A record type of 01 indicates the end-of-file mark. In this application, additional record types will be added to indicate either commands or data for the ISP facility. The maximum number of data bytes in a record is limited to 32 (decimal). As a record is received by the P89V51RD2,the information in the record is stored internally and a checksum calculation is performed. The operation indicated by the record type is not performed until the entire record has been received. Should an error occur in the checksum, the P89V51RD2 will send an X out the serial port indicating a checksum error. If the checksum calculation is found to match the checksum in the record, then the command will be executed. In most cases, successful reception of the record will be indicated by transmitting a . character out the serial port.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 17

MULTIPURPOSE ROBOT 2012

CHAPTER 5: COMPONENTS

5.1 RESISTOR
A resistor is a two-terminal passive electronic component which implements electrical resistance as a circuit element. When a voltage V is applied across the terminals of a resistor, a current I will flow through the resistor in direct proportion to that voltage. This constant of proportionality is called conductance, G. The reciprocal of the conductance is known as the resistance R, since, with a given voltage V, a larger value of R further "resists" the flow of current I as given by Ohm's law: Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in most electronic equipment. Practical resistors can be made of various compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such as nickel-chrome). Resistors are also implemented within integrated circuits, particularly analog devices, and can also be integrated into hybrid and printed circuits. The electrical functionality of a resistor is specified by its resistance: common commercial resistors are manufactured over a range of more than 9 orders of magnitude. When specifying that resistance in an electronic design, the required precision of the resistance may require attention to the manufacturing tolerance of the chosen resistor, according to its specific application. The temperature coefficient of the resistance may also be of concern in some precision applications. Practical resistors are also specified as having a maximum power rating which must exceed the anticipated power FIG: RESISTORS dissipation of that resistor in a particular circuit: this is mainly of concern in power electronics applications. Resistors with higher power ratings are physically larger and may require heat sinking. In a high voltage circuit, attention must sometimes be paid to the rated maximum working voltage of the resistor. Practical resistors include a series inductance and a small parallel capacitance; these specifications can be important in high-frequency applications. In a low-noise amplifier or pre-amp the noise characteristics of a resistor may be an issue. The unwanted inductance,
DEPARTMENT OF ELECTRONICS AND COMMUNICATION Page 18

MULTIPURPOSE ROBOT 2012

excess noise, and temperature coefficient are mainly dependent on the technology used in manufacturing the resistor. They are not normally specified individually for a particular family of resistors manufactured using a particular technology. A family of discrete resistors is also characterized according to its form factor, that is, the size of the device and position of its leads (or terminals) which is relevant in the practical manufacturing of circuits using them.

5.2 CAPACITOR
A capacitor (formerly known as condenser) is a device for storing electric charge. The forms of practical capacitors vary widely, but all contain at least two conductors separated by a non-conductor. Capacitors used as parts of electrical systems, for example, consist of metal foils separated by a layer of insulating film. A capacitor is a passive electronic component consisting of a pair of conductors separated by a dielectric (insulator). When there is a potential difference (voltage) across the conductors, a static electric field develops across the dielectric, causing positive charge to collect on one plate and negative charge on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge on each conductor to the potential difference between them.Capacitors are widely used in electronic circuits for blocking direct current while allowing alternating current to pass, in filter networks, for smoothing the output of power supplies, in the resonant circuits that tune radios to particular frequencies and for many other purposes. The capacitance is greatest when there is a narrow separation between large areas of conductor; hence capacitor conductors are often called "plates", referring to an early means of construction. In practice the dielectric between the plates passes a small amount of leakage current and also has an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads introduce an undesired inductance and resistance.

FIG::CAPACITOR

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 19

MULTIPURPOSE ROBOT 2012

5.3 SENSORS A sensor (also called detector) is a converter that measures a physical quantity and converts it into a signal which can be read by an observer or by an (today mostly electronic) instrument. For example, a mercury-in-glass thermometer converts the measured temperature into expansion and contraction of a liquid which can be read on a calibrated glass tube. A thermocouple converts temperature to an output voltage which can be read by a voltmeter. For accuracy, most sensors are calibrated against known standards.
DEPARTMENT OF ELECTRONICS AND COMMUNICATION Page 20

MULTIPURPOSE ROBOT 2012

Sensors are used in everyday objects such as touch-sensitive elevator buttons (tactile sensor) and lamps which dim or brighten by touching the base. There are also innumerable applications for sensors of which most people are never aware. Applications include cars, machines, aerospace, medicine, manufacturing and robotics. A sensor is a device which receives FIG:: SENSORS and responds to a signal. A sensor's sensitivity indicates how much the sensor's output changes when the measured quantity changes. For instance, if the mercury in a thermometer moves 1 cm when the temperature changes by 1 C, the sensitivity is 1 cm/C (it is basically the slope Dy/Dx assuming a linear characteristic). Sensors that measure very small changes must have very high sensitivities. Sensors also have an impact on what they measure; for instance, a room temperature thermometer inserted into a hot cup of liquid cools the liquid while the liquid heats the thermometer. Sensors need to be designed to have a small effect on what is measured; making the sensor smaller often improves this and may introduce other advantages. Technological progress allows more and more sensors to be manufactured on a microscopic scale as microsensors using MEMS technology. In most cases, a microsensor reaches a significantly higher speed and sensitivity compared with macroscopic approaches. A good sensor obeys the following rules:

Is sensitive to the measured property only Is insensitive to any other property likely to be encountered in its application Does not influence the measured property

Ideal sensors are designed to be linear or linear to some simple mathematical function of the measurement, typically logarithmic. The output signal of such a sensor is linearly proportional to the value or simple function of the measured property. The sensitivity is then defined as the ratio between output signal and measured property. For example, if a sensor measures temperature and has a voltage output, the sensitivity is a constant with the unit [V/K]; this sensor is linear because the ratio is constant at all points of measurement.

5.3.1 Sensor deviations


If the sensor is not ideal, several types of deviations can be observed:

The sensitivity may in practice differ from the value specified. This is called a sensitivity error, but the sensor is still linear. Since the range of the output signal is always limited, the output signal will eventually reach a minimum or maximum when the measured property exceeds the limits. The full scale range defines the maximum and minimum values of the measured property.
Page 21

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

MULTIPURPOSE ROBOT 2012


If the output signal is not zero when the measured property is zero, the sensor has an offset or bias. This is defined as the output of the sensor at zero input. If the sensitivity is not constant over the range of the sensor, this is called non linearity. Usually this is defined by the amount the output differs from ideal behavior over the full range of the sensor, often noted as a percentage of the full range. If the deviation is caused by a rapid change of the measured property over time, there is a dynamic error. Often, this behavior is described with a bode plot showing sensitivity error and phase shift as function of the frequency of a periodic input signal. If the output signal slowly changes independent of the measured property, this is defined as drift (telecommunication). Long term drift usually indicates a slow degradation of sensor properties over a long period of time. Noise is a random deviation of the signal that varies in time. Hysteresis is an error caused by when the measured property reverses direction, but there is some finite lag in time for the sensor to respond, creating a different offset error in one direction than in the other. If the sensor has a digital output, the output is essentially an approximation of the measured property. The approximation error is also called digitization error. If the signal is monitored digitally, limitation of the sampling frequency also can cause a dynamic error, or if the variable or added noise noise changes periodically at a frequency near a multiple of the sampling rate may induce aliasing errors. The sensor may to some extent be sensitive to properties other than the property being measured. For example, most sensors are influenced by the temperature of their environment.

All these deviations can be classified as systematic errors or random errors. Systematic errors can sometimes be compensated for by means of some kind of calibration strategy. Noise is a random error that can be reduced by signal processing, such as filtering, usually at the expense of the dynamic behavior of the sensor. 5.4.2 RESOLUTION The resolution of a sensor is the smallest change it can detect in the quantity that it is measuring. Often in a digital display, the least significant digit will fluctuate, indicating that changes of that magnitude are only just resolved. The resolution is related to the precision with which the measurement is made. For example, a scanning tunneling probe (a fine tip near a surface collects an electron tunnelling current) can resolve atoms and molecules. 5.4 POTENTIOMETER A potentiometer ,informally, a pot, in electronics technology is a component, a three-terminal resistor with a sliding contact that forms an adjustable voltage divider.[1] If only two terminals are used, one end and the wiper, it acts as a variable resistor or rheostat.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 22

MULTIPURPOSE ROBOT 2012

In circuit theory and measurement a potentiometer is essentially a voltage divider used for measuring electric potential (voltage); the component is an implementation of the same principle, hence its name. Potentiometers are commonly used to control electrical devices such as volume controls on audio equipment. Potentiometers operated by a mechanism can be used as position transducers, for example, in a joystick.Potentiometers are rarely FIG::POTENTIOMETER used to directly control significant power (more than a watt), since the power dissipated in the potentiometer would be comparable to the power in the controlled load . Instead they are used to adjust the level of analog signals (e.g. volume controls on audio equipment), and as control inputs for electronic circuits. For example, a light dimmer uses a potentiometer to control the switching of a TRIAC and so indirectly to control the brightness of lamps. Potentiometers comprise a resistive element, a sliding contact (wiper) that moves along the element, making good electrical contact with one part of it, electrical terminals at each end of the element, a mechanism that moves the wiper from one end to the other, and a housing containing the element and wiper. The resistive element of inexpensive potentiometers is often made of graphite. Other materials used include resistance wire, carbon particles in plastic, and a ceramic/metal mixture called cermet. Conductive track potentiometers use conductive polymer resistor pastes that contain hard-wearing resins and polymers, solvents, and lubricant, in addition to the carbon that provides the conductive properties. The tracks are made by screen-printing the paste onto a paper-based phenolic substrate and then curing it in an oven. The curing process removes all solvents and allows the conductive polymer to polymerize and cross-link. This produces a durable track with electrical resistance which is stable throughout its working life.Lowresistance wire-wound potentiometers may be made with resistive wire close-wound round a former with a slider jumping from turn to turn. Some potentiometers are designed to be operated by the user of equipment, and are fitted with a slider or rotating shaft which extends outside the housing of the equipment using it and is fitted with a knob; a familiar example is the volume control knob of analog audio equipment. Others are enclosed within the equipment and are intended to be adjusted to calibrate equipment during manufacture or repair, and not otherwise touched. They are usually physically much smaller than user-accessible potentiometers, and may need to be operated by a screwdriver rather than having a knob. They are usually called "preset potentiometers". Some presets are accessible by a small screwdriver poked through a hole in the case to allow servicing without dismantling. User-accessible rotary potentiometers can be fitted with a switch which operates usually at the anti-clockwise extreme of rotation. Before digital electronics became the norm such a component was used to allow radio and television receivers and other equipment to be
DEPARTMENT OF ELECTRONICS AND COMMUNICATION Page 23

MULTIPURPOSE ROBOT 2012

switched on at minimum volume with an audible click, then the volume increased, by turning a knob. Many inexpensive potentiometers are constructed with a resistive element formed into an arc of a circle usually a little less than a full turn, and a wiper rotating around the arc and contacting it. The resistive element, with a terminal at each end, is flat or angled. The wiper is connected to a third terminal, usually between the other two. On panel potentiometers, the wiper is usually the center terminal of three. For single-turn potentiometers, this wiper typically travels just under one revolution around the contact. The only point of ingress for contamination is the narrow space between the shaft and the housing it rotates in. 5.5 DC MOTOR A DC motor is an electric motor that runs on direct current (DC) electricity. DC motors were used to run machinery, often eliminating the need for a local steam engine or internal combustion engine. DC motors can operate directly from rechargeable batteries, providing the motive power for the first electric vehicles. Today DC motors are still found in applications as small as toys and disk drives, or in large sizes to operate steel rolling mills and paper machines. Modern DC motors are nearly always operated in conjunction with power electronic devices.Two important performance parameters of DC motors are the motor constants, Kv and Km. 5.5.1 CONNECTION TYPES

Series connection
A series DC motor connects the armature and field windings in series with a common D.C. power source. This motor has FIG::DC MOTOR poor speed regulation since its speed varies approximately inversely to load. However, a series DC motor has very high starting torque and is commonly used for starting high inertia loads, such as trains, elevators or hoists.[2] With no mechanical load on the series motor, the current is low, the magnetic field produced by the field winding is weak, and so the armature must turn faster to produce sufficient counter-EMF to balance the supply voltage (and internal voltage drops). For some types of motor, the speed may be higher than can be safely sustained by the motor. In a no-load condition, the motor may increase its speed until the motor mechanically destroys itself. This is called a runaway condition. The speed/torque characteristic is also useful in applications such as dragline excavators, where the digging tool moves rapidly when unloaded but slowly when carrying a heavy load.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 24

MULTIPURPOSE ROBOT 2012

Series motors called "universal motors" can be used on alternating current. Since the armature voltage and the field direction reverse at (substantially) the same time, torque continues to be produced in the same direction. Since the speed is not related to the line frequency, universal motors can develop higher-than-synchronous speeds, making them lighter than induction motors of the same rated mechanical output. This is a valuable characteristic for hand-held power tools. Universal motors for commercial power frequency are usually small, not more than about 1 kW output. However, much larger universal motors were used, fed by special low-frequency traction power networks to avoid problems with commutation under heavy and varying loads.

Shunt connection
A shunt DC motor connects the armature and field windings in parallel or shunt with a common D.C. power source. This type of motor has good speed regulation even as the load varies, but does not have as high of starting torque as a series DC motor.It is typically used for industrial, adjustable speed applications, such as machine tools, winding/unwinding machines and tensioners.

Compound connection
A compound DC motor connects the armature and fields windings in a shunt and a series combination to give it characteristics of both a shunt and a series DC motor.This motor is used when both a high starting torque and good speed regulation is needed. The motor can be connected in two arrangements: cumulatively or differentially. Cumulative compound motors connect the series field to aid the shunt field, which provides higher starting torque but less speed regulation. Differential compound DC motors have good speed regulation and are typically operated at constant speed. They are commonly used in elevators, air compressors, conveyors and punch presses. 5.6CRYSTAL OSCILLATOR A crystal oscillator is an electronic oscillator circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters and receivers. The most common type of piezoelectric resonator used is the quartz crystal, so oscillator circuits designed around them became known as "crystal oscillators."

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 25

MULTIPURPOSE ROBOT 2012

Quartz crystals are manufactured for frequencies from a few tens of kilohertz to tens of megahertz. More than two billion (2109) crystals are manufactured annually. Most are used for consumer devices such as wristwatches, clocks, radios, computers, and cellphones. Quartz crystals are also found inside test and measurement equipment, such as counters, signal generators, and oscilloscopes.

5.6.1 OPERATION

FIG::CRYSTAL OSCILLATOR

A crystal is a solid in which the constituent atoms, molecules, or ions are packed in a regularly ordered, repeating pattern extending in all three spatial dimensions. Almost any object made of an elastic material could be used like a crystal, with appropriate transducers, since all objects have natural resonant frequencies of vibration. For example, steel is very elastic and has a high speed of sound. It was often used in mechanical filters before quartz. The resonant frequency depends on size, shape, elasticity, and the speed of sound in the material. High-frequency crystals are typically cut in the shape of a simple, rectangular plate. Low-frequency crystals, such as those used in digital watches, are typically cut in the shape of a tuning fork. For applications not needing very precise timing, a low-cost ceramic resonator is often used in place of a quartz crystal.When a crystal of quartz is properly cut and mounted, it can be made to distort in an electric field by applying a voltage to an electrode near or on the crystal. This property is known as piezoelectricity. When the field is removed, the quartz will generate an electric field as it returns to its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves like a circuit composed of an inductor, capacitor and resistor, with a precise resonant frequency. Quartz has the further advantage that its elastic constants and its size change in such a way that the frequency dependence on temperature can be very low. The specific characteristics will depend on the mode of vibration and the angle at which the quartz is cut (relative to its crystallographic axes).Therefore, the resonant frequency of the plate, which depends on its size, will not change much, either. This means that a quartz clock, filter or oscillator will remain accurate. For critical applications the quartz oscillator is mounted in a temperaturecontrolled container, called a crystal oven, and can also be mounted on shock absorbers to prevent perturbation by external mechanical vibrations. 5.7 L293D MOTOR DRIVER IC The L293 and L293D are quadruple high-current half-H drivers. The L293 is designed to provide bidirectional drive currents of up to 1 A at voltages
DEPARTMENT OF ELECTRONICS AND COMMUNICATION Page 26

MULTIPURPOSE ROBOT 2012

from 4.5 V to 36 V. The L293D is designed to provide bidirectional drive currents of up to 600-mA at voltages from 4.5 V to 36 V. Both devices are designed to drive inductive loads such as relays, solenoids, dc and bipolar stepping motors, as well as other high-current/high-voltage loads in positive-supply applications. All inputs are TTL compatible. Each output is a complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo-Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by 1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the associated drivers are enabled and their outputs are active and in phase with their inputs. When the enable input is low, those drivers are disabled and their outputs are off and in the high-impedance state. With the proper data inputs, each pair of drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor applications. On the L293, external highspeed output clamp diodes should be used for inductive transient suppression. A VCC1 terminal, separate from VCC2, is provided for the logic inputs to minimize device power

5.8: LM324 IC The op-amp IC which is used here is LM324, which is an 14pin IC having two inbuilt op-amps. In the comparator mode, the reference voltage is set at the inverted input pin and then it is compared with the input at non inverted pin.

FIG::LM324 IC

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 27

MULTIPURPOSE ROBOT 2012

CHAPTER 6:WORKING

6.1 BLOCK DIAGRAM OF OUR PROJECT

L M 3 2 4

P89V51RD2

FIG::BLOCK DIAGRAM OF PROJECT

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 28

MULTIPURPOSE ROBOT 2012

6.2 WORKING OF OUR ROBOT The edge avoider has an transmitter and a receiver. The receiver receives the information and generates a voltage proportional to the intensity of the reflection, if this voltage is above a threshold it means SIGNAL=1 (logic one) else SIGNAL= 0 (logic zero). Lets take up an example where we have to move our bot on a plain surface without any edges. Suppose there are three Infra Red (IR) sensor pairs that are on different halves of a bot with respect to geometrical central axis of the bot. The sensors are placed in such a way that if all the three sensors detect any edges, they send information to the bot to move in the backward direction. In case there are no edges, the bot continues to move straight. 6.3 CHASSIS OF THE ROBOT 6.3.1 Base of robot: The base or the material of the platform of robot can be made with any easily available material like switch board, wood, acrylic sheet or steel sheet. As our robot will be very light, we dont have to think a lot about strength and other such factors. Here we are using a light wooden base. 6.3.2 Motors and Driving Mechanism:

We will need a set of two motors that have same rpm (revolution per minute). We will be using differential drive for maneuvering our bot i.e. we will have three wheels for our bot, the front two will be powered and the rear will be free wheel. When the bot is moving straight both the motors should have equal speed. For turning, one of the motor is switched off. If we switch off the left motor, the bot will turn left and vice versa. Here we have chosen a motor of rpm around 100 and a torque of 1kg-cm.

5.3.3 Coupling wheels & clamping motors: For clamping the motors here we use pipe clamps or right angled clamps. The right angle clamps ensure more rigidness. To couple the motor ensure that the shaft of motor and hole of wheel have equal diameter. 6.3.4 Op-Amplifier (LM324) If the rays received by the IR- LED receiver are above a particular threshold then an amplified signal is generated by the amplifier (LM324). Note that the sensors cannot directly send a signal to the microcontroller as the signal voltage generated by them is too low and even when sensors detect edges signal generated by them will interpreted low by the microcontroller.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 29

MULTIPURPOSE ROBOT 2012

Flowchart of the program for the edge-avoiding robot

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 30

MULTIPURPOSE ROBOT 2012

FLOWCHART CONTINUED

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 31

MULTIPURPOSE ROBOT 2012

FIG::CIRCUIT DIAGRAM OF OUR PROJECT

FIG::CIRCUIT DIGRAM OF SENSORS

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 32

MULTIPURPOSE ROBOT 2012

LIST OF COMPONENTS USED::

1)P89v51RD2 (8051 microcontroller from NXP) 1no 2)L293D motor driver 3)LM324 comparator 4)Resistors- 1k 10k 100 1no 2nos 2nos 2nos 2nos

10k pot 2nos 8.2k 5)Capacitor- 10uF 1no 1no

33pF 2nos 6) 11.0592MHz Crystal 1no 7) IR LED 8)Photo diode 2 nos 2nos

9) 5V DC power-supply

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 33

MULTIPURPOSE ROBOT 2012

FIG::PICTURE OF OUR ROBOT

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 34

MULTIPURPOSE ROBOT 2012

CONCLUSION
This project has helped us a lot to increase our knowledge in the world of microcontroller. It has not only helped to learn what can be done with proper programming but also has helped us to gain our knowledge in interfacing. As we are just beginners in this field, we have tried our best to do everything possible from our side. In the future we hope to take out project further, to make more developments in it can be an asset to everyone in its own kind. As the time of demonstration the tasks mentioned in the abstract are performed and gradually we will add more tasks to the system.

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 35

MULTIPURPOSE ROBOT 2012

BIBLIOGRAPHY
1. THE 8051 MICROCONTROLLER AND EMBEDDED SYSTEMS by Muhammad Ali Mazidi, Rolin D. Mckinlay, 2ndedition,PEARSON 2. MICROPROCESSORS AND MICROCONTROLLERS by B. RAM , seventh edition 3. http://www.wikipedia.com/8051 microcontroller/P89V51RD2 4. http://www.engineers garage.com/8051 specifications 5. www.datasheetarchive.com/LM324 6. www.datasheetarchive.com/L293D

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 36

MULTIPURPOSE ROBOT 2012

APPENDIX-A (Datasheets)

DEPARTMENT OF ELECTRONICS AND COMMUNICATION

Page 37