Hello friends, I hope you all are doing great. Today, I am going to share a list of Smart Agriculture Sensor Libraries for Proteus. Smart farming is one of the most useful areas of embedded systems: a small Arduino node in the field can measure the soil, the air and the light, switch a water pump only when the plants need it, skip watering when it rains, and send an alert to the farmer's phone. That's why automatic irrigation and greenhouse monitoring are among the most popular final year projects.

The trouble is that you can't test a farm on your desk. Soil dries out over days, rain comes when it wants and the field is far from your lab. In Proteus, our libraries let you play all of that: sliders for the temperature, humidity and light, and test pins or analog inputs for the soil moisture, the rain, the water level and the pH. You can run a whole growing season in a few minutes and see whether your pump logic does the right thing.

In this list, our new climate sensors come first: the SHT31, BME280 and BH1750. After them, you will find our soil, rain, water and pH sensors, our solar panel libraries for powering a field node, and the radios that carry the data back home. I have also added the irrigation logic and the idea of a complete smart farm node. If you are new to Proteus libraries, read How to Add New Library in Proteus 8 first. So, let's get started with the Smart Agriculture Sensor Libraries for Proteus:

Figure: Smart Agriculture Sensor Libraries for Proteus by The Engineering Projects: sensors, solar power and LoRa

What a Smart Farm Measures

Here is what each measurement tells a farmer, and which of our libraries measures it:

Smart agriculture measurements and our Proteus libraries
MeasurementWhy it mattersLibraries
Soil moistureDecides when to waterSoil Moisture Sensor V2.0 and V1.0
Air temperature and humidityPlant stress, greenhouse ventilation and disease riskSHT31, BME280
Air pressureWeather changesBME280
LightGrowth light and the best time to waterBH1750
RainSkips irrigation when it rainsRain Sensor
Water levelTank level and leaksWater Sensor
pHAcidity of water and nutrient solutionspH Sensor

Climate Sensors for Greenhouses and Fields

1. SHT31 Temperature and Humidity Proteus Library

Figure: SHT31 Proteus Library: temperature and humidity controls with the Arduino Uno readings on the Virtual Terminal

The SHT31 is a precise temperature and humidity sensor, which makes it the right choice for greenhouses, where a few percent of humidity decide between healthy plants and mould. In our model, the temperature goes from -40 to 125 C and the humidity from 0 to 100 % RH, and the tutorial explains the CRC check that protects every reading. Read the complete tutorial: SHT31 Proteus Library

2. BME280 Sensor Library for Proteus

Figure: BME280 Sensor Library for Proteus: interactive sliders for temperature, humidity and pressure

The BME280 adds the air pressure to temperature and humidity, so one sensor turns your field node into a small weather station that can notice a coming storm. Three sliders change all three values during the simulation. Read the complete tutorial: BME280 Sensor Library for Proteus

3. BH1750 Light Sensor Library for Proteus

Figure: BH1750 Light Sensor Library for Proteus: an interactive light slider and the lux reading on the Virtual Terminal

The BH1750 measures light in lux. On a farm, it tells you how much light the plants get, switches grow lights in a greenhouse, and can keep the pump off in the hottest, brightest hours of the day. Read the complete tutorial: BH1750 Light Sensor Library for Proteus

Soil, Rain, Water and pH Sensors

4. Soil Moisture Sensor Library for Proteus V2.0

Figure: Soil Moisture Sensor Library for Proteus V2.0 with three sensors

The soil moisture sensor is the heart of every irrigation project. Version 2.0 has three soil moisture sensors in one library, smaller than the first version, and a slightly fluctuating output to look more like a real sensor. A test pin sets the moisture during the simulation. Read the complete tutorial: Soil Moisture Sensor Library for Proteus V2.0

5. Soil Moisture Sensor Library for Proteus

Figure: Soil Moisture Sensor Library For Proteus

Our first soil moisture library has one sensor with a smooth analog output, and its tutorial reads it with an Arduino. It is still useful when you want a clean signal to test your thresholds. Read the complete tutorial: Soil Moisture Sensor Library For Proteus

6. Rain Sensor Library for Proteus

Figure: Rain Sensor Library for Proteus

Our rain sensor is a digital sensor: its output goes HIGH when there is rain and stays LOW otherwise. Since we can't bring rain into Proteus, a HIGH TestPin means rain. In an irrigation system, this is the sensor that saves water by skipping the watering on rainy days. Read the complete tutorial: Rain Sensor Library for Proteus

7. Water Sensor Library for Proteus

Figure: Water Sensor Library For Proteus

The water sensor detects water from its electrical conductivity. On a farm, it watches the level of the water tank, so the pump never runs dry, and it can also detect leaks. Read the complete tutorial: Water Sensor Library For Proteus

8. pH Sensor Library for Proteus

Figure: pH Sensor Library for Proteus with four pH sensors

The pH sensor library has four sensors. A potentiometer on the test pin gives a reading from 0 to 1023, which the Arduino maps to a pH from 0 to 14, so you can test the logic of a hydroponic system or a water quality monitor. Read the complete tutorial: pH Sensor Library for Proteus

Powering a Field Node

9. Solar Panel Library for Proteus V2.0

Figure: Solar Panel Library for Proteus V2.0

A field node is often far from any socket, so it runs on solar power. Our Solar Panel library V2.0 adds solar panels to your Proteus designs, so you can draw and simulate the power side of your farm node too. Read the complete tutorial: Solar Panel Library for Proteus V2.0

10. Solar Panel Library for Proteus

Figure: Solar Panel Library for Proteus V1.0

The first version of our solar panel library, which we also used for our Solar Inverter in Proteus project. Read the complete tutorial: Solar Panel Library for Proteus

Sending Farm Data Home

11. SX1278 LoRa (Ra-02) Proteus Library

Figure: SX1278 LoRa Proteus Library: Arduino Uno sender and receiver at 433 MHz with the Ra-02 module

Fields are big, and LoRa is made for them. The SX1278 library sends packets between two Arduino Uno boards at 433 MHz, with distance buttons up to 20 km, so you can test a node in the field talking to a base station at the farmhouse. Read the complete tutorial: SX1278 LoRa Proteus Library

12. SIM800L GSM Library for Proteus V1.1

Figure: The SIM800L Library for Proteus V1.1: two Arduino UNOs, the SIM800L Advance pop-up with an SMS chat and the TEP Serial Monitor

If the farmer should get an SMS, or switch the pump from their phone, the SIM800L is the answer. Its demo already controls an LED by SMS, which you can turn into a pump relay. Read the complete tutorial: SIM800L Library for Proteus V1.1

13. HC-12 Library for Proteus V1.1

Figure: The HC-12 Library for Proteus V1.1: HC-12 Simple, the HC-12 Advance pop-up panel and two Arduino UNOs

For a greenhouse a few hundred metres from the house, the HC-12 is the simplest link: a 433 MHz serial cable in the air, with no radio library at all. Read the complete tutorial: HC-12 Library for Proteus V1.1

Irrigation Logic You Can Test in Proteus

An automatic irrigation system is simple to describe but easy to get wrong. Here is a logic that you can build and test with the libraries above:

  1. Switch the pump on when the soil moisture falls below a lower limit.
  2. Switch it off only when the moisture rises above a higher limit. The gap between the two limits (hysteresis) stops the pump from switching on and off every few seconds around one value.
  3. Skip watering while the rain sensor is HIGH.
  4. Protect the pump: don't run it when the water sensor says the tank is empty.
  5. Choose the time: water in the morning or evening, when the BH1750 reads a low light level and less water evaporates.
  6. Report: send the readings and the pump state by LoRa, HC-12 or SMS.

With the test pins and sliders of our sensors, you can force every case of this logic in a few minutes: dry soil with rain, dry soil with an empty tank, wet soil at noon, and so on. That's exactly the testing that is impossible in a real field.

Greenhouse Monitoring Ideas

A greenhouse is a small farm with its own climate, and the same libraries can run it:

  • Ventilation: open a vent or switch a fan on when the SHT31 reads a high temperature or humidity, and close it again with a little hysteresis.
  • Grow lights: switch the lamps on when the BH1750 reads too little light during the day.
  • Hydroponics: watch the pH of the nutrient solution with the pH sensor and raise an alarm when it drifts out of range.
  • Alerts: send an SMS with the SIM800L when the temperature stays too high for too long.

A Smart Farm Node in Proteus

Put it together: an Arduino with a soil moisture sensor, an SHT31 or BME280 on the I2C bus, a rain sensor, a relay for the pump, a solar panel for power and an SX1278 that reports to a second Arduino at the farmhouse. Start from each library's own example, test one module at a time, and then join them. You will find all of these libraries in our Proteus Libraries tutorial series, and more sensors in our Environmental Sensor Libraries for Proteus.

More Lists of Proteus Libraries

We have grouped our Proteus libraries into several lists, so you can quickly find the right ones for your project:

Conclusion

So, that was all about the Smart Agriculture Sensor Libraries for Proteus. I hope this list helps you design and test your irrigation or greenhouse project long before the first plant is in the ground. If you need another agriculture sensor in Proteus, please tell us in the comments or in the Proteus Libraries category of our forum. Till the next tutorial, take care and have fun!