Cov txheej txheem:

IoT Pool Monitoring With ThingsBoard: 8 Kauj Ruam
IoT Pool Monitoring With ThingsBoard: 8 Kauj Ruam

Video: IoT Pool Monitoring With ThingsBoard: 8 Kauj Ruam

Video: IoT Pool Monitoring With ThingsBoard: 8 Kauj Ruam
Video: ThingsBoard IoT System Platform For Data Collection and Visualize Data 2024, Kaum ib hlis
Anonim
IoT Pool Monitoring Nrog ThingsBoard
IoT Pool Monitoring Nrog ThingsBoard

Cov lus qhia no yuav qhia saib yuav ua li cas saib xyuas pH, ORP, thiab kub ntawm lub pas dej lossis pas dej thiab tso cov ntaub ntawv mus rau ThingsBoard.io qhov kev pom thiab khaws cia.

Kauj Ruam 1: Yam Koj Yuav Tsum Tau

  • Txhua lub rooj tsav xwm txhim kho ESP32. Qhov no zoo li tsim nyog, tab sis ib qho twg yuav ua haujlwm.
  • Isolated ISE Probe Interface board thiab pH sojntsuam. Koj tuaj yeem tau txais ob qho ntawm ufire.co.
  • Isolated ISE Probe Interface board thiab ORP sojntsuam kuj los ntawm ufire.co.
  • Qee qhov sib txawv thiab xaus zoo li cov xov hlau lossis cov xov hlau qwiic thiab USB cables.

Kauj ruam 2: Software

  1. Kuv yuav xav tias koj paub nrog Arduino, Arduino IDE, thiab nws tau teeb tsa lawm. Yog tsis yog, ua raws cov kab ntawv txuas.
  2. Yam tom ntej yog tau txais ESP32 lub platform teeb tsa. Vim qee qhov, qhov no tsis tau yooj yim los ntawm kev muaj lub platform tswj hwm tus IDE tau muab, yog li koj yuav tsum tau mus rau nplooj ntawv github thiab ua raws cov lus qhia teeb tsa tsim nyog.
  3. Tam sim no rau cov tsev qiv ntawv: Los ntawm Arduino IDE, tau txais Sketch / suav nrog Lub Tsev Qiv Ntawv / Tswj Tsev Qiv …

    1. Tshawb nrhiav thiab teeb tsa 'ArduinoJson' version 5.13.2.
    2. Tshawb nrhiav thiab teeb tsa 'PubSubClient'.
    3. Tshawb nrhiav thiab teeb tsa 'Isolated ISE Probe Interface'.

Kauj Ruam 3: Kho UFire Devices

Vim tias uFire cov cuab yeej sib txuas lus los ntawm I2C, lawv xav tau chaw nyob tshwj xeeb. ISE sojntsuam peb tab tom siv los ntsuas pH thiab ORP zoo ib yam, yog li ntawd lawv tau los nrog tib qhov chaw nyob. Txawm hais tias qhov chaw nyob tuaj yeem hloov pauv, thiab qhov ntawd yog yam peb yuav ua tam sim no.

Los ntawm Arduino IDE, mus rau 'Cov Ntaub Ntawv / Piv Txwv / ISE Soj Ntsuam Kev Sib Tham' thiab xaiv 'Plhaub'. Nov yog qhov yooj yim siv lub plhaub zoo li lub ntsej muag rau siv thiab teeb tsa cov khoom siv uFire. Nws ua haujlwm zoo tshaj plaws ntawm cov cuab yeej ATMega yooj yim xws li Uno, Mini, lossis Nano. Tam sim no nws tsoo ntawm ESP32. Tshaj tawm cov duab kos rau koj lub cuab yeej, nco ntsoov tias ib qho ntawm uFire cov cuab yeej txuas nrog thiab ua raws cov lus txib hauv qab no.

ib 2c3e

Qhov ntawd yuav tsum tau hloov I2C chaw nyob ntawm lub cuab yeej mus tas li rau hex 0x3E. Tam sim no koj tuaj yeem hais qhia ob lub cuab yeej nrog qhov chaw nyob tshwj xeeb.

Kauj Ruam 4: Ua Kev Sib Txuas

ESP32 peb tab tom siv muaj WiFi thiab BLE cuam tshuam, yog li tsuas yog xav tau lub zog siv. Tej zaum koj yuav xav tau USB cable muab lub zog, tab sis roj teeb yog lwm txoj kev xaiv. Ntau ESP32s tuaj yeem yuav nrog lub roj teeb them hluav taws xob hluav taws xob twb nyob ntawm lub rooj tsavxwm.

Cov cuab yeej uFire uas peb yuav ntsuas pH, ORP, thiab ntsuas kub sib txuas mus rau ESP32 los ntawm I2C npav. Nrog ESP32, koj tuaj yeem xaiv ob qho pins rau I2C. Ob lub cuab yeej yuav nyob ntawm tib lub npav, yog li SCL thiab SDA tus pin yuav zoo ib yam. Yog koj saib cov cai (kauj ruam tom ntej), koj yuav pom ob kab no.

ISE_pH pH (19, 23);

ISE_ORP ORP (19, 23, 0x3E);

Kuv txiav txim siab siv tus pin 19 rau SDA thiab tus pin 23 rau SCL. Yog li Txuas ESP32's 3.3v (lossis xijpeem tus pin tuaj yeem hu rau ntawm koj lub rooj tshwj xeeb) mus rau thawj uFire ntaus ntawv 3.3/5v tus pin, GND rau GND, 19 rau SDA, thiab 23 rau SCL.

Tus pinout ntawm koj ESP32 yuav txawv ntawm daim duab.

Kauj ruam 5: Tau ThingsBoard Khiav

ThingsBoard yog qhov kev pabcuam online, uas ntawm lwm yam, tau txais cov tswv yim ntsuas thiab pom lawv hauv daim duab thiab kab kos. Muaj ntau qhov kev xaiv teeb tsa. Txog qhov kev qhia no, nws yuav siv kev teeb tsa hauv zos khiav ntawm lub khoos phis tawj tshwj xeeb.

Mus ntsib ThingsBoard.io cov lus qhia teeb tsa thiab xaiv qhov teeb tsa xaiv qhov tsim nyog rau koj.

Kuv tau teeb tsa Docker duab uas tso cai rau kuv nkag mus rau qhov teeb tsa los ntawm https:// localhost: 8080/.

Raws li tau piav qhia ntawm no, lub npe nkag nkag tsis raug thiab tus password yog [email protected] thiab tus neeg xauj tsev.

Kauj Ruam 6: Teeb Tus Ntaus

  1. Thaum koj nkag mus rau ThingsBoard, nyem 'Devices'.
  2. Ntawm nplooj ntawv tom ntej, koj yuav pom cov txiv kab ntxwv '+' nyob hauv qab txoj cai, nyem rau nws thiab 'Add Device' kev sib tham yuav tshwm sim. Sau rau hauv 'Npe' teb nrog txhua yam uas koj xav tau hu rau peb lub cuab yeej. Tom qab ntawv hauv 'Ntaus Ntaus', nkag mus 'ESP32', txawm hais tias nws tuaj yeem yog dab tsi. Nyem 'Ntxiv'.
  3. Nyem rau lub cuab yeej tsim tshiab nkag mus hauv cov npe thiab koj yuav pom me ntsis ntawm cov ntaub ntawv hais txog nws. Cia qhov screen qhib thiab mus rau kauj ruam tom ntej.

Kauj ruam 7: Sketch

Koj tuaj yeem tshawb xyuas qhov chaw ntawm no.

  1. Luam cov ntaub ntawv rau hauv qhov project Arduino.
  2. Kho Watson.h

    1. Hloov ssid thiab password rau koj cov ntaub ntawv xov tooj ntawm tes WiFi.
    2. Los ntawm cov kauj ruam dhau los qhib lub vijtsam, nyem 'COPY DEVICE ID' thiab hloov 'char device ' sib txawv rau qhov theej theej tawm. Ua tib yam rau 'COPY ACCESS TOKEN' rau 'char token ' sib txawv.
    3. Thaum kawg, hloov 'char server ' hloov pauv mus rau IP chaw nyob ntawm lub khoos phis tawj uas siv ThingsBoard. Kuv yog '192.168.2.126'. Tsis muaj 'http', slashes, lossis lwm yam, tsuas yog IP chaw nyob.
  3. Rub nws mus rau koj tus ESP32 thiab saib rau ntawm 'TEB CHAWS TEB CHAWS TSHIAB' tab. Nws yuav tsum qhia koj cov ntaub ntawv nkag los.

Kauj Ruam 8: Teeb tsa Dashboard

Teeb tsa Dashboard
Teeb tsa Dashboard

Los ntawm tsis pub dhau lub 'TELEMETRY' tab tshiab, koj yuav tsum pom peb peb cov ntaub ntawv ntsiab lus, C, mV, thiab pH. Yog tias koj nyem rau ntawm lub npov nyob sab laug ntawm txhua yam khoom, koj tuaj yeem nyem tom qab ntawd 'Qhia rau ntawm WIDGET'. Koj yuav raug nthuav tawm nrog ntau txoj kev xaiv daim phiaj. Xaiv qhov koj nyiam, tom qab ntawd nyem 'ADD TO DASHBOARD'.

ThingsBoard muab ntau txoj hauv kev los ntawm qhov no yog li kuv yuav tso qhov ntawd rau koj los tshawb nrhiav.

Pom zoo: