Rain Sensor Raindrop Module

  • Was  RM14.50 
  • RM5.00

  • Product Code: raindrop sensor
  • Availability: In Stock

Raindrops Detection sensor module, rain sensor, to monitor various of weather conditions and converted into the number of the reference signal and the AO output.


Features:

  • FR-04 high-quality double-sided materials on sensor,
  • King Size 5.0 * 4.0CM, and with the surface of the nickel plating treatment, against oxidative, conductivity, superior performance and longevity
  • Current around 15mA
  • Adjustable sensitivity
  • Operating voltage 3.3V - 5V DC
  • Output: Digital switching outputs (0 and 1) and Analog AO voltage output;
  • PCB Size: 3.2cm x 1.4cm
  • Wide voltage LM393 comparator

 

Rain Sensor Module Pin Outs & Indicator:

Pin, Control, or Indicator Description
VCC +5 Volts Power Source
GND Ground or negative power source
DO Digital Output. Goes low when moisture exceeds set threshold.
A0 Analog Output - Zero to five volts. The lower the voltage, the greater the moisture.
Power LED Indicates that power is applied
Output LED Illuminates when moisture has exceeded threshold set by sensitivity adjustment.
Sensitivity Adjustment Clockwise is more sensitive. Counterclockwise is less sensitive.

 

Connecting the Module to the Arduino

Connecting the module up is pretty straight forward.

Rain Sensor Module Arduino Hookup

Rain Sensor Module Arduino Sketch

The sketch below does a couple of things:

  1. It monitors the digital output from the module and makes the decision that it is raining if the digital output goes low.
  2. It measures the analog output and provides a moisture level, where 1023 is high and where 0 is very wet.

Copy and paste the sketch below and upload it into your Arduino.

int nRainIn = A1;
int nRainDigitalIn = 2;
int nRainVal;
boolean bIsRaining = false;
String strRaining;


void setup() {
  Serial.begin(9600);
  pinMode(2,INPUT);
}
void loop() {
  nRainVal = analogRead(nRainIn);
  bIsRaining = !(digitalRead(nRainDigitalIn));
  
  if(bIsRaining){
    strRaining = "YES";
  }
  else{
    strRaining = "NO";
  }
  
  Serial.print("Raining?: ");
  Serial.print(strRaining);  
  Serial.print("\t Moisture Level: ");
  Serial.println(nRainVal);
  
  delay(200);

}

Running the Sketch

The sketch will begin immediately uploading. Open your serial monitor and view the results. Put a little water ( a sponge works good) onto the sensor and see the moisture level decrease. If you get the board wet enough, the serial monitor should indicate that it’s raining. If not, try turning the sensitivity adjustment clockwise.

Write a review

Note: HTML is not translated!
    Bad           Good

 

Related Products