The system consists of the actual measuring device, which performs the signal conditioning, analogue-digital conversion and digital signal processing. I chose the combination of Arduino Due (12-bit high-speed ADC with DMA and USB 2.0 interface) and Raspberry Pi for the architecture. On the one hand, this allows for easy replication without complex PCBs, and on the other hand, this combination offers enormous flexibility, since the sampled data is transferred "raw" to the Raspberry Pi, and the further signal processing takes place in Python code.
The data is aggregated and then transmitted to the server at the set interval. If the connection to the server is interrupted, the data is temporarily stored in the internal memory.
- 3x Voltage Inputs with nominal Voltage 230V (usable range is 350Vrms)
- 3x Current Inputs for external Transducers
- 48 kS/s Sampling Rate
- Uncertainty better than 0.2% (after appropriate adjustment)
- Bandwidth (-3dB): DC to 5 kHz (up to 100. Harmonic)
- Voltage/Current Magnitude
- Voltage Fluctuation
- Voltage Dips and Swells
- Voltage Outage
- Voltage Unbalance
- Voltage/Current Harmonics
- Voltage/Current Interharmonics
- Mains signalling Voltage
- Active Power (total and fundamental)
- Reactive Power (total and fundamental)
- Apparent Power (total and fundamental)
Data Transfer Features:
- User selectable storage groups with individual interval
- Aggregated Data is synchronized to full clock-tick
- Transfer via MQTT (gzipped json)
- WireGuard VPN
- Offline Cache in case of server unavailability
The second system element is the server. Of course, it is also possible to store the data directly on the measuring device and retrieve it later, but I wanted a live transmission to a server for direct display in Grafana. This approach makes the system suitable for the simultaneous use of several measuring devices and the simultaneous monitoring of several network nodes.
This server takes over the task of the MQTT broker as well as data gateway to transfer them to the set databases. InfluxDB version 2 is used as the database for the measurement data, and MongoDB for the configuration and metadata.
This combination results (after the first setup) in a very simple and comfortable measurement system that is far superior to commercial solutions!
- Data Storage with InfluxDB 2 Database
- Data Visualisation via Grafana
- Device and Settings management via Web-App
- Report Generator for automatic PDF Reports
Currently, the project is still a work in progress and it will take some time before the first artefacts will be available. While it is already functional, refactoring is still needed to ensure future maintainability.