Tuesday, October 20, 2020
Home Arduino Strarter Kit FC-28 | SOIL MOISTURE SENSOR

FC-28 | SOIL MOISTURE SENSOR

FC-28 soil moisture sensor is one of the cheapest sensors to work with. This sensor is useful for the agricultural sector and an automated watering system. It measures the volumetric content of water.
USA purchase link
UK purchase link
Germany purchase link

Specifications:

  • Input Voltage: 3.3–5V
  • Output Voltage: 0–4.2V
  • Input Current: 35mA
  • Output Signal: both analog and digital

How the FC-28 work :

We can connect the sensor both in analog and digital mode. The two probes measure the volumetric content of water. For instance, electricity passes through the soil and as a result a resistance is generated. Therefore we can measure the moisture. Dry soil conducts electricity badly. Therefore, when there is less water, then the soil will conduct less electricity, as a result, there will be more resistance.

We can use the sensor both in analog and digital mode.

FC-28
Working Principle of FC-28

FC-28 Pin Configuration :

FC-28
Pin Diagram of FC-28

FC-28 Analog Circuit Diagram :

In analog mode, the sensor gives us a value from 0 to 1023.

Firstly, VCC of the FC-28 to 5V of the Arduino

Second, GND of the FC-28 to GND of the Arduino

Lastly, A0 of the FC-28 to A0 of the Arduino

Code :

int sensor_pin = A0; 
int output_value ;

void setup() {
  Serial.begin(9600);
  Serial.println("Reading the value  ...");
  delay(2000);
  }

void loop() {

  output_value= analogRead(sensor_pin);
  output_value = map(output_value,550,0,0,100);
  Serial.print("Mositure value : ");
  Serial.print(output_value);
  Serial.println("%");
  delay(1000);
  }

 

FC-28 Digital Circuit Diagram :

To connect the soil moisture sensor FC-28 in the digital model we will use a LED. When the sensor value is greater than the beak point, as a result, the digital pin will give us 5V, and the LED on the sensor will light up. When the sensor value will be less than this breakpoint, the digital pin will give us 0V and the light will go down.

Firstly, VCC of FC-28 to 5V of Arduino

Secondly.GND of FC-28 to GND of Arduino

Then, D0 of FC-28 to pin 12 of Arduino

Further, LED positive to pin 13 of Arduino

Lastly, LED negative to GND of Arduino

Code :

int led_pin =13;
int sensor_pin =8;
void setup() {
pinMode(led_pin, OUTPUT);
pinMode(sensor_pin, INPUT);
}
void loop() {
if(digitalRead(sensor_pin) == HIGH){
digitalWrite(led_pin, HIGH);
} else {
digitalWrite(led_pin, LOW);
delay(1000);
}
}

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

KY-032 | OBSTACLE AVOIDANCE SENSOR

The KY-032 obstacle avoidance sensor is an infrared obstacle avoidance sensor. It comes with the 37 in 1 starter kit for Arduino. It helps...

HIH-4000 | Humidity Sensors

The HIH-4000  sensors are one of the highly efficient humidity sensors you can buy. The HIH-4000 is an analog humidity sensor. It is useful...

KY-026 | ARDUINO FLAME IR SENSOR

The KY-026 Arduino Flame Sensor is a low-cost starter sensor. It normally comes in the starter kit of Arduino like the ky-039. It can...

KY-039 | ARDUINO HEARTBEAT SENSOR

The KY-039 Heartbeat sensor is one of the cheapest sensors to get a start on Arduino like the Sound sensor. It cost less than...

Recent Comments