Cov txheej txheem:

IoT Kho Tus Kheej rau Tsiaj: 7 Kauj Ruam (nrog Duab)
IoT Kho Tus Kheej rau Tsiaj: 7 Kauj Ruam (nrog Duab)

Video: IoT Kho Tus Kheej rau Tsiaj: 7 Kauj Ruam (nrog Duab)

Video: IoT Kho Tus Kheej rau Tsiaj: 7 Kauj Ruam (nrog Duab)
Video: Tus Neeg Ruam - R-Lin Thoj | New Song [ Official MV ] Nkauj Tawm Tshiab 2023 Hmong Song 2023 2024, Hlis ntuj nqeg
Anonim
Image
Image
IoT Kho Tus Kheej rau Tsiaj
IoT Kho Tus Kheej rau Tsiaj

Kuv muaj ob tus miv, thiab yuav tsum muab tshuaj rau lawv txog 3 zaug hauv ib hnub tau dhau los ua qhov tsis zoo. Lawv yuav saib kuv nrog lawv lub ntsej muag ntxim hlub thiab ntsia zoo, tom qab ntawd khiav mus rau ib lub thawv uas muaj cov zaub ntsuab, meowing thiab thov rau lawv. Kuv tau txiav txim siab tias txaus txaus. Tsis muaj qhov sawv ntxiv tsuas yog muab ob peb yam khoom rau miv. Tam sim no yog lub sijhawm rau kho lub tshuab xa tshuaj, vim tias raws li cov lus hais mus: "Cov kws tsim tawm muaj los ua cov khoom nyuaj kom ua tej yam yooj yim dua."

DFRobot txhawb nqa txoj haujlwm no.

Daim ntawv teev npe:

  • DFRobot Raspberry Pi 3
  • DFRobot Raspberry Pi Lub Koob Yees Duab Module
  • DFRobot Stepper Motor nrog Planetary Gear
  • I2C LCD 16x2
  • Barrel Jack rau Terminal
  • DRV8825 Stepper Tsav Tsheb
  • Capacitor 100 µF
  • Arduino UNO & Genuino UNO
  • Jumper xov hlau (generic)

Kauj Ruam 1: Tsim Tsim

Tsim Tsim
Tsim Tsim

Thawj zaug yog qhov kev xaiv yuav tswj hwm kuv lub tshuab xav li cas tshiab. Bluetooth yuav tau luv dhau ntawm qhov ntau, tsuas yog 30 taw uas tsis muaj kev cuam tshuam. Nrog cov ntaub ntawv no, Kuv xaiv siv WiFi. Tab sis tam sim no, kuv yuav siv WiFi li cas los tswj lub tshuab? Raspberry Pi 3 tau tsim WiFi muaj peev xwm, cia kuv siv Flask los tuav lub vev xaib. Tom ntej no yog lub ncauj lus ntawm lub thawv thiab yuav ua li cas thiaj li faib khoom. Kuv txiav txim siab raws li lub log tig tsim, qhov khoom kho mob yuav poob rau hauv ntu me me, yuav tsum tau hloov ib puag ncig, thiab tom qab ntawd cov khoom lag luam yuav poob qis rau ntawm qhov chaw nce thiab taug kev mus rau pem hauv ntej ntawm lub tshuab.

Kauj Ruam 2: Ua Tus Qauv Fusion 360

Ua Tus Qauv Fusion 360
Ua Tus Qauv Fusion 360
Ua Tus Qauv Fusion 360
Ua Tus Qauv Fusion 360
Ua Tus Qauv Fusion 360
Ua Tus Qauv Fusion 360

Kuv pib los ntawm kev tsim lub hauv paus qauv rau cov khoom siv kho. Cov khoom lag luam poob rau hauv lub tshuab raj me me uas lawv tau coj mus rau hauv lub log tig.

Tom ntej no kuv ntxiv Raspberry Pi 3 rau Fusion tsim, nrog rau lwm yam khoom siv hluav taws xob, suav nrog LCD thiab Raspberry Pi lub koob yees duab module. Kuv kuj tau ua lub raj mis uas tuaj yeem khaws cov khoom ntxiv.

Cov phab ntsa rau cov tshuaj kho yuav tsum raug txiav tawm ntawm 1/4 nti plywood ntawm CNC router. Muaj 7 daim rau nws, 4 phab ntsa, hauv pem teb, thiab sab saud thiab daim npog uas tuaj yeem qhib thiab kaw kom nthuav tawm cov khoom.

Thaum kawg, Kuv tsim tus "zoo nkauj" tes los qhib lub hau.

Kauj ruam 3: Teeb tsa Pi

