Design of an ARM-Based Power Meter Having WIFI Wireless ...

3 downloads 649 Views 469KB Size Report
significant to research new kind of power meter and the meter reading technology ... IEEE 802.11 of wireless communications technology. It can work in the ...
Design of an ARM-Based Power Meter Having WIFI Wireless Communication Module Li Li , Xiaoguang Hu

Weicun Zhang

School of Automation Science and Electrical Engineering BeiHang University Beijing, China [email protected]

Department of Automation University of Science and Technology Beijing Beijing, China [email protected] [7-8], HFC (Hybrid Fiber-Coaxial) [9], and so on, to transfer data between power meter and manage center. All the above communication media have merits, but also have some shortcomings, such as short transmission distance, high transmission cost, difficult maintenance and unsafe data transmission. The shortcomings of PLC are that its communication signals can not go through the transformer directly and the low-voltage power line carrier is vulnerable to be impacted by the environment. It is real-time, wireless and extensive to use GPRS meter reading, but the cost of current GPRS module and the communications-cost are high. Until the cost reduces to the extent that ordinary people can accept, it can not be used widely. Reading power meter by wire is costly too, for in forepart it’s hard to make net-line beyond the wall and make hole in the wall and in later period the maintenance cost is also high in network connection and security. In order to solve these problems, we can consider applying Wireless communication system WiFi (Wireless Fidelity), which is popularly used in the world, to transmit power data.

Abstract—AMR (Automatic Meter Reading) and PQ (power quality) management based on kinds of network technologies has become a trend. However, because of the high construction and maintenance costs with the existing meter reading technology, the applicability to different residential buildings and different network infrastructure should be improved, it is greatly significant to research new kind of power meter and the meter reading technology, which can accelerate the evolution of the Next Generation Network and facilitate people's lives. Now wireless broadband network develops rapidly. Generally WiFi is considered the consummate scheme to resolve “the last 100 meters access problem”, and WiMAX is regarded as the perfect scheme to resolve “the last 1000 meters access problem”. At present, many cities in many countries are building or will build Wireless Metropolitan Area Networks by WiFi and WiMAX, it provides the new connection ways to the AMR system. This paper presents an AMR system scheme using WiFi technology and an ARM-Based PMWCM (Power Meter with WiFi Communication Module) scheme. On the bases of the schemes, this paper designs the PMWCM hardware system and software system. The ARMbased hardware system is consisted of processor core board and peripheral board, and the software program is basing on embedded Linux. This paper also proposes the functions of wireless communication module and design detail and discusses the security of the communications.

Now, Wireless broadband network develops rapidly. The WiFi [10-11] needs no wire and use the 2.4GHZ frequency, which can be used needing no application in advance, so it is generally considered the ideal scheme to resolve ‘‘the last 100 meters connection’’. The network by WiFi can compose LAN (Local Area Network), and it is free to the user to communicate within LAN. So WiFi greatly reduces the construction and maintenance costs of AMR system. Farther more, the WiFi LAN can connect to remote manage center by many ways, such as FTTH (Fiber to the Home), wire and the wireless. So power meter and AMR by WiFi is a preferable scheme to resolve the power data collection and the PQ (power quality) management.

Index Terms—Power meter, AMR, WiFi, WiMAX, ARM

I.

INTRODUCTION

With the rapid development of science and technology, it is possible to read and manage power meter data of residents by network remotely. The traditional manual Meter-Reading was not suitable any longer. On the one hand, it spends much human and material resource and brings about additional problems such as the security of entering house. On the other hand, the power management department can not collect the real-time data electricity being used. And with the power price reform, in order to make account rapidly, the power management department also needs more power parameters such as power requirement, time-sharing power quantity and burthen curve. AMR (Automatic Meter Reading) can meet above demands. So, remote AMR and management through kinds of network technologies has become a trend now.

Metropolitans like New York, Beijing and Shanghai are building Wireless Metropolitan Area Networks with WiFi and WiMAX. The Wireless Metropolitan Area Networks provide a new connection method to the meter reading. With the existing wire-broadband connection ways, meter reading by WIFI will certainly has a good market prospects. II.

At present, most AMR system are generally based on such media as RF (Radio Frequency) [1-3], PLC (power line carrier communication) [4-6], GPRS (General Packet Radio Service)

978-1-4244-2800-7/09/$25.00 ©2009 IEEE

READING POWER METER BY WIFI

WiFi belongs to the short-range wireless technology which is used in offices and buildings. This technology is based on the IEEE 802.11 of wireless communications technology. It can work in the bandwidth near the 2.4 GHz which do not need any permission for use. Its currently communications standards is IEEE 802.11a, IEEE 802.11b, IEEE 802.11g and IEEE

403

ICIEA 2009

802.11n, etc. and the world wildly used in them is IEEE 802.11b. Its max communication rate can reach 11Mb/s, spreading needless line of sight. If RF is attenuation, it can decrease the speed dynamically to 5.5Mb/s, 2Mb/s and 1Mb/s. the transmission radius can reach 300m outdoor and 100m indoor. IEEE 802.11b can provide the credible data transmission and reasonable network bandwidth by using the protocol and the packet acknowledgement liking Ethernet. IEEE 802.11b use CCK (Complementary Code Keying) which is basing on DSSS (Direct Sequence Spread Spectrum).The idiographic standard of 802.11b is IEEE std. 802.11b-1999, in 2001, the Assignment Group modified the disfigurement in MIB, which formed IEEE Std. 802.11b-corl 2001.

Module, System Control Module, Remote Communication and Monitoring Module Remote Monitoring and Control Module, the System Security Module, Remote Software Upgrade Module, and so on. The functional modules are shown in Fig. 1.

WiFi technology which is used in AMR [12] has got some outstanding advantages: •





WiFi radio wave has broad coverages. WiFi radio wave has broad coverage. The coverage of Bluetoothbased radio wave is very small, only about 15 meters radius, and the Bluetooth-based radio wave can not transmit data through the load-bearing walls. Compare to the Bluetooth, WiFi has broader transmission radius, 300 meters for outdoor or 100 meters for indoor barriers. It could be used not only in families but also in high buildings as well.

Figure 1. The PMWCM system functions

The PMWCM system should at least have the following features:

WiFi Has Relatively Lower Cost. Only placing a WiFi meter reading terminal in the hallway of a building, all the power meters in 100 meters will connect it by WiFi, which is wireless. In other words, we do not have to spend money to lay the wires for network access by make holes in walls, thus saving a great deal of cost. At the same time, in the local reading meter network, the PMWCM communication with vicinal ones can by Local Network, it’s free, and it can save much money to circulate and maintain the system. WiFi Facilitates the Upgrad. Each of WiFi meter reading terminal supports nearly 100 wireless interfaces. So we do not have to re-wiring them in future. The meter reading terminals can communicate with the household appliances through wireless networking communications. So, the meter reading terminal can be added with some new functions such as IPTV, security control, remote Health care, information appliances, etc. and thus it realizes the true Digital Home which will be the future direction of development.

To receive meter reading order from Remote Control Center, to read the real-time or timing data of user’s meter, and to store the data in their permanent storage medium.



To encrypt the data of meter reading and to authenticate the information bear, to transmit to the remote management centre through the networks.



To realize authentication of client identification and security features such as data encryption.



To realize monitoring function of the user meter, and to report to the remote management centre when a user meter is broken.



To monitor and prevent own errors, to have functions such as anti-virus, anti-invasion, timing security vulnerability scanning and system vulnerability autorepair, etc.



Also to have the function of remote software upgrade. IV.

DESIGN OF THE PMWCM SYSTEM HARDWARE

The hardware system of PMWCM is consisted of Power Data Collection Module, Wireless Communication Module, the Relay Control Unit, LCD Module, and so on. Considering the facility of debug and extension, the ARM hardware system is usually made up of the Core-Board and the Peripheral-Board. The Core-Board of the PMWCM is composed of one 32bit ARM9 CPU(S3C2440A), one 64M Flash (K9F1208), two 32M SDRAM (Hynix561620). The Peripheral-Board is composed of the 3.5V and 3.3V power module, the power measurement module (CS5460A), the Voltage/Current Transformer(SCT254FK、SPT204E), the LCD ( LCM1602 ) , the Relay (HHC67) and the wireless communication module(VIA VT6656 ) . The hardware composed chart are shown in Fig. 2

So comparing with reading meter by wire mode, reading power meter by WiFi can spend lower cost to build AMR system, save the time of establishment. It is applicable especially in Wireless Metropolitan Area, in the old urban area, the wired infrastructure weak areas and the rural and mountainous areas. At the same time, the PMWCM will certainly have a better market prospects, and researching it will have far-reaching significance. III.



THE PMWCM SYSTEM FUNCTIONS

The PMWCM system functions can be divided into Data Collection and Encryption Module, Wireless Communication

404

module CS5460A [15-16], and the 200 ~ 250kΩ 3W resistor is between them. The analog signal scale of voltage and current on the primary is proportionally transformed on the secondary via Voltage/Current Transformers. The sampled voltage or current would be chosen alternately by multiplexer and then converted into an equivalent digital signal by the A/D converter. The instantaneous voltage and current values are multiplied by the high-speed digital multiplier, and get instantaneous Active Power. Accumulated by the time, the average received energy E, Energy per unit time is the Active Power. After calculations, obtained instantaneous voltage and current, Active Power, etc., respectively, saved into the corresponding internal register, waiting for ARM processor to read. C. CS5460A Communicated with ARM Processor CS5460A communicated with ARM processor through the SPI serial interface, SPI is a high-speed full-duplex synchronous serial communication bus, constituted by the 4pin, SPICLK, MOSI, MISO and SS. SPICLK is common clock of the SPI bus. MOSI is the master output, slave input. MISO is the master input, slave output. SS is a sign pin from the slave machine, active-low. In the PMWCM system, ARM processor is the host machine, its external pin must be HIGH; CS5460A is the slave, the synchronous clock input from the host.

Figure 2. The Hardware System of PMWCM

In this chart, the ARM9 CPU S3C2440A is the main controller in charge of the system and the data disposed, the 5V voltage which generated by LM7805 provided to CS5460A, LCD LCM1602, and change to 3.3V by LM1086,which provided to Core Board as working voltage. The Current/Voltage Transformers (SCT254FK and SPT204E) collect the little signal of current/voltage from the user’s wire, and give them to CS5460A. The CS5460A computed them and get the current/voltage virtual value, the power value and others parameters. S3C2440A read them by SPI and store them to NAND Flash K9F1208. At the same time, some data is output to LCD LCM1602 to display. When it meets certain conditions, the S3C2440A can control the Relay module to shut off or resume the electric power supply. The system communicated with the remote host computer by WiFi.

D. WiFi Wireless Communication Module The PMWCM system communicate with the remote host computer by WiFi wireless module, WiFi wireless network card use 802.11b-based VIA VT6656, it connected with the CPU S3C2440A through the USB interface, so as to implement network communications. E. the Relay Control Unit On the one hand, the Relay control unit is an interrupting device designed for shutting off or resuming the power supply control. When the power data is beyond the upper limit which the user buys in bank, the S3C2440A can control the Relay module to shut off the electric power supply. If the User pays the electricity bills in Bank, the S3C2440A can knows it by WiFi and other network, and can control the Relay module to resume the electric power supply.

A. the Main Controller S3C2440A The S3C2440A [13-14] is developed with ARM920T core, its low power, simple and fully static design is particularly suitable for cost- and power-sensitive applications. It adopts a new bus architecture known as Advanced Micro controller Bus Architecture (AMBA). The S3C2440A offers outstanding features with its CPU core, a 16/32-bit ARM920T RISC processor designed by Advanced RISC Machines, Ltd. The ARM920T implements MMU, AMBA BUS, and Harvard cache architecture with separate 16KB instruction and 16KB data caches, each with an 8-word line length.

On the other hand, the Relay control unit is designed for fault interruption and load switching. In order to protect the D/A converter from exceeding current, the D/A converter is connected with protective relay wired in series with the breaker control circuit, so the breaker could be controlled.

The integrated on-chip functions include: an LCD controller (up to 4K color STN and 256K color TFT), SDRAM controller, 4-ch DMA controllers, 3-ch UARTs, 2-ch SPIs, 2-ch USB Host controller, 8-ch 10-bit ADC, 4-ch PWM timers / 1ch Internal timer / Watch Dog Timer, and Touch screen interface, etc. S3C2440A also have abundance I/O interface, such as 130 General Purpose I/O ports, LCD interface, Camera interface, SD Host interface, MMC interface, 4-ch DMA interfaces, 3-ch UART interfaces, 2-ch SPI interfaces, 2-ch USB interfaces, IIC bus interface, etc. S3C2440A supports booting from NAND flash memory.

V.

THE PMWCM SYSTEM SOFTWARE SCHEME

The PMWCM system working principle are this: First of all, the current/voltage transformers change the circuit voltages and currents into the range of input current and input voltage which power measurement chip CS5460A required .CS5460A calculates instantaneous power in accordance with its internal transient voltage and current, then calculates the power and output them by pulse counter to S3C2440A, so it can save them to memory and output them to LCD. S3C2440A can also communicate with the remote host computer by WiFi wireless module.

B. The Power Data Collection Module The Power data collection module is consisted of Voltage/Current Transformers and the power measurement

The PMWCM system software flow is shown as Fig. 3.

405

d) Jump to the C program entry point of phase 2). 2) Phase B can be programmed by C language, this can achieve more complex functions, and the code has better readability and portability. Phase B includes the following steps: a) Initializing the hardware device this stage uses. b) Detecting system memory mapping. c) Reading the kernel image from Flash to SDRAM.. d) Setting boot parameter for the kernel. e) Calling the kernel. B. When Not Received all Kinds of Interruption Request When not received all kinds of interruption request, S3C2440A CPU implement watchdog program circularly, implement display program which shows the cumulative power of this month, determine whether the update time, read CS5460A instantaneous current and voltage Register value to determine whether it is the over-current or over-voltage or under-voltage shutdown protection. After complete the above programs, S3C2440A is prepared to accept external interrupts at any time. C. When it received remote host computer communications interrupt request,it responds to the interrupt and calls the WiFi communication program to deal with the request: • If the meter reading orders are received, the power data stored in the Flash, the local MAC address information, and so on, will be sent to the remote host computer through WIFI wireless communication module.

Figure 3. The PMWCM system software flow chart

In order to facilitate the WiFi wireless communication function implementation, The PMWCM system’s ARM embedded system use the function basing on embedded Linux operating system. Based on completing the hardware equipment, embedded Linux system would also achieve the hardware drivers and user tasks. Hardware drivers include SPI driver, USB driver, WiFi communication module driver. The embedded Linux system has owned SPI and USB drivers, the driver of WIFI communication module VIA VT6656 can be provided by VIA Technologies.



If it received the remote host computer to send the adjusting Real-time price such as instructions, then it calls the local procedures to adjust parameters such as electricity price.



If it receives computer send power supply, GPIO interface resume.



It returns the main program after the above steps.

The PMWCM system software flow is as follows: A. the Hardware Initialization and Embedded Linux Operating System Initialization The system uses the S3C2440's NAND Flash boot mode. This mode uses a way of Stepping Stone implementation. First of all, it copy the first 4k code of NAND Flash to Stepping Stone at boot time, which are mapped to address 0x0 region in SRAM, then the copied code are run in SRAM to complete the system startup. Stepping Stone is only 4K, unable to meet the requirements of booting systems, so the PMWCM system uses a phased booting strategy, namely: booting process is divided into phase 1) and phase 2).

the instructions which remote host to shut off power supply or resume then call the procedure through the to control relay to shut off power or

D. the Main Program Waiting for the Interruption When Sampling Is End When the CS5460A's EOUT (energy output) pins and EDIR (energy direction indicator) pins output pulse, interruption program according with the time parameters stored in S3C2440A's clock, as well as the real-time clock value to determine the type of the current period, S3C2440A response to external interrupt to cumulate the power data , and the results is stored to the external Flash memory,then interrupt service routine exit into the above process B.

1) This Phase mainly includes hardware initialization code, which programmed by assembly language. Phase A includes the following steps. a) Hardware initialization b) Completion of SDRAM initialization, SDRAM is the RAM space which phase 2) required to run. c) Copy the phase B code of Bootloader to SDRAM space.

VI. THE SECURITY OF WIRELESS COMMUNICATION MODULE However, we should also be aware of the openness of wireless network which makes security become the most important issue. In the cable network, users must connect the cable to the routers in order to access. If the wireless network is

406

unprotected, the people sitting outside the window can access the network through a small card. 802.11b provides a security mechanism called WEP (Wire Equivalent Privacy). It can provide the exchange passwords to wireless LAN Access Point and allows frequent password changes. As WEP symmetric encryption mechanism-the encryption and decryption of data using the same key, so data encryption and decryption of the public key are vulnerable to hacker attacks. Therefore, since the beginning of commercial WiFi, security issues have become a main constraint restricted WiFi further development. IEEE 802.11i [17-18] modified and integrate the WLAN MAC layer. It has strict definitions of the format and encrypted authentication mechanism in order to improve WLAN security, including the following elements: WPA (WiFi Protected Access) and the RSN (Robust Security Network), and implemented in early 2004. RSN can transform your password, increasing the difficulty of decoding passwords, and is compatible with TKIP (Temporal Key Integrity Protocol).

[3]

[4]

[5]

[6]

[7]

[8]

[9]

On the other hand,because of meter data for each user means the cost , so in order to achieve writing the power data to the user power meter remotely after the users buy in bank, the local data security in PMWCM is particularly important, so the local data pretreatment, such as encryption and authentication, is also important to the entire AMR system security.

[10]

[11]

VII. CONCLUSION

[12]

This paper presents a new AMR scheme using WiFi technology and an ARM-Based PMWCM scheme; it proposed an economical and effective ways to implement an AMR system. It saves the cost of Pre-building communication network and late cable maintenance; it achieves the free sharing of broadband wireless network resources and the remote real-time management of the user power data, so it greatly saves the cost of resources.

[13] [14]

[15] [16]

REFERENCES [1]

[2]

[17]

Brasek.C, “Urban utilities warm up to the idea of wireless automatic meter reading”, IEEE Computing & Control Engineering Journal, Vol.15, pp.10-14, Dec./Jan. 2004/05 B. S. Koay, etc, "Design and implementation of Bluetooth energy meter", Proceedings of the Joint Conference of the Fourth International Conference on Information, vol. 3, pp.1474-1477, Dec. 2003.

[18]

407

L. Shiwei, etc, "Design of an automatic meter reading system," Proceedings of the 1996 IEEE IECON 22nd International Conference on Industrial Electronics, pp.631-636, Aug. 1996. Petri Oksa, Mikael Soini, “Considerations of Using Power Line Communication in the AMR System”, 2006 IEEE International Symposium on 26-29, pp.208-211, Mar. 2006 A. Schwager, etc, “Potential of broadband power line home networking,” IEEE Consumer Communications and Networking Conference, pp.359-363, Jan. 2005 S. Battermann and H. Garbe, “Influence of PLC transmission on the sensitivity of a short-wave receiving station,” IEEE Power Line Communications and Its Applications, pp.224-227, Apr. 2005. Chih-Hung Wu, etc, “Design of a Wireless ARM-Based Automatic Meter Reading and Control System”, Power Engineering Society General Meeting, 2004. IEEE 6-10, Vol.1, pp.957-962, June 2004 Yu Qin, “The Research and Application of ARM and GPRS Technology in Remote Meter Reading Terminal Equipment”, A Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Master of Engineering, 2007 Quanan Man, Jiangming Shi, “Design and Application of Network Ammeter Transcribing System Based on HFC Two-way Network”, Cable Television Technology, vol.17, pp.59-63, 2005 Wei Guo,“Study on WIFI and WIMAX of broadband wireless”, A Thesis for the Degree of Master in Beijing University of Posts and telecommunications,Mar.2007 Dhawan, S, “Analogy of Promising Wireless Technologies on Different Frequencies: Bluetooth, WiFi, and WiMAX”, IEEE Wireless Broadband and Ultra Wideband Communications, pp.14-14, Aug. 2007 Li Li,Xiaoguan Hu,Jian Huang,Ketai He, “Research on the architecture of Automatic Meter Reading in Next Generation Network”, 6th IEEE Intenational Conference of Industrail Infermatics, July 2008 Samsung Electronics, “S3C2440A 32-Bit CMOS Microcontroller User's Manual Revision 1”, 2004 Wei Suo, “Design of Radio Frequence Module Driver Based on S3C2440 +LINUX Platform”,A Thesis for the Degree of Master in Beijing University of Posts and telecommunications,May.2008 Honestar Electronics Co., Ltd, “Single-phase bi-directional Power/Energy IC-CS5460A”,Jan.2003. Xiujuan Sun, Maofa Gong , “CS5460A-based multi-purpose singlephase Electronic Power Meter ”, Power System Communications,Nov,2003,pp:44- 46 Bruce Potter, “Wireless Security is Future”, Security & Privacy Magazine, IEEE, pp. 68-72, 2003 Faheem H.M, “Multiagent-based security for the wireless LAN”, Potentials IEEE, pp.19-22, 2005