As a fun project and as an example for my recent talk at the Jazoon conference, I’ve made this device. I call it my pi4jmultimeter.
What it does its some basic electrical multimeter features:
- DC voltage measurement
- AC waveline preview
- AC spectrum analysis
- Electrical resistance measurement
The Arduino loops a program which does simple analog reads on three inputs, periodical FFT and sends all this data to the Raspberry Pi via the serial interface. The Raspberry Pi, has a running Java8 SE Embedded process based on the pi4j and Java WebSocket libraries. It reads everything from the serial port with the help of the pi4j library, packs everything in a nice JSON format and broadcasts the data to every opened WebSocket connection by the use of the Java WebSocket library.
The whole source code with the build instructions can be found on GitHub: https://github.com/hsilomedus/pi4jmultimeter
The slides of my presentation are available at the jazoon guide webpage: (or directly at slideshare)
The d3js graphs can be observed and used individually. All the graphs populated with some random data can be found here:
- Bar graph for DC voltage measurement
- Line graph for AC waveline preview
- Bar graph for spectrum analysis
- Dynamic bar for resistance measurement