Arduino与Proteus仿真实例-SHT7x温度湿度传感器驱动仿真

SHT7x温度湿度传感器驱动仿真

1、SHT7x介绍

SHT7x传感器通过独特的电容传感器元件用于测量相对湿度,而温度则由带隙传感器测量。传感器以紧凑的形式集成传感器元件和信号处理,并提供完全校准的数字输出。这使得 SHT7x 湿度传感器易于更换,因此不再需要单独校准。 SHT7x 的独特设计可实现与环境的最佳热耦合,并与主板上的潜在热源分离。与单独的精度校准、片上校准存储器和数字两线接口相结合,这保证了在要求苛刻的应用中尽可能实现最佳传感器性能,并具有简单快速的系统集成。

易于更换和低功耗使 SHT7x 湿度传感器系列成为即使是最苛刻应用的最终选择。 SHT7x 湿度传感器系列在带引脚的 FR4 上提供,旨在实现最佳性能。同样的传感器也可用作 SMD 封装 (SHT1x)。

在这里插入图片描述

SHT7x系列的区别如下:

在这里插入图片描述

SHT7x引脚功能如下:

在这里插入图片描述

2、仿真电路原理图

在这里插入图片描述

3、仿真代码实现

本次实例使用到如下开源库:

演示代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <Sensirion.h>

const uint8\_t dataPin = 3;
const uint8\_t clockPin = 2;

float temperature;
float humidity;
float dewpoint;

Sensirion tempSensor = Sensirion(dataPin, clockPin);

void setup()
{
Serial.begin(9600);
}

void loop()
{
tempSensor.measure(&temperature, &humidity, &dewpoint);

Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" C, Humidity: ");
Serial.print(humidity);
Serial.print(" %, Dewpoint: ");
Serial.print(dewpoint);
Serial.println(" C");

delay(1000);
}

4、仿真结果

文章来源: https://iotsmart.blog.csdn.net/article/details/121512701