Cov txheej txheem:

Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak: 7 Kauj Ruam
Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak: 7 Kauj Ruam

Video: Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak: 7 Kauj Ruam

Video: Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak: 7 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak
Saib Xyuas Huab Cua Siv ESP32_DHT11_OLED_Thingspeak

Hauv qhov kev qhia no, koj yuav tsim lub ntsuas huab cua uas saib xyuas qhov kub thiab txias, siv ESP32 thiab DHT11, Nws tau tshwm rau hauv OLED zaub. Thiab nws tau tshaj tawm rau ThingSpeak.

ESP32 yog lub cuab yeej muaj zog IOT. Nws yog tus nqi qis-system-on-chip (SoC) series tsim los ntawm Espressif Systems. Nws yog kev txhim kho ntawm ESP8266 nrov uas tau siv dav hauv IoT cov phiaj xwm. ESP32 muaj ob lub Wi-nkaus thiab Bluetooth muaj peev xwm, uas ua rau nws yog tag nrho cov khoom sib npaug rau kev txhim kho ntawm IoT cov phiaj xwm thiab teeb tsa cov txheej txheem feem ntau.

DHT11 qhov ntsuas kub thiab av noo yog qhov zoo me me uas muab cov ntsuas kub thiab av noo nyeem. Nws yooj yim heev los teeb tsa, thiab tsuas yog xav tau ib lub xaim rau cov ntaub ntawv teeb liab. Cov ntsuas no tau nrov rau siv hauv cov chaw huab cua nyob deb, saib hauv av, thiab tshuab hauv tsev.

ThingSpeak yog Open-Source IoT daim ntawv thov thiab API khaws thiab khaws cov ntaub ntawv los ntawm Cov cuab yeej khoos phis tawj thiab lub ntsej muag. Nws siv HTTP raws tu qauv hauv Is Taws Nem lossis LAN rau nws kev sib txuas lus. MATLAB kev tshuaj xyuas suav nrog txhawm rau txheeb xyuas thiab pom cov ntaub ntawv tau txais los ntawm koj li cuab yeej khoos phis tawj lossis lub cuab yeej ntsuas.

Peb tuaj yeem tsim cov channel rau txhua tus thiab txhua cov ntaub ntawv sensor. Cov channel no tuaj yeem teeb tsa ua cov channel ntiag tug lossis koj tuaj yeem faib cov ntaub ntawv tshaj tawm los ntawm Public channels. Cov lag luam muaj cov yam ntxwv ntxiv. Tab sis peb yuav siv cov dawb version raws li peb ua rau lub hom phiaj kev kawm.

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau

Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau

1. ESP32: -The ESP-WROOM-32 yog lub zog loj, muaj txiaj ntsig zoo rau WiFi-BT-BLE MCU module uas tsom mus rau ntau yam kev siv xws li los ntawm lub zog ntsuas hluav taws xob sib txuas mus rau qhov xav tau tshaj plaws xws li lub suab nkag, suab paj nruag thiab MP3 txiav txim siab.

2. DHT11 Humidity/ Kub Sensor:- Qhov ntsuas no muaj qhov ntsuas ntsuas cov teeb liab digital nrog qhov ntsuas kub thiab av noo. Nws tau koom ua ke nrog kev ua haujlwm siab 8-ntsis microcontroller. Qhov ntsuas no suav nrog lub hauv paus tiv thaiv thiab lub ntsuas rau ntub NTC ntsuas cov ntsuas kub. Nws muaj qhov ua tau zoo tshaj plaws, teb tau sai, muaj peev xwm tiv thaiv kev cuam tshuam thiab ua haujlwm tau zoo.

3. OLED; -Qhov OLED chav tsev no yog ua raws SSD1306 tuaj yeem pom kev pom tus kheej, nrog kev daws teeb meem siab ntawm 128 ∗ 64 thiab Saib lub kaum sab xis ntau dua 160 degree.

4. CP2102:- CP2102 nti los ntawm SiLabs yog ib qho nti USB rau UART choj IC. Nws xav tau yam tsawg sab nraud. CP2102 tuaj yeem siv rau kev txav chaw qub txeeg qub teg chaw nres nkoj raws li cov cuab yeej rau USB. Cov qauv no pab txhua tus uas nyiam nrog RS232/Cov Txheej Txheem Kev Sib Txuas Lus, tsim USB cov cuab yeej yooj yim heev.

5. Jumper Xov

Kauj Ruam 2: Txuas Cov Khoom Siv Ua Ke

Txuas Cov Khoom Siv Ua Ke
Txuas Cov Khoom Siv Ua Ke

Txuas cov khoom siv raws li qhia hauv daim duab kab hluav taws xob.

Kauj ruam 3: Ntshuam ESP32

Ntshuam ESP32
Ntshuam ESP32

Thawj kauj ruam yog ntshuam ESP32 pawg thawj coj mus rau Arduino IDE. Nov yog yuav teeb tsa Arduino IDE yog li peb tuaj yeem suav sau rau ESP32:

Kauj Ruam 4: Txhim Kho Tsev Qiv Ntawv

Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv
Txhim Kho Tsev Qiv Ntawv

1. Txhim kho DHT11 Library

Ntawm Arduino IDE >> Xaiv Sketch >> Xws li Lub Tsev Qiv Ntawv >> Tswj Lub Tsev Qiv Ntawv >> dht sensor lub tsev qiv ntawv

2. Txhim kho SSDI306 Library.

Ntawm Arduino IDE >> Xaiv Sketch >> suav nrog Lub Tsev Qiv Ntawv >> Tswj Tsev Qiv Ntawv >> ssd1306

3. Txhim Kho Adafruit GFX Library

Ntawm Arduino IDE >> Xaiv Sketch >> suav nrog Lub Tsev Qiv Ntawv >> Tswj Tsev Qiv Ntawv >> adafruit gfx

Kauj Ruam 5: Txhim Kho ThingSpeak

ThingSpeak teeb tsa
ThingSpeak teeb tsa
ThingSpeak teeb tsa
ThingSpeak teeb tsa
ThingSpeak teeb tsa
ThingSpeak teeb tsa

Kauj ruam 1: Mus rau https://thingspeak.com/ thiab tsim koj li ThingSpeak Account yog tias koj tsis muaj. ID nkag mus rau koj tus account.

Kauj ruam 2: Tsim Channel los txhaj 'Channel Tshiab

Kauj ruam 3: Nkag mus rau cov ntsiab lus channel.

Npe: Txhua Lub Npe

Nqe lus piav qhia: Tsis teb los tau

Teb 1: Kub, Teb 2: Vaum - Qhov no yuav muab tso rau ntawm daim duab ntsuas. Yog tias koj xav tau ntau dua 2 Channels koj tuaj yeem tsim rau Cov Ntaub Ntawv ntxiv. Txuag qhov chaw no.

Kauj ruam 4: Tam sim no koj tuaj yeem pom cov channel. Nyem rau ntawm 'API Keys' tab. Ntawm no koj yuav tau txais Channel ID thiab API Keys. Nco tseg qhov no.

Kauj Ruam 5: Qhib Arduino IDE thiab teeb tsa Lub Tsev Hais Lus ThingSpeak. Txhawm rau ua qhov no mus rau Sketch> suav nrog Tsev Qiv Ntawv> Tswj Tsev Qiv Ntawv. Tshawb nrhiav ThingSpeak thiab teeb tsa lub tsev qiv ntawv. ThingSpeak Kev Sib Txuas Tsev Qiv Ntawv rau Arduino, ESP8266 thiab ESP32 https://thingspeak.com Kauj Ruam 6: Yuav tsum hloov kho tus lej. Hauv cov lej hauv qab no koj yuav tsum hloov koj li Network SSID, Tus lej password thiab koj Cov Lus Tshaj Tawm Channel thiab API Keys.

Kauj ruam 6: Source Code

NCO NTSOOV: Ua ntej rub tawm cov kab hauv qab no hauv qab kab (56, 57) yuav tsum tau hloov pauv nrog koj tus kheej ThingSpeak Channel ID thiab API Key

//***********************************//

unsigned ntev myChannelNumber = SECRET_CH_ID;

const char * myWriteAPIKey = SECRET_WRITE_APIKEY;

//***********************************//

Code:

Kauj Ruam 7: Tso Tawm

Tso zis
Tso zis

Cov zis yuav zoo li cov duab saum toj no hauv ThingSpeak. Vam tias qhov no ua rau koj yooj yim dua. Nco ntsoov sau npe yog tias koj nyiam kab ntawv no thiab pom nws muaj txiaj ntsig, thiab yog tias koj muaj lus nug lossis xav tau kev pab nrog dab tsi, tsuas yog tawm lus tawm hauv qab no.

Ua tsaug rau elementzonline.com

Pom zoo: