Some time ago we were looking for an easy to understand IoT example which we could use to demonstrate the basic capabilities and functionalities of IoT. This was the genesis of our so called “intelligent chair”. The intelligence of the chair shoud be as follows: the chair was to detect if somebody sits on it or not. That’s all. Well, this “intelligence” is rather modest but nevertheless it covers all aspects of an IoT device:
Any IoT device has to deal with the following five components:
- Power consumption
We designed our chair to use a simple pressure sensitive resistance (Sensors) to detect if somebody (or somewhat like a heavy bag) sits on it. The communication should be established wirelessly (Connectivity). Since a lot of intelligent chairs may be needed, the technology for transmitting had to be at low cost. Furthermore we aimed at a most independent design for our chair. That’s why we chose to implement a mesh network using MySensors (mysensors.org). This is not only ideal from an independence viewpoint but also from a financial perspective (Costs). The necessary components are rather cheap and can operate on low power (Power Consumption). In our mesh network each node (intelligent chair) tries to reach a central gateway to send information about its state: occupied or empty (Logic). However, if the gateway is out of reach it can make use of a so called repeater node to forward its state to the gateway. Repeater nodes are regular nodes, essentially. The only difference is that repeater nodes must not go into sleep mode to safe energy. To integrate the intelligent chair into other components we built a simple backend application (IoT-Controller) which is used as a bridge from the wireless protocoll of MySensors to TCP/IP.
From a user interface point of view we wanted to demonstrate two aspects:
- Real-time information
- Analytical information
For the real-time information we simply built a SAP UI5 client application which reflects on the actual state of the chairs. However, at the time we built our intelligent chair there was no server websocket technology in SAP HANA available (luckily this changed with SPS11 of HANA XS). That’s why we added some websocket functionality to our IoT-Controller (using node.js). With this logic, the IoT-Controlle now also acts as simple websocket server.
For the analytical part we decided to use the IoT Service of HCP. Our IoT-Gateway updates the HCP IoT tables with every change of state. This facilitates a very simple reporting with the HCP toolset. In our demo case we built a simple Fiori-based application which showed some long time reports of the data collected.
The overall architecture of all involved components looks like this:
From a technical viewpoint we used the following components to build the system:
- Force sensing resistor (FSR): Interlink Electronics 400 series
- Logic Board: DevDuino v2 (ATmega 328, Arduino compatible)
- Communication: nRF24L01 module (part of DevDuino)
- Battery powered (part of DevDuino)
- Gateway: Arduino Uno R3 with nRF24L01 module and Ethernet Shield
- IoT Controller: Raspberry PI with WiFi extension
This concludes Part 1 of this blog series. If further elaboration is of interest, we are happy to proceed this series with the specific implementation details. Please let us know if this is of any interest.