story of my life

Essay by supriya28University, Master'sA, October 2014

download word file, 24 pages 0.0

ENERGY THEFY DETECTION

Submitted to

AMITY UNIVERSITY RAJASTHAN

In partial fulfillment of the requirements for the award of Degree of Bachelor of Technology

in

Electronics and Communication Engineering

By

MONIKA RAJPUT (A2040108055)

MOHNISH KAUSHIK (A20405108056)

NANCY MANDLA (A20405108057)

SUPRIYA BOHRA (A20405108094)

Under the guidance of

Mr. Ashwani Yadav

Department of Computer Science Engineering

AMITY SCHOOL OF ENGINEERING AND TECHNOLOGY

AMITY UNIVERSITY RAJASTHAN

DECLARATION

We, Monika Rajput, Mohnish Kaushik, Nancy Mandla and Supriya Bohra, students of B.Tech(ECE) hereby declare that the project titled "Energy Theft Detection" which is submitted by us to Department of Electronics and Communications Engineering, Amity School of Engineering and Technology, Amity University Rajasthan, in partial fulfillment of requirement for the award of the degree of Bachelor of Technology in ECE, has not been previously formed the basis for the award of any Degree, or other similar title or recognition.

Jaipur

Date: 22/05/12

Name and signature of Student

Monika Rajput

Mohnish Kaushik

Nancy Mandla

Supriya Bohra

CERTIFICATE

On the basis of declaration submitted by Monika Rajput, Mohnish Kaushik, Nancy Mandla and Supriya Bohra, students of B.Tech

ECE hereby certify that the project titled "Energy Theft Detection", which is submitted to Department of Electronics & Communication, Amity School of Engineering and Technology, Amity University Rajasthan in partial fulfillment of the requirement for the award of the degree of Bachelor of Technology in ELECTRONICS & COMMUNICATION ENGINEERING, is an original contribution with existing knowledge and faithful record of work carried out by them under my guidance and supervision.

To the best of my knowledge this work has not been submitted in part or full for any

Degree or Diploma to this University or elsewhere.

Jaipur

Date : Under guidance of

Mr. Ashwani Yadav

Department of CSE Amity School of Engineering and Technology Amity University Rajasthan

4

ACKNOWLEDGEMENT

We would like to express our sincere gratitude to our project guide Mr. Ashwani Yadav for giving us the opportunity to work on this topic. It would never be possible for us to take this project to this level without his innovative ideas and his relentless support and encouragement.We would also like to thank our colleagues and friends who volunteered to help us in this project with their technical knowledge and skills. Lastly, we would like to thank our faculty members and Director Sir, for all their tireless efforts in teaching us the basics of engineering in every possible way.

ABSTRACT

Radio-frequency identification (RFID) is an automatic identification method wherein the data stored on RFID tags or transponders is remotely retrieved. The RFID tag is a device that can be attached to or incorporated into a product, animal or person for identification and tracking using radio waves. Some tags can be read from several meters away, beyond the line of sight of the reader. RFID technology is used in vehicle parking systems of malls and buildings. The system normally consists of a vehicle counter, sensors, display board, gate controller, RFID tags and RFID reader. Presented here is an automatic vehicle parking system using AT89S52 microcontroller. It works when some vehicle come to the gate, the sensor detects it and LCD displays a message. You can display RFID tag to the RFID reader, if it is a valid card it will open the gate to pass your car and close after a while. Rs 100 are deducted from the card and balance is display on the LCD. If you have zero balance, it will request you to charge your card. After payment the card is charged. It also display total number of vehicles parked. It updates the database again if a car exits.

CONTENTS

Introduction

Introduction to RFID..…………………………….……………………………8

What is RFID………..……………………………………………………......9

RFID

Radio Frequency Identification…………………………………………….11

Operation…………………………………………………………………….12

Hardware

Components of RFID………………………………………………………..16

Hardware Description………………………………………………….…...18

Power Supply..…………………………………….……………...….….…...20

Transformer…………………………………………………………………21

8051 Microcontroller……..…………………………………………………34

16x2 Character LCD……………………………….………………………..........39

Software

