Easy expansion of a DHT11 ESP8266-01 module

Various webstores sell (very cheap) a module with an DHT11, that takes a plug-in ESp8266-01, thus creating an easy way to ‘IoT’ the temperature and humidity in your house, or any place you want.

The module only uses 1 pin out of 4, but is a quick way to setup an ESP8266-01 application as it has a 3v3 regulator. As such it is also an easy base to use for projects that require a couple of more I/O pins.

Ofcourse one could solder wires directly to the head of the ESP8266-01, but a better solution is to create a little PCB in between  the module and the ESP8266.

For that, we need a couple of long headers and some scrap veroboard or strip board. This creates enough space to mount a small PCB as a ‘floor’ between the module and the ESP8266-01.

Veroboard and stripboard both have their pros  and cons: Veroboard needs you to connect the individual copper islets, but you don’t have to cut between the pins of the header, whereas stripboard doesn’t require you to connect individual islets, but you need to carefully cut the tracks between the 0.1″ spaced header columns.

Eventually you should be able to come up with something like this:

In this picture I expanded the module with a DS18B20, which explains the resistor at the top (is already replaced by an 0805 SMD resistor).

The DHT11 connects to GPIO2 and I have used GPIO0 for the DS18B20. If we look at the circuit of the module, we see that it has no pull up resistors on GPIO0 and GPIO2.

The reason for that is that the module is presumably for the ESP8266-01S that already has pull ups on GPIO0 and GPIO2, bt as I was using the regular ESP8266-01, there were no pull-ups.
The DHT11 module may boot without pullups and the DHT11 may render readings, but there will probably be an increased amount of false (‘nan’)  readings.
That can be solved by adding the appropriate 10k pull-ups to the board.
Here e.g. I have added an SMD resistor between the signal pin of the DHT11 and Vcc, which is a pull up on GPIO2 just as well.

Anyway, the extra PCB in between makes a further 3 pins available: GPIO0, GPIO1 and GPIO3. The latter 2 are ofcourse the Tx and Rx pin.
In order to use those as regular I/O pins, one needs to add the following two statements in the program:

pinMode(1, FUNCTION_3);
pinMode(3, FUNCTION_3);

A final remark on this module: realise that the DHT11 is placed close to the microprocessor, that generates heat and radiowaves. Those do affect the temperature reading. This can be up to 8-9 degrees difference. Bending out the DHT11 sensor -as shown in one of the pictures- gives much more reasonable readings.

The  method described here can also be used for some other ESP8266-01 modules that are available, such as the relay module , the DS18B20 module and the Neopixel controller (same link)


2 thoughts on “Easy expansion of a DHT11 ESP8266-01 module”

  1. Maybe you can solder wires or pins on the other side of the DHT11 board. I have this DHT11 board (and the DS18b20 one) and discovered too that the sensors are too close to ESP8266 so they warm up.
    I bought also the esp01 USB adapter that doesn’t have the switch to program it (I discovered this after bought). So I soldered pins on the other side to connect some BMP180 or BME280.

    1. Oh definitely. There are more ways to skin a cat, I just bent out the dht11 so it is further away. I considered soldering wires to the pins but that didn’t seem like a very stable solution. With a small PCB it is a bit easier to add sensors or actuators later and that’s what I wanted to show. But yes, you are fully right saying you could solder wires to the pins. There are more ways to skin a cat.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.