Originally written by RS Components
This project, developed by Opiron Electronics, has the scope to make a basic control system with an interface that will enable to activate an HVAC system remotely with the Ardbox Relay PLC and the Touchberry Pi HMI from IndustrialShields.
HVAC systems usually have an available contactor for relay connection. Connecting the relay to an Ardbox Relay PLC, and the PLC to the Touchberry Pi, allows to control climate conditions remotely.
The two devices are connected via the I2C communication. The main advantage of this protocol is the flexibility; it allows to easily connecting up to 128 slaves to the Touchberry Pi.
Code is provide by myscadatechnologies; it is open source available to be tested on Raspberry Pi (which is Touchberry Pi processor). From the communication point of view, I2C needs one Master. The other device will be the slave. The Ardbox PLC Relay will be the slave and the Touchberry Pi the master.
Ardbox PLC code (ArduinO IDE)
Anable the I2C module on the PI.
As root edit /etc/modprobe.d/raspi-blacklist.conf and comment out the line blacklisting i2c-bcm2708
$ cat /etc/modprobe.d/raspi-blacklist.conf # blacklist spi and i2c by default (many users don't need them) blacklist spi-bcm2708 #blacklist i2c-bcm2708
Add i2c-dev to the /etc/modules file so it’s loaded on boot:
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with"#"are ignored. # Parameters can be specified after the module name. snd-bcm2835ipv6 i2c-dev
$ sudo apt-get install i2c-tools $ sudo adduser pi i2c
Reboot the Touchberry Pi.
Key Benefits of the Opirion solution:
Scalable system: ThIs system allows to connect multiple devices to the Touchberry Pi
Open Sourcebased: This feature means big flexibility, big availability of resources on the internet in case of failures or change implementations, etc.
Remote control: Control climate conditions through an HMI panel
Know more about Ardbox and M-DUINO PLCs
Know more about Touchberry PI panel PC
Not sure about using Arduino and Raspberry PI based hardware in the industrial enviroments? read this post