Sei sulla pagina 1di 49

ABSTRACT

Car theft is common in many areas and remains a costl y propert y crime. It becomes very difficult to track down and recover these stolen cars because of the high level of sophistication adopted by these thieves in erasing the complete identit y of the cars. Hence Police Departments rel y on tracking systems like GPS to recover these stolen cars. An alternate option is the use of radio communicat ion which is explored in our project.

This project is an advanced system for Automation and Ve hicle Tracking. The main application is to identify the vehicles which are stolen. Also, this project is a step towards automation of gates providing access only to authorized vehicles. To implement this we make use of the concept of Near Field Communication (NFC) which is a technology for contactless short-range communication based on RFID. It is a promising new technology which supports the existing RFID infrastructure. It is considered to be one of the technologies to look out for because of its diverse range of applications. Hence we decided to take up this project.

The methodology is quite simple. An RF transmitter will be placed in the chassis of the vehicle which is just below the petrol tank. Whenever the person takes the vehicle near a parking lot or petrol pump then the NFC receiver that is active RFID receiver which could be placed at the nozzle point in petrol pumps, will detect the frequency being transmitted by the car and will send it to the police station.

Every car transmits a unique frequency. The police station is equipped with a microcontroller which makes the decision whether the car is stolen or not. If the received frequency matches the frequency of a stolen car then a warning light will be shown at the police station so appropriate action could be taken. In case of restricted access, the gates would automatically open if any of the allowed frequencies are detected.

CHAPTER 1: INTRODUCTION

As more and more people are able to afford cars the number of incidents of car theft are rising sharply. These stolen cars are again sold by changing their chassis number, engine number etc such that they are not identifiable. About 85,000 car theft cases are reported in India each year of which only 30% cars are recovered due to lack of technology used in the cars. One of the most common technology used to track cars is the Global Positioning System(GPS). GPS is a compact handy device like mobile phone with enabled combo technology of GPS and GPRS that track mobile vehicles through using four visible satellites. The satellites send the signals to the GPS receiver and it calculates the signals and inform about the exact position of the vehicle on the earth. The calculated data send on web server provided to users by the GPS service providing company. The company provides a web based login account to access the data from the web server. Using this account, the user can track one or more vehicles at a time. America has monopoly over the GPS satellites and hence could decide to discontinue it as an open technology. Therefore, there is the need for a suitable alternative.

Near Field Communication, which is a short-range, high frequency, low bandwidth wireless communication technology provides an alternative. Each car is equipped with an RF transmitter. Its frequency is unique and can be detected at petrol pumps or parking lots using NFC receivers. This information is transmitted to the police station which holds the database of stolen cars and it is determined whether the car is stolen or legitimate by using a microcontroller. Hence, by the simple combination of transmitters, receivers and microcontroller car thieves can be nabbed and stolen cars recovered. This solution is cost effective and easy to install in any area. The application can be extended to automation of gates allowing access to only authorized vehicles. When an allowed frequency is detected, the vehicle is allowed to pass through.

The basic block diagram of a NFC vehicle tracker is shown below

DRIVER

BUFFER

Petrol Pump

RF Rx RF Tx

RF Tx Police Station Display

LCD 16 X 2

MC 89C51

RF Rx

INTERFACING CIRCUIT

Fig 1.1: Block Diagram of NFC Vehicle tracker

CHAPTER 2: THEORY AND FUNDAMENTALS

2.1: A LOOK AT NFC

2.1.1: INTRODUCTION

Near Field Communication (NFC) is a technology for contactless short-range communication. Based on the Radio Frequency Identification (RFID), it uses magnetic field induction to enable communication between electronic devices. The number of short-range applications for NFC technology is growing continuously, appearing in all areas of life. Especially the use in conjunction with mobile phones offers great opportunities. The main applications are: Payment & ticketing NFC enables users to make fast and secure purchases, go shopping with electronic money, and also to buy, store and use electronic tickets, such as concert/event tickets, plane tickets, travel cards, etc. Electronic keys For example, these can be car keys, house/office keys, etc. Identification In addition, NFC makes it possible to use mobile phones instead of identity documents. In Japan, for example, student IDs can be stored on cell phones, which allows the students to electronically register for classes, to open locked campus doors, buy food at the school cafeteria, borrow books, and even get discounts at local movie theaters, restaurants, and shops.

Receive and share information The data stored on any tagged object (e.g. a DVD box or a poster) can be accessed by mobile phones in order to download movie trailers, street-maps, travel timetables etc. Set-up service To avoid the complicated configuration process, NFC can be used for the set-up of other longer-range wireless technologies, such as Bluetooth or Wireless LAN.

2.1.2: TECHNOLOGY OVERVIEW

NFC operates in the standard, globally available 13.56MHz frequency band. Possible supported data transfer rates are 106, 212 and 424 kbps and there is potential for higher data rates. The technology has been designed for communications up to a distance of 20 cm, but typically it is used within less than 10 cm. This short range is not a disadvantage, since it aggravates eavesdropping.

The NFC interface can operate in two different modes: active and passive. An active device generates its own radio frequency (RF) field, whereas a device in passive mode has to use inductive coupling to transmit data. For battery-powered devices, like mobile phones, it is better to act in passive mode. In contrast to the active mode, no internal power source is required. In passive mode, a device can be powered by the RF field of an active NFC device and transfers data using load modulation. Hence, the protocol allows for card emulation, e.g., used for ticketing applications, even when the mobile phone is turned off. This yields to two possible cases, which are described in Table 2.1. The communication between two active devices case is called active communication mode, whereas the communication between an active and a passive device is called passive communication mode.

Communication Mode Active

Description Two active devices communicate with each other. Each device has to generate its own RF field, if it wants to send data. The RF field is alternately generated by one of the two devices.

Passive

In this mode the communication takes place between an active and a passive device. The passive device has no battery and uses the RF field generated by the active device.

Table 2.1: Communication Descriptions

The distinction between active and passive devices specifies the way data is transmitted. Passive devices encode data always with Manchester coding and a 10%ASK. Instead, for active devices one distinguishes between the modified Miller coding with 100% modulation if the data rate is 106 kbps, and the Manchester coding using a modulation ratio of 10% if the data rate is greater than 106 kbps. As we will discuss later the modulation ratio, defined in is of high importance for the security of the NFC data transfer.

Active Device 106 kBaud 212 kBaud 424 kBaud

Passive Device

Modified Miller, 100% ASK Manchester, 10% ASK Manchester, 10% ASK Manchester, 10% ASK Manchester, 10% ASK Manchester, 10% ASK

Table 2.2: Coding and Modulation at different transfer speeds

2.1.3: COMPARISON WITH OTHER TECHNOLOGIES

2.1.3.1: NFC and RFID

Basically, the technologies Radio Frequency Identification and Near Field Communication use the same working standards. However, the essential extension of RFID is the communication mode between two active devices. In addition to contactless smart cards (ISO 14443 [7]), which only support communication between powered devices and passive tags, NFC also provides peer-to-peer communication. Thus, NFC combines the feature to read out and emulate RFID tags, and furthermore, to share data between electronic devices that both have active power.

2.1.3.2: COMPARISON WITH BLUETOOTH AND INFRARED


NFC Network Type Point-to-point Benefits of NFC Easy Bluetooth IrDa Point-topoint

set-up, Point-tomultipoint

pairing=bringing together

Range

<0.1m

Safe, suitable for 10m crowded areas

1m

Speed Set-up time

424 kbps <0.1s Fast e.g.

721 kbps transactions 6s for public

115 kbps 0.5s

transport Modes Active-active, active passive Compatible with RFID Yes Reader mode and Activecard-like mode Can work active No Active-active

with No

existing infrastructure

Costs

Low

Affordable

Moderate

Low

Table 2.3: NFC compared with Bluetooth and IrDa

2.2: MICROCONTROLLER FUNDAMENTALS

2.2.1: WHAT IS A MICROCONTROLLER?

The general definition of a microcontroller is a single chip computer, which refers to the fact that they contain all of the functional sections (CPU, RAM, ROM, I/O, ports and timers) of a traditionally defined computer on a single integrated circuit. Some experts even describe them as special purpose computers with several qualifying distinctions that separate them from other computers. Microcontrollers are "embedded" inside some other device (often a consumer product) so that they can control the features or actions of the product. Another name for a microcontroller, therefore, is "embedded controller." Microcontrollers are dedicated to one task and run one specific program. The program is stored in ROM (read-only memory) and generally does not change. Microcontrollers are often low-power devices. A desktop computer is almost always plugged into a wall socket and might consume 50 watts of electricity. A battery-operated microcontroller might consume 50 mill watts. A microcontroller has a dedicated input device and often (but not always) has a small LED or LCD display for output. A microcontroller also takes input from the device it is controlling and controls the device by sending signals to different components in the device. A microcontroller is often small and low cost. The components are chosen to minimize size and to be as inexpensive as possible. A microcontroller is often, but not always, ruggedized in some way. The microcontroller controlling a car's engine, for example, has to work in temperature extremes that a normal computer generally cannot handle. A car's microcontroller in Kashmir regions has to work fine in -30 degree F (-34 C) weather, while the same microcontroller in Gujarat region might be operating at 120 degrees F (49 C). When you add the heat naturally generated by the engine, the temperature can go as high as 150 or 180 degrees F (65-80 C)

in the engine compartment. On the other hand, a microcontroller embedded inside a VCR hasn't been ruggedized at all. Clearly, the distinction between a computer and a microcontroller is sometimes blurred. Applying these guidelines will, in most cases, clarify the role of a particular device.

2.2.2: WHY ARE THEY SO POPULAR?

The programmability of modern desktop PCs makes them extraordinarily versatile. The functionality of the entire machine can be altered by merely changing its programming. Microcontrollers share this attribute with their desktop relatives. The chips are manufactured with powerful capabilities and the end user determines exactly how the device will function. Often, this makes a dramatic difference in the cost and complexity of a particular design. The true impact of this statement is best illustrated by example. For every clock pulse, the circuit produces one of the three bit numbers in the sequence 000, 100, 111, 010, 011. This design has been implemented with three flip-flops and seven discrete gates as well as a significant amount of wiring. The design of this system can be quite laborious. One must begin with a state graph followed by a state table. Then, the flip-flop T input equations must be derived from a set of Karnaugh maps. Next, the T input equations must be transformed into the actual T input network. All of this circuitry must then be wired together; a task that's time consuming and sometimes error prone. On the other hand, this can be accomplished with a simpler, less costly microcontroller design. Notice the dramatic difference in the amount of hardware and wiring. This simple circuit, along with about a dozen lines of code, will perform the same task as the first circuit. There are other benefits as well. The microcontroller implementation does not have to contend with the undetermined states that sometimes occur with discrete designs. Also consider for a moment what would be required to change the sequence of numbers in the first circuit. What if the output needs to be changed to eight bits instead of three? These are trivial modifications for the microcontroller while the discrete circuit would require a complete redesign. The example above is not an obscure case. The effects of this device are being felt in almost every facet of digital design. A sure method of determining the popularity of an

electronic device is to note when they attain widespread use by hobbyists. It therefore becomes essential that the electronics engineer or hobbyist learn to program these microcontrollers to maintain a level of competence and to gain the advantages microcontrollers provide in his or her own circuit designs

2.2.3: AT89C51 MICROCONTROLLER.

2.2.3.1: FEATURES

Compatible with MCS-51 products 4K Bytes of In-System Reprogrammable Flash Memory Endurance: 1,000 Write/Erase Cycles Fully Static Operation: 0 Hz to 24 MHz Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Programmable Serial Channel Low-power Idle and Power-down Modes

2.2.3.2: PIN CONFIGURATION

Fig 2.1: Pin Configuration of AT89C51

2.2.3.3: BLOCK DIAGRAM

Fig 2.3: Block Diagram of AT89C51

2.2.3.4: PIN DESCRIPTION

VCC Supply voltage. GND Ground Port 0 Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance inputs. Port 0 may also be configured to be the multiplexed loworder address/data bus during accesses to external program and data memory. In this mode P0 has internal pullups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pullups are required during program verification. Port 1 Port 1 is an 8-bit bidirectional I/O port with internal pullups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 1 also receives the low-order address bytes during Flash programming and program verification. Port 2 Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pullups. Port 2 emits the highorder address byte during fetches from external program memory and during accesses to external data memory that use 16-bit addresses (MOVX @ DPTR). In this application it uses

strong internal pull-ups when emitting 1s. During accesses to external data memory that use 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pullups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

Table 2.4: Special functions of Port 3 pins Port 3 also receives some control signals for Flash programming and Programming verification. RST Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.

ALE/PROG Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode. PSEN Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1 Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting oscillator amplifier.

2.3: RADIO FREQUENCY CIRCUIT TECHNIQUES

2.3.1: RADIO FREQUENCY SIGNALS

Radio frequency signals are generally understood to occupy a frequency range, which extends from a few tens of kilohertz to several hundred giga-hertz. The lowest part of radio frequency range, which is of practical use (below 30 kHz), is only suitable for narrow-band communications. At this frequency, signals propagate as ground waves (following the curvature of the earth) over very long distance. At the other extreme, the highest frequency range, which is of practical importance, extends above 30GHz. At these microwave frequencies, considerable bandwidths are available (sufficient to transmit many television channel using point-to-point links or to permit very high definition radar systems) and signals tend to propagate strictly along line-of-sight paths.

At other frequencies, signals may propagate by various means, including reflection from ionized layers in the ionosphere. At frequencies between 3MHz and 30MHz, for example, ionospheric propagation regularly permits intercontinental broadcasting and communications using simple equipment within the scope of the enthusiastic radio amateur and short-wave listener.

For convenience, the radio frequency spectrum is divided into a number of bands, each spanning a decade of frequency. The use to which each frequency range is put depends upon a number of factors, paramount amongst which is the propagation characteristic within the band concerned. Other factors, which need to be taken into account, include the efficiency of practical aerial system in the range concerned and the bandwidth available. It is also worth noting that, although it may appear from Figure A that a great deal of the radio frequency spectrum is not used, it should be stressed that competition for frequency space is fierce.

Frequency allocations are, therefore, ratified by international agreement and the various user services carefully safeguard their own areas of the spectrum.

Fig 2.4: The radio frequency spectrum

2.3.2: FREQUENCY AND WAVELENGTH

Radio waves propagate in air (or space) at the speed of light (300 million meters per second). The velocity of propagation[v], wavelength[] and frequency [f] of a radio wave are related by the equation: V = f = 3 X 108 m/s This equation can be arranged to make f or the subject, as follows: F = 3 X 108/ Hz and = 3 X 108 / f m As an example, a signal at a frequency of 1 MHz will have a wavelength of 300 m whereas a signal at a frequency of 10 MHz will have a wavelength of 30m.

2.3.3: MODULATION

In order to convey information using a radio frequency carrier, the signal information must be superimposed or modulated onto the carrier. Modulation is the name given to the process of changing a particular property of the carrier wave in sympathy with the instantaneous voltage (or current) signal.

The most commonly used methods of modulation are amplitude modulation (AM) and frequency modulation (FM). In the former case, the carrier amplitude (its peak voltage) varies according to the voltage, at any instant, of the modulating signal. In the latter case, the carrier frequency is varied in accordance with the voltage, at any instant, of the modulating signal.

Figure 2.5 shows the effect of amplitude and frequency modulating a sinusoidal carrier (note that the modulating signal is, in the case, also sinusoidal). In practice, many more cycles of the radio frequency carrier would occur in the time span of the cycle of the modulating signal.

The term angle modulation is the generic term encompassing both frequency modulation and phase modulation. Frequency modulation involves operating directly upon the frequency determining elements of an oscillator stage (e.g. by means of a variable capacitance diode placed across the oscillator-tuned circuit or connected in series with a quartz crystal).

Phase modulation, on the other hand, acts indirectly by changing the phase of the signal in a subsequent stage (e.g. by means of a variable capacitance diode acting in a phase shifting circuit).

Fig 2.5: Amplitude and frequency modulation

If the modulating signal (audio) is correctly tailored prior to its application to the phase modulated stage, the end result is identical to that of frequency modulation. The reason for this is that, in a true FM system, the deviation produced is the same for all modulating signals of equal amplitude (i.e. the amount frequency deviation is independent of the frequency of the modulating signal). In a phase-modulated system, on other hand, the amount of frequency deviation is proportional to both modulating signal amplitude and

modulating signal frequency. Thus in a phase modulated system without audio tailoring, a modulation signal of 2 kHz will produce twice as much frequency deviation as an equal amplitude modulating signal of 1 kHz. The desired audio response required to produce FM, therefore, is one, which rolls off the frequency response by half for each doubling of frequency (equivalent to 6-dB per octave roll-off). This can be easily achieved using a simple R-C low-pass filter.

2.3.4: DEMODULATION

Demodulation is the reverse of modulation and is the means by which the signal information is recovered from the modulated carrier. Demodulation is achieved by means of a demodulator consists of a reconstructed version of the original signal information present at the input of the modulator stage within the transmitter.

Figure 2.6 shows the simplified block schematic of a simple radio communication system comprising on AM transmitter and a tuned radio frequency (TRF) receiver. Within the transmitter, the carrier wave (of constant frequency) is generated by means of a radio frequency oscillator stage. In order to ensure that the carrier is both accurate and within in frequency, this stage would normally employ a quartz crystal within its frequency generating circuitry.

The output of the modulator (a modulated carrier) is amplified before outputting to the aerial system. The output is usually carefully filtered to remove any spurious signals (harmonics) which may be present and which may otherwise cause interference to other services.

At the receiver, the signal produced by the receiving aerial is a weak copy of the transmitted signal (its level is usually measured in a V). Also present will be countless other signals at different frequencies (and some with appreciably larger amplitude than the desired

signal). These unwanted signals must be rejected by the receivers radio frequency tuned circuits if they are no to cause problems in later stages.

Mic.
AF amplifier Modulator RF oscillator RF amplifier

LS

RF amplifier

Demodulator

AF amplifier

Fig 2.6: RF Transmitter and Receiver

2.4: BUFFER AND DRIVER

2.4.1: BUFFER

Buffers does not affect the logical state of a digital signal (i.e. logic 1 input results into logic 1 output whereas logic 0 input results into logic 0 output). Buffers are normally used to provide extra current drive at the output, but can also be used to regularize the logic present at an interface. This 16-pin DIL packaged IC 4050 acts as a Buffer as-well-as a Converter. The input signals may be of 2.5 to 5V digital TTL compatible or DC analogue the IC gives 5V constant signal output. The IC acts as buffer and provides isolation to the main circuit from varying input signals. The working voltage of IC is 4 to 16 Volts and propagation delay is 30 nanoseconds. It consumes 0.01 milli Watt power with noise immunity of 3.7 V and toggle speed of 3 Megahertz.
1 V cc

IC 4050

16

15

14

13

12

11

10

V ss

Fig 2.7: CD4050 Hex Non-Inverting Buffer

2.4.2: DRIVER

Since the digital outputs of some circuits cannot sink much current, they are not capable of driving relays directly. So, high-voltage high-current Darlington arrays are designed for interfacing low-level logic circuitry and multiple peripheral power loads. The driver ULN 2004 drives seven relays with continuous load current ratings to 600mA for each input. At an appropriate duty cycle depending on ambient temperature and number of drivers turned ON simultaneously, typical power loads totaling over 260W [400mA x 7, 95V] can be controlled. Typical loads include relays, solenoids, stepping motors, magnetic print hammers, multiplexed LED and incandescent displays, and heaters. These Darlington arrays are furnished in 16-pin dual in-line plastic packages. All devices are pinned with outputs opposite inputs to facilitate ease of circuit board layout.

The input of ULN 2004 is TTL-compatible open-collector outputs. As each of these outputs can sink a maximum collector current of 600 mA, miniature MICROCONTROLLER relays can be easily driven. No additional free-wheeling clamp diode is required to be connected across the relay since each of the outputs has inbuilt free-wheeling diodes.

Fig 2.8: ULN


1

IC ULN 2004 16 15 14 13 12 11 10 9 Vcc

2004 Darlington Array


2 3 4 5 6 7 8

2.5: RELAY FUNDAMENTALS

2.5.1: WHAT IS A RELAY?

A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays were used extensively in telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly drive an electric motor is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called "protective relays".

2.5.2: BASIC DESIGN AND OPERATION

Fig 2.9: Simple electromechanical relay

