David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 1 | Kernel driver sht3x |
| 2 | =================== |
| 3 | |
| 4 | Supported chips: |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 5 | |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 6 | * Sensirion SHT3x-DIS |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 7 | |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 8 | Prefix: 'sht3x' |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 9 | |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 10 | Addresses scanned: none |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 11 | |
Danilo Bargen | b20edea | 2018-02-02 11:42:35 +0100 | [diff] [blame] | 12 | Datasheet: https://www.sensirion.com/file/datasheet_sht3x_digital |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 13 | |
| 14 | Author: |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 15 | |
| 16 | - David Frey <david.frey@sensirion.com> |
| 17 | - Pascal Sachs <pascal.sachs@sensirion.com> |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 18 | |
| 19 | Description |
| 20 | ----------- |
| 21 | |
| 22 | This driver implements support for the Sensirion SHT3x-DIS chip, a humidity |
| 23 | and temperature sensor. Temperature is measured in degrees celsius, relative |
| 24 | humidity is expressed as a percentage. In the sysfs interface, all values are |
| 25 | scaled by 1000, i.e. the value for 31.5 degrees celsius is 31500. |
| 26 | |
| 27 | The device communicates with the I2C protocol. Sensors can have the I2C |
| 28 | addresses 0x44 or 0x45, depending on the wiring. See |
Mauro Carvalho Chehab | ccf988b | 2019-07-26 09:51:16 -0300 | [diff] [blame] | 29 | Documentation/i2c/instantiating-devices.rst for methods to instantiate the device. |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 30 | |
| 31 | There are two options configurable by means of sht3x_platform_data: |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 32 | |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 33 | 1. blocking (pull the I2C clock line down while performing the measurement) or |
| 34 | non-blocking mode. Blocking mode will guarantee the fastest result but |
| 35 | the I2C bus will be busy during that time. By default, non-blocking mode |
| 36 | is used. Make sure clock-stretching works properly on your device if you |
| 37 | want to use blocking mode. |
| 38 | 2. high or low accuracy. High accuracy is used by default and using it is |
| 39 | strongly recommended. |
| 40 | |
| 41 | The sht3x sensor supports a single shot mode as well as 5 periodic measure |
| 42 | modes, which can be controlled with the update_interval sysfs interface. |
| 43 | The allowed update_interval in milliseconds are as follows: |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 44 | |
| 45 | ===== ======= ==================== |
| 46 | 0 single shot mode |
| 47 | 2000 0.5 Hz periodic measurement |
| 48 | 1000 1 Hz periodic measurement |
| 49 | 500 2 Hz periodic measurement |
| 50 | 250 4 Hz periodic measurement |
| 51 | 100 10 Hz periodic measurement |
| 52 | ===== ======= ==================== |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 53 | |
| 54 | In the periodic measure mode, the sensor automatically triggers a measurement |
| 55 | with the configured update interval on the chip. When a temperature or humidity |
| 56 | reading exceeds the configured limits, the alert attribute is set to 1 and |
| 57 | the alert pin on the sensor is set to high. |
| 58 | When the temperature and humidity readings move back between the hysteresis |
| 59 | values, the alert bit is set to 0 and the alert pin on the sensor is set to |
| 60 | low. |
| 61 | |
| 62 | sysfs-Interface |
| 63 | --------------- |
| 64 | |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 65 | =================== ============================================================ |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 66 | temp1_input: temperature input |
| 67 | humidity1_input: humidity input |
| 68 | temp1_max: temperature max value |
| 69 | temp1_max_hyst: temperature hysteresis value for max limit |
| 70 | humidity1_max: humidity max value |
| 71 | humidity1_max_hyst: humidity hysteresis value for max limit |
| 72 | temp1_min: temperature min value |
| 73 | temp1_min_hyst: temperature hysteresis value for min limit |
| 74 | humidity1_min: humidity min value |
| 75 | humidity1_min_hyst: humidity hysteresis value for min limit |
| 76 | temp1_alarm: alarm flag is set to 1 if the temperature is outside the |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 77 | configured limits. Alarm only works in periodic measure mode |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 78 | humidity1_alarm: alarm flag is set to 1 if the humidity is outside the |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 79 | configured limits. Alarm only works in periodic measure mode |
Matt Ranostay | 50c22cd | 2016-07-09 23:49:18 -0700 | [diff] [blame] | 80 | heater_enable: heater enable, heating element removes excess humidity from |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 81 | sensor: |
| 82 | |
| 83 | - 0: turned off |
| 84 | - 1: turned on |
David Frey | 7c84f7f | 2016-06-02 09:59:11 +0200 | [diff] [blame] | 85 | update_interval: update interval, 0 for single shot, interval in msec |
Mauro Carvalho Chehab | b04f2f7 | 2019-04-17 06:46:28 -0300 | [diff] [blame] | 86 | for periodic measurement. If the interval is not supported |
| 87 | by the sensor, the next faster interval is chosen |
| 88 | =================== ============================================================ |