Home Code Raspberry Pi and SHTC1 digital humidity sensor example

Raspberry Pi and SHTC1 digital humidity sensor example

by shedboy71

In this article we look at another digital humidity sensor – this time its the SHTC1 and we will connect it to a raspberry Pi

The SHTC1 is a digital humidity sensor designed especially for high-volume consumer electronics applications. This humidity sensor is strictly designed to overcome conventional limits for size, power consumption, and price-performance ratio, in order to fulfill the current and future requirements of the consumer electronics market.

Sensirion’s CMOSens® technology offers a complete sensor system on a single chip, consisting of a capacitive humidity sensor, a band-gap temperature sensor, analog and digital signal processing, A/D converter, calibration data memory, and a digital communication interface supporting I2C fast mode. The ultra-small, 2 × 2 × 0.75 mm3 DFN package enables applications to be placed in even the most limited of spaces. The sensor covers a humidity measurement range of 0 to 100 %RH and a temperature measurement range of –30°C to 100°C with a typical accuracy of ±3 %RH and ±0.3°C.

The operating voltage of 1.8 V and an energy budget below 1 µJ per measurement make the SHTC1 suitable for mobile or wireless applications running on the lowest power budgets. With the industry-proven quality and reliability of Sensirion’s humidity sensors and constant accuracy over a large measurement range, the SHTC1 humidity sensor offers an unprecedented price-performance ratio. Tape and reel packaging together with suitability for standard SMD assembly processes make the SHTC1 predestined for high-volume applications.

Features

Interface I²C
Supply voltage 1.8 V
Power consumption 2µW (at 1 reading per second in low power mode)
Measuring range (RH) 0 – 100% relative humidity
Measuring range (T) -30 to +100°C (-22 to +212°F)
Response time (RH) 8s (tau63%)

Parts Required

 

Name Link
Raspberry Pi
SHTC1
Connecting wire Free shipping Dupont line 120pcs 20cm male to male + male to female and female to female jumper wire
sensor shield Expansion IO Board Sensor Shield

Schematic/Connection

Raspberry Pi Sensor
3v3 Vcc
Gnd Gnd
SDA SDA
SCL SCL

 

Example

Enable I2C on Your Raspberry Pi

$ sudo raspi-config
$ sudo reboot
$ ls -l /sys/bus/i2c/devices
# This should output: i2c-1

If you want to verify that the sensor is wired run i2cdetect -y 1 0x70 0x77. If everything is fine, you should see it listed at address 0x70

Now you need to load the SHTC1 driver

$ sudo modprobe shtc1
$ echo shtc1 0x70 | sudo tee /sys/bus/i2c/devices/i2c-1/new_device
$ ls /sys/bus/i2c/devices/1-0070/

To read the current temperature:

$ cat /sys/bus/i2c/devices/1-0070/hwmon/hwmon1/temp1_input
19479

…and the relative humidity:

$ cat /sys/bus/i2c/devices/1-0070/hwmon/hwmon1/humidity1_input
53398

 

You can see this in the following screen capture

Links

 

 

 

 

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More