You are on page 1of 72

Department Of Electronics & Communication Engg

CHAPTER NO. 01

INTRODUCTION

RF Based AMR

Department Of Electronics & Communication Engg

INTRODUCTION

1. What is AMR?
Although there are a variety of industry definitions, Automatic Meter Reading (AMR) generally is regarded as the reading of a utility meter by a means that does not require physical access or visual inspection of the meter. A typical AMR system has several main components: meter, meter interface unit (MIU), a communications network and host computer. Normally, within an AMR system (see Figure 1), the meter data is passed from the meter to an MIU, which may be external to the meter or integrated within the body of the meter. In addition to the meter data, other pertinent information may be stored within the MIU, such as any tamper or alarm conditions. This device forms the interface between the meter and the communications network. Many communications networks have been used for AMR, including modulated radio frequencies (RF), telephone lines or GPRS mobile phone networks. Depending on the network used, information from the MIU may be retrieved and stored in intermediate nodes or delivered directly to the utility. In the case of an RF network this may be a hand-held receiver, a mobile unit, such as a van, or a node on a fixed network.

RF Based AMR

Department Of Electronics & Communication Engg

In Maharashtra, there are more than crore meters for electricity that are read every month, at a cost in salaries, transportation and other expenses that tops Rs. 3848.4 crore (20062007) . A meter-reading system would still require someone driving by every meter and getting a reading through a hand-held receiver, but even newer technology - called an automatic meter reading system (AMR) - would eliminate even that need. An AMR is a sophisticated communication link directly from the meters to the central office computers that will also speed locating service interruptions, faulty meters and service theft, as well as allowing for expanded services, such as flexible billing dates, time-of-use rates and prepaid accounts. Meters could also be turned on or off directly from the office rather than having to send out an employee to do it manually. The study shows an AMR system would save almost 2-3 crore per year by eliminating meter-reading, automating disconnects/reconnects, reducing bad debts and improving meter accuracy and reducing theft of service another positive element of the project would be lower costs for services to the consumer as well. Many service providers of electricity, water, and gas are trying to implement this system. For example Northern Ireland Water Supply Company had specified it requirements and waiting for tenders. Maharashtra state electricity board has also specified its requirements in 20042005.

RF Based AMR

Department Of Electronics & Communication Engg

2. Communication Type One-way


One-way systems, as its name implies communicate normally in one direction only. Typical AMR systems that use one-way have the remote metered device transmit information from the meter location to a central receiver. In some cases, one-way systems might have a "wake-up" that alerts the remote devices to turn on and begin transmitting, in other cases, the end units transmit all the time. The cost of a one-way transmission system is normally lower than that of a full two-way system. One-way systems are ideal for applications that require only basic information to be communicated. The frequency of how often a one-way system can be read is dependent on the receiving system. Some fixed network one-way systems can deliver information from remote devices every 15 minutes.

Two-way
Two-way systems, as the name implies, permits the communication of information from the remote meter location to the receiver, as well as, from the receiver to the remote meter location. These systems offer utilities more functionality, including on-demand meter reading, retariffing of the meter remotely, recharging of a pre-payment metering, immediate power failure alerts, remote connect and disconnect services, and other advanced services.

Why Use Automatic Meter Reading?


In the past, one of the main drivers for a utility's interest in AMR has been to reduce the cost of performing meter reading. Although cost reduction remains a significant influence in the growth of AMR, the worldwide deregulation of the gas and electric utility markets has accelerated the interest in AMR systems. Within a deregulated utility environment, customers may have a choice for selecting their energy source provider. As a result, many utilities are becoming more competitive and are moving toward operating in an open market environment, where prices are set on an hourly basis through supply and demand mechanisms. The implications and implementations of this open market environment often place an additional need on the utility that moves toward AMR beyond their need to improve service and to reduce their operating costs. In many cases, meter data must be provided to multiple parties such as the local distribution company (LDC), the energy service provider (ESP), an energy service
4
RF Based AMR

Department Of Electronics & Communication Engg

company (ESCO) and even the regional transmission operator (RTO) in a timely and accurate basis. Further, customers have come to anticipate, as well as, demand that their metering and billing is accessible on-line. Recently energy services have been migrating toward real-time pricing structures, with time of day (TOD) or time of use (TOU) financial mechanisms as incentives or penalties to drive a consumption behavior. Depending on the type of AMR system deployed a utility may use this infrastructure to accomplish this time of use metering without having to change the meter unit itself.

*****

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 02

LITERATURE SURVEY

RF Based AMR

Department Of Electronics & Communication Engg

LITERATURE SURVEY
This article reviews the technical features of automatic meter read(AMR) systems for residential small commercial natural gas meters, including a look at the new static gas meters. AMR systems are today quite widespread for electrical residential meters, but are still in an experimental (pilot projects) stage for other applications in utility meters, such as natural gas residential and small commercial meters. AMR systems allow the recording of gas consumption in an efficient way with some important advantages for the overall gas system, both for the provider and for the user. The main AMR benefits for the customer are: * Convenience. Meter readers are eliminated; * Efficiency. The AMR system eliminates estimated meter reads; and * Accuracy. The electronic unit of AMR, equipped with a reliable encoder technology, is more accurate than manual (or semi-manual) meter reads, thereby eliminating human errors.

Utility management faces a multitude of tough choices. Should they invest in solidifying the network to better serve customers or invest in reducing the price to retain customers? Do they focus on restoring loads or restoring customers services? Which customers do they restore first - commercial and industrial (C&I) or residential? Should they be improving their network infrastructure, trying to defer costs, or some of both? Clearly, the best decisions are based on information.

Utilities need information and, in particular, usage data to face a myriad of challenges in the current landscape of customer expectations, workforce productivity, aging infrastructures, energy supply costs, deregulation uncertainties, acquisitions and mergers, globalization and competition.

New enablers such as automated meter reading (AMR) can be applied to capture and leverage information to help utilities proactively achieve these competitive objectives. Advanced capabilities such as predictive analysis, simulation tools, contingency analysis and network monitoring can go far in giving utilities the power to be successful. Automated meter reading systems are an attractive technology for cutting costs while increasing speed and control of metering activities. When organizations, such as utilities, military installations, large industrial parks and school districts consider automated meter reading
7
RF Based AMR

Department Of Electronics & Communication Engg

technology, they discover most available systems carry high initial capital costs. Organizations that purchase systems without first evaluating the full costs and benefits often find they are locked into a technology that accomplishes less than they need.

The industry has come far since walk-by meter reading, when the data of each meter was manually noted on paper or entered into a handheld device, eventually making its way into the office through further manipulations by levels of clerks until being captured electronically. Each level of that process took time and was error prone. The introduction of handheld devices saved time and reduced errors. Drive-by metering further improved the data collection process.

