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.
Just curious — is anyone actually using ESP8266 for new projects these days?
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.
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.”
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?
The basement exists in both unflooded and flooded states until you observe the state with your quantum MCU. No old tech MCU is going to be able to force the basement to pick a state 😉
The real question becomes, can you, by controlling the quantum mcu, force the superposition into the nonflooded basement state, thus avoiding the need for a pump. Perhaps you need a pump, else the unflooded state in order to bias the states temporal potential.
Ah the Schrodinger’s wet cat conundrum…
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.
Yes.
The industry uses them in wireless switch plugs and more. So off and many more incorporate them. Some can even be reprogrammed
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
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.
I use Atmega328-based Arduinos as slaves to expand available pins and also (crucially) to get more analog inputs, particularly in cases where I need to measure extreme temperatures such as those in a boiler (where an I2C-based weather probe will not survive but a thermistor will). Here is that slave code:
https://github.com/judasgutenberg/Generic_Arduino_I2C_Slave
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.
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.
Yep. Still cheaper and less power use while still very powerful itself.
Yes.
My latest is a test VFO for use in setting up old crystal based radios, getting ready for an in built VFO for use on ham radio bands.
http://www.sadarc.org/xenforo/upload/index.php?threads/generic-crystal-replacement-test-vfo.764/
Even an ESP8266 is horribly overkill to read out a simple moisture meter. But it is one of the cheapest options that has WiFi on board and is child’s play to program. I have at least 20 in stock and at least 10 around the house for all kinds of stuff (WiFi-IR bridge for my AC, WiFi temperature and humidity sensors, WiFi-P1 meter, etc. etc.).
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.
I am not sure what you are going on about. It’s being actively developed and patched regularly, for years:
https://github.com/espressif/esp-idf/issues/7019#issuecomment-871810668
+1 for the regular check-in. This is a nice feature ESPHome gives you for free
This is much too simple and inexpensive, but it actually works.
https://hackaday.com/2019/10/23/build-this-handy-leak-detector-for-1-02/
While i use esphome for a lot of things, jkea has nice zigbee sensors fmfor a 10er that do the same …
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.
No designer with half a brain will run DC to water sensor electrodes. UGH.
I still use the ESP8266 for a security system and it works great. The ESP32 has too much computing power/current drain/library issues.
So,
With that rather condescending reply, would you care to explain why?
Generally, for a hobbyist who started in ESP-land with the ESP32, it’s not worth learning the development differences necessary to use the ESP8266 unless you have a project that really needs low power, lots of units, or wants to operate on existing hardware like a discarded IoT device. But if you started with the ESP8266, you’ll reach for it when it’s adequate; I have a pile of ESP-01 modules for the really simple stuff.
I’ve seen a similar problem resolved with a float switch, an indicator relay and a car horn. It had the added benefit of not using any power when inactive.