Product Introduction #
Raindrop sensor is a device used to detect the falling of raindrops, which is commonly used in automotive, smart home, and meteorological fields. It can sense the presence of precipitation and trigger the corresponding operation or feedback.
The working principle of the raindrop sensor is to use the resistance between two electrodes to sense the landing of raindrops. When the raindrop falls to form a conductive path between the electrodes, the resistance value will change accordingly, and the sensor determines whether there is a raindrop by measuring the resistance change.
Application reference: This module can be used for car wiper, smart home and weather detection station.
Parameter Specification #
Parameters | Value/Description |
Operating voltage | 3.3V~5V |
Operating temperature | -25°C~+85°C |
Output signal | Analog signal |
Size | 3.16cm*2.38cm |
Wiring Diagram #
Note:Expansion board is attached to esp32 controller board.
Raindrop Sensor | ESP32 |
VCC | 5V |
GND | GND |
Sign | Pin 32 |
Sample Code #
void setup() {
pinMode(32,INPUT);//Set pin 32 to input mode
Serial.begin(115200);//Set baud rate to 115200
}
void loop() {
Serial.println(analogRead(32));//Read the state of pin 32 and print it to the serial monitor
delay(1000);
}
Note: If you are using an Arduino board, then change the pin in the program to PIN A0, set the baud rate to 9600, and then connect the hardware pin to PIN A0 and upload the program.
Test Result #
After uploading the code to the controller board, open the serial port monitor of the Arduino IDE, set the baud rate to 115200, and switch to automatic scrolling mode.
Drop water on the module and check the value of the serial port monitor with and without water on the raindrop sensor. You can see that the more water on the raindrop sensor, the greater the value of the serial port monitor.
Related Resources #
Get One Now #
B2B Business: info@acebott.com