Page 1

“GSM Based SCADA Implementation Using Microcontroller”

1. Introduction In this project we have developed an integrated wireless SCADA system for monitoring & Accessing the performance of the remotely situated device parameter such as temperature, voltage current and frequency on real time basis. For this we have used the infrastructure of the existing Mobile network, which is based on GSM technique Supervisory Control and Data Acquisition System (SCADA) is a field of constant development and research. This project Investigates on creating an extremely low cost device which can be adapted to many Different SCADA applications via some very basic programming, and plugging in the relevant Peripherals. The purpose of this project is to acquire the remote electrical parameters like temperature, Voltage, Current and Frequency and send these real time values over GSM network using GSM Modem/phone. This project is also designed to protect the electrical circuitry by operating an Electromagnetic Relay. This Relay gets activated whenever the electrical parameters exceed the predefined values. The Relay can be used to operate a Circuit Breaker to switch off the main electrical supply. This system can be designed to send SMS alerts whenever the Circuit Breaker trips or whenever the voltage or current exceed the predefine limits. This project makes use of an onboard computer which is commonly termed as micro controller. This onboard computer can efficiently communicate with the different sensors being used. The controller is provided with some internal memory to hold the code. This memory is used to dump some set of assembly instructions into the controller. And the functioning of the controller is dependent on these assembly instructions. Our objective is to work on the “Remote site Safety & security Application by using Controller” to achieve to produce an input data file for each of the Data Logger and Send SMS to a monitoring centered. GSM communication performed almost flawlessly data transfer from sensor at remote area was executed without incidents. Since all communication between data logger and user are wireless based, this translates into lowest cost compared to all others system. In this project all the database is stored in a central database in the data logger; user has global access to consolidate data from many system or locations. Wireless based solutions have universally accepted, familiar and user friendly system. Real-time logging would allow warnings to be flagged to the relevant personnel (e.g. an SMS warning message to the supervisors) and allow corrective action to be taken before the quality and value of the catch is degraded. 1.1 The objectives of the project include: 1. Sensing different electrical parameters (voltage, current, temperature, frequency). 2. Display those parameters. 3. Forwarding the electrical parameters over GSM network. 4. Producing buzzer alerts (if necessary).

5. Controlling the electrical appliances. 1.2 The project provides us exposure on: 1. Initialization of ADC module of microcontroller. 2. Embedded C program. 3. PCB designing. 4. Different electrical sensors. 5. Interfacing sensors to controller. 6. LCD interfacing. 7. GSM application. 1.3 The major building blocks of this project are: 1. Microcontroller Mother Board with regulated power supply. 2. LCD display to show the measured electrical parameters. 3. Electromagnetic Relay to control Electrical Appliances. 4. Temperature Sensor. 5. Voltage Sensor. 6. Current Sensor. 7. GSM Modem/phone for remote communication. 8. Block Diagram 1.4 Advantage: 1. Wireless SCADA deals with the creation of an inexpensive, yet adaptable and easy to use. 2. The hardware components making up the device are relatively unsophisticated, 3. The device operation can be chanced because we use microcontroller. 4. The microcontroller is Re- programmable 5. The custom written software makes it re-programmable over the air. 6. It is able to provide a given SCADA application with the ability to send / receive And Control any data signals at any non predetermined time. 1.5 Limitations 1. The main limitation is that where GSM network is not available our system does not work. GLOBAL SYSTEM FOR MOBILE COMMUNICATION 2.1 DEFINITION GSM, which stands for Global System for Mobile communications, reigns (important) as the world’s most widely used cell phone technology. Cell phones use a cell phone service carrier’s GSM network by searching for cell phone towers in the nearby area. Global system for mobile communication (GSM) is a globally accepted standard for digital cellular communication. GSM is the name of a standardization group established in 1982 to create a common European mobile telephone standard that would formulate specifications for a pan-European mobile cellular radio system operating at 900 MHz it is estimated that many countries outside of Europe will join the GSM partnership. 2.2 NEED OF GSM The GSM study group aimed to provide the followings through the GSM:  

Improved spectrum efficiency. International roaming.

Low-cost mobile sets and base stations (BS)

High-quality speech

Compatibility with Integrated Services Digital Network (ISDN) and other telephone company services.

Support for new services.

2.3 GSM ARCHITECTURE A GSM network consists of several functional entities whose functions and interfaces are defined. The GSM network can be divided into following broad parts.  The Mobile Station (MS)  The Base Station Subsystem (BSS)  The Network Switching Subsystem (NSS)  The Operation Support Subsystem (OSS) Following fig shows the simple architecture diagram of GSM Network.

Figure 1:- GSM Network. The added components of the GSM architecture include the functions of the databases and messaging systems:  Home Location Register (HLR)  Visitor Location Register (VLR)  Equipment Identity Register (EIR)  Authentication Center (AUC)  SMS Serving Center (SMS SC)  Gateway MSC (GMSC)

ďƒ˜ Chargeback Center (CBC) ďƒ˜ Tran coder and Adaptation Unit (TRAU)

Following fig shows the diagram of GSM Network along with added elements.

Figure 2:- GSM Network along with added elements. The MS and the BSS communicate across the Um interface, also known as the air interface or radio link. The BSS communicates with the Network Service Switching center across the A interface. 2.4 GSM NETWORK AREAS In a GSM network, the following areas are defined: 2.4.1 Cell: Cell is the basic service area, one BTS covers one cell. Each cell is given a Cell Global Identity (CGI), a number that uniquely identifies the cell. 2.4.2 Location Area: A group of cells form a Location Area. This is the area that is paged when a subscriber gets an incoming call. Each Location Area is assigned a Location Area Identity (LAI). Each Location Area is served by one or more BSCs. 2.4.3 MSC/VLR Service Area: The area covered by one MSC is called the MSC/VLR service area. 2.4.4 PLMN: The area covered by one network operator is called PLMN. A PLMN can contain one or more MSCs. 2.5 THE GSM SPECIFICATIONS Specifications for different Personal Communication Services (PCS) systems vary among the different PCS networks. The GSM specification is listed below with important characteristics. 2.5.1 Modulation Modulation is a form of change process where we change the input information into a suitable format for the transmission medium. We also changed the information by demodulating the signal at the receiving end. The GSM uses Gaussian Minimum Shift Keying (GMSK) modulation method. We also changed the information by demodulating the signal at the receiving end.

2.5.2 Access Methods Because 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. GSM chose a combination of TDMA/FDMA as its method. The FDMA part involves the division by frequency of the total 25 MHz bandwidth into 124 carrier frequencies of 200 kHz bandwidth. One or more carrier frequencies are then assigned to each BS. Each of these carrier frequencies is then divided in time, using a TDMA scheme, into eight time slots. One time slot is used for transmission by the mobile and one for reception. They are separated in time so that the mobile unit does not receive and transmit at the same time. 2.5.3 Transmission Rate The total symbol rate for GSM at 1 bit per symbol in GMSK produces 270.833 K symbols/second. The gross transmission rate of the time slot is 22.8 Kbps.GSM is a digital system with an over-the-air bit rate of 270 kbps. 2.5.4 Frequency Band The uplink frequency range specified for GSM is 933 - 960 MHz (basic 900 MHz band only). The downlink frequency band 890 - 915 MHz (basic 900 MHz band only). 2.5.5 Channel Spacing This indicates separation between adjacent carrier frequencies. In GSM, this is 200 kHz. 2.5.6 Speech Coding GSM uses linear predictive coding (LPC). The purpose of LPC is to reduce the bit rate. The LPC provides parameters for a filter that mimics the vocal tract. The signal passes through this filter, leaving behind a residual signal. Speech is encoded at 13 kbps. 2.5.7 Duplex Distance The duplex distance is 80 MHz Duplex distance is the distance between the uplink and downlink frequencies. A channel has two frequencies, 80 MHz apart. 2.6 GSM USER SERVICES GSM has much more to offer than voice telephony. Additional services allow us greater flexibility in where and when we use our phone. We should contact our local GSM network operator for information on the specific services available to us. But there are three basic types of services offered through GSM which we can ask for: 1. Telephony (also referred to as telecom services) Services 2. Data (also referred to as bearer services) Services. 3. Supplementary Services 2.6.1 Teleservices or Telephony Services

A Telecom-service utilizes the capabilities of a Bearer Service to transport data, defining which capabilities are required and how they should be set up. Voice Calls The most basic Telecom-service supported by GSM is telephony. This includes Full-rate speech at 13 Kbps and emergency calls, where the nearest emergency service provider is notified by dialing three digits. A very basic example of emergency service is 911 services available in USA. Short Text Messages SMS (Short Messaging Service) service is a text messaging which allow us to send and receive text messages on our GSM Mobile phone. Services available from many of the world's GSM networks today - in addition to simple user generated text message services - include news, sport; financial, language and location based services, as well as many early examples of mobile commerce such as stocks and share prices, mobile banking facilities and leisure booking services. Till the time this tutorial is written, most of the service providers are charging their customer's SMS services based on number of text messages sent from their mobile phone. There are other prime SMS services available where service providers are charging more than normal SMS charge. These services are being used in collaboration of Television Networks or Radio Networks to demand SMS from the audiences Most of time charges are paid by the SMS sender but for some services like stocks and share prices, mobile banking facilities and leisure booking services etc. recipient of the SMS has to pay for the service. 2.6.2 Bearer Services or Data Services Using our GSM phone to receive and send data is the essential building block leading to widespread mobile Internet access and mobile data transfer. GSM currently has a data transfer rate of 9.6k. New developments that will push up data transfer rates for GSM users are HSCSD (high speed circuit switched data) and GPRS (general packet radio service) are now available. 2.6.3 Supplementary Services Supplementary services are provided on top of telecom-services or bearer services, and include features such as caller identification, call forwarding, call waiting, multiparty conversations, and barring of outgoing (international) calls, among others. 2.7 GSM SECURITY AND ENCRYPTION The security methods standardized for the GSM System make it the most secure cellular telecommunications standard currently available. Although the confidentiality of a call and anonymity of the GSM subscriber is only guaranteed on the radio channel, this is a major step in achieving endto- end security. The subscriber's anonymity is ensured through the use of temporary identification numbers. The confidentiality of the communication itself on the radio link is performed by the application of encryption algorithms and frequency hopping which could only be realized using digital systems and signaling. Part of the enhanced security of GSM is due to the fact that it is a digital system utilizing a speech coding algorithm, Gaussian Minimum Shift Keying (GMSK) digital modulation, slow frequency hopping, and Time Division Multiple Access (TDMA) time slot architecture. To intercept and

