An RPI HAT for synchronized measurements


A team from the Institute for Automation of Complex Power System (ACS) at RWTH Aachen University has been working on the analysis of widely distributed power systems for some time. In an effort to move away from highly specialized (and expensive) electronic platforms, they produced instruments designed to work with the Raspberry Pi platform and an open source software stack. They call the platform the SMU (Synchronized Measurement Unit). The SMU consists of a HAT sitting on an RPi3, inside a 3D printed case intended to be attached to a DIN rail. After all, it’s supposed to be an industrial platform.

Hardware-wise, the star of the show is the Texas Instruments ADS8588S which is an 8-channel, 16-bit simultaneous sampling ADC. It’s a pretty cool device, with 200 kSPS throughput and a programmable front end per channel, packaged in a hacker-friendly 64-pin QFP. What makes this project interesting, however, is how they solved the problem of controlling the acquisition and synchronization of sampled data.

1-PPS and BUSY edges converted to levels, then OR to trigger DMA

By programming the ADC in byte-parallel mode and then using the BCM2837 Secondary Memory Interface (SMI) block with DMA, samples are transferred to memory with minimal CPU load. An integrated U-Blox Max-M8 GNSS module provides a 1PPS (high of the second pulse) signal, which is combined with the ADC busy signal in a very simple way, allowing both sample rate control as well than synchronization between several units distributed in an installation. They estimate that they can achieve synchronization within 180 ns of the start of a second, which should be sufficient for measuring relatively slow-changing power systems. The HAT PCB was created in KiCAD and can be found in the SMU GitHub hardware section, making it easy to modify to your needs, or at least adjust the design to match the parts you can actually get your hands on.

Software-wise, the full stack is provided from the kernel module which deals with low-level stuff, offering /dev/SMU, through to the management daemon and a QT-based GUI. A full description of the system level can be found in the associated Open Access article.

We see many power monitoring projects on Hackaday because a little more knowledge about power consumption can save you money in the long run. Here is another RPi HAT project, just for this purpose. Of course you don’t have to be so smart, if you have a proper electricity meter you can just count the flashes and call it a day.


About Author

Comments are closed.