An Industruino customer asked us for help with implementing an industrial control system for disinfection of an air stream. We use the Industruino IND.I/O's digital outputs to control 3 relays (at Vin voltage), simulated in the above picture with 3 LEDs. The number of lights activated is determined by the analog reading of a velocity sensor (4-20mA), resulting in a level from 1 to 3, and a pathogen detector (0/5V) to override this. Also radiometer is read as analog input (4-20mA). The readings and calculated level are displayed on the Industruino LCD.
In the above picture, the analog readings (velocity, radiometer) are simulated by a potentiometer. The pathogen detection, an on/off signal at 0/5V also uses an analog input because the digital inputs require a Vin voltage to switch to high. The analog input channel is configured to read 0-10V so can easily detect the 5V high level.
The system also makes sure that each of the 3 sets of lights are used the same amount of time. The code keeps track of the runtime of each set of lights, and after a set interval switches to the least used set(s) of lights.
We also added a (internal ATmega hardware) watchdog timer to make sure the system does not get stuck.
All parameters displayed on the screen are also made available over Modbus TCP. We connected a standard Industruino Ethernet module to the IND.I/O, seen on the top right of above picture (without its DIN-rail casing). The Industruino is configured as the Modbus Slave, making registers available for reading by a Modbus Master. We simulated the Modbus Master with this tool
on a Windows laptop.
We use the MgsModbus library available here
. This library is easy to get working, just needs 2 points of attention:
- in MgsModbus.cpp: change ServerIp (line19) to IP of slave
- in MgsModbus.h: make sure line60 points to the Industruino version of the Ethernet library