From Microduino Wikipedia
This tutorial will teach you how to use the rain sensor.
- Other equipment
- USB cable one
- Jumper several
- Rain sensor one
- Power indicator, output LED indicator.
- TTL output: TTL output signal for low level effectively. Drive power is about 100ma, can driven relay, buzzer, small fan, and so on directly .
- Sensitivity can be adjusted through the potentiometer
- Raindrops board and control board are separated, convenient to wire leads.
- The raindrops plates has large area, and more conducive to detect the rain.
- The board with a hole and convenient installation.
- Control board size is 3*1.6MM
- Raindrops board size is 5.4*4.0MM
- Connect the 5V power, the power LED indicator light. If no rain on raindrop board, DO port outputs high voltage, then switch LED off, otherwise, D0 port outputs low voltage, switch LED on.
- Remove the rain on raindrop board, system will recover to original state and output high voltage.
- AO analog output, can be connected to the microcontroller AD port to detect the rainfall.
- DO TTL output also can be connected to microcontroller to defect the rain.
The program is very simple. Read the A0 analog value directly, the rain sensor will generate voltage when hit the rain.
Step : Stack all Microduino module and sensor, as follows:
Step 2: Compile the program and download it.
Step 3: Drop two drops of water, the OLED displayed value will be changed.
OLED displays value will be changed with the rainfall.