Cov txheej txheem:
- Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau
- Kauj Ruam 2: Txhim Kho Cov Tsev Qiv Ntawv Yuav Tsum Tau
- Kauj Ruam 3: ESP32 LoRa Thingspeak Gateway
- Kauj Ruam 4: ESP32 LoRa Sensor Node
- Kauj ruam 5: Teem Up Thingspeak
- Kauj ruam 6: Rooj vag Code
- Kauj Ruam 7: Sensor Node Code
- Kauj Ruam 8: Saib Xyuas Cov Ntaub Ntawv ntawm Thingspeak Server
- Kauj Ruam 9: Cov neeg ua tim khawv
Video: ESP32 Lora Thingspeak Gateway Nrog Sensor Node: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
hauv qhov IoT Project no, Kuv tsim ESP32 LoRa Gateway & kuj tseem ESP32 LoRa Sensor Node los saib xyuas lub sensor nyeem ntawv wirelessly los ntawm ob peb kis nrug. Tus neeg xa ntawv yuav nyeem cov ntaub ntawv huab cua thiab qhov kub uas siv DHT11 Sensor. Tom qab ntawd nws xa cov ntaub ntawv ntawm xov tooj cua LoRa. Cov ntaub ntawv tau txais los ntawm tus txais tus qauv. Tus txais yuav xa cov ntaub ntawv mus rau Thingspeak Server tom qab lub sijhawm tshwj xeeb.
Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau
1. Pawg ESP32 - 2
2. Lora Module SX1278/SX1276
3. DHT11 Humidity Kub Sensor
4. Cov qhob cij
5. Txuas Jumper Xov
Kauj Ruam 2: Txhim Kho Cov Tsev Qiv Ntawv Yuav Tsum Tau
Peb yuav tsum teeb tsa cov tsev qiv ntawv sib txawv ua ntej:
1. DHT11 Lub Tsev Qiv Ntawv
2. LoRa Library
Kauj Ruam 3: ESP32 LoRa Thingspeak Gateway
Tam sim no cia peb pom tus xa thiab tus txais xov tooj cua rau tsim ESP32 LoRa Gateway & Sensor Node. Kuv tau sib sau ua ke ob lub Circuit Court ntawm daim ntawv qhia zaub mov. Koj tuaj yeem ua nws ntawm PCB yog tias koj xav tau.
Nov yog ESP32 LoRa Module SX1278 Gateway Circuit. Qhov no ua haujlwm raws li Tus Txais. Cov ntaub ntawv huab cua thiab qhov kub tau txais siv LoRa Xov Tooj Cua & tshaj tawm rau Thingspeak Server.
Kauj Ruam 4: ESP32 LoRa Sensor Node
Nov yog ESP32 LoRa Sensor Node Circuit nrog DHT11 Sensor. Qhov no ua haujlwm raws li tus xa tawm. Cov ntaub ntawv huab cua thiab qhov kub tau nyeem los ntawm DHT11 Humidity Temperature Sensor thiab xa tawm siv LoRa Xov Tooj Cua.
Kauj ruam 5: Teem Up Thingspeak
Txhawm rau Saib Xyuas Cov Ntaub Ntawv Sensor ntawm Thingspeak Server, koj thawj zaug yuav tsum teeb tsa Thingspeak. Txhawm rau teeb tsa Thingspeak Server, mus saib https://thingspeak.com/. Tsim ib tus as khauj lossis nkag mus yooj yim yog tias koj tau tsim tus lej ua ntej. Tom qab ntawd tsim cov channel tshiab nrog cov ntsiab lus hauv qab no.
Kauj ruam 6: Rooj vag Code
#suav nrog
// Cov tsev qiv ntawv rau LoRa #include #include // txhais cov pins siv los ntawm LoRa transceiver module #define ss 5 #define rst 14 #define dio0 2 #define BAND 433E6 // 433E6 rau Asia, 866E6 rau Europe, 915E6 rau North America // Hloov nrog koj cov ntaub ntawv pov thawj network cov hlua apiKey = "14K8UL2QEK8BTHN6"; // Sau koj li API Sau los ntawm ThingSpeak const char *ssid = "Wifi SSID"; // hloov nrog koj li wifi ssid thiab wpa2 qhov tseem ceeb const char *password = "Password"; const char* neeg rau zaub mov = "api.thingspeak.com"; WiFiClient tus thov kev pab; // Pib hloov pauv kom tau txais thiab khaws LoRa cov ntaub ntawv int rssi; Txoj hlua loRaMessage; Txoj hlua kub; Txoj hlua av noo; Txoj hlua nyeem ntawv ID; // Hloov chaw tso nrog DHT qhov tseem ceeb String processor (const String & var) {//Serial.println(var); yog (var == "TEMPERATURE") {rov kub; } lwm tus yog (var == "HUMIDITY") {xa cov av noo; } lwm yog (var == "RRSI") {rov qab hlua (rssi); } rov qab txoj hlua (); } tsis muaj teeb tsa teeb tsa () {Serial.begin (115200); koj counter; // teeb LoRa transceiver module LoRa.setPins (ss, rst, dio0); // teeb tsa LoRa transceiver module thaum (! LoRa.begin (BAND) && counter <10) {Serial.print ("."); txee ++; ncua (2000); } yog (counter == 10) {// nce kev nyeem ntawv ID ntawm txhua qhov kev nyeem tshiab Serial.println ("Pib LoRa ua tsis tiav!"); } Serial.println ("LoRa Initialization OK!"); ncua (2000); // Txuas rau Wi-nkaus network nrog SSID thiab password Serial.print ("Txuas rau"); Serial.println (ssid); WiFi.begin (ssid, password); thaum (WiFi.status ()! = WL_CONNECTED) {ncua (2000); Serial.print ("."); } // Luam tawm IP chaw nyob thiab pib lub vev xaib Serial.println (""); Serial.println ("Txuas nrog WiFi."); Serial.println ("IP chaw nyob:"); Serial.println (WiFi.localIP ()); } // Nyeem LoRa pob ntawv thiab tau txais lub sensor nyeem tsis tau lub voj () {int packetSize = LoRa.parsePacket (); yog (packetSize) {Serial.print ("Lora pob ntawv tau txais:"); thaum (LoRa.available ()) // Nyeem pob ntawv {Txoj hlua LoRaData = LoRa.readString (); Serial.print (LoRaData); int pos1 = LoRaData.indexOf ('/'); int pos2 = LoRaData.indexOf ('&'); nyeem ID = LoRaData.substring (0, pos1); // Tau txais qhov ntsuas kub ID = LoRaData.substring (pos1 +1, pos2); // Tau txais qhov ntsuas kub = LoRaData.substring (pos2+1, LoRaData.length ()); // Tau txais cov av noo} rssi = LoRa.packetRssi (); // Tau txais RSSI Serial.print ("nrog RSSI"); Serial.println (rssi); } yog (client.connect (server, 80)) // "184.106.153.149" lossis api.thingspeak.com {String postStr = apiKey; postStr += "& field1 ="; postStr += Txoj hlua (nyeem ID); postStr += "& field2 ="; postStr += Txoj hlua (qhov kub thiab txias); postStr += "& teb 3 ="; postStr += Txoj hlua (av noo); postStr += "& field4 ="; postStr += Txoj hlua (rssi); postStr += "\ r / n / r / n / 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:" + apiKey + "\ n"); client.print ("Cov ntsiab lus-Hom: thov/x-www-form-urlencoded / n"); client.print ("Cov ntsiab lus-Ntev:"); client.print (postStr.length ()); client.print ("\ n / n"); client.print (postStr); } // ncua (30000); }
Kauj Ruam 7: Sensor Node Code
#suav nrog
#include // Libraries for LoRa #include "DHT.h" #define DHTPIN 4 // pin qhov twg dht11 txuas nrog DHT dht (DHTPIN, DHT11); // txhais cov pins siv los ntawm LoRa transceiver module #define ss 5 #define rst 14 #define dio0 2 #define BAND 433E6 // 433E6 rau Asia, 866E6 rau Europe, 915E6 rau North America // pob ntawv txee int readingID = 0; int counter = 0; Txoj hlua LoRaMessage = ""; ntab kub = 0; float av noo = 0; // Initialize LoRa module void startLoRA () {LoRa.setPins (ss, rst, dio0); // teeb tsa LoRa transceiver module thaum (! LoRa.begin (BAND) && counter <10) {Serial.print ("."); txee ++; ncua (500); } yog (txee == 10) {// nce kev nyeem ntawv ID ntawm txhua qhov kev nyeem tshiab nyeem ID ++; Serial.println ("Pib LoRa ua tsis tiav!"); } Serial.println ("LoRa Initialization OK!"); ncua (2000); } void startDHT () {if (isnan (humidity) || isnan (temperature)) {Serial.println ("Ua tsis tau tejyam nyeem los ntawm DHT sensor!"); rov qab; }} tsis muaj dab tsi getReadings () {av noo = dht.readHumidity (); kub = dht.readTemperature (); Serial.print (F ("Vaum:")); Serial.print (av noo); Serial.print (F ("% Kub:")); Serial.print (kub); Serial.println (F ("° C")); } void sendReadings () {LoRaMessage = Txoj hlua (nyeem ID) + "/" + Txoj hlua (kub) + "&" + Txoj hlua (av noo); // Xa LoRa pob ntawv rau tus txais LoRa.beginPacket (); LoRa.print (LoRaMessage); LoRa.endPacket (); Serial.print ("Xa pob ntawv:"); Serial.println (nyeem ID); nyeem ID ++; Serial.println (LoRaMessage); } void setup () {// initialize Serial Monitor Serial.begin (115200); dht.begin (); startDHT (); startLoRA (); } tsis muaj dab tsi voj () {getReadings (); xaReadings (); ncua (500); }
Kauj Ruam 8: Saib Xyuas Cov Ntaub Ntawv ntawm Thingspeak Server
Thaum cov cai tau rub tawm, koj tuaj yeem qhib Serial Monitor ntawm ob lub Gateway & Sensor Node Circuit. Koj yuav xa cov ntaub ntawv thiab tau txais yog tias txoj cai raug. Tam sim no koj tuaj yeem mus ntsib Thingspeak Private View. Muaj koj tuaj yeem pom cov ntaub ntawv rau Pob Naj Npawb, Kub, Vaum & Rooj vag tau muab tso tom qab lub sijhawm 15 vib nas this.
Kauj Ruam 9: Cov neeg ua tim khawv
1.
2.
Pom zoo:
MuMo - LoRa Gateway: 25 Kauj Ruam (nrog Duab)
MuMo-LoRa Gateway: ### Hloov kho 10-03-2021 // cov ntaub ntawv tshiab/hloov tshiab yuav muaj nyob ntawm nplooj ntawv github: https://github.com/MoMu-Antwerp/MuMoWhat yog MuMo? MuMo yog kev koom tes ntawm kev tsim khoom lag luam (chav haujlwm ntawm University of Antwerp) raws li
Lora Gateway Raws Li MicroPython ESP32: 10 Cov Kauj Ruam (nrog Duab)
Lora Gateway Raws li MicroPython ESP32: Lora tau nrov heev nyob rau xyoo tas los no. Kev sib txuas lus wireless siv cov thev naus laus zis no feem ntau pheej yig (siv dawb spectrum), qhov loj me me, kev siv hluav taws xob zoo thiab muaj kev sib txuas lus ntev, thiab feem ntau yog siv rau kev sib txuas lus
ESP32 Nrog E32-433T LoRa Module Tutorial - LoRa Arduino cuam tshuam: 8 Kauj Ruam
ESP32 Nrog E32-433T LoRa Module Tutorial | LoRa Arduino cuam tshuam: Hav, ua li cas, Cov Menyuam! Akarsh ntawm no los ntawm CETech Qhov phiaj xwm no ntawm kuv yog cuam tshuam nrog E32 LoRa module los ntawm eByte uas yog lub zog siab 1-watt transceiver module nrog ESP32 siv Arduino IDE.Peb nkag siab txog kev ua haujlwm ntawm E32 hauv peb qhov kev qhia kawg
Tswj Cov Khoom Siv Hauv Tsev Hla LoRa - LoRa hauv Tsev Automation - LoRa Chaw Taws Teeb: 8 Kauj Ruam
Tswj Cov Khoom Siv Hauv Tsev Hla LoRa | LoRa hauv Tsev Automation | LoRa Kev Tswj Chaw Taws Teeb: Tswj thiab siv koj lub cuab yeej siv hluav taws xob los ntawm qhov deb (Kilometers) yam tsis muaj internet. Qhov no ua tau los ntawm LoRa! Hav, ua li cas, cov menyuam? Akarsh ntawm no los ntawm CETechQhov PCB no tseem muaj cov zaub OLED thiab 3 qhov txuas uas
15 $ LoRa Gateway/Node ESP8266 Tsim PCB 3cmX8cm Loj: 6 Kauj Ruam
15 $ LoRa Gateway/Node ESP8266 Tsim PCB 3cmX8cm Loj: Hav, ua li cas, cov phooj ywg? Akarsh ntawm no los ntawm CETech.Today no peb yuav ua qhov haujlwm uas yog LoRa ntawm qhov yooj yim thiab koj tuaj yeem siv nws ua ib lub qhov rooj nkag xwb. Ntawm no tus microcontroller uas kuv siv yog ESP8266, uas txuas nrog LoRa cov laug cam