About Keil uVision 3….………………………………………….…….……41

Pro51 Burner Software……………………………………………….…….42

Circuit Diagram…………………………………………………………………………..44

Project Description

System Fundamentals………………………….....…………………………45

Programming

C Coding……………………………………………………………………………………………………55

Applications

Typical application of RFID……………………………………………………………..………..72

Common Problems……………………………………………………………………………………72

Problems Faced……………………………………………………………………………………..…73

Future Prospects of RFID……….……………………………………………..………………….73

Conclusion………………………………………………………………………………..…………………….74

References

EMBEDDED SYSTEMS: An Introduction

An embedded system is a computer system designed for specific control functions within a larger system, often with real-time computingconstraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. Embedded systems control many devices in common use today. Embedded systems contain processing cores that are typically either microcontrollers or digital signal processors (DSP). The key characteristic, however, is being dedicated to handle a particular task. Since the embedded system is dedicated to specific tasks, design engineers can optimize it to reduce the size and cost of the product and increase the reliability and performance. Some embedded systems are mass-produced, benefiting from economies of scale.

Physically, embedded systems range from portable devices such as digital watches and MP3 players, to large stationary installations liketraffic lights, factory controllers, or the systems controlling nuclear power plants. Complexity varies from low, with a single microcontrollerchip, to very high with multiple units, peripherals and networks mounted inside a large chassis or enclosure. Embedded systems span all aspects of modern life and there are many examples of their use.

Telecommunications systems employ numerous embedded systems from telephone switches for the network to mobile phones at the end-user. Computer networking uses dedicated routers and network bridges to route data. Consumer electronics include personal digital assistants (PDAs), mp3 players, mobile phones, videogame consoles, digital cameras, DVD players, GPS receivers, and printers. Many household appliances, such as microwave ovens, washing machines and dishwashers, are including embedded systems to provide flexibility, efficiency and features. Advanced HVAC systems use networked thermostats to more accurately and efficiently control temperature that can change by time of day and season. Home automation uses wired- and wireless-networking that can be used to control lights, climate, security, audio/visual, surveillance, etc., all of which use embedded devices for sensing and controlling.

Transportation systems from flight to automobiles increasingly use embedded systems. New airplanes contain advanced avionics such as inertial guidance systems and GPS receivers that also have considerable safety requirements. Various electric motors - brushless DC motors, induction motors and DC motors - are using electric/electronic motor controllers. Automobiles, electric vehicles, and hybrid vehicles are increasingly using embedded systems to maximize efficiency and reduce pollution. Other automotive safety systems include anti-lock braking system (ABS),Electronic Stability Control (ESC/ESP), traction control (TCS) and automatic four-wheel drive.

Medical equipment is continuing to advance with more embedded systems for vital signs monitoring, electronic stethoscopes for amplifying sounds, and various medical imaging (PET, SPECT, CT, MRI) for non-invasive internal inspections.

Embedded systems are especially suited for use in transportation, fire safety, safety and security, medical applications and life critical systems as these systems can be isolated from hacking and thus be more reliable. For fire safety, the systems can be designed to have greater ability to handle higher temperatures and continue to operate. In dealing with security, the embedded systems can be self-sufficient and be able to deal with cut electrical and communication systems. [1]

In addition to commonly described embedded systems based on small computers, a new class of miniature wireless devices called motes are quickly gaining popularity as the field of wireless sensor networking rises. Wireless sensor networking, WSN, makes use of miniaturization made possible by advanced IC design to couple full wireless subsystems to sophisticated sensors, enabling people and companies to measure a myriad of things in the physical world and act on this information through IT monitoring and control systems. These motes are completely self contained, and will typically run off a battery source for many years before the batteries need to be changed or charged.

Characteristics

1. Embedded systems are designed to do some specific task, rather than be a general-purpose computer for multiple tasks. Some also have real-timeperformance constraints that must be met, for reasons such as safety and usability; others may have low or no performance requirements, allowing the system hardware to be simplified to reduce costs.

2. Embedded systems are not always standalone devices. Many embedded systems consist of small, computerized parts within a larger device that serves a more general purpose.

3. The program instructions written for embedded systems are referred to as firmware, and are stored in read-only memory or Flash memory chips. They run with limited computer hardware resources: little memory, small or non-existent keyboard or screen.

User interface

Embedded systems range from no user interface at all - dedicated only to one task - to complex graphical user interfaces that resemble modern computer desktop operating systems. Simple embedded devices use buttons, LEDs, graphic or character LCDs (for example popular HD44780 LCD) with a simple menu system.

More sophisticated devices which use a graphical screen with touch sensing or screen-edge buttons provide flexibility while minimizing space used: the meaning of the buttons can change with the screen, and selection involves the natural behavior of pointing at what's desired. Handheld systems often have a screen with a "joystick button" for a pointing device.

Some systems provide user interface remotely with the help of a serial (e.g. RS-232, USB, I²C, etc.) or network (e.g. Ethernet) connection. This approach gives several advantages: extends the capabilities of embedded system, avoids the cost of a display, simplifies BSP, allows us to build rich user interface on the PC. A good example of this is the combination of an embedded web server running on an embedded device (such as an IP camera) or a network routers. The user interface is displayed in a web browser on a PC connected to the device, therefore needing no bespoke software to be installed.

Tools

As with other software, embedded system designers use compilers, assemblers, and debuggers to develop embedded system software. However, they may also use some more specific tools:

In circuit debuggers or emulators (see next section).

Utilities to add a checksum or CRC to a program, so the embedded system can check if the program is valid.

For systems using digital signal processing, developers may use a math workbench such as Scilab / Scicos, MATLAB / Simulink, EICASLAB, MathCad, Mathematica,or FlowStone DSP to simulate the mathematics. They might also use libraries for both the host and target which eliminates developing DSP routines as done in DSPnano RTOS and Unison Operating System.

A model based development tool like VisSim lets you create and simulate graphical data flow and UML State chart diagrams of components like digital filters, motor controllers, communication protocol decoding and multi-rate tasks. Interrupt handlers can also be created graphically. After simulation, you can automatically generate C-code to the VisSim RTOS which handles the main control task and preemption of background tasks, as well as automatic setup and programming of on-chip peripherals.

Custom compilers and linkers may be used to improve optimisation for the particular hardware.

An embedded system may have its own special language or design tool, or add enhancements to an existing language such as Forth or Basic.

Another alternative is to add a real-time operating system or embedded operating system, which may have DSP capabilities like DSPnano RTOS.

Modeling and code generating tools often based on state machines

Software tools can come from several sources:

Software companies that specialize in the embedded market

Ported from the GNU software development tools

Sometimes, development tools for a personal computer can be used if the embedded processor is a close relative to a common PC processor

As the complexity of embedded systems grows, higher level tools and operating systems are migrating into machinery where it makes sense. For example, cellphones, personal digital assistantsand other consumer computers often need significant software that is purchased or provided by a person other than the manufacturer of the electronics. In these systems, an open programming environment such as Linux, NetBSD, OSGi or Embedded Java is required so that the third-party software provider can sell to a large market.

Processors in embedded systems

Embedded processors can be broken into two broad categories: ordinary microprocessors (μP) and microcontrollers (μC), which have many more peripherals on chip, reducing cost and size. Contrasting to the personal computer and server markets, a fairly large number of basic CPU architectures are used; there are Von Neumann as well as various degrees of Harvard architectures, RISC as well as non-RISC and VLIW; word lengths vary from 4-bit to 64-bits and beyond (mainly in DSP processors) although the most typical remain 8/16-bit. Most architectures come in a large number of different variants and shapes, many of which are also manufactured by several different companies.

Microprocessor

A microprocessor incorporates the functions of a computer's central processing unit (CPU) on a single integrated circuit, (IC) or at most a few integrated circuits. It is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and provides results as output. It is an example of sequential digital logic, as it has internal memory. Microprocessors operate on numbers and symbols represented in the binary numeral system.

The advent of low-cost computers on integrated circuits has transformed modern society. General-purpose microprocessors in personal computers are used for computation, text editing, multimedia display, and communication over the Internet. Many more microprocessors are part of embedded systems, providing digital control of a myriad of objects from appliances to automobiles to cellular phones and industrial process control.

Thousands of items that were traditionally not computer-related include microprocessors. These include large and small household appliances, cars (and their accessory equipment units), car keys, tools and test instruments, toys, light switches/dimmers and electrical circuit breakers, smoke alarms, battery packs, and hi-fi audio/visual components (from DVD players to phonograph turntables.) Such products as cellular telephones, DVD video system and ATSC HDTV broadcast system fundamentally require consumer devices with powerful, low-cost, microprocessors. Increasingly stringent pollution control standards effectively require automobile manufacturers to use microprocessor engine management systems, to allow optimal control of emissions over widely varying operating conditions of an automobile. Non-programmable controls would require complex, bulky, or costly implementation to achieve the results possible with a microprocessor. A microprocessor control program can be easily tailored to different needs of a product line, allowing upgrades in performance with minimal redesign of the product. Different features can be implemented in different models of a product line at negligible production cost.

Microprocessor control of a system can provide control strategies that would be impractical to implement using electromechanical controls or purpose-built electronic controls. For example, an engine control system in an automobile can adjust ignition timing based on engine speed, load on the engine, ambient temperature, and any observed tendency for knocking - allowing an automobile to operate on a range of fuel grades.

Microcontroller

A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a single integrated circuit containing a processor core, memory, and programmable input/output peripherals. Program memory in the form of NOR flash or OTP ROM is also often included on chip, as well as a typically small amount of RAM. Microcontrollers are designed for embedded applications, in contrast to the microprocessors used in personal computers or other general purpose applications.

Microcontrollers are used in automatically controlled products and devices, such as automobile engine control systems, implantable medical devices, remote controls, office machines, appliances, power tools, toys and other embedded systems. By reducing the size and cost compared to a design that uses a separate microprocessor, memory, and input/output devices, microcontrollers make it economical to digitally control even more devices and processes. Mixed signal microcontrollers are common, integrating analog components needed to control non-digital electronic systems. Some microcontrollers may use four-bit words and operate at clock rate frequencies as low as 4 kHz, for low power consumption (milliwatts or microwatts). They will generally have the ability to retain functionality while waiting for an event such as a button press or other interrupt; power consumption while sleeping (CPU clock and most peripherals off) may be just nanowatts, making many of them well suited for long lasting battery applications. Other microcontrollers may serve performance-critical roles, where they may need to act more like a digital signal processor.

A microcontroller can be considered a self-contained system with a processor, memory and peripherals and can be used as an embedded system.[5]The majority of microcontrollers in use today are embedded in other machinery, such as automobiles, telephones, appliances, and peripherals for computer systems. While some embedded systems are very sophisticated, many have minimal requirements for memory and program length, with no operating system, and low software complexity. Typical input and output devices include switches, relays, solenoids, LEDs, small or custom LCDdisplays, radio frequency devices, and sensors for data such as temperature, humidity, light level etc. Embedded systems usually have no keyboard, screen, disks, printers, or other recognizable I/O devices of a personal computer, and may lack human interaction devices of any kind.

Interrupts in Microcontroller

Microcontrollers must provide real time (predictable, though not necessarily fast) response to events in the embedded system they are controlling. When certain events occur, an interrupt system can signal the processor to suspend processing the current instruction sequence and to begin an interrupt service routine (ISR, or "interrupt handler"). The ISR will perform any processing required based on the source of the interrupt before returning to the original instruction sequence. Possible interrupt sources are device dependent, and often include events such as an internal timer overflow, completing an analog to digital conversion, a logic level change on an input such as from a button being pressed, and data received on a communication link. Where power consumption is important as in battery operated devices, interrupts may also wake a microcontroller from a low power sleep state where the processor is halted until required to do something by a peripheral event.

Programs in Microcontroller

Typically microcontroller programs must fit in the available on-chip program memory, since it would be costly to provide a system with external, expandable, memory. Compilers and assemblers are used to convert high-level language and assembler language codes into a compact machine code for storage in the microcontroller's memory. Depending on the device, the program memory may be permanent, read-only memory that can only be programmed at the factory, or program memory may be field-alterable flash or erasable read-only memory.

Manufacturers have often produced special versions of their microcontrollers in order to help the hardware and software development of the target system. Originally these included EPROMversions that have a "window" on the top of the device through which program memory can be erased by ultraviolet light, ready for reprogramming after a programming ("burn") and test cycle. Since 1998, EPROM versions are rare and have been replaced by EEPROM and flash, which are easier to use (can be erased electronically) and cheaper to manufacture.

Other versions may be available where the ROM is accessed as an external device rather than as internal memory, however these are becoming increasingly rare due to the widespread availability of cheap microcontroller programmers.

The use of field-programmable devices on a microcontroller may allow field update of the firmware or permit late factory revisions to products that have been assembled but not yet shipped. Programmable memory also reduces the lead time required for deployment of a new product.

Where hundreds of thousands of identical devices are required, using parts programmed at the time of manufacture can be an economical option. These "mask programmed" parts have the program laid down in the same way as the logic of the chip, at the same time.

A customizable microcontroller incorporates a block of digital logic that can be personalized in order to provide additional processing capability, peripherals and interfaces that are adapted to the requirements of the application. For example, the AT91CAP from Atmel has a block of logic that can be customized during manufacturer according to user requirements.

Other microcontroller features

Microcontrollers usually contain from several to dozens of general purpose input/output pins (GPIO). GPIO pins are software configurable to either an input or an output state. When GPIO pins are configured to an input state, they are often used to read sensors or external signals. Configured to the output state, GPIO pins can drive external devices such as LEDs or motors.

Many embedded systems need to read sensors that produce analog signals. This is the purpose of the analog-to-digital converter (ADC). Since processors are built to interpret and process digital data, i.e. 1s and 0s, they are not able to do anything with the analog signals that may be sent to it by a device. So the analog to digital converter is used to convert the incoming data into a form that the processor can recognize. A less common feature on some microcontrollers is a digital-to-analog converter (DAC) that allows the processor to output analog signals or voltage levels.

A dedicated Pulse Width Modulation (PWM) block makes it possible for the CPU to control power converters, resistive loads, motors, etc., without using lots of CPU resources in tight timer loops.

Universal Asynchronous Receiver/Transmitter (UART) block makes it possible to receive and transmit data over a serial line with very little load on the CPU. Dedicated on-chip hardware also often includes capabilities to communicate with other devices (chips) in digital formats such as I²C and Serial Peripheral Interface (SPI).

Main aim of the project.

The aim of this project, as the title name suggests, is to detect the power theft that occurs in our daily lives. We come across such a situation many times in our daily lives where power and electricity get routed to some other destination through various means like cross-wiring etc. Our idea to detect power

4. CIRCUIT DIAGRAM & WORKING

5. Project Summary

This project consists of mainly two sections. One section consists of energy meter, isolator and receiver + comparator situated on our supply pole and the one consists of energy meter isolator and transmitter, situated in our homes.

The energy meter 1 & 2 can measure the energy by measuring voltage and current. Voltage can measure directly with the help of voltmeter provided on the energy meter but for measuring current it requires a Current transformer (C.T.). The C.T. can measure current by measuring magnetic field induced from a current carrying thick copper wire using a coil. Energy meter consists of four LED's to show the status. One LED (transparent red LED) blinks with a constant time interval. This time interval reduces with increase in LOAD.

The energy meter at our home measures the energy consumed by different LOADs. The output from energy meter (from blinking LED) is given to transmitter section through isolator. Isolator consists of a relay and a driver for switching it by energy meters output. The isolator prevents the transmitter section from high voltage output of energy meter. The isolator output is used to drive one out of four inputs of the transmitter. This signal is decoded using encoder IC HT12E and transmitted using RF transmitter module.

At the pole the energy meter 1 will measure the supplied electric energy to the home by similar method, by measuring voltage and current using C.T. The output of energy meter is fed to the trigger input of the receiver section through isolator. This isolator also consists of a relay and a transistor driver circuit.

The receiver section consists of RF receiver to receive the signal transmitted from the home transmitter section. It consists of various LED's to show the status. LED 5(orange LED) will blink to show proper transmission from transmitter at home to the receiver at pole. If this LED L5 does not blink, it indicates that there is a problem in the RF link between Tx and Rx. LED 4 is by default ON. The triggered input wills ON the LED L3. The next pulse received from the transmitter section OFF LED L3.

Since the energy meter at pole measure the same energy as measured by the home energy meter i.e. the energy delivered to the LOAD (various appliances). The pulse rate of blinking LED's of both energy meters is same. In case of any theft i.e. bypassing the home energy meter or taking energy before our home energy meter the pulse rate of blinking LED of the home energy meter will reduce while the pulse rate of blinking LED at the pole energy meter will remain same. It will lead to continuous ON of LED L3. As LED L3 continuously glows for more than one minute it will switch OFF the relay to cut the supply to the home. At this situation LED L4 turn OFF and LED's L2 and L3 will glow continuously to show the occurrence of fault.

Internal description of the RF Transmitter and Receiver is:-

1) RF Transmitter:-

The RF Tx consists of RF Tx module, an encoder i.e. HT12E, four switches and the transmitting antenna. The energy meter 2 is connected to RF Tx with the help of Isolator. Isolators are nothing but relay circuit consists of a resistor, transistor and an inductor connected to 12V supply and of course relay. RF Tx has four switches viz. S1, S2, S3 and S4. Isolator relay is connected to S4 switch of the RF Tx. The main function of RF Tx is to change the state of LED L4. If the LED is ON it will turn it OFF and if it is OFF it will turn it ON. All the switches is then connected to the encoder HT12E whose output drives the RF Tx module unit and then it is transmitted with the help of an antenna. The transmitter module accepts serial data. The encoder IC takes in parallel data at the TX side packages it into serial format and then transmits it with the help of a RF transmitter module. At the RX end, the decoder IC receives the signal via the RF receiver module, decodes the serial data and reproduces the original data in the parallel format.

Fig: Encoder HT 12E

The 212 encoders are a series of CMOS LSI's for remote control system applications. They are capable of encoding information which consists of N address bits and 12_N data bits. Each address/data input can be set to one of the two logic states. The programmed addresses/data are transmitted together with the header bits via an RF or an infrared transmission medium upon receipt of a trigger signal. The capability to select a TE trigger on the HT12E or a DATA trigger on the HT12A further enhances the application flexibility of the 212 series of encoders. The HT12A additionally provides a 38 kHz carrier for infrared systems.

Note: D8~D11 are all data input and transmission enable pins of the HT12A.

TE is a transmission enable pin of the HT12E.

The 2^12 series of encoders begin a 4-word transmission cycle upon receipt of a transmission enable (TE for the HT12E or D8~D11 for the HT12A, active low). This cycle will repeat itself as long as the transmission enable (TE or D8~D11) is held low. Once the transmission enables returns high the encoder output completes its final cycle and then stops as shown below.

The TX433 wireless RF transmitter uses on/off keying to transmit data to the matching receiver, RX433. The data input "keys" the saw resonator in the transmitter when the input is +3 volts or greater, AM modulating the data onto the 433 MHz carrier. The data is then demodulated by the receiver, which accurately reproduces the original data. The data input is CMOS level Compatible when the unit is run on +5 volts.

When driving with a CMOS input, there must be enough level to achieve at least 3V on the data input, 5V is preferable. This is due to the start-up time of the oscillator needing to be fast to accurately reproduce your data. If the voltage is too low, the oscillator will not start fast enough to accurately reproduce your data, especially at higher data rates. Luckily not much drive is needed, so this should be easy since it is 22K ohms of load. Almost any CMOS output will drive this without any problems. There are some CMOS outputs which have very little drive capability which may not work, so testing the voltage at the data input may be a wise choice if you are having problems.

Fig. 433 MHz Transmitter

2) RF Receiver:-

This section consists of five LED's (four yellow and one orange), RF Rx module, decoder HT 12D, and PIC microcontroller 16F73 and a receiving antenna. Antenna receives the transmitted signal and that received signal is then fed to the RF Rx module whose output is then provided to the decoder HT12D and then to the PIC 16F73.

The receiver shown in Figure also contains just one transistor. It is biased to act as a regenerative oscillator, in which the received antenna signal causes the transistor to switch to high amplification, thereby automatically arranging the signal detection. Next, the 'raw' demodulated signal is amplified and shaped-up by op-amps. The result is a fairly clean digital signal at the output of the receiver. The logic high level is at about 2/3 of the supply voltage, i.e., between 3 V and 4.5 V. The range of the simple system shown in Figures is much smaller than that of more expensive units, mainly because of the low transmit power (approx. 1 mW) and the relative insensitivity and wide-band nature of the receiver. Moreover, amplitude-modulated noise is not suppressed in any way.

The 2^12decoders are a series of CMOS LSI's for remote control system applications. They are paired with Holtek's 2^12series of encoders (refer to the encoder/decoder cross reference table).For proper operation, a pair of encoder/decoder with the same number of addresses and data format should be chosen. The decoders receive serial addresses and data from a programmed 2^12 series of encoders that are transmitted by a carrier using an RF or an IR transmission medium. They compare the serial input data three times continuously with their local addresses. If no error or unmatched

codes are found, the input data codes are decoded and then transferred to the output pins. The VT pin also goes high to indicate a valid transmission. The 2^12 series of decoders are capable of decoding in formations that consist of N bits of address and 12_N bits of data. Of this series, the HT12D is arranged to provide 8 address bits and 4 data bits, and HT12F is used to decode 12 bits of address information.

The 2^12 series of decoders provides various combinations of addresses and data pins in different packages so as to pair with the 2^ 12 series of encoders. The decoders receive data that are transmitted by an encoder and interpret the first N bits of code period as addresses and the last 12_N bits as data, where N is the address code number. A signal on the DIN pin activates the oscillator which in turn decodes the incoming address and data. The decoders will then check the received address three times continuously. If the received address codes all match the contents of the decoder's local address, the 12_N bits of data are decoded to activate the output pins and the VT pin is set high to indicate a valid transmission. This will last unless the address code is incorrect or no signal is received. The output of the VT pin is high only when the transmission is valid. Otherwise it is always low. Of the 2^12 series of decoders, the HT12F has no data output pin but its VT pin can be used as a momentary data output. The HT12D, on the other hand, provides 4 latch type data pins whose data remain unchanged until new data are received.

FIGURE: PIC16F73 BLOCK DIAGRAM

The main function of PIC16F73 is to trip the relay circuit when ever the LED L3 remains ON or OFF for one minute. By tripping the relay we are cutting off the connection of the energy meter 2.

CODING OF TRANSMITTER

int flag = 0;

int counter = 0;

void main()

{

PORTC.bit4=1;

PORTC.bit5=0;

PORTC.bit6=0;

PORTC.bit7=0;

while(1)

{

if(PORTB.bit0==1)

{

while(PORTB.bit0==1)

{

}

if(flag==1)

{

PORTC.bit6=1;

counter = counter+1;

delay_ms(1000);

}

if(flag==0)

{

flag=1;

PORTC.bit5=1;

delay_ms(200);

}

}

if(PORTC.bit0==1||PORTC.bit3==1)

{

while(PORTC.bit0==1||PORTC.bit3==1)

{

}

flag=0;

PORTC.bit5=0;

PORTC.bit6=0;

}

if(counter>4)

{

goto end;

}

}

end:

PORTC.bit4=0;

PORTC.bit5=0;

PORTC.bit6=0;

PORTC.bit7=1;

}

Relays

A relay is usually an electromechanical device that is actuated by an electrical current. The current flowing in one circuit causes the opening or closing of another circuit. Relays are like remote control switches and are used in many applications because of their relative simplicity, long life, and proven high reliability. They are used in a wide variety of applications throughout industry, such as in telephone exchanges, digital computers and automation systems.

How do relays work?

All relays contain a sensing unit, the electric coil, which is powered by AC or DC current. When the applied current or voltage exceeds a threshold value, the coil activates the armature, which operates either to close the open contacts or to open the closed contacts. When a power is supplied to the coil, it generates a magnetic force that actuates the switch mechanism. The magnetic force is, in effect, relaying the action from one circuit to another. The first circuit is called the control circuit; the second is called the load circuit. A relay is usually an electromechanical device that is actuated by an electrical current.

Types of Relays

There are two basic classifications of relays:

Electromechanical Relay

Solid State Relay.

Electromechanical relays have moving parts, whereas solid state relays have no moving parts. Advantages of Electromechanical relays include lower cost, no heat sink is required, multiple poles are available, and they can switch AC or DC with equal ease.

Electromechanical Relays: The y are also known as General Purpose Relay. The general-purpose relay is rated by the amount of current its switch contacts can handle. Most versions of the general-purpose relay have one to eight poles and can be single or double throw. These are found in computers, copy machines, and other consumer electronic equipment and appliances.

Power Relay: The power relay is capable of handling larger power loads - 10-50 amperes or more.

They are usually single-pole or double-pole units.

Contactor: A special type of high power relay, it's used mainly to control high voltages and currents in industrial electrical applications. Because of these high power requirements, contactors always have double-make contacts.

Time-Delay Relay: The contacts might not open or close until some time interval after the coil has been energized. This is called delay-on-operate. Delay-on-release means that the contacts will remain in their actuated position until some interval after the power has been removed from the coil.

A third delay is called interval timing. Contacts revert to their alternate position at a specific interval of time after the coil has been energized.

The timing of these actions may be a fixed parameter of the relay, or adjusted by a knob on the relay itself, or remotely adjusted through an external circuit.

Solid State Relays

These active semiconductor devices use light instead of magnetism to actuate a switch. The light comes from an LED, or light emitting diode. When control power is applied to the device's output, the light is turned on and shines across an open space.

On the load side of this space, a part of the device senses the presence of the light, and triggers a solid state switch that either opens or closes the circuit under control. Often, solid state relays are used where the circuit under control must be protected from the introduction of electrical noises.

Advantages of Solid State Relays include low EMI/RFI, long life, no moving parts, no contact bounce, and fast response. The drawback to using a solid state relay is that it can only accomplish single pole switching.

POWER SUPPLY

Power supply can be defined as electronic equipment, which is a stable source of D.C. power for electronic circuits.

Power supply can be classified into two major categories: -

Unregulated power supply

Regulated power supply

UNREGULATED POWER SUPPLY: -

These power supplies, supply power to the load but do not take into variation of power supply output voltage or current with respect to the change in A.C. mains voltage, load current or temperature variations. In other words, we can say that the output voltage or current of an unregulated power supply changes with the change in A.C.mains voltage, load current and temperature.

A block diagram as shown below can represent unregulated power supply:

BLOCK DIAGRAM OF UNREGULATED POWER SUPPLY A .C. INPUT LOAD RECTIFIER FILTER

REGULATED POWER SUPPLY: -

These power supplies are regulated over the change in source voltage or load current i.e. its output remain stable.

Regulated power supplies are of two types: -

CURRENT REGULATED POWER SUPPLIES

These are constant current supplies in spite of change in load or input voltage.

VOLTAGE REGULATED POWER SUPPLIES

These supplies supply constant output voltage with respect to the variation in load or source input voltage.

Block diagram of a regulated power supply can be given as below:

VL Vdc Vac A.C. INPUT LOAD REGULATOR FILTER RECTIFIER FIER

BLOCK DIAGRAM OF REGULATED POWER SUPPLY UNREGULATED POWER SUPPLY

CIRCUIT OF REGULATED POWER SUPPLY WITH HALF WAVE RECTIFIER AND IC-7809 AS A REGULATOR

OUTPUT

Here diode D1, D2, D3 and D4 forms half wave rectifier. Capacitor C1 is filtering capacitor. IC-7809 is used for voltage regulation. Capacitor C2 is used for bypassing, if any ripples are present then it eliminates those ripples.

As IC-7809 is used so it gives 9v dc regulated voltage ideally. If we take 16 volts transformer then we will get 8.97v at output. Thus voltage is regulated.