reconstruct this signal would require more highly specialized and expensive equipment than a police scanner to perform the reception, synchronization, and decoding of the signal.


Figure 3:- GSM mobile phone The SIM provides personal mobility so that the user can have access to all subscribed services irrespective of both the location of the terminal and the use of a specific terminal. We need to insert the SIM card into another GSM cellular phone to receive calls at that phone, make calls from that phone, or receive other subscribed services. Today, GSM Arena is the biggest source of information about latest GSM Mobile Phones. This page is being displayed here as a courtesy of GSM Arena. So if we are planning to buy a GSM Mobile phone then they would strongly suggest us to go through all the review comments and then decide which phone is suitable for us. GSM distinguishes explicitly between user and equipment and deals with them separately. Besides phone numbers and subscriber and equipment identifiers, several other identifiers have been defined; they are needed for the management of subscriber mobility and for addressing of all the remaining network elements. Newer versions of the standard were backwardcompatible with the original GSM system 2.9 ADVANTAGES OF GSM  GSM is already used worldwide with over 450 million subscribers.  International roaming permits subscribers to use one phone throughout Western Europe. CDMA will work in Asia, but not France, Germany, the U.K. and other popular European destinations.  GSM is mature, having started in the mid-80s. This maturity means a more stable network with robust features. CDMA is still building its network.  GSM's maturity means engineers cut their teeth on the technology, creating an unconscious preference.

 The availability of Subscriber Identity Modules, which are smart cards that provide secure data encryption give GSM m-commerce advantages.  Talk time is generally higher in GSM phones due to the pulse nature of transmission.  GSM covers virtually all parts of the world so international roaming is not a problem  The much bigger number of subscribers globally creates a better network effect for GSM handset makers, carriers and end users. 2.10 DISADVANTAGES OF GSM  So far gsm hasn't got a spread spectrum technology, the data packets are not coded appropriately thus loss of data.  Intellectual property is concentrated among a few industry participants, creating barriers to entry for new entrants and limiting competition among phone manufacturers.  GSM has a fixed maximum cell site range of 35 km, which is imposed by technical limitations.  Pulse nature of TDMA transmission used in 2G interferes with some electronics, especially certain audio amplifiers. 3G uses W-CDMA now Supervisory Control and Data Acquisition System (SCADA) 3: Supervisory Control and Data Acquisition System (SCADA) 3.1 What is SCADA and what can it do for you? SCADA is not a specific technology, but a type of application. SCADA stands for Supervisory Control and Data Acquisition system — any application that gets data about a system in order to control that system is a SCADA application. A SCADA application has two elements: 1. The process/system/machinery you want to monitor a control — this can be a power plant, a water system, a network, a system of traffic lights, or anything else. 2. A network of intelligent devices that interfaces with the first system through sensors and control outputs. This network, which is the SCADA system, gives you the ability to measure and control specific elements of the first system. We can build a SCADA system using several different kinds of technologies and protocols. 3.2 Where is SCADA Used? You can use SCADA to manage any kind of equipment. Typically, SCADA systems are used to automate complex industrial processes where human control is impractical — systems where there are more control factors, and more fast-moving control factors, than human beings can comfortably manage. Around the world, SCADA systems control: 3.2.1 Electric power generation, transmission and distribution:

Electric utilities use SCADA sys-SCADA is used around the world to control all kinds of industrial processes — SCADA can help you increase efficiency, Lower costs and increase the profitability of your operations. These terms helps to detect current flow and line voltage, to monitor the operation of circuit breakers, and to take sections of the power grid online or offline. 3.2.2 Water and sewage: State and municipal water utilities use SCADA to monitor and regulate water flow, reservoir levels, pipe pressure and other factors. 3.2.3 Buildings, facilities and environments: Facility managers use SCADA to control HVAC, refrigeration units, lighting and entry systems.

3.2.4 Manufacturing: SCADA systems manage parts inventories for just-in-time manufacturing, regulate industrial automation and robots, and monitor process and quality control. 3.2.5 Traffic signals: SCADA regulates traffic lights, controls traffic flow and detects out-of-order signals. As I’m sure you can imagine, this very short list barely hints at all the potential applications for SCADA systems. SCADA is used in nearly every industry and public infrastructure project — anywhere where automation increases efficiency. What’s more, these examples don’t show how deep and complex SCADA data can be. In every industry, managers need to control multiple factors and the interactions between those factors. SCADA systems provide the sensing capabilities and the computational power to track everything that’s relevant to your operations. 3.3 Real-Time Monitoring and Control Increases Efficiency and Maximizes Profitability Ask yourself enough questions like that, and I’m sure you can see where you can apply a SCADA system in your operations. But I’m equally sure you’re asking “So what?” What you really want to know is what kind of real-world results you can expect from using SCADA. Here are few of the things you can do with the information and control capabilities you get from a SCADA system: • Access quantitative measurements of important processes, both immediately and over time • Detect and correct problems as soon as they begin • Measure trends over time • Discover and eliminate bottlenecks and inefficiencies • Control larger and more complex processes with a smaller, less specialized staff. A SCADA system gives you the power to fine-tune your knowledge of your systems. You can place sensors and controls at every critical point in your managed process (and as SCADA technology improves, you can put sensors in more and more places). As you monitor more things, you have a more detailed view of your operations — and most important, it’s all in real time. So even for very complex manufacturing processes, large electrical plants, etc., you can have an eagle-eye view of every event while it’s happening — and that means you have a knowledge base from which to correct errors and improve efficiency. With SCADA, you can do more, at less cost, providing a direct increase in profitability. 3.4 How SCADA Systems Work

A SCADA system performs four functions: 1. Data acquisition 2. Networked data communication 3. Data presentation 4. Control These functions are performed by four kinds of SCADA components: 1. Sensors (either digital or analog) and control relays that directly interface with the managed system. 2. Remote telemetry units (RTUs). These are small computerized units deployed in the field at specific sites and locations. RTUs serve as local collection points for gathering reports from sensors and delivering commands to control relays. 3. SCADA master units. These are larger computer consoles that serve as the central processor for the SCADA system. Master units provide a human interface to the system and automatically regulate the managed system in response to sensor inputs. 4. The communications network that connects the SCADA master unit to the RTUs in the field. 3.5 The World’s Simplest SCADA System The simplest possible SCADA system would be a single circuit that notifies you of one event. Imagine a fabrication machine that produces widgets. Every time the machine finishes a widget, it activates a switch. The switch turns on a light on a panel, which tells a human operator that a widget has been completed. Obviously, a real SCADA system does more than this simple model. But the principle is the same. A full-scale SCADA system just monitors more stuff over greater distances. 4: MICROCONTROLLER 4.1: Microcontroller ATmega32 microcontroller is a low-power CMOS 8-bit microcontroller based on the AVR Enhanced RISC architecture, by executing powerful instructions in a single clock cycle, the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to Optimize power consumption versus processing speed. It also serves as an 8-bit bi-directional I/O port, The ATmega32 microcontroller is supported with a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits. 4.1.1 Overview The Atmel® AVR® ATmega32 is a low-power CMOS 8-bit microcontroller based on the AVR Enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system designed to optimize power consumption versus processing speed.

Figure 4:- Atmega32 microcontroller 4.2 About Atmega32 The Atmel® AVR® core combines a rich instruction set with 32 general purpose working registers. All the 32 registers are directly connected to the Arithmetic Logic Unit (ALU), allowing two independent registers to be accessed in one single instruction executed in one clock cycle. The resulting architecture is more code efficient while achieving throughputs up to ten times faster than conventional CISC microcontrollers. The ATmega32 provides the following features: 32Kbytes of InSystem Programmable Flash Program memory with Read-While-Write capabilities, 1024bytes EEPROM, 2Kbyte SRAM, 32 general purpose I/O lines, 32 general purpose working registers, a JTAG interface for Boundary scan, On-chip Debugging support and programming, three flexible Timer/Counters with compare modes, Internal and External Interrupts, a serial programmable USART, a byte oriented Two-wire Serial Interface, an 8-channel, 10-bit ADC with optional differential input stage with programmable gain (TQFP package only), a programmable Watchdog Timer with Internal Oscillator, an SPI serial port, and six software selectable power saving modes. The Idle mode stops the CPU while allowing the USART, Two-wire interface, A/D Converter, SRAM, Timer/Counters, SPI port, and interrupt system to continue functioning. The Power-down mode saves the register contents but freezes the Oscillator, disabling all other chip functions until the next External Interrupt or Hardware Reset. In Power-save mode, the Asynchronous Timer continues to run, allowing the user to maintain a timer base while the rest of the device is sleeping. The ADC Noise Reduction mode stops the CPU and all I/O modules except Asynchronous Timer and ADC, to minimize switching noise during ADC conversions. In Standby mode, the crystal/resonator Oscillator is running while the rest of the device is sleeping. This allows very fast start-up combined with lowpower consumption. In Extended Standby mode, both the main Oscillator and the Asynchronous Timer continue to run. The device is manufactured using Atmel’s high density nonvolatile memory technology. The On chip ISP Flash allows the program memory to be reprogrammed in-system through an SPI serial interface, by a conventional nonvolatile memory programmer, or by an On-chip Boot program running on the AVR core. The boot program can use any interface to download the application program in the Application Flash memory. Software in the Boot Flash section will continue to run while the Application Flash section is updated, providing true Read-While-Write operation. By combining an 8-bit RISC CPU with In-System Self-Programmable Flash on a monolithic chip, the Atmel ATmega32 is a powerful microcontroller that provides a highly-flexible and cost-effective solution to many embedded control applications. 4.2.1 Features • High-performance, Low-power Atmel® AVR® 8-bit Microcontroller • Advanced RISC Architecture – 131 Powerful Instructions – Most Single-clock Cycle Execution – 32 x 8 General Purpose Working Registers – Fully Static Operation – Up to 16 MIPS Throughput at 16 MHz

