Cellular Internet of Things Based Power Monitoring System for Networking Devices

— Voltage and frequency stability is critical for network devices like routers, switches and radios. Prolonged exposure of these devices to extreme voltage or frequency makes them susceptible to damage. Since these devices are usually operated round the clock and oftentimes in remote places, it becomes necessary to monitor the quality of the power delivered to them. In this work, we developed a power monitoring system to provide remote access to the supply voltage and frequency of network equipment powered by an uninterrupted power supply system. We develop an instrumentation system to monitor the grid frequency, grid voltage, as well as the UPSS output voltage. We equally present a complete system that processes sensors’ data and make them available to a remote server over a cellular network with a robust email and SMS notification system. Sensors data collated over one month show consistent results with correlation of 0.95 with an overall system power consumption of 83 mA.


I. INTRODUCTION
Rapid advancement in electronics engineering has led to increased Miniaturization of both industrial and consumer electronics [1]. Electronics network devices like switches, radios and routers have gotten smaller and more functional over the last few decades. This miniaturization often come at a cost. Oftentimes, extensive compromises have to be made, particularly in the power stages of these devices. These compromises are premised on the assumption that corresponding advancement in Electrical power system engineering and electricity distribution networks are stable and consequently, electricity supply to homes and offices are stable.
Unfortunately, this presumption is not always true. Simple analyses of the voltage and frequency profile of electrical network over time will almost certainly reveal certain degree of fluctuations [2]. These fluctuations are sometimes marginal but at other times, non-trivial particularly in developing countries [3]. For consumer and networking devices, voltage and frequency ratings are important and are such, always clearly specified. The voltage by this means refers to the potential energy between two points in the electrical circuit why AC frequency is the number of times the voltage oscillates in a second. Mains voltage in Europe and most countries in the world including Africa is between 220 and 240 volts at 50 Hz while it is between 100 and 127 Submitted  volts, 60 Hz for Japan, USA and several other countries in North America.
Modern networking devices are voltage and frequency specific and are such expected to operate within a conservative margin. Consequently, excessive fluctuations in voltage or frequency will most likely lead to faults. A wellknown fact is that voltage and frequency of electrical networks vary all through the day with the loading condition of the grid [4]. When the electrical network is overloaded, low voltage is almost inevitable which oftentimes result in a drop in frequency and vice versa.
For rapidly expanding power systems where generating capacity is not at par with load demand, frequency distortion can become frequent which is undesirable for power systems that are expected to operate close to steady state conditions [5]. Unfortunately, for most electronics devices, one percent deviation from this steady state value is already too much and can eventually lead to damage. It is therefore very necessary to ensure proper monitoring of these parameters.
A simple and cost effective way of monitoring the parameters of power systems is through the Internet of Things (IoT). IoT is a rapidly evolving technology that describes a network of physical objects like sensors that have the ability to communicate usually in real time over the internet. IoT is becoming increasingly popular for industrial applications, healthcare, smart cities and smart homes. In recent times, IoT has found profound application in power systems. According to [6], IoT is at the epicenter of the current effort to ensure that the electric power and energy systems are capable of providing real-time monitoring, situational awareness and intelligent control of the grid. These measures are necessary to ensure the optimal management of the available energy on the grid reduce energy theft and wastage, improve asset visibility as well as cyber-security of the entire network.
For devices working in remote locations, it is important to have a robust monitoring system in place to ensure that all devices operate within their intended operating range. The monitoring devices are expected to provide real-time information on the working state of the network devices connected to them. For products like inverters and UPSS, these capabilities are only available in the expensive and high end ones. For most low to medium range equipment, power monitoring systems are expected to work as add-ons. In this work we propose a power monitoring system design to monitor the frequency and voltage of network devices using cellular IOT. Our specific focus is on network devices @ Cellular Internet of Things Based Power Monitoring System for Networking Devices Olaide Ayodeji Agbolade and Fatai Olaoluwa Sunmola connected to the grid through an Un-interrupted power supply system. In this work, we proposed a design to measure the grid voltage, UPSS voltage as well as the grid frequency. The data obtained are then sent to a remote server over a cellular network for real-time monitoring. Short messaging Service (SMS) alerts as well as email are also incorporated into the design to facilitate quick intervention in case of emergencies.

II. RELATED WORKS
Several authors have proposed different power monitoring designs. Authors in [7] proposed an IoT based micro-grid monitoring system to monitor the frequency and phase angle of the grid using a mobile platform. The design uses a voltage regulator module, microprocessor-based analogue-to-digital sampling model and an android-based smartphone. The authors employed adaptive frequency estimation algorithm for frequency monitoring instead of the DFT based approach. Primary synchronization signal was also used to replace the GPS-based system for phase angle monitoring. The design recorded an accuracy of 1.7 MHz and 0.01 rad for frequency and phase measurement respectively. At an overall design implementation cost of only $100, this was far cheaper than any commercially available module. A similar methodology was adopted in [8] for monitoring the output voltage of the power-conditioning unit of a solar system installation. In [9], a system was proposed to captures power parameters such as voltage, current, frequency, power factor, Active power, Reactive power and apparent power of a grid supply. The readings were taken every ten milliseconds and sent to the Thingspeak cloud server for real-time monitoring. Another design based on low-cost PZEM-004T, a non-invasive Current sensor, SD3004 electric energy measurement chip and ESP8266 Wemos D1 mini microcontroller was proposed in [10]. Voltage, current, power and energy were the major data recorded and sent to a server using the Message Queuing Telemetry Transport protocol (MQTT) in JavaScript Object Notation (JSON) format. An IoT based solar system monitoring and controlling system was proposed in [11]. Data collected include voltage current power, temperature, weather condition, sunlight, and dust condition. The data collected were majorly to control the Solar PV module wipers to prevent dust build-up and for controlling the solar tracker to get Optimal and sunlight. Authors in [12] employed a voltage sensor to measure the input and output voltage of an un-interrupted power supply. The accuracy of the measurement was found to be comparable to that of a clamp meter. A design for monitoring and controlling of a power grid substation using IoT was proposed in [13]. The smart voltage and current monitoring system use an Arduino Uno, voltage, current and frequency sensor to measure grid voltage, current, frequency and power factor using zero linecrossing detector. Other authors in [14]- [18] all presented different power monitoring design for solar grid hybrid monitoring system.
The design proposed in this work is distinguishable from the several ones presented in this section. First, we proposed a new sensor design motivated by the work presented in [19]. Secondly, our design includes an early warning system which send instant notification when voltage or frequency readings are out of range or when a total outage occur.

III. DESIGN METHODOLOGY
In this work, we developed a system to monitor the input voltage (grid voltage), output voltage (UPSS) and grid frequency of a power installation for network equipment. The proposed methodology for this monitoring system is presented in Fig. 1. To achieve this task, we designed two voltage sensors, one for the grid and the other for the UPSS output. A frequency sensor was also designed to monitor the frequency of the grid since it is very susceptible to fluctuation as load demand fluctuates over the course of the day. The output of the sensors was fed into an ATMEGA328 microcontroller for data processing before being sent over a cellular network to a remote server. The system equally makes use of Email and SMS alerts for event notification when readings are out of range. The entire system was designed in three phases. First, we designed the frequency and voltage sensors for instrumentation. These designs, which are based on [19] are presented in Fig. 2 and 3 respectively. The processing part includes the microcontroller together with its accompanying peripherals. The final part was the communication part. SIM800L communication module produced by SIMCOM was used for this. The entire programming of the system was done in embedded C. The following sections give a more detailed outlook of our system design.

A. Instrumentation Design
The schematics for the AC frequency-sensing instrument as shown in Fig. 2 is a zero crossing detector, built around the LM358 OP-AMP. The circuit generates approximately 1.78v square pulse each time the ac signal goes from the positive cycle to negative. The two diode D1 and D2 together with R1 is valued to ensure input voltage is kept in a safe range. Resistor R2 and R3 also form a voltage divider that limits the negative voltage that is not tolerated by the microcontroller. The output of the frequency sensor is fed into the digital pin of the atmega328 microcontroller. By using interrupts to determine the period ( ) for a complete oscillation or two rising edges, the frequency ( ) can be readily calculated as given by equation (1).
where is the microprocessor clock speed, which is 16 MHz for the Atmega328 used for this work. is the pre-scaler which is 8 while is the TCTN value per clock cycle as dictated by the pre-scaler increment value.
The peak detector circuit presented in Fig. 3 measures the amplitude of the ac signal. With the 10 bit ADC on the microprocessor, the voltage was measured using equation (2).
To compute the RMS value of the voltage, first we modified equation (2) to get equation (3).
where is the supply voltage of 9 V from the secondary side of the step down transformer and 1 the voltage across capacitor 1.  Sensor calibration is an important part of instrumentation. In other to ensure the accuracy of our readings, we calibrated our sensors using the Aidetek VC97 digital auto range Multimeter. The Multimeter has a very reliable functionality for both frequency and AC voltage measurement. To calibrate the two voltage sensors accurately, first we connected the sensors to the microcontroller, which was already running the Emmonpi library and took readings over one minutes to get a good representation of the voltage. At the same time, we monitor the voltage readings on the Aidetek Multimeter. We used a video camera for simultaneous recording of the data. By doing this this, we were able to get the corresponding reading of the sensors relative to the Multimeter that is being used for calibration and offset any inherent error in the process. The average for the meter and sensor were used to ensure the voltage sensor was accurately calibrated. A similar procedure was equally followed for the frequency sensor. The frequency calibration was more straightforward because of less fluctuation over short duration.

B. Processing and Communication Unit Design
The atmega328 microprocessor is the central processing unit of the design. The 8-bit AVR processor has a flash memory of 32 KB, with 2 KB SRAM and a maximum operating frequency of 20 MHz. The communication protocols for the peripheral devices in the project is shown in Table 1. The SIMCOM manufactured SIM800L used for the cellular communication was powered with the LM2596 switching regulator with series of coupling capacitor to help with current burst. This is necessary to ensure that the module does not continue to restart due to insufficient power. The module is connected to the microcontroller using serial communication specifically universal asynchronous receiver transmitter (UART). In combination with the microcontroller, the communication module sends sensors data to a remote server, sends email notifications when sensors data are out of preset range and sends SMS notification when the network infrastructure is down.

C. Server
The sensor data from the monitoring system are sent to a remote server. The server receives the grid voltage, UPSS voltage, grid frequency, location ID and timestamp data from the monitoring device. The timestamp data are obtained from a real time clock (RTC) in the design. The data are obtained in JSON format through a POST command from the processing and communication unit. The data are logged and displayed with a graphical user interface (GUI). The results as obtained are shown in the next section.

IV. RESULT AND DISCUSSION
Result and analysis of our work is presented in this section and the complete assemblage of the system shown in Fig. 4. After successful calibration and deployment of the two voltage sensors, we set out to analyze their consistency. For the UPSS system, the output is expected to be the same with that of the grid whenever there is voltage on the grid except in situation where the grid voltage is less than 160 V. To measure the consistency of the two voltage sensors, we correlated their voltage readings. We recorded a maximum variance of 3V and correlation coefficient of 0.95. This shows that the two voltage sensors have very consistent results. The system was deployed over one month duration. In Fig. 5 and 6, we presented the voltage sensor readings for the grid and the UPSS. The dip in the Fig. 5 and Fig. 8 indicated a period of outage on the grid. At this time, the UPSS automatically takes over as shown in Fig. 6. In Fig. 7, we showed the result of the variation between the two voltage sensors while taking the same readings. The result showed that the readings from the sensors were similar and very consistent. The sharp spike noticeable on the figure shows an outage situation where only one sensor reading is available.     In Fig. 8, we present the grid frequency readings from the designed frequency sensor. The graph shows that the readings averages around 50 Hz. With the designed system, we were able to remotely monitor the power system supplying the network devices in remote locations as indicated in this research. The continuous current consumption of the frequency and voltage sensor was found to system was found to be 5mA and 3mA respectively. The current consumption of the entire system is 83mA. This current consumption be further reduced by removing elements like display, which is not critical especially for remote applications.

V. CONCLUSION AND FUTURE WORK
In this work, we proposed a cellular IoT based powermonitoring system for monitoring network devices. This is important, as network devices have been found to be very sensitive to voltage fluctuations. To accomplish this, first we designed a voltage and frequency sensor. The sensors design was implemented, tested, calibrated and deployed in a reallife application. The two voltage sensor readings were correlated and result showed they have high level of correlation (0.95), thus indicating consistent readings. The frequency sensor and cellular communication module together with the Atmega328 microprocessor were all integrated to form a complete system. The system monitors the UPSS input and output voltage together with the grid frequency. The results are logged on a remote server. SMS and email notification were also sent when needed. In future work, we intended to study how the voltage and frequency readings accuracy are affected by change in power factor. This is important because a voltage deviation of about 2V is noticeable as the system is tested across multiple locations thus necessitating recalibration per each location.