mobile spyrobot

106
CHAPTER 1 INTRODUCTION 1.1 EMBEDDED SYSTEMS Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real time performance constraints that must be met, for reason such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs. An embedded system is not always a separate block - very often it is physically built-in to the device it is controlling. The software written for embedded systems is often called firmware, and is stored in read-only memory or flash convector chips rather than a disk drive. It often runs with limited computer hardware resources: small or no keyboard, screen, and little memory. Wireless communication has become an important feature for commercial products and a popular research topic within the last ten years. There are now more mobile phone subscriptions than wired-line subscriptions. Lately, one area of commercial interest has been low-cost, low-power, and short-distance wireless communication used for \personal wireless networks." ~ 1 ~

Upload: maxcain

Post on 16-Nov-2015

212 views

Category:

Documents


0 download

DESCRIPTION

about mobile spy robot

TRANSCRIPT

CHAPTER 1INTRODUCTION TC "INTRODUCTION" \f C \l "1" 1.1 EMBEDDED SYSTEMS TC "EMBEDDED SYSTEMS" \f C \l "2" 38dB Audio; Output: 1Vp-p@6005) Modulation mode: FM6) Receiver Size:7) weight: 130g

Accessories:1X Receiver1X Camera2X Adaptor 1X AV cable1X Battu 1X Manual

Bottom of Form

2.7 LASER GUN

LASER LIGHT

Laser beams in fog and on a car windshield

Light amplification by stimulated emission of radiation (LASER) is a mechanism for emitting electromagnetic radiation, typically light or visible light, via the process of stimulated emission. The emitted laser light is (usually) a spatially coherent, narrow low-divergence beam, that can be manipulated with lenses. In laser technology, "coherent light" denotes a light source that produces (emits) light of in-step waves of identical frequency and phase. [1] The lasers beam of coherent light differentiates it from light sources that emit incoherent light beams, of random phase varying with time and position; whereas the laser light is a narrow-wavelength electromagnetic spectrum monochromatic light; yet, there are lasers that emit a broad spectrum light, or simultaneously, at different wavelengths.

Terminology:

The word laser originally was the upper-case LASER, the acronym from Light Amplification by Stimulated Emission of Radiation, wherein light broadly denotes electromagnetic radiation of any frequency, not only the visible spectrum; hence infrared laser, ultraviolet laser, X-ray laser, et cetera. Because the microwave predecessor of the laser, the maser, was developed first, devices that emit microwave and radio frequencies are denoted masers. In the early technical literature, especially in that of the Bell Telephone Laboratories researchers, the laser was also called optical maser, a currently uncommon term, moreover, since 1998, Bell Laboratories adopted the laser usage.[2] Linguistically, the back-formation verb to lase means to produce laser light and to apply laser light to. The word laser sometimes is inaccurately used to describe a non-laser-light technology, e.g. a coherent-state atom source is an atom laser.

gamma rays, X-rays, ultraviolet rays, visible spectrum, infrared, microwaves, radio waves.

Design

Principal components:

1. Gain medium2. Laser pumping energy3. High reflector4. Output coupler5. Laser beamA laser consists of a gain medium inside a highly reflective optical cavity, as well as a means to supply energy to the gain medium. The gain medium is a material with properties that allow it to amplify light by stimulated emission. In its simplest form, a cavity consists of two mirrors arranged such that light bounces back and forth, each time passing through the gain medium. Typically one of the two mirrors, the output coupler, is partially transparent. The output laser beam is emitted through this mirror.

Light of a specific wavelength that passes through the gain medium is amplified (increases in power); the surrounding mirrors ensure that most of the light makes many passes through the gain medium, being amplified repeatedly. Part of the light that is between the mirrors (that is, within the cavity) passes through the partially transparent mirror and escapes as a beam of light.

The process of supplying the energy required for the amplification is called pumping. The energy is typically supplied as an electrical current or as light at a different wavelength. Such light may be provided by a flashlamp or perhaps another laser. Most practical lasers contain additional elements that affect properties such as the wavelength of the emitted light and the shape of the beam.

Laser physics

A helium-neon laser demonstration at the Kastler-Brossel Laboratory at Univ. Paris 6. The glowing ray in the middle is an electric discharge producing light in much the same way as a neon light. It is the gain medium through which the laser passes, not the laser beam itself, which is visible there. The laser beam crosses the air and marks a red point on the screen to the right.

Spectrum of a helium neon laser showing the very high spectral purity intrinsic to nearly all lasers. Compare with the relatively broad spectral remittance of a light emitting diode.

The gain medium of a laser is a material of controlled purity, size, concentration, and shape, which amplifies the beam by the process of stimulated emission. It can be of any state: gas, liquid, solid or plasma. The gain medium absorbs pump energy, which raises some electrons into higher-energy ("excited") quantum states. Particles can interact with light both by absorbing photons or by emitting photons. Emission can be spontaneous or stimulated. In the latter case, the photon is emitted in the same direction as the light that is passing by. When the number of particles in one excited state exceeds the number of particles in some lower-energy state, population inversion is achieved and the amount of stimulated emission due to light that passes through is larger than the amount of absorption. Hence, the light is amplified. By itself, this makes an optical amplifier. When an optical amplifier is placed inside a resonant optical cavity, one obtains a laser.

The light generated by stimulated emission is very similar to the input signal in terms of wavelength, phase, and polarization. This gives laser light its characteristic coherence, and allows it to maintain the uniform polarization and often monochromaticity established by the optical cavity design.

The optical cavity, a type of cavity resonator, contains a coherent beam of light between reflective surfaces so that the light passes through the gain medium more than once before it is emitted from the output aperture or lost to diffraction or absorption. As light circulates through the cavity, passing through the gain medium, if the gain (amplification) in the medium is stronger than the resonator losses, the power of the circulating light can rise exponentially. But each stimulated emission event returns a particle from its excited state to the ground state, reducing the capacity of the gain medium for further amplification. When this effect becomes strong, the gain is said to be saturated. The balance of pump power against gain saturation and cavity losses produces an equilibrium value of the laser power inside the cavity; this equilibrium determines the operating point of the laser. If the chosen pump power is too small, the gain is not sufficient to overcome the resonator losses, and the laser will emit only very small light powers. The minimum pump power needed to begin laser action is called the lasing threshold. The gain medium will amplify any photons passing through it, regardless of direction; but only the photons aligned with the cavity manage to pass more than once through the medium and so have significant amplification.

The beam in the cavity and the output beam of the laser, if they occur in free space rather than waveguides (as in an optical fiber laser), are, at best, low order Gaussian beams. However this is rarely the case with powerful lasers. If the beam is not a low-order Gaussian shape, the transverse modes of the beam can be described as a superposition of Hermite-Gaussian or Laguerre-Gaussian beams (for stable-cavity lasers). Unstable laser resonators on the other hand, have been shown to produce fractal shaped beams.[4] The beam may be highly collimated, that is being parallel without diverging. However, a perfectly collimated beam cannot be created, due to diffraction. The beam remains collimated over a distance which varies with the square of the beam diameter, and eventually diverges at an angle which varies inversely with the beam diameter. Thus, a beam generated by a small laboratory laser such as a helium-neon laser spreads to about 1.6 kilometers (1 mile) diameter if shone from the Earth to the Moon. By comparison, the output of a typical semiconductor laser, due to its small diameter, diverges almost as soon as it leaves the aperture, at an angle of anything up to 50. However, such a divergent beam can be transformed into a collimated beam by means of a lens. In contrast, the light from non-laser light sources cannot be collimated by optics as well.

Although the laser phenomenon was discovered with the help of quantum physics, it is not essentially more quantum mechanical than other light sources. The operation of a free electron laser can be explained without reference to quantum mechanics.

Modes of operationThe output of a laser may be a continuous constant-amplitude output (known as CW or continuous wave); or pulsed, by using the techniques of Q-switching, modelocking, or gain-switching. In pulsed operation, much higher peak powers can be achieved.

Some types of lasers, such as dye lasers and vibronic solid-state lasers can produce light over a broad range of wavelengths; this property makes them suitable for generating extremely short pulses of light, on the order of a few femtoseconds (10-15 s).

Continuous wave operation

In the continuous wave (CW) mode of operation, the output of a laser is relatively constant with respect to time. The population inversion required for lasing is continually maintained by a steady pump source.

Pulsed operation

In the pulsed mode of operation, the output of a laser varies with respect to time, typically taking the form of alternating 'on' and 'off' periods. In many applications one aims to deposit as much energy as possible at a given place in as short time as possible. In laser ablation for example, a small volume of material at the surface of a work piece might evaporate if it gets the energy required to heat it up far enough in very short time. If, however, the same energy is spread over a longer time, the heat may have time to disperse into the bulk of the piece, and less material evaporates. There are a number of methods to achieve this.

Q-switching

In a Q-switched laser, the population inversion (usually produced in the same way as CW operation) is allowed to build up by making the cavity conditions (the 'Q') unfavorable for lasing. Then, when the pump energy stored in the laser medium is at the desired level, the 'Q' is adjusted (electro- or acousto-optically) to favourable conditions, releasing the pulse. This results in high peak powers as the average power of the laser (were it running in CW mode) is packed into a shorter time frame.

Mode lockingA mode locked laser emits extremely short pulses on the order of tens of picoseconds down to less than 10 femtoseconds. These pulses are typically separated by the time that a pulse takes to complete one round trip in the resonator cavity. Due to the Fourier limit (also known as energy-time uncertainty), a pulse of such short temporal length has a spectrum which contains a wide range of wavelengths. Because of this, the laser medium must have a broad enough gain profile to amplify them all. An example of a suitable material is titanium-doped, artificially grown sapphire (Ti:sapphire).

The mode locked laser is a most versatile tool for researching processes happening at extremely fast time scales also known as femtosecond physics, femtosecond chemistry and ultrafast science, for maximizing the effect of nonlinearity in optical materials (e.g. in second-harmonic generation, parametric down-conversion, optical parametric oscillators and the like), and in ablation applications. Again, because of the short timescales involved, these lasers can achieve extremely high powers.

Pulsed pumping

Another method of achieving pulsed laser operation is to pump the laser material with a source that is itself pulsed, either through electronic charging in the case of flashlamps, or another laser which is already pulsed. Pulsed pumping was historically used with dye lasers where the inverted population lifetime of a dye molecule was so short that a high energy, fast pump was needed. The way to overcome this problem was to charge up large capacitors which are then switched to discharge through flashlamps, producing a broad spectrum pump flash. Pulsed pumping is also required for lasers which disrupt the gain medium so much during the laser process that lasing has to cease for a short period. These lasers, such as the excimer laser and the copper vapour laser, can never be operated in CW mode.Bottom of Form

Candidates for the 2010 steward elections are asked to submit their nominations by January 28. Nominate yourself. [Hide] [Help us with translations!]

Candidates for the 2010 steward elections are asked to submit their nominations by January 28. Nominate yourself. [Hide] [Help us with translations!]

Light gun

The NES Zapper, Nintendo's early light gun

A light gun is a pointing device for c omputers and a control device for arcade and video games. Modern screen-based light guns work by building a sensor into the gun itself, and the on-screen target(s) emit light rather than the gun. The first light gun of this type was used on the MIT Whirlwind computer.

The light gun, and its descendant, the light pen, are now rarely used as computer pointing devices, because of the popularity of the mouse and changes in monitor display technology - traditional light guns can only work with standard CRT monitors.

Early history

The first light guns appeared in the 1930s, following the development of light-sensing vacuum tubes. It was not long before the technology began appearing in arcade shooting games, beginning with the Seaborg Ray-O-Lite in 1936. These early light gun games, like modern laser tag, used small targets (usually moving) onto which a light-sensing tube was mounted; the player used a gun (usually a rifle) that emitted a beam of light when the trigger was pulled. If the beam struck the target, a "hit" was scored.The video game light gun is typically modeled on a ballistic weapon (usually a pistol) and is used for targeting objects on a video screen. With force feedback, the light gun can also simulate the recoil of the weapon.

Light guns are very popular in arcade games, but had not caught on as well in the home video game console market until after the Nintendo Entertainment System (NES), Sega Master System (SMS), Mega Drive/Genesis, and Super Nintendo Entertainment System (SNES) systems. Nevertheless, many home 'Pong' systems of the 70s included a pistol or gun for shooting simple targets on screen.

Traditional light guns cannot be used on the newer LCD and plasma screens, and have problems with projection screens.

The following are famous example of light guns:

Magnavox Odyssey Shooting Gallery the first gun for a home console was in fact a big rifle, which looked very lifelike and even needed to be "cocked" after each shot

Nintendo's NES Zapper for the NES, arguably the most popular example of the light gun

XG-1 for Atari XE-GS

Action Max, a console that used VHS tapes for games, solely controlled by a light gun

Light Phaser for Sega Master System

Super Scope for Super Nintendo, shaped like a bazooka

Menacer for Sega Mega Drive

Peacekeeper Revolver for Philips CDi

Sega Lock-On, a stand-alone laser tag system

Namco's GunCon and GunCon 2, first to read the video signal in the accessory (rather than internally in the console) and said to be highly accurate; used for PlayStation and PlayStation 2 Dreamcast light guns for Dreamcast The XT-7 from Captain Power, an interactive television show

Magnum Light Phaser For Spectrum / Commodore 64 The Wii Zapper for the Wii console is designed to house the Wii Remote and Nunchuk, giving a light gun feel (although the Wii Remote itself does not use traditional light gun technology).

There are also light guns for Sega Saturn, Xbox and several other console and arcade systems. Recent light gun video games include Resident Evil: The Umbrella Chronicles, Time Crisis 4, Virtua Cop 3, and The House of the Dead: Overkill.

The Wii Remote can be seen as a successor to this technology, and it can be used relatively accurately with CRT, LCD, plasma, and projection screens. Like the NES Zapper, it is "bundled" with the system, but unlike traditional light guns, the Wii Remote serves as a primary controller. If coupled with the Nunchuk attachment, the Wii Remote allows for a potentially seamless union between first-person shooter gameplay and "light gun" implementation. Namco's GunCon 3 also uses a system similar to the Wii Remote, using 2 infrared LEDs and sensors in the gun, as opposed to the traditional light guns.

Design

The "light gun" is named because it uses light as its method of detecting where on screen the user is targeting. The name leads one to believe that the gun itself emits a beam of light, but in fact most light guns actually receive light through a photodiode in the gun barrel.

There are two versions of this technique that are commonly used, but the concept is the same: when the trigger of the gun is pulled, the screen is blanked out to black, and the diode begins reception. All or part of the screen is painted white in a way that allows the computer to judge where the gun is pointing, based on when the diode detects light. The user of the light gun notices little or nothing, because the period in which the screen is blank is usually only a fraction of a second (see persistence of vision).

Sequential targets

The first detection method, used by the Zapper, involves drawing each target sequentially in white light after the screen blacks out. The computer knows that if the diode detects light as it is drawing a square (or after the screen refreshes) then, that is the target at which the gun is pointed. Essentially, the diode tells the computer whether or not you hit something, and for n objects, the sequence of the drawing of the targets tell the computer which target you hit after 1 + ceil(log2(n)) refreshes (one refresh to determine if any target at all was hit and ceil(log2(n)) to do a binary search for the object that was hit).

An interesting side effect of this is that on poorly designed games, often a player can point the gun at a light bulb, pull the trigger and hit the first target every time. Better games account for this either by detecting if all targets appear to match or by displaying a black screen and verifying that no targets match.

Cathode ray timing

The GunCon (gray; top) and the GunCon 2 (orange; bottom) for the PlayStation and PlayStation 2, respectively

The blue (top) and pink (middle) Konami Justifiers made for the Super Nintendo Entertainment System and the green (bottom) one made for the PlayStation

The second method, used by the Super Nintendo Entertainment System's Super Scope and computer light pens, is more elaborate and more accurate.

The trick to this method lies in the nature of the cathode ray tube inside the video monitor (CRTs were the only affordable TV monitors in the late 1980s and early 1990s, when this method was popularized). The screen is drawn by a scanning electron beam that travels across the screen starting at the top until it hits the end, and then moves down to update the next line. This is done repeatedly until the entire screen is drawn, and appears instantaneous to the human eye as it is done very quickly.

