Proyecto HVAC de hardware de código abierto

Soluciones de Automatización: Sistema de Aire Acondicionado
4 de julio de 2019 por
Proyecto HVAC de hardware de código abierto
ADMIN

Abstract

Los sistemas HVAC suelen tener un contratista disponible que nos permitirá conectar un relé. Conectando el relé a un Ardbox Relay industrial PLC, y el PLC Arduino industrial Touchberry Pi, podremos controlar las condiciones climáticas de forma remota. En este proyecto, Opiron Electronics proposes to make a basic control system with an interface that will enable us to activate the HVAC system remotely with the Ardbox Relay PLC and the Touchberry Pi HMI, both from Industrial Shields. The purposed SCADA that will run on the Touchberry Pi is an open source automation software  which you can find in the following link: http://www.myscadatechnologies.com/

Automatización Industrial 

  • Instalaciones de seguimiento y control.
  • Mide y adquiere toda la información disponible.
  • Controla la humedad, la temperatura y otros valores importantes utilizando un PLC Arduino.

Hardware and communication

We are going to use:

  • An Ardbox Relay PLC: Se trata de un PLC Arduino de 18 entradas / salidas digitales que ofrece la posibilidad de comunicación entre dos ordenadores mediante I2C. 
  • A Touchberry PI 10.1″: Touchberry Pi es un panel PC de 10.1″ diseñado para funcionar en entornos industriales y basada en la popular Raspberry Pi. 

Para comunicar ambos dispositivos, haremos uso de la comunicación I2C. La principal ventaja de utilizar este protocolo es su flexibilidad, ya que puede conectar fácilmente hasta 128 salves al Touchberry Pi. Consulta a continuación la explicación del Software para obtener más detalles sobre cómo hacerlo.

Air-conditioner-room2

Software and code

AComo se ha mencionado anteriormente, el SCADA propuesto es propiedad de myscadatechnologies. Elegimos este SCADA porque es un software de código abierto, disponible para ser descargado y probado en Raspberry Pi, que está basado en el procesador Touchberry Pi. Desde el punto de vista de la comunicación, I2C necesita un master. El otro dispositivo será el slave. TheEl PLC industrial Ardbox Relay será el slave y el Touchberry Pi el master. En cuanto al Ardbox Relay, el código a cargar es el siguiente:

2014111 Código Arduino

Cuando el comando recibido del SCADA está activado, activaremos el relé. En cuanto al software Touchberry Pi a desarrollar, básicamente, además de instalar el SCADA en nuestro Touchberry Pi, tenemos que configurarlo como maestro en la red desarrollada I2C, pero antes necesitamos habilitar el módulo I2C en el PI.

Como root edit /etc/modprobe.d/raspi-blacklist.conf y comenta la línea que pone en la lista negra 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

A continuación, agrega i2c-dev al archivo /etc/modules para que se cargue en el 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-bcm2835 ipv6 i2c-dev

Finalmente, instala i2c-tools:

  	$ sudo apt-get install i2c-tools $ sudo adduser pi i2c

Por último, reinicia el Touchberry Pi.


Key Benefits

The main benefits of the Operon proposed solution are:

  • Scalable system: The purposed system permits the connection of multiple devices to the Touchberry Pi.
  • Open Source automation software: This feature means big flexibility, big availability of resources on the internet in case of failures or changes implementations, etc. 
  • Remote control: Control climate conditions through an HMI panel.
// Industrial Shields by BOOT & WORK CORP. // Powered by Opiron Electronics -www.opiron.com- // Feb.2015 technical information for newsletter // The sketch demonstrates how to control a relay // with Ardbox Relay PLC and a Toucbberry Pi. // Keywords: Ardbox Relay PLC, Touchberry Pi. ////////////////////////////// //// PLC: ARDBOX RELAY PLC //// //// Number of inputs: 0 //// Number of outputs: 1 //// you need to configurate the correctly switch position for running like digital / analog or PWM mode ////////////////////////////// //// EXTERNAL BOX PIN NUMBERS: //// LEFT SIDE (Where Input Voltage lives). //// Pin 4 (RELAY 1) => (Box Pins: 0 and 1) //// Pin 5 (RELAY 2) => (Box Pins: 2 and 3) //// Pin 6 (RELAY 3) => (Box Pins: 4 and 5) //// Pin 7 (RELAY 4) => (Box Pins: 6 and 7) //// Pin 8 (RELAY 5) => (Box Pins: 8 and 9) //// Pin 9 (RELAY 6) => (Box Pins: 10 and 11) //// Pin 10 (RELAY 7) => (Box Pins: 12 and 13) //// RIGHT SIDE (The other side). //// Pin 11 (RELAY 8) => (Box Pins: 0 and A) //// //// Pin 13 => (Box Pin 1 Arduino Digital => 5Vdc output if pinMode(13,OUTPUT)) //// OR //// (Box Pin 1 Arduino Digital => 5Vdc input if pinMode(13,INPUT)) //// //// Box Pin 2 (GND) //// Box Pin 3 (GND) //// //// Pin 3 => (Box Pin 4) //// Pin 2 => (Box Pin 5) //// //// Pin A0 => (Box Pin 6) //// Pin A1 => (Box Pin 7) //// Pin A2 => (Box Pin 8) //// Pin A3 => (Box Pin 9) //// Pin A4 => (Box Pin 10) //// Pin A5 => (Box Pin 11) //// //// Analog pins 0 to 5. Put the jumper ON in case of digitalRead (24Vdc) otherwise analogRead (10Vdc) //// //Libraries #include //Library for I2C Master & Slave //Pins defintion #define Relay 4 // Relay //I2C Address for the Ardbox Relay PLC #define SLAVE_ADDRESS 0x04 // Variables int number = 0; // Functions void receiveData(int byteCount); void setup() { pinMode(Relay, OUTPUT); Serial.begin(9600); // start serial for output // initialize i2c as slave Wire.begin(SLAVE_ADDRESS); // define callbacks for i2c communication Wire.onReceive(receiveData); Serial.println(“Ready!”); } void loop() { //Nothing } // I2C Slave communication void receiveData(int byteCount){ while(Wire.available()) { number = Wire.read(); if (number == 1) { digitalWrite(Relay, HIGH); // Switch on the Relay } else if (number == 0) { digitalWrite(Relay, LOW); // Switch off the Relay } } }

POWERED BY OPIRON ELECTRONICS

Buscar en nuestro blog

Proyecto HVAC de hardware de código abierto
ADMIN 4 de julio de 2019
Compartir

¿Estás buscando tu Controlador Lógico Programable ideal?

Echa un vistazo a esta comparativa de producto de varios controladores industriales basados en Arduino.

Comparamos entradas, salidas, comunicaciones y otras especificaciones con las de los equipos de otras marcas destacadas.


Industrial PLC comparison >>>