The reason many of us build smart homes and tinker with microcontrollers is to make the mundane feel a little more special. Though these projects are far from necessary, they can bring a bit of magic to your everyday routines and teach you a thing or two along the way.
Here are six ideas you might want to explore.
DIY bed presence sensor
Use your wake-up routine as an automation trigger
A bed presence sensor might seem utterly pointless on first glance. There are many ways to detect presence, like mmWave sensors which operate on multiple frequencies. This makes them ideal for detecting small movements and static targets, like a person lying in bed. A bed presence sensor is specific to a piece of bedroom furniture, arguably more dependable, and that unlocks some interesting possibilities.
A bed presence sensor, like that designed by Jesse Kaufman or the HA Bed Presence project, requires some means of interacting with your smart home. In most cases, this will be Home Assistant. An ESP32 chip is connected to a pressure-sensitive sensor of some kind and flashed with ESPHome, which makes interacting with Home Assistant fairly easy.
With your sensor working properly in Home Assistant, you can do things like control lighting or trigger devices (like coffee machines). Adding conditions to these automations—like only turning on the coffee machine if you get out of bed after 8 am, or only turning the bathroom light on to 10% brightness while it’s dark outside—is where the real magic happens.
You can buy bed presence sensors (many of which also use ESPHome), but creating your own allows you to understand what’s happening and tune it accordingly. For example, if you have a dog that lies on the bed in the day, then you’re going to need to set a different weight limit threshold so that your sensor doesn’t get false positives.
Touch-free automatic trash can
A smart bin that doesn’t cost the earth
There are many different types of “smart” trash cans, from those that open automatically on approach to others that tie and replace bags for you. The IoT-Smart-Bin sits somewhere in the middle, being more advanced than a bin that opens and closes automatically and without the need to invest in proprietary trash bags (yes, really).
At the heart of the project is an ESP32 microcontroller and an ultrasonic sensor, which senses motion within a designated range and opens the bin using a servo motor. There’s also an MQ-2 gas sensor for smoke and gas detection, a DHT22 sensor for temperature and humidity, a small 16×2 LCD panel, and a buzzer to sound the alarm.
It’s a smart, touch-free trash can that can tell you useful and potentially life-saving information about your environment. You could leave some of these sensors out for a cheaper build, or go even further and add more advanced sensors, a second ultrasonic sensor to gauge bin fullness, and other things.
Checking the mail
Get a notification when the mail arrives
I once built a mailbox sensor using Home Assistant and a simple infrared motion detector. It worked fine for my purposes since the mailbox is close enough to my home to remain within Zigbee range, the style of mailbox suits the infrared approach, and Home Assistant makes it relatively easy to build a notification that avoids false positives.
There are other options, of course. Perhaps the easiest way to do this is with a simple Hall effect sensor, which uses a magnet to detect activity. When the sensor moves away from the magnet (or vice versa), the sensor is triggered. This works with a mail flap or larger door design, which is why it’s such a popular choice.
There are plenty of tutorials that take this approach, like one by Hobby with Adam that uses Zigbee for communication and an external antenna, or the long-range LoRaWAN mail notifier by Andreas Spiess.
Open and close your blinds
Buying smart blinds is hard; convert your old ones instead
Finding the perfect window coverings can be really difficult—I know, I’ve been looking for a long time. You think you’ve found the right design, then you find out that there’s no motorized automation available, or that it’s way too expensive to cover your whole home. Been there, done that.
One option is to use an ESP32 connected to a stepper motor to upgrade virtually any window covering. ESPHome Blinds is a great resource for this, since it includes the YAML you need, wiring instructions, and connects easily to Home Assistant.
What the end result looks like and how it is powered ultimately depends on how much work you want to put in and your level of skill. You could design and 3D print a low-profile enclosure for your blinds, wire them into nearby power, or fit a massive battery that only needs to be recharged every six months or so.
You’ll have to concede some ground in terms of aesthetics compared with an integrated solution purchased at retail, but you’ll end up paying way less and get access to a wider variety of coverings.
Controlling your smart home
Interact with Home Assistant using a dedicated terminal
EspControl describes itself as a “no-code touchscreen controller for Home Assistant.” It’s primarily designed with a variety of ESP32-embedded displays in mind, from 10.1-inch tablets to smaller 4-inch panels. If you can get the device into Home Assistant, you can use EspControl to build an interface for it and control it directly.
For example, I have a smart controller for my HVAC system but no dedicated controller. I need to whip my phone out to control the heating or cooling, which is fine but not ideal for guests or when I don’t have a phone on me. I could use EspControl to create what is essentially a thermostat, and even add extra controls for fans and lights to it.
You could do this for various different areas in your home. For example, you might want a dedicated desk controller that controls the lights and music in your office. You might also find something like this useful for guests. You can even use the more powerful ESP32-P4 embedded devices to display camera images.
Looking for even more ESP32 projects? Check out some projects that solve real smart home problems, and some others you can complete in just one hour.