A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core, an iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature, and one or more sets of contacts (there are two in the relay pictured). The armature is hinged to the yoke and mechanically linked to one or more sets of moving contacts. It is held in place by a spring so that when the relay is de-energized there is an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in the relay pictured is closed, and the other set is open. Other relays may have more or fewer sets of contacts depending on their function. The relay in the picture also has a wire connecting the armature to the yoke. This ensures continuity of the circuit between the moving contacts on the armature, and the circuit track on the printed circuit board (PCB) via the yoke, which is soldered to the PCB. When an electric current is passed through the coil it generates a magnetic field that attracts the armature and the consequent movement of the movable contact(s) either makes or breaks (depending upon construction) a connection with a fixed contact. If the set of contacts was closed when the relay was de-energized, then the movement opens the contacts and breaks the connection, and vice versa if the contacts were open. When the current to the coil is switched off, the armature is returned by a force, approximately half as strong as the magnetic force, to its relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in industrial motor starters. Most relays are manufactured to operate quickly. In a low-voltage application this reduces noise; in a high voltage or current application it reduces arcing. When the coil is energized with direct current, a diode is often placed across the coil to dissipate the energy from the collapsing magnetic field at deactivation, which would otherwise generate a voltage spike dangerous to semiconductor circuit components. Some automotive relays include a diode inside the relay case. Alternatively, a contact protection network consisting of a capacitor and resistor in series (snubber circuit) may absorb the surge. If the coil is designed to be energized with alternating current (AC), a small copper "shading ring" can be crimped to the end of the solenoid, creating a small out-of-phase current which increases the minimum pull on the armature during the AC cycle.[1]

A solid-state relay uses a thyristor or other solid-state switching device, activated by the control signal, to switch the controlled load, instead of a solenoid. An optocoupler (a light-emitting diode (LED) coupled with a photo transistor) can be used to isolate control and controlled circuits.

2.5.3: POLE AND THROW

Fig 2.10: Circuit symbols of relays

Since relays are switches, the terminology applied to switches is also applied to relays. A relay will switch one or more poles, each of whose contacts can be thrown by energizing the coil in one of three ways:

Normally-open (NO) contacts connect the circuit when the relay is activated; the circuit is disconnected when the relay is inactive. It is also called a Form A contact or "make" contact.

Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the circuit is connected when the relay is inactive. It is also called a Form B contact or "break" contact.

Change-over (CO), or double-throw (DT), contacts control two circuits: one normally-open contact and one normally-closed contact with a common terminal. It is also called a Form C contact or "transfer" contact ("break before make"). If this type of contact utilizes a make before break" functionality, then it is called a Form D contact.

The following designations are commonly encountered:

SPST Single Pole Single Throw. These have two terminals which can be connected or disconnected. Including two for the coil, such a relay has four terminals in total. It is ambiguous whether the pole is normally open or normally closed. The terminology "SPNO" and "SPNC" is sometimes used to resolve the ambiguity.

SPDT Single Pole Double Throw. A common terminal connects to either of two others. Including two for the coil, such a relay has five terminals in total. DPST Double Pole Single Throw. These have two pairs of terminals. Equivalent to two SPST switches or relays actuated by a single coil. Including two for the coil, such a relay has six terminals in total. The poles may be Form A or Form B (or one of each).

DPDT Double Pole Double Throw. These have two rows of change-over terminals. Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has eight terminals, including the coil.

CHAPTER 3: DESIGN

3.1: HARDWARE DESIGN

3.1.1: POWER SUPPLY

IC1 D1 7812

IC1 7805 9V

+12V

+5V

230AC C1 C2 C3 C4

D2

Fig 3.1: 5V and 12V Regulated Power Supply

3.1.1.1: PARTS LIST


SEMICONDUCTORS IC1 IC2 D1& D2 7812 Regulator IC 7805 Regulator IC 1N4007 Rectifier Diodes 1 1 2

CAPACITORS C1 C2 to C4 MISCELLANEOUS X1 230V AC Pri,12-0-12 1Amp Sec Transformer 1 1000 f/25V Electrolytic 0.1F Ceramic Disc type 1 3

3.1.1.2: CIRCUIT DESCRIPTION

A dc power supply which maintains the output voltage constant irrespective of ac mains fluctuations or load variations is known as regulated dc power supply. This laboratory power supply offers excellent line and load regulation and output voltages of +5V & +12 V at output currents up to one amp.

Step-down Transformer: The transformer rating is 230V AC at Primary and 12-0-12V, 1Ampers across secondary winding. This transformer has a capability to deliver a current of 1Ampere, which is more than enough to drive any electronic circuit or varying load. The 12VAC appearing across the secondary is the RMS value of the waveform and the peak value would be 12 x 1.414 = 16.8 volts. This value limits our choice of rectifier diode as 1N4007, which is having PIV rating more than 16Volts.

Rectifier Stage: The two diodes D1 & D2 are connected across the secondary winding of the transformer as a full-wave rectifier. During the positive half-cycle of secondary voltage, the end A of the secondary winding becomes positive and end B negative. This makes the diode D1 forward biased and diode D2 reverse biased. Therefore diode D1 conducts while diode D2 does not. During the negative half-cycle, end A of the secondary winding becomes negative and end B positive. Therefore diode D2 conducts while diode D1 does not. Note that

current across the center tap terminal is in the same direction for both half-cycles of input ac voltage. Therefore, pulsating dc is obtained at point C with respect to Ground.

Filter Stage: Here Capacitor C1 is used for filtering purpose and connected across the rectifier output. It filters the ac components present in the rectified dc and gives steady dc voltage. As the rectifier voltage increases, it charges the capacitor and also supplies current to the load. When capacitor is charged to the peak value of the rectifier voltage, rectifier voltage starts to decrease. As the next voltage peak immediately recharges the capacitor, the discharge period is of very small duration. Due to this continuous charge-discharge-recharge cycle very little ripple is observed in the filtered output. Moreover, output voltage is higher as it remains substantially near the peak value of rectifier output voltage. This phenomenon is also explained in other form as: the shunt capacitor offers a low reactance path to the ac components of current and open circuit to dc component. During positive half cycle the capacitor stores energy in the form of electrostatic field. During negative half cycle, the filter capacitor releases stored energy to the load.

Voltage Regulation Stage: Across the point D and Ground there is rectified and filtered dc In the present circuit KIA 7812 three terminal voltage regulator IC is used to get +12V and KIA 7805 voltage regulator IC is used to get +5V regulated dc output. In the three terminals, pin 1 is input i.e., rectified & filtered dc is connected to this pin. Pin 2 is common pin and is grounded. The pin 3 gives the stabilized dc output to the load. The circuit shows two more decoupling capacitors C2 & C3, which provides ground path to the high frequency noise signals. Across the point E and F with respect to ground +5V & +12V stabilized or regulated dc output is measured, which can be connected to the required circuit.

3.1.2: BUFFER, DRIVER AND SWITCHING MODULE

Fig 3.2: Buffer, Driver and Switching Module

3.1.2.1: PARTS LIST SEMICONDUCTORS IC1 4050 INVERTER) IC2 RESISTORS R1 to R5 R6 to R7 DIODES D1to D5 D6 to D7 MISCELLANEOUS RL1-RL2 12 V, 700 Ohm DPDT Reed Relays 2 1N4148 SIGNAL Diodes Indicator LEDs 5 5 220 Ohm Watt Carbon Resistors 2.2 K Ohm Watt Carbon Resistors 5 2 2004 DARLINGTON ARRY 1 HEX BUFFER/CONVERTER(NON- 1

3.1.2.1: CIRCUIT DESCRIPTION

The Hex Buffer/Inverter IC1s working voltage of +5V is applied at pin-1 and five control signals are applied at input pins 3, 5, 7, 9 & 11. Thus the signal supplying circuit [i.e. MICROCONTROLLER] is isolated from this Buffer & Driver circuit. Further the grounding resistors R1 to R5 prevents the abnormal voltage levels passing inside the IC1. The buffered outputs are acquired at pins 2, 4, 6, 10, & 12. Thus the varying input is further stabilized and fed to signal diodes [D1 to D5]. As the load is inductive, there is a chance of producing back e.m.f. So to cope with this back e.m.f, signal diodes are used. But this signal level is not strong enough to drive the low impedance relay. So, IC2 Darlington driver is used. Its working voltage is +12 V and only five input/output pins are used. The output signal from the Darlington driver IC is strong enough to actuate two relays.

3.1.3: MICROCONTROLLER

40 30 pF 19

+Vcc
XTAL1 P0.7 32 P0.6 33 P0.5 34 AD7 AD6 AD5 AD4 AD3 230 AC

X1

D1 & D2

R1 C1 D3 C2

MHz

18 XTAL2

P0.4 35 P0.3 36

29 PSEN 30 ALE 31 EA P1.7 P1.6 P1.5 8 7 6 5 4

PORT 0

8 x 2.2 K

FD/63V

89C51

P1.4 P1.3

17 P3.7 P2.7 28 16 P3.6 P2.6 27 15 P3.5 14 P3.4 13 P3.3 VSS 12 P3.2 P2.5 26 P2.4 25 P2.3 24

PORT 1
A15 A14 A13 A12 A11

WR

T1

T0

T1

T3

T0

PORT 2

Fig 3.3: Microcontroller circuit

3.1.3.1: PARTS LIST

X1 IC1

12-0-12V Transformer 7805 Regulator IC

1 1 2 1 1

D1 & D2 1N4007 Rectifier Diode D3 R1 C1 Red Indicator LED 100 K Carbon Resistor 1000MFD/25V Electrolytic Capacitor C2 & C3 0.1F Ceramic Capacitor

3.1.3.2: CIRCUIT DESCRIPTION

The mother board of 89C51 has following sections: Power Supply, 89C51 IC, Oscillator, Reset Switch & I/O ports. Let us see these sections in detail.

POWER SUPPLY: This section provides the clean and harmonic free power to IC to function properly. The output of the full wave rectifier section, which is built using two rectifier diodes, is given to filter capacitor. The electrolytic capacitor C1 filters the pulsating dc into pure dc and given to Vin pin-1 of regulator IC 7805.This three terminal IC regulates the rectified pulsating dc to constant +5 volts. C2 & C3 provides ground path to harmonic signals present in the inputted

voltage. The Vout pin-3 gives constant, regulated and spikes free +5 volts to the mother board.

The allocation of the pins of the 89C51 follows a U-shape distribution. The top left hand corner is Pin 1 and down to bottom left hand corner is Pin 20. And the bottom right hand corner is Pin 21 and up to the top right hand corner is Pin 40. The Supply Voltage pin Vcc is 40 and ground pin Vss is 20.

OSCILLATOR: If the CPU is the brain of the system then the oscillator, or clock, is the heartbeat. It provides the critical timing functions for the rest of the chip. The greatest timing accuracy is achieved with a crystal or ceramic resonator. For crystals of 12 MHz, the recommended capacitor values should be in the range of 30pF.

Across the oscillator input pins 18 & 19 a crystal of 12MHz is connected. The two ceramic disc type capacitors of value 30pF are connected across crystal and ground stabilize the oscillation frequency generated by crystal.

I/O PORTS: Port 0 is interfaced with the LCD. Port 1 is output port. Port 2 is input port and Port 3 is interrupt port.

3.1.4: RF TRANSMITTER

L2

+Vcc

L1

C5

C7

C6 X1 C7 R3 330K
T1

R6 C3 C4

C2 0.00
T2

R4 ASIC

C1 R5 R2 R1

Gnd

Fig 3.4: Circuit diagram of RF Transmitter

The RF transmitter is built around the ASIC and common passive and active components, which are very easy to obtain from the material shelf. The circuit works on Very High Frequency band with wide covering range. The Carrier frequency is 35 MHz and Data frequencies are 17 MHz, 19 MHz,22 MHz & 25 MHz. It should be noted that ASIC or Application Specific Integrated Circuit is proprietary product and data sheet or pin details or working principles are not readily available to the user.

ASIC: Application Specific Integrated Circuit [ASIC] is another option for embedded hardware developers. The ASIC needs to be custom-built for a specific application, so it is costly. If the embedded system being designed is a consumer item and is likely to be sold in

large quantities, then going the ASIC route is the best option, as it considerably reduces the cost of each unit. In addition, size and power consumption will also be reduced. As the chip count (the number of chips on the system) decreases, reliability increases.

If the embedded system is for the mass market, such as those used in CD players, toys, and mobile devices, cost is a major consideration. Choosing the right processor, memory devices, and peripherals to meet the functionality and performance requirements while keeping the cost reasonable is of critical importance. In such cases, the designers will develop an Application Specific Integrated Circuit or an Application Specific Microprocessor to reduce the hardware components and hence the cost. Typically, a developer first creates a prototype by writing the software for a general-purpose processor, and subsequently develops an ASIC to reduce the cost.

Oscillator: An electronic device that generates sinusoidal oscillations of desired frequency is known as a sinusoidal oscillator. Although we speak of an oscillator as generating a frequency, it should be noted that it does not create energy, but merely acts as an energy converter. It receives d.c. energy and changes it into a.c energy of desired frequency. The frequency of oscillations depends upon the constants of the device.

A circuit which produces electrical oscillations of any desired frequency is known as an oscillatory circuit or tank circuit. A simple oscillatory circuit consists of a capacitor (C) and inductance coil (L) in parallel. This electrical system can produce electrical oscillations of frequency determined by the values of L and C. The sequence of charge and discharge results in alternating motion of electrons or an oscillating current. The energy is alternately stored in the electric field of the capacitor and the magnetic field of the inductance coil. This intercharge of energy between L and C is repeated over and again resulting in the production of oscillations.

In order to obtain continuous undamped a.c. output from the tank circuit, it is necessary to supply the correct amount of power to the circuit. The most practical way to do

this is to supply d.c. power to some device which should convert it to necessary a.c. power for supply to the tank circuit. This can be achieved by employing a transistor circuit. Because of its ability to amplify, a transistor is very efficient energy converter i.e. it converts d.c. power to a.c. power. If the damped oscillations in the tank circuit are applied to the base of transistor, it will result in an amplified reproduction of oscillations in the collector circuit. Because of this amplification more energy is available in the collector circuit than in the base circuit. If a part of this collector-circuit energy is feedback by some means to the base circuit in proper phase to aid the oscillations in the tank circuit, then its losses will be overcome and continuous undamped oscillations will occur.

Hartley Oscillator is very popular and is commonly used as a local oscillator in radio receivers. It has two main advantages viz., adaptability to a wide range of frequencies and is easy to tune.

The RF transmitter is built around the common passive and active components, which are very is to obtain from the material shelf. The circuit works on Very High Frequency band with wide covering range.

3.1.4.1: PARTS LIST

SEMICONDUCTORS: IC T1 T2 RESISTORS: R1 & R2 2.7 K Ohm Watt 2 ASIC BC 547 NPN Transistor BF 494 NPN Transistor 1 1 1

R3 & R6 R4 R5 CAPACITORS: C1, C2 C3 & C7 C4 C5 & C6 MISCELLANEOUS: X1 S1 to S4 L1 L2

330 K Ohm Watt 1 K Ohm Watt 47 K Ohm Watt

2 1 1

0.001 Pico Farad Capacitor 0.022 Pico Farad Capacitor 4.7 Pico Farad Capacitor 0.01 Micro Farad Capacitor

2 2 1 2

1.44 MHz Crystal ON/OFF SWITCHES RF Coil 200Mh Aerial or Telescopic Antenna

1 4 1 1

3.1.4.2: CIRCUIT DESCRIPTION

The ASIC Transmitter IC has four inputs and only one output pin. The four inputs are for the frequency range of 17 KHz, 19 KHz, 22 KHz and 25 KHz and four switches are provided for each range. When any one switch is selected, that frequency is added to the Transmitter circuit as data frequency and transmitted in the air. The Crystal X1 with two coupling capacitor provides the working oscillator frequency to the circuit. The Capacitors C6 and C7 are to stabilize the crystal oscillator frequency.

The ASIC output is added to the transmitter circuits oscillator transistor T1s base. The data frequency is added with carrier frequency 35 MHz and aired for transmitting purpose. The transistor T1 is heart of the Hartely Oscillator and oscillates at carrier frequency

of 35 MHz along with tuned circuit formed by coil L1 and capacitor C4. The Data frequency is fed to T1 on base through resistors R4 and R5. Capacitors C1 and C3 and for stabilizing the tuned circuit along with resistor R3.

To increase the range of the circuit, transmitting signals must be strong enough to travel the long distance [i.e., upto 100 meters in this prototype]. So the generated signals are made strong by amplifying to certain level with the help of Transistor T2 and associated circuit.

The Radio frequency thus generated is fed to power-amplifier transistor T2 on base terminal. The resistor R6 provides the bias voltage to T2 and capacitors C5 & C7 removes the noise and harmonics present in the circuit. The antenna coil L2 transmits the radio frequency in the air.

3.1.5: RF RECEIVER
+Vcc

R6

R7 C1 L1 7 6 5 4 3 2 1

R9

T2 C7

R8

C3

ASIC
8 9 10 11 12 13 14 +Vcc

T1 C6 R9 C4 R5 T2 R8

Fig 3.5: Circuit Diagram of RF Receiver

3.1.5.1: PARTS LIST:

SEMICONDUCTORS: IC T1 ASIC BC 547 NPN Transistor 1 1

T2 T3&T4 RESISTORS: R1 & R2 R3 & R6 R4 R5 R7 R8 R9 CAPACITORS: C1, C2 C3 & C7 C4 C5 & C6

BF 494 NPN Transistor BC 548 NPN Transistor

4 8

270 K Ohm Watt 220 Ohm Watt 2.2 K Ohm Watt 2.2 M Ohm Watt 10 K Ohm Watt 100 Ohm Watt 560 Ohm Watt

2 2 1 1 1 4 4

0.001 Pico Farad Capacitor 0.022 Pico Farad Capacitor 4.7 Pico Farad Capacitor 0.01 Micro Farad Capacitor

2 2 1 2

L1

RF Coil 200mH

3.1.5.2: CIRCUIT DESCRIPTION:

This circuit is built around the ASIC i.e., Application Specific Integrated Circuit, hence less circuitry is observed. The Radio Frequency tuned circuit has 35 MHz carrier frequency with four options viz., 17Khz, 19Khz, 22KHz and 25KHz.

The transmitted signals are received on coil L1 which acts as receiver antenna. The oscillator transistor removes the received signals from 35MHz carrier frequency and fed to ASIC. The tank circuit formed by C1 and L1 gives the carrier frequency range. The current limiting resistor R1 and bypass capacitor C5 stabilizes the oscillator. The resistor R2, R3 and R4 provide the biasing voltage to the oscillator transistor T1. Capacitors C2 and C3 are there to bypass the noise and harmonics present in the received signals. Through coupling capacitor C7 output of the RF Receiver is fed to ASIC.

The ASIC manipulates the received signal and gives out four channels as output viz., 17KHz, 19KHz, 22KHz and 25KHz. Each channel is amplified by pre-amplifier transistor T2 along with bias resistor R9. The output of the pre-amplifier transistor is fed to relay driver stage to activate the respective relay ON. The Darlington pair T3 and T4 are arranged in driver stage to drive the low impedance relay.

3.2: SOFTWARE DESIGN

The microcontroller was coded in embedded C using KEIL MICROVISION IDE. The source code is given below

#include<stdio.h> #include<at89x51.h> // header file for atmel 89c51

sfr port3 = 0xa0;//port2 sfr port2 = 0xb0;//port3 sfr port1 = 0x80;//port0

sbit rs = port3 ^ 5; sbit rw = port3 ^ 6; sbit e = port3 ^ 7;

void display1(); // FUNCTION FOR NORMAL VEHICLE void display2(); //FUNCTION FOR THEFTED VEHICLE

void displayset();

void command() // CONTROL BITS FOR LCD { rs = 0; rw = 0; e = 1; e = 0; }

void datawrt() // CONTROL BITS FOR LCD {

rs = 1; rw = 0; e = 1; e = 0; }

void delay() { unsigned int i; for ( i = 0; i < 6000 ; i++ ) ; }

void main() { unsigned char temp;

displayset();

while(1) { temp = port2; if ( temp == 0xfe ) display1(); else if ( temp == 0xfd ) display2(); void displayset() {

port3 = 0x00; port1 = 0x00;

port1 = 0x38;// 1 command();

delay(); port1 = 0x0e; command(); delay(); port1 = 0x01; command(); delay(); port1 = 0x80; command(); delay(); port1 = 0x06; command(); delay(); }

void display1() { displayset(); port1 = 'N'; datawrt(); delay(); port1 = 'O'; datawrt(); delay(); port1 = 'R'; datawrt(); delay(); port1 = 'M '; datawrt(); delay(); port1 = 'A'; datawrt(); delay(); port1 = 'L';

datawrt(); delay(); port1 = ' '; datawrt(); delay(); port1 = 'V'; datawrt(); delay(); port1 = 'E '; datawrt(); delay(); port1 = 'H'; datawrt(); delay(); port1 = ' I'; datawrt(); delay(); port1 = ' C'; datawrt(); delay(); port1 = ' L'; datawrt(); delay(); port1 = ' E'; datawrt(); delay();

} void display2() { displayset(); port1 = 'T'; datawrt(); delay();

port1 = 'H'; datawrt(); delay(); port1 = 'E'; datawrt(); delay(); port1 = 'F'; datawrt(); delay(); port1 = 'T'; datawrt(); delay(); port1 = 'E'; datawrt(); delay(); port1 = 'D; datawrt(); delay(); port1 = ' '; datawrt(); delay(); port1 = 'V'; datawrt(); delay(); port1 = 'E'; datawrt(); delay(); port1 = H datawrt(); delay(); port1 = 'I'; datawrt(); delay(); port1 = 'C';

datawrt(); delay(); port1 = 'L'; datawrt(); delay(); port1 = 'E'; datawrt(); delay();

Potrebbero piacerti anche