Vous êtes sur la page 1sur 65

Audio and video capture robot using rf communication

CHAPTURE 1

INTRODUCTION
For many people robot is a machine that imitates a humanlike the androids in Star Wars, Terminator and Star Trek: The Next Generation. However much these robots capture our imagination, such robots still only inhabit Science Fiction. People still haven't been able to give a robot enough 'common sense' to reliably interact with a dynamic world. The type of robots that you will encounter most frequently are robots that do work that is too dangerous, boring, onerous, or just plain nasty. Most of the robots in the world are of this type. They can be found in auto, medical, manufacturing and space industries. In fact, there are over a million of these types of robots working for us today.

This robot is controlled by a RF remote. This can be moved forward and reverse direction using geared motors of 60RPM. Also this robot can take sharp turnings towards left and right directions. This project uses AT89S52 MCU as its controller. Simultaneously the images around the robot will be transmitted to remote place. User can monitor the images and metal detection alarms on Television. The RF modules used here are STT-433 MHz Transmitter, STR-433 MHz Receiver, HT640 RF Encoder and HT648 RF Decoder. The three switches are interfaced to the RF transmitter through RF Encoder. The encoder continuously reads the status of the switches, passes the data to the RF transmitter and the transmitter transmits the data. This project uses 9V battery. This project is much useful for detection and surveillance applications.

Audio and video capture robot using rf communication

1.1 Block Diagram:

SW1

SW2 RF Encoder HT640 SW3

RF Transmitter STT - 433

SW4

Step down T/F

Bridge Rectifier

Filter Circuit

Regulator Power supply to all sections

Fig 1.1: Block Diagram: Transmitter

Audio and video capture robot using rf communication

Wireless Camera with voice transmission

RF Receiver

RF Decoder AT 89S52 MCU


HBridge

Geared Motor - I

Geared Motor - II 11.0592MHz Crystal Oscillator

Power On Reset

Step down T/F

Bridge Rectifier

Filter Circuit

Regulator Power supply to all sections

Fig 1.2: Block Diagram: Receiver

Audio and video capture robot using rf communication

1.2 Introduction of Embedded System:


An Embedded System is a combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a specific function. A good example is the microwave oven. Almost every household has one, and tens of millions of them are used everyday, but very few people realize that a processor and software are involved in the preparation of their lunch or dinner. This is in direct contrast to the personal computer in the family room. It too is comprised of computer hardware and software and mechanical components (disk drives, for example). However, a personal computer is not designed to perform a specific function rather; it is able to do many different things. Many people use the term generalpurpose computer to make this distinction clear. As shipped, a general-purpose computer is a blank slate; the manufacturer does not know what the customer will do wish it. One customer may use it for a network file server another may use it exclusively for playing games, and a third may use it to write the next great American novel. Frequently, an embedded system is a component within some larger system. For example, modern cars and trucks contain many embedded systems. One embedded system controls the anti-lock brakes, other monitors and controls the vehicle's emissions, and a third displays information on the dashboard. In some cases, these embedded systems are connected by some sort of a communication network, but that is certainly not a requirement. At the possible risk of confusing you, it is important to point out that a generalpurpose computer is itself made up of numerous embedded systems. For example, my computer consists of a keyboard, mouse, video card, modem, hard drive, floppy drive, and sound card-each of 4

Audio and video capture robot using rf communication which is an embedded system. Each of these devices contains a processor and software and is designed to perform a specific function. For example, the modem is designed to send and receive digital data over analog telephone line. That's it and all of the other devices can be summarized in a single sentence as well. If an embedded system is designed well, the existence of the processor and software could be completely unnoticed by the user of the device. Such is the case for a microwave oven, VCR, or alarm clock. In some cases, it would even be possible to build an equivalent device that does not contain the processor and software. This could be done by replacing the combination with a custom integrated circuit that performs the same functions in hardware. However, a lot of flexibility is lost when a design is hard-cooled in this way. It is mush easier, and cheaper, to change a few lines of software than to redesign a piece of custom hardware.

1.3 History and Future:


Given the definition of embedded systems earlier is this chapter; the first such systems could not possibly have appeared before 1971. That was the year Intel introduced the world's first microprocessor. This chip, the 4004, was designed for use in a line of business calculators produced by the Japanese Company Busicom. In 1969, Busicom asked Intel to design a set of custom integrated circuits-one for each of their new calculator models. The 4004 was Intel's response rather than design custom hardware for each calculator, Intel proposed a general-purpose circuit that could be used throughout the entire line of calculators. Intel's idea was that the software would give each calculator its unique set of features. The microcontroller was an overnight success, and its use increased steadily over the next decade. Early embedded applications included unmanned space probes, computerized traffic lights, and aircraft flight control systems. In the 1980s, embedded systems quietly rode the waves of the microcomputer age and brought microprocessors into every part of our kitchens (bread machines, food processors, and microwave ovens), 5

Audio and video capture robot using rf communication living rooms (televisions, stereos, and remote controls), and workplaces (fax machines, pagers, laser printers, cash registers, and credit card readers). It seems inevitable hat the number of embedded systems will continue to increase rapidly. Already there are promising new embedded devices that have enormous market potential; light switches and thermostats that can be central computer, intelligent air-bag systems that don't inflate when children or small adults are present, pal-sized electronic organizers and personal digital assistants (PDAs), digital cameras, and dashboard navigation systems. Clearly, individuals who possess the skills and desire to design the next generation of embedded systems will be in demand for quite some time.

1.4 Real Time Systems:


One subclass of embedded is worthy of an introduction at this point. As commonly defined, a real-time system is a computer system that has timing constraints. In other words, a real-time system is partly specified in terms of its ability to make certain calculations or decisions in a timely manner. These important calculations are said to have deadlines for completion. And, for all practical purposes, a missed deadline is just as bad as a wrong answer. The issue of what if a deadline is missed is a crucial one. For example, if the realtime system is part of an airplane's flight control system, it is possible for the lives of the passengers and crew to be endangered by a single missed deadline. However, if instead the system is involved in satellite communication, the damage could be limited to a single corrupt data packet. The more severe the consequences, the more likely it will be said that the deadline is "hard" and thus, the system is a hard real-time system. Real-time systems at the other end of this discussion are said to have "soft" deadlines. All of the topics and examples presented in this book are applicable to the designers of real-time system who is more delight in his work. He must guarantee reliable operation of the software and hardware under all the possible conditions and to the degree that human 6

Audio and video capture robot using rf communication lives depend upon three system's proper execution, engineering calculations and descriptive paperwork.

1.5 Application Areas


Nearly 99 per cent of the processors manufactured end up in embedded systems. The embedded system market is one of the highest growth areas as these systems are used in very market segment- consumer electronics, office automation, industrial automation, biomedical engineering, wireless communication, data communication, telecommunications, transportation, military and so on. Consumer appliances: At home we use a number of embedded systems which include digital camera, digital diary, DVD player, electronic toys, microwave oven, remote controls for TV and air-conditioner, VCO player, video game consoles, video recorders etc. Todays high-tech car has about 20 embedded systems for transmission control, engine spark control, air-conditioning, navigation etc. Even wristwatches are now becoming embedded systems. The palmtops are powerful embedded systems using which we can carry out many general-purpose tasks such as playing games and word processing. Office automation: The office automation products using em embedded systems are copying machine, fax machine, key telephone, modem, printer, scanner etc. Industrial automation: Today a lot of industries use embedded systems for process control. These include pharmaceutical, cement, sugar, oil exploration, nuclear energy, electricity generation and transmission. The embedded systems for industrial use are designed to carry out specific tasks such as monitoring the temperature, pressure, humidity, voltage, current etc., and then take appropriate action based on the monitored levels to control other devices or to send information to a centralized monitoring station. In hazardous industrial environment, where human presence has to be avoided, robots are used, which are programmed to do specific jobs. The robots are now becoming very 7

Audio and video capture robot using rf communication powerful and carry out many interesting and complicated tasks such as hardware assembly. Medical electronics: Almost every medical equipment in the hospital is an embedded system. These equipments include diagnostic aids such as ECG, EEG, blood pressure measuring devices, X-ray scanners; equipment used in blood analysis, radiation, colonscopy, endoscopy etc. Developments in medical electronics have paved way for more accurate diagnosis of diseases. Computer networking: Computer networking products such as bridges, routers, Integrated Services Digital Networks (ISDN), Asynchronous Transfer Mode (ATM), X.25 and frame relay switches are embedded systems which implement the necessary data communication protocols. For example, a router interconnects two networks. The two networks may be running different protocol stacks. The routers function is to obtain the data packets from incoming pores, analyze the packets and send them towards the destination after doing necessary protocol conversion. Most networking equipments, other than the end systems (desktop computers) we use to access the networks, are embedded systems . Telecommunications: In the field of telecommunications, the embedded systems can be categorized as subscriber terminals and network equipment. The subscriber terminals such as key telephones, ISDN phones, terminal adapters, web cameras are embedded systems. The network equipment includes multiplexers, multiple access systems, Packet Assemblers Dissemblers (PADs), sate11ite modems etc. IP phone, IP gateway, IP gatekeeper etc. are the latest embedded systems that provide very low-cost voice communication over the Internet. Wireless technologies: Advances in mobile communications are paving way for many interesting applications using embedded systems. The mobile phone is one of the marvels of the last decade of the 20h century. It is a very powerful embedded system that provides voice communication while we are on the move. The Personal Digital Assistants and the palmtops can now be used to access multimedia services over the Internet. 8

Audio and video capture robot using rf communication Mobile communication infrastructure such as base station controllers, mobile switching centers are also powerful embedded systems. Insemination: Testing and measurement are the fundamental requirements in all scientific and engineering activities. The measuring equipment we use in laboratories to measure parameters such as weight, temperature, pressure, humidity, voltage, current etc. are all embedded systems. Test equipment such as oscilloscope, spectrum analyzer, logic analyzer, protocol analyzer, radio communication test set etc. are embedded systems built around powerful processors. Thank to miniaturization, the test and measuring equipment are now becoming portable facilitating easy testing and measurement in the field by field-personnel. Security: Security of persons and information has always been a major issue. We need to protect our homes and offices; and also the information we transmit and store. Developing embedded systems for security applications is one of the most lucrative businesses nowadays. Security devices at homes, offices, airports etc. for authentication and verification are embedded systems. Encryption devices are nearly 99 per cent of the processors that are manufactured end up in~ embedded systems. Embedded systems find applications in . every industrial segment- consumer electronics, transportation, avionics, biomedical engineering, manufacturing, process control and industrial automation, data communication, telecommunication, defense, security etc. Used to encrypt the data/voice being transmitted on communication links such as telephone lines. Biometric systems using fingerprint and face recognition are now being extensively used for user authentication in banking applications as well as for access control in high security buildings. Finance: Financial dealing through cash and cheques are now slowly paving way for transactions using smart cards and ATM (Automatic Teller Machine, also expanded as Any Time Money) machines. Smart card, of the size of a credit card, has a small microcontroller and memory; and it interacts with the smart card reader! ATM machine and acts as an electronic wallet. Smart card technology has the capability of ushering in a

Audio and video capture robot using rf communication cashless society. Well, the list goes on. It is no exaggeration to say that eyes wherever you go, you can see, or at least feel, the work of an embedded system!

1.6 Overview of Embedded System Architecture


Every embedded system consists of custom-built hardware built around a Central Processing Unit (CPU). This hardware also contains memory chips onto which the software is loaded. The software residing on the memory chip is also called the firmware. The embedded system architecture can be represented as a layered architecture. The operating system runs above the hardware, and the application software runs above the operating system. The same architecture is applicable to any computer including a desktop computer. However, there are significant differences. It is not compulsory to have an operating system in every embedded system. For small appliances such as remote control units, air conditioners, toys etc., there is no need for an operating system and you can write only the software specific to that application. For applications involving complex processing, it is advisable to have an operating system. In such a case, you need to integrate the application software with the operating system and then transfer the entire software on to the memory chip. Once the software is transferred to the memory chip, the software will continue to run for a long time you dont need to reload new software. Now, let us see the details of the various building blocks of the hardware of an embedded system. As shown in Fig. the building blocks are; Central Processing Unit (CPU) Memory (Read-only Memory and Random Access Memory) Input Devices Output devices Communication interfaces Application-specific circuitry

10

Audio and video capture robot using rf communication

Fig 1.3: embedded system Central Processing Unit (CPU): The Central Processing Unit (processor, in short) can be any of the following: microcontroller, microprocessor or Digital Signal Processor (DSP). A micro-controller is a low-cost processor. Its main attraction is that on the chip itself, there will be many other components such as memory, serial communication interface, analog-to digital converter etc. So, for small applications, a micro-controller is the best choice as the number of external components required will be very less. On the other hand, microprocessors are more powerful, but you need to use many external components with them. D5P is used mainly for applications in which signal processing is involved such as audio and video processing. Memory: The memory is categorized as Random Access 11emory (RAM) and Read Only Memory (ROM). The contents of the RAM will be erased if power is switched off to the chip, whereas ROM retains the contents even if the power is switched off. So, the firmware is stored in the ROM. When power is switched on, the processor reads the ROM; the program is program is executed. Input devices: Unlike the desktops, the input devices to an embedded system have very limited capability. There will be no keyboard or a mouse, and hence interacting with the 11

Audio and video capture robot using rf communication embedded system is no easy task. Many embedded systems will have a small keypad-you press one key to give a specific command. A keypad may be used to input only the digits. Many embedded systems used in process control do not have any input device for user interaction; they take inputs from sensors or transducers 1fnd produce electrical signals that are in turn fed to other systems. Output devices: The output devices of the embedded systems also have very limited capability. Some embedded systems will have a few Light Emitting Diodes (LEDs) to indicate the health status of the system modules, or for visual indication of alarms. A small Liquid Crystal Display (LCD) may also be used to display some important parameters. Communication interfaces: The embedded systems may need to, interact with other embedded systems at they may have to transmit data to a desktop. To facilitate this, the embedded systems are provided with one or a few communication interfaces such as RS232, RS422, RS485, Universal Serial Bus (USB), IEEE 1394, Ethernet etc. Application-specific circuitry: Sensors, transducers, special processing and control circuitry may be required fat an embedded system, depending on its application. This circuitry interacts with the processor to carry out the necessary work. The entire hardware has to be given power supply either through the 230 volts main supply or through a battery. The hardware has to design in such a way that the power consumption is minimized.

12

Audio and video capture robot using rf communication

1.7 Conclusions:

Embedded Systems plays a vital role in our day today life. They are used for household appliances like microwave oven to the satellite applications. They provide good man to machine interface. Automation is the further step in the world of Embedded Systems, which includes the elimination of the human being in the mundane applications. They are cost effective, accurate and can work in any conditions and round the clock.

13

Audio and video capture robot using rf communication

CHAPTURE 2

RADIO FREQUENCY (RF)


2.1 What Is RF?
Radio frequency (RF) is a frequency or rate of oscillation within the range of about 3 Hz to 300 GHz. This range corresponds to frequency of alternating current electrical signals used to produce and detect radio waves. Since most of this range is beyond the vibration rate that most mechanical systems can respond to, RF usually refers to oscillations in electrical circuits or electromagnetic radiation .

2.2 Properties Of RF:


Electrical currents that oscillate at RF have special properties not shared by direct current signals. One such property is the ease with which it can ionize air to create a conductive path through air. This property is exploited by 'high frequency' units used in electric arc welding. Another special property is an electromagnetic force that drives the RF current to the surface of conductors, known as the skin effect. Another property is the ability to appear to flow through paths that contain insulating material, like the dielectric insulator of a capacitor. The degree of effect of these properties depends on the frequency of the signals.

2.3 Different Ranges Present In Rf And Applications In Their Ranges?


Extremely low frequency ELF 3 to 30 Hz 10,000 km to 100,000 km directly audible when converted to sound, communication with submarines Super low frequency SLF 30 to 300 Hz 1,000 km to 10,000 km directly audible when converted to sound, AC power grids (50 hertz and 60 hertz) Ultra low frequency 14

