samples/sensor/sgp40_sht4x/README.html · samples/sensor/sgp40_sht4x/README.rst 공식 원문 ↗

Zephyr 3.7.0 · Samples · Sensor · Environment

SGP40 gas + SHT4X humidity

두 I2C sensor를 함께 사용해 T/RH 보정된 raw gas signal을 측정합니다.

Official pathsamples/sensor/sgp40_sht4x/README.html
Source filesamples/sensor/sgp40_sht4x/README.rst
Source versionZephyr 3.7.0
TranslationFull · reviewed

본문 기준: Zephyr 3.7.0 LTS3 · 이후 유지보수 패치는 별도입니다.

Part 1

요약·해설

Compensation switch, heater option, supply·pull-up과 arbitrary-unit 의미를 설명합니다.

Sensors

SGP40 + SHT4X

Supply

1.7-3.6 V

Gas

Raw [a.u.]

Part 2

접을 수 있는 영어 원문 전체

영어 원문 전체 펼치기
원문 SHA-256 605797165F18840F57B4C7EFA402D24C8FFD1BABDE0F8DD82FB36A9EB667517F
.. _sgp40_sht4x:

SGP40 and SHT4X: High accuracy digital I2C humidity sensor and multipixel gas sensor
####################################################################################

Description
***********

This sample application periodically measures the ambient temperature, humidity
and a raw gas sensor value from an SGP40 and SHT4X device.
The result is written to the console.

You can choose to use the on-chip T/RH compensation of the SGP40
by feeding the values measured by the SHT4X into it.
This is enabled in the Application by default, you can turn it off
by setting ``APP_USE_COMPENSATION=n``.

The SHT4X has the option to use a heater which makes sense for specific
environments/applications (refer to the datasheet for more information).
To make use of the heater have a look at the Kconfig options for this application.


References
**********

 - `SHT4X sensor <https://www.sensirion.com/en/environmental-sensors/humidity-sensors/humidity-sensor-sht4x/>`_
 - `SGP40 sensor <https://www.sensirion.com/en/environmental-sensors/gas-sensors/sgp40/>`_

Wiring
******

This sample uses the SHT4X and SGP40 sensor controlled using the I2C interface.
Connect Supply: **VDD**, **GND** and Interface: **SDA**, **SCL**.
The supply voltage can be in the 1.7V to 3.6V range.
Depending on the baseboard used, the **SDA** and **SCL** lines require Pull-Up
resistors.

Building and Running
********************

This project outputs sensor data to the console. It requires a SHT4X and a SGP40
sensor. It should work with any platform featuring a I2C peripheral
interface. This example has an example device tree overlay
for the :ref:`blackpill_f411ce` board.


.. zephyr-app-commands::
   :zephyr-app: samples/sensor/sgp40_sht4x
   :board: blackpill_f411ce
   :goals: build flash


Sample Output
=============

.. code-block:: console

        *** Booting Zephyr OS build v2.6.0-rc1-315-g50d8d1187138  ***
        SHT4X: 23.64 Temp. [C] ; 30.74 RH [%] -- SGP40: 30531 Gas [a.u.]
        [00:00:00.250,000] <dbg> SGP40.sgp40_init: SGP40: Selftest succeeded!
        SHT4X: 23.66 Temp. [C] ; 32.16 RH [%] -- SGP40: 30541 Gas [a.u.]
        SHT4X: 23.63 Temp. [C] ; 30.83 RH [%] -- SGP40: 30522 Gas [a.u.]

The datasheet states that the raw sensor signal for the SGP40 ist proportional
to the logarithm of the sensors resistance, hence it is labeled as [a.u.]
(arbitrary units) in the example.

Part 3

한국어 전문 번역

설명

이 sample application은 SGP40과 SHT4X device에서 ambient temperature, humidity와 raw gas-sensor value를 주기적으로 측정해 console에 기록합니다.

SHT4X가 측정한 temperature·relative-humidity 값을 SGP40에 입력해 SGP40 on-chip T/RH compensation을 사용할 수 있습니다. Application에서는 기본으로 활성화되어 있으며 APP_USE_COMPENSATION=n을 설정하면 끌 수 있습니다.

SHT4X에는 특정 environment나 application에서 유용한 heater option이 있습니다. 자세한 용도는 datasheet를 참조하고 heater 사용 설정은 이 application의 Kconfig option을 확인하십시오.

참고 자료

배선

이 sample은 I2C interface로 SHT4X와 SGP40 sensor를 제어합니다. Supply pin VDD·GND와 interface pin SDA·SCL을 연결하십시오. Supply voltage 범위는 1.7 V에서 3.6 V입니다. 사용하는 baseboard에 따라 SDA·SCL line에 pull-up resistor가 필요합니다.

빌드 및 실행

이 project는 sensor data를 console에 출력하며 SHT4X와 SGP40 sensor가 모두 필요합니다. I2C peripheral interface가 있는 모든 platform에서 동작해야 하며, 이 예에는 blackpill_f411ce용 Devicetree overlay가 제공됩니다.

# From the root of the zephyr repository
west build -b blackpill_f411ce samples/sensor/sgp40_sht4x
west flash

출력 예

*** Booting Zephyr OS build v2.6.0-rc1-315-g50d8d1187138  ***
SHT4X: 23.64 Temp. [C] ; 30.74 RH [%] -- SGP40: 30531 Gas [a.u.]
[00:00:00.250,000] <dbg> SGP40.sgp40_init: SGP40: Selftest succeeded!
SHT4X: 23.66 Temp. [C] ; 32.16 RH [%] -- SGP40: 30541 Gas [a.u.]
SHT4X: 23.63 Temp. [C] ; 30.83 RH [%] -- SGP40: 30522 Gas [a.u.]

SGP40 datasheet에 따르면 raw sensor signal은 sensor resistance의 logarithm에 비례합니다. 따라서 예제에서는 절대 단위가 아닌 [a.u.], 즉 arbitrary units로 표시합니다.

Source

출처

영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.