Cov txheej txheem:

Mini Weather Station Siv Arduino thiab ThingSpeak: 4 Kauj Ruam
Mini Weather Station Siv Arduino thiab ThingSpeak: 4 Kauj Ruam

Video: Mini Weather Station Siv Arduino thiab ThingSpeak: 4 Kauj Ruam

Video: Mini Weather Station Siv Arduino thiab ThingSpeak: 4 Kauj Ruam
Video: DIY Smart Home Weather Station - Wind, Rain, Temperature, Pressure, Humidity, Light 2024, Hlis ntuj nqeg
Anonim
Mini Weather Station Siv Arduino thiab ThingSpeak
Mini Weather Station Siv Arduino thiab ThingSpeak
Mini Weather Station Siv Arduino thiab ThingSpeak
Mini Weather Station Siv Arduino thiab ThingSpeak
Chaw Tiv Thaiv Huab Cua Mini Siv Arduino thiab ThingSpeak
Chaw Tiv Thaiv Huab Cua Mini Siv Arduino thiab ThingSpeak

Nyob zoo txhua tus. Hauv Cov Lus Qhia no, Kuv yuav coj koj hla cov kauj ruam los ua qhov chaw nres tsheb huab cua tus kheej. Tsis tas li, peb yuav siv ThingSpeak API txhawm rau xa peb cov ntaub ntawv huab cua mus rau lawv cov servers, lossis lwm yam dab tsi yog lub hom phiaj ntawm chaw nres tsheb huab cua yog tias peb tseem tsis tuaj yeem taug qab peb cov ntaub ntawv huab cua. Koj tuaj yeem tsim nws rau koj lub tsev kawm ntawv/phiaj xwm phiaj xwm lossis rau koj tus kheej nyiam, uas yog koj li. Yog li cia pib.

Ua ntej tshaj plaws, peb xav tau cov khoom hauv qab no npaj ua ntej peb pib tsim peb lub chaw nres tsheb huab cua mini. Txog tus lej cim, koj tuaj yeem tshawb xyuas cov duab hauv ntu no ntawm cov lus qhia.

Khoom siv

Arduino Uno R3

ESP8266 WiFi module

BMP180 Barometric Siab sensor

FC37 nag sensor

DHT22 Kub thiab Vaum sensor

Jumper xov hlau thiab lub hwj chim

ThingSpeak tus account

Arduino IDE Cov

Kauj ruam 1: Tsim thiab teeb tsa ThingSpeak Account

Tsim thiab teeb tsa ThingSpeak Account
Tsim thiab teeb tsa ThingSpeak Account
Tsim thiab teeb tsa ThingSpeak Account
Tsim thiab teeb tsa ThingSpeak Account
Tsim thiab teeb tsa ThingSpeak Account
Tsim thiab teeb tsa ThingSpeak Account

1. Rau kev tsim koj li ThingSpeak tus account, mus rau qhov txuas no.

2. Yog tias koj twb muaj tus as khauj lawm ces Nkag mus rau hauv lwm yam tsim tus as khauj tshiab.

3. Thaum koj nyob hauv koj lub dashboard, nyem rau 'Channel Tshiab' los tsim cov channel tshiab.

4. Nkag mus rau lub npe channel uas koj xaiv hauv kab "Npe".

5. Txheeb thawj plaub thaj chaw thiab npe lawv 'Kub', 'Vaum', 'Siab Siab', thiab 'Los nag' feem. Tawm hauv lwm qhov chaw li peb tsis xav tau lawv rau txoj haujlwm no. Ntaus lub pob 'txuag' hauv qab.

6. Tam sim no koj yuav raug coj mus rau qhov screen channel. Nyem rau ntawm 'API Keys' tab.

7. Koj yuav pom Sau API tus yuam sij thiab Nyeem API yuam sij. Txog qhov haujlwm no, peb txaus siab rau Qhov Sau API tus yuam sij. Nco tseg tus yuam sij no vim peb yuav xav tau nws tom qab.

(Rau kev siv, saib cov duab ntawm ntu no suav los ntawm 1 txog 3)

Kauj ruam 2: Kev sib txuas

Kev sib txuas
Kev sib txuas

Qhov no yog ib kauj ruam tseem ceeb heev thiab tseem ceeb heev. Ua qhov kev sib txuas ua tib zoo vim cov cuab yeej nkag siab zoo rau cov khoom siv fais fab. Yog tias muab qhov hluav taws xob ntau dhau, cov ntsuas yuav ua rau puas tas mus li. Txhawm rau kom yooj yim, txheeb xyuas cov duab ntawm ntu no. Nws muaj tag nrho cov kev sib txuas.

BMP180 ---- Arduino Uno R3 SDA PIN-A4

SCL PIN - A5

GND - NCO

3V0 - 3.3V

DHT22 ----------- Arduino Uno R3

Tus lej PIN thib 1 (VCC) ---------- 5V Cov Khoom Siv Hluav Taws Xob

Tus lej PIN thib ob (DATA) -------- D4

Tus lej PIN thib 3 (NC) --------- TSIS MUAJ

4 PIN (GND) --------- GND

Los nag sensor sib txuas (nag sensor los nrog lub vaj huam sib luag pom)

Kuv) Los nag ----------- Arduino UNO R3:

VCC ----------- 5V Cov Khoom Siv Hluav Taws Xob Pin

A0 --------------- A1

D0 -------------- D7

GND -------------- NCO

II) Los nag sensor -------------- Sensing vaj huam sib luag

+ve davhlau ya nyob twg ------------- +

-ve davhlau ya nyob twg ----------------

ESP8266 ------------------ Arduino Uno R3

RX ------------------ D3

TX ---------------------- D2

VCC & CH_EN ------------------- 3.3V

NCO ---------------------- GND

Sau ntawv: *Tus lej thib 3 ntawm DHT tsis siv.

*Hla-txheeb xyuas qhov kev sib txuas ntawm lub zog thiab cov pins hauv av ntawm txhua lub sensor nrog Arduino board.

*Koj BMP180 yuav lossis tsis muaj 5 tus pin. Qhov ntawd yog vim nws muaj ib tus pin rau +5v mov thiab lwm qhov rau +3.3V. Yog tias koj tsuas muaj ib qho, tsuas yog txuas tus pin fais fab rau +3.3V

Kauj Ruam 3: Txoj Cai thiab Kauj Ruam Kawg

1. Hauv thawj kauj ruam, koj tau sau tseg Sau API tus yuam sij los ntawm ThingSpeak. Muab tus yuam sij ntawd ua tus nqi rau kuv qhov API sib txawv hauv cov cai.

2. Sau koj li WiFi SSID (lub npe ntawm koj qhov txuas wifi) thiab tus password hauv mySSID thiab myPWD qhov hloov pauv hauv tus lej.

3. Nyem lub pob pov thawj kom paub tseeb tias cov cai tau ua haujlwm raug.

4. Tshaj tawm cov cai. Tsis tas li, kuv hais kom tshem cov pins uas muab lub zog rau lub ntsuas (3.3V thiab 5v) ua ntej rub tawm cov cai thiab rov txuas lawv tom qab ua tiav xa mus rau Arduino board.

*Nco tseg: Ua ntej sau cov cai, koj yuav xav rub tawm thiab teeb tsa cov tsev qiv ntawv uas kuv tau siv. Rub tawm lawv los ntawm cov txuas hauv qab no

DHT tsev qiv ntawv

BMP180 lub tsev qiv ntawv

Tom qab rub tawm, teeb tsa lawv los ntawm kev mus rau Sketch -> Xws li Lub Tsev Qiv Ntawv -> Ntxiv. Zip Library … hauv koj Arduino IDE.

*Koj tuaj yeem tshawb nrog cov tsev qiv ntawv hauv google thiab.

Kauj ruam 4: Yees duab

Lus Cim Tshwj Xeeb: Kuv tsim txoj haujlwm no ib xyoos dhau los. Thaum kuv kaw qhov vis dis aus no rau hnub tshaj tawm ntawm Cov Lus Qhia no, Kuv pom tias kuv BMP sensor tau sib pauv. Yog li kuv yuav tsum tau tawm tswv yim tawm BMP code thiab tshem tawm qhov siab los ntawm ThingSpeak. Tab sis BMP txoj cai yuav tsum ua haujlwm zoo yog tias koj muaj lub BMP sensor ua haujlwm tsis zoo li kuv. Ntxiv rau, Kuv tau tshuaj xyuas ib hlis dhau los thiab nws tau ua haujlwm zoo. Ua tsaug.

Pom zoo: