How to simulate product quality checks using IIoT light barrier sensors

Oliver Thamm

Finding Phoenix Contact and their wish to improve production processes

We, the Xapix product team, decided to spend the weekend learning and virtually participated in the recent Hinterland Hack 2020 in Bielefeld, Germany. We discovered a new industrial internet of things (IIoT) project and tackled a challenge created by Phoenix Contact GmbH.

Phoenix Contact is looking for ways to automatically analyze recorded sensor data, to detect errors and to derive added value for optimizing production processes. Their ability to upload sensor data to the cloud and their many available device types make it interesting to use Xapix. In Xapix Community Edition we can create data pipelines for such value-adding business logic with a handy web UI.

The Phoenix Contact team emphasized that anomaly detection is a challenge to many manufacturing companies for various sensor types in the IIoT market. It’s the perfect challenge for a data integration tool like Xapix.

Modeling the IIoT product quality check 

The Phoenix Contact hackathon team shared twenty-four hours of recorded light barrier sensor data from four different modules with participants in the Hinterland Hack. Often, light barrier sensors are found with manufacturing machinery setups that include conveyor belts. The light barrier data has signals for interruption start and end in separate events that looks like this:

To model anomaly detection, we combined the recorded light barrier data with product reader data we at Xapix recorded using our IIoT factory model and simulator. The product reader data is coming from a camera data stream reading QR codes. You can learn more about the factory model and how we are building it in our corresponding blog series.

On the IIoT factory model, we can manually trigger anomalies, as you can see in the video below. Instead, for Phoenix Contact, we manually edited their light barrier sensor sample data to have an anomaly in the data. Next, we ran the light barrier and camera-based product reader data streams simultaneously in a simulator and set up Xapix data pipelines to detect the anomaly and respond to it by shutting down the conveyor belt model. The response could be anything, including less drastic options like sending SMS notifications via the Twilio API, for example.


Prototyping the product quality check using a simulator 

At Xapix, we operate a simulator software that replays recorded data upon user request. The recorded data is streamed into configurable Kafka topics. Data pipelines created in the Xapix Community Edition consume the events from such Kafka topics. The same or different recorded data scenarios can be replayed simultaneously in the simulator. 

For the Phoenix Contact challenge, we replay a few data scenarios without anomalies. We replay each of them multiple times simultaneously to simulate a lot of regular data volume. Next, we replay a single data scenario containing an anomaly in the simulator. This way the anomaly is hard to detect in the regular data traffic and therefore a good test for anomaly detection software.

In Xapix we set up a number of pipelines combining data from the incoming event streams of sensor data. For the hackathon demo, we decided to let the product quality check decision logic trigger a webhook notification, instead of actually shutting down a device. This is what creating a simple data pipeline for the Phoenix Challenge in Xapix looks like.

And this is what the final pipeline in Xapix for our Phoenix Contact hackathon project with all the decision logic looks like.

Finally, we start the simulator via a cURL command just like this and wait for the incoming webhook notifications.

Join our partners network and IIoT community


We are working on more partner blog posts like this one. We would love to hear about your projects. Contact us if you would like to discuss your use case, or if you have questions or feedback about the Xapix Community Edition.

About the author


Oliver is a senior software developer and an API and data transformation enthusiast. He’s a co-founder of Xapix, writer and conference speaker on all things API. Most recently, he’s bringing his perspective and experience to the world of Industrial IoT.

You can get in touch with Oliver via https://twitter.com/POSoftware or find him on our Xapix Community Discord.