DFRobot ncav tes rau kuv thiab xa lawv Raspberry Pi 3 thiab Raspberry Pi Lub Koob Yees Duab Module. Yog li tom qab kuv qhib lub thawv kuv tau txais txoj haujlwm los teeb tsa daim npav SD. Ua ntej kuv tau mus rau Raspberry Pi Downloads nplooj ntawv thiab rub tawm qhov tshiab tshaj plaws ntawm Raspbian. Tom qab ntawd kuv rho tawm cov ntawv thiab muab tso rau hauv cov npe yooj yim. Koj tsis tuaj yeem tsuas yog luam/muab cov ntawv.img tso rau hauv SD daim npav, koj yuav tsum "hlawv nws" mus rau daim npav. Koj tuaj yeem rub tawm cov khoom siv hluav taws xob zoo li Etcher.io kom yooj yim hloov OS cov duab. Tom qab cov ntaub ntawv.img nyob ntawm kuv daim npav SD kuv tso nws rau hauv Raspberry Pi thiab muab lub zog rau nws. Tom qab kwv yees li 50 vib nas this kuv tshem lub qaum thiab tshem daim npav SD. Tom ntej no kuv muab daim npav SD rov qab rau hauv kuv lub PC thiab mus rau phau ntawv "khau raj". Kuv tau qhib Notepad thiab khaws nws ua cov ntawv tsis muaj npe hu ua "ssh" nrog TSIS txuas ntxiv. Kuj tseem muaj cov ntawv kuv ntxiv hu ua "wpa_supplicant.conf" thiab muab cov ntawv no tso rau hauv nws: network = {ssid = psk =} Tom qab ntawd kuv tau khaws thiab tshem daim npav thiab muab rov qab rau hauv Raspberry Pi 3. Tam sim no yuav tsum tso cai rau kev siv SSH thiab txuas rau WiFi.

Kauj ruam 4: Txhim Kho Software

Muaj ntau qhov software sib txawv uas tuaj yeem rub tawm cov vis dis aus, xws li VLC thiab cov lus tsa suab, tab sis kuv txiav txim siab siv mjpeg-streamer vim nws qis qis thiab txhim kho yooj yim. Raws li cov lus qhia ntawm lub xaib, ua a: git clone https://github.com/jacksonliam/mjpg-streamer.git Rau hauv daim nplaub tshev, tom qab ntawv ntaus: sudo apt-get install cmake libjpeg8-dev Txhawm rau teeb tsa cov tsev qiv ntawv xav tau. Hloov koj phau ntawv teev npe rau hauv daim nplaub tshev uas koj rub tawm thiab tom qab ntawd ntaus ntawv: ua raws los ntawm: sudo ua nruab Txhawm rau sau cov software. Thaum kawg nkag mus: xa tawm LD_LIBRARY_PATH =. Thiab kom khiav nws hom:./mjpg_streamer -o "output_http.so -w./www" -i "input_raspicam.so" Koj tuaj yeem nkag mus rau kwj dej los ntawm kev mus rau: https:// Tus pi lub zos ip: 8080/kwj. html Txhawm rau saib cov kwj.

Kauj Ruam 5: Teeb tsa Lub Vev Xaib

Txhawm rau kom tau txais lub tshuab kom tswj tau sab nraud los ntawm WiFi Kuv xav tau lub vev xaib. Lub vev xaib siv lub hauv paus ua haujlwm rau cov nplooj ntawv web thaum thov, feem ntau yog los ntawm browser. Kuv xav tau qee yam nrawm thiab yooj yim rau teeb tsa thiab siv, tshem Apache tawm ntawm lub rooj. Kuv kuj xav kom cuam tshuam lub vev xaib nrog Python yog li kuv tuaj yeem tswj Arduino Uno nrog PySerial. Qhov kev tshawb fawb no thaum kawg coj kuv mus rau Flask, lub tsev qiv ntawv Python zoo uas cia cov neeg siv tsim lub vev xaib sai. Cov lej tag nrho tau txuas rau nplooj ntawv no. Python tsab ntawv pib teeb tsa 2 lub vev xaib, ib qho uas tau tuav ntawm lub hauv paus npe, '/', thiab lwm qhov uas tau tuav ntawm '/faib tawm'. Nplooj ntawv txheeb xyuas muaj daim ntawv HTML uas thaum xa xa daim ntawv thov xa mus rau nplooj ntawv xa tawm. Cov nplooj ntawv xa tawm tom qab ntawv tshuaj xyuas yog tias tus nqi xa ntawv raug, thiab yog tias nws yog cov lus 'D / n' tau txais xa los ntawm cov ntawv xa mus rau Arduino Uno.

Kauj Ruam 6: Tswj IO

Tswj IO
Tswj IO
Tswj IO
Tswj IO
Tswj IO
Tswj IO
Tswj IO
Tswj IO

Kuv txiav txim siab siv DRV8825 los tsav kuv lub cav tsav, feem ntau yog vim nws tsuas xav tau 2 IO pins nrog rau kev hloov kho tam sim no txwv. Kuv sim siv L293D tab sis nws tsis tuaj yeem lis lub nra ntawm lub cav tsav. DRV8825 yog tswj los ntawm pulsing STEP tus pin ntawm PWM, thiab cov kev taw qhia yog tswj los ntawm rub DIR tus pin siab lossis qis. Stepper motor kuv tab tom siv muaj 1.2 amp kos, yog li kuv hloov VREF qhov hluav taws xob rau.6V. Tom ntej no yog LCD. Kuv xav siv I2C txhawm rau txo qhov IO xav tau thiab ua kom yooj yim dua cov cai. Txhawm rau teeb tsa lub tsev qiv ntawv, tsuas yog tshawb rau "LiquidCrystal_I2C" thiab nruab nws. Thaum kawg, Arduino Uno tshawb xyuas cov ntaub ntawv tshiab hauv ntu tsis thiab yog tias nws phim 'D'. Yog tias nws ua, Uno ua rau lub tshuab hluav taws xob txav mus rau 180 degrees thiab tom qab ntawd -72 degrees los tiv thaiv kev kho kom tsis txhob nyob hauv tsev.

Pom zoo: