You are on page 1of 93

INTRODUCTION

Robotics is an interesting field where every engineer can showcase his creative and technical skills. Pleasing aspect of robotics is that a robot can make indigenously by anyone. In this competitive world there is need for every enthusiastic, from amateur to professional, to, make a simple robot having innovated applications and with robust control. A remote control vehicle is defined as any mobile device that is controlled by a means that does not restrict its motion with an origin external to the device. This is often a radio control device, cable between control and vehicle, or an infrared controller. A remote control vehicle (also called as RCV) differs from a robot in that the RCV is always controlled by a human and takes no positive action autonomously. One of the key technologies which underpin this field is that of remote vehicle control. It is vital that a vehicle should be capable of proceeding accurately to a target area; maneuvering within that area to fulfill its mission and returning equally accurately and safe to base. Mobile phones today became an essential entity for one and all and so, for any mobile based application there is great reception. In this scenario making a mobile phone operated land rover is a good idea. Conventionally wireless controlled rovers utilize RF circuits, which had limitations like limited range, limited frequency ranges and controls. But a mobile phone controlled rover can hold up these limitations. It has a robust control, unlimited range (Coverage area of the service provider), no fear of interfering with other controllers and we can have as much as 12 controls. Although the appearance and capabilities of rovers vary vastly, all rovers share the features of a mechanical, movable structure under some form of control. This control of rover involves three distinct phases- perception, processing and on-board microcontroller or processor and task (action) is performed using motors or with some other actuators.

1 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

1.1

DEFINITION OF A ROBOT:
According to the Robotics Industries Association (RIA): A robot is a reprogrammable

multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks. This definition underscored the reprogrammability of robots, but it also just deals with manipulation and excludes mobile robots. Close relationship with the concept of Automation, the discipline that implements principles of control in specialized hardware. Three levels of implementation: Rigid automation factory context oriented to the mass manufacturing of products of the same Programmable automation factory context oriented to low-medium batches of different types Flexible automation evolution of programmable automation by allowing the quick

type. Uses fixed operational sequences that cannot be altered. of products. A programmable system allows for changing of manufacturing sequences. reconfiguration and reprogramming of the sequence of operation. Flexible automation is often implemented as Flexible robotic work cells. Reprogramming/retooling the robots changes the functionality of the work cell. According to the Japanese Industrial Robot Association (JIRA), robots can be classified as follows: Class 1: manual handling device a device with several DOFs actuated by the operator. Class 2: fixed sequence robot similar to fixed automation. Class 3: variable sequence robot similar to programmable automation. Class 4: playback robot - the human performs tasks manually to teach the robot with trajectories Class 5: numerical control robot the operator provides the robot with the sequence of tasks to Class 6: intelligent robot a robot with the means to understand its environment, and the ability

to follow. follow rather than teach it. to successfully complete a task despite changes in the surrounding conditions where it is performed.

2 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Another definition describes robotics as the intelligent connection between perception and action. This is an overly inclusive definition. Yet another definition, which focuses on mobile robot is A robot is a machine able to extract information from the environment, and use this knowledge to move safely, in a meani9ngful and purposive manner.

Modern Definition: An entity that can sense, think and act. Extensions: Communicate, intimate, and collaborate.

Fig. 1.1 : Robot Definition

3 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

1.2 HISTORY:
Some historians believe the origin of robotics can be traced back to the ancient Greeks. It was around 270 BC when Ctesibus (a Greek engineer) made organs and water clocks with movable figures. Other historians believe robotics began with mechanical dolls. In the 1770s, Pierre JacquetDroz, a Swiss clock maker and inventor of the wristwatch, created three ingenious mechanical dolls. He made the dolls so that each one could perform a specific function: one would write, another would play music on an organ, and the third could draw a picture. As sophisticated as they were, the dolls, whose purpose was to amuse royalty, performed all their respective feats using gears, cogs, pegs, and springs. More recently, in 1898, Nikola Tesla built a radio-controlled submersible boat. This was no small feat in 1898. The submersible was demonstrated in Madison Square Garden. Although Nikola Tesla had plans to make the boat autonomous, lack of funding prevented further research. The word robot was first used in a 1921 play titled R.U.R.: Rossums Universal Robots, by Czechoslovakian writer Karel Capek. Robot is a Czech word meaning worker. The play described mechanical servants, the robots. When the robots were endowed with emotion, they turned on their masters and destroyed them. Historically, we have sought to endow inanimate objects that resemble the human form with human abilities and attributes. From this is derived the word anthrobots, robots in human form. Since Karel Capeks play, robots have become a staple in many science fiction stories and movies. As robots evolved, so did the terminology needed to describe the different robotic forms. So, in adition to the old tin-man robot, we also have cyborgs, which are part human and part machine, and androids, which are specially built robots designed to be humanlike. Many people had their first look at a real robot during the 1939 Worlds Fair. Westinghouse Electric built a robot they called Elektro the Moto Man. Although Elektro had motors and gears to move its mouth, arms, and hands, it could not perform any useful work. It was joined on stage by a mechanical dog named Sparko.

4 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

1.3

Why build robots?

Robots are indispensable in many manufacturing industries. The reason is that the cost per hour to operate a robot is a fraction of the cost of the human labor needed to perform the same function. More than this, once programmed, robots repeatedly perform functions with a high accuracy that surpasses that of the most experienced human operator. Human operators are, however, far more versatile. Humans can switch job tasks easily. Robots are built and programmed to be job specific. You wouldnt be able to program a welding robot to start counting parts in a bin. Todays most advanced industrial robots will soon become dinosaurs. Robots are in the infancy stage of their evolution. As robots evolve, they will become more versatile, emulating the human capacity and ability to switch job tasks easily. While the personal computer has made an indelible mark on society, the personal robot hasnt made an appearance. Obviously theres more to a personal robot than a personal computer. Robs require a combination of elements to be effective: sophistication of intelligence, movement, mobility, navigation, and purpose.

1.4

Purpose of Robots:

In the beginning, personal robots will focus on a singular function (job task) or purpose. For instance, today there are small mobile robots that can autonomously maintain a lawn by cutting the grass. These robots are solar powered and dont require any training. Underground wires are placed around the lawn perimeter. The robots sense the wires, remain within the defined perimeter, and dont wander off. Building a useful personal robot is very difficult. By playing and experimenting with robots you can learn many aspects of robotics: artificial intelligence, neural networks, usefulness and purpose, sensors, navigation, articulated limbs, etc. The potential is to learn first hand about robotics and possibly make a contribution to the existing body of knowledge on robotics. And to this end amateur robotists do contribute, in some cases creating a clever design that surpasses mainstream robotic development. The late science fiction writer Robert Heinlein is credited as the first person to predict the use of telepresence robots in his 1940 science fiction novel titled Waldo. In the story, a human operates

5 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

mechanical puppets, called waldos, to do his bidding from a remote location. Rather than use the term waldo, I found the word golem from Yiddish mythology more suitable. The story of the golem describes a human spirit who intentionally places itself in a clay figurine. The spirit controls the clay figurine, bidding it to do that which the spirit would not or could not do in its human form. Once the golems work is finished, the spirit returns to its human form. This definition adequately describes the new science of telepresence.

1.5

What is telepresence?

Telepresence is a high-fidelity form of remote control that attempts to project the senses of the human operator into a robot at a distant site. The feedback interfaces used to create a telepresence system are the same as used in virtual reality (VR). Figure 9.1 illustrates a basic telepresence system. In virtual reality we achieve immersion into a synthetic computer generated environment by fooling our senses, as best we can, to believe in and interact with the computers synthesized environment. In telepresence the environment is real but remote. So, instead of a computer generating a synthetic environment, the sensors placed on the remote robot feed all spatial and environmental information to the user, in such a way that the user actually feels that he or she is there. On this human side, as stated before, the same VR equipment is used to provide sufficient information from the remote sensors to fool our senses into believing that the environment is real and present. Different levels of presence are achieved depending upon the fidelity of the interfacing devices. A humanoid robot that could accurately follow human movement, gestures, locomotion, and balance while providing visual, thermal, tactile, and force reflection over its entire exoskeleton to the human operator would be a perfect golem. The illusion created is that the operator has merged or is contained within the robot structure. Current telepresence systems fall quite short of this goal. In many cases the remote robot is a vehicle, like the one we shall build. The best telepresence existence available using these rudimentary T-bots allows one to believe he or she is actually driving the vehicle from inside. T-bots can be built to explore and operate in harsh or hazardous environments. A partial list of remote environments include arctic waters, ocean floors, forest fires, active volcanoes, nuclear reactors, the Moon, Mars, or anything in between.

6 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

1.6

A LITTLE ON RADIO CONTROLLED MODELS:

Radio-controlled models have evolved into a popular hobby. There are R/C airplanes, helicopters, gliders, powerboats, submarines, cars, motorcycles, etc. Most models are suitable shells and springboards for golem-type robots. Not long ago, R/C models were exclusively gas powered. In the late 1970s, improvements in battery technology and electric motors made electric-powered vehicles a viable option. Model R/C cars are typically controlled using a two-channel transmitter/receiver. One channel controls steering and the other channel controls the throttle. Each transmitter signal is controlled by a potentiometer inside the transmitter. The steering potentiometer is often connected to a small steering wheel on the transmitter control. The throttle is usually connected to a trigger or stick. An encoder chip in the transmitter modulates the pulse width on the transmitters carrier signal. The pulse width is based on the position (resistance) of the potentiometers shaft. The pulse widths are varied between 1 and 2 milliseconds (ms). When the potentiometer is in its center position, the pulse width corresponding to that channel is 1.5 ms. When the control is pushed to one extreme, the pulse width increases to 2 ms. When pushed to the opposite extreme, the pulse width shrinks to 1 ms. The receiver decodes the pulses on the carrier signal and sends them to their respective motors. The motor is an integral unit, containing a motor, gearbox, output shaft. The motor attempts to match the pulse widths of the two signals by adjusting the position of the motors output shaft. This is how the motor tracks and holds its position based on the signal from the transmitter.

7 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

OVERVIEW OF PROJECT
2.1. Overview:
In the present project the rover is controlled by a mobile phone which makes a call to the mobile phone attached to the rover. In the course of a call if any button is pressed a tone corresponding to the button pressed is heard at the other end of the call. This tone is called DTMF tone. The rover perceives this DTMF tone with the help of a phone stacked in the rover. The processing of the received tone is done by Atmega 89C51 microcontroller with the help of DTMF DECODER CM8870. The decoder decodes the DTMF tone into its equivalent binary digit and this binary number is sent to the microcontroller. The microcontroller is programmed to take a decision for any given input. The microcontroller outputs its decision to motor drivers to drive the motors in order to have forward or backward motion or a turn. Any mobile which makes a call to the mobile phone stacked in the rover will acts as a remote. So, this simple robotic project does not require the construction of receiver and transmitter kits, but has an innovated application of cell phone and robust control. Dual tone multi-frequency (DTMF) signaling is used for telephone signaling over the line in the voice-frequency band to call switching center. The version of DTMF used for telephone tone dialing is known by the trademarked term Touch-tone. DTMF assigns a specific frequency (Consisting of 2 separate tones) to each key so that it can easily be identified by a microprocessor. The signal generated by a DTMF encoder is a direct algebraic summation, in real time, of the amplitudes of 2 sine (cosine) waves of different frequencies, i.e. pressing 5 will send a tone made by adding 1336 HZ and 770 HZ to the other end of the line.

8 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2.2. BLOCK DIAGRAM:

Figure 2.1. Block Diagram

9 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2.3 SCHEMATIC DIAGRAM:

Figure 2.2 Schematic Diagram

10 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2.3.1. Schematic Diagram Description:


Fig.2.2 shows the block diagram of the microcontroller-based mobile phone operated land rover. The important components of this rover are a DTMF decoder, microcontroller and motor driver. An CM8870 series DTMF decoder is used here. All types of the MT8870 series use digital counting techniques to detect and decode all the 16 DTMF tone pairs into a 4-bit code output. The built-in dial tone rejection circuit eliminates the need for pre-filtering. When the input signal given at pin 2 (IN-) in singleended input configuration is recognized to be effective, the correct 4-bit decode signal of the DTMF tone is transferred to Q1 (pin 11) through Q4 (pin 14) outputs. Table II shows the DTMF data output table of CM8870. Q1 through Q4 outputs of the DTMF decoder (IC1) are connected to port pins PA0 through PA3 of ATmega 89C51 microcontroller (IC2) after inversion by N1 through N4, respectively. The ATmega16 is a low-power, 8-bit, CMOS microcontroller based on the AVR enhanced RISC architecture. It provides the following features: 16 kB of in-system programmable Flash program memory with read-while-write capabilities, 512 bytes of EEPROM, 1kB SRAM, 32 general-purpose input/output (I/O) lines and 32 general-purpose working registers. All the 32 registers are directly connected to the arithmetic logic unit, allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code-efficient. Outputs from port pins PD0 through PD3 and PD7 of the microcontroller are fed to inputs IN1 through IN4 and enable pins (EN1 and EN2) of motor driver L293D, respectively, to drive two geared DC motors. Switch S1 is used for manual reset. The microcontroller output is not sufficient to drive the DC motors, so current drivers are required for motor rotation. The L293D is a quad, high-current, half-H driver designed to provide bidirectional drive currents of up to 600 mA at voltages from 4.5V to 36V. It makes it easier to drive the DC motors. The L293D consists of four drivers. Pins IN1 through IN4 and OUT1 through OUT4 are input and output pins, respectively, of driver 1 through driver 4. Drivers 1 and 2, and drivers 3 and 4 are enabled by enable pin 1 (EN1) and pin 9 (EN2), respectively. When enable input EN1 (pin 1) is high, drivers 1 and 2 are enabled and the outputs corresponding to their inputs are active. Similarly, enable input EN2 (pin 9) enables drivers 3 and 4. In this project we are going to control land rover based on the mobile communication. The idea behind this particular work is to give user the full flexibility to control the rover from remote distances. 11 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The main parts of this schematic diagram are: 1. 2. 3. 4. 5. 6. POWER SUPPLY. MICROCONTROLLER (AT89C51). DTMF8870 IC. LCD (Liquid Crystal Display). DC MOTOR CIRCUIT. LED (On or Off) WITH RELAY CIRCUIT.

AT89C51 (microcontroller) is a special microcontroller manufactured by the Atmel Corporation where AT stands for ATMEL company and C for CMOS technology.

Concerned to the schematic the Port Pins connections are as follows: Port 0: At this particular port, the pin numbers starting from P0.0 to P0.4 are connected to 5 LEDs in this prototype preparation. The rest of the Port 0 Pins are left unconnected. Port 1: All the pins of port 1(i.e., P1.0 TO P1.7) are fully engaged to transfer data to LCD

data pins(7th pin of LCD to 14th pin). Port 2: P2.6 & P2.7). At the 7th and 8th pins of this particular IC a crystal is connected to generate clocks as required. The 1st and the 4th pin are shorted as in connection. 5th, 6th and 9th pins are grounded as specified. 12 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY The last four pins of the port 2 are connected to the DTMF8870 IC (14, 13, 12 & 11)

from where DTMF8870 IC ( Dual Tone Multiple Frequency ) is giving data to the Port2 (P2.4, P2.5,

18th pin is connected is connected to Power Supply (Vcc), rest of the port pins are left unconnected. Port 3: At this particular port the first 3 pins (P3.0, P3.1 & P3.2) are connected to the LCD control

pins (4, 5 & 6). Where 4th pin of this LCD is dedicated to select the register (Command or Data register) i.e., when RS=0 a Command Register is selected and when RS=1 a Data Register is selected. 5th pin of the LCD is dedicated to select the R/W mode i.e., to say when R/W=0 a Write signal mode is selected and when R/W=1 a Read signal mode is selected. 6th pin of the LCD is dedicated to make a enable action this enabling is by the software way done by the microcontroller (AT89C51). The last three pins (P3.5, P3.6 & P3.7) are individually connected to different circuits. P3.5 is connected to BULB by the software way microcontroller is controlling the particular Bulbs status (ON or OFF). P3.6 is connected to a DC MOTOR where it is .powered by the 12V battery voltage the microcontroller is responsible for controlling the particular DC MOTOR.. P3.7 is left unconnected with a relay circuit so that it may be used in the future to do the same action of controlling any motor or operating any other appliance. Here the rest of the port pins are left unconnected.

13 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2.4 WORKING PRINCIPLE:


The process to operate this project is first make a mobile to mobile connection wirelessly or with a single mobile onboard wired. But here we are using to mobiles to make is a wireless application. Start with making a connection with the onboard mobile from remote distance, then when connection is established lets control the rover. This rover which transverse over different terrains and moves in all directions. A webcam is placed overhead which rotates in all directions by standing at the same place on the rover. The video signal captured by the webcam (wireless) is given to amplifier which increases the signal strength and this is taken by the mobile receiver antenna which displays the video in the mobile. Pressing 2, rover moves forward direction. Pressing 4, the rover takes left turn. Right motor forwarded and left motor back warded. Pressing 6, allows rover to turn right. Right motor back warded and left motor forwarded. Pressing 8, move the rover in backward direction. To control the speed of the rover press 5.

Table 2.1 Working Actions Of Rover

14 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2.5. Construction of Rover:


When constructing any robot, one major mechanical constraint is the number of motors being used. We can have either a two-wheel drive or a four-wheel drive. Though four-wheel drive is more complex than two-wheel drive, it provides more torque and good control. Two-wheel drive, on the other hand, is very easy to construct. The chassis used in this model is a 2025cm sheet made up of foamplastic. Motors are fixed to the bottom of this sheet and the circuit is affixed firmly on top of the sheet. A cell phone is also mounted on the sheet as shown in the picture. In the four-wheel drive system, the two motors on a side are controlled in parallel. So a single relay driver can drive the rover. For this robot, beads affixed with glue act as support wheels.

15 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

MICROCONTROLLERS
3.1. INTRODUCTION:
Circumstances that we find ourselves in today in the field of microcontrollers had their beginnings in the development of technology of integrated circuits. This development has made it possible to store hundreds of thousands of transistors into one chip. That was a prerequisite for production of microprocessors, and the first computers were made by adding external peripherals such as memory, input-output lines, timers and other. That is how the first chip containing a microcomputer, or what would later be known as a microcontroller came about.

3.2. Definition of A Microcontroller:


Microcontrollers as the name suggests, are small controllers. They are like single chip computers that are often embedded into other systems to function as processing/controlling unit. For example, the remote control we are using probably has microcontrollers inside that do decoding and other controlling functions. They are also used in automobiles, washing machines, microwave ovens, toys and so on, where automation is needed. The key features of microcontrollers include: Integration of functionality Microcontrollers sometimes are called single-chip computers because they have on-chip memory

and I/O circuitry and other circuitries that enable them to function as small standalone computers without other supporting circuitry. Field Programmability, Flexibility Microcontrollers often use EEPROM or EPROM as their storage device to allow field

programmability so they are flexible to use. Once the program is tested to be correct then large quantities of microcontrollers can be programmed to be used in embedded systems. Easy to use

16 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Assembly language is often used in microcontrollers and since they usually follow RISC architecture, the instruction set is small. The development package of microcontrollers often includes an assembler, a stimulator, a programmer to burn the chip and a demonstration board. Some package includes a high level language compiler such as a C compiler and more sophisticated libraries. Most microcontrollers will also combine other devices such as: 1. 2. A timer module to allow the microcontroller to perform tasks for certain time periods. A serial I/O port to allow data to flow between the microcontroller and other devices such as: A pc or another microcontroller. An ADC to allow the microcontroller to accept analogue input data for processing.

Figure 3.1: Showing a typical microcontroller device and its different subunits

17 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

3.3. Microcontrollers versus Microprocessors:


Microcontrollers differ from a microprocessor in many ways. First and the most important difference is its functionality. In order for a microprocessor to be used, other components such as memory, or components for sending and receiving data must be added to it. In short that means that microprocessor is the very heart of the computer. On the other hand microcontroller is designed to be all of that in one. No other external components are needed for its application because all necessary peripherals are already built into it. Thus we save the time and space needed to construct devices.

3.4. Features of AT89C51:


The AT89C51 provides the following standard features: 4kbytes of flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counter, and five vector two level interrupt architecture, a full duplex serial port, on chip oscillator and clock circuitry. In addition, the AT89C51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The idle mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power-mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

18 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

3.5. Pin Diagram Of AT89C51:

Figure 3.2 Pin Diagram OF 89C51 IC 3.5.1 PIN DESCRIPTION: VCC- Supply voltage GND- Ground
Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1 s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code

19 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

bytes during flash programming, and outputs the code bytes during program verification. External pull ups are required during program verification. Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull ups. The port 1 output buffers can sink/source four TTL inputs. When 1 s are written to port 1 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL), because of the internal pull ups. Port 1 also receives the low-order address bytes during flash programming and verification. Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull ups. The port 2 output buffers can sink/source four TTL inputs. When 1 s are written to port 2 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull ups when emitting 1 s. During accesses to external data that use 8-bit addresses (MOVX @ RI), port 2 emits the contents of the P2 special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pull ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull ups. Port 3 also serves the functions of various special features of the AT89C as listed below:

20 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Port Pin Alternate Functions: P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 RXD (serial input port) TXD (serial output port) INT0 (external interrupt 0) INT1 (timer 0 external input 1) 0 (timer 0 external input) T1 (timer 1external input) WR (external data memory write strobe) RD (external data memory read strobe)

Port 3 also receives some control signals for Flash programming and verification. RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. ALE/PROG: Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN: Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.

21 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier.

3.6. NECESSITY OF MICROCONTROLLERS:


Microprocessors brought the concept of programmable devices and made many applications of intelligent equipment. Most applications, which do not need large amount of data and program memory, tended to be: 1. Costly: The microprocessor system had to satisfy the data and program requirements so, sufficient RAM and ROM are used to satisfy most applications .The peripheral control equipment also had to be satisfied. Therefore, almost all-peripheral chips were used in the design. Because of these additional peripherals cost will be comparatively high. In comparison a typical Micro controller 8051 chip has all that the 8051 board has except a reduced memory as follows. 4K bytes of ROM as compared to 32-KB, 128 Bytes of RAM as compared to 32-KB.

22 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

2. Bulky: On comparing a board full of chips (Microprocessors) with one chip with all components in it (Microcontroller). 3. Debugging: Lots of Microprocessor circuitry and program to debug. In Micro controller there is no Microprocessor circuitry to debug. 4. Slower Development time: As we have observed Microprocessors need a lot of debugging at board level and at program level, whereas, Micro controller do not have the excessive circuitry and the built-in peripheral chips are easier to program for operation. So peripheral devices like Timer/Counter, Parallel programmable port, Serial Communication Port, Interrupt controller and so on, which were most often used were integrated with the Microprocessor to present the Micro controller .RAM and ROM also were integrated in the same chip. The ROM size was anything from 256 bytes to 32Kb or more. RAM was optimized to minimum of 64 bytes to 256 bytes or more. 3.7.8051 Micro Controller Architecture: The 8051 architecture consists of these specific features: 1. 2. 3. Eight bit CPU with registers A (the accumulator) and B Sixteen-bit program counter (PC) and data pointer (DPTR) Eight- bit stack pointer (PSW) Eight-bit stack pointer (Sp) Internal ROM or EPROM (8751) of 0(8031) to 4K (8051) Internal RAM of 128 bytes: Four register banks, each containing eight registers Sixteen bytes, which maybe addressed at the bit level Eighty bytes of general- purpose data memory Thirty two input/output pins arranged as four 8-bit ports:p0-p3 23 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Two 16-bit timer/counters: T0 and T1 Full duplex serial data receiver/transmitter: SBUF Control registers: TCON, TMOD, SCON, PCON, IP, and IE Two external and three internal interrupts sources. Oscillator and clock circuits.

Fig 3.3

Functional Block Diagram Of Micro Controller

3.7.1. 8051 oscillator and clock: The heart of the 8051 circuitry that generates the clock pulses by which all the internal all internal operations are synchronized. Pins XTAL1 And XTAL2 is provided for connecting a resonant network to form an oscillator. Typically a quartz crystal and capacitors are employed. The crystal frequency is the basic internal clock frequency of the microcontroller. The manufacturers make 8051 designs that run at specific minimum and maximum frequencies typically 1 to 16 MHz.

24 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Fig 3.4

Oscillator and timing circuit

3.7.2 Types of Memory: The 8051 have three general types of memory. They are on-chip memory, external Code memory and external RAM. On-Chip memory refers to physically existing memory on the micro controller itself. External code memory is the code memory that resides off chip. This is often in the form of an external EPROM. External RAM is the Ram that resides off chip. This often is in the form of standard static RAM or flash RAM.

25 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

a)

Code memory Code memory is the memory that holds the actual 8051 programs that is to be run. This memory is limited to 64K. Code memory may be found on-chip or off-chip. It is possible to have 4K of code memory on-chip and 60K off chip memory simultaneously. If only off-chip memory is available then there can be 64K of off chip ROM. This is controlled by pin provided as EA

b) Internal RAM The 8051 have a bank of 128 bytes of internal RAM. The internal RAM is found on-chip. So it is the fastest Ram available. And also it is most flexible in terms of reading and writing. Internal Ram is volatile, so when 8051 is reset, this memory is cleared. 128 bytes of internal memory are subdivided. The first 32 bytes are divided into 4 register banks. Each bank contains 8 registers. Internal RAM also contains 128 bits, which are addressed from 20h to 2Fh. These bits are bit addressed i.e. each individual bit of a byte can be addressed by the user. They are numbered 00h to 7Fh. The user may make use of these variables with commands such as SETB and CLR. 3.7.3 Special Function registered memory: Special function registers are the areas of memory that control specific functionality of the 8051 micro controller. a) Accumulator (0E0h) As its name suggests, it is used to accumulate the results of large no of instructions. It can hold 8 bit values. b) B register (0F0h) The B register is very similar to accumulator. It may hold 8-bit value. The b register is only used by MUL AB and DIV AB instructions. In MUL AB the higher byte of the product gets stored in B register. In div AB the quotient gets stored in B with the remainder in A.

26 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

c) Stack pointer (81h) The stack pointer holds 8-bit value. This is used to indicate where the next value to be removed from the stack should be taken from. When a value is to be pushed onto the stack, the 8051 first store the value of SP and then store the value at the resulting memory location. When a value is to be popped from the stack, the 8051 returns the value from the memory location indicated by SP and then decrements the value of SP. d) Data pointer The SFRs DPL and DPH work together work together to represent a 16-bit value called the data pointer. The data pointer is used in operations regarding external RAM and some instructions code memory. It is a 16-bit SFR and also an addressable SFR. e) Program counter The program counter is a 16 bit register, which contains the 2 byte address, which tells the 8051 where the next instruction to execute to be found in memory. When the 8051 is initialized PC starts at 0000h. And is incremented each time an instruction is executes. It is not addressable SFR. f) PCON (power control, 87h) The power control SFR is used to control the 8051s power control modes. Certain operation modes of the 8051 allow the 8051 to go into a type of sleep mode which consume much lee power.

g) TCON (timer control, 88h) The timer control SFR is used to configure and modify the way in which the 8051s two timers operate. This SFR controls whether each of the two timers is running or stopped and contains a flag to indicate that each timer has overflowed. Additionally, some non-timer related bits are located in TCON SFR. These bits are used to configure the way in which the external interrupt flags are activated, which are set when an external interrupt occurs.

27 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

h) TMOD (Timer Mode, 89h) The timer mode SFR is used to configure the mode of operation of each of the two timers. Using this SFR your program may configure each timer to be a 16-bit timer, or 13 bit timer, 8-bit auto reload timer, or two separate timers. Additionally you may configure the timers to only count when an external pin is activated or to count events that are indicated on an external pin.

i) TO (Timer 0 low/high, address 8A/8C h) These two SFRs taken together represent timer 0. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is configurable is how and when they increment in value. j) T1 (Timer 1 Low/High, address 8B/ 8D h) These two SFRs, taken together, represent timer 1. Their exact behavior depends on how the timer is configured in the TMOD SFR; however, these timers always count up. What is Configurable is how and when they increment in value. k) P0 (Port 0, address 90h, bit addressable) This is port 0 latch. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P0.0, bit 7 is pin p0.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level.

28 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

l) P1 (port 1, address 90h, bit addressable) This is port latch1. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level m) P2 (port 2, address 0A0h, bit addressable) : This is a port latch2. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level. n) P3(port 3,address B0h, bit addressable): This is a port latch3. Each bit of this SFR corresponds to one of the pins on a micro controller. Any data to be outputted to port 0 is first written on P0 register. For e.g., bit 0 of port 0 is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high level on the corresponding I/O pin whereas a value of 0 will bring it to low level o) IE (interrupt enable, 0A8h): The Interrupt Enable SFR is used to enable and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the specific interrupts, where the MSB bit is used to enable or disable all the interrupts. Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an individual interrupt is enabled by setting a lower bit.

p) IP (Interrupt Priority, 0B8h) The interrupt priority SFR is used to specify the relative priority of each interrupt. On 8051, an interrupt maybe either low or high priority. An interrupt may interrupt interrupts. For e.g., if we configure all interrupts as low priority other than serial interrupt. The serial interrupt always interrupts 29 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

the system, even if another interrupt is currently executing. However, if a serial interrupt is executing no other interrupt will be able to interrupt the serial interrupt routine since the serial interrupt routine has the highest priority.

q) PSW (Program Status Word, 0D0h) The program Status Word is used to store a number of important bits that are set and cleared by 8051 instructions. The PSW SFR contains the carry flag, the auxiliary carry flag, the parity flag and the overflow flag. Additionally, it also contains the register bank select flags, which are used to select, which of the R register banks currently in use.

r) SBUF (Serial Buffer, 99h) SBUF is used to hold data in serial communication. It is physically two registers. One is writing only and is used to hold data to be transmitted out of 8051 via TXD. The other is read only and holds received data from external sources via RXD. Both mutually exclusive registers use address 99h. 3.8. Input Output Ports: One major feature of a microcontroller is the versatility built into the input/output (I/O) circuits that connect the 8051 to the outside world. The main constraint that limits numerous functions is the number of pins available in the 8051 circuit. The DIP had 40 pins and the success of the design depends on the flexibility incorporated into use of these pins. For this reason, 24 of the pins may each used for one of the two entirely different functions which depend, first, on what is physically connected to it and, then, on what software programs are used to program the pins.

30 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

PORT 0 Port 0 pins may serve as inputs, outputs, or, when used together, as a bi directional low-order address and data bus for external memory. To configure a pin as input, 1 must be written into the corresponding port 0 latch by the program. When used for interfacing with the external memory, the lower byte of address is first sent via PORT0, latched using Address latch enable (ALE) pulse and then the bus is turned around to become the data bus for external memory. PORT 1 Port 1 is exclusively used for input/output operations. PORT 1 pins have no dual function. When a pin is to be configured as input, 1 is to be written into the corresponding Port 1 latch. PORT 2 Port 2 may be used as an input/output port. It may also be used to supply a high order address byte in conjunction with Port 0 low-order byte to address external memory. Port 2 pins are momentarily changed by the address control signals when supplying the high byte a 16-bit address. Port 2 latches remain stable when external memory is addressed, as they do not have to be turned around (set to 1) for data input as in the case for Port 0. PORT 3 Port 3 may be used to input /output port. The input and output functions can be programmed under the control of the P3 latches or under the control of various special function registers. Unlike Port 0 and Port 2, which can have external addressing functions and change all eight-port b se, each pin of port 3 maybe individually programmed to be used as I/O or as one of the alternate functions. The Port 3 alternate uses are:

Pin P3.0 - RXD P3.1 - TXD P3.2 - INTO 0

Alternate Use Serial data input Serial data output External interrupt 0

SFR SBUF SBUF TCON.1 31

PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

P3.3 - INTO 1 P3.4 - T0 P3.5 T1 P3.6 - WR P3.7 - RD 3.9 INTERRUPTS:

External interrupt 1 External Timer 0 input External timer 1 input External memory write pulse External memory read pulse

TCON.3 TMOD TMOD -

Interrupts are hardware signals that are used to determine conditions that exist in external and internal circuits. Any interrupt can cause the 8051 to perform a hardware call to an interrupt handling subroutine that is located at a predetermined absolute address in the program memory. Five interrupts are provided in the 8051. Three of these are generated automatically by the internal operations: Timer flag 0, Timer Flag 1, and the serial port interrupt (RI or TI) Two interrupts are triggered by external signals provided by the circuitry that is connected to the pins INTO 0 and INTO1. The interrupts maybe enable or disabled, given priority or otherwise controlled by altering the bits in the Interrupt Enabled (IE) register, Interrupt Priority (IP) register, and the Timer Control (TCON) register. . These interrupts are mask able i.e. they can be disabled. Reset is a non maskable interrupt which has the highest priority. It is generated when a high is applied to the reset pin. Upon reset, the registers are loaded with the default values. Each interrupt source causes the program to do store the address in PC onto the stack and causes a hardware call to one of the dedicated addresses in the program memory. The appropriate memory locations for each for each interrupt are as follows: Interrupt RESET IE0 (External interrupt 0) TF0 (Timer 0 interrupt) IE1 (External interrupt 1) TF1 (Timer 1 interrupt) SERIAL Address 0000 0003 000B 0013 001B 0023 32 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Functions of micro controller in main unit are 1. 2. 3. 4. 5. Sends appropriate commands to ADC to start conversion, Collects the output of ADC for every 10 sec and stores in buffer, Sends command to the modem for dialing the base every 80 sec, Sends data in a serial manner to MODEM, After data gets transmitted sends command for disconnection.

6. Sends appropriate information to the display unit as per status of the communication medium. 3.10. Programming the Flash The AT89C51 is normally shipped with the on-chip flash memory array in the erased state ( that is, contents=FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12volt) or a low voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89C51 inside the users system, while the high-voltage programming mode is compatible with conventional third party flash of EPROM programmers. The AT89C51 is shipped with either the high-voltage or low-voltage programming mode enabled. To program any nonblank byte in the on-chip Flash memory, the entire memory must be erased using the Chip Erase Mode. 3.10.1 Programming algorithm: Before programming the AT89C51, the address the data and control signals should be set up according to the Flash programming mode. To program the AT89C51, take the following steps. 1. 2. 3. 4. 5. Input the desired memory location on the address lines. Input the appropriate data byte on the data lines. Activate the correct combination of control signals. Raise EA/VPP to 12V for the high-voltage programming mode. Pulse ALE/PROG once to program a byte in the flash array or the lock bits. The byte-write cycle is

self-timed and typically takes no more than 1.5 ms. Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached.

33 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

HARDWARE DESCRIPTION
The block diagram of the system is as shown in the Figure.2.1. The system basically consists of a 1. 2. 3. 4. 5. 6. 7. Micro controller DTMF-8870 DC motor LCD display Power supply Printed circuit boards LED

4.1. 8870 CMOS Integrated DTMF Receiver The dual-tone multifrequency (DTMF) signal was originally developed just over 25 years ago. This was before the U.S. government forced Bell Telephone to break up, allowing the company to expand into other markets. DTMF is commonly known as touch-tone dialing. The standard DTMF signal is composed of two audio tones generated from a group of eight possible tone frequencies. The eight frequencies are divided into two equal groups, a low-frequency group and a high-frequency group (see Table 5.2). The DTMF signal is an algebraic sum of two tone frequencies, one tone from each frequency group (see Figs. 5.13 through 5.15). If we do the math, we see that there are 4 * 4= 16 possible combinations.

Table 4.1. Row Column frequency of DTMF receiver 34 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Figure 4.1 (a) low frequency tone waveform. (b) high frequency tone waveform. (c) algebraic sum of low and high frequency(DTMF).

Figure 4.2. 4*4 keyboard matrix showing individual DTMF frequencies.


35 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The low frequencies (R1 to R4) are referred to as the row group. The high frequencies (C1 to C4) are referred to as the column group.

4.1.1. Pin diagram of 8870:

Fig 4.3. 8870 Pin Diagram

36 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

TABLE 4.3. 8870 Pin functional Tabel

4.1.2. Features
1. 2. 3. 4. 5. 6. 7. Full DTMF receiver Less than 35mW power consumption Industrial temperature range Uses quartz crystal or ceramic resonators Adjustable acquisition and release times 18-pin DIP, 18-pin DIP EIAJ, 18-pin SOIC, 20-pin PLCC

37 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.1.3. Functional Description


The CAMD CM8870/70C DTMF Integrated Receiver provides the design engineer with not only consumption. But high performance in a small 18-pin DIP, SOIC, or 20-pin PLCC package configuration. The CM8870/70s internal architecture consists of a band split filter section which separates the high and low tones of the received pair, followed by a digital decode (counting) section which verifies both the frequency and duration of the received tones before passing the resultant 4-bit code to the output bus.

38 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Fig. 4.4 8870 Block Diagram And Timing 4.1.4. DTMF encoding: Any combination of frequencies can be obtained using a 4 *4 matrix of switches or keypad (see Fig. 5.16). Remember we are borrowing this technology from the telephone industry; it has been designed for optimum efficiency for less-than-perfect telephone lines. Standard touch-tone telephones use a 3 * 4 keypad matrix. This switch matrix provides coding for all the row frequencies and only three column frequencies (see Fig. 5.17). A 3 * 4 keypad matrix is more readily available and has been used with all the circuits described here. Not all telephone keypads are made the same; therefore, some keypads on the market will not be suitable in these circuits. For instance, some keypads have different internal switch wiring or include proprietary ICs. So if you try another keypad, keep that in mind if the circuit fails to operate properly. Building a DTMF encoder is simple. The circuit only requires a keypad, crystal, and 8870 IC.

39 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Figure 4.5. DTMF encoder circuit using 4*4 keyboard matrix. Table 4.4. Functional Diode table

40 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.1.5. Applications 1. 2. 3. 4. 5. 6. 7. PABX Central office Mobile radio Remote control Remote data entry Call limiting Telephone answering system

4.2. Motor
DC motors are configured in many types and sizes, including brush less, servo, and gear motor types. A motor consists of a rotor and a permanent magnetic field stator. The magnetic field is maintained using either permanent magnets or electromagnetic windings. DC motors are most commonly used in variable speed and torque. Motion and controls cover a wide range of components that in some way are used to generate and/or control motion. Areas within this category include bearings and bushings, clutches and brakes, controls and drives, drive components, encoders and resolves, Integrated motion control, limit switches, linear actuators, linear and rotary motion components, linear position sensing, motors (both AC and DC motors), orientation position sensing, pneumatics and pneumatic components, positioning stages, slides and guides, power transmission (mechanical), seals, slip rings,solenoids,springs.

Motors are the devices that provide the actual speed and torque in a drive system. This family includes AC motor types (single and multiphase motors, universal, servo motors, induction, synchronous, and gear motor) and DC motors (brush less, servo motor, and gear motor) as well as linear, stepper and air motors, and motor contactors and starters. In any electric motor, operation is based on simple electromagnetism. A currentcarrying conductor generates a magnetic field; when this is then placed in an external magnetic field, it will experience a force proportional to the current in the conductor, and to the strength of the external 41 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

magnetic field. As you are well aware of from playing with magnets as a kid, opposite (North and South) polarities attract, while like polarities (North and North, South and South) repel. The internal configuration of a DC motor is designed to harness the magnetic interaction between a current-carrying conductor and an external magnetic field to generate rotational motion. Let's start by looking at a simple 2-pole DC electric motor (here red represents a magnet or winding with a "North" polarization, while green represents a magnet or winding with a "South" polarization).

Figure 4.6. Different parts of motor


Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator, commutator, field magnet(s), and brushes. In most common DC motors (and all that Beamers will see), the external magnetic field is produced by high-strength permanent magnets1. The stator is the stationary part of the motor -- this includes the motor casing, as well as two or more permanent magnet pole pieces. The rotor (together with the axle and attached commutator) rotates with respect to the stator. The rotor consists of windings (generally on a core), the windings being electrically connected to the commutator. The above diagram shows a common motor layout -- with the rotor inside the stator (field) magnets. The geometry of the brushes, commutator contacts, and rotor windings are such that when power is applied, the polarities of the energized winding and the stator magnet(s) are misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets. As the rotor reaches alignment, the brushes move to the next commutator contacts, and energize the next winding. Given our example twopole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field, and driving it to continue rotating.

42 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

In real life, though, DC motors will always have more than two poles (three is a very common number). In particular, this avoids "dead spots" in the commutator. You can imagine how with our example two-pole motor, if the rotor is exactly at the middle of its rotation (perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-pole motor, there is a moment where the commutator shorts out the power supply (i.e., both brushes touch both commutator contacts simultaneously). This would be bad for the power supply, waste energy, and damage motor components as well. Yet another disadvantage of such a simple motor is that it would exhibit a high amount of torque ripple" (the amount of torque it could produce is cyclic with the position of the rotor).

Figure 4.7. Direction of rotation Motor So since most small DC motors are of a three-pole design, let's tinker with the workings of one animation (JavaScript required): You'll notice a few things from this -- namely, one pole is fully energized at a time (but two others are "partially" energized). As each brush transitions from one commutator contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly charge up (this occurs within a few microsecond). We'll see more about the effects of this later, but in the meantime you can see that this is a direct result of the coil windings' series wiring: tive

Figure 4.8. Winding of a motor


43 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

There's probably no better way to see how an average dc motor is put together, than by just opening one up. Unfortunately this is tedious work, as well as requiring the destruction of a perfectly good motor. This is a basic 3-pole dc motor, with 2 brushes and three commutator contacts.

4.2.1.Voltage:
You probably know that DC motors are non-polarized - meaning that you can reverse voltage without any bad things happening. Typical DC motors are rated from about 6V-12V. The larger ones are often 24V or more. But for the purposes of a robot, you probably will stay in the 6V-12V range. So why do motors operate at different voltages? As we all know (or should), voltage is directly related to motor torque. More voltage, higher the torque. But don't go running your motor at 100V cause thats just not nice. A DC motor is rated at the voltage it is most efficient at running. If you apply too few volts, it just wont work. If you apply too much, it will overheat and the coils will melt. So the general rule is, try to apply as close to the rated voltage of the motor as you can. Also, although a 24V motor might be stronger, do you really want your robot to carry a 24V battery (which is heavier and bigger) around? My recommendation is do not surpass 12V motors unless you really really need the torque. 4.2.2.Current: As with all circuitry, you must pay attention to current. Too little, and it just won't work. Too much, and you have meltdown. When buying a motor, there are two current ratings you should pay attention to. The first is operating current. This is the average amount of current the motor is expected to draw under a typical torque. Multiply this number by the rated voltage and you will get the average power draw required to run the motor. The other current rating which you need to pay attention to is the stall current. This is when you power up the motor, but you put enough torque on it to force it to stop rotating. This is the maximum amount of current the motor will ever draw, and hence the maximum amount of power too. So you must design all control circuitry capable of handling this stall current. Also, if you plan to constantly run your motor, or run it higher than the rated voltage, it is wise to heat sink your motor to keep the coils from melting.

44 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.2.3. Power Rating: How high of a voltage can you over apply to a motor? Well, all motors are (or at least should be) rated at a certain wattage. Wattage is energy. Inefficiency of energy conversion directly relates to heat output. Too much heat, the motor coils melt. So the manufacturers of [higher quality] motors know how much wattage will cause motor failure, and post this on the motor spec sheets. Do experimental tests to see how much current your motor will draw at a desired voltage. The equation is: Power (watts) = Voltage * Current Increase voltage and measure current until the power is about ~90% below the given power rating. 4.2.4.Torque:

When buying a DC motor, there are two torque value ratings which you must pay attention to. The first is operating torque. This is the torque the motor was designed to give. Usually it is the listed torque value. The other rated value is stall torque. This is the torque required to stop the motor from rotating. You normally would want to design using only the operating torque value, but there are occasions when you want to know how far you can push your motor. If you are designing a wheeled robot, good torque means good acceleration. My personal rule is if you have 2 motors on your robot, make sure the stall torque on each is enough to lift the weight of your entire robot times your wheel radius. Always favor torque over velocity. Remember, as stated above, your torque ratings can change depending on the voltage applied. So if you need a little more torque to crush that cute kitten, going 20% above the rated motor voltage value is fairly safe (for you, not the kitten). Just remember that this is less efficient, and that you should heat sink your motor

45 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.3. LIQUID CRYSTAL DISPLAY


The alphanumeric 16character X 2line LCD requires 8data lines and also 3 control signals and they are interfaced to 3664.By using 2 ports, port 0&3 data pins are connected to LCD as data bus. Port0 can be basically used as I/O port i.e. it can be programmed as an input or as an output port. That means if it is programmed as output port, suppose if it is required to read data from LCD immediately it is not possible. Before reading the data it is required to make the port as an input port. Data reading from LCD gives an erroneous reading & should not be implemented. Because of this port5 is made as input / output port depending on the situation. The control signals are connected to port 3 pins. They are EN bar & RS bar, RW bar. At different instance such as data write / command write / data read etc. Various signals are to be provided as indicated by the by the LCD manufacturers. To interface the LCD, to the Micro controller it require an 8 bit and also three control signals differentiate the data from the control words send to the LCD. The Micro controller has to send the necessary control words followed by the data to be displayed. Depending on the operation to be performed the control words are selected and passes to the LCD. The data to be displayed on the LCD is to be sent in the ASCII format. Thus all the character to be displayed are converted into ASCII form and then sent to the LCD along with different control words. The control words differentiated the various operations and are executed. It is also possible to read the LCD data if required. The control signals to the LCD are also provided by the Micro controller. This is also done through pins 3.5, 3.6&3.7.Through program necessary control signals are passed to the LCD by using the bits of the port. The remaining can be used for some other purpose if there is a need. The software controls the necessary ports and performs the task it is designed for. The software and associated hardware perform the LCD interface. .

46 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

LCD DISPLAY
Gnd vcc preset rs rw en d0 d1 d2 d3 d4 d5 d6 d7 vcc gnd

Fig. 4.9. Pin Diagram Of LCD A liquid crystal is a material (normally organic for LCDs) that will flow like a liquid but whose molecular structure has some properties normally associated with solids. The Liquid Crystal Display (LCD) is a low power device. The power requirement is typically in the order of microwatts for the LCD. However, an LCD requires an external or internal light source. It is limited to a temperature range of about 0C to 60C and lifetime is an area of concern, because LCDs can chemically degrade. There are two major types of LCD s which are: 1) Dynamic-scattering LCD s 2) Field-effect LCD s Field-effect LCD s are normally used in such applications where source of energy is a prime factor (e.g., watches, portable instrumentation etc.).They absorb considerably less power than the lightscattering type. However, the cost for field-effect units is typically higher, and their height is limited to 2 inches. On the other hand, light-scattering units are available up to 8 inches in height. Field-effect LCD is used in the project for displaying the appropriate information. The turn-on and turn-off time is an important consideration in all displays. The response time of LCD s is in the range of 100 to 300ms.The lifetime of LCD s is steadily increasing beyond 10,000+hours limit. Since the colour generated by LCD units is dependent on the source of illumination, there is a wide range of colour choice.

47 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.4. LIGHT EMITING DIODES:


It is a semiconductor diode having radioactive recombination. It requires a definite amount of energy to generate an electron-hole pair. The same energy is released when an electron recombines with a hole. This released energy may result in the emission of photon and such a recombination. Hear the amount of energy released when the electro reverts from the conduction band to the valence band appears in the form of radiation. Alternatively the released energy may result in a series of phonons causing lattice vibration. Finally the released energy may be transferred to another electron. The recombination radiation may be lie in the infra-red and visible light spectrum. In forward is peaked around the band gap energy and the phenomenon is called injection luminescence. I n a junction biased in the avalanche break down region, there results a spectrum of photons carrying much higher energies . Almost White light then gets emitted from micro-plasma breakdown region in silicon junction. Diodes having radioactive recombination are termed as Light Emitting Diode, abbreviated as LEDs. In gallium arsenide diode , recombination is predominantly a radiation recombination and the probability of this radioactive recombination far exceeds that in either germanium or silicon . Hence GaAs LED has much higher efficiency in terms of Photons emitted per carrier. The internal efficiency of GaAs LED may ba very close to 100% but because of high index of refraction, only a small fraction of the internal radiation can usually come out of the device surface. In spite of this low efficiency of actually radiated light , these LEDs are efficiency used as light emitters in visual display units and in optically coupled circuits, The efficiency of light generation increases with the increase of injected current and with decreases in temperature. The light so generated is concentrated near the junction since most of the charge carriers are obtained within one diffusion length of the diode junction. The following are the merits of LEDs over conventional incandescent and other types of lamps Low working voltages and currents Less power consumption Very fast action Emission of monochromatic light small size and weight 48 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

