Cov txheej txheem:

Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak: 4 Cov Kauj Ruam
Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak: 4 Cov Kauj Ruam

Video: Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak: 4 Cov Kauj Ruam

Video: Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak: 4 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak
Kev Saib Xyuas Huab Cua Siv NodeMCU thiab IOT Thingspeak

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.

(Yog tias koj xav kawm paub ntau ntxiv txog ThingSpeak feem ntau, thiab/lossis Txoj Haujlwm, mus ntsib

Nta:

  1. Sau cov ntaub ntawv hauv cov chaw ntiag tug.
  2. Qhia tawm Cov Ntaub Ntawv nrog Cov Pej Xeem
  3. REST API thiab MQTT APIS
  4. MATLAB® Txheeb Xyuas thiab Pom Kev Pom.
  5. Ntiaj Teb Zej Zog

Hauv qhov kev qhia no, siv MQ3 Alcohol sensor los npaj nws cov txiaj ntsig ntawm ThingSpeak siv NodeMCU. Hauv qhov haujlwm no NodeMCU los nyeem thiab khaws cov ntaub ntawv sensor mus rau qhov sib txawv thiab tom qab ntawd rub nws mus rau ThingSpeak siv nws lub npe channel thiab API yuam sij. NodeMCU yuav tsum txuas nrog internet ntawm Wi-nkaus. Peb yuav pom yuav ua li cas Tsim ThingSpeak Channels thiab teeb tsa nws ntawm NodeMCU.

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau

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

Yuav tsum tau kho vajtse

  1. NodeMCU
  2. MQ-3 Cawv Sensor
  3. 5V Fais Fab Khoom
  4. Jumper Hlau
  5. Breadboard (Tsis teb los tau)

NodeMCU LUA WiFi Internet ESP8266 Development Board: NodeMCU Dev Kit/board muaj ESP8266 wifi qhib nti. ESP8266 yog tus nqi qis Wi-nkaus nti tsim los ntawm Espressif Systems nrog TCP/IP raws tu qauv. Yog xav paub ntxiv txog ESP8266, koj tuaj yeem xa ESP8266 WiFi Module.

MQ-3 Alcohol Sensorr: Cov qauv no tau tsim los siv Alcohol Gas Sensor MQ3. Nws yog tus nqi qis semiconductor sensor uas tuaj yeem kuaj pom tias muaj cov cawv cawv ntawm qhov ntau ntawm 0.05 mg/L txog 10 mg/L. Cov khoom siv rhiab siv rau lub ntsuas cua no yog SnO2, nws qhov kev coj ua qis dua hauv huab cua huv. Nws qhov kev coj ua nce ntxiv raws li qhov ua kom cov cawv muaj roj ntau ntxiv. Nws muaj kev nkag siab zoo rau cawv thiab muaj qhov ua tau zoo tiv thaiv kev cuam tshuam vim haus luam yeeb, ua pa thiab roj av. Cov qauv no muab ob qho tib si digital thiab analog outputs. MQ3 cawv sensor module tuaj yeem cuam tshuam tau yooj yim nrog Microcontrollers, Arduino Boards, Raspberry Pi thiab lwm yam lossis cov ntaub ntawv ntau ntxiv txog MQ3, koj tuaj yeem xa Alcohol Sensor Module - MQ3.

5V Cov Khoom Siv Hluav Taws Xob: Hauv feem ntau ntawm peb cov khoom siv hluav taws xob lossis cov phiaj xwm peb xav tau lub zog xa hluav taws xob rau hloov pauv hluav taws xob AC mus rau kev tswj hwm DC voltage

Jumper Wires: Jumper xov hlau yog cov xov hlau yooj yim uas muaj tus pin txuas ntawm txhua qhov kawg, tso cai rau lawv siv los txuas ob lub ntsiab lus rau ib leeg yam tsis muaj qhov sib txuas. Poj niam rau poj niam txuas tau siv hauv txoj haujlwm no.

Breadboard: Lub khob cij yog cov cuab yeej siv tsis tau siv rau ib ntus qauv nrog cov khoom siv hluav taws xob thiab kuaj cov qauv tsim tawm. Feem ntau cov khoom siv hluav taws xob hauv cov hluav taws xob hluav taws xob tuaj yeem sib cuam tshuam los ntawm kev nkag mus rau lawv cov hlau lead lossis cov dav hlau mus rau hauv lub qhov thiab tom qab ntawd ua kev sib txuas los ntawm cov xov hlau uas tsim nyog.

Kauj Ruam 2: Txuas Cov Khoom Siv

Kev Sib Txuas
Kev Sib Txuas

Nqe lus piav qhia

Muaj 4 tus coj yog +5V, AOUT, DOUT, thiab GND.

Lub +5V thiab GND coj ua lub zog rau lub ntsuas dej cawv. Lwm 2 tus coj yog AOUT (analog output) thiab DOUT (digital output). Yuav ua li cas lub sensor ua haujlwm yog lub davhlau ya nyob twg AOUT muab cov khoom siv hluav taws xob sib piv hauv qhov feem ntawm cov cawv uas lub ntsuas pom. Qhov cawv ntau nws pom, qhov ntau dua qhov sib piv qhov hluav taws xob nws yuav tso tawm. Hloov pauv, tsawg dua cawv nws pom, qhov tsawg dua qhov hluav taws xob analog nws yuav tso tawm. Yog tias qhov hluav taws xob sib piv nce mus txog qhov pib, nws yuav xa tus lej digital DOUT siab. Thaum tus DOUT tus pin mus siab dua, arduino yuav kuaj qhov no thiab yuav ua rau lub LED tig mus, qhia tias lub cawv pib mus txog thiab tam sim no dhau qhov txwv lawm. Yuav ua li cas koj tuaj yeem hloov qib pib no yog los ntawm kev kho lub potentiometer kom nce lossis txo qib.

Cov kev sib txuas yog qhov yooj yim heev.

Txhawm rau txuas lub sensor, muaj 3 tus coj. Lub +5V lub davhlau ya nyob twg ntawm lub ntsuas hluav taws xob txuas rau hauv 5V lub davhlau ya nyob twg ntawm pawg thawj coj saib xyuas hluav taws xob. GND lub davhlau ya nyob twg ntawm lub ntsuas hluav taws xob txuas rau hauv GND lub davhlau ya nyob twg ntawm NodeMCU. Qhov no tsim lub zog rau lub sensor. Lwm qhov kev sib txuas yog qhov tso tawm analog ntawm lub sensor. Nws yog txuas rau analog pin A0 ntawm NodeMCU.

Kauj ruam 3: Txheej txheem

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: Kev nyeem ntawv sensor - Qhov no yuav tshwm rau ntawm kab ntawv tshuaj ntsuam. Yog tias koj xav tau ntau dua 1 Txoj Hauv Kev koj tuaj yeem tsim rau cov ntaub ntawv Sensor 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 Lus Hauv Tsev rau Arduino, ESP8266 thiab ESP32

Kauj Ruam 6: Yuav tsum hloov kho tus lej. Hauv qab cov cai koj yuav tsum hloov koj li Network SSID, Tus lej zais thiab koj li ThingSpeak Channel thiab API Keys.

Kauj ruam 4: Txoj Cai

Txoj Cai
Txoj Cai

Rub tawm cov cai txuas ntawm no thiab muab tso rau hauv koj lub rooj tsavxwm, thiab xaim txhua yam raws li qhia hauv daim duab yav dhau los.

Rub tus lej:

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 lus 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 elemetnzonline.com..

Pom zoo: