Você está na página 1de 39

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER -1

INTRODUCTION
1.1 INTRODUCTION TO REMOTE CONTROLLED ANDROID: A system designed to record and report on discrete activities within a process is called as Tracking System. In the same procedure we have developed a methodology of robot direction system for robotics to control and achieve accurate direction for a class of non-linear systems in the presence of disturbances and parameter variations by using wireless communication technique. In our project we can control the robot by using wireless communication i.e. from Control section (acts as transmitter) we are sending the control signals, then the robot receives (acts as receiver) the signals, according to the signals being received the direction of the robot is controlled. This project is designed around a Microcontroller which forms the control unit of the project. According to this project, an RF transmitter is used to transmit the control signals, which controls the direction of the robot. In the same way, RF receiver which is placed on the robot receives the RF signals according to which the direction of the robot is controlled. The microcontroller plays important role in controlling the direction according to RF signals being received at the Receiver side ie.. Robot section. This project finds its place in places where one wants to control the direction of any automated device using wireless communication.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 1

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER 2

BLOCK DIAGRAM DESCRIPTION


The proposed system consits of a wheeled robot thah is capable of locomation by taking decision as per the given instruction.

TRANSMITER SECTION:

RF Keypad ENCODER Transmitter

RECEVIER SECTION:

BATTERY

MOTOR DRIVER

Micro
D E RF RECEIVER C O D E R Fig2:BLOCKDIAGRAM MOTOR

Controller

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 2

REMOTE CONTROLLED ANDROID USING RF

2011-2012

2.1 MICRO CONTROLLER AT89C51:


