This article documents a first project with the Espressif ESP8266 in its third evolution (based on ESP8266 IoT DHT22 temperature and humidity – evolution 2).
The objective is a module that will take periodic temperature and humidity measurements, and in this evolution publish them using a RESTful API.
The example platform used in this article is a Wemos D1Pro. In this case, the D1Pro is configured for an external antenna, and a modification is made to the board to add a 1N34A diode for the deep sleep reset circuit (NodeMCU devkit V1 deep sleep). A three pin right angle header to the top of the board (as seen) and another on the underside on the opposite edge to get GND, +5, +3, and D4 for the DHT22 data wire. There is less than $20 in parts in the pic above.
The ESP8266 is not 5V tolerant, so the DHT22 should be powered from the 3V supply.
Above is the waveform on the DHT22 data pin.
The code as it evolves is available online https://github.com/owenduffy/dht22iotr .
Above is a screenshot of graphs from Thingspeak of temperature and humidity in our green house through the middle of a Winter’s day at 1min intervals.
The intended deployment of this is in the greenhouse, hence the higher gain antenna, and it will be set for 10min intervals to reduce battery / solar requirements.
The MQTT version is also under active development, the code as it evolves is available online https://github.com/owenduffy/dht22iotm .