Vous êtes sur la page 1sur 59

LIVE HUMAN BEING DETECTION WIRELESS REMOTE CONTROLLED ROBOT

ABSTRACT
AIM:
The main aim the project is to design LIVE HUMAN BEING DETECTION WIRELESS REMOTE CONTROLLED ROBOT.

COMPONENTS:
AT89C51, RF remote control,HT12D Decoder, HT12E Encoder, PIR sensor, Driver IC and DC motor.

EXISTING METHOD:
In the existing method we are controlling the robot by using IR remote which can control the robot in the line of sight only. The main disadvantage of this method is we can control the robot up to shortest range only and also during the earthquakes person cannot move into the places along with the robot for detection of the live person inside the area where person movement is not possible.

PROPOSED METHOD:
In the proposed method we are using RF remote control which can be used to control the robot at any range. To detect the live person we are using PIR sensor called as passive infrared sensor which is used to detect the persons whether they are alive or not. The remote uses certain range of Radio frequencies which is used to transfer the commands from the remote to the robot. By using this we can change the directions of the robot. The system uses a compact circuitry built around S3C2440 (ARM9)/LPC2148 (ARM7)/ 8051 microcontroller Programs are developed in Embedded C. Flash magic is used for loading programs into Microcontroller.

SOFTWARE: Embedded C TOOLS: Keil, Flash magic. TARGET DEVICE: AT89C51 Microcontroller. APPLICATIONS: used to detect the live persons where earthquakes are generated. ADVANTAGES: Low cost, easy to use for rural areas, automated operation, and Low
Power consumption.

REFERENCE:
1. The 8051 micro controller and embedded systems by Mazidi. 2. L293D datasheets 3. PIR sensor Datasheet

Chapter-1

INTRODUCTION
Live Human Being Detection Wireless Remote Control Robot is used to detect the live persons. This robot is very helpful in detecting live persons under the buried and pillars etc., whenever there is any earthquake occurred, tsunami or any other building collapse. At the time of these effects people may fell down and buried under the bridges and under the pillars etc., in some cases we cant get into that felled contacts and we cant help them. In such cases to save them immediately we use this robot. This robots job is to detect the live person and indicate the signal to the helpers.

1.1 Development Methods:


To implement this mechanism we used discrete components to control the robot , movement, and indicating signal purpose. We used ARM7 microcontroller to control the entire robot function it has vast advantages, and PIR sensor to detect live persons. DC motors are used to for robot movement and it can be controlled by user.

Fig. 1.1 Two wheel control human detection Robot

When we send this robot to such places where man movement is not possible, It will try to find out the live persons. The user will control the robot movement with the remote. The live person can be detected by the body temperature radiation. Normally human body will have 96.8 to 105c temperature range. The PIR (passive infrared) sensor will be designed like that it will activate when it will detect that much temperature. This project is sophisticated in the market since it is a real time embedded project. These projects can also be used in industries like in chemical factories. These can provide security to the valuable things. In the advanced market these robots are further implemented using the new technologies like GSM, GPS and LCD displays. Using these GSM technologies we can operate the robot from the far distances and we can identify the location using GPS. Using Camera at the Robot and LCD display at the user section we can operate the device accurately and it provides live section. Gear wheels can provide the accurate movement in all areas.

1.2 Statement of Problem:


There is many different kind of catastrophe in natural and man-made disaster: earthquake, flooding, hurricane and they cause disaster, many different people assistance). They need to cooperate to save lives, protect structural infrastructure, and evacuate victims to safety. In these situations, human rescuers must make quick decisions under stress, and try to get victims to safety often at their own risk. They must gather determine the location and status of victims and the stability of the structures as quickly as possible so that medics and firefighters can enter the disaster area and save victims. All of these tasks are performed mostly by human and trained dogs, often in very dangerous and risky situations. This is why since some years, mobile robots have been proposed to help them and to perform tasks that neither humans dogs nor existing tools can do. For this project, we will focused only on robots which will work in a disaster environment of man made structure, like collapsed buildings. different disaster area like collapsed building, landslide or crater. During these emergency situations, and specially in urban are deployed (policeman, fire fighters and medical

1.3 Advanced Technology:


The advent of new high-speed technology and the growing computer capacity provided realistic opportunity for new robot controls and realization of new methods of control theory. This technical improvement together with the need for high performance robots created faster, more accurate and more intelligent robots using new robots control devices, new drives and advanced control algorithms. This Project deals with live personal detection robot is based on 8 bit Microcontroller. This Robot follows which is drawn over the surface. Here we are using PIR sensor for detect the which are detect human.

Fig.1.2 Advanced Technology Human detection robot

The project is mainly used in the DEBRIS for Earth quake rescue. Internally it consists of IR sensors. The infrared sensors are used to sense the live persons. All the above systems are controlled by the Microcontroller. In our project we are using the popular 8 bit

microcontroller .The Microcontroller is used to control the motors. It gets the signals from the PIR sensors and it drives the motors according to the sensor inputs. Two DC gear motors are used to drive the robot.

Chapter-2 DESIGN AND DEVEPLOPMENT OF HARDWARE

Main Circuit Diagram and its overall operation:

Fig 2.1 Receiver circuit

TRANSMITTER CIRCUIT:

Fig 2.2 Transmitter Circuit

Fig 2.3 +5V Regulated power supply

INTERNAL WORKING EXPLANATION:

Mainly the block diagram consists of following parts: Power supply circuit Micro Controller RF transmitter and RF receiver PIR sensor Driver IC DC motor Buzzer Power supply IR receiver PIR sensor Driver IC DC motor Buzzer IR transmitter

The devices that act as input are

The devices that act as output are

Total circuit internal working explanation: The main aim is to design LIVE PERSON DETECTION ROBOT USIGN RF WIRELESS COMMUNICATION. This robot is developed by using LPC2148 micro controller to it RF receiver is connected and driver IC and DC motors are used. The robot movement is controlled by using RF remote control. This remote consists of RF transmitter through this remote robot movement is controlled by sending commands to robot through RF transmitter which receives data through RF receiver connected to controller and then based on commands received by controller for changing direction of robot. To change the position of robot RF transmitter is used which is used to change to particular direction. Consider To move robot in forward direction then particular command is send to controller through RF remote this remote internally contains RF encoder, The RF encoder to transmit the position change wirelessly to robot. HT12E is RF encoder which receives the parallel data from the controller and converts this parallel data into serial data and to transmit the serial data to RF transmitter through Dout pin in RF encoder TE pin should always be kept high to transmit it to data pin of RF transmitter. Then serial data is received by the data pin of transmitter and is send out wirelessly by the antenna to RF receiver present at robot. The RF receiver connected to robot receives the data through antenna and sends to controller. The sent data by the RF transmitter is received by the RF receiver and send that data RF decoder which decodes the signal ie., serial data into parallel by using HT12D. The signal is received by DIN pin and sends out using data pins and through data pins data is send to controller. Then controller sends received data to Driver IC which is used to change the direction of robot. The motors used here are DC motors. Motors cannot be interfaced directly to controllers since these do not support logic states. Since if sudden high state is applied to motor gets struck so the motor is interfaced to controller for smooth direction changing the name of that IC is L293D (line driver). To this single IC two DC motor can be connected. Totally four pins of controller is used to connect to this IC. By giving different logic values to these the motor directions can be changed as shown in truth table below.

Hence the direction of robot is changed by using RF remote. To detect the live person by using robot PIR sensor is used. The PIR sensor is used for detecting live persons during earth quakes. This sensor does not emit any rays from it, it just absorb the radiations generated by the hot bodies since living body is composed of 96 degrees it absorbs the radiation once it detects it sends data to controller through to controller then controller automatically gives buzzer sound by activating the pin-2 as an indication that person is alive.

Chapter-3 BLOCK DIAGRAM AND DESCRIPTION

BLOCK DIAGRAM:

Fig 3.1 Device Diagram

AT89C51 MICROCONTROLLER 3.1 A Brief History of 8051 Microprocessors and microcontrollers are widely used in embedded systems products. Microcontroller is a programmable device. A microcontroller has a CPU in addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in microcontrollers makes them ideal for many applications in which cost and space are critical. The Intel 8051 is Harvard architecture, single chip microcontroller (C) which was developed by Intel in 1980 for use in embedded systems. In 1981, Intel Corporation introduced an 8 bit microcontroller called 8051. This microcontroller had 128 bytes of RAM, 4K bytes of chip ROM, two timers, one serial port, and four ports all on a single chip. At the time it was also referred as A SYSTEM ON A CHIP. It was popular in the 1980s and early 1990s, but today it has largely been superseded by a vast range of enhanced devices with 8051-compatible processor cores that are manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies and Maxim Integrated Products. 8051 is an 8-bit processor, 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. There are many versions of 8051 with different speeds and amount of on-chip ROM and they are all compatible with the original 8051. This means that if you write a program for one it will run on any of them. The 8051 is an original member of the 8051 family. There are two other members in the 8051 family of microcontrollers. They are 8052 and 8031. All the three microcontrollers will have the same internal architecture, but they differ in the following aspects. 8031 has 128 bytes of RAM, two timers and 6 interrupts.

89C51 has 4KB ROM, 128 bytes of RAM, two timers and 6 interrupts. 89S52 has 8KB ROM, 128 bytes of RAM, three timers and 8 interrupts. Of the three microcontrollers, 89C51 is the most preferable. Microcontroller supports both serial and parallel communication. In the concerned project 89c51 microcontroller is used. AT89c51 is manufactured by ATMEL laboratories.The present project is implemented on K Uvision. In order to program the device, proload tool has been used to burn the program onto the microcontroller. The features, pin description of the microcontroller AT89C51 (refer fig. 3.2) and the software tools used are discussed in the following sections.

Fig. 3.2 AT89C51 Microcontroller chip Features Compatible with MCS-51 Products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines

Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes

Description The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes of Flash programmable and erasable read only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 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 Flash on a monolithic chip, the Atmel AT89C51 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C51 provides the following standard features: 4K bytes of Flash, 128 bytes of RAM, 32 I/O lines, 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 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-down Mode saves the RAM contents but freezes the oscillator disabling all other chip functions until the next hardware reset.

Block Diagram

Fig 3.3 Block Diagram of AT89C51

PIN DIAGRAM

Fig 3.4 Pin Diagram of AT89C51

Pin Description Vcc: Pin 40 provides supply voltage to the chip. The voltage source is +5V.

GND: Pin 20 is the ground. RESET Pin9 is the reset pin. It is an input and is active high. Upon A high on this pin for two machine cycles while the oscillator is running resets the device, the microcontroller will reset and terminate all the activities. This is often referred to as a power-on reset.

Ports 0, 1, 2 and 3 The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports upon RESET are configured as input, since P0-P3 have value FFH on them. Port 0(P0) Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data. ALE indicates if P0 has address or data. When ALE=0, it provides data D0-D7, but when ALE=1, it has address A0-A7. Therefore, ALE is used for de-multiplexing address and data with the help of an internal latch. When there is no external memory connection, the pins of P0 must be connected to a 10K-ohm pull-up resistor. This is due to the fact that P0 is an open drain. With external pull-up resistors connected to P0, it can be used as a simple I/O, just like P1 and P2. But the ports P1, P2 P3 do not need any pull-up resistors since they already have pull-up resistors internally. Upon reset, ports P1, P2 and P3 are configured as input ports. Port 1 Port 1 is an 8-bit bi-directional I/O port with internal pullups.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 pullups 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 pullups. 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 pullups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pullups 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 pullups. 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, it 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 bi-directional I/O port with internal pullups. 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 pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

Port 3 also receives some control signals for Flash programming and verification. 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. 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 12volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier. Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator, as shown in Figure 1. 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 2.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, but minimum and maximum voltage high and low time specifications must be observed.

Idle Mode In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The mode is invoked by software. The content of the on-chip RAM and all the special functions registers remain unchanged during this mode. The idle mode can be terminated by any enabled interrupt or by a hardware reset. It should be noted that when idle is terminated by a hard ware reset, the device normally resumes program execution, from where it left off, up to two machine cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to internal RAM in this event, but access to the port pins is not inhibited. To eliminate the possibility of an unexpected write to a port pin when Idle is terminated by reset, the instruction following the one that invokes Idle should not be one that writes to a port pin or to external memory.

Figure 1. Oscillator Connections

Note: C1, C2 = 30 pF 0 pF for Crystals = 40 pF 0 pF for Ceramic Resonators 1 1

Figure 2. External Clock Drive Configuration

Power-down Mode In the power-down mode, the oscillator is stopped, and the instruction that invokes powerdown is the last instruction executed. The on-chip RAM and Special Function Registers retain their values until the power-down mode is terminated. The only exit from powerdown is a hardware reset. Reset redefines the SFRs but does not change the on-chip RAM. The reset should not be activated before VCC is restored to its normal operating level and must be held active long enough to allow the oscillator to restart and stabilize.

Program Memory Lock Bits On the chip are three lock bits which can be left unprogrammed (U) or can be programmed (P) to obtain the additional features listed in the table below. When lock bit 1 is programmed, the logic level at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the latch initializes to a random value, and holds that value until reset is activated. It is necessary that the latched value of EA be in agreement with the current logic level at that pin in order for the device to function properly.

3.2.4 Machine cycle for AT89C51 The CPU takes a certain number of clock cycles to execute an instruction. In the 8051 family, these clock cycles are referred to as machine cycles. The length of the machine cycle depends on the frequency of the crystal oscillator. The crystal oscillator, along with on-chip circuitry, provides the clock source for the 8051 CPU. The frequency can vary from 4 MHz to 30 MHz, depending upon the chip rating and manufacturer. But the exact frequency of 11.0592 MHz crystal oscillator is used to make the 8051 based system compatible with the serial port of the IBM PC. In the original version of 8051, one machine cycle lasts 12 oscillator periods. Therefore, to calculate the machine cycle for the 8051, the calculation is made as 1/12 of the crystal frequency and its inverse is taken. The assembly language program is written and this program has to be dumped into the microcontroller for the hardware kit to function according to the software. The program

dumped in the microcontroller is stored in the Flash memory in the microcontroller. Before that, this Flash memory has to be programmed and is discussed in the next section. 3.2.5 Memory Organization MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed. Program Memory If the EA pin is connected to GND, all program fetches are directed to external memory.On the AT89C51, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory. Data memory EEPROM and RAM The AT89C51implements 2K bytes of on-chip EEPROM for data storage and 256 bytes of RAM. The upper 128 bytes of RAM occupy a parallel space to the Special Function Registers i.e., the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions that use direct addressing access SFR space. For example, the following direct addressing instruction accesses the SFR at location 0A0H (which is P2). MOV 0A0H, #data Instructions that use indirect addressing access the upper 128 bytes of RAM. For example, the following indirect addressing instruction, where R0 contains 0A0H, accesses the data byte at address 0A0H, rather than P2 (whose address is 0A0H).

MOV @R0, #data It should be noted that stack operations are examples of indirect addressing, so the upper 128 bytes of data RAM are available as stack space. The on-chip EEPROM data memory is selected by setting the EEMEN (refer table 3.1) bit in the WMCON register at SFR address location 96H. The EEPROM address range is from 000H to 7FFH. The MOVX instructions are used to access the EEPROM. To access off-chip data memory with the MOVX instructions, the EEMEN bit needs to be set to 0. 3.2.6 Programming the FLASH and EEPROM Atmels AT89C51Flash Microcontroller offers 8K bytes of in-system

reprogrammable Flash Code memory and 2K bytes of EEPROM Data memory. The AT89C51is normally equipped with the on-chip Flash Code and EEPROM Data memory arrays in the erased state (i.e. contents = FFH) and ready to be programmed. This device supports a high-voltage (12-V VPP) Parallel programming mode and a low-voltage (5-V VCC) Serial programming mode. 3.2.6.1 Serial Programming mode This mode provides a convenient way to reprogram the AT89C51inside the users system. The Code and Data memory arrays are mapped via separate address spaces in this mode. An auto-erase cycle is provided with the self-timed programming operation. There is no need to perform the Chip Erase operation to reprogram any memory location in this programming mode unless any of the lock bits have been programmed. Serial downloading: Both the Code and Data memory arrays can be programmed using the serial SPI bus while RST is pulled to VCC. The serial interface consists of pins SCK, MOSI (input) and MISO (output). After RST is set high, the Programming Enable instruction needs to be executed first before program/erase operations can be executed. An auto-erase cycle is built into the self-timed programming operation (in the serial mode ONLY) and there is no need to first execute the chip erase instruction unless any of

the lock bits have been programmed. The Chip Erase operation turns the content of every memory location in both the Code and Data arrays into FFH. The Code and Data memory arrays have separate address spaces: 0000H to 1FFFH for Code memory and 000H to 7FFH for Data memory. Either an external system clock is supplied at pin XTAL1 or a crystal needs to be connected across pins XTAL1 and XTAL2. The maximum serial clock (SCK) frequency should be less than 1/40 of the crystal frequency. With a 24 MHz oscillator clock, the maximum SCK frequency is 600 kHz.

3.2.6.2 Parallel Programming mode The parallel programming mode is compatible with conventional third party Flash or EPROM programmers. In this mode, the two arrays occupy one contiguous address space: 0000H to 1FFFH for the Code array and 2000H to 27FFH for the Data array. In this mode, there is no auto-erase cycle. To reprogram any non-blank byte, the user needs to use the Chip Erase operation first to erase both arrays. The Code and Data memory arrays on the AT89C51are programmed byte-by-byte in either programming mode. Parallel Programming Algorithm: To program and verify the AT89C51in the parallel programming mode, the following sequence is recommended: 1. Power-up sequence: Apply power between VCC and GND pins. Set RST pin to H. Apply a 3 MHz to 24 MHz clock to XTAL1 pin and wait for at least 10 milliseconds. 2. Set PSEN pin to L ALE pin to H EA pin to H and all other pins to H. 3. Apply the appropriate combination of H or L logic levels to pins P2.6, P2.7, P3.6, and P3.7 to select one of the programming operations shown in the Flash Programming Modes table. 4. Apply the desired byte address to pins P1.0 to P1.7 and P2.0 to P2.5. Apply data to pins P0.0 to P0.7 for Write Code operation. 5. Raise EA/VPP to 12V to enable Flash programming, erase or verification.

6. Pulse ALE/PROG once to program a byte in the Code memory array, the Data memory array or the lock bits. The byte-write cycle is self-timed and typically takes 1.5 ms. 7. To verify the byte just programmed, bring pin P2.7 to L and read the programmed data at pins P0.0 to P0.7. 8. Repeat steps 3 through 7 changing the address and data for the entire 2K or 8K bytes array or until the end of the object file is reached. 9. Power-off sequence: Set XTAL1 to L. Set RST and EA pins to L. Turn VCC power off.

Programmable Clock Out: A 50% duty cycle clock can be programmed to come out on P1.0, as shown in Figure 9. This pin, besides being a regular I/O pin, has two alternate functions. It can be programmed to input the external clock for Timer/Counter 2 or to output a 50% duty cycle clock ranging from 61 Hz to 4 MHz at a 16 MHz operating frequency. To configure the Timer/Counter 2 as a clock generator, bit C/T2 (T2CON.1) must be cleared and bit T2OE (T2MOD.1) must be set. Bit TR2 (T2CON.2) starts and stops the timer. The clock-out frequency depends on the oscillator frequency and the reload value of Timer 2 capture registers (RCAP2H, RCAP2L), as shown in the following equation. In the clock-out mode, Timer 2 roll-overs will not generate an interrupt. This behavior is similar to when Timer 2 is used as a baud-rate generator. It is possible to use Timer 2 as a baud-rate generator and a clock generator simultaneously. Note, however, that the baud-rate and clock-out frequencies cannot be determined independently from one another since they both use RCAP2H and RCAP2L. Absolute Maximum Ratings 1. Operating Temperature 2. Storage Temperature 3. with Respect to Ground 55C to +125 1.0V to +7.0V

65C to +150C

4. Maximum Operating Voltage- . 5. DC Output Current -

6.6V

15.0 mA

REGULATED POWER SUPPLY

REGULATED POWER SUPPLY

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, it's much handier to have a variable supply on hand, especially for testing. Regulator The filter output is not a pure d.c and it is not a constant d.c voltage it varies with the fluctuations in the main power supply. But our requirement is to get constant d.c power supply. The regulator can give constant d.c power supply. These are two types ve power supply and +ve power supply. The 78xx series gives +ve power supply (78 indicates +ve and xx indicates any voltage value). The LM79xx series gives ve power supply ( 79 indicates ve and xx indicates any voltage value). In our project AT89c51, HT12E and HT12D needs +5v power. LM7805 gives +5v constant power supply.

LM7805 regulator pin diagram is shown in below fig.8(b)

Fig.8(b) LM7805 LM7805 Features


Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection

Current Limiting Resistor for LED A suitable value for a current limiting resistor is calculated as follows.

+5v

1.5v I=5mA

V=IR

0v The supply voltage is 5 volts. The current that we want to flow through the LED is 5mA.

Assume that the forward voltage drop will be 1.5 V. BY KVL, the voltage drop across the resistor must be 5 -1.5=3V. By Ohms Law, this voltage drop equals iR. Therefore: 5- 1.5 = R*5mA Rearranging terms gives: R = (5- 1.5)/5mA R = 3.5/5mA = 0.7 K = 700 . So, if we select R value as 700 , then the current flowing through the LED is limited to 5 mA.

DC MOTOR AND DRIVER IC DC MOTOR Principles of operation 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 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).

Every DC motor has six basic parts -- axle, rotor (a.k.a., AVRature), 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) rotate 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 two-pole motor, the rotation reverses the direction of current through the rotor winding, leading to a "flip" of the rotor's

magnetic field, driving it to continue rotating. 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). So since most small DC motors are of a three-pole design, let's tinker with the workings of one via an interactive 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:

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. Luckily for you, I've gone ahead and done this in your stead. The guts of a disassembled Mabuchi FF-030-PN motor (the same model that Solarbotics sells) are available for you to see here (on 10 lines / cm graph paper). This is a basic 3-pole DC motor, with 2 brushes and three commutator contacts. The use of an iron core AVRature (as in the Mabuchi, above) is quite common, and has a number of advantages2. First off, the iron core provides a strong, rigid support for the windings -- a particularly important consideration for high-torque motors. The core also conducts heat away from the rotor windings, allowing the motor to be driven harder than might otherwise be the case. Iron core construction is also relatively inexpensive compared with other construction types. But iron core construction also has several disadvantages. The iron AVRature has a relatively high inertia which limits motor acceleration. This construction also results in high winding inductances which limit brush and commutator life. In small motors, an alternative design is often used which features a 'coreless' AVRature winding. This design depends upon the coil wire itself for structural integrity. As a result, the AVRature is hollow, and the permanent magnet can be mounted inside the rotor coil.

Coreless DC motors have much lower AVRature inductance than iron-core motors of comparable size, extending brush and commutator life.

Diagram courtesy of MicroMo The coreless design also allows manufacturers to build smaller motors; meanwhile, due to the lack of iron in their rotors, coreless motors are somewhat prone to overheating. As a result, this design is generally used just in small, low-power motors. BEAMers will most often see coreless DC motors in the form of pager motors. Again, disassembling a coreless motor can be instructive -in this case, my hapless victim was a cheap pager vibrator motor. The guts of this disassembled motor are available for you to see here (on 10 lines / cm graph paper). This is (or more accurately, was) a 3-pole coreless DC motor. I disembowel 'em so you don't have to... To get the best from DC motors in BEAMbots, we'll need to take a closer look at DC motor behaviors -- both obvious and not. DRIVER IC: WORKING THEORY OF H-BRIDGE: The name H-bridge is derived from the actual shape of the switching circuit which controls the motion of the motor. It is also known as Full Bridge. Basically there are four switching elements in the H-bridge as shown in the figure below.

As shown in the above figure there are four switching elements named as High side left, high side right, low side left, low side right. When these switches are turned on in pairs motor changes its direction accordingly. Like if we switch on high side left and low side right then the motor rotates in forward direction., as the current flows from P\power supply through the motor coil goes to the ground via switch low side right. This is the figure shown below.

Similarly if we switch on the low side left and high side right the current flows in opposite direction and motor runs in forward direction. This is the basic working of H-Bridge Motor. L293D Dual H-Bridge Motor Driver:

L293D is a dual H-Bridge motor Driver, so with one IC we can interface two DC motors which can be controlled in both clock wise and anti clock wise directions when we have motor with fixed direction of motion. We can also make use of all the four I/os to connect up to four DC motors. L293D has an output current of 600mA and peak output current of 1.2A per channel. Moreover the protection of the circuit from back EMF output diodes are included within the IC. The output supply (VCC2) has a wide range from 4.5 V to 36V, which has made L293D as the best choice for DC motor Driver.

As we see in the circuit three pins are needed for interfacing DC motor (A, B, Enable). If we want the output to be enabled completely then we can connect the enable to VCC and only two pins needed from the micro controller . As per the truth mentioned in the image above its fairly simple program to the micro controller. It is also clear from the BJT circuit and L293D the programming will be same for both of them, just keep in mind of the allowed combinations of the A and B.

RF TRANSMITTER AND RECEIVER

RF TRANSMITTER: General Description: The ST-TX01-ASK is an ASK Hybrid transmitter module. ST-TX01-ASK is designed by the Saw Resonator, with an effective low cost, small size, and simple-to-use for designing. Frequency Range:315 / 433.92 MHZ. Supply Voltage: 3~12V. Output Power : 4~16dBm Circuit Shape: Saw Applications *Wireless security systems *Car Alarm systems

*Remote controls. *Sensor reporting *Automation systems

RF ENCODER: (HT12E) Features Operating voltage 2.4V~5V for the HT12A 2.4V~12V for the HT12E Low power and high noise immunity CMOS Technology Low standby current: 0.1_A (typ.) at VDD=5V HT12A with a 38kHz carrier for infrared transmission medium 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 Applications Burglar alarm system Smoke and fire alarm system Garage door controllers Car door controllers Car alarm system Security system Cordless telephones Other remote control systems General Description The 212 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 address/ 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 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 38kHz carrier for infrared systems.

RF RECEIVER:

General Description: The ST-RX02-ASK is an ASK Hybrid receiver module. A effective low cost solution for using at 315/433.92 MHZ. The circuit shape of ST-RX02-ASK is L/C. Receiver Frequency: 315 / 433.92 MHZ Typical sensitivity: -105dBm Supply Current: 3.5mA IF Frequency:1MHz Applications

Car security system Wireless security systems Sensor reporting Automation system Remote Keyless entry Low power consumption. Easy for application. Operation temperature range : 2070 Operation voltage: 5 Volts. Available frequency at: 315/434 MHz

Features:

RF DECODER: (HT12D) Features

Operating voltage: 2.4V~12V 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 Holtek_s 212 series of encoders 18-pin DIP, 20-pin SOP package Applications

Burglar alarm system Smoke and fire alarm system Garage door controllers Car door controllers Car alarm system Security system Cordless telephones Other remote control systems

General Description The 212 decoders are a series of CMOS LSIs for remote control system applications. They are paired with Holtek_s 212 series of encoders (refer to the encoder/decoder cross reference table). For proper operation, a pair of encoder/decoder with the same number of addresses and data format should be chosen. The decoders receive serial addresses and data from a programmed 212 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 unmatched codes are found, the input data codes are decoded and then transferred to the output pins. The VT pin also goes high to indicate a valid transmission. The 212 series of decoders are capable of decoding informations that consist of N bits of address and 12_N bits of data. Of this series, the HT12D is arranged to provide 8 address bits and 4 data bits, and HT12F is used to decode 12 bits of address information.

Chapter-4 PASSIVE INFRARED SENSOR PIR sensors allow you to sense motion, almost always used to detect whether a human has moved in or out of the sensors range. They are small, inexpensive, low-power, easy to use and don't wear out. For that reason they are commonly found in appliances and gadgets used in homes or businesses. They are often referred to as PIR, "Passive Infrared", "Pyroelectric", or "IR motion" sensors. PIRs are basically made of a pyroelectric sensor (which you can see above as the round metal can with a rectangular crystal in the center), which can detect levels of infrared radiation. Everything emits some low level radiation, and the hotter something is, the more radiation is emitted. The sensor in a motion detector is actually split in two halves. The reason for that is that we are looking to detect motion (change) not average IR levels. The two halves are wired up so that they cancel each other out. If one half sees more or less IR radiation than the other, the output will swing high or low. Along with the pyroelectic sensor is a bunch of supporting circuitry, resistors and capacitors. This chip takes the output of the sensor and does some minor processing on it to emit a digital output pulse from the analog sensor. For many basic projects or products that need to detect when a person has left or entered the area, or has approached, PIR sensors are great. They are low power and low cost, pretty rugged, have a wide lens range, and are easy to interface with. Note that PIRs won't tell you how many people are around or how close they are to the sensor, the lens is often fixed to a certain sweep and distance (although it can be hacked somewhere) and they are also sometimes set off by housepets. How does it work? PIR sensors are more complicated than many of the other sensors explained in these tutorials (like photocells, FSRs and tilt switches) because there are multiple variables that affect the sensors input and output. To begin explaining how a basic sensor works, we'll use this rather nice diagram (if anyone knows where it originates plz let me know). PIR sensor itself has two slots in it, each slot is made of a special material that is sensitive to IR. The lens used here is not really doing much and so we see that the two slots

can 'see' out past some distance (basically the sensitivity of the sensor). When the sensor is idle, both slots detect the same amount of IR, the ambient amount radiated from the room or walls or outdoors. When a warm body like a human or animal passes by, it first intercepts one half of the PIR sensor, which causes a positive differential change between the two halves. When the warm body leaves the sensing area, the reverse happens, whereby the sensor generates a negative differential change. These change pulses are what is detected.

Chapter-5 DEVELOPMENT OF SOFTWARE

SOURCE CODE

#include<reg51.h> sfr rfr=0x90; sfr mtr=0xB0; sbit pir=P2^0; sbit buz=P2^3; void detection(void); void main() { rfr=0xFF; buz=0; while(1) { if(rfr==0x0E) { mtr=0x05; } else if(rfr==0x0D) { mtr=0x0A; } else if(rfr==0x0B) { mtr=0x02; } else if(rfr==0x07)

{ mtr=0x08; } else if(rfr==0x0C) { detection(); } else if(rfr==0x0F) { mtr=0x00; buz=0; } else mtr=0x00; buz=0; } } void detection() { unsigned int i; mtr=0x00; if(pir==1) { buz=1; for(i=0;i<200;i++); } else buz=0; }

Chapter-5 KEIL SOFTWARE

Introduction to Micro vision Keil (IDE)

Keil is a cross compiler. So first we have to understand the concept of compilers and cross compilers. After then we shall learn how to work with keil.

Concept of compiler: -

Compilers are programs used to convert a High Level Language to object code. Desktop compilers produce an output object code for the underlying microprocessor, but not for other microprocessors. I.E the programs written in one of the HLL like C will compile the code to run on the system for a particular processor like x86 (underlying microprocessor in the computer). For example compilers for Dos platform is different from the Compilers for Unix platform

So if one wants to define a compiler then compiler is a program that translates source code into object code. The compiler derives its name from the way it works, looking at the entire piece of source code and collecting and reorganizing the instruction. See there is a bit little difference between compiler and an interpreter. Interpreter just interprets whole program at a time while compiler analyzes and execute each line of source code in succession, without looking at the entire program.

The advantage of interpreters is that they can execute a program immediately. Secondly programs produced by compilers run much faster than the same programs executed by

an interpreter. However compilers require some time before an executable program emerges. Now as compilers translate source code into object code, which is unique for each type of computer, many compilers are available for the same language.

Concept of cross compiler: A cross compiler is similar to the compilers but we write a program for the target processor (like 8051 and its derivatives) on the host processors (like computer of x86) It means being in one environment you are writing a code for another environment is called cross development. And the compiler used for cross development is called cross compiler

So the definition of cross compiler is a compiler that runs on one computer but produces object code for a different type of computer. Cross compilers are used to generate software that can run on computers with a new architecture or on special-purpose devices that cannot host their own compilers. Cross compilers are very popular for embedded development, where the target probably couldn't run a compiler. Typically an embedded platform has restricted RAM, no hard disk, and limited I/O capability. Code can be edited and compiled on a fast host machine (such as a PC or Unix workstation) and the resulting executable code can then be downloaded to the target to be tested. Cross compilers are beneficial whenever the host machine has more resources (memory, disk, I/O etc) than the target. Keil C Compiler is one such compiler that supports a huge number of host and target combinations. It supports as a target to 8 bit microcontrollers like Atmel and Motorola etc. Why do we need cross compiler? There are several advantages of using cross compiler. Some of them are described as follows By using this compilers not only can development of complex embedded systems be completed in a fraction of the time, but reliability is improved, and maintenance is easy.

Knowledge of the processor instruction set is not required. A rudimentary knowledge of the 8051s memory architecture is desirable but not necessary.

Register allocation and addressing mode details are managed by the compiler. The ability to combine variable selection with specific operations improves program readability.

Keywords and operational functions that more nearly resemble the human thought process can be used.

Program development and debugging times are dramatically reduced when compared to assembly language programming.

The library files that are supplied provide many standard routines (such as formatted output, data conversions, and floating-point arithmetic) that may be incorporated into your application.

Existing routine can be reused in new programs by utilizing the modular programming techniques available with C.

The C language is very portable and very popular. C compilers are available for almost all target systems. Existing software investments can be quickly and easily converted from or adapted to other processors or environments.

Now after going through the concept of compiler and cross compilers lets we start with Keil C cross compiler. Keil C cross compiler: Keil is a German based Software development company. It provides several development tools like IDE (Integrated Development environment) Project Manager Simulator

Debugger C Cross Compiler, Cross Assembler, Locator/Linker

Keil Software provides you with software development tools for the ARM microcontrollers. With these tools, you can generate embedded applications for the multitude of ARM derivatives. Keil provides following tools for ARM development 1. 2. 3. 4. 5. ARM Optimizing C Cross Compiler, Macro Assembler, ARM Utilities (linker, object file converter, library manager), Source-Level Debugger/Simulator, Vision for Windows Integrated Development Environment.

The keil ARM tool kit includes three main tools, assembler, compiler and linker. An assembler is used to assemble your ARM assembly program A compiler is used to compile your C source code into an object file A linker is used to create an absolute object module suitable for your in-circuit emulator. ARM project development cycle: These are the steps to develop ARM project using keil 1. Create source files in C or assembly. 2. Compile or assemble source files. 3. Correct errors in source files. 4. Link object files from compiler and assembler. 5. Test linked application.

CONCLUSION

CONCLUSSION The project LIVE PERSON DETECTION ROBOT USING RF WIRELESS TECHNOLOGY 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.

BIBLIOGRAPHY

BIBLIOGRAPHY 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 -Domenic SYMES -Chris WRIGHT

References on the Web: www.national.com www.nxp.com www.8052.com www.microsoftsearch.com www.geocities.com www.keil.com

Vous aimerez peut-être aussi