When the player pulls the trigger, the computer (often assisted by the display circuitry) times how long it takes the electron beam to excite the phosphor at the location at which the gun is pointed. The light gun sends a signal after sensing the sudden small change in brightness of a point on the screen when the electron gun refreshes that spot. The computer then calculates the targeted position based on the monitor's horizontal refresh rate (the fixed amount of time it takes the beam to get from the left to right side of the screen). Either the computer provides a time base for the horizontal refresh rate through the controller's connector (as in the Super Scope), or the gun reads the composite video signal through a T-connector on the A/V cable (as in the GunCon 2). Once the computer knows where the gun is pointed, it can tell through collision detection if it coincides with the target or not.

Many guns of this type (including the Super Scope) ignore red light, as red phosphors have a much slower rate of decay than green or blue phosphors. As a result, some (but not all) games brighten the entire screen somewhat when the trigger is pulled in order to get a more reliable fix on the position.

Display timing is useless with plasma, LCD, and DLP, which refresh all pixels at the same time.

Combined method

Some light guns designed for sequential targeting are not timed precisely enough to get an (X, Y) reading against the video signal, but they can use a combination of the two methods. First the screen is brightened and the response time is measured as in cathode ray timing, but the computer measures only which scanline was hit and not which horizontal pixel was hit. This does not need nearly as fast a timer that pure cathode ray timing uses, on the order of 15kHz for Y vs. 5MHz for (X, Y) on a standard resolution display. Then using sequential targets, the game cycles among those targets on the line.

Infrared emitters

A new method was developed to compensate for display technologies other than CRT. It relies on one or several infrared light emitters placed near the screen, and one IR sensor on the muzzle of the gun. When the trigger is pressed, the gun sends the intensity of the IR beam it detects. Since this intensity depends upon both distance and relative angle to the screen, angle sensors are located in the gun. This way a trigonometric equation system is solved, and the muzzle's 3D position relative to the screen is calculated. Then, by projecting the muzzle on the screen with the measured angles the impact point is determined. An early example of this technology (though not using IR) can be seen in the NES Power Glove Accessory, which used three ultrasonic sensors serving the same function as the IR emitters used in some lightguns.

A simpler variant is commonly used in arcades, where there are no angle detectors but 4 IR sensors. However, this can prove inaccurate when shooting from certain distances and angles, since the calculation of angles and 3D position has a larger margin of error.

Other variants include 3 or more emitters with different infrared wavelengths and the same number of sensors. With this method and proper calibration three or more relative angles are obtained, thus not needing angle detectors to position the gun.

Sometimes, the sensors are placed around the screen and the emitter on the gun, but calculations are similar.

This family of methods are used for the Wii Remote, GunCon 3,[1] and modern arcade light gun games.

Image capture

When the user pulls the trigger the screen is replaced for a split-second with a seemingly random but non-repeating display of black and white pixels or groups of pixels (blocks). The light gun contains a fine-resolution but low pixel count digital camera with a very narrow field of view. With just a handful of the encrypted random dot image pixels captured the gun converts the small image into a binary array which allows the computer to locate the exact position the gun was pointed at and is compatible with any screen of any size. The size of the screen and distance to shooter is entered into the gun driver software to determine the dimensions of the random blocks/pixels to best allow rendering on the light gun CCD.

Multiplayer

A game that uses more than one gun reads both triggers continuously and then, when one player pulls a gun's trigger, the game reads that gun until it knows which object was hit.

Positional guns

Positional guns are fairly common in video arcades. A positional gun is a gun mounted to the cabinet on a swivel that allows the player to aim the gun. These are often confused with light guns but work quite differently. These guns may not be removed from the cabinet like the optical counterparts, which are tethered and stored in a mounted holster. They are typically more expensive initially but easier to maintain and repair. Games that use positional guns include Operation Wolf, Silent Scope, the arcade version of Resident Evil: Survivor, Space Gun, Revolution X and Terminator 2: Judgment Day. The console ports used light guns.

A positional gun is effectively an analog stick that records the position of the gun to determine where the player is aiming. The gun must be calibrated, which usually happens after powering up. Some games have mounted optical guns, such as Exidy's Crossbow.

CHAPTER 3

CIRCUITS AND THEIR OPERATION

3.1 CIRCUIT DIAGRAM:

Source code:-#include

delay(unsigned char);

sbit SMOTORUP=P2^0;

//S:SHAFT

sbit SMOTORDOWN=P2^1;

sbit AMOTORUP=P2^2;

sbit AMOTORDOWN=P2^3; //A:ANGLE

//sbit DMOTORCLK=P3^4;

//sbit DMOTORANTICLK=P3^5;

sbit BMOTOR_L_FORWARD=P1^4;

sbit BMOTOR_L_BACKWARD=P1^5; //B:BOTTOM MOTORS

sbit BMOTOR_R_FORWARD=P1^6;

sbit BMOTOR_R_BACKWARD=P1^7;

sbit GUN_LASER=P2^6;

//G:GRIP

sbit INTERUPT=P2^7;

main()

{

SMOTORUP=0;

SMOTORDOWN=0;

AMOTORUP=0;

AMOTORDOWN=0;

BMOTOR_L_FORWARD=0;

BMOTOR_L_BACKWARD=0;

BMOTOR_R_FORWARD=0;

BMOTOR_R_BACKWARD=0;

GUN_LASER=1;

P1=0X0F;

while(1)

{

////////////////////////shaft motor/////////////////////////////////////////

if(P1==0x07)

{

SMOTORUP=1;

delay(30);

SMOTORUP=0;

//1,2

}

if(P1==0x09)

{

SMOTORDOWN=1;

delay(30);

SMOTORDOWN=0;

}

////////////////////////////////////////////////////////////////////////////

/////////////////////angle motor////////////////////////////////////////////

if(P1==0x0B)

{

AMOTORUP=1;

delay(30);

AMOTORUP=0;

//3,4

}

if(P1==0x0C)

{

AMOTORDOWN=1;

delay(30);

AMOTORDOWN=0;

}

////////////////////////////////////////////////////////////////////////////

//////////////////////////////grip motor///////////////////////////////////////////////

if(P1==0x08)

{

GUN_LASER=~GUN_LASER;

}

////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////OFF CONDITION///////////////////////////////////////////////

if(P1==0x0A)

{

SMOTORUP=0;

SMOTORDOWN=0;

AMOTORUP=0;

AMOTORDOWN=0;

// DMOTORCLK=0;

// DMOTORANTICLK=0;

BMOTOR_L_FORWARD=0;

BMOTOR_L_BACKWARD=0;

BMOTOR_R_FORWARD=0;

BMOTOR_R_BACKWARD=0;

GUN_LASER=0;

}

////////////////////////////////////////////////////////////////////////////////////////

//////////////////////bottom motor///////////////////////////////////////////

if(P1==0x03)

{

BMOTOR_L_FORWARD=1;

BMOTOR_R_BACKWARD=1;

delay(150);

BMOTOR_L_FORWARD=0;

BMOTOR_R_BACKWARD=0;

BMOTOR_R_BACKWARD=0;

BMOTOR_L_BACKWARD=0;

// MOVING BACK WARDS

BMOTOR_R_BACKWARD=0;

BMOTOR_R_FORWARD=0;

}

if(P1==0x01)

{

BMOTOR_R_FORWARD=1;

BMOTOR_L_BACKWARD=1;

delay(150);

BMOTOR_R_FORWARD=0;

BMOTOR_L_BACKWARD=0;

BMOTOR_L_BACKWARD=0;

BMOTOR_L_BACKWARD=0;

// MOVING BACK WARDS

BMOTOR_R_BACKWARD=0;

BMOTOR_L_FORWARD=0; // MOVING TOWARDS RIGHT SIDE

}

if(P1==0x05)

{

BMOTOR_L_BACKWARD=1;

BMOTOR_R_BACKWARD=1;

delay(150);

BMOTOR_L_BACKWARD=0;

BMOTOR_R_BACKWARD=0;

}

if(P1==0x02)

{

BMOTOR_L_FORWARD=1;

BMOTOR_R_FORWARD=1;

delay(150);

BMOTOR_L_FORWARD=0;

BMOTOR_R_FORWARD=0; // MOVING FORWARDS

}

}// interupt

}//while

}//main

delay(unsigned char time)

{

unsigned char i,j;

for(i=0;i