Basic ambient temperature and humidity sensor in enclosure

Manuel Fegerl 15/04/2019
Wifi temperature sensor and humidity sensor to build yourself (DIY) without soldering with iOS and Android App for NodeMCU ESP8266 with DHT11 sensor


With the help of this guide you can build a temperature and humidity sensor in a housing which transmits the data via WLAN to your (Android and iOS) smartphone and helps you to protect your basement or bathroom from mould, for example. This project uses a NodeMCU Amica v2 (based on the ESP8266 microcontroller) and a DHT11 sensor. The current measurement data is also shown on the OLED display. You should be able to use a saw, a file and a drill for this project.

So that you don’t have to program it yourself, you can simply copy the Sensate firmware to the microcontroller, at the end of the manual you’ll learn more about it. With the help of the Sense App you can then easily access your data at any time (and from anywhere) and see e.g. the daily course of temperature and humidity.

Typical applications for this project:
– Temperature and humidity monitoring for the basement
– Temperature and humidity monitoring for the bathroom
– Temperature and humidity monitoring for small animal enclosures (e.g. hens or hares)
– Temperature and humidity monitoring for the holiday home

Component list

Breadboard (z.B. 400 Pin)
1,3 Zoll I2C OLED Display
Enclosure (100x60x25 or bigger)
Jumper wires

Note: As an Amazon Associate Sensate earns from qualified sales.

Best used with

Quick configure with

Quick configure with

Tools and skills

Shorten the breadboard

In order to place the breadboard in the most compact case possible, we remove the side strips that are not necessary for this project, which can easily be removed from standard breadboards.

Since there is usually an adhesive pad on the back, it may have to be cut off (e.g. with a cutter knife).

Connecting the bridge

Take the breadboard and bridge as shown and put the bridge on the red marked skirting boards. Please make sure that the USB port of the bridge is pointing downwards. The bridge must then be plugged into the pins labeled as follows:

– Left pin header: b:16 to 30
– Right pin header: i:16 to 30

Mark the housing cut-out

Since the USB socket of the bridge and possibly also the board of the bridge should protrude out of the case, the upper side of the case must be adapted at this point. Mark the recess (e.g. with a thin paint stick or a cutter knife).

Make sure that the orientation of the bridge and USB socket is correct – where the USB socket is to be placed, the recess must be much deeper than at the edge, where only the board needs to be placed.

Customize housing

Now the opening must be worked out as marked. A semicircular file and a fretsaw bow with a saw blade suitable for plastic have proven to be very versatile, practical and inexpensive tools. If more specialized tools (and suitable skills) are available, they can of course also be used.

With the saw the straight cuts are set downwards and then worked out with the file. The semicircular side or corner of the file allows deeper penetration even for narrow openings.

Mark the display cut-out

In order to draw the outlines of the display as well as possible, it makes sense to work with the display as a template. A larger rectangular opening must be made for the display itself as well as 4 mounting holes.

Display opening
The rectangular display opening is best marked from the inside. When opening the display, make sure that the display glass of commercially available OLED displays breaks very easily under lateral load, i.e. the opening should be large enough for the display. If you later try to push the display into an opening that is too small, there is a high risk of breakage.

Mounting holes
In addition to the display opening, 4 holes (3mm) are required for the mounting screws. To do this, place the display upside down on the intended position and mark the centre points of the holes (also from the inside).

Cut out of display opening

The mounting holes for the display are now drilled with a small metal drill (about 3mm). Please make sure that the drill is smaller than the screw head.

For the rectangular recess of the display, first drill a slightly larger hole (e.g. 8mm) within the display area. Be careful not to drill too close to the marked outer edge, otherwise you could see the hole later.

Now you can work out the rectangular opening e.g. with a fretsaw. The saw blade of the saw is unhinged on one side, threaded through the hole and then clamped again. Now the opening can be worked out.

Then the edges and corners are embellished with a file or – if necessary – slightly enlarged.

Mark the sensor opening

The sensor should be placed in a position suitable for the later application in the housing. A recess for the sensor itself and a hole for the mounting screw are marked.

Cut the sensor opening

For the rectangular recess of the sensor, a hole (8mm) is drilled within the marked area and the opening is then worked out with a fretsaw, as with the display, and refined with a file.

Mounting the display

Now that all necessary openings have been made in the upper part of the housing, the display can be mounted. As already mentioned before, the display glass of commercially available OLED screens is very sensitive to lateral loads, so you might need to rework the opening again if it doesn’t go out completely. And: Never press the display into the opening!

If the display is in the opening, it is fastened with 4 screws and the matching nuts. The nuts are held with the fingers, while the screws are fixed with a small screwdriver.

Mounting the sensor

To mount the sensor, a hole (about 3mm) must be drilled in the right place. The best way to do this is to position the sensor at the intended position and mark the position of the hole.

Then fix the sensor with a screw (2.5mm) and a nut.

Mark sensor opening (lower part)

Since the sensor cannot be completely accommodated in the cover, a recess must now also be marked in the bottom of the housing. To do this, it is best to place the cover on the base and mark it in the correct position.

Cut sensor opening (lower part)

Now – as before – the recess is worked out with the help of a file.

Glue in the breadboard

Now the breadboard has to be glued into the bottom of the case. Simply remove the protective paper from the adhesive pad. The breadboard should be glued so that the USB socket of the bridge protrudes from the case, so that a USB cable can be connected to the power supply later.

Connect display to bridge

Now the necessary lines for the power supply (VCC and GND) and data (SDA and SCL) are connected between display and bridge:

– VCC: Breadboard h:21 on display VCC
– GND: Breadboard h:22 on display GND
– SCA: Breadboard h:17 on display SDA
– SCL: Breadbiard h:18 on display SCL

Connect sensor to bridge

The bridge is now connected to the sensor as shown:

– VC: Breadboard h:30 on Sensor: VC
– Data: Breadboard h:20 on Sensor: Data
– GND: Breadboard h:29 on Sensor: GND

Close enclosure

Now the housing is closed. Make sure that no cables are jammed, especially at the openings provided for the housing screws.

If the connectors for sensors and display are a little too high, bend them carefully to the side.

After everything has been stowed away, the housing is fixed with the enclosed screws.


If your microcontroller (bridge) has not yet been loaded with the Sensate firmware, follow this guide. After that the device is fully functional and can now be configured and used with the Sense App.

Within the Sense App you can then view the current measurement data as well as the time history. If the sensor is placed e.g. in the bathroom, you will clearly see the temperature and humidity curves when someone showered or when the room has been ventilated. If you want to be informed automatically about the exceeding or falling below of limit values (e.g. in case of danger of mould) you can do this with the help of the IFTTT integration.

Diese Seite ist auch auf Deutsch verf├╝gbar: Jetzt wechseln ×