International Journal of Electronics and Computer Science Engineering 2328 Available Online at www.ijecse.org ISSN- 2277-1956 Implementation Ofwed Basedremote Grid Monitoring Rishikesh Kumar 1, Sanjeev Kumar Sharma 2, Ravindra Kumar 3 1 Department Of Electronics, Al-Falah School Of Engineering & Technology (AFSET) Affiliated To M.D.University, Rohtak, Haryana Email: Kumar.Rishikesh5@Gmail.Com 2 Department Of ECE, UCER, Greater Noida 3 Department Of Electronics, Al-Falah School Of Engineering & Technology (AFSET) Abstract- Wireless Grid control is a monitoring & controlling system is used to collect and transfer the data from power generating stations to remote control unit. In this work, a method using Ethernet & AVR-ATMEGA Microcontroller based control unit. This is based on remote data transfer through Ethernet on internet. The system is compatible to access, monitoring of equipment parameters through the network and web browser in real time. Key Word: Embedded web server, Remote monitoring, Embedded C, AVR Development Board. 1. INTRODUCTION: Nowadays, Microcontrollers are potent integrated circuit is used as parts of most home and office appliances. Embedded web servers, inside the microcontroller, will perform to controlling them over the Internet and also provides effective user interfaces in the form of web pages. This is the article An AVR (Atmel, mega series) microcontroller based Ethernet device. The hardware consists of ENC28J60 + atmega32. That is instead of using a command line application and send UDP packets to the Ethernet device we can just point our web browser to it and evenbetter. The code is written in C and there is even a lot of space left on the atmega32 microcontroller. A web server is a HTTP protocol stack that is finite to keeping HTTP requests. In other word, an application server is a software framework dedicated to the efficient execution of programs, routines, or scripts for subsidiary the construction of various applications. An application server also contains a web server. Thus, one may consider a web server a subset of an application server. While a web server mainly deals with sending HTML for display in a web browser, an application server provides access to server side logic (server applications) for use by client application programs. 2. Architecture of the Designed system: Hardware consists of an AVR ATMEGA-32 powerful microcontroller and ENC28J60 Ethernet device, which can easily, plugged into any Ethernet interface and communicate over internet with attached controlling devices. Figure 1 illustrate where we can used the web server.
Implementation Ofwed Basedremote Grid Monitoring 2329 VOLTAGE INTERNET CURRENT HUB HUB PHASE FREQUENC Sensor 4 Y POWER EMBEDDED WEB SERVER SERVER Figure 1: Controlling & Monitoring of Grid Parameterfrom Remote PC As shown in figure Embedded web server receives various data from the different sensor and after executing, sending over internet. Now various parameters can be monitored and controlled from the remote computer connected over internet. The web page is the control center for the embedded web server. Web server is configured with its unique IP address. 3. Hardware architecture: Our goal was to design AVR microcontroller based web server having all the basic requirements of a Network server. For this we designed a general purpose microcontroller board having provision to base any DIP-40 based MCU like Mega16, Mega32 or Mega 644 so that we can have a provision to load minimal embedded TCP/IP stack having 12kb size. It consists of a powerful AVR-ATMEGA-32 microcontroller and ENC28J60 Ethernet interface device.
IJECSE,Volume1,Number 4 Rishikesh Kumar et al. 2330 RESET ISP CONNECTOR Microcontroller ETHERNET INTERFACE ENC28J60 Interface unit CRYSTAL 12 MHz LCD CONNECTOR POWER SUPPLY Figure 2: Hardware Architecture DC Regulated Power Supply DC Jack RELA MAG Jack RJ45 Ethernet ENC28J60 Chip LCD Status LED Microcontroller ISP Connect Figure 3: Hardware Features of this board are:- AVR architecture based Atmega16 from Atmel. On board regulated Power supply On Board provision for Character Lcd s based on HD44780 Decoder Extra drills to suffix any minor attachments like LED s or switches Having option to provide DC supply using 2.5 mm DC jack or wires. 4. Enc28j60 based Ethernet Module
Implementation Ofwed Basedremote Grid Monitoring 2331 Ethernet is a local area technology, which is used for reliable and efficient transfer and access of information across the devices connected to the network. Once a device is attached to the network, it will have the ability to communicate with any other attached device. This allows the network to expand to accommodate new devices without requiring any modification to those devices already on the network. Ethernet controller ENC28J60 from Microchip forms the building block for our Ethernet Interface add-on Board. It s an SPI based add-on chip which has Ethernet PHY and MAC to equip any embedded controller with SPI interface with network capability. Through this interface our controller can communicate with otherdevices connected on the network including PCs. Any development board using a controller with SPI (Serial Peripheral Interface) interface can be interconnected with Ethernet Interface Board. All the software is based upon open source codes available for AVR microcontrollers. Libraries for Enc28j60 Ethernet module have been provided by MicrochipA minimal TCP/IP stack which was originated from uip stack written by Adam Dunkell s and later on it was ported for AVR by Pascal Stang from Procyon engineering under AVRlib project. 5. AVR Studio: Supports the complete range of ATMEL AVR tools and each release will always contain the latest updates for both the tools and support of new AVR devices. AVR Studio 4 has a modular architecture which allows even more interaction with 3rd party software vendors. GUI plug-ins and other modules can be written and hooked to the system. The AVR Simulator is a software simulator for the AVR architecture and devices. It simulates the CPU, including all instructions, interrupts and most of the on-chip I/O modules. The AVR Simulator operates within the AVR Studio application as a debug target. This enables the user to use the normal debug commands such as Run, Break, Reset, Single step, set breakpoints and watch variables. The I/O, memory and register views are fully functional using the AVR Simulator. Figure 4: AVR Studio 4 Capture 6. Application Program Interface (API) The Application Program Interface (API) defines the way the application program interacts with the TCP/IP stack. The most commonly used API for TCP/IP is the BSD socket API which is used in most Unix systems and has heavily influenced the Microsoft Windows WinSock API. Because the socket API uses stop-and-wait semantics, it requires support from an underlying multitasking operating system. Since the overhead of task management, context switching and allocation of stack space for the tasks might be too high in the intended uip target architectures, the BSD socket interface is not suitable for our purposes.uip provides two APIs to programmers: protosockets, a BSD socket-like API without the overhead of full multi-threading, and a "raw" event-based API that is nore low-level than protosockets but uses less memory. The uip raw API:The "raw" uip API uses an event driven interface where the application is invoked in response to certain events. An application running on top of uip is implemented as a C function that is called by uip in response to certain events. uip calls the application when data is received, when data has been successfully delivered to the other end of the connection, when a new connection has been set up, or when data has to be retransmitted. The
IJECSE,Volume1,Number 4 Rishikesh Kumar et al. 2332 application is also periodically polled for new data. The application program provides only one call-back function; it is up to the application to deal with mapping different network services to different ports and connections. Because the application is able to act on incoming data and connection requests as soon as the TCP/IP stack receives the packet, low response times can be achieved even in low-end systems. Sending Data When sending data, uip adjusts the length of the data sent by the application according to the available buffer space and the current TCP window advertised by the receiver. The amount of buffer space is dictated by the memory configuration. It is therefore possible that all data sent from the application does not arrive at the receiver, and the application may use the uip_mss() function to see how much data that actually will be sent by the stack. The application sends data by using the uip function uip_send(). The uip_send() function takes two arguments; a pointer to the data to be sent and the length of the data. If the application needs RAM space for producing the actual data that should be sent, the packet buffer (pointed to by the uip_appdata pointer) can be used for this purpose. Retransmitting Data Retransmissions are driven by the periodic TCP timer. Every time the periodic timer is invoked, the retransmission timer for each connection is decremented. If the timer reaches zero, a retransmission should be made. As uip does not keep track of packet contents after they have been sent by the device driver, uip requires that the application takes an active part in performing the retransmission. When uip decides that a segment should be retransmitted, the application function is called with the uip_rexmit() flag set, indicating that a retransmission is required. The application must check the uip_rexmit() flag and produce the same data that was previously sent. From the application's standpoint, performing a retransmission is not different from how the data originally was sent. Therefore, the application can be written in such a way that the same code is used both for sending data and retransmitting data. Also, it is important to note that even though the actual retransmission operation is carried out by the application, it is the responsibility of the stack to know when the retransmission should be made. 7. CONCLUSION: This research paper proposed the architecture of embedded monitoring system for Remote Power Grid parameter monitoring system. It s reduced the problem of Grid failure at excellent cost performances. These systems provide not only excellent cost performance but also running steadily and reliably. This paper proposed that a method using Microchip s ENC28J60 Ethernet controller interface with Atmel s Atmega 32 customized as a Web-Server using Open source TCP/IP stack for task of powermonitoring, switching and control. REFERENCES: [1] [1] Fang Hongping, Fang KangLing, The Design of Remote Embedded Moniterning System based on Internet,2010 International conference on Measuring Technology and Mechatronics Automation [2] [2] I. Klimchynski. Extensible embedded web server for internet-based data acquisition and control, in proceedings of IEEE Sensors, Vol. 6, issue:3,2006,pp.804-811 [3] [3] www.micromouse.com [4] [4]http://tuxgraphics.org/ [5] [5] www. microchip.com [6] [6] Lixia Liu, Research on Technology of Embedded Web Server Application.IEEE, 2005 [7] [7]Tao Lin, Hai Zhao, an Embedded Web Server for Equipment, IEEE, 2004 [8] [8]Embedded web Server Modules. Company information of SSV Embedded System. [9] [9] Adam Dunkels, project scientist, Swedish insititute of computer sciences, UIP1.0- TCP/IP stack for low computing embedded devices [10]Cirrus Logic Product Data Sheet, Crystal LANTM ISA Etherenet Controller