KS0549 Keyestudio DIY Electronic Watering Kit

From Keyestudio Wiki
Jump to navigation Jump to search



Description

As for some plants lovers, they are keen on spending time in caring for their plants. Yet if they are busy in your work or entertainments, plants may wither by virtue of lacking water. To avoid this, we launched an automatic watering device with four humidity sensors and a water pump. It can water four plants pots. An equipped display screen can show the humidity value of soil.


Parameters

  • Working voltage: 5V
  • External power supply: DC 6-15V (recommended 9V)
  • DC output capability per I/O: 10 mA
  • 3.3V port output: 150 mA max
  • Size: 68*51*11mm3
  • Weight: 22.5g


Wiring Diagram

Project

Control relay modules and water pumps

4.1 Control relay modules and water pumps

Parameters:

  • Working voltage 2.5V~6V
  • The inner diameter of a water pipe is 6mm 
  • When voltage is 5V, the height of the water pipe from the pump cannot be higher than 105cm


Description

The relay is an electric switch, and the water pump is a power device. We can pump water by the relay switch.

Test Code

#define IN1 3
#define IN2 5
#define IN3 6
#define IN4 9

void setup() {
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
}

void loop() {
  digitalWrite(IN1, HIGH);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, HIGH);
  digitalWrite(IN4, HIGH);
  delay(3000);
  digitalWrite(IN4, LOW);
  digitalWrite(IN3, LOW);
  digitalWrite(IN2, LOW);
  digitalWrite(IN1, LOW);
  delay(1000);
}



Soil Humidity Sensor

The soil humidity sensor is used for detecting soil humidity value, which can determine if your plants are desperate for water.

Read values detected by soil sensors

Description

Read values of the 4 soil humidity sensors and print them out in serial monitor of Arduino IDE.


Test Code

#define soilPin1 A0
#define soilPin2 A1
#define soilPin3 A2
#define soilPin4 A3

void setup() {
  Serial.begin(9600);
  pinMode(soilPin1, INPUT);
  pinMode(soilPin2, INPUT);
  pinMode(soilPin3, INPUT);
  pinMode(soilPin4, INPUT);
}

void loop() {
  int val1 = analogRead(soilPin1);
  int val2 = analogRead(soilPin2);
  int val3 = analogRead(soilPin3);
  int val4 = analogRead(soilPin4);
  Serial.print("SoilSensor 1 =  ");
  Serial.print(val1);
  Serial.print("  ");
  Serial.print("SoilSensor 2 =  ");
  Serial.print(val2);
  Serial.print("  ");
  Serial.print("SoilSensor 3 =  ");
  Serial.print(val3);
  Serial.print("  ");
  Serial.print("SoilSensor 4 =  ");
  Serial.println(val4);
}

Test Result

Upload the test code and open the serial monitor of Arduino IDE, you can see that the values detected by the four soil humidity sensors are printed out. Touch the detection area of the sensor when your hands are wet, values on the monitor become smaller, which means that the more humid the soil, the smaller the measured value.

Automatic watering device

Control an LCD1602 display

Display character strings and values

Display soil humidity values

Automatic watering device

Resources

https://fs.keyestudio.com/KS0549