Basic ambient temperature and humidity sensor in enclosure

Manuel Fegerl 15/04/2019

Component list

Breadboard (z.B. 400 Pin)
1
NodeMCU Amica v2 (Bridge)
1
1,3 Zoll I2C OLED Display
1
DHT11 Sensor
1
Enclosure (100x60x25 or bigger)
1
Jumper wires

Introduction

For this project you should be able to use a saw, a file and a drill. The result of this project is a closed unit with an integrated sensor and a display for displaying temperature and humidity data of the DHT11 Sensor.

The unit is supplied with power via a micro-USB connection and can be configured and can then be configured and used with the Sense App.

Best used 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.


Result

Now the project is finished. If your microcontroller (bridge) has not yet been loaded with the Sensate firmware, follow these instructions. Once this is done, the unit can now be put into operation with the Sense App. Have fun!

In a future project we will extend the device with a mobile power supply.