Summary of Automatic Irrigation System using Arduino
This article details building an automatic irrigation system using an Arduino, FC-28 soil moisture sensor, and a Nokia 5110 LCD. The system monitors soil moisture levels and controls a solenoid valve via a relay module to water plants automatically. It displays real-time moisture percentages and valve status on the LCD screen, utilizing specific resistors to ensure the longevity of the display components.
Parts used in the Automatic Irrigation System:
- Arduino
- Nokia 5110 LCD
- FC-28 Soil Moisture Sensor
- Single Relay Module
- 1K potentiometer
- 4 X 10K resistors
- 1K resistor
- 330 ohm resistor
In this project, we are going to build an automatic irrigation system using Arduino which senses the moisture of the soil and opens or closes the valve according to the moisture value. The moisture value and the valve status is shown on the Nokia 5110 LCD display.
Before we proceed, let’s take a look at another project – a plant watering system using Arduino, which is very similar to our application. You may also read our other tutorials on – interfacing Nokia LCD to Arduino and our tutorial on interfacing Soil Moisture Sensor to Arduino.
Required Components
The components required for this project are as follows
- Arduino
- Nokia 5110 LCD
- FC-28 Soil Moisture Sensor
- Single Relay Module
- 1K potentiometer
- 4 X 10K resistors
- 1K resistor
- 330 ohm resistor
Circuit Diagram – Automatic Irrigation System
Nokia 5110 LCD operates on 3.3V, and if we connect it directly to the data pins of Arduino the life time of Nokia 5110 LCD will decrease (notice that the LCD will still work even if you connect directly without current limiting resistors). So, if you want to use it for a longer span, it’s good to connect via resistors as we have shown in this project.
To connect the Nokia 5110 LCD with the Arduino, make the connections for the Nokia 5110 LCD with the Arduino as follows
- Connect the pin 1 of Nokia 5110 LCD which is the reset Pin to the pin 6 of Arduino through the 10K resistor.
- Connect the pin 2 of Nokia 5110 LCD which is the chip select pin to the pin 7 of Arduino through the 1K resistor.
- Connect the pin 3 of Nokia 5110 LCD which is the data or command pin to the pin 5 of Arduino through the 10K resistor.
- Connect the pin 4 of Nokia 5110 LCD which is the data input pin to the pin 4 of Arduino through the 10K resistor.
- Connect the pin 5 of Nokia 5110 LCD which is the clock pin to the pin 3 of Arduino through the 10K resistor.
- Connect the pin 6 of Nokia 5110 LCD which is the VCC pin to the 3.3V pin of Arduino.
- Connect the pin 7 of Nokia 5110 LCD which is the LED pin to the middle pin of 1k potentiometer through 330 ohm resistor and connect the other two pins to the VCC and the ground.
- Connect the pin 8 of Nokia 5110 LCD which is the ground pin to the GND of Arduino.
The potentiometer used here is for increasing or decreasing the backlight contrast of LCD. If you want full back light, then you can connect it directly to 5V or if you want no backlight, then connect it to ground.
After that, connect the relay module with the Arduino as follows
- Connect the VCC pin of relay to the 5V of Arduino.
- Connect the ground pin of the relay to the GND of Arduino.
- Connect the IN pin to the pin 8 of Arduino.
On the other side of the relay, connect the positive of the battery to the NC terminal (No Connection) of the relay and the C terminal of the relay to the positive of the solenoid valve. Finally, connect the negative of the battery to the negative of the solenoid valve.
In last, connect the FC-28 soil moisture sensor to the Arduino as follows
- Connect the VCC pin of FC-28 to the 5V pin of Arduino.
- Connect the GND pin of FC-28 to the GND pin of Arduino.
- Connect the A0 pin of FC-28 to the A0 of Arduino.
Working – Automatic Irrigation System
The soil moisture sensor senses the moisture present in the soil and gives the output to Arduino. The output of the sensor will be from 0-1023. The moisture is measured in percentage; therefore we should map these values to 0-100.
Whenever the moisture value is lower than the value we have set inside our code as the threshold value, the relay will turn ON and the valve will turn open and whenever the moisture value is lower than this threshold value, the relay will relay will turn OFF and the valve will get closed.
Read more: Automatic Irrigation System using Arduino
- How does the system control the water valve?
The system turns the relay ON to open the valve when soil moisture is below the set threshold and turns it OFF to close the valve otherwise. - What voltage does the Nokia 5110 LCD operate on?
The Nokia 5110 LCD operates on 3.3V. - Why are resistors used with the Nokia 5110 LCD connections?
Resistors are used to prevent the lifetime of the LCD from decreasing if connected directly to Arduino data pins. - How is the backlight contrast adjusted on the LCD?
A 1k potentiometer is connected to the LED pin to increase or decrease the backlight contrast. - What is the output range of the FC-28 soil moisture sensor?
The sensor gives an output value ranging from 0 to 1023. - Can the Nokia 5110 LCD work without current limiting resistors?
Yes, the LCD will still work even if connected directly without current limiting resistors. - Which Arduino pin connects to the relay IN pin?
The IN pin of the relay module connects to pin 8 of the Arduino. - How are sensor values converted for the display?
The raw sensor values (0-1023) are mapped to a percentage scale of 0-100.


