Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Nws Ua Haujlwm Li Cas?
- Kauj ruam 2: Softwares
- Kauj Ruam 3: Txheej Txheem Circuit
- Kauj ruam 4: Khoom siv tes ua
- Kauj ruam 5: Mosquitto
- Kauj Ruam 6: Arduino IDE
- Kauj ruam 7: Qhib
- Kauj Ruam 8: Node-RED
- Kauj ruam 9: Qhib
Video: Ntse Tsiaj Feeder: 9 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:25
Koj puas muaj tus tsiaj?
- Tsis yog: txais ib qho! (thiab rov qab los rau cov lus qhia no).
- Yog: txoj haujlwm zoo!
Nws yuav tsis zoo yog tias koj tuaj yeem pub mis thiab muab dej rau koj tus hlub uas tsis tau tso tseg txoj kev npaj kom tau mus tsev raws sijhawm? Peb hais tsis txhawj ntxiv lawm.
Hauv txoj haujlwm no peb tau ua cov chaw taws teeb tswj (los ntawm lub vev xaib) khoom noj thiab dej faib.
Los ntawm cov dashboard online koj tuaj yeem saib cov ntaub ntawv thiab tswj cov dispensers:
- Saib cov zaub mov thiab qib dej hauv cov tso tsheb hlau luam.
- Saib cov qib zaub mov thiab dej hauv lub tais.
- Puas yog tsiaj noj lossis haus tam sim no?
- Teem sijhawm pub mis (ntaus ntawv yuav tsis faib zaub mov yog tias muaj zaub mov txaus hauv lub tais).
- Muab cov dej tso rau thaum lub tais khoob.
- Muab cov zaub mov/dej tso nrog nias lub pob.
- Tau txais cov ntawv ceeb toom laub rau koj lub xov tooj (los ntawm Telegram app).
Peb Yog Leej Twg?
Tsim los ntawm Tom Kaufman thiab Katya Fichman, Computer Science cov tub ntxhais kawm ntawm IDC Herzliya.
Qhov haujlwm no tau ua rau chav kawm IOT.
Khoom siv
Electronics
- 2 X ESP8266 (Wemos d1 mini).
- Jumper xov hlau.
- 2 X Breadboard.
- 4 X Ultrasonic sensor.
- 2 X Load cell.
- 2 X Load cell amplifier (HX711).
- Servo (180 °).
- Servo (kev sib hloov tas li).
- 2 X 6V fais fab mov.
Qhov
- Cornflakes dispenser (Amazon txuas).
- 3D luam tawm lub tshuab xa zaub mov lub taub hau (https://www.thingiverse.com/thing:3998805).
- 3D luam tawm lub tshuab xa zaub mov xa mus rau servo txuas (https://www.thingiverse.com/thing:3269637).
- 3D luam cov zaub mov muag zaub lub rooj muag zaub (tsim los rau txoj haujlwm no:
- 3D luam tawm load cell puag thiab phaj (tsim rau txoj haujlwm no:
- Lub tshuab xa dej (Amazon txuas rau qee yam zoo sib xws).
- Hlau (txhawm rau txuas lub taub dej ntawm lub pob qhov rooj mus rau servo).
- 3 X Ultrasonic sensor tus sawv.
Kauj Ruam 1: Nws Ua Haujlwm Li Cas?
ESP8266 cov laug cam xa cov cim nyeem rau Node-RED los ntawm Mosquitto (MQTT broker).
Node-RED txheej txheem cov ntaub ntawv, ua qhov ua raws (tseem xa cov lus txib xa mus rau ESP8266 cov laug cam los ntawm Mosquitto) thiab nthuav qhia cov ntaub ntawv ntawm lub dashboard.
Txhua qhov kev suav suav tau ua hauv Node-RED yog li nws yuav yooj yim dua qhov haujlwm no thiab hloov kev ua cov ntaub ntawv raws li koj qhov chaw thiab kev nyiam yam tsis tau txais koj txhais tes qias neeg nrog coding.
Kauj ruam 2: Softwares
Arduino IDE Cov
Rub tawm thiab teeb tsa (txuas:
Yoov Tshaj Lij
Rub tawm thiab teeb tsa (txuas:
Node.js
Rub tawm thiab teeb tsa (txuas:
Node-RED
Ua raws cov lus qhia:
ngrok
Rub tawm:
Xov tooj
Nruab lub app ntawm koj lub smartphone.
Kauj Ruam 3: Txheej Txheem Circuit
* Ob lub cuab yeej muaj cov khoom siv sib xws
Dej Tso Dej
-
Ultrasonic sensor (rau lub tank dej)
- GND -G
- VCC - 5V
- NCO - D5
- TRIGGER - D0
-
Ultrasonic sensor (rau tus tsiaj nyob deb ntawm lub tais)
- GND -G
- VCC - 5V
- NCO - D6
- TRIGGER - D7 Cov
-
Load cell
- GREEN - A+ (HX711)
- WHITE - A- (HX711)
- BLACK - E- (HX711)
- Liab - E+ (HX711)
-
HX711 (load cell amplifier)
- GND -G
- VCC - 5V
- TSI - D4
- TSO - D3
-
Kev pabcuam (180 °)
- GND -G
- VCC - 5V
Zaub Mov Zaub Mov
-
Ultrasonic sensor (rau lub tank khoom noj)
- GND -G
- VCC - 5V
- NCO - D5
- TRIGGER - D0
-
Ultrasonic sensor (rau tus tsiaj nyob deb ntawm lub tais)
- GND -G
- VCC - 5V
- NCO - D6
- TRIGGER - D7 Cov
-
Load cell
- GREEN - A+ (HX711)
- WHITE - A- (HX711)
- BLACK - E- (HX711)
- Liab - E+ (HX711)
-
HX711 (load cell amplifier)
- GND -G
- VCC - 5V
- TSI - D4
- TSO - D3
-
Servo (kev sib hloov tas li)
- GND -G
- VCC - 5V
- Tswj - D8
Kauj ruam 4: Khoom siv tes ua
Lub taub dej tso dej
- Kaw cov servo mus rau sab saum toj hauv qab ntawm lub dispenser (raws li qhia hauv daim duab).
- Laum ib lub qhov me me hauv lub taub dej ntawm lub qhov taub.
- Txuas lub taub hau servo mus rau lub pob qhov rooj nrog xaim (xyuas kom tseeb tias lub taub hau servo nyob ntawm txoj haujlwm 0 thiab xyuas kom tseeb tias xaim nruj).
- Kuaj ib qho ultrasonic sensor mus rau sab sab hauv ntawm lub tank, ze nws sab saum toj (lub ntsej muag lub ntsej muag qis).
- Kuaj ib qho ultrasonic sensor hauv qab lub pob qhov dej mus rau sab nraud (xyuas kom nws siab txaus kom lub tais dej yuav tsis cuam tshuam rau nws nyeem).
Khoom noj khoom haus
- Ntsia lub servo rau nws tus tuav (3D luam ib feem).
- Kua nplaum lub raj (3D luam ib feem) rau lub tank (3D luam ib feem).
- Txuas tus tuav lub tank rau lub chaw tso khoom faib khoom (3D luam ib feem) thiab muab lub tank tso rau hauv qhov chaw.
- Ntxig qhov sib tw (luam tawm 3D) rau nws qhov chaw thiab dhau los ntawm cov khoom siv roj hmab tig ntawm lub tshuab xa khoom.
- Ntsia tus neeg tuav lub tog raj kheej rau lub chaw faib khoom.
- Kuaj ib qho ultrasonic sensor mus rau sab sab hauv ntawm lub tank lub hau (lub ntsej muag tig mus rau hauv qab).
- Kuaj ib qho ntsuas ultrasonic mus rau sab ntawm lub tank lub taub hau tig mus rau qhov chaw uas koj tus tsiaj yuav noj.
Load Cells
Kaw txhua lub xovtooj ntawm tes mus rau 3D luam tawm hauv paus thiab phaj (ntsaws tes lub xub xub tig rov qab)
Kauj ruam 5: Mosquitto
Qhib Mosquitto (cov neeg siv windows: mus rau Mosquitto nplaub tshev, qhib cmd thiab nkag mus rau: "mosquitto -v").
* Txhawm rau kom tau txais IP chaw nyob sab hauv ntawm lub computer, khiav cmd thiab nkag mus rau "ipconfig".
Kauj Ruam 6: Arduino IDE
Qhib Arduino IDE thiab ua raws li "Nruab ESP8266 Ntxiv-hauv Arduino IDE" ib feem ntawm phau ntawv qhia no:
Mus rau Cov Cuab Yeej-> Pawg thawj coj thiab xaiv "LOLIN (WEMOS) D1 R2 & mini".
Mus rau Sketch-> Suav nrog Tsev Kawm Ntawv-> Ntxiv. ZIP Library … thiab ntxiv 3 lub tsev qiv ntawv hauv "Libraries.rar" cov ntaub ntawv.
Qhib "HX711Calibration" kos duab, rub nws mus rau ob qho ESP8266's, khiav nws thiab ua raws cov lus qhia (thaum pib ntawm cov cai thiab hauv cov lej saib xyuas) txhawm rau ntsuas lub zog thauj khoom (nco ntsoov tias tus lej baud ntawm tus lej saib xyuas tau teeb tsa 115200 (ib.
* Sau qhov ntsuas qhov ntsuas thiab xoom offset (rau siv tom qab).
Qhib "FoodDispenser" thiab "WaterDispenser" kos duab los ntawm IDE thiab hloov pauv qhov hauv qab no nrog koj cov chaw (hauv cov ntawv "Settings.h"):
- WIFI_SSID
- WIFI_PASSWORD
- MQTT_SERVER
- LOAD_CELL_CALIBRATION_FACTOR
- LOAD_CELL_ZERO_OFFSET
* Hauv MQTT_SERVER nkag mus rau tus IP sab hauv los ntawm "Mosquitto" kauj ruam.
Muab cov duab kos rau koj ob ESP8266 (ib tus lej rau txhua lub rooj tsavxwm).
* Daim ntawv ceeb toom tias peb tau siv "AsyncMqttClient" lub tsev qiv ntawv thiab tsis yog ntau lub tsev qiv ntawv "pubsubclient" txij li esp8266 sib tsoo thaum ua ke nrog "HX711" lub tsev qiv ntawv.
* Yog tias koj xaiv hloov pauv txoj cai, nco ntsoov tsis txhob siv "ncua" thiab "tawm" cov haujlwm hauv kev hu rov qab vim nws yuav ua rau muaj kev sib tsoo.
Kauj ruam 7: Qhib
Unzip cov ntawv rub tawm (los ntawm qhov txuas hauv "Softwares" kauj ruam).
Qhib "ngrok.exe" thiab khiav cov lus txib "ngrok http 1880".
* Koj tuaj yeem xaiv cheeb tsam ze koj (au, eu, ap, peb, jp, hauv, sa). Lub neej ntawd yog peb.
Piv txwv li khiav qhov hais kom ua: "ngrok http --region = eu 1880" (teeb tsa cheeb tsam rau Europe).
Tam sim no koj yuav pom koj lub vev xaib rau sab nrauv siv (peb yuav xa mus rau qhov chaw nyob no yog YOUR_NGROK_ADDRESS).
Kauj Ruam 8: Node-RED
Qhib Node-RED (cov neeg siv windows: qhib cmd thiab nkag mus rau "node-red") thiab mus rau https:// localhost: 1880 (yog tias nws tsis ua haujlwm, tshawb nrhiav qhov chaw nyob hauv cmd qhov rai uas nws tau sau "Server tam sim no khiav ntawm ").
Qhib cov ntawv qhia zaub mov (nyob rau sab xis saum toj) thiab nias "Manage palette".
Mus rau "Nruab" tab, tshawb thiab teeb tsa cov qauv no:
- node-red-contrib-persist.
- ntawm-liab-contrib-cron-ntxiv.
- ntawm-liab-tshab-ui-coj.
- ntawm-liab-dashboard.
- node-red-contrib-telegrambot.
Mus rau cov ntawv qhia zaub mov-> Ntshuam thiab xa cov ntaub ntawv ntws (rho tawm cov ntawv RAR uas txuas nrog thiab xa cov ntaub ntawv json).
Saib cov duab txuas rau kev piav qhia txog qhov ntws.
Koj yuav tsum tau hloov kho cov no nrog koj cov chaw:
- Hloov kho qhov "Telegram sender" node's profile nrog koj tus bot lub npe siv thiab token (siv phau ntawv qhia no: https://www.iotwithus.com/send-messages-using-tel …)
- Hauv qab ntawm qhov hloov pauv qhov them nyiaj ntawm "Ngrok Chaw Nyob" thiab "Telegram Chat Id" nodes (tau txais koj tus lej sib tham los ntawm kev siv Telegram phau ntawv qhia hauv qhov txuas saum toj no).
-
Hauv qab ntu ntawm qhov ntws muaj cov chaw teeb tsa - hloov kho lawv raws li koj xav tau:
- Qhib tsiaj yog noj/haus ceeb toom.
- Txheeb xyuas qhov deb li cas rau qhib kev ceeb toom noj/haus.
- Txhais cov tais thiab tso tsheb hlau luam ua cov ntaub ntawv.
- Hloov kho lub sijhawm xa tawm (rau qhov ntev npaum li cas qhov kev faib tawm tshwm sim - pib hom thiab nias lub pob).
- Txheeb xyuas lub tais zaub mov qhov feem pua dhau los (tshem tawm cov khoom noj tsis siv neeg yog tias muaj zaub mov txaus hauv lub tais).
Tso cov dej ntws (nyob rau sab xis saum toj).
* Tsuas yog thawj qhov kev xa tawm, koj yuav pom cov lus ceeb toom hauv lub qhov rais debug txog qhov ploj 'persistance.json' cov ntaub ntawv. Tsis txhob txhawj xeeb txog nws txij li lub sijhawm koj yuav teem sijhawm pub mis lossis hloov pauv dej pib, nws yuav pib ua cov ntawv no thiab koj yuav tsis muaj lus ceeb toom no ntxiv lawm.
Koj tuaj yeem saib koj lub dashboard ntawm https:// NODE-RED_PC'S_INTERNAL_IP_ADDRESS: 1880/ui (yog tias koj txuas nrog tib LAN li server) lossis YOUR_NGROK_ADDRESS/ui (los ntawm txhua qhov chaw).
Kauj ruam 9: Qhib
Peb vam tias qhov kev qhia no tau qhia thiab yooj yim nyeem, nkag siab thiab siv.
Xav tias dawb nug peb dab tsi.
Pom zoo:
Sib tham sib Ntiaj Teb Plush thiab Phau Ntawv Tsiaj Tsiaj Zoo Tshaj Plaws: 14 Kauj Ruam
Sib tham sib Globe Plush thiab Phau Ntawv Tsiaj Tsiaj Zoo: Hauv kuv li Kev Kawm Txuj Ci thiab Kawm Hauv chav kawm, qhov haujlwm kawg tau ua haujlwm rau kuv nrog tsim cov khoom siv ib qho ntawm cov thev naus laus zis uas peb tau kawm txog hauv chav kawm. Txog rau txoj haujlwm no, txawm li cas los xij, peb yuav tsum tau siv thev naus laus zis ntau dua li qhov peb tau ua nrog nws befo
Leo: Tus Tsiaj Tsiaj: 7 Kauj Ruam (nrog Duab)
Leo: Tus Tsiaj Tsiaj: Nyob Zoo, Nov yog kuv thawj cov lus qhia. Thawj version ntawm "Sony Aibo Robot (1999)" nyiam kuv mus rau neeg hlau thaum muaj hnub nyoog plaub xyoos, puas tau-txij li, nws yog kuv txoj kev npau suav los ua tus tsiaj neeg hlau rau kuv. Yog li kuv tuaj nrog "Leo: Pet Cat" w
SmartPET - Ntse Tsiaj Feeder: 7 Kauj Ruam (nrog Duab)
SmartPET - Ntse Tsiaj Pub: Hav! Kuv yog Maxime Vermeeren, muaj 18 xyoo MCT (Multimedia thiab kev sib txuas lus thev naus laus zis) tub kawm ntawv ntawm Howest.Kuv tau xaiv los tsim tus tsiaj pub tsiaj ntse raws li kuv qhov project. Vim li cas kuv thiaj ua li no? Kuv miv muaj qee qhov teeb meem hnyav, yog li kuv txiav txim siab ua lub tshuab t
Ntse Tsiaj Feeder: 11 Kauj Ruam
Ntse Tsiaj Pub: Kuv yog menyuam kawm ntawv ntawm Howest Kortrijk Academy hauv Belgium. Kuv ua tus pub mis tshwj xeeb tshaj yog rau miv thiab dev. Kuv ua qhov haujlwm no rau kuv tus dev. Ntau zaus kuv tsis nyob hauv tsev los pub kuv tus dev thaum yav tsaus ntuj. Vim li ntawd kuv tus dev yuav tsum tau tos kom nws tau zaub mov. Nrog th
Lub Hnab Ntse Hnab Ntse Ntse Computer: 4 Kauj Ruam (nrog Duab)
Lub Hnab Ntse Hnab Ntse Ntse Computer: Qhov no yog "hnab looj tes ntse" nas lub computer uas tuaj yeem siv nrog ib lub PC, Mac, lossis Linux computer. Nws tau tsim los siv Binho Nova ntau tus txheej txheem USB host adapter, uas tso cai rau koj txuas cov ntsuas thiab lwm yam khoom siv rau koj lub khoos phis tawj thiab tom qab ntawd txuas ntxiv