How to automate a Pig Farm with an Arduino PLC Controller

Industrial Automation based on Industrial Arduino or Raspberry Pi

Arduino PLC, Raspberry Pi Panel PC and Wi-Fi. Tools to make it work.


On this occasion we will introduce the Industrial Shields technology to the farm sector. We are going to control and monitor a pig farm using an industrial PLC Arduino and a PC panel connected  to Wi-Fi, which can collect information from the system, store it into a server and analyze it.




How to automate a Pig Farm with a PLC controller Arduino
How to automate a Pig Farm with a PLC controller Arduino

Pig Farmers

Today, meat producers can see that the demand for their products is increasing due to the world population growth and prosperity. Food quality and safety standards are also becoming more stringent, while the costs of raw materials, labour and energy are rising.


The sector faces the challenge of producing enough safe, affordable and sustainable food of guaranteed quality, using efficient methods.

Our Project Goal

Industrial Shields facilitates both environmental control for improved animal welfare -such as management, automation and optimization systems- and information exchange in the process chain.

We also offer technical solutions that allow you to control the individual welfare of your animals, their production and condition, so that the business of livestock producers can grow in a sustainable way.

Our system will take care of the control of different actions such as the air conditioning of the enclosure so that the animal lives in optimal conditions, as well as its feeding by performing an exact weighing of both water and food in order to ensure its proper growth, which also allows us to have the inventory at all times. 

Another important aspect to take into account is the concentration of CO2 and ammoniac which are very harmful gases for the animals. For this we need an extraction system in combination with filters to guarantee air quality in the enclosure as well as not expelling it into the environment.

Finally we need to do a scheduled cleaning of each cage and also control the opening of the doors.

Keep in mind that this is a generic idea easily expandable by adding parameters to control depending on the needs and tastes of each customer.

Arduino Programmable Logic Controller for Pig Farms

The implementation of the project

First of all, we will look at the air conditioning that consists of controlling the temperature and humidity of the room. To do this we need an air conditioner and a dehumidifier as well as to 2 sensors, one for temperature and one for humidity. Depending on the pre-selected and recorded values, we will turn the devices on.

In relation to the food, we will install a gate controlled by a solenoid valve and a scale, so in this way we will drop food into the scale by opening the solenoid valve to the predetermined value. Then we will close the solenoid valve and through another door we will drop the food for the animal.

For water we can simply add a full meter of liquid into the tube letting the exact amount pass as well. The program will be in charge of making a record of all the amount of food distributed by adding the quantities of each cage and the rest of the total so we have the inventory done.

As we have mentioned before, in this type of farm the concentrations of CO2 and ammonia are very harmful for both people and animals and for this we need to have good ventilation and filtering so as not to expel the gases to the outside. We will install extractors in combination with filters.

With regard to the cleaning of the cages, taking advantage of the drainage we can introduce two pipes to high pressure and when it is activated by program they will wash the cage, as long as we open the doors (by means of an electrovalve) so that the animal goes out to the common area and does not suffer.

This system will have a control point through a TinkerTouch PC panel where the menu of programs will appear with all the processes to establish all the parameters and schedules.

How to automate a Pig Farm with a PLC controller Arduino

Check the products of this case study

Industrial Arduino PLC and HMI Raspberry Pi

Contact our team if you want to automate your pig farm

We will help you!

Download the Automated Pig Farm Case Study

Share it with your teammates

Do you want to receive more information about Industrial Automation?

Open Source technology allows you to develop your Monitor applications.

Just fill the form and we will send you several examples about how to use Open Source based devices on your projects.

Send