Browsed by
Category: Projects

Ardbox: Water treatment plant – Control tank level

Ardbox: Water treatment plant – Control tank level

This posts presents an application developed with Industrial Shields Ardbox Relay 7.0. In the facilities of a water treatment plant, retrofitting of the existing automated system was required.

The control system is responsible to maintain the tank level of water within defined limits. The level can be forced to increase/decrease operating  an available outflow pump.

Industrial Shields Ardbox Relay was adopted as the central unit of the control system and it has been running flawlessly for several months, providing a flexible, customizable and pricewise solution.

Some of the components integrating the whole system are:

CapturaWaterTreatmentSystem_03

(1) /(3) Light tower beacon

The main function of the tower beacon is to visually alert if the level alarmis triggered. Code example.

(2) Pump

Some of the  software structures and fucntions required for the operation of the pump are:

Encoder

Timer examples and ISTimer library

Control of stepper motor

Captura2

Contact us at industrialshields@industrialshields.com if you have any questions or  want more information of the application.

Solar Monitoring System with Ardbox

Solar Monitoring System with Ardbox

Solar panels are popular because they are able to give us energy from light. When the light hits the panel solar conductor, the energy is translated into moving and electrons, creating current. In this newsletter we´ll make a simple monitoring system that you can develop for your home with Open Source Hardware.

Hardware

Hardware selection depend a lot of your solar panel and its specs (output voltage, power). For this project, we will consider that we have a 5.2 kW solar panel which provides between 0-10V. The required hardware for the project is:

  1. Ardbox PLC.
  2. A Panel PC.
  3. Allegro ACS712: ACS712 chip allows DC and AC current measurement.  The value read from the sensor is proportional to current measured on the sensing terminals. Datasheet can be downloaded here.
  4. A Solar panel! We will use this one from Sparkfun.
  5. A Solar Inverter, which converts the variable direct current (DC) output of a photovoltaic (PV) solar panel into a utility frequency alternating current (AC).
  6. Wires and resistors (for the voltage divider).

On the other hand, to measure Voltage we will use a voltage divider circuit. As the ARDUINO analog pin input voltage is restricted to 5, the output voltage must be less than 5V. See the schematic: Sch   Software and code

Basically, the code measures each 5 seconds current and voltage, and, with these values, calculates the power. Later, sends these three values to the Panel PC.Regarding the voltage measure, Arduino ADC converts Analog signal to corresponding digital approximation.Regarding the current measure, we consider the following points to take into account:

  1. Analog read produces a value of 0-1023, equating to 0v to 5
  2. In our case, Analog read 1 = (5/1024) V =4.89mv, Value = (4.89*Analog Read value)/1000
  3. But as per data sheets offset is 2.5V (When current zero you will get 2.5V from the sensor’s output).

You can download the code in the following link: 2014111_arduino_code   Going Further and key benefits Solar panels come in many varieties. When shopping a solar panel for your system, there are a few specifications you need to follow. Contact us! Do you have a process to be automated? Contact Industrialshields to buy the proper hardware and Opiron to implement the entire solution.

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.

Controller for your installation based on Open Source hardware

Controller for your installation based on Open Source hardware

Leaders from different companies usually agree in Water will be the oil of this century. Today, as populations increase and water supplies are stretched, we are developing more and more systems to make water at a low cost. We are going to develop a basic water treatment system based on Arduino. The water contained in the tank will be used for an irrigation system.

Equipment to be used Water treatment system consists basically of the following elements:

  • An M-Duino PLC: This controller is the heart of the system. It controls the display, generates interrupts, and controls the communication.

·        A Panel PC: Used to read and display the status of the system over the Panel Pc.

  • Turbidimeter: Water clarity is measured in nephelometric turbidity units (NTU). This measurement indicates the level of dirt particles within the water.
  • Ph Analyzer: pH is an indicator of the acid or alkaline condition ofwater. The pH scale ranges from 0-14; 7 indicates the neutral point
  • Level Sensor: The level sensor will indicate us the remaining level of water in the reservoir.

