Browsed by
Category: General

Control of soil humidity in an irrigation installation

Control of soil humidity in an irrigation installation

This newsletter is really interesting because control soil humidity in irrigation installations makes saving water, time and money.  Continue reading… sch0   Hardware

Hardware selection is very important when you try to develop projects where sensors, actuators and PLC´s must talk each other. For this project, with chosen the following equipment:

  • PLC: Any PLC from IndustrialShields is a good option. We have chosen the M-Duino PLC Arduino 21 I/Os Analog/Digital because we think it has different communication options to be communicated with other systems (Ethernet, RS232, I2C…).
  • Panel PC: For this project, we are going to visualize and control our installation with the HummTouch 10.1” Linux panel pc.
  • Humidity sensor: Probably, when you try to develop an application like we are trying to, the most important selection is the sensor itself. There are a lot of humidity sensors available around the market completely compatible with Arduino based hardware. We´ve chosen the SHT10 sensor from Adafruit because it includes a temperature sensor as well, it comes with an intermetal mesh encasing, which is weatherproof and because it is designed to be submersible in water.
  •  Others: A relay to activate the irrigation system, a 24Vdc power supply, a good enclosure to protect the equipment and cables are important things to keep in mind too.

Software

To develop the project, the first thing to do is to ensure that we have the proper software and libraries. As we are going to use the SHT10 sensor, we will use the SHT1x library that you can download in the following link: https://github.com/practicalarduino/SHT1x. SHT10 uses a two wire communication interface similar to I2C. As usual, we will use the Arduino IDE to develop the software. You can download it here: http://www.arduino.cc/en/Main/Software. You can see the code in the following file: 2014111_arduino_code   Key benefits   There are a lot of benefits to implement a humidity control in an irrigation system. Let´s see the most important:

  • Saves Time: Automation does the job for you, so you can go on holidays knowing that your flowers will be maintained when you come back.
  •  Saves Money: No more water wasted, automation guarantees efficiency: water is used when is needed.
  •  Improves Growth: An irrigiation system guarantees flowers waterd with proper amount of water. In a reasonable time, you will have a greener garden.

  Contact us!

Do you have a process to be automated? Contact Industrialshields to buy the proper hardware and Opiron to implement the entire solution.

How to read an Analog Input

How to read an Analog Input

You can read the data of an Analog Input through:

...
int myAnalog;
...
void setup() {}

void loop() {
   myAnalog = analogRead(A0);
}

With this piece of code you’ll read the voltage of a sensor. As our analog input works between 0-10V, the read value (myAnalog) will be a value between 0-1023.

If the value of sensor is (3V), myAnalog value is 3*1023/10 = 307.

How to test / read data from console / RS232

How to test / read data from console / RS232

RS232 commnication is not necessary, but is very useful. You can write some code and you want to switch on a led. The easier way to know what is happening if the led isn’t turning on, is through RS232, and watching what are the values of the vars,…
 
So, if you have purchased an Ardbox, you’ll need to initialize communications through:

  Serial.begin(9600);
  while (!Serial) {}  

and after that, you’ll be able to send any value to the RS232 port, in order to show it, through the Arduino IDE console, minicom,…, or any other Serial Console that you have in your Laptop.

  Serial.println("MyVar value");

If you have an M-Duino, you don’t need the

  while (!Serial) {}  

line.

How to Modbus-Ethernet

How to Modbus-Ethernet

  • Modbus is a Serial communications protocol and it is used for communicating with several industrial devices. It may run over RS485, Ethernet, or whatever hardware interface.
  • If we have an ethernet connection between a lot of devices, we can use this hardware connection (eth), and over it, we can use our own protocol (custom protocol,…), or for instance, Modbus protocol. The way is the same as using RS485, but hardware connections will become much easier, the speed will be higher, and the possible frame errors will be controlled by TCP/IP layers.
  • So, if you know Modbus, you have an easier way to implement it!.
HVAC System activated through an SCADA

HVAC System activated through an SCADA

Introduction

As a continuation of the Air-conditioning system post, in today´s newsletter Opiron suggests to expand the HVAC system controlled through the Touchberry Pi Panel PC and Ardbox Relay from IndustrialShields. As the last post, the suggested SCADA that will run on the Touchberry Pi is the following: myscadatechnologies.com PanelPcSummarizing the previous post, we designed a system that was able to activate the air conditioning with a relay. In order to expand the system, we will include the following sensors to have a complete automatic HVAC system:

  • Inside temperature.
  • Outside temperature.
  • PID development in order to control the inside temperature (the relay will be controlled by the PID loop).

Additionally, the air conditioning system will be integrated into a complete home automation solution where the Scada will give us access to a light system control, open and close windows, and security cameras. Software and code: Inputs and outputs definition

What are inputs and outputs from the coding point of view? As inputs we will consider the inside and outside temperature. As output, the relay that activates the air conditioning that we already programmed in the last post. As mentioned in the last post, the SCADA is owned by myscadatechnologies.com. Its main advantages are that is Open Source based, and very easy to be used. We will use I2C to communicate the SCADA and the Ardbox PLC. The code to be uploaded is the next one: 2014111_arduino_code SCADA design: Control Screen

