Cov txheej txheem:
- Khoom siv
- Kauj ruam 1: Kho lub Raspberry Pi
- Kauj ruam 2: Database (Mariadb)
- Kauj Ruam 3: Ua Hauv Qab Lub Tsev
- Kauj Ruam 4: Phaj Phaj
- Kauj Ruam 5: Sab Nraud Tsev
- Kauj Ruam 6: Tsim Cov Hluav Taws Xob Hluav Taws Xob
- Kauj ruam 7: Code
- Kauj ruam 8: Lub vev xaib
- Kauj ruam 9: Autorun
- Kauj ruam 10: Ua tiav
Video: Ntse Tsev: 10 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Yog tias koj xav ua lub tsev ntse nrog raspberry pi ces koj tsuas yog yuav tsum ua raws cov theem hauv qab no thiab ua ntej koj paub nws koj tau ua lub tsev ntse koj tus kheej.
Khoom siv
-
Ntoo (MDF 6 hli)
- 1 x 600 mm * 341, 9 mm Rau lub ru tsev ront
- 1 x 600 mm * 335, 9 mm Rau lub ru tsev nram qab
- 2 x 568 mm * 443 mm Rau hauv qab nthab thiab qab nthab
- 3 x 556 mm * 100 mm Rau phab ntsa sab hauv
- 2 x 443 mm * 100 hli
- 2 x 212, 5 mm * 100 mm
- 1 x 75 mm * 100 hli
- 1 x 56 mm * 100 hli
- 2 x 475 mm x 361, 5 mm Rau sab nrauv
- 2 x 588 mm x 124 mm
- 2 x 600mm * 600mm
- 1 x ntoo kaum bar
- 2 x ntoo kab 40 mm * 50 mm * 2100 mm
- 1 x cable VTBST0, 75 Rood 15 m
- 1 x cable VTBST0, 75 Zwart 25 m
- 2 x PVC yob 0, 7 mm 100 mm * 1000 mm
- 1 x ntoo kua nplaum 250G
- 1 x velcro 20 hli * 10 hli
- 1 x raspberry pi 3b+,
- 1 x micro sd card (32gb)
- 1 x LCD nrog I2C
- 1 x DS18B20
- 1 x74c595
- 1 x MCP3008
- 1 x UV sensor
- 1 x Volts sensor
- 1 x resistors 10 ohm
- 10 x laub khawm
- 10 x LED qhia txog 5 hli
- 20 x resistors 470 ohm
- 4 x 3, 5V - 250mA Hnub ci vaj huam sib luag
- 1 x Hnub Ci Lithium Ion/Polymer charger
- 1 x Txiv neej DC Power adapter nrog lub davhlau ya nyob twg thaiv
- 1 x Lithium Ion Polymer Battery - 3.7v 2500mAh
- cua sov ntsws tubing
- solder tin
Cov Cuab Yeej:
Soldering hlau
Fretsaw
Drilling tshuab
vouwmeter
xaum
Kauj ruam 1: Kho lub Raspberry Pi
Thaum koj muaj tag nrho koj cov khoom siv peb tuaj yeem pib!
- Muab koj daim npav microSD tso rau hauv koj lub computer;
- Rub tawm Raspbian OS duab;
- Nyem cov duab ntawm micro SD-daim npav nrog software zoo li Etcher lossis win32diskimager;
- Mus rau hauv qhov muab faib tau ntawm SD-card thiab qhib cmdline.txt ntawv nrog notepad;
- Ntxiv ip = 169.254.10.1 txuag thiab kaw;
- Tam sim no muab koj daim npav micro-SD tso rau hauv koj lub raspberry pi;
- ib zaug nws tau khau raj, rub tawm Putty;
- Tam sim no, txuas rau koj tus raspberry pi los ntawm kev siv tus ip-adress peb tau ntaus ua ntej lawm;
- Nkag mus nrog tus neeg siv pi thiab password raspberry;
- Ntaus sudo raspi-teeb tsa, hloov koj tus password, mus rau kev sib tham xaiv, hloov lub hostname ntawm koj tus pi. Mus rau cov kev xaiv hauv zos thiab hloov pauv koj lub tebchaws wi-fi thiab thaj chaw sijhawm. Tom ntej no, mus rau kev xaiv khau raj, tig tos rau lub network ntawm khau raj tawm thiab tos kom txaws npo tawm. Thaum kawg mus rau kev xaiv cuam tshuam thiab qhib lub i2c thiab spi interface;
- Txuas nrog wi-fi siv cov kauj ruam hauv qab no txuas rau wifi;
- Ua cov lus txib sudo apt-hloov tshiab thiab sudo apt-upgrade;
Kauj ruam 2: Database (Mariadb)
Ntxiv database rau peb Raspberry Pi. Peb ua qhov no hauv Putty.
- sudo apt-tau nruab mysql-server, mysql-client
- mysql -u hauv paus -p
- tsim cov neeg siv 'hauv paus'@'localhost' txheeb xyuas los ntawm tus lej zais;
- ZOO TSHAJ PLAWS NTAWM *. * TO 'hauv paus'@'%'
- Tam sim no theej cov cai ntawm cov ntaub ntawv sql thiab muab tshuaj txhuam rau hauv Putty thiab ua nws
Kauj Ruam 3: Ua Hauv Qab Lub Tsev
Yog tias koj muaj koj tus kheej tsim rau lub tsev ces koj yuav tsum tsis txhob ua raws qib 3 thiab 5. Tsuas yog xyuas kom tseeb tias koj muaj koj tus kheej lub tsev tsim uas koj muaj phab ntsa sab hauv thiab sab nrauv tso hluav taws xob nruab nrab ntawm ob phab ntsa. Thiab tias koj tau tso xov hlau rau LED, lub hnub ci vaj huam sib luag thiab UV ntsuas (yog tias koj yuav nce lub ntsuas cua no hauv lub ru tsev) tom qab koj yuav pom qhov twg koj xav tau txuas rau lawv.
Ua ntej koj nqa tag nrho cov txee uas peb siv rau phab ntsa sab hauv
Ua ntej koj coj cov ntoo uas nyob ntawm txoj kev npaj qhov rai thiab qhov rooj nkag mus rau hauv tsev.
Tom qab ntawd koj muab 2 lub pluaj ntawm 556 mm * 100 mm thiab cov phiaj ntawm 443 mm * 100 mm ua ke nrog cov kua nplaum ntoo kom koj tau txais lub duab plaub zoo nkauj
Tom qab ntawd siv cov phiaj xwm kawg ntawm 556 mm * 100 mm thiab muab lo rau hauv daim duab plaub. txoj kev no koj tau txais 2 qhov chaw nyob hauv tsev.
Tom qab ntawd koj coj 2 lub phiaj xwm ntawm 212.5 mm * 100 mm thiab muab lo rau hauv 1 ntawm 2 qhov chaw kom koj muaj 1 qhov chaw loj thiab 3 qhov chaw me me.
Tom qab ntawd koj nqa 2 daim phiaj me me thiab peb yuav tig nws mus rau hauv chav dej. peb dai 2 lub laug cam ua ke kom koj thiaj li tau txais L duab. tom qab ntawd lo L no hauv qhov chaw nruab nrab.
Thaum cov kua nplaum tau qhuav lawm, siv 1 daim phiaj ntawm 568 mm * 443 mm thiab lo ua ke kom koj muaj qab nthab rau cov chaw no. Ntawm lub qab nthab koj ua kua nplaum me me nyob rau ntawm cov ces kaum siab tshaj 12 hli.
Cia nws kom qhuav zoo thiab thaum ua tiav koj twb tau ua nws tag nrho hauv qab.
Kauj Ruam 4: Phaj Phaj
Lub hauv paus phaj yog npaj ua ib plag tsev rau peb lub tsev. Tab sis kuj tseem tso tseg txhua qhov hluav taws xob kom nws tsis pom dua
Koj nqa 1 lub phaj ntawm 600 mm * 600 mm thiab ntoo ntoo. Koj lo cov kab ntoo nyob ib puag ncig ntawm cov phaj ntoo kom peb tuaj yeem tso hluav taws xob rau peb nyob ntawd. Nco ntsoov tias koj muab lub qhov 10 cm kom koj tuaj yeem tso koj cov raspberry pi nyob nruab nrab.
Tom qab ntawd koj nqa hauv qab ntawm koj lub tsev thiab tso nws nrog sab nraub qaum ntawm koj lub hauv paus phaj. tam sim no koj tuaj yeem kos ob peb qhov nyob ntawm xub ntiag ntawm 7 hli lub tsev. Tab sis ceev faj tias cov qhov no tsis tuaj ntawm lub qhov rooj lossis ntawm lub qhov rais. Peb laum cov qhov no kom peb cov hluav taws xob tuaj yeem los ntawm cov phaj hauv qab mus rau hauv tsev.
Yog tias koj paub tias koj lub tsev nyob qhov twg hauv qab phaj ces koj tuaj yeem kos 10 qhov (2 kab ntawm 5) rau koj kom muab lub laub khawm thiab kos lub qhov rau lub vijtsam LCD.
Tom qab koj tau laum txhua lub qhov peb tuaj yeem pib sab nraum lub tsev
Kauj Ruam 5: Sab Nraud Tsev
Tam sim no peb nkag mus rau phab ntsa sab nrauv ntawm lub tsev hauv pem teb qis.
Koj coj koj coj 2 lub phiaj xwm ntawm 475 mm * 361.5 mm. koj ntsuas ib sab ntawm 361.5 cim 124 hli raws ob sab. tom qab ntawd koj ntsuas qhov nruab nrab ntawm 475 mm los ntawm lwm sab ntawm koj cov phiajcim. Tom qab ntawd koj txuas koj thawj cov ntsiab lus rau lub ntsiab lus thib ob kom koj muaj lub tsev zoo li tus duab ntawm koj lub phiaj thiab koj txiav tawm 2 lub ces kaum.
Tom qab ntawd koj muab 2 daim phiaj ntawm 588 mm x 124 mm nyob rau sab xub ntiag thiab tom qab ntawm koj lub tsev. Nco ntsoov tias lub qhov rooj thiab lub qhov rais raug txiav tawm hauv cov laug cam no. Yog tias koj xav tau lub qhov rai hauv koj lub tsev, koj tuaj yeem lo ib daim PVC ntawm 2 lub rooj thiab muab lo rau nws thiab sab nrauv.
Tom qab ntawd koj tso 2 lwm lub laug cam uas koj tau ua thiab lwm yam 2 hais ntawm lub tsev. kuj nco ntsoov tias koj ua pob zeb diamond hauv daim duab peb sab kom koj pom tau tias lub teeb kub hnyiab los yog tsis. Ntawm no ib yam koj tuaj yeem dai ib daim PVC nyob rau ntawm lub qhov rais.
Thaum cov kua nplaum tau qhuav, koj yuav luag ua tiav koj lub tsev.
Kauj Ruam 6: Tsim Cov Hluav Taws Xob Hluav Taws Xob
Ua ntej peb ua tiav lub tsev kom tiav, peb yuav xub tso peb cov hluav taws xob hauv peb lub tsev. Koj tuaj yeem tso koj cov LEDs hauv koj lub tsev (ib txwm tso 1 LED nyob nruab nrab ntawm txhua chav, hauv chav loj koj tso zoo dua 3 LEDs) Tam sim no koj muaj ib txwm tso tag nrho ntawm 9 LEDs.
Muab koj lub tsev tso rau ntawm lub hauv paus phaj.
txuas tag nrho cov khoom siv hauv qab phaj raws li qhia hauv qab no.
Thaum koj ua tiav qhov ntawd, koj tuaj yeem tso cov phiaj thib ob ntawm 568 mm * 443 mm rau ntawm lwm lub rooj tsavxwm nrog tib qhov ntev. Thaum koj ua tiav qhov ntawd, koj lub tsev yuav zoo li daim duab 1.
Tom qab ntawd lob cov phiaj ntoo uas yuav nyob tom qab ntawm lub tsev, dai 4 lub hnub ci ci rau ntawm cov ntoo thiab xyuas kom tseeb tias cov xov hluav taws xob los ntawm cov hnub ci ci nyob rau lwm sab (sab hauv) los ntawm cov phiaj. Tom qab ntawd laum lub qhov me me thiab dai lub UV sensor ua ntej nws mus, yog li lub ntsuas no tau ua ke zoo. thaum koj tau ua tiav qhov no, koj tuaj yeem txuas txhua yam thiab koj tuaj yeem npaj koj lub txee rau ntawm koj lub tsev. (tom qab ntawv koj lub tsev zoo li daim duab 2).
Kauj ruam 7: Code
Koj tuaj yeem rub tawm cov cai ntawm no thiab muab tso rau hauv koj li raspberry pi.
Kauj ruam 8: Lub vev xaib
Koj ua cov lus txib no hauv putty.
Ua qhov hais kom ua sudo apt -tau nruab apache2 -y
surf rau 169.244.10.1 hauv internet. ib txwm pom nplooj ntawv apache nrog koj yog tias tsis yog rooj plaub, sau thawj sudo apt-tau hloov tshiab thiab rov nruab apchach.
Tam sim no txav mus rau ntawm daim nplaub tshev ntawm tus lej koj rub tawm rau/var/www/html siv cov lus txib mv.
sudo kev pabcuam apache2 rov pib dua.
Tam sim no koj yuav tsum pom lub vev xaib sib tham yog tias koj nthwv mus rau pi's ip-adress.
Kauj ruam 9: Autorun
Tam sim no peb yuav tsum paub tseeb tias tsab ntawv sau cia yog tias koj khau raj koj li pi.
Kho cov ntaub ntawv rc.local, siv sudo nano /etc/rc.local
Ntxiv cov lus txib kom ua tiav koj cov cai, qhov no yuav yog nab hab sej3.5 /yourpath/project.py &
Nco ntsoov tawm qhov tawm 0 hauv qab.
tam sim no ua sudo reboot thiab xyuas yog tias nws ua haujlwm.
Kauj ruam 10: Ua tiav
Kuaj txhua yam ntxiv thiab yog tias txhua yam ua haujlwm koj tso lwm sab ntawm lub ru tsev ntawm lub tsev.
Yog tias qhov no tsis yog, qhov no yog vim koj tsis tau ua koj tus vaj tswv vaj tswv thiab koj tseem yuav tau txheeb xyuas nws.
Thaum kawg, koj tuaj yeem dai daim phiaj kawg rau hauv qab ntawm cov phaj hauv qab thiab tso ib daim velcro qhov twg koj tau muab lub qhov rau koj cov raspberry pi. Kuj tseem dai ib daim velcro nyob tom qab ntawm koj lub raspberry pi kom koj pi dai ntawm koj lub tsev.
Yog li tam sim no koj Lub Tsev Ntse tau ua tiav.
Pom zoo:
DIY Ntse Qhov Rooj Qhov Rooj Qhov Rooj + Tsev Pabcuam Hauv Tsev: 5 Kauj Ruam
DIY Ntse Lub Qhov Rooj Qhov Rooj + Lub Tsev Pabcuam Kev Sib Koom: Tig koj lub qhov rooj qhov rooj ib txwm ntse siv qhov haujlwm DIY no. Kuv yuav qhia koj yuav tsim nws li cas thiab tswj nws siv Tsev Pabcuam (dhau MQTT) thiab muaj peev xwm qhib thiab kaw koj lub qhov rooj ntawm qhov chaw deb.Kuv yuav siv ESP8266 pawg thawj coj hu ua Wemos
Ua Lub Tsev Tswj Xyuas Ntse Tsev ntawm STONE HMI Disp: 23 Cov Kauj Ruam
Ua Smart Home Control System ntawm STONE HMI Disp: Kev qhia ua haujlwm Cov lus qhia hauv qab no qhia koj yuav siv STONE STVC050WT-01 kov zaub module ua kom yooj yim tswj cov cuab yeej siv hauv tsev
Yuav Ua Li Cas Ntse Tsev Siv Arduino Control Relay Module - Lub Tswv Yim Hauv Tsev Automation: 15 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Ntse Tsev Siv Arduino Control Relay Module | Lub Tswv Yim Ua Lag Luam Hauv Tsev: Hauv qhov haujlwm ua haujlwm hauv tsev no, peb yuav tsim lub tsev ntse hloov chaw uas tuaj yeem tswj tau 5 yam khoom siv hauv tsev. Qhov kev hloov pauv no tuaj yeem tswj tau los ntawm Txawb lossis smartphone, IR chaw taws teeb lossis TV nyob deb, Kev hloov pauv ntawm tes. Qhov kev tshaj tawm ntse no tseem tuaj yeem paub txog r
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
Ntse Ruaj Ntseg Koj Lub Tsev Ntse: 14 Kauj Ruam
Ntse Ruaj Ntseg Koj Lub Tsev Ntse: Kuv tab tom sib tw rau kev sib tw nyab xeeb thiab nyab xeeb. Yog tias koj nyiam kuv cov lus qhia thov pov npav rau nws! Kuv yuav qhia koj li cas yooj yim thiab pheej yig kom ruaj ntseg koj lub tsev thiab ib puag ncig. Nws muaj ntu uas koj yuav kawm paub yuav ua li cas: 1. Configure koj