– On-chip 2-cycle Multiplier • High Endurance Non-volatile Memory segments – 32Kbytes of In-System Self-programmable Flash program memory – 1024Bytes EEPROM – 2Kbyte Internal SRAM – Write/Erase Cycles: 10,000 Flash/100,000 EEPROM – Data retention: 20 years at 85°C/100 years at 25°C(1) – Optional Boot Code Section with Independent Lock Bits In-System Programming by On-chip Boot Program True Read-While-Write Operation – Programming Lock for Software Security • JTAG (IEEE std. 1149.1 Compliant) Interface – Boundary-scan Capabilities According to the JTAG Standard – Extensive On-chip Debug Support – Programming of Flash, EEPROM, Fuses, and Lock Bits through the JTAG Interface • Peripheral Features – Two 8-bit Timer/Counters with Separate Presales and Compare Modes – One 16-bit Timer/Counter with Separate Presale, Compare Mode, and Capture Mode – Real Time Counter with Separate Oscillator – Four PWM Channels – 8-channel, 10-bit ADC 8 Single-ended Channels 7 Differential Channels in TQFP Package Only 2 Differential Channels with Programmable Gain at 1x, 10x, or 200x – Byte-oriented Two-wire Serial Interface – Programmable Serial USART – Master/Slave SPI Serial Interface – Programmable Watchdog Timer with Separate On-chip Oscillator – On-chip Analog Comparator • Special Microcontroller Features – Power-on Reset and Programmable Brown-out Detection – Internal Calibrated RC Oscillator – External and Internal Interrupt Sources – Six Sleep Modes: Idle, ADC Noise Reduction, Power-save, Power-down, Standby and Extended Standby • I/O and Packages – 32 Programmable I/O Lines – 40-pin PDIP, 44-lead TQFP, and 44-pad QFN/MLF • Operating Voltages – 2.7V - 5.5V for ATmega32L – 4.5V - 5.5V for ATmega32 • Speed Grades – 0 - 8MHz for ATmega32L – 0 - 16MHz for ATmega32 • Power Consumption at 1 MHz, 3V, 25⋅C – Active: 1.1mA – Idle Mode: 0.35mA 4.2.2 Pin Configurations

Figure 5:- Pin configuration

4.2.3 Block Diagram

Figure 6:- Block diagram 4.2.4 Pin description VCC - Digital Supply Voltage.

GND - Ground. Port A (PA7..PA0) - Port A serves as the analog inputs to the A/D Converter. Port A also serves as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal pull-up resistors (selected for each bit). The Port A output buffers have symmetrical Drive characteristics with both high sink and source capability. When pins PA0 to PA7 are used as inputs and are externally pulled low, they will source current if the internal pull-up resistors are activated. The Port pins are tristated when a reset condition becomes active, even if the clock is not running. Port B (PB7..PB0) - Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port B output buffers have symmetrical drive characteristics with both high sink and source Capability. As inputs, Port B pins that are externally pulled low will source current if the pullup resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even if the clock is not running. Port C (PC7..PC0) - Port C is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port C output buffers have symmetrical drive characteristics with both high sink and source Capability. As inputs, Port C pins that are externally pulled low will source current if the pullup resistors are activated. The Port C pins are tri-stated when a reset condition becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs. The TD0 pin is tri-stated unless TAP states that shift out data are entered. Port D (PD7..PD0) - Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The Port D output buffers have symmetrical drive characteristics with both high sink and source Capability. As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the clock is not running. RESET - Reset Input. A low level on this pin for longer than the minimum pulse length will generate a Reset, even if the clock is not running. Shorter pulses are not guaranteed to generate a reset. XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating circuit. XTAL2 Output from the inverting Oscillator amplifier. AVCC - AVCC is the supply voltage pin for Port A and the A/D Converter. It should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it should be connected to VCC through a low-pass filter. AREF- AREF is the analog reference pin for the A/D Converter. 4.3 Data Retention Reliability Qualification results show that the projected data retention failure rate is much less than 1 PPM over 20 years at 85째C or 100 years at 25째C. 4.3.1 - About Code Examples This documentation contains simple code examples that briefly show how to use various parts of the device. These code examples assume that the part specific header file is included before compilation. Be aware that not all C Compiler vendors include bit definitions in the header files and interrupt handling in C is compiler dependent.

4.3.2 - Register Summary

Table- 1: Register Summary Notes: 1. When the OCDEN Fuse is unprogrammed; the OSCCAL Register is always accessed on this address. Refer to the debugger specific documentation for details on how to use the OCDR Register. 2. Refer to the USART description for details on how to access UBRRH and UCSRC. 3. For compatibility with future devices, reserved bits should be written to zero if accessed. Reserved I/O memory addresses should never be written.\

4.3.3 Instruction set summary

