In this article, we are going to see how to work with a moisture sensor, relay module, and motors to create an automated watering system. It will be very useful for farmers to save their valuable time. Also, much less maintenance is required for the project. The moisture sensor used in this project sends digital signals to the Arduino by A/D converting and sampling the process. The motor turns on and off as per the Arduino board command. The relay module is used to amplify the Arduino signal using the Main power supply.
Requirements
- Arduino
- Moisture sensor
- Relay Module
- Motor Pump
- Connecting Wires
Steps to follow.
Step 1
Open the Arduino software you have. I prefer the latest version.
Step 2
Select the Arduino board type and select the COM port to which Arduino is connected.
Step 4
Connect as per the circuit diagram.
Step 5
Arduino pin 12 for the sensor value is declared as input and pin 10 is declared as Output.
Pin 12 is used to get the input sensor value.
Step 6
Relay module is connected to the 10th pin of Arduino. Relay module is used to convert the high voltage of power supply required for the motor and act as a slave for the Arduino.
Step 7
Compile and upload the code using Arduino software.
Step 8
Serial.begin function is used for using the Serial monitor to monitor the current status of the moisture sensor and to find out Motor status also.
In this article, we learned how to work with the moisture sensor, relay module, and serial monitor to create an automated watering system. This system will be very useful for farmers.