using MCC 118 with Raspberry Pi®
A major mobile communications company in China needed to monitor the external 220 V/50 Hz city power being supplied to their facilities. They operate large data centers where uptime is critical.
Disruptions and fluctuations in the external power grid can cause major issues including damage and reduced work life to power adapters and UPS’s, resulting in unacceptable service interruptions and increased costs.
The company had several different necessary requirements that made finding an off-the-shelf solution difficult. Included in these requirements were long term monitoring and storage of data, high-speed sampling (up to 10 kHz), analysis of 3 phase power, and several different alarm types.
Initially, the company tried developing a system based on the Arduino platform but ran into difficulties because of the lack of multi-thread support. Options for accurate, high-speed analog sampling were also unavailable. Ultimately, a Raspberry Pi platform was chosen because of its powerful CPU and features like the GPIO outputs (for controlling warning LEDs), making it an ideal platform for IoT projects.
The completed system includes a Raspberry Pi 4, the MCC 118 DAQ HAT, six transformers for the 220 V signals and a power supply. The external view shows the alarm LEDs and a screen with real time data.
The MCC 118 DAQ HAT was selected because of its ability to accurately measure multiple analog inputs at high speeds as well as the open-source software library, giving programmers full access to its functionality.
The 220 V lines are measured using a transformer that outputs a <10 V signal, easily measured by the MCC 118.
The machine produces four types of alarms: an optical alarm, an acoustic alarm, an external relay output, and an alarm on the IoT platform (OneNet).
The voltage measurements are made using the six analog inputs on the MCC 118 HAT. The 3 phase power calculations are made using NumPy libraries. NumPy is a library for Python and can be utilized to perform mathematical operations on arrays such as trigonometric, statistical, and algebraic routines. If the measured data exceeds the expected maximum and minimum values of each cycle of alternating current, that data is written to a hard disk file and the GPIO outputs on the Raspberry Pi are used to control an LED to send out an early warning signal.
The completed solution is a 24/7 monitoring and analysis system. The company succeeded in bringing increased equipment reliability and decreased downtime to their facility.
Below is a link to the original customer article on NXEZ (a site for RPi enthusiasts), including a look at the source code: