13.03.2023 -- #

Smart home aka gadget toys for adults. After years of being on the fence last week I finally caved and started my own smart home.

New Smart home setup

This micro blog post covers the start of my setup:

Now the system includes:

Adding an EPSHome based sensor

With a server in place and a few devices I wanted to expand things in a DIY direction. Drawing on my hobby elections skills I put together a temperature / humidity sensor from parts.

Going though some of my old box of parts I found:

Instead of writing a program for the board I found this cool tool, ESPHome, that does that part for you. After installing all the parts into a breadboard all I had to do was write a yaml config file instructing ESPHome which pin my sensor was wired to. Setup was super easy. After an initial programming with the micro controller wired to my laptop all the rest was done wirelessly.

breadboard

breadboard

With in the hour I had it printing to my Home Assistant dashboard!

home assistant

home assistant

Problems

Working on the first try, could it be? Too easy… No. After an hour the readings from the sensor suddenly stopped.

no data

no data

erratic readings

erratic readings

After playing with the config for hours I figured it must be a hardware level problem and busted out the mini oscilloscope.

oscilloscope hooked up

oscilloscope hooked up

The readings were really weird. The data line was not getting pulled all the way to 3v by the built in pull up resistor. I decided to remove the built in resistor and try some different resistances.

removing surface mount resistor

removing surface mount resistor

In the end after a lot of reading online forum posts I’m convinced the DHT22 is just a crap sensor. For my next project I’ll defiantly use a higher quality sensor.

As part of the debugging process I moved from the breadboard to perf board, trying to rule out faulty connections.

perf-board prototype front

perf-board prototype front

perf-board prototype back

perf-board prototype back

Once on perf and after not working for a day suddenly the sensor started reliably sending data. 🤷‍♂️

working data

working data

stable readings

stable readings

Learnings

  • ESPHome is awesome, especially when you don’t need anything to custom.
  • DHT22 is crap. Buy better!
  • DIY smart home sensors are fun!
\- [ tech, smart_home ]