You are on page 1of 60

GSM BASED POWER THEFT SUBSTATION

ABSTRACT
Science and technology with all its miraculous advancements has fascinated human life to a great extent that imagining a world without these innovations is hardly possible. While technology is on the raising slope, we should also note the increasing immoral activities. With a technical view, "Power Theft" is a non-ignorable crime that is highly prevalent, and at the same time it directly affects the economy of a nation. Detecting and eradicating such crimes with the assistance of the developing scientific field is the "Need of the Hour". With these views was this paper conceived and designed. Our paper provides a complete and comprehensive tool to prevent power theft which is very simple to understand and easy to implement. It includes three sections - transmitting, receiving, and processing sections. The IR transmitter transmits the IR rays (which are invisible) to the photo diode continuously at that time microcontroller does not perform any operation when the signal breaks, immediately IC555 sends a negative pulse to the microcontroller now it process and send a signals to the GSM modem using serial communication, the modem sends a message (address of that house) to the substation using GSM technology. Then they immediately take an action that to stops the power to the house and take further actions on them. Here the microcontroller performs the function of indication and identification of power theft. Pin details, features, connections and software employed for uc89c51 are described in detail. We believe our implementation ideas are a boon to the electricity board offering them a chance to detect accurately the location and amount of power theft.

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 1

CHAPTER 1
2

GSM BASED POWER THEFT SUBSTATION

INTRODUCTION
1.1. OVERVIEW:
"TODAY'S TECHNICIANS ARE SO FOCUSSED ON THE TREES OF TECHNOLOGICAL CHANGE THAT THEY FAIL TO SEE THE FOREST; THE UNDERLYING ECONOMIC FORCES THAT DETERMINE SUCCESS AND FAILURE..." "TECHNOLOGY CHANGES ECONOMY LAWS DO NOT"

Electricity is the modern man's most convenient and useful form of energy without which the present social infrastructure would not be feasible. The increase in per capita production is the reflection of the increase in the living standard of people. When importance of electricity is on the increasing side, then how much should theft of this energy or illegal consumption of power from the transmission lines is averted? Power theft has become a great challenge to the electricity board. The dailies report that Electricity Board suffers a total loss of 8 % in revenue due to power theft every year, which has to control. Our paper identifies the Power theft and indicates it to the Electricity board through Power line. We had also dealt about the remote monitoring of an energy meter.

MICROCONTROLLER BASED AUTOMATION:


Embedded systems a combination of software, hardware and additional mechanical parts that together forms a component of a larger system, to perform a specific function. It's a technology, characterized by high reliability, restricted memory footprint and real time operation associated with a narrowly defined group of functions. Automation has made the art of living comfortable and easy. Embedded systems have made the process of automation a most successful one. Here, we have focused on automotive, an area of embedded controllers, in which we have dealt with the Power theft identification and also about the remote monitoring of an energy meter. "Technology have taken the world by storm performance ratings and exceptionally value for money prices"

GSM BASED POWER THEFT SUBSTATION

The microcontroller chip is preprogrammed to perform a dedicated or a narrow range of functions as a part of a larger system, usually with minimal end user or operator intervention. Our paper throws light on automated monitoring of theft identification, which is an application of embedded controllers.

MODES OF THEFT:
It has been seen that there are 4 common methods of power theft as given below:Bogus seals and tampering of seals. Meter tampering, meter tilting, meter interface and Meter bypassing. Changing connection. Direct tapping from line. Due to introduction of modern electronic metering equipments, power thieves are utilizing more technological methods. Recent cases of power theft discovered by British inspectors included customers tunneling out to roadside mains cables and splicing into the supply, a garage taking its night time power supply from the nearest lamp post and domestic customers drilling holes into meter boxes and attempting to stop the counter wheels from turning. Another method of Power theft is by keeping a strong magnet in front of the disc in the energy meter and thus arresting the rotation of the disc, connecting the load directly to the power line bypassing the energy meter. But, it can be avoided easily by providing a non magnetic enclosure.

MODERN DETECTING TOOLS:


There are many modern tools that assist in power theft identification. Some of them are:Tamper proof seals and labels. Meter leaders. Tamper resistant screws / locks. Check meter and remote meter readers. Tamper alarms and sensors. This paper undertakes the Check meter and remote meter readers for power theft identification. In our case, the
4

GSM BASED POWER THEFT SUBSTATION

consumption recurred by the check meter is compared with the revenue meters consumption. If there is a difference, then it indicates either there is a theft or revenue meter malfunction. The check meter can also be used to monitor the energy used on the secondary of a distribution transformer serving several customers and compared to the sum of all the meter usage. Besides spotting out the line where power theft is suspected to occur, it also detects the amount of energy stolen. Compact size, lightweight for quick and high accuracy make the system more effective.

1.2. REQUIREMENTS AND SPECIFICATIONS:


The functional units of our project are 1. 89s52 Microcontroller 2. MAX-232 3. 555 4. DB9 connector 5. IR Sensor 6. Photo Diode 89s52 Microcontroller: The device also has four 8-bit I/O ports, three 16-bit timer/event counters, a multi-source, a four-priority-level, nested interrupt structure, an enhanced UART on-chip oscillator and timing circuits. The added features of 89c51 make it a powerful microcontroller for applications that require pulse width modulation, high-speed I/O and up/down counting capabilities such as motor control.

GSM BASED POWER THEFT SUBSTATION

MAX-232: The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply 232 voltage levels from a single 5-V supply. Each receiver converts 232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into 232 levels. 555: The LM555 is a highly stable device for generating accurate time delays or oscillation. Additional terminals are provided for triggering or resetting if desired. In the time delay mode of operation, the time is precisely controlled by one external resistor and capacitor. For astable operation as an oscillator, the free running frequency and duty cycle are accurately controlled with two external resistors and one capacitor. The circuit may be triggered and reset on falling waveforms, and the output circuit can source or sink up to 200mA or drive TTL circuits. IR Sensor: The MAX232 is a dual driver/receiver that includes a capacitive voltage generator to supply EIA-232 voltage levels from a single 5-V supply. Each receiver converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept 30-V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels. Photo Diode: A photodiode consists of an active p-n junction which is operated in reverse bias. When light falls on the junction, reverse current flows which is proportional to the illuminance. The linear response to light makes it an element in useful photo detectors for
6

GSM BASED POWER THEFT SUBSTATION

some applications. It is also used as the active element in lightactivated switches.

1.3. BLOCK DIAGRAM:


Power theft identification, in this paper, is done by converting the disc revolutions of each consumer's energy meter and distribution transformer into pulses. These pulses are frequency division multiplexed and transmitted through power line. These signals are individually picked and counted at the receiver end. If the difference of the sum of the consumer's readings and that of distribution transformer exceeds the preset value, which is set by considering transmission loss, the power theft is said to occur. The project can be categorized into 4 modules: Transmitting section Receiving section Processing section

Counter section the transmitted signal is selected at the

receiving end by the intermediate frequency transformer.

DESIGN LAYOUT:

GSM modem

Sensor Circuit

89s52 microcontroller

GSM BASED POWER THEFT SUBSTATION

1.4. COMPONENTS USED:


Semiconductors: IC1 IC2 IC3 Resistors: R1 R2, R3 R4, R5 R6-R9 Capacitors: C1 C2-C5 C6, C7 Miscellaneous: XTAL Modem D1, D2 D3, D4 Connector Battery 11.0592MHz GSM-300MHz IR Diode Photo Diode DB9 5V - 10F Electrolytic - 1F Electrolytic - 33PF Ceramic Disk 8.2-kilo-ohm 1-kilo-ohm 100-ohm 10K-Preset - 89s52 Microcontroller - MAX-232 - 555

GSM BASED POWER THEFT SUBSTATION

1.5. Circuit Diagram:

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 2

CHAPTER 2
10

GSM BASED POWER THEFT SUBSTATION

INTRODUCTION TO MICROCONTROLLERS
2.1 Definition:
Microprocessors and microcontrollers stems from the same basic idea, microprocessor is a general purpose digital computer central processing unit popularly known as memory usually

ROM,RAM, computer on chip .To make a complete microcomputer , one must add memory, usually ROM, RAM Memory decoders, an isolator and a number of I/O devices, such as parallel and serial data ports. The design of microcontroller added all these features along with ALU, PC, SP and registers.

2.2

History:

The past three decades have seen the introduction that has radically changed the way in which we analyze and control the world around us. Born of parallel developments in computer on chip first becomes a commercial reality in 1971 with the introduction of the 4-bit 4004 by a small, unknown company by the name of Intel corporation other, well
11

GSM BASED POWER THEFT SUBSTATION

established, semiconductor firms soon followed Intels pioneering technology so that by the late 1970s we could choose from half-adozen or micro processor types. A bi-product of microprocessor development was the microcontroller. The same fabrication techniques and programming concepts that make possible general-purpose microprocessor also yield the microcontroller. The criteria in choosing micro controller are as follows: Meeting the computing needs of the task at hand efficiently and cost effectively. Availability of software development tools such as

compilers, assemblers and debuggers. With availability and reliable sources of the microcontroller. The number of I/O pins and the timer on the chip. Speed and packaging Power consumption The amount of RAM and ROM on chip. The number of I/O pins and the timer on the chip. It is easy to upgrade to higher performance or lower power consumption versions. Cost per unit. Microprocessor and microcontroller systems form the same basic idea, microprocessor is a general-purpose digital computer central

processing unit (CPU) popularly known as computer pm chip. To make a complete microcomputer, one must add memory usually ROM, RAM, Memory decoders as isolator and number of I/O devices such as parallel and serial data ports. The design of microcontroller added all these features along with ALU, PC, SP and registers. The primary use of microprocessor is to read data, perform extensive
12

GSM BASED POWER THEFT SUBSTATION

calculations on that data and store those calculations on a mass storage device or display the results for human use. Like the microprocessor, a microcontroller is general purpose device, but one that is meant to read data, perform limited calculations on that data and control its environment based on those calculations the primary use of microcontroller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the life time of the system.

2.3 Use of a Micro Controller:


The time use of microprocessor is to read data, perform extensive calculations on that data and store those calculations on that data and store those calculations on a mass storage device or display the results for human use. Like the microprocessor, a microcontroller is a general purpose device, but one that is meant to read data, performs limited calculations on that data and control its environment based on those calculations. The prime use of micro controller is to control the operation of a machine using a fixed program that is stored in ROM and that does not change over the lifetime of the system.

2.4 Comparing With Microprocessor:


The contrast between a microcontroller and a microprocessor is that most processors have many operational codes for moving data from external memory to C.P.U; Microcontrollers may have one or two. Processor may have one or two types of bit handling instructions, micro controllers will have many. The microprocessor is concerned with rapid movement of code and data from external address to the chip whereas the microcontroller is concerned with the rapid movements of bits within the chip. The microcontroller can function as a computer of
13

GSM BASED POWER THEFT SUBSTATION

no external digital parts and the microprocessor must have many additional parts to be operational.

2.5 Memory Unit:


Memory is part of the microcontroller whose function is to store data. The easiest way to explain it is to describe it as one big closet with lots of drawers. If we suppose that we marked the drawers in such a way that they cannot be confused, any of their contents will then be easily accessible. It is enough to know the designation of the drawer and so its contents will be known to us for sure.

Figure2.2: Simplified model of a memory unit Memory components are exactly like that. For a certain input we get the contents of a certain addressed memory location and that's all. Two new concepts are brought to us: addressing and memory location. Memory consists of all memory locations, and addressing is nothing but selecting one of them. This means that we need to select the desired memory location on one hand, and on the other hand we need to wait for the contents of that location. Besides reading from a memory location, memory must also provide for writing onto it. This is
14

GSM BASED POWER THEFT SUBSTATION

done by supplying an additional line called control line. We will designate this line as R/W (read/write). Control line is used in the following way: if r/w=1, reading is done, and if opposite is true then writing is done on the memory location. Memory is the first element, and we need a few operation of our microcontroller. The amount of memory contained within a

microcontroller varies between different microcontrollers. Some may not even have any integrated memory (e.g. Hitachi 6503, now discontinued). However, most modern microcontrollers will have integrated memory. The memory will be divided up into ROM and RAM, with typically more ROM than RAM. Typically, the amount of ROM type memory will vary between around 512 bytes and 4096 bytes, although some 16 bit microcontrollers such as the Hitachi H8/3048 can have as much as 128 Kbytes of ROM type memory. ROM type memory, as has already been mentioned, is used to store the program code. ROM memory can be ROM (as in One Time Programmable memory), EPROM, or EEPROM. The amount of RAM memory is usually somewhat smaller, typically ranging between 25 bytes to 4 Kbytes. RAM is used for data storage and stack management tasks. It is also used for register stacks (as in the microchip PIC range of

microcontrollers).

2.6 Central processing Unit:


15

GSM BASED POWER THEFT SUBSTATION

Let add 3 more memory locations to a specific block that will have a built in capability to multiply, divide, subtract, and move its contents from one memory location onto another. The part we just added in is called "central processing unit" (CPU). Its memory locations are called registers.

Figure2.3: Simplified central processing unit with three registers Registers are therefore memory locations whose role is to help with performing various mathematical operations or any other operations with data wherever data can be found. Look at the current situation. We have two independent entities (memory and CPU) which are interconnected, and thus any exchange of data is hindered, as well as its functionality. If, for example, we wish to add the contents of two memory locations and return the result again back to memory, we would need a connection between memory and CPU. Simply stated, we must have some "way" through data goes from one block to another.

