In this example we will connect a SHT15 to an Intel Galileo.
The SHT1x digital humidity sensor is a reflow solderable sensor. The SHT1x series consists of a low-cost version with the SHT10 humidity sensor, a standard version with the SHT11 humidity sensor, and a high-end version with the SHT15 humidity sensor. As with every other Sensirion sensor type from the SHTxx humidity sensor family, they are fully calibrated and provide a digital output.
The SHT1x humidity sensor series (including SHT10, SHT11, and SHT15) is Sensirion’s family of surface-mountable relative humidity sensors. The humidity sensors integrate sensor elements plus signal processing on a tiny footprint and provide a fully calibrated digital output. A unique capacitive sensor element is used for measuring relative humidity, while temperature is measured by a band-gap sensor. Its CMOSens® technologyguarantees excellent reliability and long-term stability. The humidity sensors are seamlessly coupled to a 14-bit-analog-to-digital converter and a serial interface circuit. This results in superior signal quality, a fast response time, and insensitivity to external disturbances (EMC).
Each SHT1x humidity sensor is individually calibrated in a precision humidity chamber. The calibration coefficients are programmed into an OTP memory on the chip. These coefficients are used to internally calibrate the signals from the sensors. The two-wire serial interface and internal voltage regulation allows for easy and fast system integration.
Parts List
Label | Part Type |
---|---|
Part1 | Intel Galileo Gen2 |
Part3 | SHT1x-Breakout |
Layout
Code
This uses a library – https://github.com/practicalarduino/SHT1x
[codesyntax lang=”cpp”]
#include <SHT1x.h> // Specify data and clock connections and instantiate SHT1x object #define dataPin 10 #define clockPin 11 SHT1x sht1x(dataPin, clockPin); void setup() { Serial.begin(38400); // Open serial connection to report values to host Serial.println("Starting up"); } void loop() { float temp_c; float temp_f; float humidity; // Read values from the sensor temp_c = sht1x.readTemperatureC(); temp_f = sht1x.readTemperatureF(); humidity = sht1x.readHumidity(); // Print the values to the serial port Serial.print("Temperature: "); Serial.print(temp_c, DEC); Serial.print("C / "); Serial.print(temp_f, DEC); Serial.print("F. Humidity: "); Serial.print(humidity); Serial.println("%"); delay(2000); }
[/codesyntax]
Testing
Open the serial monitor and you should see the following
Temperature: 32.2500000000C / 89.3839950562F. Humidity: 24.01%
Temperature: 31.9999980927C / 88.9699935913F. Humidity: 24.22%
Temperature: 31.7699985504C / 88.5559921265F. Humidity: 24.43%
Temperature: 31.5699977875C / 88.1779937744F. Humidity: 24.63%
Temperature: 31.3699989319C / 87.8179931641F. Humidity: 24.91%
Temperature: 31.6099987030C / 88.7719955444F. Humidity: 30.24%
Temperature: 33.4699974060C / 91.9939956665F. Humidity: 40.98%
Temperature: 34.6299972534C / 93.9199905396F. Humidity: 46.45%
Temperature: 35.3299980164C / 95.1259918213F. Humidity: 49.57%
Links
Temperature and humidity sensor interface board floor board adapter PCB SHT10 SHT11 SHT15 B board