Table-2 Instruction set summary 4.3.4 Errata ATmega32, rev. A to F • First Analog Comparator conversion may be delayed • Interrupts may be lost when writing the timer registers in the asynchronous timer • IDCODE masks data from TDI input • Reading EEPROM by using ST or STS to set EERE bit triggers unexpected interrupt request. First Analog Comparator conversion may be delayed If the device is powered by a slow rising VCC, the first Analog Comparator conversion will take longer than expected on some devices. Problem Fix/Workaround When the device has been powered or reset, disable then enable the Analog Comparator before the first conversion. Interrupts may be lost when writing the timer registers in the asynchronous timer The interrupt will be lost if a timer register that is synchronous timer clock is written when the asynchronous Timer/Counter register (TCNTx) is 0x00. Problem Fix/Workaround Always check that the asynchronous Timer/Counter register neither have the value 0xFF nor 0x00 before writing to the asynchronous Timer Control Register (TCCRx), asynchronous- Timer Counter Register (TCNTx), or asynchronous Output Compare Register (OCRx). IDCODE masks data from TDI input The JTAG instruction IDCODE is not working correctly. Data to succeeding devices are replaced by all-ones during Update-DR. Problem Fix / Workaround – If ATmega32 is the only device in the scan chain, the problem is not visible. – Select the Device ID Register of the ATmega32 by issuing the IDCODE instruction or by entering the Test-Logic-Reset state of the TAP controller to read out the contents of its Device ID Register and possibly data from succeeding devices of the scan chain. Issue the BYPASS instruction to the ATmega32 while reading the Device ID Registers of preceding devices of the boundary scan chain. – If the Device IDs of all devices in the boundary scan chain must be captured simultaneously, the ATmega32 must be the fist device in the chain. GSM SCADA IMPLEMENTATION WITH MICROCONTROLLER 5: GSM based Scada Implementation with Microcontroller 5.1 About The purpose of this project is to observe electrical parameters like temperature, Voltage, Current and Frequency and send these real time values over GSM network using GSM Modem/phone. This system is designed to send SMS alerts to system engineer whenever the parameter exceed the predefine limits to secure the BTS or Power Greed from any kind of danger or serious damage. In this project we have developed an integrated wireless SCADA system for monitoring & Accessing the performance of the remotely situated device parameter, temperature, voltage current and frequency on real time basis, we use voltage parameter for monitoring here. 5.1.1 Equipment/ICs used in this project

1. Connector-1

6. Max 232 serial IC-1

11. GSM Module

2. 7805 regulator IC

7. Connector-2

12. Antenna

3. Variable resistor

8. LM-317 regulator IC

4. Microcontroller

9. Nine pin serial connector

5. LCD display

10. Max 232 serial IC-2

5.2 Introduction to all of this IC and Equipments 5.2.1 Connector-1 This is a Wire connectors, also called wire nuts, connect, secure and protect wires, is use to connect power cable and take voltage input from 9 to 12 volt. 5.2.2 - 7805 regulator IC 7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage regulator ICs. The voltage regulator IC maintains the output voltage at a constant value. The xx in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated power supply. Capacitors of suitable values can be connected at input and output pins depending upon the respective voltage levels. Figure 7:-7805 regulator IC 5.2.3 Variable resistor A variable resistor is a potentiometer with only two connecting wires instead of three. However, although the actual component is the same, it does a very different job.

Figure 8:- Variable resistor The pot allows us to control the potential passed through a circuit. The variable resistance lets us adjust the resistance between two points in a circuit. 5.2.4 Microcontroller ATmega32 microcontroller is a low-power CMOS 8-bit microcontroller based on the AVR Enhanced RISC architecture, by executing powerful instructions in a single clock cycle, the ATmega32 achieves throughputs approaching 1 MIPS per MHz allowing the system designer to Optimize power consumption versus processing speed. It also serves as an 8-bit bi-directional I/O port,

Figure 9:- Microcontroller The ATmega32 microcontroller is supported with a full suite of program and system development tools including: C compilers, macro assemblers, program debugger/simulators, in-circuit emulators, and evaluation kits. 5.2.5 LCD display A Liquid Crystal Display is an electronic device that cans be used to show numbers or text. There are two main types of LCD display, numeric displays (used in watches, calculators etc) and alphanumeric text displays

Figure 10:- LCD display 5.2.6 Max 232 serial IC The MAX232 IC is used to convert the TTL/CMOS logic levels to RS232 logic levels during serial communication of microcontrollers with other device. The controller operates at TTL logic level (05V) whereas the serial communication in system on RS232 standards (-25 V to + 25V). This makes it difficult to establish a direct link between them to communicate with each other.

Figure 11:- Max 232 serial IC The intermediate link is provided through MAX232. It is a dual driver/receiver that includes a capacitive voltage generator to supply RS232 voltage levels from a single 5V supply. Each receiver converts RS232 inputs to 5V TTL/CMOS levels. 5.2.7 LM-317 regulator IC The LM117 series of adjustable 3-terminal positive voltage regulators is capable of supplying in excess of 1.5A over a 1.2V to 3.7V output range. They are exceptionally easy to use and require only two external resistors to set the output voltage. Further, both line and load regulations are better than

standard fixed regulators. Also, the LM117 is packaged in standard transistor packages which are easily mounted and handled

. Figure 12:- LM-317 regulator IC 5.2.8 Nine pin serial connector A 9 pin serial port is a serial communication physical interface through which information transfers in or out one bit at a time (in contrast to a parallel port). Throughout most of the history of personal computers, data transfer through 9 pin serial ports connected terminals and various peripherals.

Figure 13:- Nine pin serial connector While such interfaces as Ethernet, FireWire, and USB all send data as a serial stream, the term "9 pin serial ports" usually identifies hardware more or less compliant to the RS-232 standard, intended to interface with a modem or with a similar communication device. 5.2.9 GSM Module A GSM module is a specialized type of modem which accepts a SIM card, and operates over a subscription to a mobile operator, just like a mobile phone. From the mobile operator perspective, a GSM module/modem looks just like a mobile phone.

Figure 14:- GSM Module

When a GSM modem is connected to a microcontroller, this allows the microcontroller to use the GSM modem to communicate over the existing mobile network. 5.2.10 Antenna An antenna (or aerial) is an electrical device which converts electric currents into radio waves, and vice versa. It is usually used with a radio transmitter or radio receiver. In transmission, a radio transmitter applies an oscillating radio frequency electric current to the antenna's terminals, and the antenna radiates the energy from the current as electromagnetic waves (radio waves). In reception, an antenna intercepts some of the power of an electromagnetic wave in order to produce a tiny voltage at its terminals that is applied to a receiver to be amplified. An antenna can be used for both transmitting

and receiving. Figure 15:- GSM Antenna 5.3 Circuit connections In board-1 a microcontroller connect with max-232 ic and a LCD display. This entire device gets power from regulator IC 7805. The max-232 ic-1 is connected with 9 pin serial connector in bord-2. In board-2 the 9 pin serial connector is connected withMax-232 serial Ic-2 and which is connected with GSM module. Here the GSM module and max 232-Ic get powered from lm-317 regulator IC.

Figure 16:- Circuit Diagram-Board-1

Figure 17:- Circuit Diagram-Board-2 5.4 Explanation of equipment/Ic’s role in our system and how it works Block diagram

Conn ector1 MAX 232 Serial IC

Serial connector

MAX 232 Serial IC

7805 regulator IC Microcontroller

Lm 317 regulator

GSM module

Variable resistor

LCD Display

Figure 18:- Block diagram

Conne ctor-2

5.4.1 Explain of Block Diagram This block diagram makes it easy to understand our system. We take a 9 v input by a adapter which plucked into the connector 1, then from connector 1 the input voltage goes to 7805 regulator IC which convert the voltage to 5 v. which is needed to operate the microcontroller and max 232 series IC. The connection to the microcontroller goes through a variable resistor which is put into the circuit to vary the voltage. The microcontroller is programmed to send a signal to GSM module bia IC max 232-1 if the voltage is exceed the level set at 4v. The max 232 ic-1 convert the signal to series data and send to the max232 ic-2 bia the 9 pin serial connector. The Ic max 232-2 cover the series data to signal forward to GSM module to send the sms to the system engineer. The sim insert into the GSM module and with the antenna which allow the system access into existing GSM system. The GSM module sends the sms to the System engineer by using the GSM network. The system engineer number and the message of error type are programmed in microcontroller. Here connector-2 gives the power input for GSM module and max 232 IC-2, bia the lm -317 regulator ic which covert the input power to 3 v which is needed for GSM module and max 232 ic-2. 5.5 HOW IT WORKS First of all the device is get powered by the use of adapter give voltage supply to connector-1, which help to hold the connection and get 9/12v input. Connector-1 and connector-2 are shorted, that the both board powered at a time. Now the voltage input goes to the 7805 regulator IC, which give a fixed voltage of 5v is good enough for the microcontroller and max-232 Ic operates in circuit-1 In circuit-2 the max-232 IC and GSM module is get power from Lm-317 Ic which give a voltage output of 3.7 v needed for the Max-232 ic and GSM module operates. 5.5.1 Role of Microcontroller in our system. The microcontroller plays the key role in our device. It is programmed to send a signal to GSM module to send a SMS to a definite mobile number through MICROCONTROLLER >Max-232 Ic>9 pin serial >connector >Max 232 Ic-2> GSM Module> GSM network> Mobile receiver The SMS which will send is written in program. In our system the SMS is “ERROR: High Voltage. Please check the machine.� The Microcontroller is set to send this SMS if the voltage level exits the threshold level we set for it and here the level is 4 volt. We use a variable resistor to change the voltage artificially This SMS and the predefine level can be Edited by reprogramming the Microcontroller. 5.5.2 Max -232 Ic’s role in our System Max -232 IC in board or circuit 1, convert signal to serial data this conversion is needed for serial transmission

Figure 19:- Max -232 IC’s Max-232 Ic in circuit-2 covert the serial data to signal for forwarding to GSM module. 5.5.3 Nine pin serial connector role Nine pin serial connector do its job as the connector between the two circuit or board by connecting two max-232 Ic’s .

Figure 20:- nine pin serial connector 5.5.4 GSM module role in our system GSM Module helps to grave an existing network and send sms to the mobile by the using of existing network. We insert a SIM to the module to get an existing network by the use of GSM network is gives us a wide range communication.

Figure 21:- GSM 5.6 Future scope This device can apply in BTS, Power Greed, Gas station, Oil Tanks, Big Industry and many other valuable electrical and sensitive apparatus to protect before any serious trouble occur. Although we worked with only Voltage, this devise can be developed with different sensor and equipment to measure and response against many parameters like as we mentioned temperature, current, frequency and also against smoke, fire, pressure, density, mass etc, to do so we just need to

add the necessary sensor or measurement device and the corresponding converter For giving the input signal to the microcontroller. The program must be according to order we need, then it is all same to our developed system. PROGRAMMING 6.1 ABOUT       

Chip type : ATmega32 Program type: Application Clock frequency : 8.000000 MHz Memory model : Small External SRAM size: 0 Data Stack size: 512 Language- programming c

References 1. The 8051 Microcontroller and Embedded Systems - M.A Mazidi & J.G Mazidi 2. The Microcontroller Idea Book - John Axelson 3. The Microcontroller Application Cookbook -Matt Gilliland 4. Digital design by Morris Mano 5. Linear integrated circuits by Roy choudary 6. Scada: Supervisory Control and Data Acquisition -By Stuart A. Boyer 7. Sungmo Jung, Jae-gu Song, Seoksoo Kim, “Design on SCADA Test-bed and Security Device,” International Journal of Multimedia and Ubiquitous Engineering, Vol. 3, No. 4, October, 2008 8. Sandip C.Patel, Pritimoy Sanyal ” Securing SCADA System” Information Management & Computer Security Journal Volume: 16 Issue: 4 Page: 398 – 414 Year: 2008 9. Gumbo, S, Muyingi, H, “Development of a web based interface for remote monitoring of a Long-distance power transmission overhead line”, SATNAC 2007, Sugar Beach Resort, Mauritius,ISBN 978 0 620 39351 5 10. http://www.embedtronics.com. online details of frame format of NOKIA 11. Surve, V, 2006, “A wireless Communication Device for Short Messages”, Masters Thesis,Available: www.certec.lth.se/doc/awireless.pdf. 12. Das, AN, Lewis, FL, Popa, DO, 2006, “Data-logging and Supervisory Control in Wireless Sensor Networks,” Proceeding of the Seventh ACIS International Conference on Software Engineering, Artificial Intelligence, networking, and Parallel/Distributed Computing (SNPD’06), Volume 00, ISBN:0-7695-2611-X, pp 330- 338 13. Hildick-Smith, Andrew, “Security for Critical Infrastructure SCADA Systems,” (SANS Reading Room, GSEC Practical Assignment, Version 1.4c, Option 1, February 2005), http://www.sans.org/reading_room/whitepapers/warfare/1644.php

14. Carlson, Rolf E. and Jeffrey E. Dagle, Shabbir A. Shamsuddin, Robert P. Evans, “A Summary ofControl System Security Standards Activities in the Energy Sector,” Department of Energy Office of Electricity Delivery and Energy Reliability,66 National SCADA Test Bed, October 2005, http://www.sandia.gov/scada/documents/CISSWG_Report_1_Final.pdf 15. Technical Information Bulletin 04-1, Supervisory Control and Data Acquisition (SCADA) Systems, NCS TIB 04-1, Oct. 2004 16. I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci, "A Survey on Sensor Networks," IEEE International Journal of Engineering (IJE), Volume (3) : Issue (1) Dr. Aditya Goel & Ravi Shankar Mishra International Journal of Engineering (IJE), Volume (3) : Issue (1) 65 Communications Magazine, Vol. 40, No. 8, pp. 102-114, August 2002; receives the IEEE Communications Society 2003 Best Tutorial Paper Award, April 2003. 17. Bement, Arden “Keynote Address at the NSF Workshop on Critical Infrastructure Protection for SCADA & IT,” October 20, 2003, http://www.nist.gov/speeches/bement_102003.htm. 18. McClanahan, R.H.,” The Benefits of Networked SCADA Systems Utilizing IP Enabled Networks", Proc. Of IEEE Rural Electric Power Conference 5-7 May 2002 Pages: C5 - C5_7 19. Dagle, J.E.; Widergren, S.E.; Johnson, J.M.” Enhancing the security of supervisory control and data acquisition (SCADA) systems: the lifeblood of modern energy infrastructures” Power Engineering Society Winter Meeting, 2002. IEEE Volume 1, Issue , 2002 Page(s): 635 vol.1 20. J.E. Dagle (SM), S.E. Widergren (SM), and J.M. Johnson (M)” Enhancing the Security of Supervisory Control and Data Acquisition (SCADA) Systems: The Lifeblood of Modern Energy Infrastructures” Power Engineering Society Winter Meeting, 2002. IEEE Volume 1, Issue, 2002 Page(s): 635 vol.1 21. Stephen Beasley, Mr Choon Ng Dr Dario Toncich and Dr Andrew Dennison “Remote Diagnostics for DataAcquisition Systems” white paper by Industrial Research Institute Swinburne Available online at www.swinburne.edu.au/feis/iris/pdf/profiles/StephenBeasley.pdf 22. Taylor, K; “Mobile Monitoring and Control Infrastructure”, CSIRO Available online at http://mobile.act.cmis.csiro.au 23. www.gsm-based-scada-implementation-using-micro-controller-abstract.html

Profile for Md Papon

Gsm based scada implementation using microcontroller  

In this project we have developed an integrated wireless SCADA system for monitoring & Accessing the performance of the remotely situated de...

Gsm based scada implementation using microcontroller  

In this project we have developed an integrated wireless SCADA system for monitoring & Accessing the performance of the remotely situated de...

Profile for md.papon