Cov txheej txheem:
- Kauj ruam 1: Kho vajtse
- Kauj Ruam 2: Txuas Txuas Raspbery Pi
- Kauj Ruam 3: Txheeb Cov Ntaub Ntawv Los Ntawm Cov Kov
- Kauj Ruam 4: Teeb Kev Pabcuam Hauv Tsev Automation
- Kauj Ruam 5: Cov txiaj ntsig
- Kauj Ruam 6: Xaus
Video: Raspberry Pi Kev Nyab Xeeb Sab Hauv Tsev thiab Tswj Xyuas Txheej Txheem: 6 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:24
Cov neeg xav tau kev xis nyob hauv lawv lub tsev. Raws li huab cua nyob hauv peb thaj tsam yuav tsis haum rau peb tus kheej, peb siv ntau yam khoom siv los tswj kom muaj chaw nyob zoo nyob hauv tsev: lub rhaub dej, lub tshuab cua txias, lub tshuab ua kom txias, lub tshuab ua kom dehumidifier, lub tshuab ua kom huv, thiab lwm yam. hom kom nkag siab ib puag ncig thiab tswj lawv tus kheej. Txawm li cas los:
- Ntau ntawm lawv tau them ntau dhau/ tsis tsim nyog nyiaj.
- Lawv cov hluav taws xob hluav taws xob tau yooj yim dua kom tawg thiab hloov pauv tau yooj yim dua li cov khoom siv tshuab
- Cov cuab yeej siv yuav tsum tau tswj hwm los ntawm cov chaw tsim khoom app. Nws ib txwm muaj ob peb lub cuab yeej ntse hauv koj lub tsev thiab txhua tus ntawm lawv muaj nws tus kheej app. Lawv cov kev daws teeb meem yog sib koom ua ke app rau hauv platform xws li Alexa, Google Assistant, thiab IFTTT kom peb muaj "kev tswj hwm" hauv nruab nrab"
- Tseem ceeb tshaj, cov tuam txhab tsim khoom muaj peb cov ntaub ntawv, thiab Google/Amazon/IFTTT/thiab lwm yam muaj peb cov ntaub ntawv. Peb tsis ua. Tej zaum koj yuav tsis quav ntsej txog kev ceev ntiag tug, tab sis qee zaum peb txhua tus yuav xav saib cov av noo ntawm koj chav pw, piv txwv li, txiav txim siab lub sijhawm qhib lub qhov rais.
Hauv qhov kev qhia no, kuv tsim ib qho qauv ntawm tus nqi qis tus nqi Raspberry Pi-based Sab Hauv Tsev Huab Cua. RPi sib txuas lus nrog cov khoom siv ntawm SPI/I2C/USB cuam tshuam:
- Lub ntsuas cua huab cua tau siv los sau qhov kub thiab txias, thiab huab cua siab.
- Ib qho kev ntsuas siab huab cua Zoo ntsuas cov huab cua ib puag ncig teeb meem (PM2.5 thiab PM10) cov ntaub ntawv siv los laij huab cua Kev Ntsuas Zoo (AQI)
Tus tswj xyuas cov txheej txheem tau txais cov ntaub ntawv thiab ua rau cov cuab yeej ua los ntawm kev xa cov lus thov mus rau IFTTT Webhook kev pabcuam siv tshuab uas tswj kev txhawb nqa WiFi Ntse ntsaws.
Cov qauv no tau tsim nyob rau hauv ib txoj hauv kev kom ib tus tuaj yeem yooj yim ntxiv lwm yam khoom siv, khoom siv, thiab kev pabcuam siv tshuab.
Kauj ruam 1: Kho vajtse
Cov cuab yeej pom zoo los tsim qhov no:
- Raspberry Pi (txhua version) nrog WiFi. Kuv tsim qhov no siv RPi B+. RPi ZeroW yuav ua tau zoo thiab raug nqi ~ 15 $
- Lub ntsuas BME280 rau qhov kub thiab txias, huab cua siab ~ 5 $
- Nova SDS011 High Precision Laser PM2.5/PM10 huab cua Kev Pom Zoo Sensor Module ~ 25 $
- LED/LCD zaub. Kuv siv SSD1305 2.23 nti OLED screen ~ 15 $
- Qee qhov WiFi/ZigBee/Z-Wave Smart Sockets. 10-20 $ txhua
- Lub tshuab lim dej, lub tshuab ua kom humidifier, dehumidifier, rhaub, txias, thiab lwm yam nrog cov khoom siv hloov khoom siv. Piv txwv li, Kuv tau siv lub tshuab lim cua kom pheej yig los ua qhov kev qhia no
Tus nqi tag nrho saum toj no yog <100 $, tsawg dua li, hais, lub tshuab lim huv uas tuaj yeem yooj yim raug nqi $ 200.
Kauj Ruam 2: Txuas Txuas Raspbery Pi
Daim duab hluav taws xob qhia pom yuav ua li cas xaim RPi nrog BME280 sensor siv I2C interface thiab OLED zaub HAT siv SPI interface.
Waveshare OLED HAT tuaj yeem txuas rau saum GPIO, tab sis koj xav tau GPIO splitter los qhia nws nrog lwm yam khoom siv ib puag ncig. Nws tuaj yeem teeb tsa los siv I2C los ntawm kev siv cov tshuaj tiv thaiv sab nraub qaum.
Cov ntaub ntawv ntxiv txog SSD1305 OLED HAT tuaj yeem pom ntawm no.
Ob qho I2C thiab SPI cuam tshuam yuav tsum tau qhib hauv RPi nrog:
sudo raspi-teeb tsa
Nova SDS011 Dust sensor txuas nrog RPi ntawm USB chaw nres nkoj (nrog Serial-USB adapter).
Kauj Ruam 3: Txheeb Cov Ntaub Ntawv Los Ntawm Cov Kov
Cov ntaub ntawv huab cua, uas zoo li ncaj qha, tau sau los ntawm BME280 sensor los ntawm tsab ntawv nab nab.
21-Nov-20 19:19:25-INFO-compensated_reading (id = 6e2e8de5-6bc2-4929-82ab-0c0e3ef6f2d2, timestamp = 2020-11-21 19: 19: 25.604317, temp = 20.956 ° C, siab = 1019.08 hPa, av noo = 49.23 % rH)
Dust sensor cov ntaub ntawv xav tau kev ua haujlwm me ntsis ntxiv. Lub ntsuas qhov ntsuas tau nqus qee qhov piv txwv huab cua txhawm rau txheeb xyuas qhov teeb meem me me, yog li nws yuav tsum khiav ib ntus (30s) kom muaj txiaj ntsig zoo. Los ntawm kuv qhov kev soj ntsuam, kuv tsuas yog xav txog qhov nruab nrab ntawm 3 qhov piv txwv kawg. Cov txheej txheem muaj nyob hauv tsab ntawv no.
21 -Nov -20 19:21:07 - DEBUG - 0. PM2.5: 2.8, PM10: 5.9
21-Nov-20 19:21:09- DEBUG- 1. PM2.5: 2.9, PM10: 6.0 21-Nov-20 19:21:11- DEBUG- 2. PM2.5: 2.9, PM10: 6.0 21- Nov-20 19:21:13- DEBUG- 3. PM2.5: 2.9, PM10: 6.3 21-Nov-20 19:21:15- DEBUG- 4. PM2.5: 3.0, PM10: 6.2 21-Nov- 20 19:21:17 - DEBUG - 5. PM2.5: 2.9, PM10: 6.4 21 -Nov -20 19:21:19 - DEBUG - 6. PM2.5: 3.0, PM10: 6.6 21 -Nov -20 19: 21: 21 - DEBUG - 7. PM2.5: 3.0, PM10: 6.8 21 -Nov -20 19:21:23 - DEBUG - 8. PM2.5: 3.1, PM10: 7.0 21 -Nov -20 19:21: 25 - DEBUG - 9. PM2.5: 3.2, PM10: 7.0 21 -Nov -20 19:21:28 - DEBUG - 10. PM2.5: 3.2, PM10: 7.1 21 -Nov -20 19:21:30 - DEBUG - 11. PM2.5: 3.2, PM10: 6.9 21 -Nov -20 19:21:32 - DEBUG - 12. PM2.5: 3.3, PM10: 7.0 21 -Nov -20 19:21:34 - DEBUG - 13. PM2.5: 3.3, PM10: 7.1 21 -Nov -20 19:21:36 - DEBUG - 14. PM2.5: 3.3, PM10: 7.1
Lub plua plav sensor tsuas yog muab PM2.5 thiab PM10 ntsuas.
aqi_index = aqi.to_aqi ([(aqi. POLLUTANT_PM25, hmoov av_data [0]), (aqi. POLLUTANT_PM10, hmoov av_data [1])])
Kev khaws cov ntaub ntawv, tso tawm, thiab khoom siv tswj tau ua tiav ib txhij thiab tsis sib xws. Cov ntaub ntawv raug khaws tseg hauv ib lub hauv paus database. Peb tsis tas yuav khiav lawv ntau zaus yog tias ib puag ncig tsis hloov pauv sai. Rau kuv, 15 feeb sijhawm luv yog txaus. Tsis tas li ntawd, lub plua plav sensor ntsuas cov hmoov av sab hauv, yog li peb yuav tsum tsis txhob siv nws ntau dhau kom tsis txhob ua haujlwm tu.
Kauj Ruam 4: Teeb Kev Pabcuam Hauv Tsev Automation
Muaj ntau lub tsev siv lub tshuab ua haujlwm hauv tsev tawm thiab yuav tsum teeb tsa lub platform uas tau txais kev txhawb nqa los ntawm lub qhov ntse uas koj muaj. Yog tias koj txhawj xeeb txog kev ceev ntiag tug, koj yuav tsum teeb tsa koj tus kheej. Txwv tsis pub, koj tuaj yeem siv lub platform nrov uas tau txhawb los ntawm feem ntau WiFi ntse nyob: Google Assistant, Alexa, lossis IFTTT. Sim xaiv lub qhov (socket) platform nrog API los cuam tshuam rau (Webhook zoo rau lub hom phiaj no)
Kuv siv IFTTT hauv qhov kev qhia no vim nws yooj yim siv txawm tias rau cov neeg tshiab. Tab sis yuav tsum paub tias: 1. muaj ntau lub qhov ntse uas tsis txhawb nqa IFTTT, thiab 2. Thaum lub sijhawm kuv sau qhov no, IFTTT tsuas tso cai rau koj los tsim 3 applets (automation tasks) dawb, uas tsuas yog txaus rau 1 khoom siv
Cov no yog cov kauj ruam:
1. Tsim ob lub applets hauv IFTTT, txhawm rau qhib thiab kaw lub cuab yeej, siv Webhook kev pabcuam. Cov ntsiab lus tuaj yeem pom ntawm no.
2. Luam tus yuam sij API thiab luam nws mus rau tus ntawv nab hab sej. Kuv xav qhia kom khaws nws hauv cov ntawv cais rau kev nyab xeeb.
3. Txhais qhov kev tswj xyuas cov laj thawj/tsis nyob hauv tsab ntawv tseem ceeb.
Kauj Ruam 5: Cov txiaj ntsig
OK, tam sim no peb sim qhov system.
Cov zaub OLED qhia txog Lub Caij Nyoog Tam Sim No, Vaum, thiab suav cov Cua Huab Cua Zoo (AQI). Nws kuj tseem qhia qhov tsawg kawg thiab tus nqi siab tshaj hauv 12 teev dhau los.
Cov ntaub ntawv teev sijhawm ntawm AQI hauv ob peb hnub qhia qee yam txaus nyiam. Pom qhov nce hauv AQI tus qauv? Nws tau tshwm sim ob zaug hauv ib hnub, qhov siab tshaj plaws nyob ib puag ncig 12:00 thiab qhov siab tshaj yog nyob ib puag ncig 19:00. Zoo, koj kwv yees nws, uas yog thaum peb ua noj, kis ntau qhov teeb meem ib puag ncig. Nws yog qhov txaus siab pom tias peb cov haujlwm niaj hnub cuam tshuam rau ib puag ncig sab hauv tsev li cas.
Tsis tas li, qhov kev nce qib kawg hauv daim duab tau siv sijhawm luv dua li yav dhau los. yog thaum peb ntxiv lub tshuab ua kom huv hauv lub kaw lus. RPi kev tswj hwm huab cua xa PURIFIER_ON thov thaum AQI> 50 thiab PURIFIER_OFF thaum AQI <20. Koj tuaj yeem pom IFTTT Webhook ua rau lub sijhawm ntawd.
Kauj Ruam 6: Xaus
Qhov ntawd yog nws!
Cov ntaub ntawv khaws tseg kuj tseem tuaj yeem siv los tswj lub tshuab cua sov, lub tshuab txias, (de) lub tshuab ua kom humidifiers, thiab lwm yam. Koj tsuas yog xav yuav ntau lub qhov ntse thiab txhua lub cuab yeej qub yuav dhau los ua "ntse".
Yog tias koj xav tswj hwm ntau yam khoom siv, koj yuav xav tau ua tib zoo saib xyuas qhov kev pabcuam kev siv tshuab hauv tsev uas koj xav siv. Kuv xav hais qhia teeb tsa qhib qhov chaw siv tshuab hauv tsev, tab sis yog tias nws nyuaj dhau, muaj cov kev daws teeb meem yooj yim xws li Google Assistant thiab IFTTT Webhook, lossis siv Zigbee ntse qhov (socket).
Kev ua tiav ntawm qhov qauv no tuaj yeem pom hauv Github chaw cia khoom:
github.com/vuva/IndoorClimateControl
Muaj kev lom zem !!!
Pom zoo:
Pheej Yig, Ob Sab Ob Sab, Daim phiaj-nws Cov Txheej Txheem Txheej Txheem: 4 Cov Kauj Ruam
Pheej Yig, Ob Sab Ob Sab, Daim phiaj-nws Cov Txheej Txheem Txheej Txheem: qhov no yog qhov yooj yim thiab pheej yig version ntawm ntau dua polished, muaj zog thiab feem ntau zoo dua daim phiaj-nws cov koom haum uas koj tuaj yeem yuav. Kuv tau them nyiaj ua qhov tsim zoo sib xws rau qhov qub thiab txiav txim siab tias nws tsis tsim nyog nws, txawm li cas los xij cov ntawv no raug nqi tsis muaj dab tsi (
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: 6 Kauj Ruam
Arduino Neeg Hlau Nrog Kev Nyob, Kev Qhia thiab Qib Kev Sib Hloov (Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) Tswj los ntawm Lub Suab Siv Bluetooth Module thiab Kev Siv Tus Neeg Siv Hluav Taws Xob: Cov lus qhia no piav qhia yuav ua li cas thiaj tsim tau Arduino Robot uas tuaj yeem txav mus raws qhov xav tau (Forward, Backward) , Sab laug, Txoj Cai, Sab Hnub Poob, Sab Hnub Poob, Sab Qaum Teb, Sab Qab Teb) xav tau Kev nrug deb hauv Centimeters siv lub suab hais kom ua. Neeg hlau kuj tseem tuaj yeem txav tau tus kheej
Rov Qab Pab Chaw Nres Tsheb Hauv Lub Nkoj Siv Kev Nyab Xeeb Muaj Kev Nyab Xeeb Zoo thiab Cov Cim Hluav Taws Xob: 5 Cov Kauj Ruam
Tsheb Rov Qab Pab Hauv Qhov Chaw Nkag Siv Kev Nyab Xeeb Uas Muaj Kev Nyab Xeeb Zoo thiab Cov Hluav Taws Xob Hluav Taws Xob: Kuv xav tias ntau qhov kev tsim tawm hauv keeb kwm ntawm noob neej tau ua vim kev yws yws poj niam. Tshuab ntxhua khaub ncaws thiab tub yees yeej zoo li zoo li cov neeg sib tw siv tau. Kuv me me " invention " piav qhia hauv Cov Lus Qhia no yog hluav taws xob
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): 9 Cov Kauj Ruam (nrog Duab)
D4E1: Kev nyeem ntawv-cuab yeej 2.0 (Txheej Txheem Txheej Txheem Txheej Txheem): Cov ntaub ntawv:-Ob tus tub ntxhais kawm Muaj cov khoom lag luam tsim qauv hauv Kortrijk (Belgium) tuaj nrog cov cuab yeej nyeem ntawv no. Peb pib raws qhov tsim qauv uas twb muaj lawm thiab tau txhim kho nws mus rau lwm qhov kev tsim. Kev nyeem ntawv-cuab yeej thaum xub thawj tau raug txhim kho rau cli & nte
Nthuav nthuav Cov Txheej Txheem Qhia rau Tus Tsim Qauv-Txheej Txheem Txheej Txheem Tswj- Loop Nqe Lus: 8 Kauj Ruam
Nthuav nthuav Cov Txheej Txheem Qhia rau Tus Tsim-Txheej Txheem Txheej Txheem- Loop Nqe Lus: Cov Txheej Txheem Txheej Txheem- Loop Nqe Lus Los ntawm tshooj no, koj yuav ntsib nrog qhov tseem ceeb thiab muaj zog paub txog-Loop Nqe Lus. Ua ntej nyeem tshooj no, yog tias koj xav kos 10,000 lub voj voos hauv txoj haujlwm, koj tsuas tuaj yeem ua nrog lub suab