Once we have already defined PLC programming, it is time to define the screen we will make the interaction between man and machine (HMI). Designing SCADAs really forces us to simplify and decide what’s most important- what needs to stay on the screen. As we want to implement an easy to use temperature control screen, we will show a thermometer with the actual temperature inside, and 4 big windows to see the basic features of the system. The first window with the temperatures inside and outside, at right, the system status window to have an easy access to alarms and other parameters, and below the temperature PID´s,  one for the day and the other one for the night. At the left of the screen we will have a menu to access to the other parts of the system (lighting, temperatures, windows, cameras and service). image12 Key Benefits

The main benefits of the this suggested solution are:

  • Automatic temperature regulation: The relay is now controlled by the PID!
  • Scalable system: The purposed system permits to connect multiple devices to the Touchberry Pi.
  • Open Source based: 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.
Contact us!

Do you have a process to be automated? Contact Industrialshields to buy the proper hardware and Opiron to implement the entire solution.

Developing a packaging machine based on Arduino hardware

Developing a packaging machine based on Arduino hardware

Abstract

Packaging machines are used to enclose and protect products for distribution, sale, and use. They are very popular in industry because they are safe, reliable, and usually integrated into the process line. They guarantee a big productivity.

In this project, Opiron Electronics will develop a basic packaging machine based on the Open Source Hardware PLC´s from IndustrialShields. Ardbox RelaySystem

Our packaging machine will have three basic control functions: HMI( the Human Machine Interface), PLC (the logic part of the control), and the Motion Control functionality. The main idea of the Project is to develop a reliable and flexible machine. We will make use of an Ardbox Relay as the main processor of the system, but, as packaging machines need to be integrated into more complex systems, as we saw in the Feeding a packaging machine with a frequency driver  post,  we will make use of an M-Duino PLC, which has Ethernet connectivity which can send data to an SCADA. The detailed hardware can be found at IndustrialShields the website.

packaging_machine_industrial_shields

 

Hardware and Operation

In this newsletter we are going to show just a part of the packing machine. This is a feeder and the lifter. The feeder consists of a piston, when a product is in front of the feeder, the feeder moves forward and the lifter downs a level. When the lifter is at the lower level, the entire product can be sent to the packaging part. PLC Programming Packing Machine_industrial_shields   The hardware components will be:

  1. Five mechanical switches (Reverse, forward, upper switch, middle switch and lower switch).
  2. 4 relays which are based in Arduino. 2 of them for the feeder (forward and reverse movement) and 2 more for the lifter (up and down movement).

Software and coding

As described above, the system works in six steps. Furthermore, the code has an additional but interesting feature: the capability to receive commands from another PLC (M-Duino), if an operator wants to stop the process remotely. Download the Arduino source code in the link below:   2014111_arduino_code    

Key benefits

  • Remotely control from another PLC capability.
  • Open Source hardware based, which it means reliable, cheap and expandable.
  • Easy to be installed.
Arduino PLC use: Greenhouse microclimate control with Ardbox Open source hardware

Arduino PLC use: Greenhouse microclimate control with Ardbox Open source hardware

Abstract

The main objective of greenhouses has always been to achieve an optimal growing environment. Greenhouses apply microclimate control, usually with microcontrollers or PLCs. Due to its advantages, in recent years, many farmers have begun installing devices that allow automation of windows, sensing climate conditions as luminosity or temperature. In this post Opiron will make a simple automation project to optimize the production of a greenhouse using an Arduino based PLC: the Ardbox PLC from IndustrialShields.  

Hardware

Our system will do the control inside the greenhouse of soil moisture and air temperature, and it will activate the irrigation system and open / close windows depending on the climate conditions. The hardware used will be:

  1. Soil Moisture Sensor:  The sensor includes a humidity / temperature sensor module.
  2. Ardbox PLC from IndustrialShields. (SEE PRICES).
  3. A pump plus a driver (the driver will be used to provide enough current for the pump).
  4. A relay to activate the pump.
  5. A servo to open windows.   The main objective of our system will be to maintain a microclimate at optimal level.

    control1 Software and code

From the software point of view, the key points of the code are the humidity and temperature thresholds defined:

  • Irrigation system: The moisture sensor detects the humidity in the ground all the time. When the measured value is below the minimal, the irrigation system is activated.
  • Air ventilation: The temperature sensor detects the temperature inside the greenhouse. Assuming that the external temperature is below the internal temperature, we will open and close the windows depending on the minimal and maximal threshold temperature defined.

Furthermore, greenhouse ventilation will help to control CO2 levels. We will have to install, additionally the Arduino ide, the library for the soil moisture sensor that you can download here. You can download the code in the following link: 2014111_arduino_code Going Further and key benefits

A Green house is a complex system where a lot of automation can be developed. For instance, relative humidity, light or CO2 are other typical vairables to be measured. Of course, not only inside conditions can be measured, so outside conditions too (solar radiation, wind speed, wind direction and rainfall rate). The key benefits of the developed system are:

  1. Optimal production conditions significantly increased.
  2. Efficient and cheap solution.
  3. Open source based, which means a system easy to maintain which allows customizability.
  4. Easy to expand, so you can easily add CO2 sensors, wind detectors, etc.
Contact us!

Do you have a process to be automated? Contact Industrialshields to buy the proper hardware and Opiron to implement the entire solution.