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:
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 up is pretty straight forward.
The sketch below does a couple of things:
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); }
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.