SiloSimulator

Silo Simulator is an arduino-based simulator of the Silo used in the Liqueur Plant case study.

Real Silo

The mechanical silo that has been simulated is shown in Fig. 1. It is composed of the following parts:

    • an input valve IN
    • an output valve OUT
    • a sensor E for the lower level
    • a sensor F for the upper level
    • a resistance R to heat the liquid
    • a sensor T to monitor the temperature
    • a mixer Mi to mix the content of the silo

Fig.1. Silo No 4 of the Liqueur Plant case study

The Silo is filled and emptied with liquid through the IN and OUT valves. The liquid can be heated and mixed.

Silo Simulator

A hardware-software silo simulator has been developed in the context of the UML4IoT project to demonstrate the applicability of the UML4IoT approach in the industrial automation domain. The simulator has been used to develop a prototype of the myLiqueur production system.

A thermometer (Maxim DS18B20) is integrated for the user to change the actual measured temperature by heating it but there is also the option to simulate the temperature’s changes depending on heater’s and valves’ state.

As shown in fig. 2 the following indicators are used:

    • 8 seg-display, 2 digits: for liquid temperature.
    • 1 Led bargraph : for liquid level.
    • 2 leds for the status (on/off) of InValve and outValve
    • 2 leds for the status of silo (full, empty)
    • 1 led for Heater status
    • 1 led for Mixer status
    • 1 buzzer for Mixer status

Fig. 2. Silo Simulator electronic card (side 1).

The simulator is connected to its controller card with I/O pins with Logic 0 = 0v and Logic 1 = 3 .3v.

The silo simulator is designed to interface directly with raspberry pi (and any 3.3V logic controller) with digital I/O ’s and a serial connection. A voltage translator/level shifter has been developed to interface the simulator with Bosch XDK.

For I/O pins documentation see Fig.3.

Fig. 3. Silo Simulator electronic card (side 2).


Additionally for pins 4 and 9:

A) Pin 4 (DS18B20 DQ) is connected to the DQ pin of the DS18B20 when TIM 2 has been selected.

TIM1 and TIM2 are the two alternative modes to connect the controller to the thermometer.

Mode 1 (TIM1 - Thermometer Interfacing Mode 1): The connection is through the serial connector.

Mode 2 (TIM2 - Thermometer Interfacing Mode 2): The connection is accessed directly through the I/O pin 4.

Select the mode based on the following table.

B) Pin 9 (TX) is active when TIM1 has been selected.

When the temperature changes the following string is transmitted on TX

«Τ=xx» (xx temperature value) Followed by the Ascii character LF (0xA).

The same information is available through the serial2-usb interface.

The following parameters are used for the serial connection

Baud rate: 9600bps, Data bits: 8, Parity :None, Stop bits: 1, Handshaking: None.

Embedded Microcontroller

The logic of the Simulator is implemented using an Arduino nano microcontroller.

The following two versions may also be used:

1. Arduino nano with ftdi serial2-usb

Last active version of the driver: 2.10.00

2. Arduino nano with ch340g serial2-usb

Driver: http://www.wch.cn/download/CH341SER_ZIP.html

For the embedded software of Arduino nano two versions are available as 2 git brunches (see https://github.com/halx4/SiloSimulator)

1. THERMOMETER SIMULATED VERSION

Thermometer is not used. Temperature changes are simulated based on the state of heater and valves IN and OUT valves.

2. THERMOMETER ENABLED VERSION

Thermometer is used.