2.7 EEPROM:
EEPROM means Electrical Erasable Programmable Read Only Memory and also referred to as EPROM chip or i2c. As the name suggest, an EEPROM
16

can

be

both

erased

and

GSM BASED POWER THEFT SUBSTATION

programmed with electrical pulses from a programmer kit, burner or the equipment itself. Since it can be both electrically written into and electrically erased, the EEPROM IC can be quickly programmed and erased in circuit for reprogramming without taking them out from the main board. EEPROM IC is also called a non-volatile memory because when the power is switched off, the stored data (information) in the EEPROM IC will not be erased or corrupt and the data is still intact. New EEPROM IC have no data (blank) inside and normally have to program it first with a programmer tools before it can be use on electron IC circuit.

Figure3.1: Showing EEPROM of Atmel If you just installed a new or blank EEPROM IC into a main board, even though with the same part number, I can say that the equipment will surely not going to work because the CPU or microprocessor do not know how to function. Information or data stored in this type of memory can be retained for many years even without a continuous dc power supply to the IC. Application/ Operation of EEPROM: EEPROMs mainly store user programmable information such as: VCR programming information or data CD programming information or data
17

GSM BASED POWER THEFT SUBSTATION

Digital satellite receiver control data or information User information on various consumer products such as in T.V.

The EEPROM IC in Computer Monitor performs two tasks: When a monitor is turn on it will copies all the data or information

from the EEPROM to the microprocessor or CPU. For instance, the EEPROM will let the CPU know the frequencies at which the monitor is going to run. The EEPROM IC is used to store the current settings of the

Monitor. The current settings of the monitor will not be erased even when the monitor is switched off. Anytime when a change is made in the monitor settings, the CPU updates the setting in the EEPROM (store data in EEPROM). When the monitor is switch on again, the stored settings in EEPROM IC are used to set up the monitor for operation. Assuming the data file in MONITOR or TVs EEPROM are corrupted damaged and failure detected, what would be the display symptoms like? There would be no high voltage (no display) because the CPU dont activate the 12 volt line supply to the horizontal and vertical oscillator IC. The IC will not save (store) the current setting of the equipment Some control functions like sound, brightness, horizontal size and The On Screen Display (OSD) would not work or the OSD will have a corrupted or erratic display.

contrast control will not work.

18

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 3

CHAPTER 3
19

GSM BASED POWER THEFT SUBSTATION

HARDWARE DISCRIPTION
3.1. 89S52:
Features Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory Endurance: 1000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Description: The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory pro-grammer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The AT89S52 provides the following standard features: 8K bytes of Flash, 256 bytes of RAM, 32 I/O lines, Watchdog timer, two data pointers, three 16-bit timer/counters, a six-vector two-level interrupt architecture, a full duplex serial port, on-chip oscillator, and clock circuitry. In addition, the AT89S52 is designed with static logic for operation down to zero frequency and supports two software selectable power saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, and
20

GSM BASED POWER THEFT SUBSTATION

interrupt system to continue functioning. The Power-down mode saves the RAM con-tents but freezes the oscillator, disabling all other chip functions until the next interrupt or hardware reset.

3.2. GSM Module:


GSM has been the backbone of the phenomenal success in mobile telecom over the last decade. Now, at the dawn of the era of true broadband services, GSM continues to evolve to meet new demands. GSM is an open, non-proprietary system that is constantly evolving. One of its great strengths is the international roaming capability. This gives consumers seamless and same standardized same number contact ability in more than 212 countries. This has been a vital driver in growth, with around 300 million GSM subscribers currently in Europe and Asia. In the Americas, today's 7 million subscribers are set to grow rapidly, with market potential of 500 million in population, due to the introduction of GSM 800, which allows operators using the 800 MHz band to have access to GSM technology too. GSM satellite roaming has extended service access to areas where terrestrial coverage is not available. GSM differs from first generation wireless systems in that it uses digital technology and time division multiple access transmission methods. Voice is digitally encoded via a unique encoder, which emulates the characteristics of human speech. This method of transmission permits a very efficient data rate/information content ratio. Cellular mobile communication is based on the concept of frequency reuse. That is, the limited spectrum allocated to the service is partitioned into, for example, N non-overlapping channel sets, which are then assigned in a regular repeated pattern to a hexagonal cell grid. The hexagon is just a convenient idealization
21

GSM BASED POWER THEFT SUBSTATION

that approximates the shape of a circle (the constant signal level contour from an omni directional antenna placed at the center) but forms a grid with no gaps or overlaps. The choice of N is dependent on many tradeoffs involving the local propagation environment, traffic distribution, and costs. The propagation environment determines the interference received from neighboring co-channel cells, which in turn governs the reuse distance, that is, the distance allowed between co-channel cells (cells using the same set of frequency channels). The cell size determination is usually based on the local traffic distribution and demand. The more the concentration of traffic demand in the area, the smaller the cell has to be sized in order to avail the frequency set to a smaller number of roaming subscribers and thus limit the call blocking probability within the cell. On the other hand, the smaller the cell is sized, the more equipment will be needed in the system as each cell requires the necessary transceiver and switching equipment, known as the base station subsystem (BSS), through which the mobile users access the network over radio links. The degree to which the allocated frequency spectrum is reused over the cellular service area, however, determines the spectrum efficiency in cellular systems. That means the smaller the cell size, and the smaller the number of cells in the reuse geometry, the higher will be the spectrum usage efficiency. Since digital modulation systems can operate with a smaller signal to noise (i.e., signal to interference) ratio for the same service quality, they, in one respect, would allow smaller reuse distance and thus provide higher spectrum efficiency. This is one advantage the digital cellular provides over the older analogue cellular radio communication systems. It is worth mentioning that the digital systems have commonly used sectored cells with 12022

GSM BASED POWER THEFT SUBSTATION

degree or smaller directional antennas to further lower the effective reuse distance. This allows a smaller number of cells in the reuse pattern and makes a larger fraction of the total frequency spectrum available within each cell. Currently, research is being done on implementing other enhancements such as the use of dynamic channel assignment strategies for raising the spectrum efficiency in certain cases, such as high uneven traffic distribution over cells.

3.2.1. GSM SPECIFICATION


Device Name ROM (Flash) RAM Operating Voltage : Vegarobo : 16Mb : 2Mb : 3.1 4.5 V

Receiving Frequency : 925 960 MHz Transmitting Frequency : 880 915 MHz

3.2.2. GSM BLOCK DIAGRAM

23

GSM BASED POWER THEFT SUBSTATION

3.2.3. GSM NETWORK: A GSM network is composed of several functional entities, whose functions and interfaces are specified. The GSM network can be divided into three broad parts. The Mobile Station is carried by the subscriber. The Base Station Subsystem controls the radio link with the Mobile Station. The Network Subsystem, the main part of which is the Mobile services Switching Center (MSC), performs the switching of calls between the mobile users, and between mobile and fixed network users. The MSC also handles the mobility management operations. Not shown is the Operations and Maintenance Center, which oversees the proper operation and setup of the network. The Mobile Station and the Base Station Subsystem communicate across the Um interface, also known as the air interface or radio link. The Base
24

GSM BASED POWER THEFT SUBSTATION

Station Subsystem communicates with the Mobile services Switching Center across the A interface.

3.2.3.1. Mobile Station: Mobile Equipment (ME) such as hand portable and vehicle mounted unit. Subscriber Identity Module (SIM), which contains the entire customer related information (identification, secret key for authentication, etc.). The SIM is a small smart card, which contains both programming and information. The A3 and A8 algorithms are implemented in the Subscriber Identity Module (SIM). Subscriber information, such as the IMSI (International Mobile Subscriber Identity), is stored in the Subscriber Identity Module (SIM). The Subscriber Identity Module (SIM) can be used to store user-defined information such as phonebook entries. One of the advantages of the GSM architecture is that the SIM may be moved from one Mobile Station to another. This makes upgrades very simple for the GSM telephone user. The use of SIM card is mandatory in the GSM world, whereas the SIM (RUIM) is not very popular in the CDMA world. 3.2.3.2. Base Station Subsystem (BSS):

25

GSM BASED POWER THEFT SUBSTATION

All radio-related functions are performed in the BSS, which consists of base Station controllers (BSCs) and the base transceiver stations (BTSs). 3.2.3.3. Base Transceiver Station (BTS): The Base Transceiver Station (BTS) contains the equipment for transmitting and receiving of radio signals (transceivers), antennas, and equipment for encrypting and decrypting communications with the Base Station Controller (BSC). A group of BTSs are controlled by a BSC. Typically a BTS for anything other than a picocell will have several transceivers (TRXs), which allow it to serve several different frequencies and different sectors of the cell (in the case of sectorised base stations). A BTS is controlled by a parent BSC via the Base Station Control Function (BCF). The BCF is implemented as a discrete unit or even incorporated in a TRX in compact base stations. The BCF provides an Operations and Maintenance (O&M) connection to the Network Management System (NMS), and manages operational states of each TRX, as well as software handling and alarm collection. 3.2.3.4. Base Station Controller (BSC): The BSC controls multiple BTSs and manages radio channel setup, and handovers. The BSC is the connection between the Mobile Station and Mobile Switching Center. The Base Station Controller (BSC) provides, classically, the intelligence behind the BTSs. Typically a BSC has 10s or even 100s of BTSs under its control. The BSC handles allocation of radio channels, receives measurements from the mobile phones, controls handovers from BTS to BTS. A key function of the BSC is to act as a concentrator where many different low capacity connections to BTSs become
26

GSM BASED POWER THEFT SUBSTATION

reduced to a smaller number of connections towards the Mobile Switching Center (MSC) (with a high level of utilization). Overall, this means that networks are often structured to have many BSCs distributed into regions near their BTSs which are then connected to large centralized MSC sites. The BSC is undoubtedly the most robust element in the BSS as it is not only a BTS controller but, for some vendors, a full switching center, as well as an SS7 node with connections to the MSC and SGSN. It also provides all the required data to the Operation Support Subsystem (OSS) as well as to the performance measuring centers. A BSC is often based on a distributed computing architecture, with redundancy applied to critical functional units to ensure availability in the event of fault conditions. Redundancy often extends beyond the BSC equipment itself and is commonly used in the power supplies and in the transmission equipment providing the A-ter interface to PCU. The databases for all the sites, including information such as carrier frequencies, frequency hopping lists, power reduction levels, receiving levels for cell border calculation, are stored in the BSC. 3.2.3.5. Network Switching Subsystem (NSS): Network Switching Subsystem is the component of a GSM system that carries out switching functions and manages the communications between mobile phones and the Public Switched Telephone Network. It is owned and deployed by mobile phone operators and allows mobile phones to communicate with each other and telephones in the wider telecommunications network. The architecture closely resembles a telephone exchange, but there are additional functions which are needed because the phones are not fixed in one location. There is also an overlay architecture on the
27

GSM BASED POWER THEFT SUBSTATION

GSM core network to provide packet-switched data services and is known as the GPRS core network. This allows mobile phones to have access to services such as WAP, MMS, and Internet access. All mobile phones manufactured today have both circuit and packet based services, so most operators have a GPRS network in addition to the standard GSM core network.

3.2.3.6. Mobile Switching Centre (MSC): The Mobile Switching Centre or MSC is a sophisticated telephone exchange, which provides circuit-switched calling, mobility management, and GSM services to the mobile phones roaming within the area that it serves. This means voice, data and fax services, as well as SMS and call divert. In the GSM mobile phone system, in contrast with earlier analogue services, fax and data information is sent directly digitally encoded to the MSC. Only at the MSC is this re-coded into an "analogue" signal. There are various different names for MSCs in different context, which reflects their complex role in the network, all of these terms though could refer to the same MSC, but doing different things at different times. A Gateway MSC is the MSC that determines which visited MSC the subscriber who is being called is currently located. It also interfaces with the Public Switched Telephone Network. All mobile to mobile calls and PSTN to mobile calls are routed through a GMSC. The term is only valid in the context of one call since any MSC may provide both the gateway function and the Visited MSC function, however, some manufacturers design dedicated high capacity MSCs which do not have any BSCs connected to them. These MSCs will then be the Gateway MSC for many of the calls they handle.

28

GSM BASED POWER THEFT SUBSTATION

The Visited MSC is the MSC where a customer is currently located. The VLR associated with this MSC will have the subscriber's data in it. The Anchor MSC is the MSC from which a handover has been initiated. The Target MSC is the MSC toward which a Handover should take place. An MSC Server is a part of the redesigned MSC concept starting from 3GPP Release 5. 3.2.4. FREQUENCY BAND USAGE: Since radio spectrum is a limited resource shared by all users, a method must be devised to divide up the bandwidth among as many users as possible. The method chosen by GSM is a combination of Time- and Frequency-Division Multiple Access (TDMA/FDMA). The FDMA part involves the division by frequency of the (maximum) 25 MHz bandwidth into 124 carrier frequencies spaced 200 kHz apart. One or more carrier frequencies are assigned to each base station. Each of these carrier frequencies is then divided in time, using a TDMA scheme. The fundamental unit of time in this TDMA scheme is called a burst period and it lasts 15/26 ms (or approx. 0.577 ms). Eight burst periods are grouped into a TDMA frame (120/26 ms, or approx. 4.615 ms), which forms the basic unit for the definition of logical channels. One physical channel is one burst period per TDMA frame. Channels are defined by the number and position of their corresponding burst periods. All these definitions are cyclic, and the entire pattern repeats approximately every 3 hours. Channels can be divided into dedicated channels, which are allocated to a mobile station, and common channels, which are used by mobile stations in idle mode. A traffic channel (TCH) is used to carry speech and data traffic. Traffic channels are defined using a 26-frame multiframe, or group of 26 TDMA frames. The length of a 26-frame
29

GSM BASED POWER THEFT SUBSTATION

multiframe is 120 ms, which is how the length of a burst period is defined (120 ms divided by 26 frames divided by 8 burst periods per frame). Out of the 26 frames, 24 are used for traffic, 1 is used for the Slow Associated Control Channel (SACCH) and 1 is currently unused. TCHs for the uplink and downlink are separated in time by 3 burst periods, so that the mobile station does not have to transmit and receive simultaneously, thus simplifying the electronics. In addition to these full-rate TCHs, there are also half-rate TCHs defined, although they are not yet implemented. Half-rate TCHs will effectively double the capacity of a system once half-rate speech coders are specified (i.e., speech coding at around 7 kbps, instead of 13 kbps). Eighth-rate TCHs are also specified, and are used for signaling. In the recommendations, they are called Stand-alone Dedicated Control Channels (SDCCH).

Organization of bursts, TDMA frames, and multiframes for speech and data GSM is a digital system, so speech which is inherently analog, has to be digitized. The method employed by ISDN, and by current telephone systems for multiplexing voice lines over high speed trunks and optical fiber lines, is Pulse Coded Modulation (PCM). The output stream from PCM is 64 kbps, too high a rate to
30

GSM BASED POWER THEFT SUBSTATION

be feasible over a radio link. The 64 kbps signal, although simple to implement, contains much redundancy. The GSM group studied several speech coding algorithms on the basis of subjective speech quality and complexity (which is related to cost, processing delay, and power consumption once implemented) before arriving at the choice of a Regular Pulse Excited -- Linear Predictive Coder (RPE-LPC) with a Long Term Predictor loop. Basically, information from previous samples, which does not change very quickly, is used to predict the current sample. The coefficients of the linear combination of the previous samples, plus an encoded form of the residual, the difference between the predicted and actual sample, represent the signal. Speech is divided into 20 millisecond samples, each of which is encoded as 260 bits, giving a total bit rate of 13 kbps. This is the so-called Full-Rate speech coding. Recently, an Enhanced Full-Rate (EFR) speech-coding algorithm has been implemented by some North American GSM1900 operators. This is said to provide improved speech quality using the existing 13 kbps bit rate. 3.2.5. WORKING: The GSM module is connected with the controller. As the controller is keeping on monitoring the door when the door gets opened, the microcontroller sends the command AT to initiate the module. Now the module sends a sms as Theft Occurred to the already fed mobile number. Thus the information is passed from the module to the Authorized person. 3.2.6. FEATURES: Performance Integrity - Fast with high real throughput - Secure controlled data transfer
31

GSM BASED POWER THEFT SUBSTATION

Network Access Contention Control Installation Frequency Choice

- Quick and consistent - Avoid conflicts and collisions - Simple quick installation - Choice of RF bands to suit different terrains

Network Diagnostics - For ease of maintenance and cost saving

3.3. MAX-232:
3.3.1. Logic Signal Voltage: Serial RS-232 (V.24) communication works with voltages (between -15V ... -3V are used to transmit a binary '1' and +3V ... +15V to transmit a binary '0') which are not compatible with today's computer logic voltages. On the other hand, classic TTL computer logic operates between 0V ... +5V (roughly 0V ... +0.8V referred to as low for binary '0', +2V ... +5V for high binary '1' ). Modern lowpower logic operates in the range of 0V ... +3.3V or even lower. So, the maximum RS-232 signal levels are far too high for today's computer logic electronics, and the negative RS-232 voltage can't be rocked at all by the computer logic. Therefore, to receive serial data from an RS-232 interface the voltage has to be reduced, and the 0 and 1 voltage levels inverted. In the other direction (sending data from some logic over RS-232) the low logic voltage has to be "bumped up", and a negative voltage has to be generated, too. RS-232 -15V ... -3V +3V ... +15V TTL <-> <-> Logic <-> 1

----------------------------------------------+2V ... +5V 0V ... +0.8V <-> 0

32

GSM BASED POWER THEFT SUBSTATION

All this can be done with conventional analog electronics, e.g. a particular power supply and a couple of transistors or the once popular 1488 (transmitter) and 1489 (receiver) ICs. However, since more than a decade it has become standard in amateur electronics to do the necessary signal level conversion with an integrated circuit (IC) from the MAX232 family (typically a MAX232A or some clone). In fact, it is hard to find some RS-232 circuitry in amateur electronics without a MAX232A or some clone. 3.3.2. The MAX232 & MAX232A: The MAX232 from Maxim was the first IC which in one package contains the necessary drivers (two) and receivers (also two), to adapt the RS-232 signal voltage levels to TTL logic. It became popular, because it just needs one voltage (+5V) and generates the necessary RS-232 voltage levels (approx. -10V and +10V) internally. This greatly simplified the design of circuitry. Circuitry designers no longer need to design and build a power supply with three voltages (e.g. -12V, +5V, and +12V), but could just provide one +5V power supply, e.g. with the help of a simple 78x05 voltage converter. The MAX232 has a successor, the MAX232A. The ICs are almost identical, however, the MAX232A is much more often used (and easier to get) than the original MAX232, and the MAX232A only needs external capacitors 1/10th the capacity of what the original MAX232 needs. It should be noted that the MAX232 (A) is just a driver/receiver. It does not generate the necessary RS-232 sequence of marks and spaces with the right timing, it does not decode the RS-232 signal, and it does not provide a serial/parallel conversion. All it does is to convert signal voltage levels. Generating serial data with the
33

GSM BASED POWER THEFT SUBSTATION

right timing and decoding serial data has to be done by additional circuitry, e.g. by a 16550 UART or one of these small micro controllers (e.g. Atmel AVR, Microchip PIC) getting more and more popular. The MAX232 and MAX232A were once rather expensive ICs, but today they are cheap. It has also helped that many companies now produce clones (i.e. SiPix). These clones sometimes need different external circuitry, e.g. the capacities of the external capacitors vary. It is recommended to check the data sheet of the particular manufacturer of an IC instead of relying on Maxim's original data sheet. The original manufacturer (and now some clone manufacturers, too) offers a large series of similar ICs, with different numbers of receivers and drivers, voltages, built-in or external capacitors, etc. E.g. The MAX232 and MAX232A need external capacitors for the internal voltage pump, while the MAX233 has these capacitors builtin. The MAX233 is also between three and ten times more expensive in electronic shops than the MAX232A because of its internal capacitors. It is also more difficult to get the MAX233 than the garden variety MAX232A. A similar IC, the MAX3232 is nowadays available for low-power 3V logic.

34

GSM BASED POWER THEFT SUBSTATION

3.3.3. MAX232 (A) DIP Package:

C1+ V+ C1C2+ C2VT2out R2in

+---v---+ -|1 16|-|2 15|-|3 14|-|4 13|-|5 12|-|6 11|-|7 10|-|8 9|+-------+

Vcc GND T1out R1in R1out T1in T2in R2out

35

GSM BASED POWER THEFT SUBSTATION

3.4. DB9 connector: RS232 serial cable layout Almost nothing in computer interfacing is more confusing than selecting the right RS232 serial cable. These pages are intended to provide information about the most common serial RS232 cables in normal computer use, or in more common language "How do I connect devices and computers using RS232?" 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 while the modem is online 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
36

GSM BASED POWER THEFT SUBSTATION

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 RS232 DB25 pinout

DEC MMJ pinout

3.5. 555-Timer: An Overview of the 555 Timer: The 555 Integrated Circuit (IC) is an easy to use timer that has many applications. It is widely used in electronic circuits and this popularity means it is also very cheap to purchase, typically
37

GSM BASED POWER THEFT SUBSTATION

costing around 30p. A 'dual' version called the 556 is also available which includes two independent 555 ICs in one package. The following illustration shows both the 555 (8-pin) and the 556 (14-pin).

In a circuit diagram the 555 timer chip is often drawn like the illustration below. Notice how the pins are not in the same order as the actual chip, this is because it is much easier to recognize the function of each pin, and makes drawing circuit diagrams much easier.

For the 555 to function it relies on both analogue and digital electronic techniques, but if we consider its output only, it can be thought of as a digital device. The output can be in one of two states at any time, the first state is the 'low' state, which is 0v. The second state is the 'high' state, which is the voltage Vs (The voltage of your power supply which can be anything from 4.5 to 15v. 18v absolute maximum). The most common types of outputs can be

38

GSM BASED POWER THEFT SUBSTATION

categorized by the following (their names give you a clue as to their functions):

Monostable mode: in this mode, the 555 functions as a "oneshot". Applications include timers, missing pulse detection, bouncef ree switches, touch switches, frequency divider, capacitance measurement, pulse-width modulation (PWM) etc Astable - free running mode: the 555 can operate as an oscillator. Uses include LED and lamp flashers, pulse generation, logic clocks, tone generation, security alarms, pulse position modulation, etc. Bistable mode or Schmitt trigger: the 555 can operate as a flip-flop, if the DIS pin is not connected and no capacitor is used. Uses include bounce free latched switches, etc.

Pin Configuration of the 555 Timer


Here is the identification for each pin:

When drawing a circuit diagram, always draw the 555 as a building block, as shown below with the pins in the following locations. This will help you instantly recognise the function of each pin:

39

GSM BASED POWER THEFT SUBSTATION

Pin 1 (Ground): Connects to the 0v power supply. Pin 2 (Trigger): Detects 1/3 of rail voltage to make output HIGH. Pin 2 has control over pin 6. If pin 2 is LOW, and pin 6 LOW, output goes and stays HIGH. If pin 6 HIGH, and pin 2 goes LOW, output goes LOW while pin 2 LOW. This pin has a very high impedance (about 10M) and will trigger with about 1uA. Pin 3 (Output): (Pins 3 and 7 are "in phase.") Goes HIGH (about 2v less than rail) and LOW (about 0.5v less than 0v) and will deliver up to 200mA. Pin 4 (Reset): Internally connected HIGH via 100k. Must be taken below 0.8v to reset the chip. Pin 5 (Control): A voltage applied to this pin will vary the timing of the RC network (quite considerably). Pin 6 (Threshold): Detects 2/3 of rail voltage to make output LOW only if pin 2 is HIGH. This pin has very high impedance (about 10M) and will trigger with about 0.2uA. Pin 7 (Discharge): Goes LOW when pin 6 detects 2/3 rail voltage but pin 2 must be HIGH. If pin 2 is HIGH, pin 6 can be HIGH or LOW and pin 7 remains LOW. Goes OPEN (HIGH) and stays HIGH when pin 2 detects 1/3 rail voltage (even as a LOW pulse) when pin 6 is LOW. (Pins 7 and 3 are "in phase.") Pin 7 is equal to pin 3 but pin 7 does not go high - it goes OPEN. But it goes LOW and will sink about 200mA.

40

GSM BASED POWER THEFT SUBSTATION

Pin 8 (Supply): Connects to the positive power supply (Vs). This can be any voltage between 4.5V and 15V DC, but is commonly 5V DC when working with digital ICs. 3.6. INFRA-RED: The term infrared is a Latin word meaning beyond the red. Infrared is commonly shortened to IR. The process of detecting or sensing infrared radiation from a target without being in physical contact with that target is known as remote sensing. Active and passive systems are used for remote sensing. Active systems send a signal to the target and receive a return signal. Radar sets are examples of active systems. Passive systems detect a signal or disturbance originating at the target. The signal may be emitted either by the target or another source. Photography using natural light is an example of a passive system Humans can see only a small part of the entire electromagnetic spectrum. However, even though we cannot see them, other parts of the spectrum contain useful information. The infrared spectrum is a small portion of the entire electromagnetic spectrum. IR radiation is a form of electromagnetic energy. characteristics include reflection, speed IR waves have certain absorption, and characteristics similar to those of light and RF waves. These refraction, of transmission. IR waves differ from light, RF, and

other electromagnetic waves only in wavelengths and frequency of oscillation. The IR frequency range is from about 300 gigahertz to 400 terahertz. Its place in the and electromagnetic the microwave spectrum (fig. 6-1) is between visible light region used for high-definition radar.

The IR region of the

electromagnetic spectrum lies between wavelengths of 0.72 and


41

GSM BASED POWER THEFT SUBSTATION

1,000 micrometers. Discussion of the IR region is usually in terms of wavelength rather than frequency.

When the sensor is controlled by a microcontroller to generate the low duty cycle pulses, you can benefit from the High and Low pulses to be able to detect any false readings due to ambient light. This is done by recording 2 different outputs of the sensor, one of them during the ON pulse (the sensor is emitting infra red light) and the other during the OFF time. and compare the results. The Idea is enlightened by this graph, where in the first period, there is low ambient noise, so the microcontroller records a "1" during the on cycle, meaning that an object reflected the emitted IR Light, and then the microcontroller records a "0" meaning that during the OFF time, it didn't receive anything, which is logic because the emitter LED was OFF. But study the second period of the graph, where the sensor is put in a high ambient light environment. As you can see, the the microcontroller records "1" in both conditions (OFF or ON). This means that we can't be sure whether the sensor reception was caused by an object that reflected the sent IR light, or it is simply receiving too much ambient light, and is giving "1" whether there is an obstacle or not.

42

GSM BASED POWER THEFT SUBSTATION

The following table show the possible outcomes of this method. Output recorded during: On pluse 1 Off time 0 Software based deduction There is definitely an Obstacle in front of the sensor The sensor is saturated by ambient 1 1 light, thus we can't know if there is an obstacle 0 0 There is definitely Nothing in front of the sensor, the way is clear This reading is un logical, there is something wrong with the sensor.

Example C Code for 8051 microcontrollers #include<REGX51.h> #include<math.h> unsignedchar ir; // to store the final result bit ir1,ir2; delay(y) unsignedinti; for(i=0;i<y;i++){;}
43

// the 2 recording point required for our algorithm // simple delay function

GSM BASED POWER THEFT SUBSTATION

} voidmain() { //P2.0 IR control pin going to the sensor //P2.1 IR output pin coming from the sensor while(1){ P2_0=1; //sendIR delay(20); ir1=P2_1; P2_0 = 0; delay(98); ir2 = P2_1; if ((ir1 == 1)&(ir2 == 0)){ ir = 1; P2_3 = 1; LED. if ((ir1 == 1)&(ir2 == 1)){ ir = 2; }else{ ir = 0; } } } The correct positioning of the sender LED, the receiver LED with regard to each other and to the Op-Amp can also increase the performance of the sensor. First, we need to adjust the position of
44

//stop IR

// Obstacle detected // Pin 3 of PORT 2 will go HIGH turning ON a

// Sensor is saturated by ambient light // The way is clear in front of the sensor.

GSM BASED POWER THEFT SUBSTATION

the sender LED with respect to the receiver LED, in such a way they are as near as possible to each others , while preventing any IR light to be picked up by the receiver LED before it hit and object and returns back. The easiest way to do that is to put the sender(s) LED(s) from one side of the PCB, and the receiver LED from the other side, as shown in the 3D model below. This 3D model shows the position of the LEDs. The green plate is the PCB holding the electronic components of the sensor. you can notice that the receiver LED is positioned under the PCB, this way, there wont be ambient light falling directly on it, as ambient light usually comes from the top. It is also clear that this way of positioning the LEDs prevent the emitted IR light to be detected before hitting an eventual obstacle.

Another important issue about components positioning, is the distance between the receiver LED and the Op-Amp. which should be as small as possible. Generally speaking, the length of wires or PCB tracks before an amplifier should be reduced, otherwise, the amplifier will amplify - along with the original signal - a lot of noise picked up form the electromagnetic waves traveling the surrounding. 3.7. Photo Diode:

45

GSM BASED POWER THEFT SUBSTATION

A second optoelectronic device that conducts current when exposed to light is the PHOTOTRANSISTOR. A phototransistor, however, is much more sensitive to light and produces more output current for a given light intensity that does a photodiode. Figure 3-32 shows one type of phototransistor, which is made by placing a photodiode in the base circuit of an NPN transistor. Light falling on the photodiode changes the base current of the transistor, causing the collector current to be amplified. Phototransistors may also be of the PNP type, with the photodiode placed in the base-collector circuit. Figure 3-32. - Phototransistor.

Figure 3-33 illustrates the schematic symbols for the various types of phototransistors. Phototransistors may be of the two-terminal type, in which the light intensity on the photodiode alone determines the amount of conduction. They may also be of the three-terminal type, which have an added base lead that allows an electrical bias to be applied to the base. The bias allows an optimum transistor conduction level, and thus compensates for ambient (normal room) light intensity.

46

GSM BASED POWER THEFT SUBSTATION

Figure 3-33. - 2-terminal and 3-terminal phototransistors.

3.8. Voltage Regulator: Voltage Regulator (regulator), usually having three legs, converts varying input voltage and produces a constant regulated output voltage. They are available in a variety of outputs. The most common part numbers start with the numbers 78 or 79 and finish with two digits indicating the output voltage. The number 78 represents positive voltage and 79 negative one. The 78XX series of voltage regulators are designed for positive input. And the 79XX series is designed for negative input. Examples: 5V DC Regulator Name: LM7805 or MC7805 -5V DC Regulator Name: LM7905 or MC7905 6V DC Regulator Name: LM7806 or MC7806 -9V DC Regulator Name: LM7909 or MC7909

The LM78XX series typically has the ability to drive current up to 1A. For application requirements up to 150mA, 78LXX can be used. As mentioned above, the component has three legs: Input leg which can hold up to 36VDC Common leg (GND) and an output leg with the regulator's voltage. For maximum voltage regulation, adding a capacitor in parallel between the common leg and the output is usually recommended. Typically a 0.1MF capacitor is used. This
47

GSM BASED POWER THEFT SUBSTATION

eliminates any high frequency AC voltage that could otherwise combine with the output voltage. See below circuit diagram which represents a typical use of a voltage regulator.

Note: As a general rule the input voltage should be limited to 2 to 3 volts above the output voltage. The LM78XX series can handle up to 36 volts input, be advised that the power difference between the input and output appears as heat. If the input voltage is unnecessarily high, the regulator will overheat. Unless sufficient heat dissipation is provided through heat sinking, the regulator will shut down.

48

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 4

49

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 4 SOFTWARE DESCRIPTION


4.1. Kiel Compiler: The Real View Microcontroller Development Kit is the complete software development environment for all ARM7, ARM9, Cortex - M1, and Cortex-M3 processor based devices. It combines the industry leading Real View compilation tools (by ARM) with the LVision IDE/Debugger, providing developers with an easy to use, featurerich environment optimized for ARM Powered devices. The Real View Microcontroller Development Kit (MDK) provides an easy-to-use development interface, with many unique features designed to help you develop your project quickly and easily. Save time by using the Device Database to automatically configure device and project parameters. Benefit from better verification by using the integrated Device Simulator which accurately models more than 260 ARM Powered devices including the ARM instruction set and on-chip peripherals. The Real View MDK is based on the ARM Real View compilation tools, recognized as delivering the tightest, highest performing code for all ARM-Powered devices. In addition, further code size savings can be gained by selecting the new MicroLib, which has been specifically developed and optimized for embedded systems. 4.2. Debugger and Device Simulator: The LVision Debugger supports complex breakpoints (with conditional or logical expressions) and memory access breakpoints (with read/write access from an address or range).The debugger also displays code coverage and execution profiling information in the editor windows. Additionally, the LVision Debugger simulates a
50

GSM BASED POWER THEFT SUBSTATION

complete ARM Powered microcontroller including the instruction set and on-chip peripherals. These powerful simulation capabilities provide serious benefits and promote rapid, reliable embedded software development and verification. Simulation allows software testing with no hardware. Improve overall reliability with early software debugging. Simulation allows breakpoints that are not possible with hardware debuggers. Simulation allows for optimal input signals (hardware debuggers add extra noise). Signal functions are easily programmed to reproduce complex, realworld input signals. Single-step through signal processing algorithms. Test failure scenarios that would destroy real hardware.

MAIN WINDOW OF KEIL COMPILER 4.3. Project Configuration: The LVision IDE incorporates a Device Database of supported ARM Powered microcontrollers. In LVision projects, required options are set automatically when you select the device from the Device Database. LVision displays only those options that are relevant to
51

GSM BASED POWER THEFT SUBSTATION

the selected device and prevents you from selecting incompatible directives. Only a few dialogs are required to completely configure all the tools (assembler, compiler, linker, debugger, and flash download utilities) and memory map for the application. 4.4. Editor and source browser: The LVision Editor includes all the standard features you expect in a professional editor. Workflow is optimized with intuitive toolbars providing quick access to editor functions, most of which are also available while debugging for easy source code changes. The integrated LVision Source Browser quickly displays information about symbols and variables in your program using the F12 key and the Source Browser Window. 4.5. Getting Started: The LVision IDE is the easiest way for most developers to create embedded applications using the Keil development tools. To launch LVision, click on the icon on your desktop or select Keil LVision3 from the Start Menu.

FIGURE 4.5: CREATING A PROJECT In the Project Menu: New Creates a new project. Open opens an existing project.

52

GSM BASED POWER THEFT SUBSTATION

4.6. Project Management: File Groups allow you to group associated files together. They may be used to separate files into functional blocks or to identify engineers in your software team. Project Targets allow you to create several programs from a single project. You may require one target for testing and another target for a release version of your application. Each target allows individual tool settings within the same project file. A Project is the collection of all the source files as well as the compiler, assembler, and linker settings required to compile and link a program. LVision includes several robust features that make project management easy. 4.7. Device Support: One of the hardest parts of starting a new project is selecting the right mix of compiler, assembler, and linker options for the particular chip you use. LVision provides the Device Database which use and LVision sets all the necessary assembler, compiler, and linker options automatically. 4.8. Startup Code: Configuring startup code can be one of the most frustrating aspects of embedded software development. The LVision IDE automatically includes the appropriate startup code (based on the device you select) and provides a known foundation from which to start. The configuration Wizard helps you set startup options for your target hardware using familiar dialog controls. 4.9. Option Settings: LVision lets you set the options for all files in a target, a group, or even a single source file. Click the Options for Target button on
53

GSM BASED POWER THEFT SUBSTATION

the toolbar to change the project options for the currently selected target. In the Project Workspace, you may right-click the target, group, or source file to open the options dialog specific to that item. The Options Dialog offers several Tabs where you specify option settings: The Device tab allows you to select the device for this target. The Target tab allows you to specify the memory model and memory parameters. You may enter the external (or off-chip) memory address ranges under External Memory. When you start a new project, you typically only need to setup the options on this tab. The Output tab allows you to specify the contents of the output files generated by the assembler, compiler, and linker. The Listing tab allows you to configure the contents of the listing files. The C/C++, Asm, and Linker tabs allow you to enter toolspecific options and display the current tool settings. The Debug tab configures the LVision Debugger. The Utilities tab configures Flash memory programming for your target system. 4.10. Target and Groups: LVision projects are composed of one or more targets, one or more file groups, and source files. A target is a collection of all files groups and the development tool options. While most projects require only one target, you may create as many targets as you like. Each target generates a different target file with different options. These two targets, Simulator-Real View and Simulator-CARM, create distinct binary files. The Simulator-Real view target uses the Real View compilation tools for ARM while the Simulator-CARM target uses the Kiel compilation tools for ARM.
54

GSM BASED POWER THEFT SUBSTATION

Each target has its own tool configuration settings. Files and groups may be included or excluded as needed for startup or other targetspecific source code. Click the Setup Editor Button to manage the targets maintained in your project. In the Project Components tab, you may configure the Project Targets, Groups, and Files in your project. Each Target has its own option settings and output file name that you may define. You may create one Target for testing with the simulator and another Target for a release version of your application that will be programmed into Flash ROM. Within Targets, you may have one or more file Groups which allow you to associate source files together. Groups are useful for grouping files into functional blocks or for identifying engineers in a software team. Files are simply the source files within a group. 4.11. Source Files: The source files in your LVision project display in a Project Workspace. Each Project can be configured to generate one or more Targets. Each Target has its own option settings and output file name that you may define. You may create one Target for testing with the simulator and another Target for a release version of your application that will be programmed into Flash ROM. Within a Target, you may have one of more file Groups which allow you to associate source files together. Groups are useful for grouping files into functional blocks or for identifying engineers in a software team. The Project menu provides access to all dialogs for project management including... New Project... which creates a new project. Targets, Groups, Files... which add components to a project. The Local menu in the Project window allows you to add files to the
55

GSM BASED POWER THEFT SUBSTATION

project. Open Project... which opens an existing project. Building Projects: LVision includes an integrated make facility that compiles, assembles, and links your program. Click the Build Target button on the toolbar to compile and assemble the source files in your project and link them together into an absolute, executable program. The assembler and compiler automatically generate file dependencies and add them to the project. File dependency information is used during the make process to build only those files that have changed or that include other files that have changed. As LVision compiles and assembles your source files, status

information as well as errors and warnings appear in the Output Window. You may double-click on an error or warning to immediately begin editing the file with the problem--even while LVision continues compiling your source files in the background. The line numbers for errors and warnings are synchronized even after you make changes to the source file(s). To get more information about a particular error message, select the message and press F1 for full help text. If you enable global optimizations, LVision re-compiles your source files to achieve the most optimal global use of registers.

56

GSM BASED POWER THEFT SUBSTATION

CHAPTER - 5

57

GSM BASED POWER THEFT SUBSTATION

CHAPTER 5 RESULTS

58

GSM BASED POWER THEFT SUBSTATION

CONCLUSION

We started this project with a basic idea of building a wireless technology. We can operate this project in any home to substation from power theft by using gsm technology. This project does have more advantages for power stations

Finally we succeeded in building a wireless technology

59

GSM BASED POWER THEFT SUBSTATION

BIBLIOGRAPHY
Books Referred: 1. Microprocessor, Architecture, Programming and interfacing with 8085 Microprocessor BY Ramesh Gaonkar 2. The 8051 Microcontroller and Embedded systems BY Mahammad Ali Mazidi, Jason Gillespie Mazidi 3. The 8051 Microcontroller Architecture, Programming and applications BY Kenneth J.Ayala

60

You might also like