No effect of mechanical vibrations Extremely long life Typical LED uses a forward voltage of about 2V and current of 5 to 10mA. GaAs LED produces infra-red light while red, green and orange lights are produced by gallium arsenide phosphide (GaAs) and gallium phosphide(Gap) .

Example:

Circuit symbol:

4.5. REGULATED POWER SUPPLY 4.5.1. DESCRIPTION


A variable regulated power supply, also called a variable bench power supply, is one where you can continuously adjust the output voltage to your requirements. Varying the output of the power supply is the recommended way to test a project after having double checked parts placement against circuit drawings and the parts placement guide. This type of regulation is ideal for having a simple variable bench power supply. Actually this is quite important because one of the first projects a hobbyist should undertake is the construction of a variable regulated power supply. While a dedicated supply is quite handy e.g. 5V or 12V, it's much handier to have a variable supply on hand, especially for testing. Most digital logic circuits and processors need a 5 volt power supply. To use these parts we need to build a regulated 5 volt source. Usually you start with an unregulated power supply ranging from 9 volts to 24 volts DC (A 12 volt power supply is included with the Beginner Kit and the Microcontroller Beginner Kit.). To make a 5 volt power supply, we use a LM7805 voltage regulator IC (Integrated Circuit). The IC is shown below.The LM7805 is simple to use. You simply connect the positive lead of your unregulated DC power supply (anything from 9VDC to 24VDC) to the Input pin, connect the negative lead to the Common pin and then when you turn on the power, you get a 5 volt supply from the Output pin. 49 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.5.2.CIRCUIT FEATURES hot Circuit complexity: Very simple and easy to build Circuit performance: Very stable +5V output voltage, reliable operation Availability of components: Easy to get, uses only very common basic components Design testing: Based on datasheet example circuit, I have used this circuit successfully as part Applications: Part of electronics devices, small laboratory power supply Power supply voltage: Unregulated DC 8-18V power supply Power supply current: Needed output current + 5 mA Component costs: Few dollars for the electronics components + the input transformer cost Brief description of operation: Gives out well regulated +5V output, output current capability of Circuit protection: Built-in overheating protection shuts down output when regulator IC gets too

100 mA

of many electronics projects

BLOCK DIAGRAM

50 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Fig. 4.10 Block Diagram of Power Supply

4.5.4 CIRCUIT DIAGRAM

Fig. 4.11 Circuit Diagram of regulated power supply

4.5.5.BASIC POWER SUPPLY CIRCUIT

Above is the circuit of a basic unregulated dc power supply. A bridge rectifier D1 to D4 rectifies the ac from the transformer secondary, which may also be a block rectifier such as WO4 or even four individual diodes such as 1N4004 types.

51 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The principal advantage of a bridge rectifier is you do not need a centre tap on the secondary of the transformer. A further but significant advantage is that the ripple frequency at the output is twice the line frequency (i.e. 50 Hz or 60 Hz) and makes filtering somewhat easier. As a design example consider we wanted a small unregulated bench supply for our projects. Here we will go for a voltage of about 12 - 13V at a maximum output current (I L) of 500ma (0.5A). Maximum ripple will be 2.5% and load regulation is 5%. Now the RMS secondary voltage (primary is whatever is consistent with your area) for our power transformer T1 must be our desired output Vo PLUS the voltage drops across D2 and D4 ( 2 * 0.7V) divided by 1.414. This means that Vsec = [13V + 1.4V] / 1.414 which equals about 10.2V. Depending on the VA rating of your transformer, the secondary voltage will vary considerably in accordance with the applied load. The secondary voltage on a transformer advertised as say 20VA will be much greater if the secondary is only lightly loaded. If we accept the 2.5% ripple as adequate for our purposes then at 13V this becomes 13 * 0.025 = 0.325 Vrms. The peak to peak value is 2.828 times this value. Vrip = 0.325V X 2.828 = 0.92 V and this value is required to calculate the value of C1. Also required for this calculation is the time interval for charging pulses. If you are on a 60Hz system it it 1/ (2 * 60 ) = 0.008333 which is 8.33 milliseconds. For a 50Hz system it is 0.01 sec or 10 milliseconds. Remember the tolerance of the type of capacitor used here is very loose. The important thing to be aware of is the voltage rating should be at least 13V X 1.414 or 18.33. Here you would use at least the standard 25V or higher (absolutely not 16V).With our rectifier diodes or bridge they should have a PIV rating of 2.828 times the Vsec or at least 29V. Don't search for this rating because it doesn't exist. Use the next highest standard or even higher. The current rating should be at least twice the load current maximum i.e. 2 X 0.5A or 1A. A good type to use would be 1N4004, 1N4006 or 1N4008 types.

52 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

These are rated 1 Amp at 400PIV, 600PIV and 1000PIV respectively. Always be on the lookout for the higher voltage ones when they are on special. The fuse F1 must be able to carry the primary current but blow under excessive current, in this case we use the formula from the diagram. Here N = 240V / 10V or perhaps 120V / 10V. The fuse calculates in the first instance to [ 2 X 0.5A ] / [240 / 10] or .04A or 40 ma. In the second case .08A or 80 ma. The difficulty here is to find suitable fuses of that low a current and voltage rating. In practice you use the closest you can get (often 100 ma ). Don't take that too literal and use 1A or 5A fuses.

CONSTRUCTION
The whole project MUST be enclosed in a suitable box. The main switch (preferably double pole) must be rated at 240V or 120V at the current rating. All exposed parts within the box MUST be fully insulated, preferably with heat shrink tubing.

4.6. Relay Drivers:


A relay is an electrically operated switch. Current flowing through the coil of the relay creates a magnetic field which attracts a lever and changes the switch contacts.The coil current can be on or off so relays have two switch positions and they are double throw (changeover) switches.

Fig. 4.13. Relays


Relays allow one circuit to switch a second circuit which can be completely separate from the first. For example a low voltage battery circuit can use a relay to switch a 230V AC mains circuit. There is no electrical connection inside the relay between the two circuits, the link is magnetic and mechanical. 53 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The coil of a relay passes a relatively large current, typically 30mA for a 12V relay, but it can be as much as 100mA for relays designed to operate from lower voltages. Most ICs (chips) cannot provide this current and a transistor is usually used to amplify the small IC current to the larger value required for the relay coil. The maximum output current for the popular 555 timer IC is 200mA so these devices can supply relay coils directly without amplification. Relays are usually SPDT or DPDT but they can have many more sets of switch contacts, for example relays with 4 sets of changeover contacts are readily available. For further information about switch contacts and the terms used to describe them please see the page on switches. Most relays are designed for PCB mounting but you can solder wires directly to the pins providing you take care to avoid melting the plastic case of the relay. The supplier's catalogue should show you the relay's connections. The coil will be obvious and it may be connected either way round. Relay coils produce brief high voltage 'spikes' when they are switched off and this can destroy transistors and ICs in the circuit. To prevent damage you must connect a protection diode across the relay coil. The animated picture shows a working relay with its coil and switch contacts. You can see a lever on the left being attracted by magnetism when the coil is switched on. This lever moves the switch contacts. There is one set of contacts (SPDT) in the foreground and another behind them, making the relay DPDT. The relay's switch connections are usually labelled COM, NC and NO: COM = Common, always connect to this, it is the moving part of the switch. NC = Normally Closed, COM is connected to this when the relay coil is off. NO = Normally Open, COM is connected to this when the relay coil is on. Connect to COM and NO if you want the switched circuit to be on when the relay coil is on. Connect to COM and NC if you want the switched circuit to be on when the relay coil is off.

4.6.1. Choosing a relay


You need to consider several features when choosing a relay: 54 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Physical size and pin arrangement If you are choosing a relay for an existing PCB you will need to ensure that its dimensions and pin arrangement are suitable. You should find this information in the supplier's catalogue. Coil voltage The relay's coil voltage rating and resistance must suit the circuit powering the relay coil. Many relays have a coil rated for a 12V supply but 5V and 24V relays are also readily available. Some relays operate perfectly well with a supply voltage which is a little lower than their rated value. Coil resistance The circuit must be able to supply the current required by the relay coil. You can use Ohms law to calculate the current: For example: A 12V supply relay with a coil resistance of 400 will require a transistor to amplify the current. Switch ratings (voltage and current) The relay's switch contacts must be suitable for the circuit they are to control. You will need to check the voltage and current ratings. Note that the voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V AC". passes a current of 30mA. This

is OK for a 555 timer IC (maximum output current 200mA), but it is too much for most ICs and they

Switch ratings (voltage and current)

55 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The relay's switch contacts must be suitable for the circuit they are to control. You will need to check the voltage and current ratings. Note that the voltage rating is usually higher for AC, for example: "5A at 24V DC or 125V AC". Switch contact arrangement (SPDT, DPDT etc) Most relays are SPDT or DPDT which are often described as "single pole changeover" (SPCO) or "double pole changeover" (DPCO). For further information please see the page on switches. 4.6.2. Protection diodes for relays Transistors and ICs (chips) must be protected from the brief high voltage 'spike' produced when the relay coil is switched off. The diagram shows how a signal diode (eg 1N4148) is connected across the relay coil to provide this protection. Note that the diode is connected 'backwards' so that it will normally not conduct. Conduction only occurs when the relay coil is switched off, at this moment current tries to continue flowing through the coil and it is harmlessly diverted through the diode. Without the diode no current could flow and the coil would produce a damaging high voltage 'spike' in its attempt to keep the current flowing.

4.6.3. Advantages and Disadvantages of Relays:


Advantages: Relays can switch AC and DC, transistors can only switch DC. Relays can switch high voltages, transistors cannot. Relays are a better choice for switching large currents (> 5A). Relays can switch many contacts at once.

Disadvantages:

56 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Relays are bulkier than transistors for switching small currents. Relays cannot switch rapidly (except reed relays), transistors can switch many times per Relays use more power due to the current flowing through their coil. Relays require more current than many chips can provide, so a low power transistor may be

second.

needed to switch the current for the relay's coil.

4.7 PRINTED CIRCUIT BOARD


Printed circuit boards may be covered in two topics namely 1) Technology 2) Design Introduction to printed circuit boards: It is called PCB in short; printed circuit consists of conductive circuit pattern Applied to one or both sides of an insulating base, depending upon that, it is called single sided PCB or double-sided PCB.(SSB and DSB). Conductor materials available are silver, brass, aluminum and copper. Copper is most widely used. The thickness of conducting material depends upon the current carrying capacity of circuit. Thus a thicker copper layer will have more current carrying capacity. The printed circuit boards usually serves three distinct functions. 1) 2) 3) it provides mechanical support for the components mounted on it. It provides necessary electrical interconnections. It acts as heat sink that is provides a conduction path leading to removal of the heat generated in the circuit.

57 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

4.7.1 Advantages of PCB:


1) When a number of identical assemblies are required. PCBs provide cost saving because once a layout is approved there is no need to check the circuit every time. 2) For large equipments such as computers, the saving on checking connections or wires is substantial. 3) PCBs have controllable and predictable electrical and mechanical properties. 4) A more uniform product is produced because wiring errors are eliminated. 5) The distributed capacitances are constant from one production to another. 6) Soldering is done in one operation instead of connecting discrete components by wires. 7) The PCB construction lands itself for automatic assembly. 8) Spiral type of inductors may be printed. 9) Weight is less. 10) It has miniaturization potential. 11) It has reproducible performance. 12) All the signals are accessible for testing at any point along conductor track.

4.7.2. MANIFACTURING PROCESS OF PRINTED CIRCUIT BOARD


The conductor pattern which is on the master film is transferred on copper clad laminate by two methods. (1) Photo resist printing (2) Screen printing Photo resist printing: Photopolymer resist is a light sensitive organic material like KPR (Kodak photo resist), which is applied to the board as a film. The photo resist when exposed ultraviolet light hardens ore polymerizes. Once it is polymerized, it becomes insoluble to certain chemical solvents known as developers. The developer dissolves the portion which is masked or which is not exposed to light. Thus the pattern that is to be drawn on PCB is derived from the artwork, which is a photographical process. This is transferred to a master film on 1:1 scale. This can be reduced to any small size thus miniaturization is 58 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

possible. The pattern is transferred to a mask. This mask is kept on PCB. The whole process is known as image transfer. Now it is subjected to UV rays. The unpolymerized or masked portion is washed away in developer leaving wanted copper pattern on board. KPR or photo resist is then removed.

Screen-printing: This technique is similar to the used in printing industry. The copper foil is covered with printing ink where the conduction paths are going to be. The screen, which is used for pattern, is of either stainless steel or polyester mesh, which is dimensionally accurate and fine mesh. The open meshes of screen correspond to the pattern. .

squeegee
screen ink frame

hinge

PCB

59 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

SOFTWARE MODULE
5.1 SOFTWARE MODULE:

Software Used: Keil Software for C Programming


SOURCE CODE

1. 2.

Click on the Keil uVision Icon on DeskTop The following fig will appear

3. 4.

Click on the Project menu from the title bar Then Click on New Project

60 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

5.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

6. 7. 8.

Then Click on Save button above. Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel

61 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

9.

Select AT89C51 as shown below

10. 11.

Then Click on OK The Following fig will appear

62 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

12.

Then Click either YES or NOmostly NO

13. 14.

Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

63 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

15.

Click on the file option from menu bar and select new

16.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

17. 18.

Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C

64 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

19.

Now right click on Source group 1 and click on Add files to Group Source

20.

Now you will get another window, on which by default C files will appear.

65 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

21. 22. 23.

Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.

24.

If the file contains no error, then press Control+F5 simultaneously. 66 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

25.

The new window is as follows

26.

Then Click OK

27.

Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

28.

Drag the port a side and click in the program file.

67 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

29. 30.

Now keep Pressing function key F11 slowly and observe. You are running your program successfully

5.2 Flow Chart


START

ON THE POWER SUPPLY

CONNECT THE MOBILE TO THE GSM PORT PRESS KEYS

IF 1& 9 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

68

YES

FIRST RELAY

IF 2& 9

YES MOTOR +

IF 3& 9

YES

BULB

IF 4& 9

YES

FIRST LED

IF 5& 9

YES

SECOND LED

IF 6& 9

YES

THIRD LED

+ 69

PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

IF 7& 9

YES

FOURTH LED

IF 8& 9

YES FIFTH LED +

IF 1& 9

YES ALL ARE ON +

IF 1& 9

ALL ARE OFF

70 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

SOURCE CODE
Soft ware code for Mobile controlled home appliances #include<reg52.h> #include<lcd.h> void delay(int); void disp_name(); void disp_name2(); void disp_name1(); void disp_name3(); void disp_name4() ; void disp_name5() ; void disp_name6(); void disp_name7(); void disp_name8(); void disp_name9(); void disp_name10(); void disp_name11(); void disp_name12(); int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0; void main() { P2=0xff; P0=0xff; lcd_init(); disp_name1(); lcd_init1(); disp_name(); while(1) { while(1) { ///////////////////////////// for 1//////////////////////////////////// if(P24==0&&P23==0||P22==0&&P21==0&&P20==1) { delay(10); P00=~P00; lcd_init(); if{ disp_name2(); lcd_init1(); disp_name3(); } 71 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

delay(10); } ////////////////////////for 2//////////////////////////////////////////// if(P24==0&&P23==0&&P21==1&&P20==0) { P01=~P01; lcd_init(); disp_name4(); lcd_init1(); disp_name3(); delay(100); } ///////////////////////for 3////////////////////////////////////////////// if(P24==0&&P23==0&&P22==0&&P21==1&&P20==1) { P02=~P02; lcd_init(); disp_name5(); lcd_init1(); disp_name3(); delay(100); } ///////////////////////for 4////////////////////////////////////////////// if(P24==0&&P23==0&&P22==1&&P21==0&&P20==0) { P03=~P03; lcd_init(); disp_name6(); lcd_init1(); disp_name3(); delay(100); } /////////////////////for 5////////////////////////////////////////////// if(P24==0&&P23==0&&P22==1&&P21==0&&P20==1) { P04=~P04; lcd_init(); disp_name7(); lcd_init1(); disp_name3(); delay(100); } ////////////////////for 6/////////////////////////////////////////////////// if(P24==0&&P23==0&&P22==1&&P20==0) { P05=~P05; 72 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

lcd_init(); disp_name8(); lcd_init1(); disp_name3(); delay(100); } ////////////////////for 7////////////////////////////////////////////////// if(P24==0&&P23==0&&P21==1&&P20==1) { P06=~P06; lcd_init(); disp_name9(); lcd_init1(); disp_name3(); delay(100); } //////////////////////////for 8////////////////////////////////////////////// if(P24==0&&P23==1&&P21==0&&P20==0) { P07=~P07; lcd_init(); disp_name10(); lcd_init1(); disp_name3(); delay(100); } /////////////////////for 9/////////////////////////////////////////////////// /*if(P24==0&&P23==1&&P22==0&&P21==0&&P20==1) { P02=~P02; } */ /////////////////////////for 0/////////////////////////////////////////////// if(P24==0&&P23==1&&P22==0&&P21==1&&P20==0) { P0=0X00; lcd_init(); disp_name11(); } ///////////////////////for #///////////////////////////////////////////////// if(P24==0&&P23==1&&P22==1&&P21==0&&P20==0) { P=0XFF; 73 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

lcd_init(); disp_name12(); } }} } ////////////////////////////////////////////////////////////////////////////////// void delay() { int i,j; for(i=0;i<5;i++) { for(j=0;j<10000;j++) {} } } /////////////////////////////////////////////////////////////// void disp_name() { char i=0; char databyte[]={"Home appliances"}; send_command(0xc0); while(databyte[i]!='\0') { send_data(databyte[i]); i++; } } ///////////////////////////////////////////////////////////////// void disp_name1() { char i=0; char databyte[]={"mobile controlle"}; send_command(0x80); while(databyte[i]='0') { send_data(databyte[i]); i++; }} //////////////////////////////////////////////////////////////////// void disp_name2() { char i=0; 74 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

char databyte[]={"first device co- "}; send_command(0x80); while(databyte[i]='0') { send_data(databyte[i]); i++; }} ////////////////////////////////////////////////////////////////////////////////////// void disp_name3() { char i=0; char databyte[]={"ntrolling active"}; send_command(0xc0); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} /////////////////////////////////////////////////////////////////////////// void disp_name4() { char i=0; char databyte[]={"second device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} ////////////////////////////////////////////////////////////////////////////////// void disp_name5() { char i=0; char databyte[]={"third device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} /////////////////////////////////////////////////////////////////////////////////// void disp_name6() { char i=0; char databyte[]={"fourth device co-"}; 75 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} //////////////////////////////////////////////////////////////////////////////////// void disp_name7() { char i=0; char databyte[]={"fifth device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} ///////////////////////////////////////////////////////////////////////////////// void disp_name8() { char i=0; char databyte[]={"sixth device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} //////////////////////////////////////////////////////////////// void disp_name9() { char i=0; char databyte[]={"seventh device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} /////////////////////////////////////////////////////////////////////////// void disp_name10() { 76 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

char i=0; char databyte[]={"Eighth device co-"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} /////////////////////////////////////////////////////////////////////////// void disp_name12() { char i=0; char datate[]={"All devices OFF"}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }} /////////////////////////////////////////////////////////////////////////// void disp_name11() { char i=0; char databyte[]={"All devices ON "}; send_command(0x80); while(databyte[i]!='\0') { send_data(databyte[i]); i++; }}

77 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

CONCLUSION

The project MOBILE OPERATION LAND ROVER WITH VIDEO ON SCREEN has been successfully designed and tested. Conventional wireless controlled rovers utilize RF circuits, which had limitations like limited range, limited frequency ranges and controls, unlimited range (coverage area of the service provider), no fear of interfering with other controllers and we can have as much as 12 controls. The project describes an implementation of a system that has mobile operated prototype wheeled land rover over a kilometer in natural, outdoor terrain. To support the interaction of both web and on-site visitors with the robot and its environment, appropriate software and hardware (embedded) interfaces have been employed.

78 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

Future work
Mobile operated rover is a basic telepresence system that can be improved upon with a little thought. Improvements will add cost to the system. However, these subsystem improvements can be added over a time. Stereo-vision: Implementing high-fidelity stereo-vision on the Golem is a worthwhile endeavor. There are great benefits to be derived from this experimentation, namely, depth perception. This is still an area where significant contribution can be made. Before undertaking this project it is important to realize than an HMD that supplies stereo images to the user will be needed to view stereo images transmitted from the T-bot . the small size of the miniature video cameras is good for stereographic imaging. It allows two cameras to be positioned side by side at the same intraocular distance (pupil to pupil) for adult humans is about 3mm. the cameras lenses can be positioned, from center to center, this same distance apart to mimic the IOD humans use for depth perception . the transmitters for each camera must be tuned to transmit on different frequencies. This allows the HMD video receivers to accurately display the right eye image to the right eye and the left eye image to the left eye. Seeing in stereo from the Golem provides the operator with depth perception when he or she is driving. Stereo-vision becomes increasingly more important when depth perception is needed, for instance when using a robotic arm. Being able to see the manipulator (robot arm) move along Z axis in a three-dimensional(3D) coordinate (X,Y, and Z ) allows for efficient operation. It is difficult for an operator to efficiently use robotic arms via telepresence when the Z dimensions (depth) is lost in a monocular view. Operators are forced to gently bump into objects to approximate the robotic manipulators location along the Z axis.

79 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

The same is true when driving a telepresence car. One quickly loses depth perception, and it becomes difficult to determine how far ahead of the vehicle something is. When the stereo sytem is set up, the operator of the vehicle will see the T-bots environment as a 3D picture. However, the stereo image transmitted will not contain the very important convergence clues. Much of our distance reckoning incorporates convergence clues we get from our eyes. Convergence is the angle our eyes rotate inward. In contrast, when viewing an object that is far away, our eyes look straight ahead. The brain automatically brings this convergence information to bear in calculating distance. The stereo video cameras are in a fixed position looking straight ahead. To add convergence clues would require eye tracking engineering. A feedback-providing HMD would need to constanly ascertain the operators eye convergence. The eye tracking (convergence) information would be transmitted to servo motors that hold the video cameras and would converge the video cameras in direct proportion to the operators eye convergence. This type of master-slave system, as far as I know, has not been built. It needs to be determined how accurate this system would be in helping an operator guage distance. While building this system is beyond the scope of this book, it is not beyond the scope of the avid experimenter. Digital compass Includes plans for a digital compass that is suitable for use with Golem. The compass can be set up in two different ways. The first method keeps the light-emitting diodes (LEDs) of the compass in the visual field of the video cameras. A quick look informs the operator in which direction Golem is traveling. The second option uses a radio link between the digital output of the compass on the T-bot and the remote location of the operator. Rumble interface When driving the model car via telepresence, we cannot feel the tilt or roughness of the road as we drive. To incorporate a rumble into the system, we could use the spring suspension of the model car. Any number of sensors can be used for this purpose, for instance, piezoelectric
80 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

transducers, Hall devices, and strain gauges. The challenge to the experimenter is not in detecting the rumble, but in providing that information to the seat of the operator. Most motion platforms use expensive pneumatic and hydraulic systems. If cost is an issue, this isnt an option. A cheaper solution can be found in the ThunderSeat by Thunder-Seat Technologies. The Thunder seat utilizes any sound source to generate vibratory sensations. It contains a subwoofer speaker coupled to an acoustical wave chamber inside the seat. The wave chamber vibrates the entire seat. The low-frequency (woofer) speaker can handle up to 100 watts (W) of power. The frequency response of the system is 50Hz to 3.7kHz. originally designed to work with flight simulator programs running with a sound card on a personal computer( PC), the output from the sound card is fed into an amplifier and then to the thunder seat. Tilt interface As with the rumble interface, there are several transducers one can use to determine tilt. One tilt sensor uses a steel ball in a plastic enclosure. When tilted, the steel ball makes contact with electrodes placed in the enclosure. Mercury switches may also be used. Electrolytic tilt sensors are expensive, but are excellent sensors. A single electrolytic fluid makes contact with the internal electrodes varies in proportion to the degree of tilt. Unfortunately, the electrolytic sensors cannot be read using a direct current (DC) voltage source. This would cause the deposits to form on the electrodes, rendering them useless. Instead an AC voltage of approximately 3V with a frequency of 1000 Hz is fed to the sensor. The AC voltage from the center electrode is in proportion to the tilt of the sensor. If one were to use the electrolytic tilt sensor, I can suggest one way to set up the information flow. Connect the AC output of the tilt sensor to a bridge rectifier to obtain a DC equivalent voltage. The DC voltage is fed to a voltage-controlled oscillator (VCO). The VCO output frequency varies in proportion to the input voltage. The output of the VCO is transmitted over a radio link to a receiver on the motion platform. Spectron, Inc., offers an integrated circuit, the SA40011,
81 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

that simplifies interfacing electrolytic tilt sensors. The DC output from the SA40011 can be fed to a VCO as describes before. Again, implementing tilt to the operator is the difficult part of the system. Proportional pneumatic or hydraulic systems can be employed to the seat to provide it. Great video range The range of our small transmitter is approximately 100 to 300 feet (ft). obviously for longer distances another system needs to be employed; it is called amateur television. Amateur television(ATV) has been around for a number of years. Its been a method for radio amateur to communicate via two-way television. ATV has been the province of the elite radio hobbyist due to the expensive cost of equipment. However, recent advances in solid-states technology have changed that.

31. 32.

Click on the Keil uVision Icon on DeskTop The following fig will appear

33. 34.

Click on the Project menu from the title bar Then Click on New Project 82 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

35.

Save the Project by typing suitable project name with no extension in u r own folder sited in either C:\ or D:\

36. 37. 38.

Then Click on Save button above. Select the component for u r project. i.e. Atmel Click on the + Symbol beside of Atmel

83 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

39.

Select AT89C51 as shown below

40. 41.

Then Click on OK The Following fig will appear

84 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

42.

Then Click either YES or NOmostly NO

43. 44.

Now your project is ready to USE Now double click on the Target1, you would get another option Source group 1 as shown in next page.

85 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

45.

Click on the file option from menu bar and select new

46.

The next screen will be as shown in next page, and just maximize it by double clicking on its blue boarder.

47. 48.

Now start writing program in either in C or ASM For a program written in Assembly, then save it with extension . asm and for C based program save it with extension .C

86 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

49.

Now right click on Source group 1 and click on Add files to Group Source

50.

Now you will get another window, on which by default C files will appear.

87 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

51. 52. 53.

Now select as per your file extension given while saving the file Click only one time on option ADD Now Press function key F7 to compile. Any error will appear if so happen.

54.

If the file contains no error, then press Control+F5 simultaneously. 88 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

55.

The new window is as follows

56.

Then Click OK

57.

Now Click on the Peripherals from menu bar, and check your required port as shown in fig below

58.

Drag the port a side and click in the program file.

89 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

59. 60.

Now keep Pressing function key F11 slowly and observe. You are running your program successfully

90 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

LIST OF FIGURES
Fig1.1:Robot Definition.........................3 Fig 2.1. Block Diagram..9 Fig 2.2. Schematic Diagram...........................10 Fig 2.3.Picture Of Mobile Operated Rover With Video On Mobile.16 Fig3.1: Showing A Typical Microcontroller Device And Its Different Subunits..17 Fig 3.2.Pin Out Diagram Of 89c51 Ic...19 Fig 3.3: Functional Block Diagram Of Micro Controller...24 Fig 3.5: Oscillator And Timing Circuit...25 Fig 4.1(a) Low Frequency Tone Waveform36 (b)High Frequency Tone Waveform..36 (c)Algebraic Sum Of Low And High frequency(DTMF)....36 Fig 4.2. 4*4 Keyboard Matrix Showing Individual DTMF Frequencies..37 Fig 4.3.8870 Pin Diagram38 Fig 4.4 8870 Block Diagram And Timing Diagram39 Fig 4.5. DTMF Encoder Circuit Using 4*4 Keyboard Matrix..40 Fig 4.6. Different Parts Of Motor42 Fig 4.7 Direction Of Rotation Motor43 Fig 4.8. Winding Of A Motor44 Fig 4.9. Pin Diagram Of Lcd Display47 Fig 4.10 Block Diagram Of Power Supply...50 Fig 4.11 Circuit Diagram Of Regulated Power Supply.51 Fig 4.12.Basic Power Supply Circuit52 Fig 4.13. Relay Drivers..55 Fig 4.14. Screen Printing Machine Fig 4.15. Implementation Of Mobile Operated Land Rover With Video On Mobile

91 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

LIST OF TABELS
TABLE 2.1. WORKING ACTIONS OF ROVER14 TABLE 4.1. ROW COLUMN FREQUENCY OF DTMF RECIEVER...36 TABLE 4.2.DTMF FREQUENCIES38 TABLE 4.3 . 8870 PIN FUNCTIONAL TABLE.40 TABLE 4.4. FUNCTIONAL DIODE TABLE41

92 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

BIBLOGRAPHY
1. 2. 3. 4. WWW.MITEL.DATABOOK.COM WWW.ATMEL.DATABOOK.COM WWW.FRANKLIN.COM WWW.KEIL.COM

REFERENCES 1. 8051-MICROCONTROLLER AND EMBEDDED SYSTEM. Mohd. Mazidi. 2. EMBEDDED SOFTWARE PRIMER. David .E. Simon.

93 PYDAH COLLEGE OF ENGINEERING & TECHNOLOGY

You might also like