Cov txheej txheem:

IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor: 7 Kauj Ruam
IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor: 7 Kauj Ruam

Video: IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor: 7 Kauj Ruam

Video: IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor: 7 Kauj Ruam
Video: Building Your First Dashboard With Ubidots IoT platform for Education 2024, Kaum ib hlis
Anonim
IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor
IoT- Ubidots- ESP32+Ntev-Ntau-Wireless-Kev co-Thiab-Kub-Sensor

Kev co yog tiag tiag mus thiab txav mus los-oscillation-ntawm cov tshuab thiab cov khoom siv hauv cov cuab yeej siv tshuab. Kev co hauv kev lag luam tuaj yeem yog cov tsos mob, lossis mob siab rau, tsis yooj yim, lossis nws tuaj yeem cuam tshuam nrog kev ua haujlwm niaj hnub. Piv txwv li, oscillating sanders thiab vibratory tumblers nyob ntawm qhov kev co kom muaj qhov tshwj xeeb. Sab hauv cov tshuab hluav taws xob thiab cov cuab yeej tsav, tom qab ntawd ntxiv, ntsib qhov tseeb ntawm qhov tsis tuaj yeem ua rau muaj kev co. Kev co tuaj yeem cuam tshuam qhov teeb meem thiab yog tias tsis muaj kev tshuaj xyuas tuaj yeem ua rau raug mob lossis ua kom nrawm dua. Kev co tuaj yeem tshwm sim los ntawm ib lossis ntau yam ntxiv nyob rau txhua lub sijhawm, qhov siab tshaj plaws tsis txawv txav yog qhov tsis sib xws, ua tsis raug, muab tso rau, thiab xoob.

Hauv txoj haujlwm no, peb tab tom qhia NCD's Long Range IoT Industrial wireless kev co thiab ntsuas kub, khav theeb txog li 2 Mais ntau yam uas siv wireless mesh networking architecture. Kev koom nrog qhov tseeb 16-ntsis kev co thiab ntsuas kub, cov cuab yeej no xa tawm qhov kev co zoo thiab qhov kub thiab txias ntawm cov neeg siv txhais ua ntu zus. Nws muaj daim ntawv thov sib txawv:

  • Hlau ua
  • Kev tsim hluav taws xob
  • Mining
  • Khoom noj thiab dej haus

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
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau

Yuav tsum tau kho vajtse:

  • NCD ESP32 IoT WiFi BLE Module nrog Kev Sib Txuas USB
  • NCD IoT Ntev Ntau Yam Wireless Kev co thiab Kub Sensor
  • NCD Ntev Ntau Yam Wireless Mesh Modem nrog USB Interface

Yuav tsum tau Software:

  • Arduino IDE Cov
  • LabView Utility
  • Ubidots

Tsev qiv ntawv siv:

  • PubSubClient Library
  • 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

  • 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.
  • Qhov Labview software no yuav ua haujlwm nrog ncd.io wireless Vibration Kub sensor nkaus xwb.
  • Txhawm rau siv UI no, koj yuav tsum tau teeb tsa cov tsav tsheb hauv qab no Nruab lub sijhawm ua haujlwm cav ntawm no 64 Tsav Tsav Tsheb
  • 32 ntsis Driver
  • Nruab NI Visa Tsav Tsheb
  • Nruab LabVIEW Khiav Sijhawm Cav thiab NI-Serial Runtime
  • 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 Ubidots.
  • Rub tawm thiab suav nrog PubSubClient Library thiab Wire.h Library.

#suav nrog

#ncig #ncig

Koj yuav tsum muab koj tus kheej tshwj xeeb Ubidots TOKEN, MQTTCLIENTNAME, SSID (WiFi Lub Npe) thiab Lo lus zais ntawm lub network muaj

#define WIFISSID "xyz" // Muab koj WifiSSID tso rau ntawm no

#define PASSWORD "xyz" // Muab koj tus password nkag mus rau ntawm no #define TOKEN "xyz" // Muab koj Ubidots 'TOKEN #define MQTT_CLIENT_NAME "xyz" // MQTT tus neeg siv npe

Txhais qhov sib txawv thiab lub npe khoom siv uas cov ntaub ntawv yuav xa mus rau ubidots

#define VARIABLE_LABEL "sensor" // Assing the variable label

#define VARIABLE_LABEL1 "AdcValue" #define VARIABLE_LABEL2 "Battery" #define VARIABLE_LABEL3 "RMS_X" #define VARIABLE_LABEL4 "RMS_Y" #define DEVICE_LABEL "esp32" // Txheeb xyuas daim ntawv ntaus ntawv

Qhov chaw khaws cov txiaj ntsig xa:

char str_sensor [10];

char str_sensorbat [10]; char str_sensorAdc [10]; char str_sensorRmsx [10]; char str_sensorRmsy [10];

Code los tshaj tawm cov ntaub ntawv rau ubidots:

sprintf (ntsiab lus, "%s", ""); // Ntxuav cov ntsiab lus ntsiab lus

sprintf (ntsiab lus, "%s%s", "/v1.6/devices/", DEVICE_LABEL); sprintf (payload, "%s", ""); // Ntxuav cov ntsiab lus them nyiaj sprintf (payload, "{"%s / ":", VARIABLE_LABEL); // Ntxiv cov ntawv sib txawv sprintf (payload, " %s {" value / ": %s", payload, str_sensor); // Ntxiv tus nqi sprintf (payload, "%s}}", payload); // Kaw cov phau ntawv txhais lus brackets client.publish (ntsiab lus, them nyiaj);

  • Sau thiab xa Ncd_vibration_and_temperature.ino code.
  • 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.

Txoj Cai:

Kauj Ruam 4: Cov Ntsiab Lus Saib Xyuas Serial:

Serial Saib Xyuas Cov Zis
Serial Saib Xyuas Cov Zis

Kauj Ruam 5: Ua Ubidot Ua Haujlwm:

Ua Ubidot Ua Haujlwm
Ua Ubidot Ua Haujlwm
Ua Ubidot Ua Haujlwm
Ua Ubidot Ua Haujlwm
Ua Ubidot Ua Haujlwm
Ua Ubidot Ua Haujlwm
  • Tsim tus as khauj ntawm Ubidots.
  • Mus rau kuv qhov profile thiab sau cia tus cim token uas yog tus yuam sij tshwj xeeb rau txhua tus as khauj thiab muab nws tso rau koj tus lej ESP32 ua ntej rub tawm.
  • Ntxiv ib lub cuab yeej tshiab rau koj ubidot dashboard lub npe esp32.
  • Tam sim no koj yuav tsum pom cov ntaub ntawv tshaj tawm hauv koj tus lej Ubidots, sab hauv lub cuab yeej hu ua "ESP32".
  • Sab hauv lub cuab yeej tsim qhov hloov pauv lub npe tshiab uas koj qhov ntsuas kub yuav pom.
  • Tam sim no koj tuaj yeem saib Qhov Kub thiab lwm yam ntaub ntawv ntsuas uas tau pom yav dhau los hauv cov ntawv saib. Qhov no tau tshwm sim vim tias tus nqi sib txawv ntawm kev nyeem ntawv tau dhau los ua txoj hlua thiab khaws cia hauv qhov sib txawv thiab tshaj tawm mus rau qhov sib txawv sab hauv ntaus ntawv esp32.

Kauj Ruam 6: Tsim Dashboard hauv Ubidots:

Tsim Dashboard hauv Ubidots
Tsim Dashboard hauv Ubidots
Tsim Dashboard hauv Ubidots
Tsim Dashboard hauv Ubidots
  • Mus rau cov ntaub ntawv xaiv dashboard.
  • Hauv dashboard tsim cov cuab yeej sib txawv.
  • Ntxiv cov cuab yeej tshiab rau koj lub vijtsam dashboard.

Pom zoo: