Remote control of an HVAC system via Arduino based PLCFollow article
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.
Hardware and communication
- Ardbox Relay PLC: This is an 18 digital inputs / outputs Arduino based PLC that offers the possibility of communication between two computers using I2C.
- Touchberry PI 10.1″: The Touchberry Pi is a 10.1″ panel PC designed to work in industrial environments and based on the popular Raspberry Pi.
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.
Software and code
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)
Touchberry Pi configuration
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 you 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.