Audio and video capture robot using rf communication ULF 300 to 3000 Hz 100 km to 1,000 km directly audible when converted to sound, communication with mines Very low frequency VLF 3 to 30 kHz 10 km to 100 km directly audible when converted to sound (below ca. 18-20 kHz; or "ultrasound" 20-30+ kHz) Low frequency LF 30 to 300 kHz 1 km to 10 km AM broadcasting, navigational beacons, lowFER Medium frequency MF 300 to 3000 kHz 100 m to 1 km navigational beacons, AM broadcasting, maritime and aviation communication High frequency HF 3 to 30 MHz 10 m to 100 m Shortwave, amateur radio, citizens' band radio Very high frequency VHF 30 to 300 MHz 1 m to 10 m FM broadcasting broadcast television, aviation, GPR Ultra high frequency UHF 300 to 3000 MHz 10 cm to 100 cm Broadcast television, mobile telephones, cordless telephones, wireless networking, remote keyless entry for automobiles, microwave ovens, GPR Super high frequency SHF 3 to 30 GHz 1 cm to 10 cm Wireless networking, satellite links, microwave links, Satellite television, door openers. Extremely high frequency EHF 30 to 300 GHz 1 mm to 10 mm Microwave data links, radio astronomy, remote sensing, advanced weapons systems, advanced security scanning 15

Audio and video capture robot using rf communication

2.4 Brief Description Of RF:


Radio frequency (abbreviated RF) is a term that refers to alternating current (AC) having characteristics such that, if the current is input to an antenna, an electromagnetic (EM) field is generated suitable for wireless broadcasting and/or communications. These frequencies cover a significant portion of the electromagnetic radiation spectrum, extending from nine kilohertz (9 kHz),the lowest allocated wireless communications frequency (it's within the range of human hearing), to thousands of gigahertz(GHz). When an RF current is supplied to an antenna, it gives rise to an electromagnetic field that propagates through space. This field is sometimes called an RF field; in less technical jargon it is a "radio wave." Any RF field has a wavelength that is inversely proportional to the frequency. In the atmosphere or in outer space, if f is the frequency in megahertz and sis the wavelength in meters, then s = 300/f The frequency of an RF signal is inversely proportional to the wavelength of the EM field to which it corresponds. At 9 kHz, the free-space wavelength is approximately 33 kilometers (km) or 21 miles (mi). At the highest radio frequencies, the EM wavelengths measure approximately one millimeter (1 mm). As the frequency is increased beyond that of the RF spectrum, EM energy takes the form of infrared (IR), visible, ultraviolet (UV), X rays, and gamma rays. Many types of wireless devices make use of RF fields. Cordless and cellular telephone, radio and television broadcast stations, satellite communications systems, and two-way radio services all operate in the RF spectrum. Some wireless devices operate at IR or visible-light frequencies, whose electromagnetic wavelengths are shorter than those of RF fields. Examples include most television-set remote-control boxes Some cordless computer keyboards and mice, and a few wireless hi-fi stereo headsets. The RF spectrum is divided into several ranges, or bands. With the exception of the lowest-frequency segment, each band represents an increase of frequency 16

Audio and video capture robot using rf communication corresponding to an order of magnitude (power of 10). The table depicts the eight bands in the RF spectrum, showing frequency and bandwidth ranges. The SHF and EHF bands are often referred to as the microwave spectrum.

WHY DO WE GO FOR RF COMMUNICATION? RF Advantages: 1. No line of sight is needed. 2. Not blocked by common materials: It can penetrate most solids and pass through walls. 3. Longer range. 4. It is not sensitive to the light;. 5. It is not much sensitive to the environmental changes and weather conditions. WHAT CARE SHOULD BE TAKEN IN RF COMMUNICATION? RF Disadvantages: 1. Interference: communication devices using similar frequencies - wireless phones, scanners, wrist radios and personal locators can interfere with transmission 2. Lack of security: easier to "eavesdrop" on transmissions since signals are spread out in space rather than confined to a wire 3. Higher cost than infrared 4. Federal Communications Commission(FCC) licenses required for some products 5. Lower speed: data rate transmission is lower than wired and infrared transmission

17

Audio and video capture robot using rf communication

2.5 RF Transmitter Stt-433mhz:

Fig 2.1: STT-433 MHz TRANSMITTER

FACTORS INFLUENCED TO CHOOSE STT-433MHz


ABOUT THE TRANSMITTER:

The STT-433 is ideal for remote control applications where low cost and longer range is required. The transmitter operates from a1.5-12V supply, making it ideal for batterypowered applications. The transmitter employs a SAW-stabilized oscillator, ensuring accurate frequency control for best range performance. The manufacturing-friendly SIP style package and low-cost make the STT-433 suitable for high volume applications.

18

Audio and video capture robot using rf communication Features 433.92 MHz Frequency Low Cost 1.5-12V operation Small size

PIN DESCRIPTION:

fig 2.2: pin diagram(transmitter)

GND Transmitter ground. Connect to ground plane DATA Digital data input. This input is CMOS compatible and should be driven with CMOS level inputs.

19

Audio and video capture robot using rf communication VCC Operating voltage for the transmitter. VCC should be bypassed with a .01uF ceramic capacitor and filtered with a 4.7uF tantalum capacitor. Noise on the power supply will degrade transmitter noise performance. ANT 50 ohm antenna output. The antenna port impedance affects output power and harmonic emissions. Antenna can be single core wire of approximately 17cm length or PCB trace antenna. APPLICATION:

fig 2.3: application of transmitter The typical connection shown in the above figure cannot work exactly at all times because there will be no proper synchronization between the transmitter and the microcontroller unit. i.e., whatever the microcontroller sends the data to the transmitter, the transmitter is not able to accept this data as this will be not in the radio frequency range. Thus, we need an intermediate device which can accept the input from the 20

Audio and video capture robot using rf communication microcontroller, process it in the range of radio frequency range and then send it to the transmitter. Thus, an encoder is used. The encoder used here is HT640 from HOLTEK SEMICONDUCTORS INC.

ENCODER HT640:

Fig 2.4: Encoder HT640

21

Audio and video capture robot using rf communication PIN DESCRIPTION: Table 2.1: pin description(transmitter)

HOW DOES THE ENCODER WORK? The 318 (3 power of 18) series of encoders begins a three-word transmission cycle upon receipt of a transmission enable (TE for the HT600/HT640/HT680 or D12~D17 for the HT6187/HT6207/HT6247, active high). This cycle will repeat itself as long as the transmission enable (TE or D12~D17) is held high. Once the transmission enable falls low, the encoder output completes its final cycle and then stops as shown below.

Fig 2.5: transmission timing 22

Audio and video capture robot using rf communication Address/data programming (preset) The status of each address/data pin can be individually preset to logic high, logic low, or floating. If a transmission enable signal is applied, the encoder scans and transmits the status of the 18 bits of address/data serially in the order A0 to AD17.

Fig 2.6: preset circuit Transmission enable For the TE trigger type of encoders, transmission is enabled by applying a high signal to the TE pin. But for the Data trigger type of encoders, it is enabled by applying a high signal to one of the data pins D12~D17.

23

Audio and video capture robot using rf communication FLOWCHART:

Fig 2.7 : flowchart(transmitter)

24

Audio and video capture robot using rf communication Why is this graph required?

Fig 2.8: Graph showing Frequency versus Voltage The graph shown above decides the resistance value to be connected to the oscillator pins of the encoder. The oscillator resistance will have an effect on startup time and steady state amplitude. For the data communication at a particular frequency in the RF range, both the transmitter and receiver should be set to a particular frequency. The exact setting of the frequency can be obtained in the encoder and decoder circuits. The frequency value can be set using the graph. The operating voltage of encoder and decoder is 5V. Thus looking at the graph at 5V VDD, if we select the frequency in the range of 1.25 and 1.50 we are selecting 220k resistance.

25

Audio and video capture robot using rf communication BASIC APPLICATION CIRCUIT OF HT640 ENCODER:

Fig 2.9: HT640

26

Audio and video capture robot using rf communication DEMO CIRCUIT: Transmission Circuit

Fig 2.10: DEMO CIRCUIT: Transmission Circuit The data sent from the microcontroller is encoded and sent to RF transmitter. The data is transmitted on the antenna pin. Thus, this data should be received on the destination i.e, on RF receiver.

2.6 RF Receiver Str-433 Mhz:

Fig 2.11: RF receiver

27

Audio and video capture robot using rf communication The data is received by the RF receiver from the antenna pin and this data is available on the data pins. Two Data pins are provided in the receiver module. Thus, this data can be used for further applications . PINOUT:

Fig 2.12: pin diag. of receiver GND Receiver Ground. Connect to ground plane. VCC (5V) VCC pins are electrically connected and provide operating voltage for the receiver. VCC can be applied to either or both. VCC should be bypassed with a .1F ceramic capacitor. Noise on the power supply will degrade receiver sensitivity. DATA Digital data output. This output is capable of driving one TTL or CMOS load. It is a CMOS compatible output.

28

Audio and video capture robot using rf communication

Similarly, as the transmitter requires an encoder, the receiver module requires a decoder. The decoder used is HT648L from HOLTEK SEMICONDUCTOR INC.

29

Audio and video capture robot using rf communication PIN DESCRIPTION: Table 2.2: pin description(receiver)

Features Operating voltage: 2.4V~12V. Low power and high noise immunity CMOS technology. Low standby current. Capable of decoding 18 bits of information. Pairs with HOLTEKs 318 series of encoders. 8~18 address pins. 0~8 data pins.

How Does The Decoder Work?


The 3^18 decoders are a series of CMOS LSIs for remote control system applications. They are paired with the 3^18 series of encoders. For proper operation, a pair of encoder/decoder pair with the same number of address and data format should be selected. The 3^18 series of decoders receives serial address and data from that series of encoders that are transmitted by a carrier using an RF medium. 30

Audio and video capture robot using rf communication A signal on the DIN pin then activates the oscillator which in turns decodes the incoming address and data. It then compares the serial input data twice continuously with its local address. If no errors or unmatched codes are encountered, the input data codes are decoded and then transferred to the output pins. The VT pin also goes high to indicate a valid transmission. That will last until the address code is incorrect or no signal has been received. The 3^18 decoders are capable of decoding 18 bits of information that consists of N bits of address and 18N bits of data.

31

Audio and video capture robot using rf communication FLOW CHART:

Fig 2.13 : flowchart of Receiver

32

Audio and video capture robot using rf communication

BASIC APPLICATION CIRCUIT OF HT648L DECODER:

fig 2.14: app circuit(HT648)

33

Audio and video capture robot using rf communication DEMO CIRCUIT: Reception circuit

Fig 2.15: demo circuit(receiver) The data transmitted into the air is received by the receiver. The received data is taken from the data line of the receiver and is fed to the decoder .The output of decoder is given to microcontroller and then data is processed according to the applications. BC 557 TRANSISTOR: Fig 2.16: Symbol

34

Audio and video capture robot using rf communication FEATURES Low current (max. 100 mA) Low voltage (max. 65 V). APPLICATIONS General purpose switching and amplification

LIMITING VALUES: Table 2.3: limiting values

35

Audio and video capture robot using rf communication

BC 557 PNP Transistor acts as a switch is used in this project.

CHAPTURE 3

POWER SUPPLY:
36

Audio and video capture robot using rf communication

Introduction:
The input to the circuit is applied from the regulated power supply. The a.c. input i.e., 230V from the mains supply is step down by the transformer to 12V and is fed to a rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any a.c components present even after rectification. Now, this voltage is given to a voltage regulator to obtain a pure constant dc voltage.

230V AC 50Hz

D.C Output

Step down transformer Fig 3.1 : power supply Transformer:

Bridge Rectifier Filter Regulator

Usually, DC voltages are required to operate various electronic equipment and these voltages are 5V, 9V or 12V. But these voltages cannot be obtained directly. Thus the a.c input available at the mains supply i.e., 230V is to be brought down to the required voltage level. This is done by a transformer. Thus, a step down transformer is employed to decrease the voltage to a required level.

37

Audio and video capture robot using rf communication Rectifier: The output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used because of its merits like good stability and full wave rectification. Filter: Capacitive filter is used in this project. It removes the ripples from the output of rectifier and smoothens the D.C. Output received from this filter is constant until the mains voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage received at this point changes. Therefore a regulator is applied at the output stage. Voltage regulator: As the name itself implies, it regulates the input applied to it. A voltage regulator is an electrical regulator designed to automatically maintain a constant voltage level. In this project, power supply of 5V and 12V are required. In order to obtain these voltage levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents positive supply and the numbers 05, 12 represent the required output voltage levels.

38

Audio and video capture robot using rf communication

CHAPTURE 4

MICROCONTROLLERS
4.1 Introduction:
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 a Harvard architecture, single chip microcontroller (C) which was developed by Intel in 1980 for use in embedded systems. 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 NVRAM. The microcontroller used in this project is AT89S52. Atmel Corporation introduced this 89C51 microcontroller. This microcontroller belongs to 8051 family. This 39

Audio and video capture robot using rf communication 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. AT89S52 is Flash type 8051. The present project is implemented on Keil U vision. 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 and the software tools used are discussed in the following sections.

4.2 Features Of AT89S52:


8K Bytes of Re-programmable Flash Memory. RAM is 256 bytes. 2.7V to 6V Operating Range. Fully Static Operation: 0 Hz to 24 MHz. 32 Programmable I/O Lines. Two 16-bit Timer/Counters. Low-power Idle and Power-down Modes.

4.3 Description:

40

Audio and video capture robot using rf communication The AT89S52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 8K bytes of Flash programmable memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer, which provides a highly flexible and cost-effective solution to many embedded control applications. In addition, the AT89S52 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.

Fig4.1: MC Pin diagram

41

Audio and video capture robot using rf communication

Fig 4.2 : MC Block diagram

PIN DESCRIPTION: 42

Audio and video capture robot using rf communication Vcc Pin 40 provides supply voltage to the chip. The voltage source is +5V. 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 11. 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 the below figure. 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.

43

Audio and video capture robot using rf communication

Fig4.3: Oscillator Connections C1, C2 = 30 pF 10 pF for Crystals = 40 pF 10 pF for Ceramic Resonators

Fig: External Clock Drive Configuration 44

Audio and video capture robot using rf communication

RESET Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this pin, the microcontroller will reset and terminate all the activities. This is often referred to as a power-on reset. EA (External access) Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either Vcc or GND but it cannot be left unconnected. The 8051 family members all come with on-chip ROM to store programs. In such cases, the EA pin is connected to Vcc. If the code is stored on an external ROM, the EA pin must be connected to GND to indicate that the code is stored externally. PSEN (Program store enable) This is an output pin. ALE (Address latch enable) This is an output pin and is active high.

Ports 0, 1, 2 and 3

45

Audio and video capture robot using rf communication 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 demultiplexing 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 and 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 and Port 2 With no external memory connection, both P1 and P2 are used as simple I/O. With external memory connections, port 2 must be used along with P0 to provide the 16bit address for the external memory. Port 2 is designated as A8-A15 indicating its dual function. While P0 provides the lower 8 bits via A0-A7, it is the job of P2 to provide bits A8-A15 of the address.

Port 3 46

Audio and video capture robot using rf communication Port 3 occupies a total of 8 pins, pins 10 through 17. It can be used as input or output. P3 does not need any pull-up resistors, the same as port 1 and port 2. Port 3 has an additional function of providing some extremely important signals such as interrupts. Table4.1: Port 3 Alternate Functions

Machine cycle for the 8051 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.

47

Audio and video capture robot using rf communication 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.

4.4 Programming The Flash:


The AT89S52 is normally shipped with the on-chip Flash memory array in the erased state (that is, contents = FFH) and ready to be programmed. The programming interface accepts either a high-voltage (12-volt) or a low-voltage (VCC) program enable signal. The low-voltage programming mode provides a convenient way to program the AT89S52 inside the users system, while the high-voltage programming mode is compatible with conventional third party Flash or EPROM programmers. The AT89S52 is shipped with either the high-voltage or low-voltage programming mode enabled. The respective top-side marking and device signature codes are listed in the following table.

48

Audio and video capture robot using rf communication

The AT89S52 code memory array is programmed byte-byte in either programming mode. To program any nonblank byte in the on-chip Flash Memory, the entire memory must be erased using the Chip Erase Mode. Programming Algorithm: Before programming the AT89S52, the address, data and control signals should be set up according to the Flash programming mode table. To program the AT89S52, the following steps should be considered: 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 for the high-voltage programming mode. 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 1.5 ms. 49

Audio and video capture robot using rf communication Repeat steps 1 through 5, changing the address and data for the entire array or until the end of the object file is reached. Data Polling: The AT89S52 features Data Polling to indicate the end of a write cycle. During a write cycle, an attempted read of the last byte written will result in the complement of the written datum on PO.7. Once the write cycle has been completed, true data are valid on all outputs, and the next cycle may begin. Data Polling may begin any time after a write cycle has been initiated. Ready/Busy: The progress of byte programming can also be monitored by the RDY/BSY output signal. P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is pulled high again when programming is done to indicate READY. Chip Erase: The entire Flash array is erased electrically by using the proper combination of control signals and by holding ALE/PROG low for 10 ms. The code array is written with all 1s. The chip erase operation must be executed before the code memory can be reprogrammed.

50

Audio and video capture robot using rf communication Reading the Signature Bytes: The signature bytes are read by the same procedure as a normal verification of locations 030H, 031H, and 032H, except that P3.6 and P3.7 must be pulled to a logic low. The values returned are as follows. (030H) = 1EH indicates manufactured by Atmel (031H) = 51H indicates 89C51 (032H) = FFH indicates 12V programming (032H) = 05H indicates 5V programming Programming Interface: Every code byte in the Flash array can be written and the entire array can be erased by using the appropriate combination of control signals. The write operation cycle is self timed and once initiated, will automatically time itself to completion. All major programming vendors offer worldwide support for the Atmel microcontroller series.

51

Audio and video capture robot using rf communication

CHAPTURE 5

LIGHT-EMITTING DIODE (LED)


5.1 Introduction:
Light-emitting diodes are elements for light signalization in electronics. They are manufactured in different shapes, colors and sizes. For their low price, low consumption and simple use, they have almost completely pushed aside other light sources- bulbs at first place. They perform similar to common diodes with the difference that they emit light when current flows through them.

fig 5.1: LED It is important to know that each diode will be immediately destroyed unless its current is limited. This means that a conductor must be connected in parallel to a diode. In order to correctly determine value of this conductor, it is necessary to know diodes voltage drop in forward direction, which depends on what 52

Audio and video capture robot using rf communication material a diode is made of and what colour it is. Values typical for the most frequently used diodes are shown in table below: As seen, there are three main types of LEDs. Standard ones get ful brightness at current of 20mA. Low Current diodes get ful brightness at ten times lower current while Super Bright diodes produce more intensive light than Standard ones. Since the 8051 microcontrollers can provide only low input current and since their pins are configured as outputs when voltage level on them is equal to 0, direct connecting to LEDs is carried out as it is shown on figure ( Low current LED, cathode is connected to output pin).

5.2 Switches and Pushbuttons


There is nothing simpler than this! This is the simplest way of controlling appearance of some voltage on microcontrollers input pin. There is also no need for additional explanation of how these components operate.

fig 5.2: led interfacing Nevertheless, it is not so simple in practice... This is about something commonly unnoticeable when using these components in everyday life. It is about contact bounce- a common problem with m e c h a n i c a l switches. If contact switching does not happen so quickly, several consecutive bounces can be noticed prior to maintain stable state. The reasons for this are: vibrations, slight rough spots and dirt. Anyway, whole this process does not last long (a few micro- or miliseconds), but long enough to be registered by the microcontroller. Concerning pulse counter, error occurs in almost 100% of cases! 53

Audio and video capture robot using rf communication

fig 5.3: led interfacing2 The simplest solution is to connect simple RC circuit which will suppress each quick voltage change. Since the bouncing time is not defined, the values of elements are not strictly determined. In the most cases, the values shown on figure are sufficient. If complete safety is needed, radical measures should be taken! The circuit, shown on the figure (RS flip-flop), changes logic state on its output with the first pulse triggered by contact bounce. Even though this is more expensive solution (SPDT switch), the problem is definitely resolved! Besides, since the condensator is not used, very short pulses can be also registered in this way. In addition to these hardware solutions, a simple software solution is commonly applied too: when a program tests the state of some input pin and finds changes, the check should be done one more time after certain time delay. If the change is confirmed it means that switch (or pushbutton) has changed its position. The advantages of such solution are obvious: it is free of charge, effects of disturbances are eliminated too and it can be adjusted to the worst-quality contacts.

54

Audio and video capture robot using rf communication

CHAPTURE 6

THEORY OF DC MOTOR
6.1 Introduction: The speed of a DC motor is directly proportional to the supply voltage, so if we reduce the supply voltage from 12 Volts to 6 Volts, the motor will run at half the speed. How can this be achieved when the battery is fixed at 12 Volts? The speed controller works by varying the average voltage sent to the motor. It could do this by simply adjusting the voltage sent to the motor, but this is quite inefficient to do. A better way is to switch the motor's supply on and off very quickly. If the switching is fast enough, the motor doesn't notice it, it only notices the average effect. When you watch a film in the cinema, or the television, what you are actually seeing is a series of fixed pictures, which change rapidly enough that your eyes just see the average effect - movement. Your brain fills in the gaps to give an average effect. Now imagine a light bulb with a switch. When you close the switch, the bulb goes on and is at full brightness, say 100 Watts. When you open the switch it goes off (0 Watts). Now if you close the switch for a fraction of a second, then open it for the same amount of time, the filament won't have time to cool down and heat up, and you will just get an average glow of 50 Watts. This is how lamp dimmers work, and the same principle is used by speed controllers to drive a motor. When the switch is closed, the motor sees 12 Volts, and when it is open it sees 0 Volts. If the switch is open for the same amount of time as it is closed, the motor will see an average of 6 Volts, and will run more slowly accordingly. The graph below shows the speed of a motor that is being turned on and off

55

Audio and video capture robot using rf communication

6.2 H-BRIDGE:
An H-bridge is an electronic circuit which enables DC electric motors to be run forwards or backwards. These circuits are often used in robotics. H-bridges are available as integrated circuits, or can be built from discrete components. Fig 6.1: H-Bridge

The two basic states of a H-bridge.The term "H-bridge" is derived from the typical graphical representation of such a circuit. An H-bridge is built with four switches (solid-state or mechanical). When the switches S1 and S4 (according to the first figure) are closed (and S2 and S3 are open) a positive voltage will be applied across the motor. By opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing reverse operation of the motor. Using the nomenclature above, the switches S1 and S2 should never be closed at the same time, as this would cause a short circuit on the input voltage source. The same applies to the switches S3 and S4. This condition is known as shoot-through.

Operation The H-Bridge arrangement is generally used to reverse the polarity of the motor, but can also be used to 'brake' the motor, where the motor comes to a sudden stop, as the motors terminals are shorted, or to let the motor 'free run' to a stop, as the motor is effectively disconnected from the circuit. The following table summarizes operation. 56

Audio and video capture robot using rf communication Table 6.1: H-Bridge operation S1 S2 S3 S4 Result

1 0 0 1

Motor right

moves

0 1 1 0 Motor moves left

0 0 0 0 Motor free runs

0 1 0 1 Motor brakes

6.3 H-Bridge Driver:


The switching property of this H-Bridge can be replace by a Transistor or a Relay or even by an IC. Here we are replacing this with an IC named L293D as the driver whose description is as given below. Features: 600mA OUTPUT CURRENT CAPABILITY PER CHANNEL 1.2A PEAK OUTPUT CURRENT (non repetitive) ENABLE FACILITY OVERTEMPERATURE PROTECTION LOGICAL "0" INPUT VOLTAGE UP TO 1.5 V (HIGH NOISE IMMUNITY)

6.4 Description:
The Device is a monolithic integrated high voltage, high current four channel driver designed to accept standard DTL or TTL logic levels and drive inductive loads 57

Audio and video capture robot using rf communication (such as relays solenoids, DC and stepping motors) and switching power transistors. To simplify use as two bridges each pair of channels is equipped with an enable input. A separate supply input is provided for the logic, allowing operation at a lower voltage and internal clamp diodes are included. This device is suitable for use in switching applications at frequencies up to 5 kHz. The L293D is assembled in a 16 lead plastic package which has 4 center pins connected together and used for heat sinking The L293DD is assembled in a 20 lead surface mount which has 8 center pins connected together and used for heat sinking.

BLOCK DIAGRAM:

Fig 6.2 : H-bridge ckt

Table 6.2: ABSOLUTE MAXIMUM RATINGS

58

Audio and video capture robot using rf communication

PIN CONNECTIONS

Fig 6.3 : pin connections of H-bridge

CHAPTURE 7
59

Audio and video capture robot using rf communication

WIRELESS CAMERA
A portable small-sized camera has a case having a ball-point pen appearance in a portion thereof and a through hole in one side, and a camera circuit part built in the case and for photographing an object through the through hole. The portable small-sized camera has the ball-point pen appearance, photographing a particular location in secret is possible without exposure to others. The camera circuit part is connected to a wireless transmission device for outputting a signal by a cable. A wireless receiving device at a remote location from the wireless transmission device receives a signal of the wireless transmission device for outputting or recording. The portable camera further includes a microphone and the transmission device transmits a voice signal.

Fig 7.1: camera

CHAPTURE 8
60

Audio and video capture robot using rf communication

PROJECT CODE
Code:
#include<reg52.h> #define rfdata P1 void stop(void); void forward(void); void left(void); void right(void); void backward(void);

void main() { rfdata=0xff; P0=0; P3=0; while(1) { if(rfdata==0x0f) { while(rfdata==0x0f) { stop(); } } if(rfdata==0x0e) { while(rfdata==0x0e) { forward(); } } if(rfdata==0x0d) { while(rfdata==0x0d) { left(); } } if(rfdata==0x0b) 61

Audio and video capture robot using rf communication { while(rfdata==0x0b) { right(); } } if(rfdata==0x07) { while(rfdata==0x07) { backward(); } } } } void stop(void) { P0=0x00; P3=0x00; } void forward(void) { P0=0xCA; P3=0; } void left(void) { P0=0x42; //P3=0x42; } void right(void) { P0=0x88; // P3=0x88; } void backward(void) { P3=0xCA; P0=0; }

62

Audio and video capture robot using rf communication

CHAPTURE 9

ADVANTAGES AND APPLICATIONS


9.1 Advantages:
1. Not line of sight 2. Not blocked by common materials: can penetrate most solids and pass through walls 3. Longer range 4. Not light sensitive 5. Not as sensitive to weather/environmental conditions

9.2 Applications:
1) Industries are using RF solutions for monitoring, control, process, inventory tracking, data links and bar code reading devices. 2) Commercial wireless applications such as door announcers, security and access systems, gate control, remote activation, score board and paging systems. 3) Automotive compa nies employing RF for wireless remote control, remote keyless entry and safety applications. 4) Consumer products including electronic toys, home security, gate and garage door openers, Intercom, fire and safety systems, and irrigation controllers. 5) Medical products like patient call and monitoring, handicap assistance device, surgery Communication system, remote patient data logging and ECG monitor.

63

Audio and video capture robot using rf communication

CONCLUSION
This project presents a metal detecting robot using RF communication with wireless audio and video transmission and it is designed and implemented with Atmel 89S52 MCU in embedded system domain. The robot is moved in particular direction using switches and the images are captured along with the audio and images are watched on the television .Experimental work has been carried out carefully. The result shows that higher efficiency is indeed achieved using the embedded system. The proposed method is verified to be highly beneficial for the security purpose and industrial purpose.

64

Audio and video capture robot using rf communication

BIBILOGRAPHY
REFERENCES: BOOKS 8051 microcontroller and Embedded system 8051 microcontroller and architecture Principle of electronics AUTHORS Mohd.Mazid Kenneth J Ayala V.K Mehtha PUBLICATIONS Pearson Education Delimar cengage learning S.C Chand & company Ltd YEAR 2006 2003 1980

NAME OF THE SITES: 1. 2. 3. 4. www.mitel.databook.com www.atmel.databook.com www.franklin.com www.keil.com

65

Vous aimerez peut-être aussi