sch   Software and code In this example we will define some threshold alarms:

  • If the level in the water reservoir is less than 120 l, we will send an alarm.
  • If the turbiditmeter returns a value higher than 0.8 NTU, we will send an alarm.
  • Since the normal pH range for irrigationwater is from 6.5 to 8.4, we will send alarms whenever the value is out of the indicated range.

The PLC monitors all the time if an alarm occurs, and in that case, sends the boolean alarm of  each monitored variable: Level / Turbidity / PH to the Panel PC, where we will send print it in the screen. As in other newsletters, we use the Panel PC to read the status of the system efficiently. You can find the code to be uploaded here: 2014111_arduino_code   Key Benefits The main benefits of the Opiron purposed solution are:

  • Flexibility: This application note describes how the IndustrialShields hardware can be used to make an efficient water treatment system.
  • Freedom to modify your software: You aren’t limited to what one company believes you need.
  • East to be integrated: No matter if you already have an automation system. The Arduino hardware is easy to integrate into your system.
Contact us!

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

Labeling machine automation with M-Duino PLC

Labeling machine automation with M-Duino PLC

We will make the automation of a labeling machine based on the M-Duino PLC from Industrialshields. The labeling machine will label bottles of a plant.

 

Hardware I: Equipment to be used Basically, the labeling machine system consists of:

  • An M-Duino PLC: This controller is the heart of the system. It controls the display, generates interrupts, and controls the communication.
  • A Panel PC: Used to read and display the status of the system over the Panel Pc.
  • A detection Sensor:  We will make use of optical fork sensors based on infrared (non visible) light sources because they are easy to be programmed and they allow us a manual adjustment to the sensitivity via potentiometer.     
  • A motor: The motor is used to fix a constant speed in the conveyor belt. –
  • A relay: Used to activate the labeling piston.

sch Hardware II:  System   Regarding the system, in this section we will explain the interface between the M-Duino PLC and the other elements:

  • We have one detection sensor that we will program it as a Digital Input. Each time a bottle is placed in fornt of the detector, the conveyor belt will stop and wait for label the bottle.
  • The PLC will control the motion of the conveyor belt activating a motor through a relay. This will be programmed as a Digital Output.
  • The PLC will control too the labeling piston. This system will be activated through a relay too, and therefore, programmed as a Digital Output too.
  • As we made in other newsletters, the communication between Panel PC and the M-Duino will be made with I2C.

Furthermore, the system will be able to be stopped through the Panel PC. Let´s see a picture of the system to be automated:   foto       Software and code As we explained before, the system has a Panel PC which will allow us to visualize the system status (not implemented in this code) and stop the system whenever we need. The communication between the PLC and the Panel PC will be with I2C, so we will use the Wire library (you can get more information about the library here). The system will have 3 states:

  1. STOP: When the command is received from the Panel PC. This state will enable us to make maintenance activities on the system and other related tasks.
  2. Running and Bottle detected: When a bottle is detected, the system will stop the motor and activate the labeling piston.
  3. Running: This state activates the motor.

As in other newsletters, we recommend using Tesla Scada, which is able to work on Android systems. You can download the code here: 2014111_arduino_code     Key Benefits The main benefits of the Opiron purposed solution are:

  • Open Hardware: Which reliable, cheap and expandable
  • Real time measurement: Panel PC enable users to visualize the system status and stop it easy.
  • Easy to be integrated: If you plant has already installed an automation system, M-Duino can be integrated using Ethernet.
Contact us!
Do you have a process to be automated? Contact Opiron to implement the entire solution and Industrialshields to buy the proper hardware.

 

Real time electrical consumption monitoring with M-Duino

Real time electrical consumption monitoring with M-Duino

In this Project, we will show you how to read electrical consumption using Modbus communication. Modbus is an industry standard communications protocol for electronic device Hardware I: Equipment to be used The electrical consumption monitoring system consists of:

  • An M-Duino PLC: This controller is the heart of the system. It controls the display, generates interrupts, and controls the communication.

  • A Panel PC: Used to read on the status of a counter and display the graph of monthly consumption over the Panel Pc. –         Switch: Switch will work as the interface between slaves and Master in our control network.

PanelPc

  • A Power Meter witch Modbus TCP/IP communication capabilities (as TCP is Transmission Control Protocol and IP is Internet Protocol.)
  • Wires and some programming experience J.

Hardware II:  Communication The nice feature of Panel PC we used is that it has many interfaces such as Ethernet, USB  and I²C as well. We´ve expressly chosen Ethernet because our PLC  and our I2C panel have this Ethernet connecitivity. See the following picture to understand it: sch2   Software and code Arduino sketch essentially uses the Modbus TCP library for Arduino  (see the Arduino installer tutorial here).  Some important things to take care when we use this library:

  1. Insert the modbus_update function in the loop, because. takes care of the received modbus commands and will modify the registers accordingly in case of writing or reading requests.
  2. Declare an integer array (named holdingRegs) that stores the modbus registers.
  3. We recommend to review modbus tcp basics at http://www.simplymodbus.ca/

After that, just start sending values to the panel PC through USB  I2C communication. You can find the code to be uploaded to the PLC here: 2014111_arduino_code   You need to download  libraries:

And what about the software to install in our Panel PC to start visualizing graphs? In this case, we recommend to use Tesla Scada, wich is able to work on Android systems . The panel pc will start receiving data and print out data in graphs! Key Benefits The main benefits of the Opiron purposed solution are:

  • Time Saving: Forget to go to view and write values in notebooks, your control system will do this job for you.
  • Real time measurement: System provides reliable data quickly.
  • Digital data analysis: If you can measure it, you can improve it!
Contact us!
Do you have a process to be automated? Contact Opiron to implement the entire solution and Industrialshields to buy the proper hardware.
Ardbox PLC Arduino based and VFD (inverter) with USB communication

Ardbox PLC Arduino based and VFD (inverter) with USB communication

Abstract

Variable Frequency Drivers (usually known as VFD´s), are very popular in industry because they can adjust torque and speed of AC motors by varying motor input frequency and voltage. The setpoint can be sent from a PLC and, therefore, from a computer, so this is what we are going to show you in this newsletter: how to send a setpoint to a VFD using a computer connected to an Ardbox PLC from Industrialshields.  Freq Ardbox 1 Hardware and considerations

Before starting the job, we will consider these points:

  • The VFD has an analog input where we can send the setpoint. Therefore, the communication between the VFD and the PLC will be 4-20 mA.
  • The Arduino programming environment has a built in serial reader and writer that makes it easier to debug and develop your Arduino code. This point is important taking into account that we will use the

Software and code

To communicate our Ardbox PLC with our computer we will use Serial communication. Serial communication just means that only one bit of information is sent a time. Most computers don’t have serial ports, but use a USB-to-serial driver to send and receive serial communication over USB So basically, inside loop(), we will check if any serial data has arrived with Serial.available(). If data has arrived and is available, store that data in a variable called setpoint, which we will use to send it to the VFD as an analog output. You can download the code here: 2014111_arduino_code Key Benefits

The main benefits of the Opiron purposed solution are:

  • Easy: Easy is the first word that comes to our mind when we think in this application. Easy to install, easy to program, easy to send commands to the VFD!
  • Open Source: Because open source means flexibility in terms of freedom to modify and integrate your system into more complex systems, and reliability.
  • Useful: This project is useful because VFD´s are everywhere. See an example of VFD´s application in our blog.
Contact us!

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

IoT in industry improves reliability equipment. Arduino as PLC application.

