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 BridgeThe 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 SketchI 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 NodeJSFor 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 GatewayI use Node Red To sort the data and trigger the automatic control. I used Javascript Code to parse data and trigger the pump. When a flow of less than 5 Liters/minute is detected, the pump is triggered. A delay preset delay is used to control the duration of the pump and is turned off after 2 seconds.
The system can be manually controlled as well using buttons on the local dashboard.
5. Initial StateThe 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.
VideoHere is a small explanation and demo video of the code as well as every individual module.
Comments