You are on page 1of 44

AUTOMATIC RADAR SYSTEM with IFF (Identification of friend foe)

A PROJECT REPORT SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENTS FOR THE AWARD OF THE DEGREE OF BACHELOR OF TECHNOLOGY (ELECTRONICS& COMMUNICATION) TOUTTARAKHAND TECHNICAL UNIVERSITY DEHRADUN

Submitted by:
1. Sanjay Manohar Bisht 2. Tarun Joshi 3. Sagar Garg

Under The Supervision of Mr. ALOK SHARMA Head of Department DEPARTMENT OF ELECTRONICS & COMM. ENGINEERING BIRLA INSTITUTE OF APPLIED SCIENCES BHIMTAL (NAINITAL) UTTARAKHAND 263 136 APRIL - 2013

STUDENT DECLARATION
We hereby certify that the work which is being presented in this project titled Automatic Radar System using IFF by us in partial fulfillment of requirement for the award of Bachelor of Technology in Electronics & Communications from, Uttarakhand Technical University, Dehradun is an authentic record of our original work carried under the supervision of Mr. Alok Sharma. The matter presented in this project has not been submitted earlier in other University/ Institute for the award of any degree.

SANJAY MANOHAR BISHT 09050102020 TARUN JOSHI 090501020 SAGAR GARG 09050102019

CERTIFICATE
This is certified that the above statement made by the students is correct to the best of our knowledge.

Head of Department Electronics & Communication Engineering B.I.A.S, Bhimtal.

Faculty Supervisor

External Examiner Date:

ACKNOWLEDGEMENT
We are thankful and obliged to Prof. A.K. Pant Director, B.I.A.S., for allowing us to carry out this project at the institute. We are extremely grateful to Sh. Alok Sharma, Head, Electronics & Communication Engineering Department, B.I.A.S., Bhimtal, for his sincere guidance, review and complete supervision throughout this work without which, we would have not been able to complete this work. We are grateful to Sh. Alok Sharma, Assistant Professor, Electronics & Communication Engineering Department, B.I.A.S., Bhimtal, for his valuable suggestions, associatory reminders and well-timed advice, which all made us capable of controlling this work in timely manner. Our thanks are also due to & Mr. Saurabh Joshi, Asstt. Professors, Electronics & Communication Engineering Department, B.I.A.S., Bhimtal, for their logistic and background support. We wish to express our gratitude to the Lab and office staff at Electronics & Communication Engineering Department, for their cooperation even beyond their duty hours. We are also thankful to our colleagues and other students at our Institute for their invaluable moral support, peace and cooperation.

SANJAY MANOHAR BISHT 09050102020 TARUN JOSHI 090501020 SAGAR GARG 09050102019

Table of Contents
Abstract of the project ........................................................................................................................................ 1 Technology behind the project........................................................................................................................... 4 Basic Concept ............................................................................................................................................... 6 Transmitter. Receiver.. Power Supply. Synchronizer Duplexer.. Antenna.. Display IFF Components Atmega8 microcontroller Atmega8 Development Board Voltage Regulator IR (Infra-Red) Module... Circuit Diagram of Automatic Radar System Our Implementation. Hardware Implementation Software Implementation Cost Description Result & Discussions Further Development in Radar Technology References.

ABSTRACT OF THE PROJECT


This project is basically a representation of the Radar Technology. We have applied this technology to demonstrate the conventional use of radars in various places like the airport and military stations. Radars have been in use since quite some time now. Radars not only help to keep track of the incoming and outgoing airplanes but also guide them to appropriate landing and take-off. In this project we have used small range sensors which act as radars and hence detect any incoming object which come in their vicinity. To implement this project we have made the use of infrared waves. Also the use of encrypted messages for identification for the object to be classified as friend or enemy can be then used to plot out a chart of actual scenario of the target region. Our project to be described in a gist could be explained as a radar system which automatically detects an airplane and extracts its information whether it is an enemy or a friend. That is why we have called it as AUTOMATIC RADAR SYSTEM with IFF.

MOTIVATION FOR THIS PROJECT


The radar systems have been in use for many decades and form an important part of modern day aircraft management. The modern uses of radar are highly diverse, including air traffic control, radar astronomy, air-defense systems, antimissile systems; marine radars to locate landmarks and other ships; aircraft anti-collision systems; ocean surveillance systems, outer space surveillance and rendezvous systems; meteorological precipitation monitoring; altimetry and flight control systems; guided missile target locating systems; and groundpenetrating radar for geological observations. High tech radar systems are associated with digital signal processing and are capable of extracting objects from very high noise levels. This project has been presented with various level of modification but our project differs from all in view of the ability of the system to judge whether the detected object is a friend or foe. This project has also enabled us to learn the use of the Atmega8 microcontroller and its programming with associated peripherals.

INTRODUCTION
Basic concept:

Radar is an acronym for Radio Detection and Ranging. The term "radio" refers to the use of electromagnetic waves with wavelengths in the so-called radio wave portion of the spectrum, which covers a wide range from 104 km to 1 cm. Radar systems typically use wavelengths on the order of 10 cm, corresponding to frequencies of about 3 GHz. The detection and ranging part of the acronym is accomplished by timing the delay between transmission of a pulse of radio energy and its subsequent return. If the time delay is Dt, then the range may be determined by the simple formula: R = cDt/2

where c = 3 x 108 m/s, the speed of light at which all electromagnetic waves propagate. The factor of two in the formula comes from the observation that the radar pulse must travel to the target and back before detection, or twice the range. A radar pulse train is a type of amplitude modulation of the radar frequency carrier wave, similar to how carrier waves are modulated in communication systems. In this case, the information signal is quite simple: a single pulse repeated at regular intervals. The common radar carrier modulation, known as the pulse train is shown below.

The

common

parameters

of

radar

as

defined

by

referring

to

Figure

Fig.2 PW = pulse width. PW has units of time and is commonly expressed in ms.PW is the duration of the pulse. RT = rest time. RT is the interval between pulses. It is measured in ms. PRT = pulse repetition time. PRT has units of time and is commonly expressed in ms.PRT is the interval between the start of one pulse and the start of another. PRT is also equal to the sum, PRT = PW+RT. PRF = pulse repetition frequency. PRF has units of time-1 and is commonly expressed in Hz (1 Hz = 1/s) or as pulses per second (pps). PRF is the number of pulses transmitted per second and is equal to the inverse of PRT. RF = radio frequency. RF has units of time-1 or Hz and is commonly expressed in GHz or MHzs RF is the frequency of the carrier wave which is being modulated to form the pulse train.

Mechanization A practical radar system requires seven basic components as illustrated below:

Figure 3

1.Transmitter:The transmitter creates the radio wave to be sent and modulates it to form the pulse train. The transmitter must also amplify the signal to a high power level to provide adequate range. The source of the carrier wave could be a Klystron, Traveling Wave Tube (TWT) or Magnetron. Each has its own characteristics and limitations. 2.Receiver: The receiver is sensitive to the range of frequencies being transmitted and provides amplification of the returned signal. In order to provide the greatest range, the receiver must be very sensitive without introducing excessive noise. The ability to discern a received signal from background noise depends on the signal-to-noise ratio (S/N). The background noise is specified by an average value, called the noise-equivalent-power (NEP). This directly equates the noise to a detected power level so that it may be compared to the return. Using these definitions, the criterion for successful detection of a target is Pr> (S/N) NEP, Where Pr is the power of the return signal. Since this is a significant quantity in determining radar system performance, it is given a unique designation, Smin, and is called the Minimum Signal for Detection. Smin = (S/N) NEP Since Smin, expressed in Watts, is usually a small number, it has proven useful to define the decibel equivalent, MDS, which stands for Minimum Discernible Signal. MDS = 10 Log (Smin/1 mW) When using decibels, the quantity inside the brackets of the logarithm must be a number without units. I the definition of MDS, this number is the fraction Smin /1 mW. As a reminder, we use the special notation dBm for the units of MDS, where the "m" stands for 1 mW. This is shorthand for decibels referenced to 1 mW, which is sometimes written as dB//1mW. In the receiver, S/N sets a threshold for detection which determines what will be displayed and what will not. In theory, if S/N = 1, then only returns with power equal to or greater than the background noise will be displayed. However, the noise is a statistical process and varies randomly. The NEP is just the average value of the noise. There will be times when the noise exceeds the threshold that is set by the receiver. Since this will be displayed and appear to be a legitimate target, it is called a false alarm. If the SNR is set too high, then there will be few false alarms, but some actual targets may not be displayed known as a miss). If SNR is set too low, then there will be many false alarms, or a high false alarm rate (FAR). Some receivers monitor the background and constantly adjust the SNR to maintain a constant false alarm rate, and therefore all called CFAR receivers.

Some common receiver features are: 1.) Pulse Integration. The receiver takes an average return strength over many pulses. Random events like noise will not occur in every pulse and therefore, when averaged, will have a reduced effect as compared to actual targets that will be in every pulse. 2.) Sensitivity Time Control (STC). This feature reduces the impact of returns from sea state. It reduces the minimum SNR of the receiver for a short duration immediately after each pulse is transmitted. The effect of adjusting the STC is to reduce the clutter on the display in the region directly around the transmitter. The greater the value of STC, the greater the range from the transmitter in which clutter will be removed. However, an excessive STC will blank out potential returns close to the transmitter. 3.) Fast Time Constant (FTC). This feature is designed to reduce the effect of long duration returns that come from rain. This processing requires that strength of the return signal must change quickly over it duration. Since rain occurs over and extended area, it will produce a long, steady return. The FTC processing will filter these returns out of the display. Only pulses that rise and fall quickly will be displayed. In technical terms, FTC is a differentiator, meaning it determines the rate of change in the signal, which it then uses to discriminate pulses which are not changing rapidly.

3. Power Supply: The power supply provides the electrical power for all the components.
The largest consumer of power is the transmitter which may require several kW of average power. The actually power transmitted in the pulse may be much greater than 1 kW. The power supply only needs to be able to provide the average amount of power consumed, not the high power level during the actual pulse transmission. Energy can be stored, in a capacitor bank for instance, during the rest time. The stored energy then can be put into the pulse when transmitted, increasing the peak power. The peak power and the average power are related by the quantity called duty cycle, DC. Duty cycle is the fraction of each transmission cycle that the radar is actually transmitting. Referring to the pulse train in Figure 2, the duty cycle can be seen to be: DC = PW / PRF

Synchronizer:The synchronizer coordinates the timing for range determination.It regulates


that rate at which pulses are sent (i.e. sets PRF) and resets the timing clock for range determination for each pulse. Signals from the synchronizer are sentsimultaneously to the transmitter, which sends a new pulse, and to the display, which resets the return sweep.

Duplexer:This is a switch which alternately connects the transmitter or receiver to the


antenna. Its purpose is to protect the receiver from the high power output of the transmitter. During the transmission of an outgoing pulse, the duplexer will be aligned to the transmitter for the duration of the pulse, PW. After the pulse has been sent, the duplexer will align the antenna to the receiver. When the next pulse is sent, the duplexer will shift back to the transmitter. A duplexer is not required if the transmitted power is low.

Antenna:The antenna takes the radar pulse from the transmitter and puts it into the air.
Furthermore, the antenna must focus the energy into a well-defined beam which increases the power and permits a determination of the direction of the target. The antenna must keep track of its own orientation which can be accomplished by a synchro-transmitter. There are also antenna systems which do not physically move but are steered electronically (in these cases, the orientation of the radar beam is already known a priori). The beam-width of an antenna is a measure of the angular extent of the most powerful portion of the radiated energy. For our purposes the main portion, called the main lobe, will be all angles from the perpendicular where the power is not less than of the peak power, or, in decibels, -3 dB. The beam-width is the range of angles in the main lobe, so defined. Usually this is resolved into a plane of interest, such as the horizontal or vertical plane. The antenna will have a separate horizontal and vertical beam-width. For a radar antenna, the beam-width can be predicted from the dimension of the antenna in the plane of interest by q = l/L where: q is the beam-width in radians, l is the wavelength of the radar, and L is the dimension of the antenna, in the direction of interest (i.e. width or height). In the discussion of communications antennas, it was stated that the beam-width for an antenna could be found using q = 2l/L. So it appears that radar antennas have one-half of the beam-width as communications antennas. The difference is that radar antennas are used both to transmit and receive the signal. The interference effects from each direction combine, which has the effect of reducing the beam-width. Therefore when describing two-way systems (like radar) it is appropriate to reduce the beam-width by a factor of in the beam-width approximation formula. The directionalgain of an antenna is a measure of how well the beam is focused in all angles. If we were restricted to a single plane, the directional gain would merely be the ratio 2p/q. Since the same power is distributed over a smaller range of angles, directional gain represents the amount by which the power in the beam is increased. In both angles, then directional gain would be given by: Gdir = 4p/q f since there are 4psteradians corresponding to all directions (solid angle, measured in steradians, is defined to be the area of the beam front divided by the range squared, therefore a non-directional beam would cover an area of 4pR2 at distance R, therefore 4psteradians). Here we used: q = horizontal beam-width (radians)

f = vertical beam-width (radians) Sometimes directional gain is measured in decibels, namely 10 log (Gdir). As an example: An antenna with a horizontal beam-width of 1.50 (0.025 radians) and vertical beam-width of 20o (0.33 radians) will have: directional gain(dB) = 10 log (4 p/ 0.025 0.333) = 30.9 dB

Display:The display unit may take a variety of forms but in general is designed to present the
received information to an operator. The most basic display type is called an A-scan (amplitude vs. Time delay). The vertical axis is the strength of the return and the horizontal axis is the time delay, or range. The A-scan provides no information about the direction of the target.

Figure 4 The most common display is the PPI (plan position indicator). The A-scan information is converted into brightness and then displayed in the same relative direction as the antenna orientation. The result is a top-down view of the situation where range is the distance from the origin. The PPI is perhaps the most natural display for the operator and therefore the most widely used. In both cases, the synchronizer resets the trace for each pulse so that the rangeinformation will begin at the origin.

In this example, the use of increased STC to suppress the sea clutter would be helpful.

Radar performance All of the parameters of the basic pulsed radar system will affect the performance in some way. Here we find specific examples and quantify this dependence where possible. Pulse Width The duration of the pulse and the length of the target along the radial direction determine the duration of the returned pulse. In most cases the length of the return is usually very similar to the transmitted pulse. In the display unit, the pulse (in time) will be converted into a pulse in distance. The range of values from the leading edge to the trailing edge will create some uncertainty in the range to the target. Taken at face value, the ability to accurately measure range is determined by the pulse width. If we designate the uncertainty in measured range as the range resolution, RRES, then it must be equal to the range equivalent of the pulse width, namely:

RRES = c PW/2

Now, you may wonder why not just take the leading edge of the pulse as the range which can be determined with much finer accuracy? The problem is that it is virtually impossible to create the perfect leading edge. In practice, the ideal pulse will really appear like:

Figure 6 To create a perfectly formed pulse with a vertical leading edge would require an infinite bandwidth. In fact you may equate the bandwidth, b, of the transmitter to the minimum pulse width, PW by: PW = 1/2b Given this insight, it is quite reasonable to say that the range can be determined no more accurately than cPW/2 or equivalently

RRES = c/4b In fact, high resolution radar is often referred to as wide-band radar which you now see as equivalent statements. One term is referring to the time domain and the other the frequency domain. The duration of the pulse also affects the minimum range at which the radar system can detect. The outgoing pulse must physically clear the antenna before the return can be processed. Since this lasts for a time interval equal to the pulse width, PW, the minimum displayed range is then: RMIN = c PW/2

The minimum range effect can be seen on a PPI display as a saturated or blank area around the origin.

Figure 7 Increasing the pulse width while maintaining the other parameters the same will also affect the duty cycle and therefore the average power.For many systems, it is desirable to keep the average power fixed. Then the PRF must be simultaneously changed with PW in order to keep the product PW x PRF the same. For example, if the pulse width is reduced by a factor of in order to improve the resolution, then the PRF is usually doubled. Pulse Repetition Frequency (PRF) The frequency of pulse transmission affects the maximum range that can be displayed. Recall that the synchronizer resets the timing clock as each new pulse is transmitted. Returns from distant targets that do no reach the receiver until after the next pulse has been sent will not be displayed correctly. Since the timing

clock has been reset, they will be displayed as if the range where less than actual. If this were possible, then the range information would be considered ambiguous. An operator would not know whether the range were the actual range or some greater value.

Figure 8 The maximum actual range that can be detected and displayed without ambiguity, or the maximum unambiguous range, is just the range corresponding to a time interval equal to the pulse repetition time, PRT. Therefore, the maximum unambiguous range, RUNAMB = c PRT/2 = c/(2PRF) When a radar is scanning, it is necessary to control the scan rate so that a sufficient number of pulses will be transmitted in any particular direction in order to guarantee reliable detection. If too few pulses are used, then it will more difficult to distinguish false targets from actual ones. False targets may be present in one or two pulses but certainly not in ten or twenty in a row. Therefore to maintain a low false detection rate, the number of pulses transmitted in each direction should be kept high, usually above ten. For systems with high pulse repetition rates (frequencies), the radar beam can be repositioned more rapidly and therefore scan more quickly. Conversely, if the PRF is lowered the scan rate needs to be reduced. For simple scans it is easy to quantify the number of pulses that will be returned from any particular target. Let t represent the dwell time, which is the duration that the target remains in the

radar's beam during each scan.The number of pulses, N,that the target will be exposed to during the dwell time is:N = t PRF We may rearrange this equation to make a requirement on the dwell time for a particular scan tmin = Nmin /PRF So it is easy to see that high pulse repetition rates require smaller dwell times. For a continuous circular scan, for example, the dwell time is related to the rotation rate and the beam-width. t = q/W whereq = beam-width [degrees] W = rotation rate [degrees/sec] which will give the dwell time in seconds. These relationships can be combined, giving the following equation from which the maximum scan rate may be determined for a minimum number of pulses per scan: WMAX = q PRF/N Radar Frequency Finally, the frequency of the radio carrier wave will also have some affect on how the radar beam propagates. At the low frequency extremes, radar beams will refract in the atmosphere and can be caught in "ducts" which result in long ranges. At the high extreme, the radar beam will behave much like visible light and travel in very straight lines. Very high frequency radar beams will suffer high losses and are not suitable for long range systems. The frequency will also affect the beam-width. For the same antenna size, a low frequency radar will have a larger beam-width than a high frequency one. In order to keep the beam-width constant, a low frequency radar will need a large antenna. Theoretical Maximum Range Equation A radar receiver can detect a target if the return is of sufficient strength. Let us designate the minimum return signal that can be detected as Smin, which should have units of Watts, W. The size and ability of a target to reflect radar energy can be summarized into a single term, s, known as the radar cross-section, which has units of m2. If absolutely all of the incident radar energy on the target were reflected equally in all directions, then the radar cross section would be equal to the target's cross-sectional area as seen by the transmitter. In practice, some energy is absorbed and the reflected energy is not distributed equally in all directions. Therefore, the radar cross-section is quite difficult to estimate and is normally determined by measurement. Given these new quantities we can construct a simple model for the radar power that returns to the receiver:

Pr = Pt G 1/4pR2s 1/4pR2 Ae The terms in this equation have been grouped to illustrate the sequence from transmission to collection. Here is the sequence in detail: G = rGdir The transmitter puts out peak power Pt into the antenna, which focuses it into a beam with gain G. The power gain is similar to the directional gain, Gdir, except that it must also include losses from the transmitter to the antenna. These losses are summarized by the single term for efficiency, r. Therefore The radar energy spreads out uniformly in all directions. The power per unit area must therefore decrease as the area increases. Since the energy is spread out over the surface of a sphere the factor of 1/4pR2 accounts for the reduction. The radar energy is collected by the surface of the target and reflected. The radar cross section s accounts for both of these processes. The reflected energy spreads out just like the transmitted energy. The receiving antenna collects the energy proportional to its effective area, known as the antenna's aperture, Ae. This also includes losses in the reception process until the signal reaches the receiver. Hence the subscript "e" for "effective." The effective aperture is related to the physical aperture, A, by the same efficiency term used in power gain, given the symbol r. So that Ae = r A Our criterion for detection is simply that the received power, Pr must exceed the minimum, Smin. Since the received power decreases with range, the maximum detection range will occur when the received power is equal to the minimum, i.e. Pr = Smin. If we solve for the range, we get an equation for the maximum theoretical radar range:

Perhaps the most important feature of this equation is the fourth-root dependence. The practical implication of this is that one must greatly increase the output power to get a modest increase in performance. For example, in order to double the range, the transmitted power would have to be increased 16-fold. You should also note that the minimum power level for detection, Smin, depends on the noise level. In practice, this quantity constantly be varied in order to achieve the perfect balance between high sensitivity which is susceptible to noise and low sensitivity which may limit the radar's ability to detect targets.

IFF Unit (Identification Friend Foe):


This unit also uses the above said transreciever with the only exception that now its aim is to determine if the detected target is an enemy or not. In telecommunications, identification, friend or foe (IFF) is an identification system designed for command and control. It enables military and national (civilian-located ATC) interrogation systems to identify aircraft, vehicles or forces as friendly and to determine their bearing and range from the interrogator. IFF may be used by both military and civilian aircraft.

IFF was first developed during World War II. The term is something of a misnomer, as IFF can positively identify friendly targets but not hostile ones. If an IFF interrogation receives no reply or an invalid reply, the object cannot be identified as friendly but is not positively identified as a foe.

There are many reasons for friendly aircraft not to reply to IFF, such as battle damage or equipment failure, loss of encryption keys, and wrong encryption keys. Terrain-hugging aircraft are very often poor candidates for microwave line-of-sight systems such as the IFF system. Microwaves cannot penetrate terrain, and very often atmospheric effects (referred to as anomalous propagation) cause timing, range, and azimuth issues.

The major military benefits of IFF include preventing "friendly fire" and being able to positively identify friendly forces.

MODES:
Mode 1 provides 2-digit octal mission code. (military only can be changed in flight) Mode 2 provides 4-digit octal unit code. (military only can't be changed in flight) Mode 3/A provides a 4-digit octal identification code for the aircraft, assigned by the air traffic controller. (military and civilian) Mode 4 provides a 3-pulse reply to crypto coded challenge. (military only) Mode 5 provides a cryptographically secured version of Mode S and ADS-B GPS position. (military only) Mode 5 is divided into two levels. Both are crypto-secure with Enhanced encryption, Spread Spectrum Modulation, and Time of Day Authentication. Level 1 is similar to Mode 4 information but enhanced with an Aircraft Unique PIN. Level 2 is the same as Mode 5 level one but includes additional information such as Aircraft Position and Other Attributes.

Mode C provides 4-digit octal code for aircrafts pressure altitude. (military and civilian) Mode S provides multiple information formats to a selective interrogation. Typically aircraft are assigned a unique 24-bit Mode S address. The Mode S address is partitioned and a group of address ranges are allocated to each country. Some countries change the assigned address for security reasons, and thus it might not be a unique address. (military and civilian).

COMPONENTS
ATmega8 Microcontroller
Atmel 8-bit microcontroller family 4K/8K/16K/32K Flash
FEATURES:

80C51 Central Processing Unit On-chip FLASH Program Memory Speed up to 12 MHz Fully static operation RAM expandable externally up to 64 kbytes 4 interrupt priority levels 6 interrupt sources Four 8-bit I/O ports Full-duplex enhanced UART Framing error detection Automatic address recognition
FEATURES:

Two 16-bit timers/counters T0, T1 (standard 80C51) and additional T2 (capture and compare) Power control modes Clock can be stopped and resumed Idle mode Power down mode Programmable clock out Second DPTR register Asynchronous port reset Low EMI (inhibit ALE) Wake up from power down by an external interrupt

PIN CONFIGURATION:

BLOCK DIAGRAM

PIN DESCRIPTION:
NAME AND FUNCTION Ground: 0 V reference Power Supply: This is the power supply voltage for normal, idle, and power-down operation. Port 0:Port 0 is an open-drain, bidirectional I/O port. Port 0 pins that have 1s written to them float and can be used as high-impedance inputs. Port 0 is also the multiplexed low-order address and data bus during accesses to external program and data memory. In this application, it uses strong internal pull-ups when emitting 1s. Port 1:Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. Port 1 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 1 pins that are externally pulled low will source current because of the internal pull-ups. (See DC Electrical Characteristics: IIL). Alternate function for Port 1: T2 (P1.0):Timer/Counter2 external count input/clockout (see Programmable Clock-Out). T2EX (P1.1): Timer/Counter2 reload/capture/direction control. Port 2:Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. Port 2 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 2 pins that are externally being pulled low will source current because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOV @Ri), port 2 emits the contents of the P2 special function register. Port 3:Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. Port 3 pins that have 1s written to them are pulled high by the internal pull-ups and can be used as inputs. As inputs, port 3 pins that are externally being pulled low will source current because of the pull-ups. Port 3 also serves the special features of the 89C51/89C52/89C54/89C58, as listed below: RxD (P3.0): Serial input port TxD (P3.1): Serial output port INT0 (P3.2): External interrupt INT1 (P3.3): External interrupt T0 (P3.4): Timer 0 external input T1 (P3.5): Timer 1 external input WR (P3.6): External data memory write strobe RD (P3.7): External data memory read strobe Reset: A high on this pin for two machine cycles while the oscillator is running, resets the device. An internal diffused resistor to VSS permits a power-on reset using only an external capacitor to VCC. Address Latch Enable: Output pulse for latching the low byte of the address during an

access to external memory. In normal operation, ALE is emitted at a constant rate of 1/6 the oscillator frequency, and can be used for external timing or clocking. Note that one ALE pulse is skipped during each access to external data memory. ALE can be disabled by setting SFR auxiliary.0. With this bit set, ALE will be active only during a MOVX instruction. Program Store Enable: The read strobe to external program memory. When executing code from the external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. PSEN is not activated during fetches from internal program memory.

VOLTAGE REGULATOR:
These voltage regulators are monolithic integrated circuits designed as fixedvoltage regulators for a wide variety of applications including local, oncard regulation. These regulators employ internal current limiting, thermal shutdown, and safearea compensation. With adequate heatsinking they can deliver output currents in excess of 1.0 A. Although designed primarily as a fixed voltage regulator, these devices can be used with external components to obtain adjustable voltages and currents.

Output Current in Excess of 1.0 A No External Components Required Internal Thermal Overload Protection Internal Short Circuit Current Limiting Output Transistor SafeArea Compensation Output Voltage Offered in 2% and 4% Tolerance Available in Surface Mount D2PAK and Standard 3Lead TransistorPackages Previous Commercial Temperature Range has been Extended to a Junction Temperature Range of 40C to +125C

Voltage Regulator (regulator), usually having three legs, converts varying input voltage and produces a constant regulated output voltage. They are available in a variety of outputs. The most common part numbers start with the numbers 78 or 79 and finish with two digits indicating the output voltage. The number 78 represents positive voltage and 79 negative one. The 78XX series of voltage regulators are designed for positive input. And the 79XX series is designed for negative input. Examples: 5V DC Regulator Name: LM7805 or MC7805 -5V DC Regulator Name: LM7905 or MC7905 6V DC Regulator Name: LM7806 or MC7806 -9V DC Regulator Name: LM7909 or MC7909 The LM78XX series typically has the ability to drive current up to 1A. For application requirements up to 150mA, 78LXX can be used. As mentioned above, the component has three legs: Input leg which can hold up to 36VDC Common leg (GND) and an output leg with the regulator's voltage. For maximum voltage regulation, adding a capacitor in parallel between the common leg and the output is usually recommended. Typically a 0.1MF capacitor is used. This eliminates any high frequency AC voltage that could otherwise combine with the output voltage. See below circuit diagram which represents a typical use of a voltage regulator.

BLOCK DIAGRAM:

ELECTRICAL CHARACTERISTICS

OUR IMPLEMENTATION
We are developing the system so that it can become portable one day and can be used for a much prepared Battle force as it can be used for more specific instructions from senior commanders and the hence save lives. SOFTWARE IMPLEMENTATION:
The MAIN CODE is as follows: #define F_CPU 8000000UL // define cpu frequency for delay function #define FOSC 1843200// Clock Speed #define BAUD 9600 #define MYUBRR FOSC/16/BAUD-1 #include <avr/io.h> // includes input/output header files

#include<util/delay.h> // includes delay header files #include"lcd.h" #include"lcd.c" // includes lcd header files // includes lcd .C program file

// Program for delay void wait(float second) { int i; for(i=0;i<(int)(30*second);i++) _delay_loop_2(0); }

// Program for USART Initialization void USART_Init( unsigned int ubrr) { /* Set baud rate */

UBRRH = (unsigned char)(ubrr>>8); UBRRL = (unsigned char)ubrr; /* Enable receiver and transmitter */ UCSRB = (1<<RXEN)|(1<<TXEN); /* Set frame format: 8data, 2stop bit */ UCSRC = (1<<URSEL)|(1<<USBS)|(3<<UCSZ0); }

// Program for sending data void USART_Transmit( unsigned char data ) { /* Wait for empty transmit buffer */ while ( !( UCSRA & (1<<UDRE)) ) ; /* Put data into buffer, sends the data */ UDR = data; 1<<TXEN; }

// Program for receiving data unsigned char USART_Receive( void ) { /* Wait for data to be received */ while ( !(UCSRA & (1<<RXC)) ) ; /* Get and return received data from buffer */ return UDR;

// Program for Radar with IFF funtionality

int main (void)

DDRB = 0xFF; // Port B as output Port DDRC = 0x00; // Port C as input Port

PORTB = 0b00111011; /* Pin value description P.0 - P.3 = Secure Data Code P.4 = Sensor Active P.5 = Motor Control P.6 = Antenna Enable P.7 = Reciever Enable */ int sensor_input = 0; unsigned char Iden = "salt"; unsigned char ask = "eat"; unsigned int ubrr; sensor_input = PINC & 0b11111111; // mask bits 7-0 i.e ALL 8 bits

if((sensor_input = 0b00010000) & (PORTB = 0b00111011)) { PORTB = 0b01011011; // Enable IFF Module and stop Radar Motion void USART_Init( unsigned int ubrr); void USART_Transmit( ask ); wait(2); PORTB = 0b11011011; { if(Iden == unsigned char USART_Receive( void )) // Condition matching a Friend { lcd_init(LCD_DISP_ON); lcd_gotoxy(6,1); lcd_puts("Friend"); wait(2); lcd_clrscr(); } else { lcd_gotoxy(6,1); lcd_puts("Foe"); wait(2); lcd_clrscr(); } } } // Condition matching an Enemy // Delay

PORTB = 0b00111011; }

CODE for transmitter side: #define FOSC 1843200// Clock Speed #define BAUD 9600 #define MYUBRR FOSC/16/BAUD-1

void USART_Init( unsigned int ubrr) { /* Set baud rate */ UBRRH = (unsigned char)(ubrr>>8); UBRRL = (unsigned char)ubrr; /* Enable receiver and transmitter */ UCSRB = (1<<RXEN)|(1<<TXEN); /* Set frame format: 8data, 2stop bit */ UCSRC = (1<<URSEL)|(1<<USBS)|(3<<UCSZ0); }

void USART_Transmit( unsigned char data ) { /* Wait for empty transmit buffer */ while ( !( UCSRA & (1<<UDRE)) ) ; /* Put data into buffer, sends the data */

UDR = data; }

void main() { void USART_Init( unsigned int ubrr); while(1) { void USART_Transmit( "salt" ); } } Also additional codes are used for LCD Display: #ifndef LCD_H #define LCD_H #if (__GNUC__ * 100 + __GNUC_MINOR__) < 303 #error "This library requires AVR-GCC 3.3 or later, update to newer AVR-GCC compiler !" #endif #include <inttypes.h> #include <avr/pgmspace.h> /** * @name Definitions for MCU Clock Frequency * Adapt the MCU clock frequency in Hz to your target. */ #define XTAL 1000000 /** * @name Definition for LCD controller type * Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller. */ #define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */ /**< clock frequency in Hz, used to calculate delay timer */

/** * @name Definitions for Display Size * Change these definitions to adapt setting to your display */ #define LCD_LINES 2 /**< number of visible lines of the display */ /**< visibles characters per line of the display */ /**< internal line length of the display */ /**< DDRAM address of first char of line 1 */ /**< DDRAM address of first char of line 2 */ /**< DDRAM address of first char of line 3 */ /**< DDRAM address of first char of line 4 */ /**< 0: no wrap, 1: wrap at end of visibile line */ /**< 0: memory mapped mode, 1: IO port mode */

#define LCD_DISP_LENGTH 16 #define LCD_LINE_LENGTH 0x40 #define LCD_START_LINE1 0x00 #define LCD_START_LINE2 0x40 #define LCD_START_LINE3 0x14 #define LCD_START_LINE4 0x54 #define LCD_WRAP_LINES #define LCD_IO_MODE #if LCD_IO_MODE /** 1 0

* @name Definitions for 4-bit IO mode * Change LCD_PORT if you want to use a different port for the LCD pins. * * The four LCD data lines and the three control lines RS, RW, E can be on the * same port or on different ports. * Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on * different ports. * * Normally the four data lines should be mapped to bit 0..3 on one port, but it * is possible to connect these data lines in different order or even on different * ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions. * */ #define LCD_PORT PORTD /**< port for the LCD lines */ /**< port for 4bit data bit 0 */ /**< port for 4bit data bit 1 */

#define LCD_DATA0_PORT LCD_PORT #define LCD_DATA1_PORT LCD_PORT

#define LCD_DATA2_PORT LCD_PORT #define LCD_DATA3_PORT LCD_PORT #define LCD_DATA0_PIN #define LCD_DATA1_PIN #define LCD_DATA2_PIN #define LCD_DATA3_PIN #define LCD_RS_PORT #define LCD_RS_PIN #define LCD_RW_PORT #define LCD_RW_PIN #define LCD_E_PORT #define LCD_E_PIN 2 1 0 4 5 6 7

/**< port for 4bit data bit 2 */ /**< port for 4bit data bit 3 */

/**< pin for 4bit data bit 0 */ /**< pin for 4bit data bit 1 */ /**< pin for 4bit data bit 2 */ /**< pin for 4bit data bit 3 */ /**< port for RS line */ */ */

LCD_PORT

/**< pin for RS line LCD_PORT

/**< port for RW line */

/**< pin for RW line

LCD_PORT

/**< port for Enable line */

*/

/**< pin for Enable line

#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \ defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \ defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__) /* * memory mapped mode is only supported when the device has an external data memory interface */ #define LCD_IO_DATA 0xC000 /* A15=E=1, A14=RS=1 /* A15=E=1, A14=RS=0 */ */

#define LCD_IO_FUNCTION 0x8000 #define LCD_IO_READ #else 0x0100

/* A8 =R/W=1 (R/W: 1=Read, 0=Write */

#error "external data memory interface not available for this device, use 4-bit IO port mode" #endif

/* instruction register bit positions, see HD44780U data sheet */ #define LCD_CLR #define LCD_HOME 0 1 /* DB0: clear display */ */ */ */

/* DB1: return to home position 2 1 /* DB2: set entry mode

#define LCD_ENTRY_MODE #define LCD_ENTRY_INC

/* DB1: 1=increment, 0=decrement

#define LCD_ENTRY_SHIFT #define LCD_ON 3

/* DB2: 1=display shift on */

*/

/* DB3: turn lcd/cursor on 2 1 0 4 3 2 5 4 /* DB2: turn display on /* DB1: turn cursor on /* DB0: blinking cursor ?

#define LCD_ON_DISPLAY #define LCD_ON_CURSOR #define LCD_ON_BLINK #define LCD_MOVE #define LCD_MOVE_DISP #define LCD_MOVE_RIGHT #define LCD_FUNCTION

*/ */ */ */

/* DB4: move cursor/display

/* DB3: move display (0-> cursor) ? */ /* DB2: move right (0-> left) ? /* DB5: function set */ */

#define LCD_FUNCTION_8BIT

/* DB4: set 8BIT mode (0->4BIT mode) */ /* DB3: two lines (0->one line) /* DB2: 5x10 font (0->5x7 font) */ */ */ */ */

#define LCD_FUNCTION_2LINES 3 #define LCD_FUNCTION_10DOTS 2 #define LCD_CGRAM #define LCD_DDRAM #define LCD_BUSY 7 6 7

/* DB6: set CG RAM address /* DB7: set DD RAM address /* DB7: LCD is busy

/* set entry mode: display shift on/off, dec/inc cursor move direction */ #define LCD_ENTRY_DEC 0x04 /* display shift off, dec cursor move dir */ 0x05 /* display shift on, dec cursor move dir */

#define LCD_ENTRY_DEC_SHIFT #define LCD_ENTRY_INC_

0x06 /* display shift off, inc cursor move dir */ 0x07 /* display shift on, inc cursor move dir */

#define LCD_ENTRY_INC_SHIFT

/* display on/off, cursor on/off, blinking char at cursor position */ #define LCD_DISP_OFF #define LCD_DISP_ON 0x08 /* display off 0x0C /* display on, cursor off */ */ */ */ */

#define LCD_DISP_ON_BLINK #define LCD_DISP_ON_CURSOR

0x0D /* display on, cursor off, blink char 0x0E /* display on, cursor on

#define LCD_DISP_ON_CURSOR_BLINK 0x0F /* display on, cursor on, blink char /* move cursor/shift display */ #define LCD_MOVE_CURSOR_LEFT #define LCD_MOVE_CURSOR_RIGHT #define LCD_MOVE_DISP_LEFT #define LCD_MOVE_DISP_RIGHT 0x10 /* move cursor left (decrement) 0x14 /* move cursor right (increment) */ */ */

*/

0x18 /* shift display left 0x1C /* shift display right

/* function set: set interface data length and number of display lines */ #define LCD_FUNCTION_4BIT_1LINE 0x20 /* 4-bit interface, single line, 5x7 dots */ #define LCD_FUNCTION_4BIT_2LINES 0x28 /* 4-bit interface, dual line, 5x7 dots */ #define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */ #define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */ #define LCD_MODE_DEFAULT /** * @name Functions */ /** @brief @param Initialize display and select type of cursor dispAttr \b LCD_DISP_OFF display off\n \b LCD_DISP_ON display on, cursor off\n \b LCD_DISP_ON_CURSOR display on, cursor on\n \b LCD_DISP_ON_CURSOR_BLINK display on, cursor on flashing @return none */ extern void lcd_init(uint8_t dispAttr); /** @brief Clear display and set cursor to home position @param void ((1<<LCD_ENTRY_MODE) | (1<<LCD_ENTRY_INC) )

@return none */ extern void lcd_clrscr(void); /** @brief Set cursor to home position @param void

@return none */ extern void lcd_home(void); /**

@brief Set cursor to specified position

@param @param

x horizontal position\n (0: left most position) y vertical position\n (0: first line)

@return none */ extern void lcd_gotoxy(uint8_t x, uint8_t y); /** @brief Display character at current cursor position @param c character to be displayed

@return none */ extern void lcd_putc(char c); /** @brief Display string without auto linefeed @param s string to be displayed

@return none */ extern void lcd_puts(const char *s); /** @brief Display string from program memory without auto linefeed @param s string from program memory be be displayed

@return none @see */ extern void lcd_puts_p(const char *progmem_s); /** @brief Send LCD controller instruction command @param cmd instruction to send to LCD controller, see HD44780 data sheet lcd_puts_P

@return none */

extern void lcd_command(uint8_t cmd); /** @brief Send data byte to LCD controller Similar to lcd_putc(), but without interpreting LF @param data byte to send to LCD controller, see HD44780 data sheet

@return none */ extern void lcd_data(uint8_t data); /** @brief macros for automatically storing string constant in program memory */ #define lcd_puts_P(__s) /*@}*/ #endif //LCD_H lcd_puts_p(PSTR(__s))

CIRCUIT IMPLEMENTATION:
Main Unit:

Active Target:

Both configurations are same except the use of motor to rotate the platform for radar. Also minor difference in programing is present.

RESULTS & DISCUSSIONS


The project that we made was aimed at representing the application of the RADAR technology, that is, the automatic detection of flying objects, alternately termed as, automatic radar system. We have been successful in making a working model of the project. This model shows how RADAR technology can help detect flying objects with categorizing it as an enemy or a friend. The model is a small scale project, but it fully complies with the application. We would like to point out here that our project was only aimed at learning the use of RADAR technology, so it does not have any commercial use. Although our project, with a small alteration can be put to use commercially also. Also with integrating this system with a computer and providing it a communication capability can increase battlefield awareness for foot soldier as the system is light weight and sturdy. This technology is in widespread use now and has been in the scene since decades.

FURTHER DEVELOPMENT IN RADAR TECHNOLOGY

The radar technology has been in use since decades but technology as a very important aspect that it has to improve every now and then. Radars being used nowadays work perfectly under good atmospheric conditions and even under bad ones but not under worse atmospheric conditions like that of an oncoming tornado in countries like the US. Another problem with the radar technology is that the supersonic aircrafts cannot be detected by the commonly available radars. This poses a threat to the available aircrafts because the supersonic technology is not available with many countries. So the further development is in this field most importantly. Also a sure shot method has to be developed for the IFF sub-system as a damaged system may transmit wrong data or no data at all! An important field of improvement of the radars is the range of the radars. An increased range will result in an increased coverage area for surveillance.

REFERENCES

www.wikipedia.org www.engineersgarage.com www.efy.com


www.atmel.com/devices/at89C51.aspx

The 8051 microcontroller and embedded systems Mohammed Ali Mazidi and Janice Gillespie

Embedded system design Frank Vahid& Tony Givargis Microcontroller ( theory and applications ) - Ajay V. Deshmukh Robosapiens India
www.eXtremeElectronics.co.in

You might also like