Browsed by
Etiqueta: linux

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 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.


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: 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: 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.

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.


  • 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

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.