Você está na página 1de 48

SMART CARD BASED PREPAID ELECTRICTY BILLING SYSTEM

A PROJECT REPORT Submitted by M.SUJIT(10608057) NAGARAJ.K(10608060) SUKITHARAN V.P(10608149)

In partial fulfillment for the award of the degree Of BACHELOR OF TECHNOLOGY

In INSTRUMENTATION AND CONTROL ENGINEERING

SRM UNIVERSITY KANCHIPURAM APRIL 2012

SRM UNIVERSITY BONAFIDE CERTIFICATE

Certified that this project report SMARTCARD BASED PREPAID ELECTRICTY BILLING is the bonafide work of M.Sujit(10608057), Nagaraj.K(10608060), V.P.Sukitharan(10608149) who carried out the project work under my supervision.

SIGNATURE

SIGNATURE

SUPERVISOR Mr.V.SKrushnasamy Assistant Professor Department of ICE SRM UNIVERSITY KATTANKULATHUR

HEAD OF THE DEPARTMENT Mrs.Vimala Juliet Head of the Department Department of ICE SRM UNIVERSITY KATTANKULATHUR

INTERNAL EXAMINER

EXTERNAL EXAMINER

ACKNOWLEDGEMENT
We sincerely acknowledge in all earnestness, the patronage provided by our Director Dr. C. Muthamizhchelvan, Engineering & Technology, to endeavour this project.

We are very grateful to our guide Mr. V.S KRUSHNASAMY, Asst Prof (O.G), Department of Instrumentation & Control Engineering, who has guided with inspiring dedication, untiring efforts and tremendous enthusiasm in making this project successful and presentable.

We wish to express our deep sense of gratitude and sincere thanks to our Professor and Head of the Department Dr A.Vimala Juliet, PhD, for her encouragement, timely help and advice offered to us.

We extend our gratitude and heartful thanks to all the staff and non-teaching staff of Instrumentation & Control Engineering Department, who extended their kind co-operation by means of valuable suggestions and timely help during the course of this project work.

Abstract
The Electrical supply companies are trying to adopt the electronic measurement of energy consumption data because of reduced manufacturing cost, improved measurement accuracy, increased timely information, miniature size and many other benefits that go well beyond the traditional rotor-plate energy meter type. In this paper with the help of an energy chip, an improved energy metering solution is developed, where automating the progression of measurement through digital wireless communication technique is adopted to get the above benefits along with smooth control. The developed energy meter calculates the total average active power mainly for residential consumers. The hardware circuit accepts single phase voltage and currents as its inputs and provides the output in the form of logic data proportional to the average real power. This data is fed to a remote computer server through the wireless MIWI network that represents the concept of distant wireless metering, practically involving no manpower.

LIST OF CONTENTS

CHAPTER
1. 2.1 2.2 2.3 2.4 2. 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.2 3.2.1 3.2.2 3.2.3 3.2.4 3.2.5 3.3 3.3.1 3.3.2 3.3.3 3.4 3.4.1

TITLE
ABSTRACT INTRODUCTION BLOCK DIAGRAM Block Diagram Explanation Existing System Proposed System MICROCONTROLLER Description Features Pin Configuration Pin Description Working of Microcontroller Programming ADC0808 Description Features Specifications Pin Diagram Applications CURRENT SENSOR Features Specifications Applications IR SENSOR Overview of IR Sensor

PG.NO
1 2 3 5 6 7 8 8 9 10 10 15 19 21 21 22 22 24 27 28 28 28 29 31 31

CHAPTER
3.4.2 3.4.3 3.4.4 3.4.5 3.4.6 3.5 3.6 3.6.1 3.6.2 3.7 3.7.1 3.7.2 3.8

TITLE
Object Detection Using IR Sensor General Description Functional Description Circuit Diagram Working Principle UART VOLTAGE SENSOR Introduction Features LM 7805 VOLTAGE REGULATOR General Description Features MAX 232

PG.NO
31 33 33 34 35 36 38 38 38 39 39 39 40

3.8.1 3.8.2 3.8.3 3.8.4 3.9 3.9.1 3.9.2 4.

Description Block Diagram Features Pin Diagram GSM MODEM Applications GSM Modem Characteristics KEIL COMPLIER CONCLUSION REFERENCES

40 41 42 42 43 43 43 45 47 48

LIST OF FIGURES S.NO TITLE


1. 2. 3. 4. 5. 6. 7 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. Block Diagram of Transmitter Block Diagram of Receiver ATMEL89S52 Pin Diagram ATMEL89S52 Circuit Diagram Block Diagram of ATMEL89S52 Circuit Diagram of ADC0808 ADC0808 Pin Diagram Internal Block Diagram of ADC0808 256R Resistor Network in ADC0808 Current Transformer Block Diagram Response of Current Transformer Principle of IR Sensor IR Sensor Circuit Diagram UART Circuit Diagram of UART Block Diagram of MAX232 MAX232 Pin Diagram

PG.NO
3 4 10 15 17 21 23 24 25 29 30 32 34 36 37 41 42

LIST OF TABLES S.NO


1. 2. 3. 4.

TITLE
Ports of ATMEL89S52 ADC0808 Selector Switches IR Sensor Specifications MAX232 to RS232 Pin Connections

PG.NO
12 25 28 43

CHAPTER 1
INTRODUCTION: Smart cards have achieved a growing acceptance as a powerful tool for security and time management. If a smart card is used along with a controller which can be connected to the energy meter, the concept goes like this... For every unit of electricity consumed, the unit-charge from the card gets reduced simultaneously. When the threshold balance limit of the card is reached or goes below it, the alarm is triggered, in addition a message is sent to the consumers mobile phone, indicating that the card should be recharged. If the balance of the card goes zero, a relay is activated which trips open the supply to the consumer. On recharge of the card, the supply can be restored. The ultimate aim of is to put an end to the queue in the billing counter and to reduce the expenditure towards billing and system monitoring of the electricity board. In this project smart card technique is used for paying electricity bills. The smart card used is a rechargeable card which has an IC which acts as a memory module for storing the current balance status of the card.

CHAPTER 2: 2.1 BLOCK DIAGRAM:


TRANSMITTER SECTION:

Figure 1

RECIEVER SECTION:

Figure 2

2.2 BLOCK

DIAGRAM EXPLANATION: Transmitter Section: Initially power supply is stepped down through current transformer and voltage transformer. Thus stepped down current and voltage is sensed by current and voltage sensor respectively. Since Microcontroller accepts only digital input signal, It is necessary that signal has to be converted into digital form and that is being carried by an ADC. Type of ADC used here is 0808. The number rotations in rotor plate of the energy meter are sensed by an IR sensor. A RFID Reader which reads the Smartcard is interfaced to Microcontroller. Based on the rotations in energy meter the amount in Smartcard is reduced. All the information from the

Microcontroller is converted to Serial signals by a MAX232 and sent to the receiver section through a wireless network. Receiver section: Signal from transmitter is received by receiver and transferred to pc through UART.A GSM modem is programmed in the PC by using Visual Basic Software. It is programmed such that when the balance reaches the threshold amount a message will be sent to mobile by GSM Modem. All the values such as current, voltage and meter reading will be displayed in the pc using the Visual Basic Software. 2.3 EXISTING SYSTEM: In the existing system we have conventional rotor plate type energy meter and the readings are taken manually. These readings are taken by human and no of units are calculated and the bill is prepared manually and entered to pc. In this system we cannot have idea of energy consumed per day. DISADVANTAGES: Human errors will occur frequently in this system. It is not reliable. The information sensed cannot be seen from anywhere using mobile

. 2.4 PROPOSED SYSTEM: In this paper with the help of an energy chip, an improved energy metering solution is developed, where automating the progression of measurement through digital wireless communication technique is adopted to get the above benefits along with smooth control. The developed energy meter calculates the total average active power mainly for residential consumers. The hardware circuit accepts single phase voltage and currents as its inputs and provides the output in the form of logic data proportional to the average real power. This data is fed to a remote computer server through the wireless network that represents the concept of distant wireless metering, practically involving no manpower. This paper also presents a software solution developed for total electrical energy billing and data management system.

CHAPTER 3: 3.1. MICROCONTROLLER:


3.1.1 Description: The microcontroller used here is ATMEL89C52. The AT89S52 is a low-power, highperformance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the indus-try-standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications.

In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and interrupt system to continue functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset. 3.1.2 Features: 8K Bytes of In-System Programmable (ISP) Flash Memory. 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters

Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Dual Data Pointer Fast Programming Time Flexible ISP Programming. 3.1.3 Pin configuration:

Figure 3

3.1.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 1: Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. 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 inter-nal pull-ups and can be used as inputs. Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. Port 3 Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. 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 pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 receives some control signals for Flash programming and verification. Port

3 also serves the functions of various special features of the AT89S52, as shown in the following table.

Table 1 RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.

This pin drives high for 98 oscillator periods after the Watchdog times out. The DISRTO bit in SFR AUXR (address 8EH) can be used to disable this feature. In the default state of bit DISRTO, the RESET HIGH out feature is enabled. ALE/PROG: Address Latch Enable (ALE) is an 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 (PSEN) is the read strobe to external program memory. When the AT89S52 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. XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2: Output from the inverting oscillator amplifier. Memory Organization: MCS-51 devices have a separate address space for Program and Data Memory. Up to 64K bytes each of external Program and Data Memory can be addressed. Program Memory:

If the EA pin is connected to GND, all program fetches are directed to external memory. On the AT89S52, if EA is connected to VCC, program fetches to addresses 0000H through 1FFFH are directed to internal memory and fetches to addresses 2000H through FFFFH are to external memory. Data Memory: The AT89S52 implements 256 bytes of on-chip RAM. The upper 128 bytes occupy a parallel address space to the Special Function Registers. This means that the upper 128 bytes have the same addresses as the SFR space but are physically separate from SFR space. When an instruction accesses an internal location above address 7FH, the address mode used in the instruction specifies whether the CPU accesses the upper 128 bytes of RAM or the SFR space. Instructions which use direct addressing access the SFR space. .Watchdog Timer: The WDT is intended as a recovery method in situations where the CPU may be subjected to software upsets. The WDT consists of a 14-bit counter and the Watchdog Timer Reset (WDTRST) SFR. The WDT is defaulted to disable from exiting reset.

Circuit

diagram:

Figure 4

3 .1.5 Working of Microcontroller: Even though there is large number of different types of microcontrollers and even more programs created for their use only, all of them have many things in common. Thus, if you learn to handle one of them you will be able to handle them all. A typical scenario on the basis of which it all functions is as follows: Power supply is turned off and everything is stillthe program is loaded into the microcontroller, nothing indicates what is about to come

Power supply is turned on and everything starts to happen at high speed! The control logic unit keeps everything under control. It disables all other circuits except quartz crystal to operate. While the preparations are in progress, the first milliseconds go by. Power supply voltage reaches its maximum and oscillator frequency becomes stable. SFRs are being filled with bits reflecting the state of all circuits within the microcontroller. All pins are configured as inputs. The overall electronics starts operation in rhythm with pulse sequence. From now on the time is measured in micro and nanoseconds. Program Counter is set to zero. Instruction from that address is sent to instruction decoder which recognizes it, after which it is executed with immediate effect. The value of the Program Counter is incremented by 1 and the whole process is repeated...several million times per second.

BLOCK DIAGRAM:

Read Only

Memory (ROM): Figure 5

Read Only Memory (ROM) is a type of memory used to permanently save the program being executed. The size of the program that can be written depends on the size of this memory.

ROM can be built in the microcontroller or added as an external chip, which depends on the type of the microcontroller. Both options have some disadvantages.

If ROM is added as an external chip, the microcontroller is cheaper and the program can be considerably longer. At the same time, a number of available pins is reduced as the microcontroller uses its own input/output ports for connection to the chip.

The internal ROM is usually smaller and more expensive, but leaves more pins available for connecting to peripheral environment. The size of ROM ranges from 512B to 64KB. Random Access Memory (RAM): Random Access Memory (RAM) is a type of memory used for temporary storing data and intermediate results created and used during the operation of the microcontrollers. The content of this memory is cleared once the power supply is off. For example, if the program performs an addition, it is necessary to have a register standing for what in everyday life is called the sum. For that purpose, one of the registers in RAM is called the "sum" and used for storing results of addition. The size of RAM goes up to a few KBs. Electrically Erasable Programmable ROM (EEPROM). The EEPROM is a special type of memory not contained in all microcontrollers.

Its contents may be changed during program execution (similar to RAM ), but remains permanently saved even after the loss of power (similar to ROM).

It is often used to store values, created and used during operation (such as calibration values, codes, values to count up to etc.), which must be saved after turning the power supply off. A disadvantage of this memory is that the process of programming is relatively slow. It is measured in milliseconds. 3.1.6 Programming: Unlike other integrated circuits which only need to be connected to other components and turn the power supply on, the microcontrollers need to be programmed first. This is a so called "bitter pill" and the main reason why hardware-oriented electronics engineers stay away from microcontrollers. It is a trap causing huge losses because the process of programming the microcontroller is basically very simple. In order to write a program for the microcontroller, several "low-level" programming languages can be used such as Assembly, C and Basic (and their versions as well). Writing program procedure consists of simple writing instructions in the order in which they should be executed. There are also many programs running in Windows environment used to facilitate the work providing additional visual tools. This book describes the use of Assembly because it is the simplest language with the fastest execution allowing entire control on what is going on in the circuit. Interrupt - electronics is usually more faster than physical processes it should keep under control. This is why the microcontroller spends most of its time waiting for something to happen or execute. In other words, when some event takes place, the microcontroller does something. In order to prevent the microcontroller from spending most of its time endlessly checking for logic state on input pins and registers, an interrupt is generated. It is the signal which informs the central processor that something attention worthy has happened.

As its name suggests, it interrupts regular program execution. It can be generated by different sources so when it occurs, the microcontroller immediately stops operation and checks for the cause. If it is needed to perform some operations, a current state of the program counter is pushed onto the Stack and the appropriate program is executed. It's the so called interrupt routine. Stack is a part of RAM used for storing the current state of the program counter (address) when an interrupt occurs. In this way, after a subroutine or an interrupt execution, the microcontroller knows from where to continue regular program execution. This address is cleared after returning to the program because there is no need to save it any longer, and one location of the stack is automatically availale for further use. In addition, the stack can consist of several levels. This enables subroutines nesting, i.e. calling one subroutine from another.

3.2 ADC0808:
The ADC0808, ADC0809 data acquisition component is a monolithic CMOS device with an 8bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control logic. 3.2.1 General Description:

The ADC0809 data acquisition component is a monolithic CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control logic. The 8-bit A/D converter uses successive approximation as the conversion technique. The converter features a high impedance chopper stabilized comparator, a 256R voltage divider with analog switch tree and a successive approximation register. The 8-channel multiplexer can directly access any of 8-single-ended analog signal. These features make this device ideally suited to applications from process and machine control to consumer and automotive applications. For 16-channel multiplexer with common output (sample/hold port) see ADC0816 data sheet. 3.2.2 Features: Easy interface to all microprocessors Operates ratio metrically or with 5 VDC or analog span Adjusted voltage reference No zero or full-scale adjust required 8-channel multiplexer with address logic 0V to 5V input range with single 5V power supply Outputs meet TTL voltage level specifications Standard hermetic or molded 28-pin DIP package 28-pin molded chip carrier package 3.2.3 Specifications: Resolution 8 Bits Single Supply 5 VDC Low Power 15 mW Conversion Time 100 s

Circuit diagram:

Figure 6

3.2.4 Pin Diagram:

Figure 7 The ADC0808, ADC0809 data acquisition component is a monolithic CMOS device with an 8-bit analog-to-digital converter, 8-channel multiplexer and microprocessor compatible control logic. The device contains an 8-channel single-ended analog signal multiplexer. A particular input channel is selected by using the address decoder. Table 1 shows the input states for the address lines to select any channel. The address is latched into the decoder on the low-to-high transition of the address latch enable signal.

Table 2 d of ADC0809: The internal block diagram

Figur re 8

T successiv The ve approxim mation regist ter (SAR) pe erforms eigh ht iterations to determin ne the digital co ode for input t value. The SAR is rese et on the pos sitive edge of o START pulse and start the conversio on process on o the falling g edge of ST TART pulse. A conversion n process wil ll be interrup pted on recei ipt of new ST TART pulse e. T End-OfThe -Conversion (EOC) wil ll go low between 0 and 8 clock pulses afte er the positive edge e of STA ART pulse. T ADC ca The an be used in continuo ous conversi ion mode by b tying the e EOC outp put to START input. In th his mode an external ST TART pulse e should be applied wh henever pow wer is d ON. switched The 256'R R resistor ne etwork and the switch tre ee is shown in fig.

Figure 9

The 256R ladder network has been provided instead of conventional R/2R ladder because of its inherent monotonic, which guarantees no missing digital codes.

Also the 256R resistor network does not cause load variations on the reference voltage.

The comparator in ADC0809/ADC0808 is a chopper- stabilized comparator. It converts the DC input signal into an AC signal, and amplifies the AC sign using high gain AC amplifier. Then it converts AC signal to DC signal. This technique limits the drift component of the amplifier, because the drift is a DC component and it is not amplified/passed by the AC amp1ifier. This makes the ADC extremely insensitive to temperature, long term drift and input offset errors.

In ADC conversion process the input analog value is quantized and each quantized analog value 3.2.5 Applications: ADCs are integral to current music reproduction technology. Since much music production is done on computers, when an analog recording is used, an ADC is needed to create the PCM data stream that goes onto a compact disc or digital music file. will have a unique binary equivalent.

The current crop of AD converters utilized in music can sample at rates up to 192 kilohertz.

High bandwidth headroom allows the use of cheaper or faster anti-aliasing filters of less severe filtering slopes.

3.3 CURRENT SENSOR:


NAME: CURRENT SENSOR/CS60 010 SHORT DESCRIPTION: Current sensor is intended for measuring current from 1 to 10 Amps. 3.3.1 FEATURES: Measures current from 1 to 10 Amps. Tin-silver over copper terminations 0.5 mm minimum wall thickness of the hole Sensitivity may be enhanced by increasing primary turns. 3.3.2 SPECIFICATIONS: Ambient temperature: 40C to +85C

Storage temperature: Packaging trays: Vout tolerance: Table 3

40C to +85C 40C to +80C 10%

BLOCK DIAGRAM OF THE CURRENT TRANSFORMER:

Figure 10

3.3.3 APPLICATIONS: Sensing branch circuit overload and detecting load drop or shutdown.

Figure 11

3.4 IR SENSOR:
3.4.1 Overview of the ir sensor: This sensor can be used for most indoor applications where no important ambient light is present. For simplicity, this sensor doesn't provide ambient light immunity, but a more complicated, ambient light ignoring sensor should be discussed in a coming article. However, this sensor can be used to measure the speed of object moving at a very high speed, like in industry or in tachometers. In such applications, ambient light ignoring sensor, which rely on sending 40 Khz pulsed signals cannot be used because there are time gaps between the pulses where the sensor is 'blind'. The solution proposed doesn't contain any special components, like photo-diodes, phototransistors, or IR receiver ICs, only a couple if IR leds, an Op amp, a transistor and a couple of resistors. In need, as the title says, a standard IR led is used for the purpose of detection. Due to that fact, the circuit is extremely simple, and any novice electronics hobbyist can easily understand and build it.

3.4.2 Object Detection using IR light:

It is the same principle in ALL Infra-Red proximity sensors. The basic idea is to send infra red light through IR-LEDs, which is then reflected by any object in front of the sensor. Then all you have to do is to pick-up the reflected IR light. For detecting the reflected IR light, we are going to use a very original technique: we are going to use another IR-LED, to detect the IR light that was emitted from another led of the exact same type! This is an electrical property of Light Emitting Diodes (LEDs) which is the fact that a led Produce a voltage difference across its leads when it is subjected to light. As if it was a photocell, but with much lower output current. In other words, the voltage generated by the leds can't be - in any way - used to generate electrical power from light, It can barely be detected. that's why as you will notice in the schematic, we are going to use a Op-Amp (operational Amplifier) to accurately detect very small voltage changes.

Figure 12

Images for ir sensor:

3.4.3 General Description:

The IR Sensor-Single is a general purpose proximity sensor. Here we use it for collision detection. The module consist of a IR emitter and IR receiver pair. The high precision IR receiver always detects a IR signal. The module consists of 358 comparator IC. The output of sensor is high whenever it IR frequency and low otherwise. The on-board LED indicator helps user to check status of the sensor without using any additional hardware. The power consumption of this module is low. It gives a digital output. 3.4.4 Functional description: The output voltage is generated by a thermopile, formed by a series connection of thermojunctions deposited on a silicon substrate. The hot junctions are thermally isolated from the cold junctions on the substrate by etching an extremely thin membrane. A black absorbing layer on the hot junctions transform the incoming radiation into heat. A voltage proportional to the radiation is generated by the thermoelectric effect. The used thermopiles are processed on 400 mm silicon substrates using BiSb and NiCr for the thermojunctions. For different radiation spectra various filters are available to get the optimal solution.

3.4.5 Circuit Diagram:

Figure 13

3.4.6 Working principle:

Now this may seem to be a very special kind of sensor, after all what kind of sensor can see a line?

Well, the principles are very simple. It consists of just two components. The first is an Infra-Red (IR) transmitter (usually an LED), while the second is an Infra-Red receiver (usually a transistor). IR is transmitted out of the sensor unit. If the IR is reflected back, it is picked up by the IR receiver transistor. But how does it follow a line, you ask? Well, IR is basically heat (the heat from the sun is predominantly in the IR part of the spectrum). Black, as you probably know, absorbs heat, which is why it is best not to wear black in the summer months. If black absorbs heat, then it also absorbs IR. And this is the principle. While the sensor is over a black line, no IR is reflected back to the receiver. If the sensor strays away from the line, then IR is reflected back. This is why Cybot 'follows a black line'. For best results the black line is placed on a white background, which will give the extreme two cases - white reflects IR.The diagram below illustrates this, but as you can see it is quite a simple concept.

3.5 UART:
A universal asynchronous receiver/transmitter is a type of "asynchronous receiver/transmitter", a piece of computer hardware that translates data between parallel and serial forms. UARTs are commonly used in conjunction with other communication standards such as EIA RS-232.

Figure

14

A UART is usually an individual (or part of an) integrated circuit used for serial communications over a computer or peripheral device serial port. UARTs are now commonly included in microcontrollers. A dual UART or DUART combines two UARTs into a single chip. Many modern ICs now come with a UART that can also communicate synchronously; these devices are called USARTs. The Universal Asynchronous Receiver/Transmitter (UART) controller is the key component of the serial communications subsystem of a computer. Serial transmission of digital information (bits) through a single wire or other medium is much more cost effective than parallel transmission through multiple wires. A UART is used to convert the transmitted information between its sequential and parallel form at each end of the link. Each UART contains a shift register which is the fundamental method of conversion between serial and parallel forms.

Circuit Diagram:

Figure 15

3.6 Voltage sensors


3.6.1 Introduction: The Smart Q Voltage Sensors are used to measure the potential difference between the ends of an electrical component. This range of Voltage Sensors can be used to measure both DC and low-voltage AC circuits. The Smart Q Voltage Sensors are equipped with a micro controller that greatly improves the sensor accuracy, precision and consistency of the readings. They are supplied calibrated and the stored calibration (in Volts) is automatically loaded when the Voltage Sensor is connected. 3.6.2 features: Range: 0 to 10 V Resolution: 10mV Protected to a maximum voltage: 27 V Impedance: 1M ohm.

3.7 LM7805:3-Terminal 1A Positive Voltage Regulator


3.7.1 General Description: The LM78XX series of three terminal positive regulators are available in the TO-220 package and with several fixed output voltages, making them useful in a wide range of applications. Each type employs internal current limiting, thermal shut down and safe operating area protection,making it essentially indestructible. If adequate heat sinking is provided, they can deliver over 1A output current. Although designed primarily as fixed voltage regulators, these devices can be used with external components to obtain adjustable voltages and currents. 3.7.2 Features: Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24 Thermal Overload Protection Short Circuit Protection

3.8 MAX232:
3.8.1 DESCRIPTION: The MAX232 is an integrated circuit that converts signals from an RS-232 serial port to signals suitable for use in TTL compatible digital logic circuits. The MAX232 is a dual driver/receiver and typically converts the RX, TX, CTS and RTS signals. The drivers provide RS-232 voltage level outputs (approx. 7.5 V) from a single + 5 V supply via on-chip charge pumps and external capacitors. This makes it useful for implementing RS-232 in devices that otherwise do not need any voltages outside the 0 V to + 5 V range, as power supply design does not need to be made more complicated just for driving the RS-232 in this case. The receivers reduce RS-232 inputs (which may be as high as 25 V), to standard 5 V TTL levels. These receivers have a typical threshold of 1.3 V, and a typical hysteresis of 0.5 V. The later MAX232A is backwards compatible with the original MAX232 but may operate at higher baud rates and can use smaller external capacitors 0.1 F in place of the 1.0 F capacitors used with the original device.

3.8.2 Block Diagram:

Figure 16 3.8.3 FEATURES: Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 Operates From a Single 5-V Power Supply With 1.0-_F Charge-Pump Capacitors Operates Up To 120 kbit/s Two Drivers and Two Receivers 30-V Input Levels Low Supply Current . . . 8 mA Typical.

3.8.4 Pin Diagram:

Figure 17

Table 4

3.9 GSM MODEM:

GSM Modem Product, from Sparr Electronics limited (SEL), provides full functional capability to Serial devices to send SMS and Data over GSM Network. The product is available as Board Level or enclosed in Metal Box. The Board Level product can be integrated in to Various Serial devices in providing them SMS and Data capability and the unit housed in a Metal Enclosure can be kept outside to provide serial port connection. The GSM Modem supports popular "AT" command set so that users can develop applications quickly. The product has SIM Card holder to which activated SIM card is inserted for normal use. The power to this unit can be given from UPS to provide uninterrupted operation. This product provides great feasibility for Devices in remote location to stay connected which otherwise would not have been possible where telephone lines do not exist.

3.9.1 Applications
Mobile Transport vehicles. LAN based SMS servers Alarm notification of critical events including Servers Network Monitoring and SMS reporting Data Transfer applications from remote locations Monitor and control of Serial services through GSM Network Integration to custom software for Warehouse, Stock, Production, Dispatch notification through SMS. AMR- Automatic Meter Reading.

3.9.2 GSM modem characteristics


Quad GSM GPRS modem ( GSM 850 /900/1800 / 1900 ) Designed for GPRS, data, fax, SMS and voice applications Fully compliant with ETSI GSM Phase 2+ specifications (Normal MS) License free Python interpreter with free of charge programming tools

3.9.3 GSM modem Interfaces


RS232 through D-TYPE 9 pin connector, RJ11 for I2C, SPI and GPIO Power supply through Molex 4 pin connector SMA antenna connector. Toggle spring SIM holder. Red LED Power on, Green LED status of GSM / GPRS module.

GSM modem general characteristics


Input voltage: 5V-30V Current: 8mA in idle mode, 150mA in communication GSM 900 @ 12V, 110mA in GSM 1800 @ 12V

Temperature range: Operating -30 to +85 degree Celsius; Storage -30 to +85 degree Celsius

CHAPTER 4
KEIL COMPLIER: The C programming language is a general-purpose, programming language that provides code efficiency, elements of structured programming, and a rich set of operators. C is not a big language and is not designed for any one particular area of application. Its generality combined with its absence of restrictions, makes C a convenient and effective programming solution for a wide variety of software tasks. Many applications can be solved more easily and efficiently with C than with other more specialized languages. The Cx51 Optimizing C Compiler is a complete implementation of the American National Standards Institute (ANSI) standard for the C language. Cx51 is not a universal C compiler adapted for the 8051 target. It is a ground-up implementation dedicated to generate extremely fast and compact code for the 8051 microprocessor. Cx51 provides you the flexibility of programming in C and the code efficiency and speed of assembly language. The C language on its own is not capable of performing operations (such as input and output) that would normally require intervention from the operating system. Instead, these capabilities are provided as part of the standard library. Because these functions are separate from the language itself, C is especially suited for producing code that is portable across a wide number of platforms. Since Cx51 is a cross compiler, some aspects of the C programming language and standard libraries are altered or enhanced to address the peculiarities of an embedded target processor. Refer to Chapter 3. Language Extensions on page 85 for more detailed information.

Support for all 8051 Variants The 8051 Family is one of the fastest growing Microcontroller Architectures. More than 400 device variants from various silicon vendors are today available. New extended 8051 Devices, like the Philips 80C51MX architecture are dedicated for large application with several Mbytes code and data space. For optimum support of these different 8051 variants, Keil provides the several development tools that are listed in the table below. A new output file format (OMF2) allows direct support of up to 16MB code and data space. The CX51 compiler is a variant of the C51 compiler that is design for the new Philips 80C51MX architecture. 4.2 Compiling with Cx51 This explains how to use Cx51 to compile C source files and discusses the control directives you may specify. These directives allow you to perform several functions. For example: _ Direct Cx51 to generate a listing file _ Control the information included in the object file _ Specify code optimization and memory models To invoke the C51 or CX51 compiler, enter C51 or CX51 at the command prompt. On this command line, you must include the name of the C source file to be compiled, as well as any other necessary control directives required to compile your source file.

CONCLUSION

Thus on implementing our project data can be sent and received through wireless communication. And the amount can be paid by a prepaid smartcard .Once the amount reaches threshold value. A message signal will be trigged to the mobile number mentioned in program. So here an added advantage is that in case of outstation, we dont have to pay the minimum amount every month that will more beneficiate the middle class families.

REFERENCES:

J.

Holmes, D.

Campbell, Communicating with domestic electricity meters,

Schlumberger Industries UK,129-133. L. Cao, J. Tian, D. Zhang, Networked Remote Meter-Reading System Based on Wireless Communication Technology, Proceedings IEEE International Conference on Information Acquisition, China, 2006, 172-176. T.Maity, S.Das, B.Datta, A PC based Intelligent Wireless Energy Metering and Online Billing Solution for Domestic Consumers, The Institution of Engineers (India) Journal (ET), 89, 2009, 8-12.

J. Newbury, W. Miller, Multiprotocol Routing for Automatic Remote Meter Reading Using Power Line Carrier Systems, IEEE Power Delivery, 16(14), 2001,1-4.

D.Egan, The Emergence of ZigBee in building automation and industrial controls, IEE Computing & Control Engineering, 16(2), 2005, 14-19.

Você também pode gostar