Cov txheej txheem:

Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU: 4 Cov Kauj Ruam
Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU: 4 Cov Kauj Ruam

Video: Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU: 4 Cov Kauj Ruam

Video: Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU: 4 Cov Kauj Ruam
Video: Tshuaj theem vim li cas thiaj tau nqi ?/ Siv kho mob dab tsi?/paris polyphylla использовать для? 2024, Hlis ntuj nqeg
Anonim
Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU
Kev Tshaj Tawm Kev Ruaj Ntseg Sensor rau IOT ThingSpeak Siv NodeMCU

Muaj ntau lub tshuab tseem ceeb lossis cov cuab yeej siv kim uas raug kev puas tsuaj vim kev co. Hauv qhov xwm txheej zoo li no, yuav tsum tau siv lub tshuab ntsuas kev co kom paub seb lub tshuab lossis cov cuab yeej ua rau muaj kev co lossis tsis. Txheeb xyuas lub hom phiaj uas ua rau lub zog tsis tu ncua tsis yog txoj haujlwm nyuaj yog tias siv lub ntsuas kom raug txhawm rau txhawm rau txheeb xyuas qhov kev co. Muaj ntau hom kev ntsuas kev co muaj nyob hauv kev ua lag luam uas tuaj yeem txheeb xyuas qhov kev co los ntawm kev nkag siab nrawm lossis nrawm thiab tuaj yeem muab cov txiaj ntsig zoo. Txawm li cas los xij, cov ntsuas no tseem kim heev qhov twg siv lub ntsuas cua ntsuas.

Hauv txoj haujlwm no, Txuas NodeMCU nrog Kev co kev co thiab LED. Thaum tsis pom qhov kev co, Kev co lub zog tso tawm yog 0 (qhov hluav taws xob qis), txwv tsis pub nws cov zis yog 1 (hluav taws xob siab). Qhov ntsuas hluav taws xob no tuaj yeem nyeem tau siv tus pin PWM. Yog tias NodeMCU tau 0 (tsis muaj kev vibration) los ntawm kev ntsuas lub zog nws yuav tig rau ntsuab LED thiab tua Liab LED. Yog tias NodeMCU tau txais 1 los ntawm kev ntsuas lub zog, nws yuav tig Liab LED thiab tua LED ntsuab. Ntawm no siv PWM pins tus nqi sensor tau nyeem raws li analog thiab muab ntau yam rau ntsais muag coj.

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 Hardware lossis Sensor Devices. 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:

  • Sau cov ntaub ntawv hauv cov chaw ntiag tug
  • . Saib Cov Ntaub Ntawv nrog Cov Xaj
  • REST API thiab MQTT APIS
  • MATLAB® Txheeb Xyuas thiab Pom Kev Pom.
  • Ntiaj Teb Zej Zog

Hauv qhov kev qhia no, siv LM393 Vibrational 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. LM393 Vbrational Sensor
  3. Jumper Hlau

1. 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.

LM393 Kev Ntsuas Kev Ruaj Ntseg Sensor: Nws tuaj yeem txheeb xyuas qhov kev co ntawm ib puag ncig ib puag ncig. Nws siab tuaj yeem kho tau los ntawm kev hloov pauv cov xim xiav potentiometer. Cov qauv tsim tawm digital (0 thiab 1).

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.

Kauj Ruam 2: Txuas Cov Khoom Siv

Kev Sib Txuas
Kev Sib Txuas

Nqe lus piav qhia:

Muaj 3 tus coj yog +5V,, DOUT, thiab GND. Peb +5V thiab GND coj tsim lub zog rau Kev Ntsuas Kev Ntsuas. Lwm qhov yog DOUT (digital out).

Lub +5V thiab GND ua tus tsim lub zog rau lub zog co. Lwm cov hlau lead yog DOUT (digital output). Yuav ua li cas lub sensor ua haujlwm yog lub davhlau ya nyob twg DOUT muab qhov hluav taws xob tso rau hauv qhov sib npaug ntawm qhov kev co uas lub ntsuas pom. Tus nqi digital tau nyeem los ntawm kev siv PWM tus pin hauv NodMCU. Qhov kev vibration ntau nws pom, qhov ntau dua qhov sib piv nws yuav tso tawm. Hloov pauv, qhov tsawg dua nws pom, qhov tsawg dua qhov hluav taws xob analog nws yuav tso tawm. Yog tias qhov ntsuas hluav taws xob zoo sib xws nce mus txog qhov pib, nws yuav xa tus thawj coj mus rau tus pin coj thiab raws li qhov xwm txheej liab thiab ntsuab coj ntsais.

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 NodeMCU. 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 cov digital tso tawm ntawm lub sensor. Nws txuas rau PWM tus pin D0 ntawm NodeMCU.

Kauj ruam 3: Txheej txheem

Txheej txheem
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. Lub Npe: Txhua Lub Npe Nqe Lus Teb: Xaiv Teb 1: Sensor nyeem ntawv - 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: