ePrivacy and GPDR Cookie Consent by TermsFeed Generator Home Automation System - Temperature sensor with SONOFF mini - Hardware connection | OpenHAB - SmartHome | DomoticsDuino - Computer engineer, Smart Home / OpenHAB, Flight Sim and others...
OpenHAB - SmartHome (224 posts)

25/05/2020

Home Automation System - Temperature sensor with SONOFF mini - Hardware connection [Versione in italiano]

by Marco Lamanna

After preparing our SONOFF Mini from a software point of view, with TASMOTA Lite custom version, compiled by adding support to the DHT11 sensor (see my previous post /en/blog/1/iot-smarthome/post/2020/05/home-automation-system-temperature-sensor-sonoff-mini-software-setup.html) the time has come to run the complete system and check that everything is working as expected.

Let's start by analyzing the SONOFF Mini to understand which GPIO it uses for the data transfer and to find the pins to power the DHT11. Looking at the official documentation of TASMOTA, on the page dedicated to the SONOFF Mini (https://tasmota.github.io/docs/devices/Sonoff-Mini), we can find the indications for all the GPIO on the board. So let's identify 5V and GPIO2 on the back of the device, while we take the GND directly from the S1 contact.

So let's open the SONOFF Mini ... no screws, only interlocking plastics ...on the board we can find the GPIO valid for our purpose, two touches of precise welding (the contacts are very small) and we attach the cables which will then be connected to the DHT11

Red line => 5V, yellow line => GPIO2

We make a small hole in the plastic of the SONOFF Mini to allow the cables to go out from the box. Here is the final result:

You could have done better ... I know ... but manual operations are not my best skill :)

Now let's connect the DHT11 to the two cables just connected to the SONOFF Mini and to the S1 terminal for GND.

The yellow cable (GPIO2) must be connected to the data pin of the DHT11, the red cable goes to VCC and the terminal S1 to GND

We connect the SONOFF Mini to the main voltage via the Lin and Nin terminals and switch it on.

In the web configuration panel we set the GPIO2 with the DHT11 sensor and save.

We cross our fingers and at the next restart we should see the temperature and humidity data transmitted from DHT11

Here we are...our SONOFF Mini is ready for "production"