Making Sure The Basement Stays Dry With An ESP8266

A high level pictorial schematic of the basement monitor.

The hack we have for you today is among our most favorite types of hack: a good, honest, simple, and well documented implementation that meets a real need. Our hacker [Solo Pilot] has sent in a link to their basement monitor.

The documentation is quite good. It’s terse but comprehensive with links to related information. It covers the background, requirements, hardware design, sensors, email and SMS alerts, software details, and even has some credits at the end.

Implementing this project would be a good activity for someone who has already made an LED flash and wants to take their skills to the next level by sourcing and assembling the hardware and then configuring, compiling, deploying, and testing the software for this real-world project.

To make this project work you will need to know your way around the Arduino IDE in order to build the software from the src.zip file included with the documentation (hint: extract the files from src.zip into a directory called AHT20_BMP280 before opening AHT20_BMP280.ino and make sure you add necessary boards and libraries).

One feature of the basement monitor that we would like to see is a periodic “everything’s okay” signal from the device, just so we can confirm that the reason we’re not getting an alarm about flooding in the basement is because there is no flood, and not because the battery ran dead or the WiFi went offline.

If you’ve recently started on your journey into where electronics meets software a project such as this one is a really great place to go next. And of course once you are proficient with the ESP8266 there are a thousand such projects here at Hackaday that you can cut your teeth on. Such as this clock and this fault injection device.

22 thoughts on “Making Sure The Basement Stays Dry With An ESP8266

    1. Do the fine gentlehackers here honestly think it makes a difference? Either ESP are actively developed and supported. Not every project needs a dual core esp32-xyz123.

      You source what is cheap. I still have old esp8266 and modern esp32 running 24/7 since years now on the same rusty old code and they are not breaking. Old MCUs deserve love and care too.

      1. To expand on that, there is only one thing that matters, ever: “board design”. Since what good is the best MCU if the power regulators and antenna design on the dev board are all busted up?

        Watch a youtube video by some swiss dude comparing 10 of the same. He does some power profiling and range testing and at the end you just think: “It’s not the MCU that kept me back.”

      2. The neophiles expect, nay, demand that you must use the absolute latest technology for every project, if it’s not running on a quantum processor then how can you truly know if you need to switch on the sump pump or not?

      1. Because every time a new more powerful microcontroller becomes available, you should dump your existing stock of older models in the trash because they are laughably obsolete for using in a moisture detector ;-)

        1. Fine by me especially if it brings down the price of the older ones 😋. 80% of my projects are an underwhelming MCU with 200 lines of Arduino connected to my laptops serial port

    2. No, it’s woefully underspecified for this. I’d recommend a modern datacenter server. U1 would suit fine, and be quite simple to implement.

      You’d just leave it on the floor. Ping it every minute. If it gets submerged then it’ll stop responding and you know humidity is too high.

    3. I definitely do. I like how cheap they are and the fact that they use less power than an ESP32. They’re also extremely powerful. I have a bunch of them, all running identical firmware, to send weather data back to a server where I log the data. Those same ESp8266s pick up info about devices they need to turn on or off, which they then do. Those same devices can log to local FRAM, and there’s still room on them to add even more functionality. You can see the source here:
      https://github.com/judasgutenberg/Esp8266_RemoteControl

      1. ESP8266 is still a great choice!

        I use them for exactly the same use cases. Even with its low GPIO count it mostly works well. For some I2C sensor devices and an SPI display there are more than enough pins. Form factor “Wemos D1 Mini” is still my favorite, it has a lot of cheap and quite useful shields. Those 0.96″ TFTs are a steal and so nice for debugging…

        Only drawback is that my bin is full of those pesky Micro-USB-Connectors. USB-C connector is so much better to handle.

          1. I’m with you on that. I use an ATmega328 for timing critical stuff. It was way easier to implement it on the atmega than on the esp8266…

            OTOH it becomes more and more difficult to justify such choices. ESP32 S3 zero is sooo cheap (ok, not for those in USA) and so much more powerful. Real multitasking etc…

            It is a tempting choice to select it.

    4. Ebay Arduino Nano clones are up to US$3.10 each in bulk {insert tariff sniping here} so I may abandon it completely for something spendy and au courant, yet so overly fragile, over-layered, and complex that it never starts working. If you don’t finish you can’t fail, right? FWIW I’ve had a cheapo Nano working for more than a decade over my workbench and it’s just fine.

      There are two side arguments going here. The first is that it’s an overly ornate way of detecting/notifying moisture problems – it is – and the second is that there are better/worse tools for the job when the actual job … wait for it … is to learn something about the systems involved. This writeup seems like a pretty good start to that.

  1. My main concern is around security. Don’t want my WLAN to be opened up and read the ESP8266 are less secure.

    On the performance and classification of legacy, your comments resonate with my understanding. Just because there is someone younger doesn’t make the existing old per se. In particular, when I consider the use cases, I use them for.

  2. Years ago I made a similar project for my crawl space that has a sump pump. I use an HC-SR04 ultrasonic module to monitor the level of the sump pit, a BMP280 for the temperature/humidity and an MQ9 to measure for gas. It uses a Wemos 8266 mini and has been chugging along for years. I had to replace the $.99 power supply from Goodwill once. I’m planning to move from Blynk to Home Assistant when I figure out the **$##!! MQTT part. I also have a few water leak detectors around the house running off a 9v battery and an ESP8266-01.

Leave a Reply to badtasteCancel 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.