Listen To The Rain, Raspberry Pi Style

There’s an old proverb algebra teachers often recite: You have to use what you know to find out what you don’t know. The same could be said about sensors. For example, analog to digital converters use something computers are good at finding (like time) and use it to determine something they aren’t good at finding (like voltage). So how do you detect rainfall? If you are [lowflyerUK], you use the microphone in your web camera and a Raspberry Pi.

The idea was to reduce irrigation usage based on rainfall, so an exact measurement isn’t necessary. The Python code that analyzes the audio input is calibrated with three configuration parameters and attempts to remove wind noise. Even so, it needs to be in a room that gets a lot of noise from rainfall and ambient noise can throw the reading off.

The weather service is never going to adopt this system. Still, it is a great example of taking something you know and using it to get something you don’t know. If you want a more complete weather station, we have a few options for you.

8 thoughts on “Listen To The Rain, Raspberry Pi Style

    1. Theese car sensors would’nt stop to proclaim rain after it already stopped to rain. They use optical sensors to detect moisture on the car glass. So if you use it without wipers the raindrops stay on your window for a long time.

      I think the idea of “hearing” raindrops is quite nice. I used to have a heated moisture-sensor to open/close my roof windows automatically but sensing with audio seems to be a more elegant way.

  1. A foot square sheet of steel and attach some piezos to the underside.
    Then you can count when and where the rain is falling. Get drops per inch even how large the drops are (relatively). That coupled with a depth guage could estimate the volume of the drops.

  2. A house I lived in once had thin aluminum sheetmetal covering the windowsills as part of the siding renovation. Rain would hit the one inch sill outside of the storm window, transmit into the space between the windows and sound off. It sounded like BB’s being shot at the window. It was a sleep killer till I put layers of cloth on the inside space. Use the thinnest aluminum flashing roll you can find at a hdwr store covering an otherwise dead hard box. A pie pan or disposable turkey roasting pan might work as well.

Leave a Reply to AdamCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.