Hey everyone, I wanted to share a fun and practical project I recently completed for my baby’s changing station. It’s a combination of an occupancy sensor and a heat lamp automation, all controlled by ESPHome and an ESP32. I thought it might inspire others or help someone who’s looking for a budget-friendly solution!
So, the setup is pretty straightforward. I used a soft changing mat and created a homemade capacitive pressure sensor pad. This pad detects when the baby is laid down, which then triggers the heat lamp to turn on. The key component here is the ESP32 running ESPHome, which acts as the brain of the operation. I also used a Shelly Plug S to control the heat lamp wirelessly.
The pressure sensor pad was based on a DIY tutorial I found online. It’s made using basic materials like tin foil and office supplies, which keeps the cost super low—under 50 cents! I soldered the wires to paperclips to ensure they stay in place, and then placed the pad under the changing mat.
Connecting everything was a breeze. I used one wire from the pad to the Ground pin of the ESP32 and the other to one of the capacitive sensing pins. I chose GPIO4 for this project. The ESPHome configuration was pretty simple too, with just a few lines of code to set up the sensor and define the threshold for occupied and unoccupied states.
When I first set it up, I had to play around with the threshold values to make sure it accurately detected when the baby was on the mat. Once that was sorted out, I integrated the ESPHome device into Home Assistant and created an automation to turn on the heat lamp whenever the sensor detects occupancy.
I also added a custom icon to the entity in Home Assistant, using the ‘baby-face-outline’ MDI icon, which makes it super clear in the interface. It’s such a small touch, but it really makes the setup feel polished.
This project was a great way to repurpose some materials I had lying around and keep costs low. Plus, it’s been a lifesaver during those early morning diaper changes—it automatically turns on the heat lamp, so I don’t have to fumble around in the dark. If anyone has questions or wants more details on the setup, feel free to ask! I’d love to help others recreate this or adapt it to their needs.
Cheers,
[Your Name]