Cov txheej txheem:

TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11: 5 Cov kauj ruam
TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11: 5 Cov kauj ruam

Video: TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11: 5 Cov kauj ruam

Video: TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11: 5 Cov kauj ruam
Video: DHT11 Temperature & Humidity sensor with Arduino - Tutorial 2024, Kaum ib hlis
Anonim
TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11
TEMPERATURE AND HUMIDITY MEASUREMENT USS DHT 11

Hauv txoj haujlwm no, Kuv tab tom siv DHT 11 qhov ntsuas kub thiab av noo los ntsuas peb qhov kub ib puag ncig nrog rau cov av noo siv Arduino (Nano).

Qee yam ntawm cov hauv paus hluav taws xob yam ntxwv:

Ua haujlwm VOLTAGE: 3.5V-5V

Tam sim no (ntsuas): 0.3 mA

Tam sim no (tos): 60 micro amps

RANGE: 0 txog 50 degree Celsius

RESOLUTION: 16 ntsis

SAMPLING PERIOD:> 2 ms

Kauj Ruam 1: TSEV KAWM NTAWV

TSHIAB SCHEMATIC
TSHIAB SCHEMATIC
TSHIAB SCHEMATIC
TSHIAB SCHEMATIC

Hauv qhov kev piav qhia no siv DHT11 lub ntsuas nrog 5k (ohm) rub tawm tus tiv thaiv rau cov ntaub ntawv kab.

PINS:

Liab WIRE TO +VCC

LOJ LOJ RAU GND

YELLOW WIRE nrog 5 K RESISTOR

Tus lej 3 yog TSIS TXAUS SIAB

QHOV TSEEM CEEB:

1. Arduino

2. DHT11 ntsuas cua thiab av noo

3.5 k ohm tus tiv thaiv

Kuv tab tom siv DHT11 Nrog Kev Ruaj Ntseg Thiab Tus CAPACITOR rau rub tawm thiab ua kom lub ntsej muag nkag siab VOLTAGE RESPECTELY.

Kauj Ruam 2: ZOO SIAB SIJ HAWM-KEV TSO CAI

ZOO SIAB ZOO TSHAJ PLAWS-CONNECTIONS
ZOO SIAB ZOO TSHAJ PLAWS-CONNECTIONS

Kuv tau txuas nrog tus pin raws li

5v - +VCC

GND - NCO

tus lej digital 2 - DATA PIN

Kauj Ruam 3: ZOO SIAB ZOO SIAB-CODE

ZOO SIAB ZOO SIAB-CODE
ZOO SIAB ZOO SIAB-CODE
ZOO SIAB ZOO SIAB-CODE
ZOO SIAB ZOO SIAB-CODE
ZOO SIAB ZOO SIAB-CODE
ZOO SIAB ZOO SIAB-CODE

Siv Arduino IDE peb tuaj yeem tsim kho peb pawg Arduino

tab sis xub rub tawm thiab teeb tsa lub tsev qiv ntawv rau DHT sensors..

lub hom phiaj ntawm rub tawm lub tsev qiv ntawv yog txhawm rau txo qhov nyuaj ntawm cov cai.

Kuv tab tom rub lub tsev qiv ntawv hu ua SIMPLEDHT nws txaus.

tom qab kev txhim kho lub tsev qiv ntawv los ntawm nyem rau nruab khawm.

qhib cov ntaub ntawv-piv txwv- simpledht-dht11 default.

Kuv siv DHT11. yog tias koj tab tom siv DHT22 kuj tseem muaj qhov piv txwv piv txwv hauv qab no.. TAB SIS …

tom qab qhib qhov chaws. txuas Arduino board rau koj lub computer, thiab xaiv PORT. thiab upload cov duab piv txwv.

xyuas kom koj txuas cov ntaub ntawv tus pin rau tus pin digital ntawm Arduino..

CODE PART YUAV TSUM TAU

Kauj Ruam 4: ZOO TSHAJ PLAWS - teeb tsa

Zaum Kawg - Teem caij
Zaum Kawg - Teem caij
ZOO TSHAJ PLAWS - TSEV
ZOO TSHAJ PLAWS - TSEV

tom qab rub tawm cov cai qhib qhov saib ua ntej.

koj yuav pom tias lub sensor xa cov ntaub ntawv.

tsis ntau nyuaj txoj cai?

Kauj ruam 5: Ua haujlwm

Raws li kuv tau hais tias lub sensor xa tawm 40 ntsis

8 ntsis cov ntaub ntawv cov av noo + 8 ntsis cov ntaub ntawv zauv zauv zauv zauv + 8 ntsis cov ntaub ntawv ntsuas kub kub + 8 me ntsis kub cov ntaub ntawv feem feem + 8 ntsis zauv zauv = 40 ntsis

Piv txwv 1: 40 cov ntaub ntawv tau txais:

0011 0101 0000 0000 0001 1000 0000 0100 1101

Xam : 0011 0101+0000 0000+0001 1000+0000 0000 = 0100 1101

Tau txais cov ntaub ntawv raug

Vaum: 0011 0101 = 35H (hex) = 53%RH

Kub : 0001 1000 = 18H (hex) = 24 ℃.

SOURCE:-

media.digikey.com/pdf/Data%20Sheets/Adafruit%20PDFs/DHT11_ProdManual.pdf

UA TSAUG NTAU NTUJ

Yog tias koj pom qhov ua yuam kev thov sau hauv COMMENTS.

Yog li kuv tuaj yeem hloov kho nws.

Vim kuv yog ib tug kws kho tsiaj.

Hauv qhov haujlwm tom ntej Kuv tuaj yeem siv LCD Zaub rau Zaub TEMPERATURE.

NYOB ZOO KAWG GUYSS ………………..

Pom zoo: