Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 
Monitoring an equipment that is connected to the Internet using a cloud based IoT platform provider such as SAP is not new. However, using standards to connect these devices with less development costs and providing transparency on the end to end process of the production or supply chain is not a simple task. In this demo, I use various components – from amazing developers at SAP, to connect these dots on an end to end process flow.

The Hardware

A Chemical Mixer or Stirrer is a common automation equipment in a Pharma Industry. We simulate such a Mixer on the desk using a combination of 3D printed components, a few sensors, actuators and an industrial grade Raspberry Pi – RevolutionPi Core3 ( .

Source: SAP SE

Details of this 3D printing, assembly and are detailed on blogs:- . The colleagues were generous to provide this hardware. The Mixer contains three bins which can be filled with small wooden beads of different colors to represent a chemical component.


At the Edge

The flow control on these bins and the rotatory motion of the Mixer itself are controlled by Arduino based circuits which communicate via MODBUS to the RevPi.

Source: SAP SE

The SAP Integration Framework is running natively on the RevolutionPi which converts the MODBUS protocols to IoT Services REST Gateway endpoint on the cloud. This could be also done using SAP Edge Services or using the SDK from IoT Services. To enable connectivity between the equipment and the cloud, we use the eSIM card from SAP Digital Interconnect. It is truly a single SIM for a worldwide connectivity.

                                                                                                               Source: SAP SE

The Dashboard from IoT Connect 365 offers real time tracking of equipment roaming, data consumption rate, choose a GSM provider based on signal strength at your location.

Operator Panel

An operator panel receives production orders from the Shop Floor manager. We built an Android app that has a very simple UI to create a chemical recipe. It helps the user to enter how many beads would be produced from each bin for the recipe and how many batches of the recipe should be mixed.

SAP Leonardo Foundation for your Digital Twin

As an IoT equipment, data from the different sensors are sent to SAP IoT Services via the REST Gateway on the cloud. SAP IoT Services provides a X509 certificate which helps establish a secure communication between the RevolutionPi and the Gateway running on the cloud.

Source: SAP SE

This data is then forwarded to Kafka, consumed and persisted in the SAP IoT Application Enablement. A Thing Model as a foundation, allows unlimited possibilities to use the data from these sensors in different SAP Leonardo applications.

Source: SAP SE

For example, using the SAP WebIDE, it is possible to build a custom UI app which can represent the different statuses and charts from the equipment. The SAP application enablement provides such templates in the WebIDE. The Thing Model persists data which is also consumed by other SAP Leonardo applications. Maximum reusability of models and data can be achieved using the Thing Model APIs on the Application Enablement. These resources could be a good source to start :-

As a Pharma company, it is important to provide traceability on every batch that was produced and shipped. We can store this batch production data on each batch in a data base. However, the data base can be manipulated with a simple SQL statement and no one will know it unless a log is written somewhere. Hence transparency is not automated, rather lies at the mercy of the manufacturer. An immutable block chain is a perfect fit in this case.

Immutable transparency using SAP Blockchain

Every time a batch is produced on the mixer, the combinations of the produced recipe along with order details are stored in different blocks on the SAP Hyperledger Fabric services. A Chaincode deployed on the Channel allows bin data from the Equipment to be persisted in each block of the Chain.

Source: SAP SE

The above screen shot shows the SAP Blockchain explorer. Each block contains the data that was posted by the Equipment directly. The data represents the recipe combinations.

                                                                                                                 Source: SAP SE

Leveraging services from SAP Machine Learning Foundation

As the mixer produces the batches, stocks in the inventory are reduced in a linear fashion. This can be also seen in the following image.

Source: SAP SE. Shows linear consumption of stock

Based on the linear consumption, and the current stock level, it is possible to forecast the stock level on the next order. For this SAP Machine learning foundation provides a Timeseries Forecast API.

More of these ML services from SAP can be found at:-

as an extension, I used the Timeseries Forecast API to estimate the stock levels for the next order. When the levels are lower than a threshold further actions can be triggered for replenishment.

B2B order processing with SAP Hybris Commerce

When the bins are running out of stock, based on the ML Services, a trigger is generated. This allows a purchase order to be placed in an SAP Hybris B2B store. This forecast logic can be enhanced with SAP Machine Learning Services for machine health, job waiting time and further predictions.

Source: SAP SE

For the moment the operator panel on the Android app allows the orders to be placed via a series of orchestrated calls. These calls create a cart, set a delivery address, add payment details, configure the delivery mode and finally create an order for that cart in the Hybris storefront. These calls can be triggered also based on consumption patterns and semi automated. Below is a high level picture which shows the different components end to end.

Source: SAP SE

I hope this demo gets you an idea of what can be reached by combining SAP Leonardo technologies in existing business processes. Any feedback or questions are warmly welcomed.


Domnic Savio Benedict

@ IoT World, 2018, Santa Clara, CA


Update:- A Short video of this made by a Colleague is here:-