I-Smart Home iyindlu njengenkundla, ukusetshenziswa kobuchwepheshe bokufaka izintambo obudidiyelwe, ubuchwepheshe bezokuxhumana kwenethiwekhi, ubuchwepheshe bezokuphepha, ubuchwepheshe bokulawula okuzenzakalelayo, ubuchwepheshe bomsindo nevidiyo ukuhlanganisa izinsiza ezihlobene nempilo yasekhaya, ukuhlela ukwakha izindawo zokuhlala ezisebenzayo kanye nohlelo lokuphatha izindaba zomndeni. , thuthukisa ukuvikeleka kwekhaya, ukunethezeka, ukunethezeka, ubuciko, kanye nokubona ukuvikelwa kwemvelo kanye nendawo yokuhlala yokonga amandla. Ngokusekelwe encazelweni yakamuva ye-smart home, bheka izici zobuchwepheshe be-ZigBee, ukuklanywa kwalolu hlelo, okudingekayo kuqukethe uhlelo lwasekhaya oluhlakaniphile (i-smart home (central) control system, uhlelo lokulawula izibani zasendlini, izinhlelo zokuphepha ekhaya), ngesisekelo sokujoyina uhlelo lwezintambo zasendlini, uhlelo lwenethiwekhi yasekhaya, uhlelo lomculo wangemuva kanye nohlelo lokulawula imvelo yomndeni. Esiqinisekweni esihlala kwezobuhlakani, kufakwe zonke izinhlelo ezidingekayo ngokuphelele kuphela, futhi uhlelo lwasendlini olufake isistimu yokuzikhethela yohlobo olulodwa nangaphezulu okungenani lungabiza u-intelligence uhlala ngaphakathi. Ngakho-ke, lolu hlelo lungabizwa ngokuthi ikhaya elihlakaniphile.
1. Uhlelo Lokuklama Uhlelo
Uhlelo lwakhiwe ngamadivayisi alawulwayo kanye namadivayisi okulawula kude ekhaya. Phakathi kwazo, amadivaysi alawulwayo emndenini ikakhulukazi ahlanganisa ikhompiyutha engakwazi ukufinyelela i-intanethi, isikhungo sokulawula, i-node yokuqapha kanye nesilawuli semishini yasendlini engangezwa. Amadivaysi okulawula kude akhiwe ikakhulukazi amakhompyutha akude nomakhalekhukhwini.
Imisebenzi esemqoka yohlelo yilena: 1) ikhasi lokuqala lokuphequlula ikhasi lewebhu, ukuphathwa kolwazi lwangemuva; 2) Qaphela ukulawulwa kokushintsha kwezinto zasendlini zasendlini, ukuphepha nokukhanyisa nge-inthanethi nomakhalekhukhwini; 3) Ngokusebenzisa imojula ye-RFID ukubona ukuhlonza komsebenzisi, ukuze uqedele ukushintshwa kwesimo sokuphepha kwasendlini, uma kwenzeka ukweba nge-alamu ye-SMS kumsebenzisi; I-4) Ngokusebenzisa isofthiwe yohlelo lokulawula lokulawula ukuqedela ukulawula kwendawo kanye nokuboniswa kwesimo sokukhanyisa kwangaphakathi kanye nempahla yasendlini; 5) Ukugcinwa kolwazi lomuntu siqu kanye nokugcinwa kwesimo sempahla yasendlini kuqedwa ngokusebenzisa isizindalwazi. Kulula kubasebenzisi ukuthi babuze isimo semishini yasendlini ngokusebenzisa isistimu yokulawula nokuphatha.
2. I-System Hardware Design
Idizayini yehadiwe yesistimu ihlanganisa ukuklanywa kwesikhungo sokulawula, indawo yokuqapha kanye nokwengezwa kokuzikhethela kwesilawuli sezinto zikagesi zasekhaya (thatha isilawuli sefeni kagesi njengesibonelo).
2.1 Isikhungo Sokulawula
Imisebenzi eyinhloko yesikhungo sokulawula imi kanje: 1) Ukwakha inethiwekhi ye-ZigBee engenantambo, engeza wonke ama-node okuqapha kunethiwekhi, futhi uqaphele ukwamukelwa kwemishini emisha; 2) ukuhlonza umsebenzisi, umsebenzisi ekhaya noma emuva ngekhadi lomsebenzisi ukuze afinyelele inkinobho yokuphepha yasendlini; 3) Lapho isigebengu singena endlini, thumela umlayezo omfushane kumsebenzisi ukuze axwayise. Abasebenzisi bangakwazi futhi ukulawula ukuphepha kwasendlini, ukukhanyisa nezinto zikagesi zasendlini ngemiyalezo emifushane; 4) Uma uhlelo lusebenza lodwa, i-LCD ibonisa isimo samanje sesistimu, esilungele abasebenzisi ukusibuka; 5) Gcina isimo semishini kagesi bese uyithumela ku-PC ukuze ubone uhlelo ku-inthanethi.
Izingxenyekazi zekhompuyutha zisekela i-Carrier sense multiple/ukutholwa kokushayisana (CSMA/CA). I-voltage yokusebenza engu-2.0 ~ 3.6V ihambisana nokusetshenziswa kwamandla okuphansi kohlelo. Setha inethiwekhi yenkanyezi ye-ZigBee engenantambo endlini ngokuxhuma kumojula yomdidiyeli we-ZigBee esikhungweni sokulawula. Futhi wonke ama-node okuqapha, akhethelwe ukwengeza isilawuli sezinto zikagesi zasekhaya njenge-terminal node kunethiwekhi ukuze ajoyine inethiwekhi, ukuze kuqashelwe ukulawula kwenethiwekhi ye-ZigBee engenantambo yokuphepha kwasendlini nezinto zikagesi zasendlini.
2.2 Ama-Monitoring Nodes
Imisebenzi ye-node yokuqapha imi kanje: 1) ukutholwa kwesignali yomzimba womuntu, i-alamu yomsindo nokukhanya lapho amasela ehlasela; I-2) isilawuli sokukhanyisa, imodi yokulawula ihlukaniswe ngokuzenzakalelayo nokulawula ngesandla, ukulawula okuzenzakalelayo kukhanyisa / ukucisha ukukhanya ngokuzenzakalelayo ngokwamandla okukhanya kwangaphakathi, ukulawulwa kokukhanyisa okwenziwa ngesandla ngokusebenzisa uhlelo lokulawula oluphakathi, (3) ulwazi lwe-alamu nolunye ulwazi oluthunyelwe esikhungweni sokulawula, futhi luthola imiyalo yokulawula evela esikhungweni sokulawula ukuze kuqedelwe ukulawulwa kwemishini.
Imodi yokuthola i-infrared plus microwave iyindlela ejwayeleke kakhulu yokuthola amasignali omzimba womuntu. I-pyroelectric infrared probe yi-RE200B, futhi idivayisi yokukhulisa i-BISS0001. I-RE200B inikwa amandla amandla kagesi angu-3-10 V futhi inesici esakhelwe ngaphakathi se-pyroelectric dual-sensitive infrared. Lapho i-elementi ithola ukukhanya kwe-infrared, umphumela we-photoelectric uzokwenzeka ezigxotsheni ze-elementi ngayinye futhi ukushaja kuzonqwabelana. I-BISS0001 iyi-digital-analog hybrid asIC eyakhiwe i-amplifier yokusebenza, isiqhathanisi samandla kagesi, isilawuli sombuso, isibali-sikhathi sokulibaziseka kanye nesibali-sikhathi sokuvinjwa. Kanye ne-RE200B kanye nezingxenye ezimbalwa, iswishi ye-infrared ye-pyroelectric infrared ingakhiwa. Imojula ye-Ant-g100 yasetshenziselwa inzwa ye-microwave, imvamisa yesikhungo yayingu-10 GHz, kanti isikhathi esiphezulu sokusungulwa sasingu-6μs. Ihlanganiswe ne-pyroelectric infrared module, izinga lephutha lokutholwa okuhlosiwe lingancishiswa ngempumelelo.
Imojula yokulawula ukukhanya ikakhulukazi yakhiwe i-photosensitive resistor kanye ne-light control relay. Xhuma isiphikisa se-photosensitive ochungechungeni nesiphikisayo esilungisekayo esingu-10 K ω, bese uxhuma enye indawo yesimelaphi se-photosensitive phansi, bese uxhuma enye iphetho yesiphikisa esilungisekayo ukuya ezingeni eliphezulu. Inani le-voltage lamaphoyinti amabili okuxhumana okumelana litholwa ngesiguquli se-analog-to-digital ye-SCM ukuze kunqunywe ukuthi ukukhanya kwamanje kuvuliwe yini. Ukumelana okulungisekayo kungalungiswa ngumsebenzisi ukuze kuhlangatshezwane nokuqina kokukhanya lapho ukukhanya kusanda kuvulwa. Amaswishi okukhanyisa angaphakathi alawulwa ngokudlulisela. Imbobo yokufaka eyodwa kuphela engazuzwa.
2.3 Khetha Isilawuli Sezinto Zokusebenza Zasekhaya Esingeziwe
Khetha ukwengeza ukulawulwa kwezinto zasendlini ikakhulukazi ngokuya ngomsebenzi wedivayisi ukuze ufinyelele ukulawulwa kwedivayisi, lapha kufeni likagesi njengesibonelo. Ukulawulwa kwabalandeli kuyisikhungo sokulawula kuzoba imiyalelo yokulawula abalandeli be-PC ethunyelwa kusilawuli sabalandeli bakagesi ngokusetshenziswa kwenethiwekhi ye-ZigBee, inombolo yokuhlonza izinto zikagesi ehlukile ihlukile, isibonelo, izinhlinzeko zalesi sivumelwano inombolo kamazisi wabalandeli ngu-122, inombolo kamazisi ye-TV enombala wasekhaya. iyi-123, ngaleyo ndlela ibona ukuqashelwa kwesikhungo esihlukene sokulawula izinto zikagesi zasendlini. Ukuze uthole ikhodi yomyalelo efanayo, izinto zikagesi ezihlukene zenza imisebenzi ehlukene. Umfanekiso wesi-4 ubonisa ukwakheka kwempahla yasendlini ekhethelwe ukwengezwa.
3. Ukwakhiwa kwesofthiwe yesistimu
Idizayini yesofthiwe yesistimu ikakhulukazi ihlanganisa izingxenye eziyisithupha, okuyidizayini yekhasi lewebhu elawula kude, idizayini yesistimu yokulawula yokulawula, isikhungo sokulawula isilawuli esiyinhloko se-ATMegal28 umklamo wohlelo, umklamo wohlelo lomxhumanisi we-CC2430, umklamo wohlelo lokuqapha lwe-CC2430, i-CC2430 khetha ukwakheka kohlelo lwedivayisi.
3.1 Idizayini yohlelo lweZigBee Coordinator
Umxhumanisi uqale aqedele ukuqaliswa kwesendlalelo sohlelo lokusebenza, asethe isimo sesendlalelo sohlelo lokusebenza futhi amukele isimo sokungenzi lutho, bese evula ukuphazamiseka komhlaba futhi aqalise imbobo ye-I/O. Umxhumanisi ube eseqala ukwakha inethiwekhi yenkanyezi engenantambo. Kuphrothokholi, umxhumanisi ukhetha ngokuzenzakalelayo ibhendi engu-2.4 GHz, inani eliphezulu lamabhithi ngomzuzwana ngu-62 500, i-PANID ezenzakalelayo ingu-0×1347, ukujula kwesitaki okukhulu ngu-5, inani eliphezulu lamabhayithi ngokuthumela ngakunye ngu-93, futhi isilinganiso se-serial port baud singama-57 600 bit/s. I-SL0W TIMER ikhiqiza iziphazamiso ezingu-10 ngomzuzwana. Ngemuva kokuthi inethiwekhi ye-ZigBee isisungulwe ngempumelelo, umxhumanisi uthumela ikheli lakhe ku-MCU yesikhungo sokulawula. Lapha, isikhungo sokulawula i-MCU sikhomba uMxhumanisi we-ZigBee njengelungu le-node yokuqapha, futhi ikheli layo elihlonziwe ngu-0. Uhlelo lungena ku-loop eyinhloko. Okokuqala, thola ukuthi kukhona idatha entsha ethunyelwe i-node yokugcina, uma ikhona, idatha idluliselwa ngokuqondile ku-MCU yesikhungo sokulawula; Nquma ukuthi ingabe i-MCU yesikhungo sokulawula ineziyalezo ezithunyelwe phansi, uma kunjalo, thumela imiyalelo phansi endaweni yetheminali ye-ZigBee ehambisanayo; Yahlulela ukuthi ukuphepha kuvuliwe, noma ngabe kukhona umgqekezi, uma kunjalo, thumela imininingwane ye-alamu ku-MCU yesikhungo sokulawula; Yahlulela ukuthi ukukhanya kusesimweni sokulawula okuzenzakalelayo, uma kunjalo, vula isiguquli se-analog-to-digital ukuze uthole amasampula, inani lesampula liwukhiye wokuvula noma ukuvala ukukhanya, uma isimo sokukhanya sishintsha, ulwazi olusha lwezwe idluliselwe esikhungweni sokulawula i-MC-U.
3.2 I-ZigBee Terminal Node Programming
Itheminali ye-ZigBee isho inodi ye-ZigBee engenantambo elawulwa umxhumanisi we-ZigBee. Kuhlelo, ngokuyinhloko iyinodi yokuqapha kanye nokwengezwa kokuzithandela kwesilawuli sezinto zikagesi zasendlini. Ukuqaliswa kwama-terminal node e-ZigBee kuhlanganisa nokuqalisa isendlalelo sohlelo lokusebenza, iziphazamiso zokuvula, kanye nokuqalisa izimbobo ze-I/O. Bese uzama ukujoyina inethiwekhi ye-ZigBee. Kubalulekile ukuqaphela ukuthi amanodi wokugcina kuphela anokusetha komxhumanisi we-ZigBee avunyelwe ukujoyina inethiwekhi. Uma i-terminal node ye-ZigBee ihluleka ukujoyina inethiwekhi, izozama futhi njalo ngemva kwemizuzwana emibili ize ijoyine inethiwekhi ngempumelelo. Ngemva kokujoyina inethiwekhi ngempumelelo, i-terminal node ye-ZI-Gbee ithumela ulwazi lwayo lokubhalisa ku-ZigBee Coordinator, bese idlulisela ku-MCU yesikhungo sokulawula ukuze iqedele ukubhaliswa kwe-terminal node ye-ZigBee. Uma i-terminal node ye-ZigBee iyinodi yokuqapha, ingabona ukulawula ukukhanya nokuphepha. Uhlelo lufana nomxhumanisi we-ZigBee, ngaphandle kokuthi indawo yokuqapha idinga ukuthumela idatha kumxhumanisi we-ZigBee, bese uMxhumanisi we-ZigBee ethumela idatha ku-MCU yesikhungo sokulawula. Uma i-terminal node ye-ZigBee iyisilawuli se-fan kagesi, idinga kuphela ukuthola idatha yekhompuyutha ephezulu ngaphandle kokulayisha isimo, ukuze ukulawula kwayo kungaqedwa ngokuqondile ngokuphazanyiswa kokwamukela idatha engenantambo. Kudatha engenantambo ethola ukuphazamiseka, wonke ama-terminal node ahumusha imiyalelo yokulawula eyamukelwe kumingcele yokulawula ye-node ngokwayo, futhi ungacubunguli imiyalelo etholiwe engenantambo ohlelweni oluyinhloko lwe-node.
4 Ukulungisa iphutha ku-inthanethi
Iziyalezo ezikhulayo zekhodi yokufundisa yemishini engaguquki ekhishwe uhlelo lokuphatha lokulawula ithunyelwa ku-MCU yesikhungo sokulawula ngokusebenzisa i-serial port yekhompyutha, kanye nomxhumanisi ngokusebenzisa isixhumi esibonakalayo esinemigqa emibili, bese ku-theminali ye-ZigBee. i-node ngumxhumanisi. Lapho indawo yokugcina ithola idatha, idatha ithunyelwa ku-PC ngembobo ye-serial futhi. Kule PC, idatha etholwe indawo yokugcina ye-ZigBee iqhathaniswa nedatha ethunyelwe isikhungo sokulawula. Uhlelo lokuphatha olumaphakathi luthumela imiyalelo emi-2 njalo ngomzuzwana. Ngemva kwamahora angu-5 okuhlola, isofthiwe yokuhlola iyama lapho ibonisa ukuthi isamba senani lamaphakethe atholiwe singamaphakethe angu-36,000. Imiphumela yokuhlolwa kwesofthiwe yokuhlola ukudluliswa kwedatha enamaphrothokholi amaningi ikhonjisiwe kuMfanekiso 6. Inani lamaphakethe alungile ngu-36 000, inani lamaphakethe angalungile ngu-0, futhi izinga lokunemba liyi-100%.
Ubuchwepheshe be-ZigBee busetshenziselwa ukuqaphela inethiwekhi yangaphakathi ye-smart home, enezinzuzo zesilawuli kude esilula, ukungezwa okuguquguqukayo kwemishini emisha nokusebenza okuthembekile kokulawula. Ubuchwepheshe be-RFTD busetshenziselwa ukubona ukuhlonza komsebenzisi nokuthuthukisa ukuphepha kwesistimu. Ngokufinyelela kwemojula ye-GSM, isilawuli kude nemisebenzi ye-alamu iyabonakala.
Isikhathi sokuthumela: Jan-06-2022