Study Bay Coursework Assignment Writing Help
As the dismal economy spawns desperate measures, most of the residents of our beloved city, Karachi are resorting to a hazardous practice which is stealing electricity. Many utilities say energy theft has risen sharply during the recent economic downturn. Culprits include residential customers whose power is turned off when they fall behind on the bills and small businesses struggling to keep their doors open. They are using a wide array of tactics. Some run wires from utility lines directly into a circuit-breaker panel to bypass the electric meter. Others attached cables on either side of a meter, swipe meters from vacant houses when theirs are removed or tamper with meters to lower their electric bills.
People from KESC are finding more and more people are stealing electricity because of the poor economy,” said by the sources of electricity supplying corporation.
It has been investigated that 3,197 cases of theft in January and February, a 28% jump over the year-ago period.
Customers have stolen power for decades, costing utilities 1% to 4% of revenue – or about RS 49 billion industry wide – each year, according to Electric Light & Power magazine. Losses are borned by other customers. Many thieves operate home-based marijuana farms that use lots of lights and power.
But the problem is basically mushrooming. Meanwhile, consulting firm Detectent has identified a double-digit arise in business thefts the past six months, many by energy-guzzling restaurants. In Landhi, Deen Baksh, 48, was charged last fall with3 meter rigging. DTE Energy says he helped about 50 downtown businesses cut their gas and electric bills by more than RS.1 million – or 30% to 50% each – the past several years.
The practice is actually dangerous. Touching a power line may burn or even kill an untrained person. In Philadelphia this month, an illegal electricity hookup in a row house resulted in a spark a fire that killed a 30-year-old woman and her 8-year-old daughter.
Utilities often learn of thefts from meter readers, neighbors or may be abnormal use patterns. They expect to detect fraud earlier as they roll out smart meters that can remotely monitor electricity usage.
Electricity theft can be in the form of fraud (meter tampering), stealing (illegal connections), billing irregularities, or unpaid bills. Estimates of the extent of electricity theft in a sample of 102 countries for 1980 and 2000 are studied. The evidence shows that theft is increasing in most of the regions of the world. The financial impacts of theft has reduced income from the sale of electricity and the necessity to charge more to consumers. Electricity theft is closely related to governance indicators, with higher peaks of theft in countries without effective accountability, political instability, low government effectiveness and high levels of corruption. Electricity theft can be lowered by applying technical solutions such as tamper-proof meters, managerial methods such as inspection and monitoring, and in some cases restructuring power systems ownership and regulation.
The main purpose of our report is to present solution to economic problems and then economy rate will become higher. And that loss which KESC have to bear due to this problem will be decreased.
Economically this idea has great benefit both for masses and society. Once the theft of electricity would be detected then steps will be taken to stop it which will yield in discouraging the people using electricity illegally. Energy will be distributed to everyone justly thus everyone will be paying charges of only the amount they consume. Energy generating and distributing bodies will not be having extra load over their lines thus no power trips and break downs will occur so no extra money required for correcting such problems.
CHAPTER NO 01
ELECTRIC METER
1.1 ELECTRIC METERS:
An electric meter or energy meter is equipment that can measure the amount of electrical energy consumed by a residence, business, or an electrically powered device. Electric meters are usually calibrated in billing units; the most common is the kilowatt hour. Periodic readings of electric meters give billing cycles and energy used during a cycle. In settings when energy savings during certain periods are desired, meters may measure demand which is the maximum use of power in some interval. In some areas, the electric rates are higher during specific times of day for encouraging reduction in use. Also, in some areas meters have switches to turn off nonessential equipment.
Electricity meters work by continuously measuring the instantaneous voltage (volts) and current (amperes) and then finding the product of these to give instantaneous electrical power (watts) which is afterwards integrated against time to give energy used (joules, kilowatt-hours etc.). Meters for smaller services (for instance small residential customers) can be connected directly in-line between source and customer. For larger loads, i.e. 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.
1.1.1 Mechanism of electromechanical induction meter.
1. Voltage coil – many turns of fine wire encased in plastic, connected in parallel with load.
2. Current coil – three turns of thick wire, connected in series with load.
3.Stator-concentrates and confines magnetic field.
4.Aluminum rotor disc.
5. Rotor brake magnets.
6. Spindle with worm gear.
7. Display dials – note that the 1/10, 10 and 1000 dials rotate clockwise while the 1, 100 and 10000 dials rotate counter-clockwise.
The electromechanical induction meter operates by counting the revolutions of an aluminum 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.
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.[16] 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.
The type of meter described here is basically used on a single-phase AC supply. Different phase configurations use additional voltage and current coils in them.
1.1.2 CURRENT TRANSFORMER (CT) METERING:
Huge businesses or multi storey buildings use so much power that they can’t be connected to the network via the usual methods so in order for these sites to be metered, the load needs to be broken down so the meter will be able to cope with it and then be multiplied out again in order to get the full amount of power being used. This is known as CT metering.
Actually the load comes into a CT chamber from where it is then distributed from buzz bars containing transformers to CT links and then into the meter. The CT chamber also goes into the customer’s switchboard.
The rating of the transformers finds out the multiplier to be applied when calculating true usage.
1.1.3 METER USED IN THE PROJECT:
The meter used in our final year project is electromechanical induction meter.
1.2 UNIT OF MEASUREMENT:
Kilowatt hour is the most common unit of measurement on the electricity meter which is equal to the amount of energy used by a load of one kilowatt over a period of one hour, or 3,600,000 joules. Some electricity companies also use the SI mega joule instead.
Remote current and voltage sensors are be read and programmed remotely by modem and locally by infra-red. The circle with two dots is the infra-red port give the reading. Tamper-evident seals are also present in some meters.
Demand is usually measured in watts, but averaged over a period, most often a quarter or half hour
1.3 ELECTRICITY THEFT:
Meters can be controlled to make them under-register, effectively permitting power use without paying for it. This theft or fraud can be dangerous and also dishonest.
Electricity theft can be in the form of
i)fraud (meter tampering)
ii)stealing (illegal connections)
iii)billing irregularities
iv)Unpaid bills.
Another common method of tampering on older meters is to attach magnets to the outside of the meter. They magnetically saturate the coils or current transformers, preventing the alternating current from forming eddy currents in the rotor, or inducing voltages in the current transformer. Also rectified DC loads cause mechanical (but not electronic) meters to under-register. DC current does not cause the coils to make eddy currents in the disk so this causes reduced rotation and a lower the bill. Some combinations of capacitive and inductive load can also interact with the coils and mass of a rotor and cause reduced or reverse motion.
1.3.1 Basic Layout Of The Project Including Electricity Theft Possibilities:
Bypass wire
Breaker to cut out the meter
Home
Neutral Wire, neutral current iN
Phase wire, phase current iP
Earth wire
Meter
Case 1:
If there is no bypassing of the meter and the entire load is OFF.
iN (Neutral current) = iP (Phase Current) = 0
Case 2:
If there is no bypassing of the meter and the entire load is ON.
iN (Neutral Current) = iP (Phase current) = some value
Case 3;
If there is meter bypassing and the entire load is ON.
iP (Phase current ) = 0
iN (Neutral Current) = load
The first target is to sense / measure phase and neutral current. And if case 3 is verified than it will be a theft case.
1.3.2 Outcomes Of Electricity Theft:
The evidence shows that theft is vastly increasing in most regions of the world. The financial impacts of theft have resulted in reduced income from the sale of electricity and the necessity to charge more to consumers. Electricity theft is closely concerned to governance indicators, with higher levels of theft in countries without effective accountability, political instability, low government effectiveness and high levels of corruption. Power theft has surely become an infamously prevalent practice in many parts of the country, both rural and urban. Many cases go unreported in various cities and villages, costing a lot to our countries burdened economy. People actually pay some local electrician a little money to reverse the electricity meter of the house and/or slow its pace. Some people also learn the trick from an electrician and help their family/friends steal electricity.
1.3.3 General Methods To Reduce Electricity Theft:
Electricity theft can be reduced by
Applying technical solutions such as tamper-proof meters.
Managerial methods such as inspection and monitoring.
Restructuring power systems ownership and regulation..
A common method of tampering on older meters is to attach magnets to the outside of the meter. These magnetically saturate the coils or current transformers, preventing the alternating current from forming eddy currents in the rotor, or inducing voltages in the current transformer.
Rectified DC loads cause mechanical (but not electronic) meters to under-register. DC current does not cause the coils to make eddy currents in the disk, so this causes reduced rotation and a lower bill.
Some combinations of capacitive and inductive load can interact with the coils and mass of a rotor and cause reduced or reverse motion.
CHAPTER NO 02
MEASUREMENT OF AC CURRENT:
2.1 DESCRIPTION:
Here we have considered household power is single-phase electric power, with two or three wired contacts at each outlet.
The live wire (also known as phase, hot or active contact), carries alternating current between the power grid and the household.
The neutral wire completes the electrical circuit by also carrying alternating current between the power grid and the household. The neutral is staked into the ground as often as possible, and therefore has the same electrical charge as the earth. This prevents the power circuits from rising beyond earth, such as when they are struck by lighting or become otherwise charged.
The earth wire or ground connects cases of equipment to earth ground as a protection against faults (Electric Shock).
2.2 MEASUREMENT OF AC CURRENT:
It’s very difficult to measure ac current and produce voltage proportional to it. For measurement of ac current Hall Effect devices are mostly used. They produce the voltage proportional to the magnetic field in the air gap by inserting Hall Effect magnetic field sensor in the current transformer core air gap. The circuits below measure the ac current without using Hall Effect devices.
2.2.1 WORKING:
FIG 1:
An electric current J2 is introduced in the secondary winding of the coil which is proportional to the primary winding J1.Th secondary current can be controller by means of number of turns on primary and secondary winding. The primary winding either have one turn or a number of turns wrapped around it while the secondary winding has usually multiple turns around it. If the current transformer is ideal then the current in the secondary winding is equal to that in primary winding. But if it is possess non-ideal characteristics then the current in both windings will not be equal due to substantial phase angle, error of ratio, and/or wave shape in its output. They are the function of:
The properties possess by magnetic core.
How much burden on it.
How much dc component present in the primary current.
FIG2:
Due to burden in the secondary the currents in the secondary and primary aren’t equal. Fig 2is used to reduce this effect .V4 is the voltage which is proportional to the rate of magnetic flux and is introduced by terminating the sense winding 10 to high impedance; the effective burden can be reduced by applying it tin series to the secondary winding after it is being amplified. Now the currents in secondary will be proportional accurately to that in primary since the magnetic flux changes in the core is reduced to zero. Smaller flux changes and higher accuracy will be achieved by higher gains in the amplifier circuit while on the other hand this leads to instability and associated =oscillations in the circuit. This technique is a better measure of ac current but the problem raised may be due to the dc component in the primary current
FIG 3:
Compensation voltage is generated by using secondary current as input and this voltage is required for driving the secondary current. The voltage generated V1 is proportional to the driving current J2 and the output voltage V3 is produced as an information signal. The advantage of above circuit is that instead of using Hall Effect sensors ordinary current transformers can be utilized to measure the ac current with a dc component .The above current sensor has the following properties:
Even in the presence of primary current the current transformer gives accurate output.
This circuit uses a relatively inexpensive and simple magnetic core.
Stable over temperature and time.
Primary current in in effected by noise.
The voltage V3 is utilized further to obtain a dc voltage. For this purpose this ac output is passed by a rectifier circuit in order to obtain a dc voltage at the output.
CHAPTER #03:
MICROCONTROLLERS
3.1 INTRODUCTION:
Microcontrollers are devices that have CPU, RAM, ROM, I/O ports, and timers all on a single chip. In other words all are embedded on a single chip. For applications in which cost and space are critical issue microcontrollers are preferred for their above mentioned features.
Microcontroller is one of the major components of this design as it plays key role of the coordination between all the components. It inputs current signal and evaluates the theft. The result is then sent to remote office by connecting mobile to microcontroller. AT commands are used for communication between mobile and microcontroller.
Microcontrollers are available with different instruction set, registers, speed, packaging and costs. There are many different types of microcontrollers. Freescale’s 6811, Intel 8051, Zilog’s Z8, and PIC 16X from microchip technology are popular 8 bit microcontrollers. Nowadays 16 bit and 32 bit microcontrollers are also available. Microcontrollers are not compatible with each other because each has a different instruction set and registers.
Certain important points must be kept in mind while selecting a microcontroller for a particular application.
Firstly it must be able to satisfy all computational needs. These computational needs include capacity and speed.
Speed: While choosing a microcontroller it should be operating at the speed that is required for the application
Capacity: For certain applications programs are too long and they exceed on chip RAM capacity. Therefore it is necessary to consider on chip RAM memory.
Secondly it must be compatible with devices used in application. This is an important issue. There are many microcontrollers which support only a particular baud rate and are incompatible with the devices that operate at the higher baud rate.
Thirdly it must be available in required quantities and at the required costs.
3.2 POPULAR MICROCONTROLLERS:
Two important microcontrollers that are widely used are 8051 and PIC.
3.2.1 8051 Family:
There are many members of 8051 family which are produced by different vendors and have different features.
Some of the well known are:
8051:
8051 was originally produced by Intel corporation .It has 4Kbytes ROM and 128bytes on chip RAM .Other products are 8052 and 8031 microcontrollers. These two have additional features such as increased ROM capacity, speed and timers.
AT89C51:One of the most widely used 8051 microcontrollers is AT89C51 from Atmel Corporation. It is one of the most widely used from 8051 microcontrollers because of its easy availability and low cost.
OTP version of 8051:
One time programmable versions of 8051 are also widely used. Because of its low cost it is used for mass production.
3.3 PREVIOUS APPROACH:
Earlier for project purpose Atmel89C51 was selected and ADC0808 was used along with it to convert current to digital.
3.3.1 ATMEL 89C51:
It is one of the most commonly used controllers. The reasons behind its popularity are:
It is widely available.
Programming language is very simple.
All its development tools are readily available.
3.3.1.1 Features:
It is low powered and 8 bit microcontroller.
32 I/O lines.
6 interrupts
2 timers.
4K flash memory
Serial programming is also possible.
The figure below shows the pins of Atmel AT89C51.
If AT89C51 is used for the current implementation then following points need to be considered:
3.3.1.2 Interfacing ADC With Microcontrollers:
It does not have built in ADC therefore an external ADC is interfaced to entertain analog inputs. Normally ADC0808 and ADC0848 are used.
3.3.1.3 Serial communication:
For serial communication it has built in UART mode. There is a special serial register known as SBUF.
3.3.1.4 ADC0808:
As current is analog quantity and 8051 can only accept digital inputs therefore an ADC was needed .For this purpose ADC0808 was preferred as it is easily available in markets and compatible with 8051.
Due to the compatibility issue atmel8951 was replaced by pic16F877A.
3.3.2 PIC:
PIC stands for programmable Interface controller and it is made by microchip technology. PIC is widely preferred for industrial applications due to their low cost, capacity, extensive features and wide availability of development tools like its programmer, compiler etc.
3.3.2.1Features Of PIC:
It follows Harvard architecture that is code and data spaces are separate. They even have a separate bus. This allows program and data to be fetched simultaneously. Code space is implemented as ROM whereas for data space we have general purpose RAM. However addressable data space is small.
There is only one accumulator.
Most of the PIC controllers are 8-bit microcontroller that all data should be in 8 bits and all operations are also performed in 8 bits chunks.
They also support instructions, operations and commands that allow user to work on single bit.
It has predefined instruction set with few changes for different versions .The instruction set includes instructions that support direct memory addressing as well as indirect addressing. It also supports conditions and branching.
Newer versions of pic also have built in ADC into the microcontroller.
PIC have hardware call stack which cannot be accessed through software. They save return addresses.
TYPES OF PIC MICROCONTROLLERS:
There are many PIC series of which well known are as follows:
PIC17 SERIES
PIC18 SERIES
PIC32 SERIES
PIC24 SERIES
PIC16 SERIES
For the project PIC16f877A is covered in detail therefore PIC 16 series is discussed briefly.
3.3.2.2 PIC16 Series:
PIC16 Series are small, fast, and are available in most of areas. There are many different variants of pic16 series in which some have more I/O pins some have ADC, some have more memory.
3.4 CURRENT APPROACH:
3.4.1 PIC16F877A:
For this project pic 16f877A has been used .The reasons behind using it were as follows:
It is widely available in most of the areas.
It has built in 10 bit ADC that was needed for our project.
Its compiler and programmer were also easily available.
It supports baud rate required for our application and it is compatible with devices that are used.
It is relatively easy to program.
The details of the pins are provided in the Appendix A
3.4.1.1 Features Of PIC16F877A:
It is a 40 pin device
5 I/O ports A, B, C, D and E some pins are multiplexed so that they can be used for peripheral functions.
15 interrupts
8 A/D input channels
35 single word instructions and 1 instruction is composed of 14 bits.
20 MHz operating speed
Data memory of 368 bytes
EEPROM memory of 256 bytes
3 timers
2 analog comparators.
3.5 HARDWARE SECTION:
Hardware design of PIC consists of combining different modules and devices with the controller that work together in order to attain information from the E-meter and read into the micro-controller. In this section ports, oscillators, registers of PIC that are used for implementing the design are briefly discussed:
3.5.1 Oscillator:
External oscillator with a frequency of 12 MHz is used in order to achieve clock speed of 8MHz.The baud rate is set at 9600kbps. Internal oscillator of pic is not used.
3.5.2 I/O Ports:
As the current has to be sensed through the microcontroller therefore portA is used and is configured for analog input (AN0 to AN7). Its corresponding direction register is TRISA.
3.5.3 Analog to Digital Converter Module:
PIC16F877A has eight pins for Analog-to-Digital (A/D) Converter module. The conversion of an analog input signal results in a corresponding 10-bit digital number. It can even operate in sleep mode. The A/D clock must be derived from the A/D’s internal RC oscillator. The AD module has four registers adresh, adresl, adcon0 and adcon1. The 10 bit AD result is stored in adresh and adresl registers.ADCON1 is used for configuration of port pins. The operation of AD module is controlled through ADCON0.
3.5.4 USART:
In order to generate alarm at remote office, controller is connected to mobile. The phone is connected to Universal Synchronous Asynchronous Receiver Transmitter (USART) module which is one of the two serial I/O modules of PIC16F877A. USART is also known as a Serial Communications Interface or SCI. USART uses standard Non-Return to- Zero (NRZ) format (one Start bit, eight or nine data bits and one Stop bit). The USART transmits and receives the LSB first. The transmitter and receiver function independently.
3.6 SOFTWARE DESIGN:
3.6.1 Development Tools:
The code is written in pic basic pro language. The code is then converted to hex via microcode studio and hex code is loaded into pic16F877A through quad programmer.
Microcode studio is used because its free version is easy available on internet. For compiler three header files are made. One file is used by compiler other is used by programmer. The file with the extension .BAS is used by pbp .Pbp then makes .ASM file from it. It then makes .ASM file from it. If code is error free then assembler required output file with hex code in it. This hex code is loaded in the pic by quad programmer.
3.6.2 Program Code:
There are multiple parts of the software design, as the micro-controller plays many parts in the coordination of the instrumentation panel.
Firstly internal ADC of the PIC16F877A is configured to sense the current. The next step for the code is to check if input is greater than 0 .If it is greater than 0 then a message is sent to remote office through mobile. For this AT commands are used that are specially made for communication between GSM modules and microcontroller. Other than the mentioned AT commands in the following table are in appendix B
COMMANDS
PURPOSE
ATZ
AT+CMGF
3. AT+CMGS
4. AT+CMGL
Recall Stored Profile
Message Format
Send Message
List Messages
CHAPTER NO 04:
WIRELESS ACCESS TECHNOLOGIES:
4.1 EVOLVING WIRELESS TECHNOLOGIES IN PAKISTAN:
There are two important wireless access technologies that can be used within Pakistan and are feasible for our project and that are:
WIMAX
GSM
4.2 GSM TECHNOLOGY:
For mobile telephony systems in the world, the most popular standard is GSM. The GSM Association estimated that 80% of the global mobile market uses the standard. 1.5 billion People across more than 212 countries and territories uses GSM technology for their benefits. This means that subscribers can use their phones throughout the world between mobile network operators, enabled by international roaming arrangements. GSM is considered a second generation (2G) mobile phone system because GSM differs from its predecessor technologies in that both signaling and speech channels are digital. GSM also facilitates the wide-spread implementation of data communication applications into the system.
The GSM standard provides 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 cheapest implementation of the short message service (SMS), also called text messaging, which has since been supported on other mobile phone standards as well. A worldwide emergency telephone number feature is also provided by this standard.
GSM also supports indoor coverage and may be achieved by using an indoor picocell base station, or an indoor repeater with distributed indoor antennas fed through power splitters, to deliver the radio signals from an antenna outdoors to the separate indoor distributed antenna system. When a lot of call capacity is needed indoors then these are typically deployed; for example, in airports or shopping centers. However, this is not a prerequisite, since indoor coverage is also achieved by in-building penetration of the radio signals from any nearby cell.
The modulation technique used in GSM is Gaussian minimum-shift keying (GMSK). It is a kind of continuous-phase frequency shift keying. In Gaussian minimum-shift keying, the signal to be modulated onto the carrier is first smoothed with a Gaussian low-pass filter prior to being fed to a frequency modulator, so it greatly reduces the interference to neighboring channels (adjacent-channel interference).
4.2.1 GSM CARRIER FREQUENCY:
GSM networks operate in a number of different carrier frequency ranges (separated into GSM frequency ranges for 2G and UMTS frequency bands for 3G), the most 2G GSM networks operating in the 900 MHz or 1800 MHz bands. The 850 MHz and 1900 MHz bands were used instead, Where these bands were already allocated (for example in Canada and the United States). In some countries the 400 and 450 MHz frequency bands are assigned In rare cases because they were previously used for first-generation systems.
In Europe Most 3G networks operate in the 2100 MHz frequency band.
Regardless of the frequency selected by an operator, it is divided into timeslots for individual phones to use. That is why it allows eight full-rate or sixteen half-rate speech channels per radio frequency. These eight radio timeslots (or eight burst periods) are further grouped into a TDMA frame. In the same timeslot half rate channels use alternate frames. The channel data rate for all 8 channels is 270.833 kbit/s, and the frame duration is 4.615 ms.
The transmission power limited in a handset to a maximum of 2 watts in GSM850/900 and 1 watt in GSM1800/1900.
4.2.2 NETWORK STRUCTURE:
The network is structured into a number of discrete sections:
The Base Station Subsystem (the base stations and their controllers).
The Network and Switching Subsystem (the part of the network most similar to a fixed network). This is also called the core network.
The GPRS Core Network (the optional part which allows packet based Internet connections).
For maintenance of the network, the Operations support system (OSS).
4.2.3 SMS MODES IN GSM:
We have two types of SMS modes in GSM
SMS Text Mode
SMS PDU Mode
The text mode (It is unavailable on some phones) is simply an encoding of the bit stream. It is represented by the PDU mode. There are several encoding alternatives when displaying an SMS message and Alphabets may differ. The most common options are “PCCP437”, “PCDN”, “8859-1”, “IRA” and “GSM”. These are