A simple way of detecting rain droplets with a FC-37 or YL-83 Rain Sensor.
A rain sensor will detect droplets of water when they fall on the sensor board.
The sensor board has two traces on it and the microbit can measure the resistance between the two. In this example, it connects to a module which converts the analog signal from the rain sensor to a digital output.
A search for ‘FC-37’ or ‘YL-83’ or ‘Arduino Raindrop Sensor’ will yield the sensor that’s required.
The sensor usually comes with two modules. One part detects the raindrops, the other takes a signal from the sensor and outputs it as an analog or digital signal. It’s possible to use the big raindrop detector module on its own; see the Soil Moisutre Sensor entry on how to do it.
First we need to provide power to the sensor to set its sensitivity:
GNDpin on the small module to the microbit’s
+pin to the microbit’s
An LED will light on the module.
There is a small potentiometer on the module. This sets the level of sensitivity required for the sensor to output a digital signal to say it has detected water.
Add a few ‘rain drops’ to the sensor. Rotate the potentiometer until the second the LED lights. At this level, the sensor will return a
1 digital signal.
Providing constant power to the rain sensor degrades the board. Electrolysis occurs when it’s wet.
Power to the board can be controlled if it’s connected to one of the microbit’s
2 pins. Turn on the sensor only when a reading is being taken.
In this example we will use a digital output: the sensor will return
1 if there is rain present. There are four pins on the module; one of them is marked A and the other is marked D.
We will take the digital signal so we connect to the ‘D’ pin.
|Rain Sensor Pin||Microbit Pin|
Published: December 23, 2016 Updated: December 23, 2016