The IoT 2020 is based on the Intel Galileo 2 and is a flexible IoT Gateway for makers and comes with industrial Certifications. In this projects I wanted to demonstrate the flexibility of the platform in an industrial application and hence selected a simple Boiler Controller.
I used a water pump as a fuel pump and use gravity to turn a flow sensor for a steam turbine. It is simple but effective.
To demonstrate the flexibility of the system I am using 4 programming languages on the same platform simultaneously.
1. TCP Socket server and Serial Bridge
The first part is the Pump controller which uses an arduino with a Modbus like TLV protocol. An FTDI is used at the USB interface and I have written a TCP to Serial bridge that translates commands on a TCP Socket to serial or Modbus commands.
The code is written using the SDK provided by Siemens and is executed on the IoT2020 natively.
I tested it out using a python script that ALSO runs on the IoT2020 itself.
2. Arduino Sketch
I use a RGB Color LCD driven by an Arduino sketch using libraries provided by the manufacturer. This is simple and runs in parallel with the rest of the code.
3. MQTT and NodeJS
For remote sensors, I used an Arduino UNO with an ethernet shield to send data to an MQTT broker. Mosquitto runs on the Iot2020 and relays messages to a NodeJS service. Later I move the NodeJS service to Node Red but the Arduino sends data over the local network on a single topic.
This data contains temperature data from an LM35 as well as a flow sensor.
4. Node Red Gateway
The system can be manually controlled as well using buttons on the local dashboard.
5. Initial State
The data is transmitted online for a dashboard. The data is pushed via curl commands as POST requests and is updated once every seconds. This can be changed in Node Red if required.
Here is a small explanation and demo video of the code as well as every individual module.