Unpacking: shield SHT30 (temperature and humidity) for Wemos D1 Mini [Exclusive Guide]

3:19 pm April 19, 20177472

the sensor of temperature and humidity DHT22 (and its little brother the DHT11) are ubiquitous in the Arduino tutorials / ESP8266 / Raspberry Pi. You also know very definitely of Dallas DS18b20, which uses the 1-Wire Protocol. Wemos offers us a new expansion card, the Shield SHT30 . The Sensirion SHT30 is a miniature sensor. In addition to its small size which allows to obtain a flat shield, the SHT30 communicates with the Wemos mini d1 on the I2C bus. It’s a great advantage for the ESP8266 which for many fewer pins than the Arduino.

Sold less than € 3 live in Asia, the SHT30 shield comes in an anti-static bag. Unlike the other Shields family , it is delivered with a single type of connector at 2.54 mm No.

deballage shield sht30 wemos d1 mini

The technical documentation of the manufacturer Sensirion is available here . The SHT30 (and its big brother, the SHT31) is capable of measuring the temperature within a range of-40 ° C to + 125 ° C. The humidity can be measured from 0 to 100%. The accuracy of measurement depends on the temperature. Around the ambient (-10 ° C to + 55 ° C), temperature measurement accuracy is ±0, 3 ° C.

shield sht30 wemos d1 mini courbe precision mesure temperature
Source: https://www.wemos.cc/sites/default/files/2016-11/SHT30-DIS_datasheet.pdf

note. The SHT31 offers a better accuracy of measurement of moisture.

When I got the shield in my hands, I found damage to solder the connectors. So I tried to Tin the edges of pins GND, 3V3, D1 and D2 (used by the I2C-bus). I then stacked the card on a Shield OLED. The result is an extremely compact Assembly. Bottom-up:

shield sht30 wemos d1 mini stack oled battery

Attention. Seamless installation can prevent the SHT30 Shield to function properly. Problems, return to a classic montage

Wemos put at disposal a library that can be recovered on GitHub here . First download the deposit before you unzip it in the folder Library of the Arduino IDE. Restart the IDE so that the latter takes into account the bookstore.

Basic program

a basic example (SHT30_Shield.ino) comes with the library. It shows how to retrieve the measurement of temperature and humidity. We call the WEMOS_SHT3X library at the beginning of program

by default, the SHT30 is available at the address 0 x 45. To use address 0 x 44, he will have to make a point of solder on jumper ADDR

then just call the function sht30 . get () to get the measures. It also features three public classes that allow to retrieve the measures:

  • sht30.cTemp for the temperature in Celcius
  • sht30.fTemp for the temperature in Fahrenheit
  • sht30.humidity for the humidity

Probe with display OLED 64 × 48 pixels

the Shield being installed below a Shield OLED ( presented previously ), I propose a small program to display the temperature and humidity on the latter. To work, it is necessary to manually include the Adadruit_SSD1306 library modified by Mike caused available on Github here .

The Shield SHT30 for so many strengths. The price is equivalent to the DHT22 Shield (about €2.90 instead of €2.77 ). It uses the I2C-bus to communicate with the Wemos saving a PIN. Finally, the Shield is extremely compact. It can be sandwiched between 2 other shields. Small flat for beginners, this sensor being less replied, you find fewer examples and no plugin ESP Easy for yet been developed.