The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S51 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM contents but freezes the oscillator, disabling all other chip functions until the next external interrupt or hardware reset. The Intel 8051 is Harvard architecture, single chip microcontroller which was devoloped by Intel in 1980s and early 1990s but today it has largeley been superseded by a vast range of Enhanced devices with 8051 compatible processor cores that are manufactured by more than 20 idependent manufactures including Atmel,Infineon Technologies and Maxim Integrated Products. 8051 is am 8-bit controller, meaning that the CPU can work on only 8 bits of data at a Time.Data larger than 8 bits has to be broken into 8-bit pieces to be processed by the CPU. 8051 is available in different memory types such as UV-EPROM, FLASH and NV-RAM. [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 3

REMOTE CONTROLLED ANDROID USING RF

2011-2012

The microcontroller used in this is AT89C51. Atmel Corporation introduced this 89C51 microcontroller. The microcontroller belongs to 8051 family.This microcontroller had 128 bytes of RAM, 4K bytes of on-chip ROM, two timers, one serial port and four ports (each 8-bits wide) all on a single chip. AT89C51 is Flash type 8051. The present project is implemented on keil vision. In order to prgrame the device,protocol tool has been used to burn the program onto the microcontroller. The features, pin description of the microcontroller and the software tools used are discussed in the following sections.

2.1.1 FEATURES OF AT89C51:


Compatible with MCS-51 Products 4K Bytes of In-System Programmable (ISP) Flash Memory 4.0V to 5.5V Operating Range 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes

Two level Program Memory Lock

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 4

REMOTE CONTROLLED ANDROID USING RF

2011-2012

2.1.2 DESCRIPTION:
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory.The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry- standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. Software Selectable power saving modes. The idle Mode stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system to continue functioning. The power- down mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

2.2 PIN DIAGRAM

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 5

REMOTE CONTROLLED ANDROID USING RF

2011-2012

2.3 Block diagram of 89C51


2.1.3 PIN DESCRIPTION: VCC: Pin 40 provides Supply voltage to the chip. GND: Pin 20 is the Ground. XTAL1 and XTAL2:
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that can be configured for use as an on-chip oscillator, as shown in Figure 2. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven, as shown in Figure 3. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 6

REMOTE CONTROLLED ANDROID USING RF

2011-2012

but minimum and maximum voltage high and low time specification must be observed.

FIG 2.4 OSCILLATOR CONNECTIONS

FIG 2.5 EXTERNAL CLOCK DRIVE CONFIGURATION

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

ALE/PROG: Address Latch Enable (ALE) is an output pulse for latching the low
byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 7

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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 (PSEN) is the read strobe to external program
memory. When the AT89S51 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.

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.

Port 0: Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each
pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 can also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode, P0 has internal pull-ups. Port 0 also receives the code bytes during Flash programming and outputs the code bytes during program verification. External pullups are required during program verification.

Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The Port 1
output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins, they are pulled high by the 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.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 8

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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

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

verification. Port 3 also serves the functions of various special features of the AT89S51, as shown in the following table.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 9

REMOTE CONTROLLED ANDROID USING RF

2011-2012

PORT 3 ALTERNATE FUNCTIONS:

2.1.4 PROGRAMMING THE FLASH


The AT89C51 is normally shipped with the on-chip Flash memory array in the erased state and ready to be programmed. The programming interface accepts either a highvoltage or a low voltage programming mode provides a convinenient way to program the AT89C51 inside the users system, while the high-voltage progrmming mode is compatible with conventional third party Flash or EPROM programmers.

2.1.4.1 PROGRAMMING ALGORITHM:


Before programming the AT89S51, the address, data, and control signals should be set up according to the Flash programming mode table and Figures 13 and 14. To program the AT89S51, take the following steps: 1.Input the desired memory location on the address lines. 2.Input the appropriate data byte on the data lines. 3. Activate the correct combination of control signals. 4. Raise EA/VPP to 12V. 5. Pulse ALE/PROG once to program a byte in the Flash array or the lock bits. The bytewrite cycle is self-timed and typically takes no more than 50 s. Repeat steps

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 10

REMOTE CONTROLLED ANDROID USING RF

2011-2012

1 through 5, changing the address and data for the entire array or until the end of the object file is reached.

2.1.4.2 Data Polling: The AT89S51 features Data Polling to indicate the end of a
byte write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written data on P0.7. Once the write cycle has been completed, true data is valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated.

2.1.4.3 Ready/Busy: The progress of byte programming can also be monitored by


the RDY/BSY output signal. P3.0 is pulled low after ALE goes high during programming to indicate BUSY. P3.0 is pulled high again when programming is done to indicate READY.

2.1.4.4 Program Verify: If lock bits LB1 and LB2 have not been programmed,
the programmed code data can be read back via the address and data lines for verification. The status of the individual lock bits can be verified directly by reading them back.

2.1.4.5 Chip Erase: In the parallel programming mode, a chip erase operation is
initiated by using the proper combination of control signals and by pulsing ALE/PROG low for a duration of 200 ns - 500 ns. In the serial programming mode, a chip erase operation is initiated by issuing the Chip Erase instruction. In this mode, chip erase is self-timed and takes about 500 ms. During chip erase, a serial read from any address location will return 00H at the data output.Programming the Flash Serial Mode

2.1.4.6 Reading the Signature Bytes: The signature bytes are read by the same
procedure as a normal verification of locations 000H, 100H, and 200H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows. (000H) = 1EH indicates manufactured by Atmel (100H) = 51H indicates 89S51

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 11

REMOTE CONTROLLED ANDROID USING RF

2011-2012

2.1.4.7 flash programming mode:

TABLE:FLASH PROGRAMMING MODE

FIG2.6:PROGRAMMING THE FLASH [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 12

REMOTE CONTROLLED ANDROID USING RF

2011-2012

2.2 RF MODULE:
RADIO FREQUENCY Radio Frequency (RF) does not refer just to radio broadcasting but rather encompasses all of the electromagnetic spectrum. RF energy is classified according to frequency. The range of frequencies is called the Radio Spectrum. While there is no precise beginning or end to frequencies making up the RF spectrum, Figure 1 shows the generally accepted ranges and class designations.

HOW IS THE RF HARNESSED In order for a signal to be transmitted wireless, it is necessary for the signal to be conveyed into free space then recovered and restored to its original form. Two devices are used to accomplish this task: the transmitter and the receiver. The Transmitter: The function of a transmitter is to take an analog or digital signal and, through an antenna, deliver it into free space. A simple transmitter is illustrated below.

You will notice the transmitter has three primary components: a frequency source (the oscillator), a gain stage (the amplifier) and a free space coupler (the antenna). The oscillator generates the frequency at which the transmitter will operate. This frequency is called the Fundamental. In order for the fundamental frequency to be transmitted effectively through the resistance of free space, it is necessary for the signal to be amplified. This is the purpose of the gain stage. Once the oscillators frequency has been amplified, it [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 13

REMOTE CONTROLLED ANDROID USING RF

2011-2012

must transition from being a frequency contained within conductors (called transmission lines) into free space. This is the function of the antenna. The

transmitting antenna allows the RF energy to be efficiently radiated from the output stage into free space. It is, in essence, a bridge between a guided wave and free space. MODULATION: Now that you have a basic understanding of how a signal finds itself delivered into free space, you may be wondering how any useful information could be represented by that signal. The answer is Modulation. Modulation is the process whereby a carrier medium is impressed with content. The frequency to be controlled is called the Carrier. A carrier is like a moving truck. Just as you might place the contents of your house on the truck, so the information you wish to transmit is loaded onto a carrier. That signal, which has been impressed onto the carrier for transportation, is called the Program or Control Signal. In the case of digital data transmission, a carrier frequency is modulated with a control signal consisting of binary data. The Receiver: The purpose of a receiver is to receive the modulated carrier, remove it, and recover the original program signal. This process is called Demodulation. Below figure shows the block diagram of the simple receiver.

While receiver topologies vary widely all involve several stages to affect the reception and recovery process. First, the receiving antenna intercepts the electromagnetic waves radiated from the transmitting antenna. When these waves impinge upon the receiving antenna, they induce a small voltage in it. This voltage [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 14

REMOTE CONTROLLED ANDROID USING RF

2011-2012

causes a weak current to flow, which contains the same frequency as the original current in the transmitting antenna. That current is amplified to a more useable level and then fed into a device called a mixer. The mixer takes this incoming signal and combines it with an on-board frequency source called a local oscillator. This converts the signal to a new lower frequency called the Intermediate Frequency or IF for short. The detector then strips out the IF frequency and leaves present only the original information. By now you should have a basic, but clear, understanding of how information signals are transmitted and received. With that as a foundation, you are now ready to consider the steps involved in putting RF to work for you. common frequencies within the band and their uses: The RF frequencies we are using in the project are three standard frequencies within the band from 260 to 470MHz. These frequencies are 315, 418, and 433.92MHz. 315MHz is commonly used for gate/garage door openers, security and keyless entry systems. 418MHz is a very clean frequency here in the US and also appropriate for operation in the UK. 433.92MHz is used throughout all of Europe. While it is appropriate for use here in the US, interference from armature radio and the nearby pager band may sometimes pose a problem. RF transmitter section: RF transmitters are electronic devices that create continuously varying electric current, encode sine waves, and broadcast radio waves. RF transmitters use oscillators to create sine waves, the simplest and smoothest form of continuously varying waves, which contain information such as audio and video. Modulators encode these sign wives and antennas broadcast them as radio signals. There are several ways to encode or modulate this information, including amplitude modulation (AM) and frequency modulation (FM). Radio techniques limit localized interference and noise. With direct sequence spread spectrum, signals are spread over a large band by multiplexing the signal with a code or signature that modulates each bit. With frequency hopping spread spectrum, signals move through a narrow set of channels in a sequential, cyclical, and predetermined pattern.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 15

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Selecting RF transmitters requires an understanding of modulation methods such as AM and FM. On-off key (OOK), the simplest form of modulation, consists of turning the signal on or off. Amplitude modulation (AM) causes the base band signal to vary the amplitude or height of the carrier wave to create the desired information content. Frequency modulation (FM) causes the instantaneous frequency of a sine wave carrier to depart from the center frequency by an amount proportional to the instantaneous value of the modulating signal. Amplitude shift key (ASK) transmits data by varying the amplitude of the transmitted signal. Frequency shift key (FSK) is a digital modulation scheme using two or more output frequencies. Phase shift key (PSK) is a digital modulation scheme in which the phase of the transmitted signal is varied in accordance with the base band data signal. Additional considerations when selecting RF transmitters include supply voltage, supply current, RF connectors, special features, and packaging. Some RF transmitters include visual or audible alarms or LED indicators that signal operating modes such as power on or reception. Other devices attach to coaxial cables or include a connector or port to which an antenna can be attached. Typically, RF transmitters that are rated for outdoor use feature a heavy-duty waterproof design. Devices with internal calibration and a frequency range switch are also available. RF transmitters are used in a variety of applications and industries. Often, devices that are used with integrated circuits (ICs) incorporate surface mount technology (SMT), through hole technology (THT), and flat pack. In the telecommunications industry, RF transmitters are designed to fit in a metal rack that can be installed in a cabinet. RF transmitters are also used in radios and in electronic article surveillance systems (EAS) found in retail stores. Inventory management systems use RF transmitters as an alternative to barcodes.

2.3 HT12A/HT12E/2
General Description:

12

Series of Encoders

The 2^12 encoders are a series of CMOS LSIs for remote control system applications. They are capable of encoding information which consists of N address bits and 12-N data bits. Each ad- dress/data input can be set to one of the two logic states. The programmed addresses/data are transmitted together with the header bits via an RF or [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 16

REMOTE CONTROLLED ANDROID USING RF

2011-2012

an infrared transmission medium upon receipt of a trigger signal. The capability to select a TE trigger on the HT12E or a DATA trigger on the HT12A further enhances the application flexibility of the 212 series of encoders. The HT12A additionally provides a 38 kHz carrier for infrared systems. Minimum transmission word Four words for the HT12E One word for the HT12A Built-in oscillator needs only 5% resistor Data code has positive polarity Minimal external components HT12A/E: 18-pin DIP/20-pin SOP package Features Operating voltage 2.4V~5V for the HT12A 2.4V~12V for the HT12E Low power and high noise immunity CMOS Technology.

2.4 HT12D/HT12F/2 Series of Decoders:


The 2 decoders are a series of CMOS LSIs for remote control system applications. They are paired with Holteks 2 series of encoders (refer to the encoder/de-coder cross reference table). For proper operation, a pair of encoder/decoder with the same number of ad-dresses and data format should be chosen. The decoders receive serial addresses and data from a programmed 2 series of encoders that are transmitted by a carrier using an RF or an IR transmission medium. They compare the serial input data three times continuously with their local addresses. If no error or un-matched codes are found, the input data codes are decoded and then transferred to the output pins. The VTpin also goes high to indicate a valid transmission. The 2 series of decoders are capable of decoding informations that consist of N bits of address and 12-Nbits of data. Of this series, the HT12D is arranged to pro-vide 8 address bits and 4 data bits, and HT12F is used to decode 12 bits of address information. Features: Operating voltage: 2.4V~12V [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 17
12 12 12 12

12

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Low power and high noise immunity CMOS technology Low standby current Capable of decoding 12 bits of information Binary address setting Received codes are checked 3 times Address/Data number combination HT12D: 8 address bits and 4 data bits HT12F: 12 address bits only Built-in oscillator needs only 5% resistor Valid transmission indicator Easy interface with an RF or an infrared transmission medium Minimal external components Pair with Holteks 2 series of encoders 18-pin DIP, 20-pin SOP package
12

2.5 H-BRIDGES:
H-bridge. Sometimes called a "full bridge" the H-bridge is so named because it has four switching elements at the "corners" of the H and the motor forms the cross bar. The key fact to note is that there are, in theory, four switching elements within the bridge. These four elements are often called, high side left, high side right, low side right, and low side left (when traversing in clockwise order). The switches are turned on in pairs, either high left and lower right, or lower left and high right, but never both switches on the same "side" of the bridge. If both switches on one side of a bridge are turned on it creates a short circuit between the battery plus and battery minus terminals. If the bridge is sufficiently powerful it will absorb that load and your batteries will simply drain quickly. Usually however the switches in question melt. To power the motor, you turn on two switches that are diagonally opposed. In the picture to the right, imagine that the high side left and low side right switches are turned on. The current flows and the motor begins to turn in a "positive" direction. Turn on the high side right and low side left switches, then Current flows the other direction through the motor and the motor turns in the opposite direction. [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 18

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Actually it is just that simple, the tricky part comes in when you decide what to use for switches. Anything that can carry a current will work, from four SPST switches, one DPDT switch, relays, transistors, to enhancement mode power MOSFETs. One more topic in the basic theory section, quadrants. If each switch can be controlled independently then you can do some interesting things with the bridge, some folks call such a bridge a "four quadrant device" (4QD get it?). If you built it out of a single DPDT relay, you can really only control forward or reverse. You can build a small truth table that tells you for each of the switch's states, what the bridge will do. As each switch has one of two states, and there are four switches, there are 16 possible states. However, since any state that turns both switches on one side on is "bad" (smoke issues forth: P), there are in fact only four useful states (the four quadrants) where the transistors are turned on. High Side Left High Side Right Low Side Left Low Side Right Quadrant Description On Off On Off Off On On Off Off On Off On On Off Off On Forward Running Backward Running Braking Braking

The last two rows describe a maneuver where you "short circuit" the motor which causes the motors generator effect to work against itself. The turning motor generates a voltage which tries to force the motor to turn the opposite direction. This causes the motor to rapidly stop spinning and is called "braking" on a lot of H-bridge designs.Of course there is also the state where all the transistors are turned off. In this case the motor coasts freely if it was spinning and does nothing if it was doing nothing.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 19

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Fig: 2.7 H-BRIDGE CONNECTION USING TRANSISTORS

2.6 MOTORS:
A motor is a machine which converts energy inyo rotating motion. The dictionary defination of motor is broader than that but when engineers and mechanics talk about motors they are almost always talking about rotating motion.there are different names for devices which convert energy into other types of motion.

2.7 BATTERY:
We are using 12v dc batter instead of power supply for receiver section and 9v Battery for transmitter section.

2.8 KEYPAD:
The keypad is used to give the control signal to do the particular task like moving the robot left and right or front and back. The RF encoder will encode the transmitted key as required for the RF transmitter i.e. it modulates the signal with carrier signal.RF transmitter will transmit the signal through the antenna. The RF receiver will receive the signal sent by the RF transmitter through the antenna. Now the decoder will decode the signal into signal i.e. in the formate of the voltage levels which are understandable levels to the 8051 microcontroller. The 8051 microcontroller will monitor the all functionalities of the project. The programme will be dumped into the micro controller depending upon the key we pressed the robot will be moved.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 20

REMOTE CONTROLLED ANDROID USING RF

2011-2012

In order to make the physical moment of the robot ,motor will be interfaced to the microcontroller through the ULN driver.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 21

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER 3

CIRCUIT DIAGRAM & DESCRIPTION


3.1 CIRCUIT DIAGRAM:
RF TRANSMITTER:

Fig 3.1 RF TRANSMITTER CIRCUIT DIAGRAM

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 22

REMOTE CONTROLLED ANDROID USING RF

2011-2012

RF RECIEVER:

Fig 3.2 RF RECEIVER CIRCUIT DIAGRAM


3.2 CIRCUIT DESCRIPTION: Transmitter section:
RF Encoder: This module is used to encode the given binary data into RF format and is given to RF transmitter. This module consists of 8 data lines and 10 address lines (A0 to A9) and these address lines are all connected to VSS (ground) pin of power supply. The 8 data lines are connected to 8 switches and TE (Transmit enable) pin is connected to VCC pin of power supply. And the encoded data is then transmitted to RF transmitter through DOUT pin (pin9) of RF encoder. And the supply connections are given from the Power supply output 7805 to the VCC and VSS pins of RF encoder. [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 23

REMOTE CONTROLLED ANDROID USING RF

2011-2012

RF Transmitter:
This module transmits the RF data which is given by RF encoder. It consists of 4 pins. One is antenna to transmit the data, two pin are power supply pins and one is input pin namely DATA pin to receive the RF data from RF encoder. The DATA pin of this RF transmitter is connected to pin9 (DOUT) of RF encoder.

Receiver section:
RF decoder: This module is used to decode the RF signal received from RF receiver and the data from the output pin of RF decoder is given to microcontroller pin12 of controller. This module consists of 8 data lines D1 D8, which are connected to 8 pins of port1 (P1). It will receive RF signal through DIN pin from RF receiver. Additionally it contains 10 address line and all are connected to ground (VSS).And the supply connections are given from the Power supply output 7805 to the VCC and VSS pins of the RF decoder. RF receiver: This module receives the RF signal, which is transmitted by RF transmitter and RF signal is given to pin9 of RF decoder DIN pin. It also consists of one antenna pin namely ANT through which, RF signals is received. And the supply connections are given from the Power supply output 7805 to the VCC and VSS pins of the RF receiver. In our project we can control the robot by using wireless communication i.e. from Control section (acts as transmitter) we are sending the control signals, then the robot receives (acts as receiver) the signals, according to the signals being received the direction of the robot is controlled. Whenever we press a key from RF keypad the concern code will be encoded by HT12E encoder and a RF signal will be generated. When this signal is received it will be decoded by using HT12D decoder and according to the key pressed robot direction is changed.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 24

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER-4

SOFTWARE REQUIRED
4.1 INTRODUCTION TO KIEL SOFTWARE

About Keil:
This is an IDE(Integrated Development Environment) that helps you write,compile,and debug embedded programes.It encapusulates the following components . A project manager. A make facility. Tool configuration. Editor. A powerful debugger. . STEP BY STEP PROCESS: Click on the Keil u Vision Icon on Desktop The following fig will appear

Click on the Project menu from the title bar [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 25

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Then Click on New Project

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

Then Click on Save button above. Select the component for u r project. i.e. Atmel [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 26

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Click on the + Symbol beside of Atmel

Select AT89C51 as shown below

Then Click on OK The Following fig will appear

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 27

REMOTE CONTROLLED ANDROID USING RF

2011-2012

Then Click either YES or NOmostly NO 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.

Click on the file option from menu bar and select new

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 28

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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

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 [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 29

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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

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

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 30

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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.

If the file contains no error, then press Control+F5 simultaneously.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 31

REMOTE CONTROLLED ANDROID USING RF

2011-2012

The new window is as follows

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

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 32

REMOTE CONTROLLED ANDROID USING RF

2011-2012

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

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

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 33

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER-5

APPLICATIONS & ADVATAGES


5.1 APPLICATIONS
Military surveillance. Hazardous Area Maintenance Like Nuclear Power Reactors. Hospitals To Maintain Sterile Environment. Industrial Automated Equipment Carriers. Other similar Applications.

5.2 ADVATAGES
Circuit is very simple. Components used are Economical. Compact,Power Efficient. No Manual Interpretation Required. Accuarcy Is Very High. Can Be Used In All Kinds Of Environment. When the task required would be dangerous for a person, they can do the work instead.

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 34

REMOTE CONTROLLED ANDROID USING RF

2011-2012

CHAPTER-6

CONCLUSION & FUTURE ENHANCEMENT


6.1 CONCLUSION
The project remote controlled android using rf remote controlled android using rf has been successfully designed and tested. It has been developed by integrating features of all the hardware components used.Presence of every module has been reasoned out and placed carefully thus contributing to the best working of the unit. Secondly, using highly advanced ICs and with the help of growing technology the project has been successfully implemented. Finally we conclude that remote controlled android using rf is an emerging field and there is a huge scope for research and development.

6.2 FUTURE ENHANCEMENT


In this project, the robot is controlled with the help of a keypad using RF technology which can be used to limited distance. If we use the GSM technology, we can control the robot using our mobile globally .

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 35

REMOTE CONTROLLED ANDROID USING RF

2011-2012

BIBLIOGRAPHY
REFERENCE BOOKS:
The 8051 Micro controller and Embedded Systems -Muhammad Ali Mazidi Janice Gillispie Mazidi

The 8051 Micro controller Architecture, Programming & Applications. -Kenneth J.Ayala

Fundamentals Of Micro processors and Micro computers -B.Ram

Micro processor Architecture, Programming & Applications -Ramesh S. Gaonkar

Electronic Components -D.V. Prasad Wireless Communications - Theodore S. Rappaport

Mobile Tele Communications - William C.Y. Lee

SOFTWARES:
KIEL C51 compiler user guide (keil software v3.60)

REFERENCES ON THE WEB:


www.national.com www.atmel.com www.microsoftsearch.com

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 36

REMOTE CONTROLLED ANDROID USING RF

2011-2012

APPENDIX
CODING:
5.1 ASM CODE FOR RECIEVER SECTION: /************ REMOTE CONTROLLED ROBOT USING IR OR RF ******** MODULES : AT89S51 MOTOR PINS(P1.0-P1.3) RF RX 4-BIT (DATA- P2.0 TO P2.3)

REMOTE: 4-BIT RF TX(4 KEYS ) **************************************************************/ /************* HEADDER FILES ************/ #include <reg51.h> /*********** DAT PINS *********/ sbit d0=P2^0; sbit d1=P2^1; sbit d2=P2^2; sbit d3=P2^3; /***********MOTOR PINS *********/ sbit m0=P1^0; sbit m1=P1^1; sbit m2=P1^2; sbit m3=P1^3; /******************* ROBOT FUNCTIONS ************/ /*********FORWARD FCUNCTION ********/ void forward() { m0=0; m1=1; m2=0; m3=1; [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 37

REMOTE CONTROLLED ANDROID USING RF

2011-2012

} /*********BACKWARD FCUNCTION ********/ void backward() { m0=1; m1=0; m2=1; m3=0; } /*********LEFT FCUNCTION ********/ void left() { m0=1; m1=1; m2=0; m3=1; } /*********RIGHT FCUNCTION ********/ void right () { m0=0; m1=1; m2=1; m3=1; } /********* STOP FCUNCTION ********/ void stop() { m0=1; m1=1; m2=1; m3=1; [JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 38

REMOTE CONTROLLED ANDROID USING RF

2011-2012

} /************************ MAIN FUCNTION *******************/ void main() { while(1) { if((d0==0 )&& (d1==1)&&(d2==1)&&(d3==1)) { forward(); while(d0==0);stop(); } if((d0==1 )&& (d1==0)&&(d2==1)&&(d3==1)) { backward(); while(d1==0);stop(); } if((d0==1 )&& (d1==1)&&(d2==0)&&(d3==1)) { left(); while(d2==0);stop(); } if((d0==1 )&& (d1==1)&&(d2==1)&&(d3==0)) { right(); while(d3==0);stop(); } } }

[JOGAIAH INSTITUTE OF TECHNOLOGY AND SCIENCES] 39

Você também pode gostar