Wireless Temperature Sensors progress

I was debating posting this part, but I figured the whole process should be documented–even when it doesn’t work out. These pictures date back a few weeks ago, around August 11th.

TL;DR: Built some temperature sensors, but they were too prone to interference which made them useless.

Concept:

I wanted to build some wireless temperature sensors that I would later use in creating a custom smart thermostat. The sensors would be based on ESP-12E’s (my first mistake) and the thermostat would just be a simple Wemos D1 Mini with a 4-channel solid state relay connected to a local Blynk server for control.

Up front, I’ll start by saying buying 12E’s was a terrible idea for this project. I originally thought they would be needed due to their smaller form factor, but it turns out the D1 Mini actually fit in the enclosure I had planned although I didn’t realized this till after everything arrived.

Note to anyone else attempting something similar: Just buy D1 Minis or regular NodeMCU’s–after paying for the breakout boards, voltage regulators, and USB headers, they came out to the same price.

Setup:

I originally planned on using the ESP-12E’s bare, but that quickly became too much of a hassle without some sort of programming rig, so I just bought some cheap breakout boards on AliExpress.

001.png
Convenient. They come with the resistors needed to boot the device pre-soldered to the board.

The boards made flashing the ESPs much easier. I’m not sure what happened when soldering them, but they ended up rough.

002.png
Some scary soldering. Worked fine though.

With the boards attached, I could easily flash the devices with some jumper cables attached to my trusty USB UART. All of the programming for the chips was done with the Arduino IDE. With both ESP and Blynk libraries available, programming everything was pretty straightforward.

003.png
Programming and testing sensors.

I chose to use the HTU21D temperature and humidity module for this project. These sensors have an accuracy of ±1°C  and ±2% relative humidity. They also have a much wider range (-30 ~ 90C, 5% ~ 95% RH) than the cheap-o DHT11 sensors typically used in projects like this. Comparatively, they are also slightly cheaper than DHT22’s at around $1.80 shipped.

The sensors are great, but it seems like they are very vulnerable to interference at close ranges which will be more obvious later.

Design:

With the programming out of the way, I wanted to design a small, appealing box that wouldn’t look too out of place attached above a power outlet.

My design was to create a small box with a mesh cover that would allow air to pass over the sensor. I wanted to mount a few of these boxes above power outlets throughout the apartment to gather data. Each box would have a micro-USB port, which would connect to a slim, flat USB cable that connected to a 5V power supply behind the outlet’s faceplate.

I don’t have access to a 3D printer yet, so I had to make do with what I could find online.

004.png
The first box, unpainted.

I found some perfectly-sized boxes on (again) AliExpress. I cut out a small hole to press some fine mesh through and added a micro-USB port to the base before painting. Painting didn’t work out so well–it’s very difficult to paint small plastic objects smoothly with spraypaint. Oh well, version 0.1 I guess.

005.png
Adding electronics, after painting.

Everything fit surprisingly well in the box. Again, I would have saved even more space by using D1 Minis, but it turned out alright.

006.png
Completed sensor.

Conclusion:

So the design was solid. Or so I thought.

Like I said at the beginning, the sensors ultimately didn’t work. They reported temperature and humidity, but both were wildly off and would not remain consistent.

I tried multiple sensors, multiple ESPs, across multiple days. I tried removing the metal mesh, but no luck. However, if I removed everything from the box, or pulled the HTU21D far enough away from the ESP12e, the data would appear fine. If I put anything around the sensor, or moved it closer to the body of the device, the readings would get wonky again.

I’m not sure if this is specifically an HTU21D problem, or if there was an mishap during the construction of the device. Regardless, I’ve put the project on hold for now until I get a chance to research more sensors and find one that can tolerate being so near other electronics.

I’ll post an update when I make more progress. Thanks for reading!

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *