Audio Sensor to Measure Rain Intensity




Introduction: Audio Sensor to Measure Rain Intensity

For an assignment for the TU Delft we (Irene and Philippine) have made an audio sensor that measures rain intensity. This is also known as a disdrometer.

Step 1: Materials

We have used the following materials for this device:

- A photon
- A breadboard
- SparkFun sound detector
- 3 header pins
- 3 female wires
- A petri dish
- Material to elevate the device (in our case a plastic lid)
- A plastic cup
- Duct tape
- Wires (to extend the female wires)
- Ruler

And the following tools:

- Soldering gear

Step 2: Placement of the Wires

First, solder the three header pins onto the GND, VCC and Envelope circles of the SparkleFun sound detector. Make sure to attach them to back side of the sound detector (the side that is completely flat), this is better for the placement of the sound detector in the petri dish.

If you want the wires to be longer, like we wanted (to prevent water coming near the photon), cut the female wires somewhere. Attach an extra wire to the now open ends of the female by soldering the two parts together. Cover the attachments with duct tape.

Then you need to connect wires to the sound detector and the photon. Connect a wire from the GND on the sound detector to the GND on the photon (red wire in the picture), another wire from VCC on the sound detector to 3V3 on the photon (green wire) and the last wire from ENVELOPE on the sound detector to A0 on the photon (blue wire).

Step 3: Assemble the Device

Using duct tape, attach the sound detector to the upper part of the petri dish with the front facing upward. Hold the upperpart of the petri dish at an angle and fill the inside with cotton pads. Duct tape the upper and lower part of the petri dish together and place it on top of something to elevate it (in our case a plastic lid).

We have simulated rain by making a hole in the bottom of a plastic cup: if you fill the cup with water, the water will leave the cup in the form of rain drops.

Step 4: Write a Code

We have written the code that is shown in the image.

We have set the threshold for our code on 850, to distinguish a raindrop from background noise. An amplitude higher than 850 indicates a raindrop and make the count go up by one. The device measures the sound per one tenth of a second and counts the number of raindrops per minute. This number is then printed in a google spreadsheet. If you want to know which value for a threshold will be the best in your situation, leave out the slashes in the 17th and 18th line and test what amplitude you get when you let it rain on your device.

Step 5: Calculate the Depth of the Rainfall

With this code, you measure the number of raindrops per minute. If you want to know the depth per minute, you should first measure the radius of your petri dish with a ruler. The area of the surface of the petri dish is A = π * r^2.

Then you should measure the volume of a rain drop. We did that by filling our plastic cup by an amount of water, and counting the number of raindrops that fell out of it. Dividing the amount of water by the number of raindrops, you have the volume of one raindrop.

If you divide the volume of one raindrop by the area of the petri dish, the outcome will be the depth of the rain per raindrop. If you multiply the number of raindrops per minute by the depth per raindrop, you have calculated the depth of the water that has fallen on your device in one minute.

Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020

    5 Discussions


    3 years ago

    Do all rain drops contain the same volume of water?


    Reply 3 years ago

    They probably don't, however for the purpose of our research we have assumed they do. We didn't include it in our project, but it is possible to measure the size of the rain drops with this disdrometer. The amplitude is higher for a larger rain drop than for a smaller one. If the disdrometer is calibrated right, you can measure the difference between the size of the rain drops as well!


    Reply 3 years ago

    ok. makes sense. Just curious will thunder be interpreted as rain drops?


    Reply 3 years ago

    Interesting question, I think it will if it's close enough to the sensor. If the sensor measures an amplitude that is higher than the threshold (850), it will think that it's a raindrop. But it will measure only one raindrop (per tenth of a second), even if the amplitude of thunder is a lot higher than the amplitude of a raindrop.


    3 years ago

    This would have been really cool to have when we lived in Okinawa :)