This is a hardware project I created for measuring the temperature and humidity of my 3D printer enclosure. It is based on the ESP12 module and uses a DHT11 sensor. The ESP12 is programmed using the Arduino IDE and the ESP8266 core.
The following hardware parts are listed with Amazon links, only to show what they look like. You don't have to purchase them from Amazon.
- ESP12f module (datasheet)
- ESP8266 Programmer
- DHT11 sensor (datasheet)
- ESP12f breakout board
- HT7533 voltage regulator (datasheet)
- LCD1602 with I2C
- 5K resistor
The making of this project also contains a lot of trial and error, so the STL files, programs, circuit schematics and PCB layout are provided ONLY for your reference. Do not use them directly.
ESP12f is a variation of the ESP8266 module. The main reason I chose it is the cost. It's very cheap and provide just enough GPIO pins for my project. Even though the WiFi feature is not used, it is still cheaper than an Arduino Nano.
Regarding why choosing ESP12f module instead of other ESP8266 dev kit is because of its size. With a breakout board, I can easily make the PCB the same size as the LCD1602 module, and hide it behind the LCD1602, so that the final product is very compact.
The downside of using ESP12f is that it requires a programmer to program it. For the same reason, once the module is soldered to the breakout board, it won't be easy to remove it for reprogramming. But since my Arduino Nano is very simple, this is not a problem.
Alternatively, you can use D1 mini. Without soldering the pins, it has almost the same size as the ESP12f breakout board. It has a USB port, so you don't need a programmer to program it. You can also reprogram it easily, so no worry to make mistakes. And it's price is nearly the same as the ESP12f module. (Note that D1 mini renames the GPIO pins, so you need to refer to the pin mapping when connecting wires.)
If you decide to use the ESP8266 breakout board, there's one thing you need to pay attention to. The breakout board has space for an HT7533 voltage regulator, but it's not soldered by default. If you want to install an HT7533, DO REMOVE the 0-ohm resistor R2 (as shown in the picture below). This 0-ohm resistor shorts the input and output of the voltage regulator. If not removed, the 5V power will be shorted to the 3V3 input of ESP12f and will damage the module.
DHT11 is less accurate than DHT22, but it's cheaper and smaller, and is good enough for my project.
Note that the ESP12f, DHT11 requires 3V3 power supply, while the LCD1602 requires 5V power supply.
See photo directory for the photos of the assembly.
The software is written in C++ and uses the Arduino IDE with the ESP8266 core.
The program is very straightforward ans self-explained.
See STL directory. Note these files are not intened to be printed directly; many trial and error are involved.