Sie sind auf Seite 1von 66

CHAPTER 1 INTRODUCTION

1.1

OBJECTIVE
The main aim of this project is Automating the process of measurement of electric

energy through digital communication techniques. GSM based communication is used to transfer the amount of energy consumed and its respective cost to EB Office and also to consumer mobile. Automatic Meter Reading is the technology of automatically collecting data from energy metering devices and transferring that data to a central data base for billing or analyzing. This saves employee trips and means that billing can be based on actual consumption rather than or an estimate based on previous consumptions giving customers better control of their use of electric energy.

1.2 ELECTRICAL ENERGY MEASUREMENT


Electrical energy is the presence and flow of an electric charge. The energy portion of electricity is found in a variety of phenomena such as static electricity, electromagnetic fields and lightning. Humans have found the ability to harness these phenomena and store the electrical charge for later use. The concept of electrical energy is defined using a variety of different terminologies such as charge, current and potential. [6] Electrical energy is the result of the interaction of subatomic particles with electromagnetic force. Within an atom, electrons and protons create a charge. This charge can be transferred between bodies using direct contact with a conductive material like a wire.[6] The electrical energy that an appliance or device consumes can be determined only by knowing how long (time) electrical power has been consumed at a specific rate (power). The amount of energy consumed can be found by multiplying the rate of energy consumption (measured in watts) with the amount of time (measured in hours) that it is being consumed. Electrical energy is measured in watt-hours (Wh). Energy = Power x Time E = P x t or E = W x h = Wh An electric meter or energy meter is a device that measures the amount of electrical energy consumed by a residence, business, or an electrically powered device.

1.2.1 TYPES OF METERS


Electricity meters operate by continuously measuring the instantaneous voltage (volts) and current (amperes) and finding the product of these to give instantaneous electrical power (watts) which is then integrated against time to give energy used (joules, kilowatt-hours etc.). Meters for smaller services (such as small residential customers) can be connected directly in-line between source and customer. For larger loads, more than about 200 amps of load, current transformers are used, so that the meter can be located other than in line with the service conductors. The meters fall into two basic categories, electromechanical and electronic. [6]

1.2.1.1 ELECTROMECHANICAL METERS


The most common type of energy meter is the electromechanical induction watt-hour meter. The electromechanical induction meter operates by counting the revolutions of an aluminium disc which is made to rotate at a speed proportional to the power. The number of revolutions is thus proportional to the energy usage. It consumes a small amount of power, typically around 2 watts. [6] The metallic disc is acted upon by two coils. One coil is connected in such a way that it produces a magnetic flux in proportion to the voltage and the other produces a magnetic flux in proportion to the current. The field of the voltage coil is delayed by 90 degrees using a lag coil. This produces eddy currents in the disc and the effect is such that a force is exerted on the disc in proportion to the product of the instantaneous current and voltage. A permanent magnet exerts an opposing force proportional to the speed of rotation of the disc. The equilibrium between these two opposing forces results in the disc rotating at a speed proportional to the power being used. The disc drives a register mechanism which integrates the speed of the disc over time by counting revolutions, much like the odometer in a car, in order to render a measurement of the total energy used over a period of time. [6] The type of meter described above is used on a single-phase AC supply. Different phase configurations use additional voltage and current coils. [6] The aluminium disc is supported by a spindle which has a worm gear which drives the register. The register is a series of dials which record the amount of energy used. The dials may be of the cyclometer type, an odometer-like display that is easy to read where for each dial a single digit is shown through a window in the face of the meter, or of the pointer type

where a pointer indicates each digit. With the dial pointer type, adjacent pointers generally rotate in opposite directions due to the gearing mechanism. The amount of energy represented by one revolution of the disc is denoted by the symbol kh which is given in units of watt-hours per revolution. The value 7.2 is commonly seen. Using the value of kh, one can determine their power consumption at any given time by timing the disc with a stopwatch. If the time in seconds taken by the disc to complete one revolution is t, then the power in watts is P= (3600.kh)/t. For example, if kh=7.2, as above, and one revolution took place in 14.4 seconds, the power is 1800 watts. This method can be used to determine the power consumption of household devices by switching them on one by one. Most domestic electricity meters must be read manually, whether by a representative of the power company or by the customer. Where the customer reads the meter, the reading may be supplied to the power company by telephone, post or over the internet. The electricity company will normally require a visit by a company representative at least annually in order to verify customer-supplied readings and to make a basic safety check of the meter. [6] In an induction type meter, creep is a phenomenon that can adversely affect accuracy, which occurs when the meter disc rotates continuously with potential applied and the load terminals open circuited. A test for error due to creep is called a creep test. [6]

1.2.1.2 ELECTRONIC METERS


Electronic meters display the energy on an LCD or LED display, and can also transmit readings to remote places. In addition to measuring energy used, electronic meters can also record other parameters of the load and supply such as maximum demand, power factor and reactive power used etc. They can also support time-of-day billing, for example, recording the amount of energy used during on-peak and off-peak hours. [6]

1.2.2 PROPOSED ENERGY MEASUREMENT


The voltage and current from the supply mains are measured using Potential Transformer (PT) and Current Transformer (CT) respectively. A precision rectifier is used to rectify the ac current and voltage signals because high precision signal processing is required. A zero crossing detector (ZCD) is employed to detect the zero crossing of the signals so that the phase difference between the voltage and current can be determined. The cosine of this angle gives the power factor. The product of voltage, current and power factor gives the instantaneous power. This rate of power consumed for multiplied with the amount of time
3

gives the Energy. The unit of energy is kWh. All these calculations are carried out in PIC16F877A controller to which the analog signals are given to the analog input pins. PIC controller has an inbuilt analog to digital converter. The calculated energy is displayed along with the amount consumed in a 16x2 LCD display.

1.3 ISSUES WITH STAND ALONE METERING


Highly Person dependant. Human errors cannot be avoided. Accessibility of meters in rural/ Agricultural zones. Energy Audits performed based on bill collection which is highly inaccurate. Billing done mainly on estimated/ monthly average basis Inability to monitor and control discrete loads Billing cycle requires excessive time. Meter data used only for billing, cannot help in analysis like demand analysis, energy

audit, pinpointing losses, etc.

1.4 AUTOMATIC METER READING


Automatic Remote Meter Reading means automating the process of measurement through digital communication techniques. It brings intelligence into the revenue cycle and manages it.

1.4.1 AMR NETWORK ARCHITECTURE


GSM Based Communication Single stage communication between Meter and central station through GSM Modem Hybrid Communication Two stages of communication in AMR System PLC Communication

1.4.1.1 GSM BASED COMMUNICATION


This mode of communication requires a modem and an antenna[3]. The characteristics of GSM modem required are:
4

Dual Band or Triband GSM GPRS modem (EGSM 900/1800MHz) / (EGSM Designed for GPRS, data, fax, SMS and voice applications Fully compliant with ETSI GSM Phase 2+ specifications (Normal MS) Interfaces

900/1800 / 1900 MHz )

Figure 1.4.1.1 GSM Network

RS-232 through D-TYPE 9 pin connector 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 Our project follows this method of GSM based communication to transmit the energy

and cost. Advantages of GSM based communication are:


5

Utilizing an existing cellular network for data transportation requires no additional equipment or software, resulting in a significant savings in both time and capital. Cellular technology utilizes an encryption technique to prevent an outside source from receiving the transmitted data. The cellular network provides full two-way communications, allowing scheduled reads, demand reads, alarm and event reporting, power outage reporting and power restoration reporting.[3]

1.4.1.2 HYBRID COMMUNICATION


Two stages of communication in AMR System

Meters and Data Concentrator Unit (DCU): Communication channel used DCU and Host Central Station (HCS): Communication channel used

between meters and DCU is Power Line.

between DCU and HCS is the standard GSM, CDMA, RF or PSTN Network.

Figure 1.4.1.2.a Hybrid Communication through Power Line

Figure 1.4.1.2.b Hybrid Communication through Satellite

1.4.1.3 POWER LINE CARRIER COMMUNICATION


Most economically viable technology for transferring Meter data to DCU. Uses the technique of communicating the data over existing Electrical Lines which carry LT power to the site. Employs an ASIC, which accepts digital data & converts it into FSK modulation and transmits it over the power line by sensing a zero crossing of 220V sine wave. Typical frequency used for frequency modulation is 132 KHz.

Figure 1.4.1.3 PLC Schematics

1.4.2 ADVANTAGES OF AMR SYSTEM


Accurate meter reading, no more estimates Improved billing Accurate Profile Classes and Measurement Classes, true costs applied Energy Management through profile data graphs Less financial burden correcting mistakes Less accrued expenditure Less time chasing call centres to provide meter readings Transparency of cost to read metering Improved procurement power though more accurate data de-risking price. Increased Data Security Automatic meter reading provides increased performance in the data collection. You avoid reading errors and missing meter readings. Reading data automatically also provides increased security of data flow between the AMR system and other applications. Avoiding manual data entry or manual data transfer a potential source of error is eliminated.

Reduced operation costs With automatic meter reading you have constant access to real-time data and have meter readings available on request. This helps you handling customer complaints. Readings in connections with med move-in/move-out are done easier and faster and even retroactive, should a costumer forget to notify change of address in due time. Costs for meter reading will be reduced and thereby total costs of operation.

Reduced cost over the life time of the AMR system The financial benefits of automatic meter reading last over the lifetime of the AMR system. Improved cash flow budgeting and management With automatic meter reading utility bills are based on actual consumption. This generates a steady cash flow. Billing is based on real-time data and estimated bills are no longer necessary.

Improved customer service With accurate utility invoices there is no need for estimates or adjusted billing. Demand reads can be done as part of the customer service. You can react quicker in abnormal situations and monitor demand and consumption closely. And you strengthen your image with the consumer as a reliable partner within energy supply and energy billing services.[1]

CHAPTER 2 LITERATURE REVIEW 2.1. PREVAILING SYSTEM


The currently prevailing system involves the user to go up to the EB office to manually pay his bills. The readings are taken using the analogue meter present in the customers house. The readings are taken using an employee working at the EB office. This system has a set of disadvantages which are given below: 1. Erroneous Readings This involves errors present in the meter reading which are committed due to human mistakes. 2. Easy Manipulation Since all data here are taken manually dates can be easily manipulated by third parties which affect the EB office and the customer 3. Manual Labour The amount of workforce involved in this prevailing EB system is too large as the EB people have to visit many areas at roughly the same date. 4. Time Consuming This system takes a lot of time to go personally to the customers house and take the readings. [9]

2.2. CURRENTLY EXISTING SYSTEM


This system has been recently proposed by the IEEE to eliminate a few drawbacks in the old EB system. This system enables the transfer of the EB details through the power lines in each house. This way the EB office employees jus notes the readings in the customers house and sends the details to the EB office by any means. The user gets the details displayed in his house by the data received from the power lines. This system also has a few drawbacks which are: 1. Manual Labour The workforce still involved here is the same as the existing system which is too vast. 2. Taking time The way of waiting at the queues and then paying the bill is still there and this system does not help the customer in that way 3. Power Blackout The details since sent through power lines has a problem of being delivered to far areas if certain areas have a power failure. This also delays in delivering the bill. [7]

2.3. OUR PROPOSED SYSTEM


The system proposed by us involves a GSM method to transfer the data to the customer from the EB office. The old analog meter reading is replaced by a CT, PT with a microcontroller controlled LCD display. This keeps on updating frequently the amount of power consumed in the house in the display. This detail is then updated once in two months to the EB office using GSM. The customer meter sends its data to the EB office using the GSM. The EB office calculates the data and sends the amount to be paid to the customer along with the due date. The advantages of this system are: 1. Less labour The vast workforce used in the earlier EB system is reduced to a very few. This workforce can also be used for other developmental purposes 2. Quick updates The amount to be paid and the due date for the bills are sent to the customer as quickly as possible through the GSM facility. 3. No manipulation There can be no manipulation in this method as the entire process is transparent to the customer.

2.4 EXISTING AUTOMATIC METER READING SYSTEMS


Presently there are three basic systems that allow Electricity Billing without involving man power at the door steps of the consumer

Wireless Automatic Meter Reading System (WARMS) The main goal of WAMRS project was to send periodical readings of an electricity

meter wirelessly to a server in the billing office of the electricity supply company. There were central points covering each geographical area, since each premises unit would have limited range of wireless coverage, while the central points would have long-range wireless transmitters that could deliver the meter-reading data over long distances to the billing office. The server in the billing office had a highly secure database system which enabled authorized staff members of the electricity supply company to read and print electricity bills. For premises out of the coverage area of any central point, the solution proposed was to make the nearest premises unit (covered by a central point) as the central point for such remote premises. This added a constraint on the wireless device used for such purpose because such a device should have the capability of both sending and receiving the data. [7]

10

Figure 2.1 Block diagram view of WARMS design The Sender (Premises Unit) consists of a Digital meter, Bus Controller, Microcontroller, NVRAM, Real Time Clock and Transmitting chip. The Energy consumed at the consumer end is obtained from the digital meter and the value is stored in the memory. It is then transmitted through Transmitting chip. When data has to be transmitted wirelessly over long distances, it is necessary to have some mechanism at predetermined distances from the sender for temporarily receiving and retransmission of data to the designated receiver. At the central points, the system will consist of a transceiver, microcontroller, the clock, and a NVRAM. This hardware is similar to the hardware at the Premises Unit, so at the time of implementation of the system, each premises unit can be conFigureured to behave both as a sender (when transmitting its data) and a central point unit (for temporarily receiving/retransmission of data coming from other neighbouring premises units) at different times.[7] The hardware at the billing office consisted of a receiving chip and a database server. The receiving chip receives the transmitted data. The database server requires software for communication with the premises unit of each consumer and, based on the consumption data received; it needs to generate an electricity bill. [7]

11

CHAPTER 3 ARCHITECTURAL DESIGN 3.1 PROPOSED SYSTEM ARCHITECUTRE


This system automatically send SMS to customer for EB bill cost of each two months

using GSM and auto metering with SMS reply systems. Mobile ad hoc networks are the future of wireless networks. Because they're practical, versatile, simple, easy to use and inexpensive! These networks provide a new approach for wireless communication and by operating in a license free frequency band prove to be relatively inexpensive.

3.2 SYSTEM DESIGN

Figure 3.2 Block Diagram

12

CHAPTER 4 DESIGN AND IMPLEMENTATION 4.1 POWER SUPPLY


A power supply is a device that supplies electrical energy to one or more electric loads. The term is most commonly applied to devices that convert one form of electrical energy to another, though it may also refer to devices that convert another form of energy (e.g., mechanical, chemical, solar) to electrical energy. A regulated power supply is one that controls the output voltage or current to a specific value; the controlled value is held nearly constant despite variations in either load current or the voltage supplied by the power supply's energy source. Every power supply must obtain the energy it supplies to its load, as well as any energy it consumes while performing that task, from an energy source. Depending on its design, a power supply may obtain energy from: Electrical energy transmission systems. Common examples of this include power supplies that convert AC line voltage to DC voltage. Energy storage devices such as batteries and fuel cells. Electromechanical systems such as generators and alternators. Solar power. A power supply may be implemented as a discrete, stand-alone device or as an integral device that is hardwired to its load. In the latter case, for example, low voltage DC power supplies are commonly integrated with their loads in devices such as computers and household electronics. [6] Constraints that commonly affect power supplies include: The amount of voltage and current they can supply. How long they can supply energy without needing some kind of refueling or recharging (applies to power supplies that employ portable energy sources). How stable their output voltage or current is under varying load conditions. Whether they provide continuous or pulsed energy.

4.1.1 SINGLE PHASE BRIDGE RECTIFIER

13

The bridge rectifier has four diodes connected to form a bridge. The single phase ac input is applied to the diagonally opposite ends of the bridge. The dc output is obtained across the other two ends of the bridge. [5]

Figure.4.1.1 Bridge rectifier circuit During the positive half-cycle of the input ac voltage, diodes D1 and D2 conduct, whereas diodes D3 and D4 do not conduct. During the negative half-cycle of the input ac voltage, diodes D3 and D4 conduct, whereas diodes D1 and D2 do not conduct. In both the cases, the conducting diodes will be in series through the load and hence the current flows through the load. [5] The main advantage of bridge rectifier is that it does not need for a bulky center tapped transformer as in a full-wave rectifier. Transformer utilization factor is considerably high. [5]

4.1.2 VOLTAGE REGULATOR

1 phase, 230V ac supply is given to -15/+15 center tapped transformer. Bridge Rectifier converts this 15 V ac to 10 V dc Capacitor filter is used to filter out the ripples IC7805 converts +10V dc voltage to +5V dc voltage IC7812 converts +10V dc voltage to +12V dc voltage which is given as positive input to the op-amp. IC7912 converts -10V dc voltage to -12V dc voltage which is given as negative input to the op-amp.

14

Figure.4.1.2 Voltage Regulator circuit

4.1.3 POWER SUPPLY DESIGN

Figure 4.1.3 Power Supply Design In Bridge Rectifier circuit, Vdc = 2Vm/ = 2*15/ = 9.687 Therefore Vdc is approximately 10V In Voltage Regulator circuit, Vm = 15V
15

Vrms = Vm/2 = 15/ 2 = 10.6V Ripple factor, = Vrms / Vdc = 10.6/10 = 1.06 = 1/(4 3*f*C) ; f = 100Hz 1.06 = 1/ (4 3*100*C) C = 1mF = 1000F

4.2 CURRENT TRANSFORMER


A current transformer (CT) is a measurement device designed to provide a current in its secondary coil proportional to the current flowing in its primary. Current transformers are commonly used in metering and protective relays in the electrical power industry where they allow safe measurement of large currents, often in the presence of high voltages. The current transformer safely isolates measurement and control circuitry from the high voltages typically present on the circuit being measured. Current transformers are often constructed by passing a single primary turn (either an insulated cable or an uninsulated bus bar) through a wellinsulated toroidal core wrapped with many turns of wire. The CT is typically described by its current ratio from primary to secondary. A 10:1 CT providing an output current of 1 amperes when the primary is 10 amperes is used in our project. [6]

Figure 4.2 Toroidal Current Transformer The secondary winding can be single ratio or have several tap points to provide a range of ratios. Care must be taken that the secondary winding is not disconnected from its load while current flows in the primary, as this will produce a dangerously high voltage across the open secondary and may permanently affect the accuracy of the transformer.
16

Specially constructed wideband CTs are also used, usually with an oscilloscope, to measure high frequency waveforms or pulsed currents within pulsed power systems. One type provides a voltage output that is proportional to the measured current; another, called a Rogowski coil, requires an external integrator in order to provide a proportional output.[6] Doughnut shaped toroidal transformers are used to save space compared to EI cores, and sometimes to reduce external magnetic field. These use a ring shaped core, copper windings wrapped round this ring (and thus threaded through the ring during winding), and tape for insulation. [6] Toroidal transformers compared to EI core transformers: Lower external magnetic field Smaller for a given power rating Higher cost in most cases, as winding requires more complex and slower equipment Less robust Central fixing is either Bolt, large metal washers and rubber pads Bolt and potting resin Over-tightening the central fixing bolt may short the windings Greater inrush current at switch-on

4.3 POTENTIAL TRANSFORMER


Potential transformers (PT) are another type of instrument transformer, used for metering and protection in high-voltage circuits. They are designed to present negligible load to the supply being measured and to have a precise voltage ratio to accurately step down high voltages so that metering and protective relay equipment can be operated at a lower potential.
[6]

Typically the secondary of a voltage transformer is rated for 6 V or 9 V at rated primary voltage of 240V, to match the input ratings of protective relays. The transformer winding high-voltage connection points are typically labeled as H1, H2 (sometimes H0 if it is internally grounded) and X1, X2 and sometimes an X3 tap may be present. Sometimes a second isolated winding (Y1, Y2, Y3) may also be available on the same voltage transformer. The high side (primary) may be connected phase to ground or phase to phase. The low side (secondary) is usually phase to ground. The terminal identifications (H1, X1, Y1, etc.) are often referred to as polarity. This applies to current transformers as well. At any instant terminals with the same suffix numeral have the same polarity and phase. Correct identification of terminals and wiring is essential for proper operation of metering and
17

protective relays. Some meters operate directly on the secondary service voltages at or below 600 V. VTs are typically used for higher voltages (for example, 765 kV for power transmission), or where isolation is desired between the meter and the measured circuit.

4.4 PRECISION RECTIFIER


Rectifier circuits are used in the design of power supply circuits. In such applications, the voltage being rectified is usually much greater than the diode voltage drop, rendering the exact value of the diode drop unimportant to the proper operation of the rectifier. [4] The precision rectifier, which is also known as a super diode, is a configuration obtained with an operational amplifier in order to have a circuit behaving like an ideal diode and rectifier. It can be useful for high-precision signal processing. [4]

Figure 4.4 Precision rectifier circuit There are many applications for precision rectifiers, and most are suitable for use in audio circuits. A half wave precision rectifier is implemented using an op amp, and includes the diode in the feedback loop. This effectively cancels the forward voltage drop of the diode, so very low level signals (well below the diode's forward voltage) can still be rectified with minimal error. [4]

4.4.1 PRECISION RECTIFIER DESIGN


V = 6V For TL082, I = 1.4mA R = V/I 75% of 1.4mA is 1.05mA
18

R = 61.05*10-3 R = 5.71k Therefore R is approximately chosen 10 k

4.4.2 LIMITATIONS
The circuit has some serious limitations. The main one is speed. It will not work well with high frequency signals. For a low frequency positive input signal, 100% negative feedback is applied when the diode conducts. The forward voltage is effectively removed by the feedback, and the inverting input follows the positive half of the input signal almost perfectly. When the input signal becomes negative, the op amp has no feedback at all, so the output pin of the op amp swings negative as far as it can. When the input signal becomes positive again, the op amp's output voltage will take a finite time to swing back to zero, then to forward bias the diode and produce an output. This time is determined by the op amp's slew rate, and even a very fast op amp will be limited to low frequencies.

4.5 ZERO CROSSING DETECTOR


A zero crossing threshold detector is an electronic circuit that consists of an operational amplifier with an input voltage at its positive input. Often used in conjunction with other circuit elements, it usually functions as a simple voltage switch. [4]

Figure 4.5 Zero crossing detector A zero crossing detector is used for detecting the zero crossings of AC signals. A typical AC signal is the sine wave which goes up and down the zero level. Many electronic

19

systems need to know 'when' the signal crossed the zero level. The answer to that problem is the zero crossing detectors. [4] When the input voltage is positive, the output voltage is a positive value, when the input voltage is negative; the output voltage is a negative value. The magnitude of the output voltage is a property of the operational amplifier and its power supply. When used with a 15 V power supply and a 741C operational amplifier, Vsat+ is approximately 13.6 V and Vsatis approximately -14.3 V.

4.5.1 ZERO CROSSING DETECTOR DESIGN


V = 6V For TL082, I = 1.4mA R = V/I 75% of 1.4mA is 1.05mA R = 61.05*10-3 R = 5.71k Therefore R is approximately chosen 10 K

4.6 CONTROLLER
A microcontroller is a microprocessor which has I/O circuitry and peripherals built-in, allowing it to interface more or less directly with real-world devices such as lights, switches, sensors and motors. They simplify the design of logic and control systems, allowing complex behaviors to be designed into a piece of electronic or electromechanical equipment. They represent an approach which draws on both electronic design and programming skills; an intersection of what was once two disciplines, and is now called embedded design.

4.6.1 PIC CONTROLLER


Modern microcontrollers make it very easy to get started. They are very forgiving and often need little external circuitry. Among the most accessible are the PIC microcontrollers. The range of PICs available is very broad from tiny 6-pin 8-bit devices with just 16 bytes of data memory which can perform only basic digital I/O, to 100-pin 32-bit devices with 512 kilobytes of memory and many integrated peripherals for communications, data acquisition and control. PICs, which operate on data 8-bits at a time, are divided into three architectural families:
20

4.6.1.1 BASELINE (12-BIT INSTRUCTIONS)


These PICs are based on the original PIC architecture, going back to the 1970s and General Instruments Peripheral Interface Controller. They are quite limited, but, within their limitations (such as no interrupts), they are simple to work with particularly in assembler. Modern examples include the 6-pin 10F series, the 8-pin 12F509 and the 14-pin 16F506

4.6.1.2 MIDRANGE (14-BIT INSTRUCTIONS)


This is an extension of the baseline architecture, adding support for interrupts, more memory and on-chip timers and peripherals, including PWM (pulse width modulation) for motor control, support for serial, I2C and SPI interfaces and LCD (liquid crystal display) controllers. Modern examples include the 8-pin 12F629, the 20-pin 16F690 and 40-pin 16F887

4.6.1.3 HIGH-END (16-BIT INSTRUCTIONS)


Otherwise known as the 18F series, this architecture overcomes some of the limitations of the midrange devices, providing for more memory (up to 128k program memory and almost 4k data memory) and advanced peripherals, including USB, Ethernet and CAN (controller area network) connectivity.

4.6.2 FEATURES OF PIC16F877A

High-performance RISC CPU Lead-free: RoHS-compliant Operating speed:20Mhz, 200ns instruction cycle Operating voltage:4.0-5.5volts Industrial temperature range(-40 to +85 degrees) 15 Interrupt sources 35 single word instructions

All single-cycle instructions except for program branches

4.6.2.1 SPECIAL FEATURES


Flash memory:14.3KB(8192 words) Data SRAM:368 bytes Data EEPROM:256 bytes
21

Self-reprogrammable under software control In-circuit serial programming via two pins Watchdog timer with on-chip RC oscillator Programmable code protection Power-saving code protection Selectable oscillator options In-circuit debug via two pins

4.6.2.2 PERIPHERAL FEATURES

33 I/O pins : 5 I/O ports Timer0:8-bit timer/counter with 8-bit pre-scaler Timer1:16-bit timer/counter with pre-scaler Timer2:8-bit timer/counter with 8-bit period register, pre-scaler and post-scaler Two capture, compare, PWM modules Synchronous serial port with two modes USART/SCI with 9-bit address detection Parallel slave port Brown-out detection circuitry for brown-out reset

4.6.2.3 ANALOG FEATURES


10-bit, 8-channel A/D converter Brown-out reset Analog comparable module

4.6.3 DEVELOPMENT ENVIRONMENT


For PIC development, the requirements are: A PC, preferably running Windows XP with a spare USB port A PIC programmer Development software, including assembler and editor, and preferably a software debugger A prototyping environment, such as breadboard A C compiler A hardware debugger or emulator
22

And optionally:

4.7 LCD DISPLAY


A liquid crystal display (LCD) is a thin, flat electronic visual display that uses the light modulating properties of liquid crystals (LCs). LCs does not emit light directly. They are used in a wide range of applications, including computer monitors, television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have displaced cathode ray tube (CRT) displays in most applications. They are usually more compact, lightweight, portable, less expensive, more reliable, and easier on the eyes. They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in. LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically-modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in color or monochrome. LCDs are small low cost displays. They are easy to interface with a micro-controller because of an embedded controller (the black blob on the back of the board). This controller is standard across many displays (HD 44780) which means many micro-controllers have libraries that make displaying messages as easy as a single line of code.

4.7.1 FEATURES OF LCD DISPLAY


5 x 8 dots with cursor Built-in controller (KS 0066 or Equivalent) + 5V power supply (Also available for + 3V) 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional for + 3V power supply The other notable key features are 16x2 LCD Alphanumeric Display Simple serial (1 wire) connection to microcontroller (2400,N,8,1). Optional i2c interface to PICAXE-X parts. 7 Programmable pre-defined messages Small footprint (almost same size as the LCD).
23

Optional low-cost clock upgrade, providing Real Time Clock Programmable Alarm Output 1Hz pulse output 10 year battery backup

4.8 INTERFACING LCD WITH PIC16F877A

Figure 4.8 Interfacing LCD with PIC16F877A

4.9 DIGITAL COMMUNICATION


Data transmission, digital transmission or digital communications is the physical transfer of data (a digital bit stream) over a point-to-point or point-to-multipoint communication channel. In telecommunications, serial transmission is the sequential transmission of signal elements of a group representing a character or other entity of data. Digital serial transmissions are bits sent over a single wire, frequency or optical path sequentially. Because it requires less signal processing and less chance for error than parallel transmission, the

24

transfer rate of each individual path may be faster. This can be used over longer distances as a check digit or parity bit can be sent along it easily. In telecommunications, parallel transmission is the simultaneous transmission of the signal elements of a character or other entity of data. In digital communications, parallel transmission is the simultaneous transmission of related signal elements over two or more separate paths. Multiple electrical wires are used which can transmit multiple bits simultaneously, which allows for higher data transfer rates than can be achieved with serial transmission. This method is used internally within the computer, for example the internal buses, and sometimes externally for such things as printers, The major issue with this is "skewing" because the wires in parallel data transmission have slightly different properties (not intentionally) so some bits may arrive before others, which may corrupt the message. A parity bit can help to reduce this. However, electrical wire parallel data transmission is therefore less reliable for long distances because corrupt transmissions are far more likely.

4.10 MAX232
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. Since the RS232 is not compatible with todays microprocessors and microcontrollers, we need a line driver (voltage converter) to convert the RS232s signals to TTL voltage levels that will be acceptable to the controllers TxD and RxD pins. One such a converter is MAX232 from Maxim Corp. the MAX232 converts from RS232 voltage levels to TTL voltage levels and vice versa.

One advantage of the MAX232 chip is that it uses a +5V power source which is the same as the source voltage for the PIC controller. In other words, with a single +5V power supply we can power both the PIC and MAX232, with no need for the dual power supplies that are common in many older systems

4.10.1 FEATURES OF MAX232


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
25

Low-Power Receive Mo d e in Shut down Meet All EIA/TIA- 2 3 2E an d V. 2 8 Specifications Multiple Drivers and Receivers 3 -St a t e Dr iv e r and Receiver Ou tp u t s30-V Input Levels Low Supply Current 8 mA Typical Applications TIA/EIA-232-F, Battery-Powered Systems, Terminals, Modems, and computers

4.10.2 FUNCTIONAL DESCRIPTION OF MAX232


The MAX232 has two sets of line drivers for transferring and receiving data as shown in Figure 4.10.2. The line drivers used for TxD are called T1 and T2 while the line drivers for RxD are designated as R1 and R2. In many applications only one of each is used for example, T1 and R1 are used together for TxD and RxD of the PIC controller and the second set is left unused. Notice in MAX232 that the T1 line driver has a designation of T1 in and T1 out on pin numbers 11 and 14, respectively. The T1 in pin is the TTL side and is connected to TxD of the microcontroller, while T1 out is the RS232 side that is connected to the RxD pin of the RS232 DB connector.

26

Figure 4.10.2 Functional diagram of MAX232 The R1 line driver has a designation of R1 in and R1 out on pin numbers 13 and 12, respectively. The R1 in pin is the RS232 side that is connected to the TxD pin of the RS232 DB connector, while R1 out is the TTL side and is connected to RxD of the microcontroller.

4.10.3 APPLICATIONS OF MAX232


Portable Computers Low-Power Modems Interface Translation Battery-Powered RS232 Systems Multidrop RS232 Networks

4.11 RS232
27

RS-232 is defined as the Interface between data terminal equipment and data communication equipment using serial binary data exchange. This definition defines data terminal equipment (DTE) as the computer, while data communications equipment (DCE) as the modem. A modem cable has pin-to-pin connections, and is designed to connect a DTE device to a DCE device. The TD (transmit data) wire is the one through which data from a DTE device is transmitted to a DCE device. This name can be deceiving, because this wire is used by a DCE device to receive its data. The TD line is kept in a mark condition by the DTE device when it is idle. The RD (receive data) wire is the one on which data is received by a DTE device. RTS stands for Request To Send. This line and the CTS line are used when hardware flow control is enabled in both the DTE and DCE devices. The DTE device puts this line in a mark condition to tell the remote device that it is ready and able to receive data. If the DTE device is not able to receive data (typically because its receive buffer is almost full). It will put this line in the space condition as a signal to the DCE to stop sending data. When the DTE device is ready to receive more data (i.e. after data has been removed from its receive buffer), it will place this line back in the mark condition. The complement of the RTS wire is CTS, which stands for Clear to Send. The DCE device puts this line in a mark condition to tell the DTE device that it is ready to receive the data. Likewise, if the DCE device is unable to receive data, it will place this line in the space condition. Together, these two lines make up what is called RTS/CTS or hardware flow control. The Software Wedge supports this type of flow control, as well as Xon/Xoff or software flow control. Software flow control uses special control characters transmitted from one device to another to tell the other device to stop or start sending data. With software flow control the RTS and CTS lines are not used. DTR stands for Data Terminal Ready. Its intended function is very similar to the RTS line. DSR (Data Set Ready) is the companion to DTR in the same way that CTS is to RTS. Some serial devices use DTR and DSR as signals to simply confirm that a device is connected and is turned on. The Software Wedge sets DTR to the mark state when the serial port is opened and leaves it in that state until the port is closed. The DTR and DSR lines

28

were originally designed to provide an alternate method of hardware handshaking. It would be pointless to use both RTS/CTS and DTR/DSR for flow control signals at the same time. Because of this, DTR and DSR are rarely used for flow control. CD stands for Carrier Detect. Carrier detect is used by a modem to signal that it has made a connection with another modem, or has detected a carrier tone. The last remaining line is RI or Ring Indicator. A modem toggles the state of this line when an incoming call rings your phone. The Carrier Detect (CD) and the Ring Indicator (RI) lines are only available in connections to a modem. Because most modems transmit status information to a PC when either a carrier signal is detected (i.e. when a connection is made to another modem) or when the line is ringing, these two lines are rarely used.

4.12 INTERFACING RS232 WITH PIC16F877A

Figure 4.12 Interfacing RS232 with PIC

4.13 SERIAL LCD


29

Figure 4.13 Serial LCD

4.14 GSM
Global System for mobile communication (GSM) is a globally accepted standard for digital cellular communication. The GSM standard has been an advantage to both consumers, who may benefit from the ability to roam and switch carriers without replacing phones, and also to network operators, who can choose equipment from many GSM equipment vendors. GSM also pioneered low-cost implementation of the short message service (SMS), also called text messaging, which has since been supported on other mobile phone standards as well. The GSM network is divided into 3 major systems: Switching System Base Station System Operation and Support System

30

Figure 4.14 GSM Network

4.14.1 SWITCHING SYSTEM (SS)


The switching system (SS) is responsible for performing call processing and subscriber-related functions. The switching system includes the following functional units: Home location register (HLR) Mobile services switching center (MSC) Visitor location register (VLR) Authentication center (AUC) Equipment identity register (EIR)

31

4.14.2 BASE STATION SYSTEM (BSS)


All radio-related functions are performed in the BSS, which consists of the following functional units Base station controllers (BSC) Base transceiver stations (BTS)

4.14.3 OPERATION AND SUPPORT SYSTEM (OSS)


The operations and maintenance center (OMC) is connected to all equipment in the switching system and to the BSC. operation and support system (OSS).

The implementation of OMC is called the

The OSS is the functional entity from which the network operator monitors and controls the system. The purpose of OSS is to offer the customer cost-effective support for centralized, regional and local operational and maintenance activities that are required for a GSM network.

4.14.4 ADDITIONAL FUNCTIONAL ELEMENTS


Other functional elements shown in Figure 4.10 are as follows:

Message center (MXE) Gateway mopbile services switching center (GMSC)

Mobile Service node (MSN)

GSM interworking unit (GIWU)

4.14.5 GSM SPECIFICATIONS


Bandwidth the range of a channels limits; the broader the bandwidth, the faster data can be sent Bits per second (bps) a single on-off pulse of data; eight bits are equivalent to one byte Frequency the number of cycles per unit of time; frequency is measured in hertz (Hz) Kilo (k) kilo is the designation for 1,000; the abbreviation kbps represents 1,000 bits per second Megahertz (MHz) 1,000,000 hertz (cycles per second) Milliseconds (ms) one-thousandth of a second
32

Watt (W) a measure of power of a transmitter

4.14.6 CHARACTERISTICS OF GSM


Frequency band the frequency range specified for GSM is 1850 to 1990MHz (mobile station to base station) Duplex distance the duplex distance is 80MHz. Duplex distance is the distance between the uplink and downlink frequencies. 80MHz apart. Channel separation the separation between adjacent carrier frequencies. In GSM, this is 200kHz Modulation modulation is the process of sending a signal by changing the characteristics of a carrier frequency. This is done in GSM via Gaussian minimum shift keying (GMSK) Transmission rate GSM is a digital system with an over-the-air bit rate of 270kbps. Access method GSM utilizes the time division multiple access (TDMA) concept. TDMA is a technique in which several different calls may share the same carrier. Each call is assigned a particular time slot. Speech coder GSM uses linear predictive coding (LPC). The purpose of LPC is to reduce the bit rate. The LPC provides parameters for a filter that mimics the vocal tract. The signal passes through this filter, leaving behind a residual signal. Speech is encoded at 13kbps A channel has two frequencies,

4.15 OVERALL CIRCUIT DIAGRAM

33

4.16 EMBEDDED CODING


#include<pic.h> #include<math.h> void lcd_init(); void command(char); unsigned char CSQ[]="AT"; unsigned char CMGF[]="AT+CMGF=1"; unsigned char CMGS[]="AT+CMGS="; unsigned char const MOBILE[]="9566626966"; //unsigned char volt; unsigned int j;
34

init_gsm(); SEND(char); void write(char); void lcd_dis(const unsigned char *word,unsigned int n); void del(); static bit rs @((unsigned) &PORTE*8+0); static bit rw @((unsigned) &PORTE*8+1); static bit en @((unsigned) &PORTE*8+2); static bit h_beat @((unsigned) &PORTD*8+0); void delay(unsigned int del); //DELAY(unsigned int); void timer_init(); void adc2(); void adc1(); void adc0(); //void adc_dis(unsigned char); void disp(); unsigned char current,voltage,pf1,count,temp,sec,msec,b1,b2,b3,h1,h2,h3,unit,unit1,amt; unsigned int i; signed float uni,uni1; void main() { RD7=0; //RC2=1; //RC1=1; TRISC=0XF6; TRISB=0; timer_init(); TRISA=0X0F; TRISD=0X03; ADCON1=0X02; lcd_init();
35

// analog input(4 ch) // A/D Input sel

command(0x06); command(0x80); RCSTA=0X80; TXSTA=0X00; BRGH=1; SPBRG=129; //9600 TXEN=1; RCSTA=0X90; CREN=1; lcd_dis(" GSM BASED command(0xc0); lcd_dis("EB BILLING . . . del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); del(); adc0(); adc1(); adc2(); RD3=0; command(0xC0); lcd_dis(" ",16);
36

",16); ",16);

T0CS=0; // timer on command(0x80); lcd_dis("V: I: P: command(0xc0); lcd_dis("UNIT: while(1) { count=0; TMR1H=0xFF; TMR1L=0x9b; adc1(); adc0(); adc2(); if(current!=0) { while(RC1==0); TMR1ON=1; while(RC2==0); TMR1ON=0; pf1=((cos(((count*1.8*3.14)/(2*180))))*100); } else pf1=0; //pf=pf1/100; command(0x8c); write(pf1/100+0x30); write('.'); write((pf1%100/10)+0x30); write(pf1%10+0x30); //cur=current/10; if(sec>10) {
37

",16); ",16);

sec=0; //power=voltage*cur*pf; uni=uni+(voltage*current*pf1)/10000; unit=uni; uni1=uni1+(voltage*current*pf1)/10000; unit1=uni1; T0CS=1; command(0xc5); write(unit/100+0x30); write((unit%100/10)+0x30); write(unit%10+0x30); T0CS=0; }

if(temp<100) { T0CS=1; command(0xc5); write(unit1/100+0x30); h1=(unit1/100+0x30); write((unit1%100/10)+0x30); h2=((unit1%100/10)+0x30); write(unit1%10+0x30); h3=(unit1%10+0x30); amt=unit1*5; command(0xc9); write('A'); write('M'); write('T'); write(':'); write(amt/100+0x30);
38

b1=(amt/100+0x30); write((amt%100/10)+0x30); b2=((amt%100/10)+0x30); write(amt%10+0x30); b3=(amt%10+0x30); // T0CS=1; init_gsm(); uni1=0; T0CS=0; } del(); del(); } }

void interrupt timer() { if(TMR1IF==1) { TMR1IF=0; count++; TMR1H=0xff; TMR1L=0x9b; } if(T0IF==1) { T0CS=1; //off T0IF=0; msec++; if(msec>=100){msec=0; sec++;} TMR0 = 0XD9; T0CS=0; //on
39

} }

void timer_init() { GIE=1; PEIE=1; T0IE=1; TMR1IE=1; TMR0IE=1; TMR1ON=0; OPTION = 0X87; // timer reg set value for one sec TMR0 = 0xd9; T0CS=1; //off } OPTION = 0x07; // enable global interrupt // enable peripheral interrupt // enable timer0 interrupt // set prescale (256)

void adc0() { ADCON0=0x00; ADON=1; delay(500); ADCON0 =0x05; go/done bit high while(ADCON0!=0X01); finished or not temp=ADRESH; } void adc1() {
40

// Channel select // ADC module ON // selecting a particular channel and making the // Chk whether conversion // Taking Higher reg

ADCON0=0x08; ADON=1; delay(500); ADCON0 =0x0d; while(ADCON0!=0X09); voltage=ADRESH; command(0x82); write(voltage/100+0x30); write((voltage%100/10)+0x30); write(voltage%10+0x30); }

void adc2() { ADCON0=0x10; ADON=1; delay(500); ADCON0 =0x15; while(ADCON0!=0x11); current=ADRESH; command(0x87); //write(current/1000+0x30); write(current/100+0x30); write(current%100/10+0x30); write('.'); write(current%10+0x30); }

void del() {
41

delay(5000); delay(15000); // delay(45000); }

void delay(unsigned int del) { while(del--); } void lcd_init() { TRISB=0X00; TRISE=0X00; // TRISD=0X00; // TRISC=0XFF; command(0x38); command(0x06); command(0x0c); command(0x01); RC4=1; RC3=1; //RC2=1; //RC1=1; RC6=1; } void command(char s)
42

{ PORTB=s; PORTE=0x04; for(i=0;i<125;i++); PORTE=0x00; for(i=0;i<500;i++); } // 0000 0000 // 0000 0100

void write(char s) { PORTB=s; PORTE=0x05; for(i=0;i<125;i++); PORTE=0x01; for(i=0;i<500;i++); } void lcd_dis(const unsigned char *word,unsigned int n) { unsigned char i; for(i=0;i<n;i++) { write(word[i]); } } init_gsm() {
43

// 0000 0001

for(i=0;i<2;i++) {SEND(CSQ[i]);} SEND(0X0D);//SEND(0X0A); for(j=0;j<59000;j++);for(j=0;j<59000;j++);for(j=0;j<59000;j++); //500ms for(j=0;j<59000;j++); for(i=0;i<9;i++) { SEND(CMGF[i]); } SEND(0X0D);//SEND(0X0A); for(j=0;j<59000;j++);for(j=0;j<59000;j++);for(j=0;j<59000;j++); for(j=0;j<59000;j++); //500ms for(i=0;i<8;i++) { SEND(CMGS[i]); } SEND('"'); for(i=0;i<10;i++) { SEND(MOBILE[i]); } SEND('"'); SEND(0X0D);//SEND(0X0A); for(j=0;j<59000;j++);for(j=0;j<59000;j++);for(j=0;j<59000;j+ +);for(j=0;j<59000;j++); SEND('U');SEND('N');SEND('I');SEND('T');SEND(' '); SEND(h1);SEND(h2);SEND(h3);SEND(' '); SEND('A');SEND('M');SEND('O');SEND('U');SEND('N'); SEND('T');SEND(' ');SEND(b1);SEND(b2);SEND(b3);SEND(' '); SEND(0X1A); for(j=0;j<59000;j++);for(j=0;j<59000;j++);for(j=0;j<59000;j+ +);for(j=0;j<59000;j++); for(j=0;j<59000;j++);for(j=0;j<59000;j++); } //500ms

44

SEND(char tx) { TXREG=tx; while(TRMT!=1); TRMT=0; TXIF=0; }

CHAPTER 5 RESULTS AND DISCUSSIONS


In our project for demonstration purpose we have made the following assumptions:

100W load for 10 seconds as 1 unit instead of 1kWhr = 1 unit Instead of using a Timer to generate an interrupt once in 2months we have used a switch to generate an interrupt to transmit the energy consumed and bill amount to the EB office.

Cost per unit as Rs. 5

5.1 CALCULATIONS
Energy = power x time 1 kWhr = 1 unit (actual value) 100W load for 10 seconds = 1 unit (assumed value) P Watts load for 10 seconds in kWhr = P1000103600 kWhr 100 W load for 10 seconds in kWhr = 1001000103600 kWhr = 2.7 x 10-6 P Watts load for 10 seconds in kWhr to be considered as 1 unit, Energy for every 10 seconds = P2.7 x 10-6 kWhr

5.3 RESULTS WITH BULB LOAD


LOAD POWER IN WATTS 100 DURATION IN SECONDS 10
45

UNITS CONSUMED 1

200 300

10 10

2 3

Table 5.3 Results with Bulb Load

CHAPTER 6 CONCLUSION
This proposed Automated Electricity Billing system includes the procedure of sending the amount of energy consumed along with the corresponding cost to the EB office as well as displaying the same in the consumer end. The amount of energy consumed by the customer after a period of 2 months is sent to the EB office. The advantages of this Model are: Automation of all features including calculation of cost for the amount of energy consumed. Saves data using automatic control and storage systems. It involves less cost to communicate.

46

APPENDICES LM78XX FEATURES


Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24 Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection

ELECTRICAL CHARACTRISTICS OF LM7805

47

Table AT.1 Electrical Characteristics of LM7805

ELECTRICAL CHARACTERISTICS OF LM7812

Table AT.2 Electrical Characteristics of LM7812

48

LM7912 GENERAL DESCRIPTION


The LM79XX series of 3-terminal regulators is available with fixed output voltages of -5V, -12V, and -15V. These devices need only one external componenta compensation capacitor at the output. The LM79XX series is packaged in the To-220 power package and is capable of supplying 1.5A of output current. These regulators employ internal current limiting safe area protection and thermal shutdown for protection against virtually all overload conditions. Low ground pin current of the LM79XX series allows output voltage to be easily boosted above the preset value with a resistor divider. The low quiescent current drain of these devices with a specified maximum change with line and load ensures good regulation in the voltage boosted mode.

FEATURES
Thermal, short circuit and safe area protection High ripple rejection 1.5A output current 4% tolerance on preset output voltage

Figure A.1 Connection Diagrams

49

50

Table AT.3 Electrical Characteristics of LM7912

ELECTRICAL CHARACTERISTICS (Continued)

Table AT.4 Electrical Characteristics of LM7912 (Continued) Conditions unless otherwise noted: IoUT = 500mA, CIN = 2.2JF, C Power Dissipation 1.5W. Note 1: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. Operating Ratings indicate conditions for which the device is intended to be functional, but do not guarantee Specific Performance limits. For guaranteed specifications and test conditions, see the Electrical Characteristics. Note 2: Refer to Typical Performance Characteristics and Design Considerations for details. Note 3: Regulation is measured at a constant junction temperature by pulse testing with a low duty cycle. Changes in output voltage due to heating effects must be taken into account.
51
OUT

= 1JF, 0C Tj +125C,

MAX232 GENERAL DESCRIPTION


Meets or Exceeds TIA/EIA-232-F and ITU Recommendation V.28 Operates From a Single 5-V Power Supply With 1.0-jxF Charge- Pump Capacitors Operates Up To 120 kbit/s Two Drivers and Two Receivers 30-V Input Levels Low Supply Current . . . 8 mA Typical ESD Protection Exceeds JESD 22 - 2000-V Human-Body Model (A114-A) Upgrade With Improved ESD (15-kV HBM) and 0.1-uF Charge-Pump Capacitors is available With the MAX202 Applications - TIA/EIA-232-F, Battery- Powered Systems, Terminals, Modems, and Computers

Figure A.2 MAX232 PIN diagram

52

Table AT.5 MAX232 PIN details

DESCRIPTION/ORDERING INFORMATION
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply TIA/EIA-232-F voltage levels from a single 5-V supply. Each receiver converts TIA/EIA-232-F inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V, a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into TIA/EIA-232-F levels. The driver, receiver, and voltagegenerator functions are available as cells in the Texas Instruments LinASIC library.

53

Table AT.6 Operating conditions of MAX232

DRIVER SECTION
Electrical characteristics over recommended ranges of supply voltage and operating free-air temperature range

Table AT.7 Driver Section Electrical Characteristics t All typical values are at VCC = 5 V, TA = 25C. t The algebraic convention, in which the least-positive (most negative) value is designated minimum, is used in this data sheet for logic voltage levels only. Not more than one output should be shorted at a time. NOTE: Test conditions are C1-C4 = 1 |iF at VCC = 5 V 0.5 V.

SWITCHING CHARACTERISTICS, VCC = 5 V, TA = 25C

Table AT.8 Driver Section Switching Characteristics NOTE: Test conditions are C1-C4 = 1 |iF at VCC = 5 V 0.5 V.
54

RECEIVER SECTION
Electrical characteristics over recommended ranges of supply voltage and operating free-air temperature range

Table AT.9 Receiver Section Electrical Characteristics


t t

All typical values are at VCC = 5 V, TA = 25C. The algebraic convention, in which the least-positive (most negative) value is designated

minimum, is used in this data sheet for logic voltage levels only. NOTE: Test conditions are C1-C4 = 1 |iF at VCC = 5 V 0.5 V.

SWITCHING CHARACTERISTICS, VCC = 5 V, TA = 25C

Table AT.10 Receiver Section Switching Characteristics NOTE: Test conditions are C1-C4 = 1 |iF at VCC = 5 V 0.5 V.

55

TL082 GENERAL DESCRIPTION


These devices are low cost, high speed, dual JFET input operational amplifiers with an internally trimmed input offset voltage (BI-FET II technology). They require low supply current yet maintain a large gain bandwidth product and fast slew rate. In addition, well matched high voltage JFET input devices provide very low input bias and offset currents. The TL082 is pin compatible with the standard LM1558 allowing designers to immediately upgrade the overall performance of existing LM1558 and most LM358 designs. These amplifiers may be used in applications such as high speed integrators, fast D/A converters, sample and hold circuits and many other circuits requiring low input offset voltage, low input bias current, high input impedance, high slew rate and wide bandwidth. The devices also exhibit low noise and offset voltage drift.

FEATURES
Wide common-mode (up to Vcc+)and Differential voltage range Low input bias and offset current Output short-circuit protection High input impedance j-fet input Stage Internal frequency compensation latch up free operation high slew rate : 16v/us (typ)

Figure A.3 Pin Diagram of TL082

56

Figure A.4 Schematic Diagram of TL082 ABSOLUTE MAXIMUM RATINGS

Table AT.11 Absolute Maximum Ratings of TL082 All voltage values, except differential voltage, are with respect to the zero reference level of the supply voltages where the zero reference level is the midpoint between VCC+ and VCC-. Differential voltages are at the non-inverting input terminal with respect to the inverting input
57

terminal. The magnitude of the input voltage must never exceed the magnitude of the supply voltage or 15 volts, whichever is less. The output may be shorted to ground or to either supply. Temperature and /or supply voltages must be limited to ensure that the dissipation rating is not exceeded. ELECTRICAL CHARACTERISTICS Vcc = 15V, Tamb = 25oC

58

Table AT.12 Electrical Characteristics of TL082

LCD DISPLAY FEATURES


5 x 8 dots with cursor Built-in controller (KS 0066 or Equivalent) + 5V power supply (Also available for + 3V) 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional for + 3V power supply

Figure A.5 16x2 LCD Display


MECHANICAL DATA
ITEM Module Dimension Viewing Area Dot Size Character Size STANDARD VALUE 80.0 x 36.0 66.0 x 16.0 0.56 x 0.66 2.96 x 5.56 UNIT mm mm mm mm

Table AT.13 Mechanical data of LCD display

59

ABSOLUTE MAXIMUM RATINGS


Operation Voltage(v) 0-5.0 Operation temperature -20-70 C Storage Temperature -30-80 C Character 16x2 lines LCD module Display

DISPLAY CHARACTERISTICS

LCD Display Mode STN Positive, Transflective yellow-green View Angle 6: 00 Driving Method 1/16 Duty, 1/5Bias Backlight yellow-green

Table AT.14 LCD display PIN details

60

RS 232 GENERAL DESCRIPTION


Information being transferred between data processing equipment and peripherals is in the form of digital data which is transmitted in either a serial or parallel mode. Parallel communications are used mainly for connections between test instruments or computers and printers, while serial is often used between computers and other peripherals. Serial transmission involves the sending of data one bit at a time, over a single communications line. In contrast, parallel communications require at least as many lines as there are bits in a word being transmitted (for an 8-bit word, a minimum of 8 lines are needed). Serial transmission is beneficial for long distance communications, whereas parallel is designed for short distances or when very high transmission rates are required.

INTERFACES
In addition to communications between computer equipment over telephone lines, RS-232 is now widely used for direct connections between data acquisition devices and computer systems. As in the definition of RS-232, the computer is data transmission equipment (DTE). However, many interface products are not data communications equipment (DCE). Null modem cables are designed for this situation; rather than having the pin- to-pin connections of modem cables, null modem cables have different internal wiring to allow DTE devices to communicate with one another.

SPECIFICATIONS TRANSMITTED SIGNAL VOLTAGE LEVELS:


Binary 0: +5 to +15 Vdc (called a space or on) Binary 1: -5 to -15 Vdc (called a mark or off)

RECEIVED SIGNALVOLTAGE LEVELS:


Binary 0: +3 to +13 Vdc Binary 1: -3 to -13 Vdc

61

DATA FORMAT
Start bit: Binary 0 Data: 5, 6, 7 or 8 bits Parity: Odd, even, mark or space (not used with 8-bit data) Stop bit: Binary 1, one or two bits

Figure A.6 RS232 DB-9 Pin Diagram

PIN DIAGRAM EXPLANATION


Pin Number 1 2 3 4 5 6 7 8 9 Direction of Signal Carrier Detect (CD) (from DCE) Incoming signal from a modem Received Data (RD) Incoming Data from a DCE Transmitted Data (TD) Outgoing Data to a DCE Data Terminal Ready (DTR) Outgoing handshaking signal Signal Ground Common reference voltage Data Set Ready (DSR) Incoming handshaking signal Request To Send (RTS) Outgoing flow control signal Clear To Send (CTS) Incoming flow control signal Ring Indicator (RI) (from DCE) Incoming signal from Table AT.15 Pin details of RS232

62

PIC 16F877A ANALOG FEATURES


10-bit, up to 8-channel Analog-to-Digital Converter (A/D) Brown-out Reset (BOR) Analog Comparator module with: 1. Two analog comparators 2. Programmable on-chip voltage reference 3. (VREF) module 4. Programmable input multiplexing from device 5. inputs and internal voltage reference 6. Comparator outputs are externally accessible

DEVICE FEATURES

Table AT.16 PIC features


63

Figure A.7 PIC Controller Pin diagram

ANALOG TO DIGITAL CONVERRTER ADCON0 REGISTER

ADCS0: A/D CONVERSION CLOCK SELECTION BIT

Table AT.17 A/D Conversion Clock Selection


64

PORT B FUNCTIONS

Table AT.18 Port B Functions of PIC

PORT D FUNCTIONS

Table AT.19 Port D Functions of PIC

65

REFERENCES
[1] Md. Wasi-ur-Rahman, Mohammad Tanvir Rahman, Tareq Hasan Khan and S.M. Lutful Kabir, (2009), Design of an Intelligent SMS based Remote Metering System, Proceedings of the 2009 IEEE International Conference on Information and Automation, pp1040-1043 [2] [3] Michel Mouly, Marie-Bernadette Pautet (1992), The GSM System for Mobile Rodney, H.G., Lee, C.H., Kean, C.S. and Mok, V.H. (May 2008), Automatic power Communications, Telecom Publishing meter reading and distribution control using ICT and GSM Networks, Proceedings of the 1st International Conference of P79-1 the IET Brunei Darussalam Network, 26-27 [4] [5] [6] [7] [8] [9] Roy Choudhury, D and Shail J. Jain (2003), Linear Integrated Circuits, New Age Salivahanan, S., Suresh Kumar, N. and Vallavaraj (2007), Electronics Devices and Sawhney, A.K. (2005), A Course in Electrical and Electronic Measurements and Tariq Jamil, (2008), Design and Implementation of a Wireless Automatic Meter Venables, M. (2007), Smart meters make smart consumers, IET Control and Vijayaraj, A. and Saravanan, R. (2010), Automated EB billing system using GSM International Publishers Circuits, The McGraw-Hill Companies Instrumentation, Dhanpat Rai & Co. publications Reading System, Proceedings of the World Congress on Engineering Vol I, pp217-221 Automation, Vol. 2, No. 4, p23 and Ad-hoc wireless routing, International Journal of Engineering and Technology Vol.2 (5), pp343-347

66

Das könnte Ihnen auch gefallen