However, the costs and logistics in planning optimal routes and resources remain a challenge. Many utilities have equipped their workforce with street-level routing software. While this solution helps to some degree, it brings with it additional software implementation and maintenance costs. Another problem is energy consumption. The more work being requested of these electronic devices, the more energy they consume. Unlike analog devices, some electronic meters work from batteries, requiring additional maintenance and repair activities. The fully automated meter reading solution addresses most of these problems since the entire process of gathering the information is achieved without human intervention. AMR systems are used to automate the acquisition of remote meter data, but also to reduce workforce expenses and increase the quality of the data captured.

This report on Automated Meter Reading Technologies explores this emerging industry in depth, focusing on the manufacturers and suppliers of AMR technology and equipment, and current trends in the AMR industry. The report also explores the market statistics pertaining to water utilities, available technology, current business requirements, and much more. The report takes a look at the newly gained interest of venture capitalists in automated meter reading technology markets and how it is affecting the industry overall. Read on to find out how this new technology is changing the today utility landscape.

*****

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 03

DESIGN OF PROPOSED WORK

RF Based AMR

Department Of Electronics & Communication Engg

DESIGN OF PROPOSED WORK


CURRENT MANUAL SYSTEM

Lets try to expand the problems in manual meter reading on the following resources:

1. Meter reading resource: Time


1. Time to access the site. 2. Time to read the meter manually.

2. Meter reading resource: Accuracy/re-work/Manpower cost.


1. Accuracy of noting the readings. 2. Chances of errors while reading. 3. Errors while recording what was read. 4. Errors during data entry.

3. Meter reading resource: Hard to access meters: (any meter which takes more than 15 minutes to access)
1. Rural accounts 2. Indoor meters 3. Obstacles

4. Manual Meter reading: Commercial Implications


1. Conveying tamper recording remains on the meter readers 2. No clue on demand/ over drawls by the consumer. 3. Delay in meter readings, delay bills, delayed revenue, delay in cash-flow loyalty.

5. Cost associated with meter reading


The cost associated with meter reading can have the following headings: Meter reading: Cost Cost heading Manpower cost Transportation cost Sub cost headings Salaries, Risk and insurances Cost of ownership (Vehicle),variable cost (Fuel)
10
RF Based AMR

Department Of Electronics & Communication Engg

PROPOSED SYSTEM
AMR stands for Automatic Meter Reading. A device which remotely obtain meter readings and transmits this data to the systems computer via communication media such as phone lines, power lines, GSM, or dedicated cables for processing. AMR devices can detect outages, remotely connect and disconnect services, detects tampering as well as other uses. Economic benefits include increased cash flow, lower labor and equipment cost, increased accuracy and lower costs. Some customer satisfaction benefits include improved service quality, more customer choices and faster response time. A typical Automatic Meter Reading (AMR) set up can be conceptualized using the following block diagram.

FIG 1: BLOCK DIAGRAM OF AMR SYSTEM From block diagram we can see that the AMR system consist of following components 1. Energy Meter 2. Interfacing Device 3. Data Communication Media 4. Remote PC with compatible software

1. Energy Meter:
Energy meter is a device which is used to measure the energy consumed by the customer .Basically energy meter is of two types Electro-Mechanical meter and Digital meter. Now a days digital meter are used because they are having high accuracy, with limited control and theft detection capability at nodes.

11

RF Based AMR

Department Of Electronics & Communication Engg

2. Interfacing Device:
It is a device which takes out readings from meter and passes those readings to the remote pc through communication media. It also consists of a circuit which can switch ON/OFF power supply of customer.

3.Data Communication Media:


For transporting the data from the energy meter to the Host PC a communication media is necessary. Communication can be done by two ways, a. Wired Communication: power lines, phone lines, dedicated lines. b. Wireless Communication: RF, GSM, GPRS. Service provider can use any communication media depending upon the services available to the service provider.

4. Remote PC with compatible software:


The heart of the meter reading station is the Meter Reading Software which resides in the PC at the Meter Reading Station. It is a standalone system which is responsible for collecting meter reading, storing them to the data base, calculation of bills, switching ON/OFF of power supply, and providing analysis facility.

*****

12

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 04

SOFTWARE/HARDWA RE REQUIREMENT

13

RF Based AMR

Department Of Electronics & Communication Engg

SOFTWARE/ HARDWARE REQUIREMENT

System Design Hardware Optocoupler (MCT2E) Switching transistor Relay Interfacing IC Serial RS232 port BUS Voltage regulator IC (7805) Microcontroller RF Transceiver Module Step down transformer Mobile phone

Software Requirements
VB Microsoft Access

14

RF Based AMR

Department Of Electronics & Communication Engg

Hardware Side:
Hardware side consist of interfacing device .This device consist of three functional units these are as follows 1. Power supply unit 2. Reading collector unit 3. Switching unit

1. Power supply unit

Fig 2: power supply

15

RF Based AMR

Department Of Electronics & Communication Engg

FLOWCHART FLOWCHART FOR POSTPAID

16

RF Based AMR

Department Of Electronics & Communication Engg

Hardware Components
RF Transceiver Module 433 Mhz
TR433 is an FSK Transceiver module, which is designed using the Chipcon IC(CC1100). The TR433 is a true single-chip UHF transceiver, It base on 3 wire digital serial interface and an entire Phase-Locked Loop (PLL) for precise local oscillator generation .so the frequency could be setting. It can use in UART / NRZ / Manchester encoding / decoding. TR433 is a high performance and low cost module. It could easily to design product requiring wireless connectivity. It can be used on wireless security system or specific remote-control function and others wireless system. Operating Range is 100 mts.

ST1197 Serial Interface IC

ST1197 Serial Interface IC supports any RF based modules/transreceiver which is based on Texas Instruments Chipcon ICs like CC1100(433 Mhz) and CC2500(2.4 Ghz). It provides a simple UART interface for transmission and reception of serial data at 9600 bps. It can be used for applications that need two way wireless data transmission. The communication protocol is self controlled and completely transparent to user interface. The IC can be embedded to your current design so that wireless communication can be set up easily.

Optocoupler MCT2E
There are many situations where signals and data need to be transferred from one subsystem to another within a piece of electronics equipment, or from one piece of equipment to
17
RF Based AMR

Department Of Electronics & Communication Engg

another, without making a direct ohmic electrical connection. Often this is because the source and destination are (or may be at times) at very different voltage levels, like a microprocessor which is operating from 5V DC but being used to control a triac which is switching 240V AC. In such situations the link between the two must be an isolated one, to protect the microprocessor from over voltage damage. Relays can of course provide this kind of isolation. Because theyre electro-mechanical, relays are also not as reliable. And only capable of relatively low speed operation. Where small size, higher speed and greater reliability are important, a much better alternative is to use an optocoupler. These use a beam of light to transmit the signals or data across an electrical barrier, and achieve excellent isolation. Optocouplers typically come in a small 6-pin or 8-pin IC package, but are essentially a combination of two distinct devices: an optical transmitter, typically a gallium arsenide LED (light-emitting diode) and an optical receiver such as a phototransistor or light-triggered diac. The two are separated by a transparent barrier which blocks any electrical current flow between the two, but does allow the passage of light. Along with the usual circuit symbol for an optocoupler. Usually the electrical connections to the LED section are brought out to the pins on one side of the package and those for the phototransistor or diac to the other side, to physically separate them as much as possible. This usually allows optocouplers to withstand voltages of anywhere between 500V and 7500V between input and output. Optocouplers are essentially digital or switching devices, so theyre best for transferring either on-off control signals or digital data. Analog signals can be transferred by means of frequency or pulse-width modulation. The package consists of a gallium-arsenide infraredemitting diode and an npn silicon phototransistor mounted on a 6-lead frame encapsulated within an electrically nonconductive plastic compound. The case can withstand soldering temperature with no deformation and device performance characteristics remain stable when operated in highhumidity conditions. Unit weight is approximately 0.52 grams.

Figure-MCT2E Package (Top view)

18

RF Based AMR

Department Of Electronics & Communication Engg

Microcontroller AT89C2051

The AT89C2051 is a low-voltage, high-performance CMOS 8-bit microcomputer with 2K bytes of Flash programmable and erasable read-only memory (PEROM). The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89C2051 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89C2051 provides the following standard features: 2K bytes of Flash, 128 bytes of RAM, 15 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a full duplex serial port, a precision analog comparator, on-chip oscillator and clock circuitry.

Features
Compatible with MCS-51 Products

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

.Low-power Idle and Power-down Modes


RS232 serial connector pin assignment
The RS232 connector was originally developed to use 25 pins. In this DB25 connector pinout provisions were made for a secondary serial RS232 communication channel. In practice, only one serial communication channel with accompanying handshaking is present. Only very few computers have been manufactured where both serial RS232 channels are implemented. Examples of this are the Sun SparcStation 10 and 20 models and the Dec Alpha Multia. Also on a number of Telebit modem models the secondary channel is present. It can be used to query the modem status
19
RF Based AMR

Department Of Electronics & Communication Engg

while the modem is on-line and busy communicating. On personal computers, the smaller DB9 version is more commonly used today. The diagrams show the signals common to both connector types in black. The defined pins only present on the larger connector are shown in red. Note, that the protective ground is assigned to a pin at the large connector where the connector outside is used for that purpose with the DB9 connector version.

RS232 DB9 pinout


The pinout is also shown for the DEC modified modular jack. This type of connector has been used on systems built by Digital Equipment Corporation; in the early days one of the leaders in the mainframe world. Although this serial interface is differential (the receive and transmit have their own floating ground level which is not the case with regular RS232) it is possible to connect RS232 compatible devices with this interface because the voltage levels of the bit streams are in the same range. Where the definition of RS232 focussed on the connection of DTE, data terminal equipment (computers, printers, etc.) with DCE, data communication equipment (modems), MMJ was primarily defined for the connection of two DTE's directly.

Step Down Transformer


Transformers are static device which convert the electrical energy from one circuit to another circuit without any change in frequency and power. Step down transformer means the transformer which reduces the supply voltage to the desired value. In our project we need 12 volt DC supply, therefore in this project 12-0-12, 500mA transformer is used.

Relay
A relay is an electrically operated switch. Many relays use an electromagnet to operate a switching mechanism, but other operating principles are also used. Relays find applications where it is necessary to control a circuit by a low-power signal, or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another. Relays found extensive use in
20
RF Based AMR

Department Of Electronics & Communication Engg

telephone exchanges and early computers to perform logical operations. A type of relay that can handle the high power required to directly drive an electric motor is called a contactor. Solid-state relays control power circuits with no moving parts, instead using a semiconductor device to perform switching. Relays with calibrated operating characteristics and sometimes multiple operating coils are used to protect electrical circuits from overload or faults; in modern electric power systems these functions are performed by digital instruments still called "protection relays". Voltage Regulator IC (7805) The LM341 and LM78MXX series of three-terminal positive voltage regulators employ built-in current limiting, thermal shutdown, and safe-operating area protection which makes them virtually immune to damage from output overloads. With adequate heat sinking, they can deliver in excess of 0.5A output current. Typical applications would include local (on-card) regulators which can eliminate the noise and degraded performance associated with single-point regulation.

Fig. IC 7805

21

RF Based AMR

Department Of Electronics & Communication Engg

SOFTWARE SIDE:

VISUAL BASIC
VISUAL BASIC is the super set of BASIC LANGUAGE. BASIC is windows, it provides graphical user interface (GUI). Since it is GUI application build in VB are more attractive. VB was launched in 1997 in which local database and remote data base connectivity is possible. VISUAL BASIC is the fastest and easiest way to create applications for Microsoft windows programming VISUAL BASIC provides with a complete set of tools to simplify rapid application development. VISUAL part return to the method to create the graphical user interface (GUI). Instead of writing various lines of code for creating the appearance and location, we can directly place the object and the screen and set its different properties such as shape, colour etc. BASIC part refers to the BASIC (Beginners All Purpose Symbolic Instruction Code) language VISUAL BASIC has evolved from the original BASIC language and now contains several hundred statements, functions and keyboards, may of which relate directly to the windows GUI. Any beginner can create the application by just learning a few of the keywords. One of the most significant change in visual basic. 6.0 are the Integrated Development Environment (IDE).IDE is a term commonly used in the programming world to describe the interface and environment that we use to create our application. It is called integrated because we can access virtually all of the development tools that we from one screen called an interface. The IDE is also commonly referred to as the design environment, or the program. Visual basic programs are builds around events. Events are various things that can happen in a program. This will becomes clearer when studies in contrast to procedural programming. In procedural languages, a application written is executed by checking for the program logically through the program statement, one after another. For a temporary phase, the control may be transferred to some other point in program. While n an event driven application, the program statement is executed only when a particular event calls a specific part of the code that is assigned to the event. The code entered in the change event fires when there is a change in the contents of the text box

22

RF Based AMR

Department Of Electronics & Communication Engg

event fires when the text box control is clicked. move event fires when the mouse is move over the text box.

The The

click mouse

DATABASE
To launch Access, click the Microsoft Access button on the Microsoft Office Shortcut Bar, or click the Start button and choose Programs Microsoft Access from the menu. When Access starts, youll see a dialog box like the one. The names you see listed in the bottom half of the dialog box will vary depending on the database projects youve already started. At this point, you can.

Explore created

Create a database from scratch or with the Database Wizard Create a data access page for viewing Access data with Internet Create an Access project Open a database or project youve already

23

RF Based AMR

Department Of Electronics & Communication Engg

ELEMENTS OF AN ACCESS DATABASE

The heart of a database is the information it holds. But there are other important elements, usually referred to as objects, in an Access database. Here are the kinds of objects youll be working with: Tables hold information. Queries let you ask questions about your data or make changes to data. Forms are for viewing and editing information. Pages are HTML (Hyper Text Markup Language) Reports are for summarizing and printing data. Macros perform one or more database actions automatically. Modules are another type of Access object that you may or may not work with. A module is a program you write using VB (Visual Basic, the programming language included with Office) to automate and customized database functions. Youll see how to create a customized database, but it will all be done without programming.

*****

24

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 05

IMPLEMENTATION OF PROPOSED PROJECT WORK

25

RF Based AMR

Department Of Electronics & Communication Engg

IMPLEMENTATION OF PROPOSED PROJECT WORK


POWER SUPPLY
Power supply is the first and most important part of our project. In the proposed project the power supply circuit is used to provide the regulated supply to the IC`s used in the project. Power supply circuit consists of step down transformer, rectifier circuit, filter circuit and regulator IC.

Fig: Circuit diagram of power supply

INPUT AC SUPPLY

STEP DOWN TRANSFORMER

RECTIFIER CIRCUIT

FILTER CIRCUIT

REGULATED IC

Fig: Block diagram of power supply

26

RF Based AMR

Department Of Electronics & Communication Engg

DESCRIPTION OF POWER SUPPLY Step Down Transformer


Transformers are static device which convert the electrical energy from one circuit to another circuit without any change in frequency and power. Step down transformer means the transformer which reduces the supply voltage to the desired value. In our project we need 12 volt DC supply, therefore in this project 12-0-12, 500mA transformer is used.

Rectifier Circuit
Rectifier is a circuit which converts the AC electrical energy into Dc electrical energy. For operating of semiconductor devices used in this project we need regulated DC supply. In this project we use centre tap full wave rectifier. Full wave rectifier circuit is capable of converting sinusoidal input into a unidirectional output. The circuit diagram is as shown in the figure.

Filter Circuit
It is seen that the output of the rectifier is not pure DC, because it contain some amount of AC component which is called as ripple factor which gives the fluctuation and hence to minimize the ripple in the output the filter circuit is used. This circuit is connected after the rectifier circuit. In our project capacitor input filter is used. The circuit is as shown in the figure. The capacitor is connected in parallel to minimize the ripple factor.

Regulator Circuit
In our project for the operation of IC we need +5 volt regulated supply is necessary therefore a voltage regulator circuit is used. A voltage regulator is a circuit that supplies constant voltages regardless of change in the load current. IC voltage regulators are versatile and generally used. The 7800 series consist of three terminal positive voltage regulators. These ICs are designed as fixed voltage regulator and adequate heat sink. It can be deliver output current in access of 1A. These devices do not required external component. These ICs has internal terminal overload protection and internal short circuit and current limiting protection.

27

RF Based AMR

Department Of Electronics & Communication Engg

Pulse Count Display Circuit using Microcontroller

28

RF Based AMR

Department Of Electronics & Communication Engg

Blink Count, Tempering sensing and Data Transmitting circuit

Tempering sensor using IC KA2281

29

RF Based AMR

Department Of Electronics & Communication Engg

Here we use 8bit microcontroller with 4kb Flash memory AT 895532, optocoupler DC MCT2E, AT 24C02 EEPROM DC, and 16X2 LCD, MCT2E is connected to Blink LED of the Energy meter, when load applied at the output of the Energy meter, Energy meter send signal of the input of MCT2E LED. When LED emits light is falling of internal photo transistor of the MCT2E and current flowing through the transistor. The collector pin of the photo transistor is connected to the pin P3.2 of the microcontroller. Program stored in the microcontroller ROM reads the Blink input and process it and display the count at the 16x2 LCD display which are connected at port P0. IC 24C02 is EEPROM which is connected to store Blink count. When power is off, the count is store in the EEPROM IC, When power is ON controller recalls the stored value from EEPROM IC and display in the 16x2 LCD display. R5,10K Resistance is connected to adjusting contrast of the 16x2LCD display,12MHz crystal gives the clock signal to the microcontroller. DC KA2281 is a BAR/Graph display-DC. Phizo electric sensor is connected at the input of the DC KA2281. When someone want to temper the energy meter the vibration goes to the phizo sensor, phizo sensor converts this vibrations or mechanical energy in to the electrical signal and fed to the KA2281, IC amplify and convert this signal form in BAR Graph. One of this BAR Graph output is connected to the microcontroller input pin p0.1. Blink signal from the MCT2E is connected to the microcontroller DC input pin p0.0. Microcontroller program converts this two input at p0.0 And p0.1 in to serial signal or TTL signal of the input of ST1197 serial interface IC for RF transreceiver. IC 1197 encodes this signal and sent to RF transreceiver 433MHz RF transreceiver CC1100 base module converts this electrical signal into electromagnetic waves and send it into air. We use IC MCT2E optocoupler to actuate and deactuate the Relay. Relay is used to ON/OFF the load are not paid.

30

RF Based AMR

Department Of Electronics & Communication Engg

Load ON/OFF Circuit using MCT2E

TRANSRECEIVER CIRCUIT USING MAX232, ST1197 AND RF MODULE

When data transmitted by the customer side module then it is receive by CC1100 based RF module and send this electrical signal to the ST1197-serial interface IC for RF transreceiver. This IC 1197 converts this signal into TTL(3-5V) logic level and send to MAX 232 which are TTL to serial or serial to TTL convertor. This converted serial signal is finally send to the computer RS232 serial port for process.

31

RF Based AMR

Department Of Electronics & Communication Engg

SMS Alert

SMS billing payment method which enables the customer to pay for merchandise and services by means of SMS sent to a special short code. Such a service is called Premium SMS (PSMS) and the price of such an SMS is higher then of a regular one. The SMS payment is billed to consumers mobile phone. Service set up process varies from a very simple one up to the one requiring high level of programming skills. Services connection and maintenance are totally free of charge. The SMS specification has defined a way for a computer to send SMS messages through a mobile phone or GSM/GPRS modem. A GSM/GPRS modem is a wireless modem that works with GSM/GPRS wireless networks. A wireless modem is similar to a dial-up modem. The main difference is that a wireless modem transmits data through a wireless network whereas a dial-up modem transmits data through a copper telephone line. Most mobile phones can be used as a wireless modem. However, some mobile phones have certain limitations comparing to GSM/GPRS modems. To send SMS messages, first place a valid SIM card from a wireless carrier into a mobile phone or GSM/GPRS modem, which is then connected to a computer. There are several ways to connect a mobile phone or GSM/GPRS modem to a computer. For example, they can be connected through a serial cable, a USB cable, a Bluetooth link or an infrared link. The actual way to use
32
RF Based AMR

Department Of Electronics & Communication Engg

depends on the capability of the mobile phone or GSM/GPRS modem. For example, if a mobile phone does not support Bluetooth, it cannot connect to the computer through a Bluetooth link. After connecting a mobile phone or GSM/GPRS modem to a computer, you can control the mobile phone or GSM/GPRS modem by sending instructions to it. The instructions used for controlling the mobile phone or GSM/GPRS modem are called AT commands. (AT commands are also used to control dial-up modems for wired telephone system.) Dial-up modems, mobile phones and GSM/GPRS modems support a common set of standard AT commands. In addition to this common set of standard AT commands, mobile phones and GSM/GPRS modems support an extended set of AT commands. One use of the extended AT commands is to control the sending and receiving of SMS messages.

33

RF Based AMR

Department Of Electronics & Communication Engg

PCB LAYOUT

Fig: PCB Layout for meter side transreceiver

Fig: PCB Layout for LCD display

34

RF Based AMR

Department Of Electronics & Communication Engg

Fig: PCB Layout for PC side transreceiver

PCB DESIGNING
The name printed circuit board suggests that printing processes involved in drawing the artwork on the board. And printing processes are often used to transfer an image to a PCB.

Rules for Layout


PCB interconnects various electronics component by an interconnectivity pattern. The general considerations are: 1. Mechanical consideration: size, shape, mounting of PCB, etc. 2. User system consideration: that is whether for consumes or 4. Easy of maintenance. laboratory or industry etc. 3. Electrical and electronics parameter such as impedance gain, electromagnetic coupling etc.

35

RF Based AMR

Department Of Electronics & Communication Engg

Art Work
For photographic reduction process the artwork should provide maximum contact between the portion to be each away and those to be left. Thus the art work should be generated on white sheet with black ink. A polyester foil can also be used with sticking tape and prepare artwork but it is costly. Tracking paper may be used but it is not stable with temperature. Basic Methods of Preparing Artwork Ink the drawing. The method is cheap. High quality water proof ink base is to be used. Using black tape and sticking pattern. Using red and blue transparent tape.

Etching of PCB
Etching is the process of chemically attacking and removing the unprotected copper from the copper plate to yield the desired conductor pattern. The most common enchant used in the industry is ferric chloride. The erotically anyone of the following solution can be used to make PCB. 1. ammonium per sulphate 2. chromic acid 3. cupric acid 4. ferric chloride Method of etching includes tray rocking tank etching and spray etching. Out of there May rocking is the simplest one. This consist of the tray of Pyrex glass, attached to a powered rocking table is not available , rocking of the tray with etching solution and the plate can be done manually also. Ferric chloride crystal of 500 gms are mix in water to make a total solution of 1 liter. During the etching process the connection weakens because the soluble cupric acid ferric ions precipitate out of the solution in the form of sludge that rends to settle on the bottom on the etching vat. Ideal etching condition required that the enchant be related to the temperature of between 60 to 70. The copper plate is immersed in enchant solution with copper side up in the tray. Only one board should be etched at one time. As the table is rocked the unprotected copper is dissolves. When etching is completed the resist material is remove by using lacquer thinner or acetic acid or petrol. After the board is infected and proved. It is ready for whole drilling, component mounting and soldering.
36
RF Based AMR

Department Of Electronics & Communication Engg

Drilling
Drilling is performed with the help of drilling machine. While doing drilling needles was change according to the required diameter of the hole is to be made.

Mounting
After drilling mounting of the component is done. On PCB respective component was placed imperfective holes and finally soldered. After soldering the PCB was ready to be connected to the respective relays and supply. Before than wiring diagram areas draw which decide the external wire connection to the PCB

*****

37

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 06

TESTING

38

RF Based AMR

Department Of Electronics & Communication Engg

TESTING
Testing is the main event, which has its own importance in the electronics field. Testing is the process to find the output performance and fault of the circuit in the various forms. The main objective of the testing is to check the output performance as per our assumption. The least carelessness may lead to the major fault in case of electronics circuit and it is depend upon the layout and design of the PCB. Printed circuit board are used to route electrical current and signal through the copper tracks which are primarily bounded to an insulating core. For the testing of any electronics circuit some common steps are performed. These steps are as follows. To check the main power source. To tress out the circuit. In which following steps are followed.

1). The tracks are not open. 2).The distances between two tracks are sufficient to avoid capacitance. 3).The track linked with the other related tracks is proper or not. 4).The jumper which goes from one track to another track should not short with the tracks which are in between required two. Thus by testing the tracks of the printed circuit board it helps the project for making successful. After testing copper tracks the component were tested with the help of instrument like multimeter, CRO, signal generator etc. After mounting the component on the PCB the possibility of the dry soldering was checked to avoid the possibility of shorting those tracks as well as the tracks were checked individually to avoid the possibility of opening those tracks. This testing was carried out with the help of multimeter keeping in range of Ohm. After all check the power was supplied and the operation of the circuit it was observed. Check the supply voltage and voltages at the points where it is known or expected to be of certain value. Check the output voltage and waveform of the circuit by the equipment such as CRO, signal generator. Thus by checking the above aspects, it helps the project to become successful.

39

RF Based AMR

Department Of Electronics & Communication Engg

Testing of Power supply circuit The entire components are tested with the help of multimeter. After testing of component we fix the component on the wet board. Now we give the supply to the transformer and input waveform is to be checked. This procedure is simultaneously carried out for Rectifier, Filter and Regulator circuit. We check the waveform but it is not according to our assumption, because the waveform is started and then it goes to decreasing. Due to this the output voltage is also decreases.

WAVEFORM OF FULL WAVE CENTER TAP RECTIFIER

For such a fault we test the power supply circuit step by step and found that the regulator IC is not work as per our assumption (that means it is faulty). Hence we replace the regulator IC and check the output waveform and voltage that it is as per our assumption. At that condition we stop the testing of power supply.

40

RF Based AMR

Department Of Electronics & Communication Engg

Testing of Switching Circuit


For switching circuit firstly we check the tracks that there should be no defect. Then we mount the component and give the supply to the circuit and input from PC and check the output performance of the circuit. The circuit is work as per our assumption.

Assembling and testing of the total project


After testing and confirm the output of the individual circuit we connect all this circuit is as shown in the figure. When we make the circuit carefully connect all the connecting wire and to avoid loose connection soldered and check the continuity of the wires and tracks by the multimeter. And then give the supply to the input side of the circuit and checks all modes on output side of the circuit. After completing all modes and operation are works as per our assumption.

*****

41

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 07

ADVATAGES OF AMR

42

RF Based AMR

Department Of Electronics & Communication Engg

ADVANTAGES OF AUTOMATIC METER READING


Benefits of AMR to utilities include:
Reduced meter reading costs Ability to access difficult-to-read meters Improved customer service Reduced percentage of estimated bills Improved meter reader safety Implementation of real-time pricing Reduced read-to-bill time Distribution automation Improved fraud detection

Reduced meter reading costs:


Conventional meter reading is a labor-intensive process and can represent a considerable percentage of a utility's operating cost. In addition to the labor component, ancillary elements such as vehicle costs, insurance claims, uniforms, etc. are recurring costs that can be avoided by using a technology solution. Further, in many areas public utility commissions have placed limitations on the number of times that a utility can estimate a meter reading.

Ability to access difficult-to-read meters:


In many cases, utility meters are located within the customer's premises. This is particularly true for water meters in areas where the temperatures may cause the meter to freeze. Accessing these meters often requires the meter reader to gain physical access to the meter to read it. With economic conditions today, the problem of gaining access to the home has grown as more and more people left the home for work. For example, the proportion of US households unoccupied during the day has risen from around 25% in 1960 to over 50% today. This has led to a large rise in estimated bills, re-reads, lost revenues, and undetected meter tampering or theft.

Improved customer service:


In a deregulated environment, customer satisfaction and retention are key components of a successful utility. AMR can help utilities improve customer service by providing timely and accurate bills, automating outage notification, reducing customer disruptions caused by manual reads and improving the process of resolving meter reading disputes. Additionally, there is heightened customer sensitivity about allowing strangers access into homes.
43
RF Based AMR

Department Of Electronics & Communication Engg

Improved meter reader safety:


Whether it is a dog, a high crime area or a confined space, meter readers today can easily find themselves in unsafe environments. AMR helps to reduce the threat of dangerous situations by automating the meter data collection process.

Implementation of real-time pricing:


Variable rate tariffs based on the time of day can be used to encourage consumers to shift their consumption of valuable resources to off-peak hours, while also discouraging the usage during peak hours. This enables energy producers to reduce the maximum capacity of their plant and therefore achieve a better return on capital.

Reduced read-to-bill time:


AMR allows utilities to reduce their read-to-bill time, by tightly integrating the meter data capture and billing process. In many cases, improved meter data acquisition permits utilities to increase billing frequency or offer more billing options to their customers.

Distribution automation:
AMR can allow utilities to provide better customer service by enabling a greater level of functionality over their distribution network, including: remote credits to pre-payment meters, remote connect/disconnect services, tamper/leak detection and outage notification.

Improved fraud detection:


AMR allows utilities to detect whether or not a meter has been tampered with or if wires have been cut at the meter. The system will flag the account with a code notifying the meter reader to investigate the situation.

Benefits of AMR to the utilities' customer:


Accurate billing statements and improved customer service through the reduction of

estimated readings and billings


Improved meter reading accuracy through the reduction of errors from manual readings Improved security because the meter readers no longer need to gain access to the property

or households
Customers can move more easily between different rates creating greater choices Improved information on energy consumption for tracking purposes and conservation

*****

44

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 08

APPLICATIONS

45

RF Based AMR

Department Of Electronics & Communication Engg

AMR APPLICATIONS
As technology continues to improve in price/performance, the number of municipal utilities implementing automatic meter reading (AMR) systems continues to grow. Today, most AMR deployments are walk-by or drive-by systems. A battery-operated transmitter in each meter sends a radio frequency (RF) signal that is read by a special receiver either carried by hand or mounted in a vehicle. These solutions require a much smaller sta of meter readers, who merely need to walk or drive by the many meters in any neighborhood. Although this form of AMR is an enormous improvement over manual meter reading, continued high labor and vehicle costs are driving the industry to an even better solution. Among the many advantages are the ability to monitor daily demand, implement conservation programs, create usage proles by time of day, and detect potentially hazardous conditions, such as leaks or outages. But there is still one drawback with these AMR deployments: the costly network backhaul required by leased lines or cellular services from a local telephone company, or Power Line Carrier (PLC) solutions from the local power company. AMR is the remote collection of consumption data from customers utility meters using telephony, radio frequency, power lines and satellite communications technologies. AMR provides water, gas and electric utility-service companies the opportunity to increase operational efficiency, improve customer service, reduce data-collection costs and quickly gather critical information that provides insight to company decision-makers.

*****

46

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 09

FUTURE SCOPE

47

RF Based AMR

Department Of Electronics & Communication Engg

FUTURE SCOPE
Originally AMR devices just collected meter readings electronically and matched them with accounts. As technology has advanced, additional data could then be captured, stored, and transmitted to the main computer, and often the metering devices could be controlled remotely. This can include events alarms such as tamper, leak detection, low battery, or reverse flow. Many AMR devices can also capture interval data, and log meter events. The logged data can be used to collect or control time of use or rate of use data that can be used for water or energy usage profiling, time of use billing, demand forecasting, demand response, rate of flow recording, leak detection, flow monitoring, water and energy conservation enforcement, remote shutoff, etc. Advanced Metering Infrastructure, or AMI is the new term coined to represent the networking technology of fixed network meter systems that go beyond AMR into remote utility management. The meters in an AMI system are often referred to as smart meters, since they often can use collected data based on programmed logic. The AMR project has been more difficult than originally expected. Initially, the design was going to be much simpler than what it has grown into. The objectives that are set currently are quite ambitious. Features such as a new emitter/detector and a new PIC that required a different code were added during the progress of the project. While these features are a welcomed benefit for the user, they do present considerable design challenges. Also, the op-amp used as a buffer was not part of the primary concept. It was integrated into the system to match the impedance of the sensor with the impedance of the transistor. This is a unique and helpful feature for the system.

*****

48

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 10

CONCLUSION

49

RF Based AMR

Department Of Electronics & Communication Engg

CONCLUSION
Thus we have studied RF based automatic meter reading used in different places. We got that this technology is very useful in present and future demand. AMR served well for commercial or industrial accounts. What was once a need for monthly data became a need for daily and even hourly readings of the meters. Consequently, the sales of drive-by and telephone AMR has declined in the India, while sales of fixed networks has increased. It is use in remote areas and measuring reading from water meter, energy meter, gas meter etc. It can be modified to control many meter reading by This system. It is simple to operate and user friendly. In this project we can control the data which is Transceiver between microcontroller and central PC.

*****

50

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 11

BIBLOGRAPHY

51

RF Based AMR

Department Of Electronics & Communication Engg

BIBLIOGRAPHY
Websites: 1. www.ti.com 2. www.atmel.com 3. www.wikipedia.com
4. www.sunrom.com

Articles:

1. CC1100 Single Chip Very Low Power RF TransceiverFrom Texas Instruments

2. ST1197 Serial Interface IC for RF Transreceiver based on CC1100 From Texas Instruments

3. 8-bit Microcontroller with 4K Bytes FlashFrom Atmel Corporation.

Books:
1. The 8051 Microcontroller and Embedded system By Mazidi

2. The 8051 Microcontroller By Kenneth J. Ayala


3.

Integrated electronics By J. Millan and C. Halkias Tata Mc. Graw hill international ltd.

4. Electrical technology volume 2


52
RF Based AMR

Department Of Electronics & Communication Engg

B. l. Thereja and A. k. Thereja S. Chand Publication.

53

RF Based AMR

Department Of Electronics & Communication Engg

CHAPTER NO. 12

APPENDICES

54

RF Based AMR

Department Of Electronics & Communication Engg

APPENDICES
Appendix A: Programming at Microcontroller Unit
INCLUDE REG_51.PDF CSEG ; AT 0 ; RESET VECTOR ;---------==========----------==========---------=========--------PROCESSOR INTERRUPT AND RESET VECTORS ;---------==========----------==========---------=========--------ORG MOV TMOD,#20H MOV TH1,#0FDH MOV SCON,#50H SETB TR1 HERE: JNB RI,HERE MOV A,SBUF CJNE A,#0FFH,DOWN CLR RI WAIT: JNB RI,WAIT MOV A,SBUF CJNE A,#00H,NXT CLR P2.0 SJMP DOWN NXT: CJNE A,#01H,DOWN SETB P2.0 DOWN: CLR RI SJMP HERE END MOV P0,#0FFH AGAIN:MOV A,P0 ;make P0 as input port ;Read P0
55
RF Based AMR

00H

; Reset ;enable timer1, mode 2 (auto reload) ;9600 Baud rate ;8 bit, 1 stop bit, REN enabled

;wait for character to come in ;get data in A ;chk if the char is synch byte ie.offh or 255 ;if not jump to clear RI ;get ready to get next byte ;wait for character to come in ;get data in A ;chk if the char is 0 ;switch on LED ;jump to clear RI ;chk if the char is 1 ;switch off LED ;get ready to get next byte ;keep getting the data

Department Of Electronics & Communication Engg

MOV SBUF,A HERE:JNB TI,HERE CLR TI SJMP AGAIN END

;send data ;wait for data to be transferred ;keep doing it ;clear TI for next char

Appendix B: Programming at Computer Unit in Visual Basic


Private Const MAX_COMM = 32 ' Win32 API ' we're using the API to scan for available harware. ' you could use the passed comm control but this is ' much faster and less prone to errors Private Const GENERIC_READ = &H80000000 Private Const GENERIC_WRITE = &H40000000 Private Const OPEN_EXISTING = 3 Private Const FILE_FLAG_OVERLAPPED = &H40000000 Private Const INVALID_HANDLE_VALUE = -1 Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" _ (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, _ ByVal dwShareMode As Long, ByVal lpSecurityAttributes As String, _ ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, _ ByVal hTemplateFile As String) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) ' Port Declartion Dim Value As Integer Dim PortAddress As Integer Dim PortValue As Integer ' COM declaration
56
RF Based AMR

' max port # to check

Department Of Electronics & Communication Engg

Dim inputCnt As Integer ' Meter Declaration Dim meterReadingValue As Double Dim timerLock, tamperingLock As Boolean Dim RatePerUnit As Integer ' Database Declaration Dim rsTamper As New ADODB.Recordset Dim rsCustomer As New ADODB.Recordset Dim rsBill As New ADODB.Recordset Private Sub butSetMeter_Click() 'meterReadingValue = Val(txtInitialMeterReading.Text) Call UpdateMeterDisplay End Sub Private Sub cmdDisconnect_Click() Dim val1 As Integer If Val(txtCurrentBillAmount.Text) = 0 Then 'Bill Paid Do Nothing val1 = Inp(&H378) val1 = val1 And 0 Out &H378, val1 txtInitialMeterReading.Text = meterReadingValue 'Update Database For Bill Paid Else 'Disconnect till bill is paid val1 = Inp(&H378) val1 = val1 Or 1 Out &H378, val1
57
RF Based AMR

Department Of Electronics & Communication Engg

End If End Sub

Private Sub cmdPayBill_Click() ' Do nothing if current Bill equals ZERP If Val(txtCurrentBillAmount.Text) <= 0 Then Exit Sub If Val(txtCurrentBillAmount.Text) > Val(txtBillAmount.Text) Then MsgBox (" Bill Amount Cann't be Less than Current Bill") Exit Sub End If If Val(txtCurrentBillAmount.Text) <> Val(txtBillAmount.Text) Then MsgBox (" Bill Amount Should be equal to current Bill Amount") Exit Sub End If rsBill.Open "select * from AMRMeterReading", adocn, adOpenKeyset, adLockOptimistic rsBill.AddNew rsBill.Fields("_Month") = Now rsBill.Fields("CurrentReading") = meterReadingValue rsBill.Fields("LastReading") = txtInitialMeterReading rsBill.Fields("BillAmount") = txtCurrentBillAmount rsBill.Update rsBill.Close rsCustomer.Open "select * from AMRCustomerDetail", adocn, adOpenKeyset, adLockOptimistic rsCustomer.Fields("LastMeterReading") = meterReadingValue rsCustomer.Update rsCustomer.Close
58
RF Based AMR

Department Of Electronics & Communication Engg

txtCurrentBillAmount.Text = "0" txtBillAmount.Text = "0" txtInitialMeterReading.Text = Str(meterReadingValue) End Sub Private Sub cmdSendBillNotification_Click() If MSComm2.PortOpen = True Then Call Send_SMS(CPNumber.Text, Else MsgBox "Please Set COM Port For Sending SMS" End If End Sub Private Sub cmdSetPort_Click() On Error GoTo commErr 'look for the setting of your GSM Modem/GSM Phone With MSComm2 .CommPort = Val(cboPort.Text) 'change this where your Modem is attatched .Handshaking = comNone .Settings = "9600,n,8,1" 'look for the setting og your GSM Modem/Phone If .PortOpen = False Then .PortOpen = True .DTREnable = True .RTSEnable = True .RThreshold = 1 .InputLen = 1 'send AT command in hypertheminal .Output = "AT" & vbCrLf '">" 'wait for certain sec...change this accordiing to your modem spec Sleep 500
59
RF Based AMR

"Please Pay You Electricity

Bil Amt:"

&

txtCurrentBillAmount.Text & " By 10th of this month")

Department Of Electronics & Communication Engg

.Output = "ATE0" & vbCrLf '">" Sleep 500 Else MsgBox "Port Already Open" End If MsgBox "Connected" Exit Sub commErr: If Err.Number = 8005 Then MsgBox "Port is busy" ElseIf Err.Number = 8002 Then MsgBox "Invalid Port" Exit Sub End If End With End Sub Private Sub Command1_Click() If MSComm2.PortOpen = True Then Call Send_SMS(CPNumber.Text, SMSText.Text) Else MsgBox "Please Set COM Port For Sending SMS" End If End Sub Private Function Send_SMS(ByVal Number As String, ByVal Text As String) With MSComm2 .Output = "AT+CMGF=1" & vbCrLf .Output = "AT+CMGS=" & Chr(34) & Trim(Number) & Chr(34) & vbCrLf ' Sleep 1000 .Output = Trim(Text) & Chr(26) & vbCrLf 'Sleep 2000
60
RF Based AMR

Department Of Electronics & Communication Engg

'MsgBox "Message sent, please wait..." End With End Function Private Sub Form_Load() ''''''''''''''''''''''''''''''' Dim iCntr Dim hRet Dim sCom As Integer As Long As String ' loop counter ' api return value ' comm port name

For iCntr = 1 To MAX_COMM ' try to open the port ' \\.\ required for ports > 9, works for all ports sCom = "\\.\Com" & CStr(iCntr) & vbNullChar hRet = CreateFile(sCom, GENERIC_READ Or GENERIC_WRITE, 0, vbNullString, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, vbNullString) If hRet <> INVALID_HANDLE_VALUE Then hRet = CloseHandle(hRet) cboPort.AddItem Str(iCntr) Else ' dll error 5 = already open ' dll error 2 = no harware If Err.LastDllError = 5 Then cboPort.AddItem Str(iCntr) & " - Not Available" End If End If Next

' Port Initialization Value = &H0 PortAddress = &H378 Out PortAddress, Value
61
RF Based AMR

Department Of Electronics & Communication Engg

' COM Intialization ' Fire Rx Event Every single Bytes MSComm1.RThreshold = 1 ' When Inputting Data, Input 1 Byte at a time MSComm1.InputLen = 1 ' 9600 Baud, No Parity, 8 Data Bits, 1 Stop Bit MSComm1.Settings = "9600,N,8,1" ' Disable DTR MSComm1.DTREnable = False ' Open COM1 MSComm1.CommPort = 1 MSComm1.PortOpen = True inputCnt = 0 ' Meter Initialization timerLock = False tamperingLock = False meterReadingValue = 0 RatePerUnit = 4 'Database Initialization rsTamper.Open "select * from AMRMeterTampering", adocn, adOpenKeyset, adLockOptimistic rsCustomer.Open "select * from AMRCustomerDetail", adocn, adOpenKeyset, adLockOptimistic If rsCustomer.BOF = True Then meterReadingValue = 0 Else meterReadingValue = Val(rsCustomer.Fields("LastMeterReading")) CPNumber.Text = rsCustomer.Fields("PhoneNo")
62
RF Based AMR

Department Of Electronics & Communication Engg

End If rsCustomer.Close butSetMeter_Click txtInitialMeterReading.Text = meterReadingValue End Sub Private Sub Form_Unload(Cancel As Integer) 'Close DB rsTamper.Close adocn.Close 'Close Com MSComm1.PortOpen = False 'Reset Port Out PortAddress, 0 'Out PortAddress, &HFF 'Close the COMM port

With MSComm2 If .PortOpen = True Then .PortOpen = False Sleep 500 End If End End With End Sub Private Sub lblValDateTime_Click() End Sub Private Sub mnuCustomerInfo_Click()
63
RF Based AMR

Department Of Electronics & Communication Engg

frmCustomerInfo.Show Modal, Me End Sub Private Sub mnuDisplayBill_Click() fmrBillDisplay.Show Modal, Me End Sub Private Sub mnuMeterTamperingRecord_Click() frmTamperLog.Show Modal, Me End Sub Private Sub MSComm1_OnComm() Dim Data As String Dim dataVal As Integer Data = " "

' If comEvReceive Event then get data and display If MSComm1.CommEvent = comEvReceive Then Data = MSComm1.Input dataVal = Asc(Data) lbldata.Caption = dataVal If dataVal = 254 Then ' Meter Pulse MeterPulseChange ElseIf dataVal = 253 Then ' Meter Tampering TamperingDetected ElseIf dataVal = 252 Then ' Meter Pulse + Tamering MeterPulseChange TamperingDetected End If
64
RF Based AMR

'get data 'convert to ASCII and display

Department Of Electronics & Communication Engg

End If End Sub Private Sub TamperingDetected() If Not tamperingLock Then lblTamperTime.Caption = "Tempering Detected At : " & Now

rsTamper.AddNew rsTamper.Fields("TamperingDateTime") = Now rsTamper.Update tamperingLock = True tmrTamper.Enabled = True End If End Sub Private Sub MeterPulseChange() If Not timerLock Then lblChangeCountValue.Caption = Val(lblChangeCountValue.Caption) + 1 timerLock = True Led1.FillColor = &HFF& tmrCom.Enabled = True If Val(lblChangeCountValue.Caption) > Val(txtChangeUnit.Text) Then meterReadingValue = meterReadingValue + 1 txtCurrentBillAmount.Text = (meterReadingValue - Val(txtInitialMeterReading.Text)) * RatePerUnit Call UpdateMeterDisplay lblChangeCountValue.Caption = 1 End If End If
65
RF Based AMR

Department Of Electronics & Communication Engg

' ' ' ' ' '

Bit = 1 timerLock = True Else timerLock = False Led1.FillColor = &HFFFFFF End If

End Sub

Private Sub tmrChangeCount_Timer() Dim Inval As Integer 'Dim bit As Short Inval = Inp(&H379) 'lblChangeCountValue.Caption = Inval

Bit = 0 If (Inval And 63) = Inval Then If Not timerLock Then lblChangeCountValue.Caption = Val(lblChangeCountValue.Caption) + 1 If Val(lblChangeCountValue.Caption) > Val(txtChangeUnit.Text) Then meterReadingValue = meterReadingValue + 1 txtCurrentBillAmount.Text = (meterReadingValue - Val(txtInitialMeterReading.Text)) * RatePerUnit Call UpdateMeterDisplay lblChangeCountValue.Caption = 1 End If End If Bit = 1 Led1.FillColor = &HFF&
66
RF Based AMR

Department Of Electronics & Communication Engg

timerLock = True Else timerLock = False Led1.FillColor = &HFFFFFF End If End Sub Private Sub tmrCom_Timer() ''If Val(lbldata.Caption) > 180 Then '' lbldata.Caption = Val(lbldata.Caption) + 12 ''End If ''Label2.Caption = lbldata.Caption & " Volts" Led1.FillColor = &HFFFFFF timerLock = False tmrCom.Enabled = False End Sub Private Sub tmrCurrent_Timer() lblValDateTime.Caption = Now End Sub Private Sub UpdateMeterDisplay() Dim meterReading As String Dim I As Integer meterReading = ReverseString(Trim(Str(meterReadingValue)))

' Clear Meter Reading lblMeter1by10.Caption = "0" lblMeter1.Caption = "0" lblMeter10.Caption = "0" lblMeter100.Caption = "0" lblMeter1000.Caption = "0"
67
RF Based AMR

Department Of Electronics & Communication Engg

lblMeter10000.Caption = "0" 'Set New Meter Reading For I = Len(meterReading) To 1 Step -1 Select Case I Case 1 lblMeter1by10.Caption = Mid(meterReading, I, 1) Case 2 lblMeter1.Caption = Mid(meterReading, I, 1) Case 3 lblMeter10.Caption = Mid(meterReading, I, 1) Case 4 lblMeter100.Caption = Mid(meterReading, I, 1) Case 5 lblMeter1000.Caption = Mid(meterReading, I, 1) Case 6 lblMeter10000.Caption = Mid(meterReading, I, 1) End Select Next End Sub Public Function ReverseString(ByVal InputString As String) As String Dim lLen As Long, lCtr As Long Dim sChar As String Dim sAns As String lLen = Len(InputString) For lCtr = lLen To 1 Step -1 sChar = Mid(InputString, lCtr, 1) sAns = sAns & sChar Next ReverseString = sAns End Function
68
RF Based AMR

Department Of Electronics & Communication Engg

Private Sub tmrTamper_Timer() tmrTamper.Enabled = False tamperingLock = False End Sub

*****

69

RF Based AMR

Department Of Electronics & Communication Engg

SUBMITTED BY

Ashwini Kale Krunal Upadhey Md. Marghubul Hussain Md. Sharfraj Akhter Prerna Agarkar Sunanda Tabhane

70

RF Based AMR

Department Of Electronics & Communication Engg

Customer side Trans-receiver Unit

Computer side Trans-receiver Circuit

71

RF Based AMR

Department Of Electronics & Communication Engg

THANKING YOU !!!

72

RF Based AMR

You might also like