Cov txheej txheem:
- Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
- Kauj Ruam 2: Kev Npaj MCU
- Kauj Ruam 3: Kev Npaj Tsev MCU
- Kauj Ruam 4: Tsim 3V3 I2C Daughter-board
- Kauj Ruam 5: Sib Sau Cov Cheeb Tsam Loj
- Kauj Ruam 6: Cov Kauj Ruam Tom ntej
Video: IOT123 - ASSIMILATE SENSOR HUB: ICOS10 3V3 MQTT NODE: 6 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nov yog thawj qhov sib txawv ntawm MCU/Qhov sib xyaw ua ke hauv ASSIMILATE SENSOR HUBS: tus tswv uas khaws cov ntaub ntawv pov tseg los ntawm I2C ASSIMILATE SENSORS qhev.
Qhov kev tsim no siv Wemos D1 Mini, tshaj tawm cov ntaub ntawv pov tseg los ntawm ASSIMILATE SENSORS mus rau MQTT server. Nws muab tsheb npav 3V3 I2C rau lub ntsuas cua. Txoj kev tsheb nqaj hlau 5V tseem tau muab tab sis tsis muaj lub logic qib hloov pauv rau 5V I2C thiab nws yuav tsis ua haujlwm raws li xav tau. Qhov no yuav raug xa mus rau yav tom ntej lub ntsej muag-teeb tus ntxhais-pawg hloov pauv rau qhov uas tau nthuav tawm ntawm no.
Yog tias koj tsis tau ua li ntawd, lub plhaub txheej sab nrauv yuav tsum tau muab sib dhos.
Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej
ICOS10 (IDC) Plhaub Nqi Khoom Siv
- D1M BLOCK Pin Jig (1)
- D1M BLOCK puag thiab vaj tsev (1)
- Wemos D1 Mini (1)
- Wemos D1 Mini Protoboard Shield (1)
- 40P Poj Niam Headers (8P, 8P, 9P, 9P))
- 1 "Ob tog ob tog protoboard (1)
- 6 Pin Shrouded IDC Txiv Neej Header (1)
- Hookup hlau (~ 10)
- 0.5 hli Tinned Hlau (~ 4)
- 4G x 15mm Khawm taub hau tus kheej tapping screws (2)
- 4G x 6mm tus kheej tapping countersunk screws (~ 20)
Kauj Ruam 2: Kev Npaj MCU
Hauv qhov kev tsim no peb tab tom siv Wemos D1 Mini. Yog tias koj tau ua yav dhau los D1M WIFI BLOCK, koj tuaj yeem siv qhov ntawd rau cov khoom siv kho vajtse hloov pauv. Yog tias tsis yog, yam tsawg kawg liab qab ua raws seem tom ntej.
Muag lub taub hau PINS ntawm MCU (siv tus lej PIN JIG)
Yog tias koj tsis tuaj yeem luam tus lej PIN JIG tsuas yog ua raws cov lus qhia thiab tsim kho: qhov siab (offset) ntawm tus lej PIN JIG yog 6.5mm.
- Luam/tau tus PIN JIG los ntawm nplooj ntawv no.
- Pub cov kab taub hau hla hauv qab ntawm lub rooj tsavxwm (TX sab xis-sab laug) thiab rau hauv cov laug cam.
- Nias tus pin nqes mus rau qhov tiaj tiaj.
- Nias lub rooj tsavxwm nqes mus rau lub jig.
- Ua tus kav 4 lub ces kaum pins.
- Reheat thiab rov ua haujlwm pawg thawj coj/tus pin yog xav tau (pawg thawj coj lossis tus pin tsis sib dhos lossis cov kav dej).
- Solder tus so ntawm tus pin.
UPLOADING LUB FIRMWARE
GIST rau txoj cai nyob ntawm no (5 cov ntaub ntawv) thiab zip yog nyob ntawm no. Cov lus qhia rau kev siv Arduino IDE rau kev suav sau/xa tawm cov cai nyob ntawm no.
Txhawm rau siv cov cai nrog tsuas yog kev hloov kho me me, peb tab tom siv Joël Gähwiler's shiftr.io ua MQTT broker: nws muaj tus as khauj qhua - yog li thov khaws lub sijhawm ntawm kev tshaj tawm feeb sib nrug. Nws muab kev pom pom ntawm lub hauv paus thiab cov ncauj lus, nrog rau kev txo qis rau cov ntaub ntawv.
Thaum cov cai tau raug thauj mus rau Arduino IDE:
- Hloov kho tus nqi ntawm _wifi_ssid nrog koj li WiFi SSID.
- Hloov kho tus nqi ntawm _wifi_password nrog koj tus yuam sij WiFi.
- Hloov kho tus nqi ntawm _mqtt_clientid nrog qhov koj xav paub Tus Neeg Siv Khoom (tsis xav tau koom nrog).
- Hloov kho tus nqi ntawm _mqtt_root_topic nrog qhov chaw nyob hierarchy ntawm lub cuab yeej qhov chaw.
- Compile thiab upload.
Kauj Ruam 3: Kev Npaj Tsev MCU
MCU Vaj Tsev nthuav tawm lub taub hau rau D1 Mini los ntsaws rau hauv thiab lub taub hau rau tus ntxhais-laug cam uas sib txuas lus nrog Lub Qhov (lub ntsuas cua thiab tus ua yeeb yam) Circuit.
HOUSING HEADERS
Qhov no yog ua raws D1 Mini Protoboard, thiab sib cais:
- Pins rau D1M BLOCK/D1 Mini txuas rau.
- Kev Ncaj Ncees ncaj qha ntawm 2 kab ntawm kev sib cuag los ntawm D1M BLOCK/D1 Mini. Cov no tsuas yog muaj rau kev yooj yim thaum ua qauv. Nws tau cia siab tias tus ntxhais-laug cam yuav thaiv txhua qhov nkag mus rau cov ntawv no.
- 4 Kev tawg ntawm cov pins tshwj xeeb uas siv los ntawm tus ntxhais-laug cam. Kuv txiav txim siab tsuas yog rhuav tshem I2C cov pins tshwj xeeb tab sis kuv twb muaj qhov siv-siv rau lwm tus pin (qis-qis pw tsaug zog hloov pauv), yog li kuv tsoo RST, A0 thiab qee qhov lwm yam pins tsuas yog hauv rooj plaub.
Txhawm rau ntxiv D1M Cov Neeg Tiv Thaiv rau HOUSING HEADER:
- Saib tus muag khoom siv Lub SOCKET JIG video.
- Pub cov kab taub hau hla hauv qab ntawm lub rooj tsavxwm (TX sab laug-sab laug rau sab saum toj).
- Pub jig hla lub taub hau yas thiab qib ob sab.
- Tig jig thiab sib dhos dua thiab nias lub taub hau ncaj qha mus rau qhov tiaj tiaj.
- Nias lub rooj tsavxwm nqes mus rau lub jig.
- Solder 4 lub kaum tus pin uas siv cov laug me me (tsuas yog ua ntu zus ntawm tus pin).
- Reheat thiab rov ua haujlwm pawg thawj coj/tus pin yog xav tau (pawg thawj coj lossis tus pin tsis sib dhos lossis cov kav dej).
- Solder tus so ntawm tus pin.
- Tshem tawm jig.
- Txiav pins tawm saum cov laug.
Txhawm rau ntxiv Daughter-board Breakouts:
- Txiav 4 tawm 9P Poj niam lub taub hau.
- Nyob rau sab saum toj, ntxig 9P Lub Taub Hau raws li qhia, thiab muab tshuaj txhuam tso rau hauv qab.
Txhawm rau ntxiv Direct Breakouts:
- Txiav 2 tawm 8P Poj niam lub taub hau.
- Nyob rau sab saum toj, ntxig rau 8P Lub Taub Hau raws li qhia, thiab muab tshuaj txhuam tso rau hauv qab.
Txhawm rau txuas lub taub hau, hauv qab nrog TX tus pin taw qhia nce:
- Lw thiab solder los ntawm RST tus pin hla 4 tus pin.
- Lw thiab solder los ntawm tus pin A0 hla 4 tus pin.
- Lw thiab solder los ntawm D1 tus pin hla 4 tus pin.
- Lw thiab solder los ntawm D2 tus pin hla 4 tus pin.
- Lw thiab solder los ntawm D6 tus pin hla 4 tus pin.
- Lw thiab solder los ntawm D7 tus pin hla 4 tus pin.
- Lw thiab solder los ntawm GND tus pin hla 4 tus pin.
- Kab thiab kab laug sab los ntawm 5V tus pin hla 4 tus pin.
- Kab thiab kab laug sab los ntawm 3V3 tus pin nqes 45 ° hla 4 tus pin.
TSEV KAWM NTAWV TSHAJ PLAWS
Lub HOUSING HEADERS tau txuas rau MCU HOUSING thiab qhov no tau txuas rau BASE PLATE.
- Nrog rau sab ntev ntawm HOUSING HEADERS taw tes rau lub qhov, ntxig D1M KEV TIV THAIV rau hauv qhov qhib hauv MCU HOUSING thiab thawb dej ntws tawm.
- Ntxig MCU mus rau MCU CONTACTS thaum sib txuas kom ntseeg tau tias ua kom raug.
- Muab lub taub hau TEEB sab saum toj ntawm cov khoom sib dhos ua ke thiab txuas nrog 2 ntawm 4G x 16mm ntsia hlau.
- Muab cov khoom sib dhos ua ke nrog lub qhov taw qhia rau sab luv thiab sau nrog 4G x 6mm ntsia hlau.
Kauj Ruam 4: Tsim 3V3 I2C Daughter-board
Qhov no muab IDC Header rau SOCKETS CIRCUIT thiab txuas rau MCU, ntxiv kev rub tawm ntawm kab I2C. Qhov no tau muab los ua tus ntxhais-pawg thawj coj kom yog tias koj xav tau 5V kev hloov pauv qib kev xav, koj tsuas tuaj yeem sib pauv lub rooj tsavxwm no nrog ib qho uas muab txhua txoj haujlwm xav tau. Cov kab AUX thiab GND tau tawg tawm rau cov kev cai tshwj xeeb (zoo li cov chaw qis qis thaum lub sijhawm pw tsaug zog). Cov txheej txheem tau piav qhia los ntawm sab hauv thiab sab nraud: ntawm lub rooj tsavxwm xaiv ib sab uas zoo li siv sab hauv; qhov tseem ceeb yog IDC Header yuav tsum nyob ntawm ntug taw tes tawm.
- Nyob sab hauv, ntxig rau 2P 90 ° Txiv Neej Lub Npe (1), 3P 90 ° Txiv Neej Lub Taub Hau (2), thiab muab tshuaj txhuam tso rau sab nraud.
- Ntawm sab hauv, ntxig rau 1P Txiv Neej Header (3), 2P Txiv Neej Headers (4), thiab muab tshuaj txhuam tso rau sab nraud.
- Sab nraud, ntxig IDC Header (5), thiab muab tshuaj txhuam tso rau sab hauv.
- Ntawm sab hauv, taug qab cov xaim dub los ntawm BLACK1 rau BLACK2 thiab cov laug.
- Ntawm sab hauv, taug qab cov xaim dub los ntawm BLACK3 rau BLACK4 thiab cov laug.
- Ntawm sab hauv, taug ib txoj kab dawb los ntawm WHITE1 txog WHITE2 thiab cov laug.
- Ntawm sab hauv, taug ib txoj kab ntsuab los ntawm GREEN1 rau GREEN2 thiab cov laug.
- Ntawm sab hauv, taug ib txoj kab liab los ntawm RED1 mus rau RED2 thiab cov laug.
- Ntawm sab hauv, taug ib txoj kab daj los ntawm YELLOW1 mus rau YELLOW2 thiab cov laug.
- Ntawm sab hauv, ntxig rau 4K7 tus tiv thaiv rau hauv SILVER1 thiab SILVER2 thiab tawm mus ua kev txiav.
- Nyob sab hauv, taug ib txoj kab liab qab ntawm SILVER5 mus rau SILVER6 thiab cov laug.
- Ntawm sab hauv, taug qab cov hlau lead los ntawm SILVER1 rau SILVER3 thiab cov laug.
- Nyob sab hauv, ntxig 4K7 tus tiv thaiv rau hauv SILVER4 thiab SILVER2 thiab cov laug.
Kauj Ruam 5: Sib Sau Cov Cheeb Tsam Loj
- Ua kom ntseeg tau tias SHELL tau tsim thiab sim ua Circuit (cable thiab qhov nyob).
- Ntxig 3V3 I2C DAUGHTER-BOARD, nrog 3V3 tus pin ntawm qhov kawg ntawm lub taub hau (saib daim duab).
- Muab tus Jumper tso rau ntawm 2P Txiv Neej Lub Taub Hau ntawm DAUGHTER-BOARD.
- Ntxig lub IDC Socket los ntawm SHELL CABLE rau hauv IDC Header ntawm DAUGHTER-BOARD.
- Ua tib zoo ntxig DAUGHTER-BOARD/HOUSING nruab nrab ntawm cov xov hluav taws xob hauv SHELL thiab kho lub hauv paus qhov.
- Ua kom lub hauv paus ruaj khov rau SHELL nrog 4G x 6mm ntsia hlau.
- Txuas ib qho ASSIMILATE SENSORS koj tau ua.
Kauj Ruam 6: Cov Kauj Ruam Tom ntej
Fais fab koj lub cuab yeej tshiab (5V MicroUSB).
Taw koj tus browser ntawm https://shiftr.io/try thiab txheeb xyuas qhov pom ntawm koj cov ntaub ntawv.
Laum los ntawm txhaj rau cov nodes hauv kab ntawv.
Qhib lub console qhov rai txhawm rau txheeb xyuas qee qhov xwm txheej nkag mus.
Thaum txaus siab, hloov cov ntsiab lus nrog koj tus kheej MQTT Broker account/server.
Txheeb xyuas cov kev tsim muaj feem cuam tshuam no
Tom ntej ntawm daim npav yog txhim kho ACTORS rau ASSIMILATE IOT NETWORK.
Pom zoo:
Ib qho yooj yim IOT - App Tswj RF Sensor Hub rau Nruab Nrab Ntau Yam IOT Devices: 4 Cov Kauj Ruam
YOT yooj yim IOT - App Tswj RF Sensor Hub rau Nruab Nrab Ntau Yam IOT Devices: Hauv kab lus qhia no, peb yuav tsim lub network ntawm cov cuab yeej uas tuaj yeem tswj tau los ntawm kev txuas xov tooj cua los ntawm lub hauv paus hub. Cov txiaj ntsig ntawm kev siv 433MHz xov tooj cua txuas txuas tsis siv WIFI lossis Bluetooth yog qhov ntau dua (nrog qhov zoo
ESP8266 Tswj Servo Node-RED MQTT (Mosquitto) IoT: 6 Cov Kauj Ruam
ESP8266 Tswj Servo Node-RED MQTT (Mosquitto) IoT: Lub sijhawm no kev koom ua ke ntawm ESP8266 thiab Node-RED platform tau ua tiav kev sib koom ua ke hauv qhov no servo tswj los ntawm PWM nrog kev sib hloov ntawm 0 txog 180 degrees. Los ntawm HMI lossis SCADA Tus tsim lub vev xaib ntawm Node-Red-Dashboard siv los ua lub hauv paus
ESP8266 DS18B20 Kub Node-RED MQTT: 5 Kauj Ruam
ESP8266 DS18B20 Kub Node-RED MQTT: Lub sijhawm no kev sib koom ua ke ntawm ESP8266 thiab Node-RED platform tau paub ua ke ua ke lub sensor DS18B20 ntawm Cov Txheej Txheem Kub Kub Onewire.From HMI lossis SCADA Web tsim ntawm Node-Red-Dashboard siv los ua lub hauv paus MQTT Cov txheej txheem thiab pubsubclient libra
ESP8266 & Pej Xeem "Dawb" MQTT Broker HiveMQ & Node-RED: 6 Kauj Ruam (nrog Duab)
ESP8266 & Pej Xeem "Pub Dawb" MQTT Broker HiveMQ & Node-RED: MQTT raws tu qauv tau siv lub zog zoo nyob rau xyoo tas los no txij li nws yooj yim, nyab xeeb, siv tau thiab lub teeb zoo rau IoT thiab M2M daim ntawv thov. MQTT daim ntawv thov, muaj pej xeem MQT
Tutorial ESP8266 thiab Node-RED MQTT GPIO (Mosquitto) # 1: 5 Cov Kauj Ruam
Tutorial ESP8266 thiab Node-RED MQTT GPIO (Mosquitto) # 1: Txhawm rau ua ke cov qauv ESP8266 nrog node-red IoT platform tau siv MQTT raws tu qauv, muaj cov tsev qiv ntawv rau esp8266 ua MQTT hauv qhov no kuv txiav txim siab siv lub tsev qiv ntawv pubsubclient. Qhov piv txwv no yuav tau txais Node Red uas tau txais cov ntaub ntawv los ntawm