Cov txheej txheem:

ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring: 10 Kauj Ruam
ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring: 10 Kauj Ruam

Video: ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring: 10 Kauj Ruam

Video: ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring: 10 Kauj Ruam
Video: Analysis and Visualization in ThingSpeak | IoT from Data to Action, Part 3 2024, Kaum ib hlis
Anonim
ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring
ThingSpeak-IFTTT-ESP32-Predictive-Machine-Monitoring

Hauv qhov haujlwm no, peb yuav ntsuas kev co thiab ntsuas kub siv NCD kev co thiab ntsuas kub, ESP32, thiab ThingSpeak. Peb tseem yuav xa qhov ntsuas kub thiab qhov sib txawv sib txawv nyeem rau Google Ntawv Siv ThingSpeak thiab IFTTT txhawm rau txheeb xyuas cov ntaub ntawv co co

Kev nce qib ntawm cov thev naus laus zis tshiab xws li, Internet ntawm Yam, kev lag luam hnyav tau pib txais kev ntsuas cov ntaub ntawv khaws tseg los daws nws cov teeb meem loj tshaj plaws, tus thawj xibfwb ntawm lawv cov txheej txheem poob haujlwm hauv daim ntawv kaw thiab txheej txheem qeeb. Kev tshuaj xyuas lub tshuab tseem hu ua kev saib xyuas yav tom ntej lossis kev saib xyuas mob yog kev xyaum tshuaj xyuas cov cuab yeej siv hluav taws xob los ntawm cov cuab yeej txhawm rau txhawm rau khaws cov ntaub ntawv kuaj mob. Txhawm rau ua tiav qhov no, cov txheej txheem nrhiav cov ntaub ntawv thiab cov ntaub ntawv loggers tau siv los tshuaj xyuas txhua yam khoom siv, xws li lub rhaub dej kub, lub cav, thiab lub cav. Cov xwm txheej hauv qab no raug ntsuas:

  • Kev Ntsuas Kub thiab Vaum Cov Ntaub Ntawv
  • Tam sim no thiab Kev Ntsuas Hluav Taws Xob
  • Kev Ntsuas Kev Ruaj Ntseg: Hauv kab lus no, peb yuav nyeem Kub, kev co thiab tshaj tawm cov ntaub ntawv ntawm ThingSpeak. ThingSpeak thiab IFTTT txhawb kab, UI, ntawv ceeb toom, thiab email. Cov yam ntxwv no ua rau nws zoo tagnrho rau kev txheeb xyuas kev saib xyuas yav tom ntej. Peb tseem yuav tau txais cov ntaub ntawv hauv google nplooj ntawv uas yuav ua rau kev kwv yees kho txij nkawm yooj yim dua.

Kauj ruam 1: Kho vajtse thiab Software xav tau

Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau

Yuav tsum tau kho vajtse:

  1. ESP-32: ESP32 ua kom yooj yim siv Arduino IDE thiab Arduino Wire Language rau IoT daim ntawv thov. Qhov ESp32 IoT Module no sib txuas Wi-nkaus, Bluetooth, thiab Bluetooth BLE rau ntau yam kev siv sib txawv. Cov qauv no tau los ua tiav nrog 2 CPU cores uas tuaj yeem tswj tau thiab siv zog ib tus zuj zus, thiab nrog lub moos hloov pauv tau ntawm 80 MHz txog 240 MHz. Qhov ESP32 IoT WiFi BLE Module nrog Kev Sib Txuas USB tau tsim los kom haum rau txhua qhov khoom ncd.io IoT.
  2. IoT Long Range Wireless Vibration Thiab Kub Sensor: IoT Long Range Wireless Vibration Thiab Kub Sensor yog roj teeb ua haujlwm thiab wireless, lub ntsiab lus tias tam sim no lossis kev sib txuas xov hlau tsis xav tau rub kom nws nce thiab ua haujlwm. Nws taug qab cov ntaub ntawv kev co ntawm koj lub tshuab tas li thiab ntes thiab ua haujlwm nyob rau lub sijhawm daws teeb meem ua ke nrog lwm qhov ntsuas kub. Hauv qhov no, peb tab tom siv NCD's Long Range IoT Industrial wireless kev co thiab ntsuas kub, khav theeb txog li 2 Mais ntau yam siv cov wireless sib txuas sib txuas ua ke.
  3. Ntev-Ntau Wireless Wireless Mesh Modem nrog USB Interface

Siv Software:

  1. Arduino IDE Cov
  2. ThigSpeak
  3. IFTTT

Tsev qiv ntawv siv:

  1. PubSubClient Library
  2. Hlau.h

Kauj Ruam 2: Cov Kauj Ruam Xa Cov Ntaub Ntawv mus rau Labview Kev co thiab Kub Platform Siv IoT Long Range Wireless Kev Ruaj Ntseg thiab Kub Sensor thiab Ntev Ntau Wireless Mesh Modem Nrog USB Interface-

  1. Ua ntej, peb xav tau Labview cov ntawv thov siv uas yog ncd.io Wireless Vibration thiab Kub Sensor.exe cov ntaub ntawv uas tuaj yeem saib.
  2. Qhov Labview software no yuav ua haujlwm nrog ncd.io wireless Vibration Kub sensor nkaus xwb
  3. Txhawm rau siv UI no, koj yuav tsum teeb tsa cov tsav tsheb hauv qab no Teeb tsa lub sijhawm ua haujlwm cav ntawm no 64 ntsis
  4. 32 bit ib
  5. Nruab NI Visa Tsav Tsheb
  6. Nruab LabVIEW Khiav Sijhawm Cav thiab NI-Serial Runtime
  7. Pib qhia rau cov khoom no.

Kauj Ruam 3: Tshaj Tawm Txoj Cai rau ESP32 Siv Arduino IDE:

Raws li esp32 yog ib feem tseem ceeb tshaj tawm koj li kev co thiab kub cov ntaub ntawv rau ThingSpeak.

  • Rub tawm thiab suav nrog PubSubClient Library thiab Wire.h Library.
  • Rub tawm thiab suav nrog WiFiMulti.h thiab HardwareSerial.h Library.

#suav nrog #suav nrog #suav nrog #suav nrog #suav nrog

Koj yuav tsum muab koj tus lej API tshwj xeeb muab los ntawm ThingSpeak, SSID (WiFi Lub Npe) thiab Lo lus zais ntawm lub network uas muaj

const char* ssid = "Yourssid"; // Koj tus SSID (Lub npe ntawm koj li WiFi) const char* password = "Wifipass"; // Koj li Wifi passwordconst char* host = "api.thingspeak.com"; Txoj hlua api_key = "APIKEY"; // Koj tus lej API tau muab los ntawm yam khoom

Txheeb xyuas qhov sib txawv uas cov ntaub ntawv yuav khaws cia ua ib txoj hlua thiab xa mus rau ThingSpeak

int tus nqi; int Temp; int Rms_x; rau Rms_y; rau Rms_z;

Txoj cai los tshaj tawm cov ntaub ntawv rau ThingSpeak:

Txoj hlua data_to_send = api_key; data_to_send += "& field1 ="; data_to_send += Txoj hlua (Rms_x); data_to_send += "& field2 ="; data_to_send += Txoj hlua (Temp); data_to_send += "& field3 ="; data_to_send += Txoj hlua (Rms_y); data_to_send += "& field4 ="; data_to_send += Txoj hlua (Rms_z); data_to_send += "\ r / n / r / n"; client.print ("POST /hloov tshiab HTTP /1.1 / n"); client.print ("Tus tswv tsev: api.thingspeak.com / n"); client.print ("Kev sib txuas: kaw / n"); client.print ("X-THINGSPEAKAPIKEY:" + api_key + "\ n"); client.print ("Cov ntsiab lus-Hom: thov/x-www-form-urlencoded / n"); client.print ("Cov ntsiab lus-Ntev:"); client.print (data_to_send.length ()); client.print ("\ n / n"); client.print (data_to_send);

  • Sau thiab xa cov Esp32-Thingspeak.ino
  • Txhawm rau txheeb xyuas qhov kev sib txuas ntawm lub cuab yeej thiab cov ntaub ntawv xa mus, qhib lub ntsuas saib. Yog tias tsis pom cov lus teb, sim tshem koj lub ESP32 thiab tom qab ntawd txuas nws dua. Nco ntsoov tias tus nqi baud ntawm Serial monitor tau teeb tsa rau tib qho uas tau teev tseg hauv koj tus lej 115200.

Kauj Ruam 4: Cov Ntsiab Lus Saib Xyuas Serial:

Serial Saib Xyuas Cov Zis
Serial Saib Xyuas Cov Zis

Kauj Ruam 5: Ua Qhov ThingSpeak Ua Haujlwm:

Ua qhov ThingSpeak Ua Haujlwm
Ua qhov ThingSpeak Ua Haujlwm
Ua qhov ThingSpeak Ua Haujlwm
Ua qhov ThingSpeak Ua Haujlwm
Ua qhov ThingSpeak Ua Haujlwm
Ua qhov ThingSpeak Ua Haujlwm
  1. Tsim tus as khauj ntawm ThigSpeak.
  2. Tsim cov channel tshiab, los ntawm txhaj rau Channels
  3. . Nyem rau ntawm Kuv Cov Channel.
  4. Nyem Tshiab Channel.
  5. Hauv New Channel, npe lub channel.
  6. Npe Lub Npe Sab Hauv Hauv Channel, Teb yog qhov sib txawv uas cov ntaub ntawv tau tshaj tawm.
  7. Tam sim no tseg Channel
  8. Tam sim no koj tuaj yeem pom koj tus lej API ntawm lub dashboard.
  9. Mus rau tus kais ntawm lub vev xaib thiab pom koj li 'Sau API Key' uas yuav tsum tau hloov kho tshiab ua ntej xa cov cai rau ESP32.
  10. Thaum Channel tau tsim koj yuav muaj peev xwm saib koj qhov kub thiab txias cov ntaub ntawv hauv tus kheej saib nrog Fields koj tau tsim sab hauv Channel.
  11. Txhawm rau phiaj xwm kab ntawm cov ntaub ntawv kev sib txawv sib txawv, koj tuaj yeem siv MATLAB Visualization.
  12. Txhawm rau qhov no mus rau App, Nyem rau MATLAB Visualization.
  13. Sab hauv nws xaiv Kev Cai, hauv qhov no, peb tau xaiv tsim 2-D kab phiaj nrog y-axis ntawm ob sab laug thiab sab xis. Tam sim no nyem tsim. MATLAB cov cai yuav tsim dua tshiab raws li koj tsim kev pom tab sis koj yuav tsum hloov daim npav ID, nyeem tus lej ID, tuaj yeem tshawb xyuas daim duab hauv qab no.
  14. Tom qab ntawd txuag thiab khiav cov cai.
  15. Koj yuav pom cov phiaj xwm.

Kauj Ruam 6: Tso Tawm:

Cov Zis
Cov Zis
Cov Zis
Cov Zis

Kauj Ruam 7: Tsim IFTTT Applet

Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet

IFTTT yog qhov kev pabcuam web uas tso cai rau koj tsim cov applets uas ua haujlwm hauv kev teb rau lwm qhov kev nqis tes ua. Koj tuaj yeem siv IFTTT Webhooks kev pabcuam los tsim lub vev xaib thov kom ua rau muaj kev nqis tes ua. Qhov kev nqis tes tuaj yog HTTP thov mus rau lub vev xaib, thiab qhov ua tawm yog email lus.

  1. Ua ntej, tsim ib tus as khauj IFTTT.
  2. Tsim ib qho applet. Xaiv Kuv Applets.
  3. Nyem rau khawm Applet tshiab.
  4. Xaiv qhov kev nqis tes ua. Nyem lo lus no.
  5. Nyem rau Webhooks kev pabcuam. Nkag mus rau Webhooks hauv kev tshawb nrhiav. Xaiv Webhooks.
  6. Xaiv tus txhais.
  7. Ua kom tiav cov teb txhais. Tom qab koj xaiv Webhooks ua tus txhais, nyem rau Txais Txais lub vev xaib lub npov kom txuas ntxiv. Sau lub npe txheej xwm
  8. Tsim txhais.
  9. Tam sim no tus txhais tau tsim, rau qhov ua rau nyem qhov ntawd.
  10. Nkag mus "Google Ntawv" hauv kab tshawb nrhiav, thiab xaiv lub thawv "Google Ntawv".
  11. Yog tias koj tsis tau txuas nrog Google Sheet, tom qab ntawv txuas nws ua ntej. Tam sim no xaiv ua. Xaiv ntxiv kab rau daim ntawv nthuav qhia.
  12. Tom qab ntawd, ua tiav cov haujlwm ua.
  13. Koj lub applet yuav tsum tsim tom qab koj nias qhov ua tiav
  14. Rov qab tau koj cov ntaub ntawv qhia txog Webhooks. Xaiv Kuv Cov Applets, Cov Kev Pabcuam thiab tshawb rau Webhooks. Nyem Webhooks thiab Cov Ntaub Ntawv khawm. Koj pom koj tus yuam sij thiab hom ntawv rau xa daim ntawv thov. Sau lub npe txheej xwm. Lub npe txheej xwm rau qhov piv txwv no yog VibrationAndTempData.

Kauj Ruam 8: Tsim Kev Ntsuas MATLAB

Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis

Koj tuaj yeem siv qhov txiaj ntsig ntawm koj qhov kev tshuaj xyuas los ua kom lub vev xaib thov, xws li sau qhov txhais rau IFTTT.

  1. Nyem Apps, MATLAB Txheeb Xyuas thiab xaiv Tshiab.
  2. Ua kom cov ntaub ntawv los ntawm IFTTT 5 mus rau Google Cov lej code. Koj tuaj yeem siv kev pab los ntawm Trigger Email los ntawm IFTTT hauv ntu Piv txwv.
  3. Npe koj qhov kev tshuaj xyuas thiab hloov kho cov cai.
  4. Txuag koj qhov kev tshuaj xyuas MATLAB.

Kauj Ruam 9: Tsim Kev Tswj Sijhawm los Ua Koj Li Kev Tshawb Fawb

Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas

Ntsuam xyuas koj li ThingSpeak cov ntaub ntawv channel thiab ua rau lwm yam xwm txheej.

  1. Nyem rau Apps, TimeControl, thiab tom qab ntawd nyem Tshiab TimeControl.
  2. Txuag koj Lub Sijhawm Tswj.

Pom zoo: