Graph Discrete Signals From Embdded Device In Real Time

A European medical device manufacturer was in the process of designing a new device which they wanted to begin monitoring as soon as a prototype had been built. They device was designed to emit a large number of discrete signals, sampled at a rate of up to 30 samples per second per signal.

Clearly, this needed to be a high performance solution with an eye toward eliminating latency wherever possible.

The larger issue, however, was the device did not yet exist, but the manufacturer did not desire to wait for the prototype to build the monitoring system. With information provided by their embedded systems designers, I built a signal simulator in Perl which exactly duplicated the socket based messaging protocol they had designed.

I was asked to suggest the best implementation for the underlying communication methodology, and I chose a high performance socket based messaging library that could be compiled into the embedded system.

I then completed the simulator using the same low level messaging library and used it to forward signals to a connected FastCGI process, running under Nginx. A resident PHP executing as a persistent FastCGI process connects to the simulator and processes the message stream in real time, feeding the signal samples to the chart rendering routines.

The best part of this project was designing a functional monitoring system for a device that did not yet exist. Too cool.

See the demo, below.

Tools Used

  • ZeroMQ Distributed Messaging Library
  • Ubuntu Linux Native C Compiler (Messaging Layer)
  • Perl (Simulator)
  • Nginx High Performance Web Server
  • Fast CGI Interface to Nginx utilizing PHP
  • Highcharts Javascript Charting/Graphic Library
  • JQuery Javascript Library

Project Demonstration (select signals & click run)