IoT in industry improves reliability equipment. Arduino as PLC application.

Abstract

IoT and Plc MDuino

Nowadays, manufacturers need keeping factories running 24×7, and, in order to ensure it, the equipment must be reliable because a failure can cost millions of euros and impact the ability to ship product to customers.   How can IoT help you to increase equipment and minimize unplanned factory downtime? The answer is monitoring factory equipment, quickly, providing maintenance engineers with detailed error message in real time. In this newsletter we will show you an example of how IoT can help in industry.

Project, Hardware and Architecture  

In this project, Opiron Electronics  connect an M-Duino PLC from IndustrialShields to the Xively IoT platform.  This example is going to show you an online monitoring feature for a Factory process, which will enable to maintenance engineers and operators to visualize factory data using Internet, so they´ll can access using smartphones or tablets.  For this reason, we are not going to implement a full automation solution because it is not the scope of this newsletter. Since the hardware point of view, the architecture that we will implement will be as the following picture shows:

Picture Architecture


First steps

First of all, make sure you have a Xively account. If you don’t already have one, you can register for a free account here.  Secondly, select the data you want to visualize. IoT is not going to substitute SCADA systems; you have to think it as an extension, so select the critical data that you would have in the cloud. In our example we will use a temperature.


Software and code

As usual, we will use the Arduino IDE to program our PLC. Furthermore, for this project we will use the Xively library for Arduino which you can download here. You will need the http client library as well, available here. The sketch will upload a datastream to the Xively platform. Xively generates graphs based on data you provide, but you can create triggers and notifications to provide alert capabilities for your application. Regarding the M-Duino PLC code, it can be downloaded here:

2014111_arduino_codeKey Benefits

The main benefits of the Opiron proposed solution are:

  • Online monitoring can reduce maintenance costs and downtime.
  • Connected: Maintenance engineers can keep connected to equipment and process, which means faster repair times and a reliability improvement.
  • Open Source based: Since the hardware and software point of view, this feature means big flexibility, big availability of resources on the internet in case of failures or change implementations, etc.
img_home
Industrial Shields harware

Contact us! Do you have a process to be automated? Contact Industrialshields to buy the right open source scalable hardware and to implement the entire solution.

Chloride Dosing System

Chloride Dosing System

Abstract

Manufacturing drinking water is a process with different steps. The last step is called disinfection, used to destroy microorganisms in water. To achieve it, systems inject chlorine. This technique is called dosing. Dosing is the technique for controlling the addition of a substance to a flowing liquid or gas.  Dosing systems are designed to achieve the required dosing level by maintaining the control signal as a proportion of the fluid flow rate. In this post we are going to develop a chloride dosing system based on Arduino.

Equipment to be used

Dosing control equipment consists basically of the following elements:

  • A controller, in this case we will use an M-Duino PLC.
  • A flowmeter.
  • A dosing pump.
  • A dosing level sensor.nanodac-dosingcontrol

The following figure shows the general arrangement of the dosing control system: The dosing concentration measured by the dosing level sensor is used to stop the pump if a there is high concentration in the tank. The flowmeter provides the input of the control loop, which is connected to the pump (as the output).

Software and code

In this example, dosing level and flowmeter are configured as a 0-10V analog input. The pump works with a frequency driver. As we have to develop a control loop, we have created a PID controller linked to the specified input, output and setpoint. You can find the code to be uploaded here:2014111_arduino_codeKey Benefits

The main benefits of the Opiron – Industrial shields proposed solution are:

  • Flexibility: This application note describes how the Open source based hardware can be used to control the dosing level of a chlorine system. However this same architecture can be used with any liquid or gas using the PID algorithm.
  • Freedom to modify your software: You aren’t limited to what one company believes you need.
  • Easy to be integrated: No matter if you already have an automation system. The Arduino hardware is easy to integrate into your system..
Contact us!

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