Vous êtes sur la page 1sur 24

CHAPTER 2 : LITERATURE REVIEW

2.0 INTRODUCTION This chapter will explain all theory about our project Agent Military Spy Gadget. In this chapter, we also explain about background or purpose of the component will be use in this project. Literature research is reference or comprehension in designing our project.

2.1 PHASE OF PROJECT FHASE 1 : HARDWARE 1) REMOTE CONTROL CAR 2) WIRELESS VIDEO CAMERA TRANSMITTER 3) PIC 4) RF TRANSMITTER AND RECEIVER 5) USB TO RS232 (9 PIN) CABLE FHASE 2 : SOFTWARE 1) VISUAL BASIC 2) MICROCONTROLLER FIRMWARE MPLAB

2.2 HARDWARE 2.2.1 REMOTE CONTROL CAR Definition: Scale models operated by a wireless, hand-held controller that sends radio signals to the vehicle are radio control vehicles. A specific radio signal or frequency is sent from the controller to a receiver inside the vehicle to tell it to go, stop, turn, and do other maneuvers. The abbreviation RC usually stands for radio control or radio controlled but may also refer to remote control vehicles that don't operate through radio signals including those with wires connecting the vehicle and controller and those that use infrared controls. Also Known As: RC | radio controlled | remote control | remote controlled Examples: Radio control vehicles can be cars, trucks, airplanes, helicopters, boats, submarines, and other fanciful vehicles. Other toys that may operate by radio control include some robot toys and specialty toys such as radio control rodents, snakes, sharks, and UFOs. Source : (http://rcvehicles.about.com/od/glossary/g/radiocontrol.htm) Radio controlled vehicles have two types of antennas. There's an antenna on the transmitter or controller that sends messages to the RC and one on the receiver (in the RC vehicle) that receives those messages. The radio system for your RC is tuned to a specific frequency and a specific length of antenna. The transmitter antenna might be a solid metal tube or a piece of flexible wire with an end cap (which may or may not retract into the controller) or a telescoping antenna where the sections nest inside each other when collapsed. With some radios you'll need to screw the antenna into the controller while others come already attached. The receiver antenna is usually a long piece of plastic-coated wire that pokes through a hole in the body and trails behind the RC. Some of the antenna may be wrapped around inside the RC. Some RCs, such as the RadioShack XMODS, have plain, thin wire antennas that are stiffer than the plastic-coated antenna wires.

2.2.2 WIRELESS VIDEO CAMERA TRANSMITTER

This Wireless Camera Transmitter + Receiver Set comes with everything need for spy and surveillance right out of the box. Get a tiny 1/3 inch CMOS wireless camera transmitter that captures both video and audio. It can be powered from a 9V battery or normal wall socket. Plus you also get a wireless long range receiver which can output the transmitted camera imagery to any standard TV with AV connectors. It`s powered from a normal wall socket and comes with a high power antenna for better reception quality. How It Works: Simply attach a 9V battery to the wireless camera transmitter and place it in a inconspicuous corner of the boardroom with the lens aimed at where the action will be. Meanwhile, put yourself in another room with the wireless receiver hooked up to a small TV. Everything that gets said and done in the boardroom gets transmitted to your display monitor. And even in the unlikely event that they spot the camera. At a Glance

Complete Wireless Camera Transmitter + Receiver Set Camera Transmitter can be powered by wall socket or battery Camera Transmitter can connect to TV as a normal video camera 1/3 Inch CMOS image sensor Captures both audio and video Perfect spy device

Manufacturer Specifications

Primary Function: Tiny Wireless Spy Camera Transmitter and Long Range Wireless Receiver Set Wireless Camera + Transmitter Info: Image Sensor: 1/3 Inch CMOS TV Color System: PAL Horizontal Definition: 380TV Lines Angular Field of View: 80 deg f=4mm Synchronization System: Internal Minimum Illumination: 3Lux F/1.2 White Balance: Auto Transmission Frequency: 1.2 GHz Power Source: wall socket or 9V battery Recommended Max Range for Objects: 4-6 Meters Transmission Range: 15-18 Meters Built In Microphone: YES (suggested range 2-3m) Wireless or Wired (AV) connectivity: YES Adjustable Vertical Angle Frame: YES Dimensions (with stand): 40mm x 40mm x 30mm (L x W x D)

Wireless Long Range Receiver Info: Receiving Frequency: 1.2GHz Intermediate Frequency: 480Mhz Frequency Stabilization: +/-100Khz Demodulation Mode: FM Antenna: 50ohm SMA Receiving Sensitivity: -85dBm Power Source: wall socket Dimension: 120mm x 81mm x 20mm (L x W x D) AV OUT: YES

Certification: CE, FCC, RoHS Manufacturer Ref: YNSRX4TW2G74

Product Notes

Camera transmitter can transmit images wirelessly or it can of itself be connected to a TV (AV connection) to display images directly Camera transmitter can be powered by either a 9V battery or wall socket Camera transmitter powered by 9V battery can be left in a location as a disposable camera transmitter! Wireless receiver outputs to TV through AV connection

Package Contents for CVAJM-309AS-PAL


Camera Transmitter Wireless Receiver Long Range Antenna AV Cable 1x 9V Battery Power Adapter for Camera Transmitter 2x AC Power Adapters (100-240V, 50/60hz) User Manual - English

2.2.3 COMPONENT 2.2.3.1 TRANSMITTER

Definition: Radio controlled vehicles communicate through radio signals. A transmitter is a (usually) hand-held device that sends radio signals to the radio receiver in the RC vehicle to tell it what to do. The transmitter is also called a controller because it controls the movement and speed of the vehicle. Transmitter Styles There are two main styles of transmitters for radio controlled vehicles. The pistol-grip style looks like a gun with a trigger and a knob. The stick-controller is box-like with two joysticks, knobs, or buttons, and additional switches. The transmitter is also described by the number of actions (speed, movement, etc.) or channels it controls.

Wired Transmitters Remote controlled vehicles may have wired transmitters. A wire or tether connects to the vehicle (or to the track in the case of slot cars) and transmits signals to control the vehicle. Crystals on Transmitters On hobby-grade transmitters there is a slot for inserting one of a matching pair of crystals. The other crystal is inserted in the receiver inside the vehicle. The crystals set the radio frequency at which the transmitter and vehicle communicate. In the transmitter for a toygrade RC, the crystal is usually soldered directly to the circuit board inside the transmitter. Also Known As: controller | Tx (http://rcvehicles.about.com/od/glossary/g/controller.htm)

2.2.3.2 RECEIVER

Definition: RC vehicles communicate through radio signals. A receiver is a small unit inside the RC vehicle that receives the signal from the transmitter. It translates the radio signals which tell the RC vehicle what to do such as what direction and speed to move. The transmitter and the receiver must operate on the same frequency. The receiver typically has a slot for a radio crystal, a receiver antenna, and spots for plugging in connections from the electronic speed controller, steering servo, and battery. Toy-grade RCs don't have a receiver unit like hobby-grade RCs. Instead, they have a circuit board (sometimes more than one) which receives signals from the transmitter, acts as a speed controller, and sends signals to the motor and the servo and other features (such as lights or sound). Rather than plugs, most connections are soldered in place. Also Known As: Rx Common Misspellings: receiver FREQUENCY Definition: In RC vehicles, frequency is the specific radio signal sent from the transmitter to the receiver to control the vehicle. Hertz (Hz) or megahertz (MHz) or gigahertz (GHz) is the measurement used to describe frequency. In toy-grade RCs, the frequency is normally a set channel within the 27MHz or 49MHz frequency range. There is a greater variety of channels and additional frequencies available in hobby-grade vehicles. Each country or part of the world has its own reserved, approved frequencies for use by radio controlled surface and air vehicles. In the US: 72MHz Channels 11-60 are for aircraft use only.75MHz Channels 61-90 are frequencies for some surface vehicles (boats, cars). 27MHz (6 color-coded channels) is

commonly used in both hobby-grade and toy-grade RC vehicles. 49MHz is found in some RC toys. Use of 50MHz frequencies in RC vehicles requires an amateur radio license. 2.4GHz Spread Spectrum or DSM is being used increasingly for RC vehicles because it eliminates frequency interference problems. In Australia: 27MHz Channels 10-36 are for surface vehicles. 36 MHz Channels 601-659 are for aircraft and boats. 40MHz is also used by some RCs. In the U.K.: 27MHz (13 color-coded channels) is used for some RC toys while 35MHz Channels 55-90 are for aircraft use only. Cars and boats can use 40MHz Channels 665-995. Other Countries: Use these resources to find RC frequencies used around the world.

GLOSARY MEGAHERTZ Definition: In RC vehicles, frequency is the specific radio signal used to control the vehicle.Megahertz (abbreviated as MHz) is the measurement used to describe those radio frequencies. The transmitter and receiver of an RC vehicle must operate on the same Megahertz frequency. Examples: Toy-grade RCs typically use a set frequency of 27MHz or 49MHz. (http://rcvehicles.about.com/od/glossary/g/megahertz.htm)

2.2.3.3 LIGHT SENSORS These comprise of two Light Dependent Resistors (LDR)

Everything has an electrical resistance, some more than others. An LDR will have a resistance that varies according to the amount of visible light that falls on it. A close up of an LDR is shown below:

The light falling on the brown zigzag lines on the sensor, causes the resistance of the device to fall. This is known as a negative co-efficient. There are some LDRs that work in the opposite way i.e. their resistance increases with light (called positive co-efficient). I won't go into the physics of how the device changes its resistance, so just take it as read.

Now, in order to use this device in a simple circuit, all we need to do is put a voltage across it and measure the current flowing through it. However, measuring current can be a little tricky. So, we put another resistor in series, and measure the voltage across the LDR. This makes us a potential divider, and the voltage across the LDR is proportional to the current. The diagrams below show the concept.

+V +V 0V 0V I V

Here, the current is directly proportional to the resistance of the LDR

A much easier way is to put a second resistor in series with the LDR and measure the voltage across the LDR

To take the extreme cases, we can therefore detect if light is present or not, just by simply detecting if we have a voltage or not. If we use two sensors like those on Cybot, then we can also detect which direction the light is coming from simply by seeing which sensor has the stronger voltage. Ultrasonics These sensors emit a very high frequency sound. In fact it is so high, that we can't hear them. A picture of two ultrasonic sensors is shown below:

Two sensors work in unison, one as the transmitter and one as the receiver (this is why Cybot has four of them). The transmitter typically sends out a constant beam of sound at a frequency of 40KHz (note that the human hearing barely goes above 17KHz). The receiver detects any sounds coming in and gives us a voltage out. So, what happens is the transmitter sends out a signal. If there isn't an object in front of it, then the sound wave will carry on (note there is a limit to the distance here!). If, and only if, there is an object in the way, the sound waves will bounce back along the same path, and so be picked up by our receiver. Simple, huh? Now, and this is the clever bit, if we can note the time between transmitting the sound, and when we receive it, then we can work out the distance of the object from our sensors. This, by the way is how parking detectors work on some of the newer cars.

Line Sensor Now this may seem to be a very special kind of sensor, after all what kind of sensor can see a line? Well, the principles are very simple. It consists of just two components. The first is an Infra-Red (IR) transmitter (usually an LED), while the second is an Infra-Red receiver (usually a transistor). IR is transmitted out of the sensor unit. If the IR is reflected back, it is picked up by the IR receiver transistor. But how does it follow a line, you ask? Well, IR is basically heat (the heat from the sun is predominantly in the IR part of the spectrum). Black, as you probably know, absorbs heat, which is why it is best not to wear black in the summer months. If black absorbs heat, then it also absorbs IR. And this is the principle. While the sensor is over a black line, no IR is reflected back to the receiver. If the sensor

strays away from the line, then IR is reflected back. This is why Cybot 'follows a black line'. For best results the black line is placed on a white background, which will give the extreme two cases - white reflects IR. The diagram below illustrates this, but as you can see it is quite a simple concept.

IR TX IR TX

IR RX IR RX

IR is reflected here

IR is not reflected in the black region

This completes the section on Sensors.

2.2.4 MICROCONTROLLER SELECTION 2.2.4.1 INTRODUCTION PIC18F4550 Pin Diagram

Special Microcontroller Features Universal Serial Bus Features: USB V2.0 Compliant Low Speed (1.5 Mb/s) and Full Speed (12 Mb/s) Supports Control, Interrupt, Isochronous and Bulk Transfers Supports up to 32 Endpoints (16 bidirectional) 1 Kbyte Dual Access RAM for USB On-Chip USB Transceiver with On-Chip Voltage Regulator Interface for Off-Chip USB Transceiver Streaming Parallel Port (SPP) for USB streaming transfers (40/44-pin devices only)

2.2.4.2 DEVICES FEATURES

2.2.4.3 SPECIAL FEATURES Memory Endurance: The Enhanced Flash cells for both program memory and data EEPROM are rated to last for many thousands of erase/write cycles up to 100,000 for program memory and 1,000,000 for EEPROM. Data retention without refresh is conservatively estimated to be greater than 40 years. Self-Programmability: These devices can write to their own program memory spaces under internal software control. By using a boot loader routine, located in the protected Boot Block at the top of program memory, it becomes possible to create an application that can update itself in the field. Extended Instruction Set: The PIC18F2455/2550/4455/4550 family introduces an optional extension to the PIC18 instruction set, which adds 8 new instructions and an Indexed Literal Offset Addressing mode. This extension, enabled as a device configuration option, has been specifically designed to optimize re-entrant application code originally developed in high-level languages such as C. Enhanced CCP Module: In PWM mode, this module provides 1, 2 or 4 modulated outputs for controlling half-bridge and full-bridge drivers. Other features include auto-shutdown for disabling PWM outputs on interrupt or other select conditions and auto-restart to reactivate outputs once the condition has cleared. Enhanced Addressable USART: This serial communication module is capable of standard RS-232 operation and provides support for the LIN bus protocol. Other enhancements include Automatic Baud Rate Detection and a 16-bit Baud Rate Generator for improved resolution. When the microcontroller is using the internal oscillator block, the EUSART provides stable operation for applications that talk to the outside world without using an external crystal (or its accompanying power requirement). 10-Bit A/D Converter: This module incorporates programmable acquisition time, allowing for a channel to be selected and a conversion to be initiated, without waiting for a sampling period and thus, reducing code overhead. Dedicated ICD/ICSP Port: These devices introduce the use of debugger and programming pins that are not multiplexed with other microcontroller features. Offered as an option in select packages, this feature allows users to develop I/O intensive applications while retaining the ability to program and debug in the circuit.

Source : (http://ww1.microchip.com/downloads/en/devicedoc/39632c.pdf) 2.2.4.4 COMPARISON TWO DIFFERENT MICROCONTROLLERS FOR THIS PROJECT. BELOW IS A SUMMARY OF THE EVALUATION.

Microcontroller

PIC18F4550

PIC16F628A

Pros

Interface for OffChip USB Transceiver

price level of software control

Price

Cons

Hard to program (assembly)

Extra programmer required Hard to program (assembly)

We use the PIC18F4550 for this project. This is because : PIC18F4550 have interface for off-Chip USB transceiver Programmable Code Protection

2.2.5 USB RS232

INTRODUCTION One of the most common questions asked to me in emails is how an RS232 connector can be soldered to an USB cable. Unfortunately life is not that simple. Although RS232 and USB (universal serial bus) are both serial communication standards to connect peripherals to computers, they are totally different in design. A simple cable is not enough to connect RS232 devices to a computer with only USB ports. There are however converter modules and cables that can be successfully used to connect RS232 devices to computers via an USB port. These adapters and cables contain electronics, and the success rate depends on the capabilities of this electronics and the device driver software that is shipped with the converter to communicate with these electronics over the USB bus. Before buying your USB to RS232 converter, it is advised that you read this document first. DIFFERENCES FROM THE APPLICATION POINT OF VIEW RS232 is a definition for serial communication on a 1:1 base. RS232 defines the interface layer, but not the application layer. To use RS232 in a specific situation, application specific software must be written on devices on both ends of the connecting RS232 cable. The developer is free to define the protocol used to communicate. RS232 ports can be either accessed directly by an application, or via a device driver in the operating system. USB on the other hand is a bus system which allows more than one peripheral to be connected to a host computer via one USB port. Hubs can be used in the USB chain to extend

the cable length and allow for even more devices to connect to the same USB port. The standard not only describes the physical properties of the interface, but also the protocols to be used. Because of the complex USB protocol requirements, communication with USB ports on a computer is always performed via a device driver. It is easy to see where the problems arise. Developers have lots of freedom where it comes to defining RS232 communications and ports are often directly, or almost directly accessed in the application program. Settings like baudrate, databits, hardware software flow control can often be changed within the application. The USB interface does not give this flexibility. When however an RS232 port is used via an USB to RS232 converter, this flexibility should be present in some way. Therefore to use an RS232 port via an USB port, a second device driver is necesarry which emulates a RS232 UART, but communicates via USB. Many applications expect a certain timing with RS232 communications. With ports directly fitted in a computer this is most of the time no problem. The application communicates directly, or via a thin device driver layer with the UART, and everything happens within a well defined time frame. The USB bus is however shared by several devices. Communication congestion may be the result of this, and the timeframe in which specific RS232 actions are performed might not be so well defined as in the direct port approach. Also, the double device driver layer with an RS232 driver working on top of the complex USB driver might add extra overhead to the communications, resulting in delays. HARDWARE SPECIFIC PROBLEMS RS232 ports which are physically mounted in a computer are often powered by three power sources: +5 Volt for the UART logic, and -12 Volt and +12 Volt for the output drivers. USB however only provides a +5 Volt power source. Some USB to RS232 converters use integrated DC/DC converters to create the appropriate voltage levels for the RS232 signals, but in very cheap implementations, the +5 Volt voltage is directly used to drive the output. This may sound strange, but many RS232 ports recognize a voltage above 2 Volt as a space signal, where a voltage of 0 Volt or less is recognized as a mark signal. This is not according to the original standard, because in the original RS232 standard, all voltages between -3 Volt and +3 Volt result in an undefined signal state. The well known maxim MAX232 series of RS232 driver chips have this non-standard behaviour for example. Although the outputs of these drivers swings between -10 Volt and +10 Volt, the inputs recognize all signals swinging below 0 Volt and above 2 Volt as valid signals.

This non-standard behaviour of RS232 inputs makes it even more difficult to select the right RS232 to USB converter. If you connect and test an RS232 to USB converter over a serial line with another device, it might work with some devices, but not with others. This can particularly become a problem with industrial applications. Low-cost computers are often equipped with cheap RS232 drivers and when you test the RS232 to USB converter with such a computer, it might work. But the same converter may fail if you try it in an industrial environment. The chances that RS232 ports from low-cost computers accept signals in the 0..5 Volt range are higher than with industrial equipment which is often specifically designed to be immune for noise. Another hardware specific problem arises from handshaking to prevent buffer overflows at the receiver's side. RS232 applications can use two types of handshaking, either with control commands in the data stream, called software flow control, or with physical lines, called hardware flow control. Not all USB to RS232 converters provide these hardware flow control lines. It is not always easily identified if an application needs them. Some applications do not use hardware flow control at all, and those cheap USB to RS232 converters will work without problems. Other applications use hardware flow control, but infrequently. Only with large data bursts, or in situations where the CPU is busy performing other tasks, hardware flow control might kick in to prevent data loss. In those situations, communications may seem error free, but with sometimes bytes lost, or unspecified errors in the communications. Source : (http://www.lammertbies.nl/comm/info/RS-232-usb.html)

2.3 SOFTWARE 2.3.1 MICROCONTROLLER SELECTION (MPLAB IDE) MPLAB Integrated Development Environment (IDE) is a comprehensive editor, project manager and design desktop for application development of embedded designs using Microchip PIC MCUs and dsPIC DSCs.The initial use of MPLAB IDE is covered here. How to make projects, edit code and testan application will be the subject of a short tutorial. By going through the tutorial, thebasic concepts of the Project Manager, Editor and Debugger can be quickly learned.The complete feature set of MPLAB IDE is covered in later chapters. This section details the installation and uninstall of MPLAB IDE. It is followed by asimple step-by-step tutorial that creates a project and explains the elementary debugcapabilities of MPLAB IDE. Someone unfamiliar with MPLAB IDE will get a basicunderstanding of using the system to develop an application. No previous knowledgeis assumed, and comprehensive technical details of MPLAB IDE and its components are omitted in order to present the basic framework for using MPLAB IDE. These basic steps will be covered in the tutorial: MPLAB IDE Features and Installation Tutorial Overview Selecting the Device Creating the Project Setting Up Language Tools Naming the Project Adding Files to the Project Building the Project Creating Code Building the Project Again Testing Code with the Simulator Tutorial Summary

2.3.2 MPLAB IDE FEATURES AND INSTALLATION

MPLAB IDE is a Windows Operating System (OS) based Integrated Development Environment for the PIC MCU families and the dsPIC Digital Signal Controllers. The MPLAB IDE provides the ability to: Create and edit source code using the built-in editor. Assemble, compile and link source code. Debug the executable logic by watching program flow with the built-in simulator or in real time with in-circuit emulators or in-circuit debuggers. Make timing measurements with the simulator or emulator. View variables in Watch windows. Program firmware into devices with device programmers (for details, consult the users guide for the specific device programmer). Install MPLAB IDE To install MPLAB IDE on your system: If installing from a CD-ROM, place the disk into a CD drive. Follow the on-screen menu to install MPLAB IDE. If no on-screen menu appears, use Windows Explorer to find and execute the CD-ROM menu, menu.exe. If downloading MPLAB IDE from the Microchip web site (www.microchip.com),locate the download (.zip) file, select the file and save it to the PC. Unzip the file and execute the resulting setup.exe file to install.

2.3.3 RUNNING MPLAB IDE To start MPLAB IDE, double click on the icon installed on the desktop after installation or select Start>Programs>Microchip>MPLAB IDE vx.xx>MPLAB IDE. A screen will display the MPLAB IDE logo followed by the MPLAB IDE desktop (Figure 2-1).

Figure 2-1

2.3.2 VISUAL BASIC6 We use this software that make this project possible. The VB6 AGENT MILITARY client application (runs on Windows).

Vous aimerez peut-être aussi