Cov txheej txheem:

Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Cov Roj Teeb Txuag: 10 Kauj Ruam (nrog Duab)
Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Cov Roj Teeb Txuag: 10 Kauj Ruam (nrog Duab)

Video: Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Cov Roj Teeb Txuag: 10 Kauj Ruam (nrog Duab)

Video: Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Cov Roj Teeb Txuag: 10 Kauj Ruam (nrog Duab)
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Image
Image
Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Roj Teeb Txuag
Hnub ntawm Lub Limtiam, Daim Ntawv Teev Npe, Sijhawm, Vaum/Kub Nrog Roj Teeb Txuag

Lub zog txuag hom ntawm no yog dab tsi teev Cov Lus Qhia no sib nrug los ntawm lwm qhov piv txwv qhia hnub ntawm lub lim tiam, hli, hnub ntawm lub hli, sijhawm, av noo, thiab kub. Nws yog qhov peev xwm no uas tso cai rau txoj haujlwm no khiav los ntawm roj teeb, yam tsis muaj qhov yuav tsum tau ua rau "wart wall".

Kuv tau tshaj tawm Cov Lus Qhia Ua Ntej Ua Ntej, Vaum thiab Kub LCD Zaub nrog Lub Hwj Chim Hom: Tsawg me ntsis, lom zem, nrawm, thiab pheej yig heev, thiab thaum kawg ntawm qhov Qhia Kuv tau nthuav tawm daim duab ntawm kev xaiv hloov kho. Qhov kev hloov pauv ntawd suav nrog hnub ntawm lub lim tiam, daim ntawv qhia hnub, thiab lub sijhawm kuj tau qhia ntawm tib qho khoom. Kuv tau txais tus lej ntawm cov lus thov cov ntaub ntawv ntawm qhov kev nthuav dav ntawd. Yog li, Kuv tshaj tawm Cov Lus Qhia no raws li kev hloov kho thiab txuas ntxiv mus rau qhov ua ntej ntawd.

Txhawm rau txuag cov neeg nyeem qhov teeb meem uas yuav tsum tau nrhiav cov lus qhia ua ntej, Kuv tau theej tawm qee cov ntaub ntawv nthuav tawm hauv Cov Lus Qhia ntawm no, thiab tau kawg kuv suav nrog cov ntaub ntawv augmented kom tso cai Hnub Hnub, Lub Caij, thiab Sijhawm rau yuav nthuav tawm ntxiv rau Txheeb ze Cov Vaum thiab Kub. Txawm li cas los xij, qee tus neeg nyeem yuav tsis xav tau hnub ntawm lub lim tiam, daim ntawv qhia hnub, thiab sijhawm, thiab tsuas yog xav tau cov av noo thiab qhov kub tau tshwm sim. Rau cov nyeem ntawd, Cov ntawv qhia ua ntej yuav ua haujlwm tau zoo.

Raws li kuv tau hais hauv Cov Lus Qhia Ua Ntej, kuv txoj kev kawm tsis yog qhov kub zoo tshaj, yog li kuv txiav txim siab nws yuav muaj txiaj ntsig zoo los ntsuas qhov ntsuas kub ib puag ncig ntawm kuv lub rooj. Tus nqi ntawm lub ntsuas hluav taws xob uas muab cov av noo, ntxiv rau qhov kub thiab txias, tsis raug txwv; yog li ntawd cov av noo tau suav nrog hauv qhov haujlwm ntawd.

Qhov xav tau ntxiv tshwm sim thaum kuv tus txij nkawm nquag nug kuv rau hnub ntawm lub lim tiam thiab/lossis hnub ntawm lub hlis, yog li kuv txiav txim siab suav nrog cov no hauv cov khoom ib yam. Kuv tau ua ob daim qauv ntawm qhov haujlwm uas tau qhia ntawm no. Ib qho rau kuv txoj kev kawm, thiab ib qho rau chav nyob hauv peb lub tsev uas kuv tus txij nkawm feem ntau pom. Kuv siv ob qho (1) Lub Sijhawm Tiag (RTC) thiab (2) qhov ntsuas cua thiab qhov kub thiab txias.

Ob qho DHT11 thiab DHT22 cov av noo/ntsuas kub kuv tau txiav txim siab muab cov txiaj ntsig ntsuas kub hauv Centigrade. Hmoov zoo nws yog qhov hloov pauv tau yooj yim rau Fahrenheit (hom ntawv siv hauv Asmeskas, uas yog kuv qhov chaw nyob). Cov duab kos hauv qab no muab cov cai uas tuaj yeem hloov kho tau yooj yim los ntsuas qhov kub hauv Centigrade, yog tias yog dab tsi siv nyob qhov twg koj nyob.

Kuv tau txiav txim siab ob qho tib si DHT22 thiab DTH11 sensors, thiab tau txiav txim siab ntawm DHT22, txawm hais tias kim dua me ntsis. DHT11 feem ntau tuaj yeem yuav tau tsawg dua $ 2, thaum DHT22 feem ntau pom muaj tsawg dua $ 5. Yog tias yuav ncaj qha los ntawm Tuam Tshoj, tus nqi tuaj yeem tsawg dua. Yog tias kuv tsuas xav pom qhov ntsuas kub, kuv tuaj yeem siv TMP36 lub ntsuas hluav taws xob hloov pauv ntawm DHT22, thiab paub qee qhov kev txuag nyiaj, thiab qhov tseeb qhov no yog qhov kuv tau tsim txawm tias ua ntej DIY project ntawm kuv li. Txawm li cas los xij, Kuv txiav txim siab suav nrog cov zaub ntawm cov txheeb ze cov av noo ntawm lwm yam khoom nthuav tawm hauv txoj haujlwm no.

DHT22 yog qhov tseeb me ntsis ntau dua DHT11. Yog li, tus nqi siab dua me ntsis ntawm DHT22 zoo li tsim nyog. Ob qho khoom siv DHT muaj cov ntsuas hluav taws xob muaj peev xwm. Cov ntsuas huab cua no tau dav siv rau kev tsim khoom thiab kev lag luam. Txawm tias tsis raug qhov tseeb, lawv muaj peev xwm ua haujlwm tau ntawm qhov kub thiab muaj qhov ua haujlwm tiv taus cov tshuaj hauv lawv ib puag ncig. Lawv ntsuas cov kev hloov pauv hauv dielectric uas tau tsim los ntawm cov txheeb ze cov av noo ntawm lawv ib puag ncig. Hmoov zoo, qhov kev hloov pauv ntawm lub peev xwm yog qhov tseem ceeb tawm hauv kev sib piv nrog cov av noo. Qhov txheeb ze qhov tseeb ntawm cov ntsuas no tuaj yeem pom yooj yim los ntawm kev tso ob ntawm lawv ib sab. Yog tias qhov no ua tiav nws yuav pom tias rau cov txheeb ze cov av noo lawv sib txawv los ntawm, feem ntau, 1 lossis 2 feem pua cov ntsiab lus.

DHT11/22 sensors tuaj yeem hloov pauv tau yooj yim rau ib leeg. Nyob ntawm tus nqi txwv, yog tias muaj, ib qho sensor tuaj yeem xaiv. Nkawd ob leeg tuaj hauv pob 4-tus pin zoo sib xws uas sib pauv tau, thiab raws li peb yuav pom sai sai no tsuas yog 3 ntawm 4 tus pin ntawm ob lub pob yuav xav tau los tsim lub desktop cov av noo thiab ntsuas kub nthuav qhia ntawm no. Txawm hais tias tsuas yog peb tus pin xav tau rau siv, plaub tus pin muab kev ruaj ntseg ntxiv thaum cov DHT sensors no tau muab tso rau/teeb tsa ntawm lub khob cij.

Zoo ib yam nkaus kuv tau txiav txim siab ob qho DS1307 thiab DS3231 RTCs. Raws li qhov kub ib puag ncig tuaj yeem cuam tshuam rau DS1307, Kuv tau txiav txim siab ntawm DS3231. Txawm hais tias DS1307 tuaj yeem siv tau. Hauv ntau qhov kev sim sib piv RTCs hauv kev cuam tshuam nrog drift (piv txwv li, tau txais lub sijhawm tsis raug), DS3231 tau tawm los raws li qhov tseeb dua, tab sis qhov sib txawv ntawm kev siv lub sensor tsis zoo li ntawd.

Yog lawm, yog tias koj tuaj yeem yooj yim txuas rau internet hauv koj qhov haujlwm, koj tuaj yeem rub lub sijhawm ncaj qha thiab yog li koj tsis xav tau lub sijhawm tiag tiag. Txawm li cas los xij, txoj haujlwm no xav tias kev siv internet yooj yim tsis muaj, thiab tau tsim los ua haujlwm yam tsis muaj ib qho.

Yog tias koj tab tom siv "wart wall" ntxiv kev siv zog yuav tsis yog qhov tseem ceeb tshaj. Txawm li cas los xij, yog tias koj tab tom ua lub zog tso saib los ntawm lub roj teeb txo lub zog siv yuav ua rau lub roj teeb lub neej ntev dua. Yog li, Cov Lus Qhia thiab kos duab hauv qab no muab txoj hauv kev, siv khawm "Sab laug" ntawm daim iav thaiv LCD, txhawm rau qhib lub teeb nraub qaum rau thiab tawm kom txo qis kev siv zog.

Raws li yuav pom nyob rau hauv Cov Lus Qhia no, txoj haujlwm yuav tsum muaj cov khoom siv tsawg tsawg vim tias feem ntau ntawm "kev nqa hnyav" yog ua los ntawm cov ntsuas thiab kos duab.

Kuv nyiam siv lub platform sim rau ntau ntawm kuv cov phiaj xwm, tshwj xeeb tshaj yog rau cov uas yuav xaus li cov lus qhia, vim tias lub platform no tso cai rau cov haujlwm los daws thiab nthuav tawm ua ib chav.

Kauj Ruam 1: Cov Khoom Xav Tau

Yam Khoom Yuav Tsum Tau
Yam Khoom Yuav Tsum Tau

Cov khoom xav tau yog:

- Ib qho chaw sim, txawm hais tias txoj haujlwm tuaj yeem tsim yam tsis muaj nws, nws ua rau pom qhov kev tsim kho zaum kawg yooj yim dua.

- 400-khi cov ntsiab lus qhob cij

- Ib daim iav tiv thaiv LCD nrog cov nyees khawm

- DHT22 (AOSONG AM2302) cov ntsuas kub thiab av noo.

- Lub sijhawm tiag tiag, Kuv tau xaiv DS3231 (Txawm li cas los xij, DS1307 yuav ua haujlwm nrog cov lej muab rau ntawm no, tsuas yog nco ntsoov tias GND, VCC, SDA thiab SCL pins tau txuas nrog yam zoo ib yam li DS3231. Ntawd yog, DS1307 tuaj yeem hloov pauv tau rau DS3231 los ntawm kev yooj yim kom ntseeg tau tias tus pin tsim nyog ntawm DS1307RTC phim cov qhov tsim nyog nyob ntawm lub khob cij, Dupont txuas xov hlau yuav tsis xav tau txav mus.) Qhov sib txawv thawj ntawm ob RTCs no yog lawv qhov tseeb, raws li DS1307 tuaj yeem cuam tshuam los ntawm qhov kub ib puag ncig uas tuaj yeem hloov pauv nws cov zaus hauv nws lub nkoj oscillator. Ob qho RTCs siv I2C txuas.

- Poj niam lub taub hau yuav tsum tau muab tso rau ntawm daim iav thaiv LCD. Kuv siv 5 thiab 6-tus pin poj niam lub taub hau (txawm hais tias yog koj xaiv lwm daim thaiv, kuj tau qhia ntawm no, tsis xav tau lub taub hau). Txiv neej lub taub hau taub hau tuaj yeem hloov pauv rau lub qhov (socket), thiab yog tias siv tsuas yog poj niam txiv neej ntawm ib sab ntawm qee qhov ntawm Dupont sib txuas xov hlau yuav tsum tau hloov pauv.

- Dupont txuas cov xov hlau

- Ib qho Arduino UNO R3 (Lwm Arduinos tuaj yeem siv los ntawm UNO, tab sis lawv yuav tsum muaj peev xwm tso tawm thiab tuav 5v)

- USB cable txhawm rau rub koj cov duab kos los ntawm lub khoos phis tawj mus rau UNO

Ib lub cuab yeej xws li "wart phab ntsa" lossis roj teeb kom muaj zog rau UNO tom qab nws tau ua haujlwm. Koj tuaj yeem muaj ntau yam khoom xav tau ntawm koj lub rooj ua haujlwm, txawm hais tias koj yuav xav yuav qee yam. Yog tias koj muaj thawj ob peb tus, nws tuaj yeem pib thaum tos ntawm lwm tus. Txhua yam ntawm cov khoom no tau npaj muaj nyob online ntawm cov vev xaib xws li Amazon.com, eBay.com, Banggood.com thiab ntau ntxiv

Kauj Ruam 2: Npaj Npaj Ua Haujlwm

Npaj Npaj Ua Haujlwm
Npaj Npaj Ua Haujlwm
Npaj Npaj Ua Haujlwm
Npaj Npaj Ua Haujlwm
Npaj Npaj Ua Haujlwm
Npaj Npaj Ua Haujlwm

Qhov kev sim ua los ntawm lub hnab yas uas muaj 120mm x 83mm Plexiglas ntawv, thiab lub hnab yas me uas muaj 5 tus ntsia hlau, 5 lub yas yas sawv ntsug (spacers), 5 txiv ntseej thiab ib daim ntawv nrog plaub lub tog raj kheej, tus kheej-nplaum taw. Yuav tsum tau tag nrho plaub lub pob tw, ib yam li plaub ntawm txhua lwm yam khoom. Muaj cov ntsia hlau ntxiv, sawv ntsug, thiab txiv ntseej uas tsis xav tau. Txawm li cas los xij, lub hnab tsis muaj cov lus qhia.

Thaum pib lub hnab yas raug txiav qhib kom tshem daim Plexiglas ntawv thiab lub hnab me me. Daim ntawv Plexiglas tau npog rau ob sab nrog ntawv los tiv thaiv nws hauv kev tuav thiab thauj mus los.

Thawj kauj ruam yog tev daim ntawv rov qab ntawm txhua sab ntawm lub platform thiab tshem tawm ob daim ntawv. Thaum daim ntawv raug tshem tawm ntawm txhua sab, plaub lub qhov rau mount Arduino mus rau lub platform tau pom yooj yim. Nws yog qhov yooj yim tshaj yog tom qab muab daim ntawv tshem tawm, daim ntawv acrylic yuav tsum tau muab tso nrog plaub lub qhov ntawm sab xis thiab qhov ze ze ua ke thiab ze ib qho ntug ntawm daim txiag acrylic, rau koj (raws li pom hauv daim duab txuas).

Kauj Ruam 3: Txhim kho Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform

Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform
Mounting Arduino UNO lossis Clone rau Kev Tshawb Fawb Platform

Arduino UNO R3 lub rooj tsavxwm muaj plaub qhov txuas. Cov pob tshab pob tshab tau muab tso nruab nrab ntawm sab hauv qab ntawm UNO R3 thiab sab saud ntawm daim txiag acrylic. Ua haujlwm ntawm kuv thawj pawg thawj coj sim kuv tau ua yuam kev uas xav tias cov spacers tau ntxhua khaub ncaws uas yuav tsum tau muab tso rau hauv qab Plexiglas pawg thawj coj los tuav cov txiv ntoo hauv qhov chaw - lawv yuav tsum tsis txhob. Cov spacers tau muab tso rau hauv qab Arduino UNO pawg thawj coj, ib puag ncig cov ntsia hlau tom qab cov ntsia hlau dhau los ntawm UNO lub qhov ntsaws. Tom qab dhau los ntawm pawg thawj coj saib cov ntsia hlau dhau los ntawm cov spacers thiab tom qab ntawd dhau ntawm lub qhov hauv acrylic Plexiglas board. Cov ntsia hlau raug kaw los ntawm cov txiv ntoo uas ntim rau hauv pob me. Cov ntsia hlau thiab cov txiv ntoo yuav tsum nruj kom ntseeg tau tias Arduino yuav tsis txav mus thaum siv.

Kuv pom nws yooj yim tshaj plaws los pib nrog lub qhov nyob ze lub pob pib dua (saib cov duab) thiab ua haujlwm kuv txoj kev clockwise ncig Arduino. UNO tau txuas nrog lub rooj tsavxwm, raws li qhov xav tau, siv ib lub hau ntswj ib zaug.

Koj yuav xav tau Phillips lub taub hau me me tig lub hau ntswj. Kuv pom lub qhov (socket) los tuav cov txiv ntoo tau pab tau heev, txawm hais tias tsis tsim nyog. Kuv siv cov tsav tsheb ua los ntawm Wiha thiab muaj nyob ntawm Amazon [Wiha (261) PHO x 50 thiab Wiha (265) 4.0 x 60]. Txawm li cas los xij, ib qho me me Phillips taub hau ntswj taub hau yuav tsum ua haujlwm yam tsis muaj teeb meem, thiab raws li tau sau tseg yav dhau los tus tsav tsheb txiv ntseej tsis xav tau tiag tiag (txawm hais tias nws ua rau nrawm dua, yooj yim dua, thiab nyab xeeb dua).

Kauj Ruam 4: Txhim Kho Ib Nrab-qhov loj me, 400 Cov Ntsiab Lus Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform

Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform
Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform
Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform
Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform
Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform
Mounting Ib nrab-qhov loj me, 400 Cov Ntsiab Lus Cov Ntsiab Lus, Breadboard mus rau Kev Tshawb Fawb Platform

Hauv qab ntawm ib nrab ntawm lub khob cij me me tau npog nrog ntawv nias rau ntawm daim nplaum thaub qab. Tshem daim ntawv no thiab nias lub khob cij, nrog nws tam sim no nthuav tawm cov thim rov qab, mus rau qhov chaw sim. Koj yuav tsum sim tso ib sab ntawm lub khob cij ua ib sab rau sab ntawm Arduino nws ze tshaj plaws. Tsuas yog nias tus kheej-nplaum sab ntawm lub khob cij rau saum lub rooj tsavxwm acrylic.

Tom ntej no, tig lub platform hla thiab nce plaub qhov suav nrog cov yas yas ntawm plaub lub ces kaum ntawm lub platform hauv qab.

Xijpeem qhov kev sim ua haujlwm uas koj siv, thaum koj ua tiav koj yuav tsum muaj ob qho Arduino UNO R3 thiab ib nrab-lub khob cij me me tau teeb tsa ntawm nws, thiab plaub txhais taw ntawm sab hauv qab kom tso cai rau lub platform thiab lub rooj noj mov kom muab tso rau ntawm ib qho tiaj tiaj yam tsis muaj kev sib tsoo ntawd, thaum muab kev txhawb nqa ruaj khov rau lub rooj sib tham

Kauj Ruam 5: LCD Shield

Lub LCD Shield
Lub LCD Shield
Lub LCD Shield
Lub LCD Shield
Lub LCD Shield
Lub LCD Shield

Koj tuaj yeem siv daim ntaub thaiv, xws li ib qho uas tau qhia ua ntej nrog cov pins uas twb tau muag lawm. Txawm li cas los xij, cov ntaub thaiv zoo li no muaj cov pins ntau dua li cov qhov (socket), yog li Dupont lub khob cij rau kab yuav tsum tau xaiv raws li. Yog tias yog, koj tsuas yog yuav tsum rub nws mus rau UNO. Thaum txhim kho kom ntseeg tau tias koj txhim kho daim ntaub thaiv kom raug raws li qhov xav tau, nrog cov pins ntawm txhua sab ntawm daim ntaub thaiv kab nrog kab nyob ntawm UNO.

Yog tias koj siv daim ntaub thaiv, xws li qhov kuv siv ntawm no, yam tsis muaj tus pin twb tau muab tso rau hauv qhov chaw. Teem ib sab poj niam lub taub hau nrog 5 thiab 6 qhov nyob, raws li, txhawm rau txhawm rau ntawm daim ntaub thaiv. Cov qhov ntawm cov taub hau no yuav tsum yog sab tiv thaiv ntawm daim ntaub thaiv thaum koj muab lawv tso rau ntawm (saib duab). Thaum cov taub hau raug muab tso rau hauv qhov chaw, koj tuaj yeem ua haujlwm zoo ib yam li ntawd rau daim ntaub thaiv uas tau yuav nrog cov pins uas twb tau muag lawm. Kuv xaiv siv M-M Dupont cables uas tsis yog rau MF cov kab hluav taws xob, raws li kuv ib txwm nyiam M-M cables. Txawm li cas los xij, koj tuaj yeem xaiv siv tus pin ntawm daim iav LCD thiab tsis yog poj niam lub taub hau, qhov twg koj tsuas yog xav hloov tus poj niam txiv neej ntawm ib sab ntawm Dupont hookup cables.

Qhov twg thaiv koj xaiv los pib nrog, thaum koj ua tiav koj yuav tsum muaj daim ntaub thaiv npog saum lub Arduino UNO. Xijpeem ntaub thaiv npog, ib qho uas tau siv ua ntej txuas tus pin lossis ib qho uas koj tau siv koj tus kheej nrog poj niam lub taub hau (lossis txiv neej lub taub hau yog tias koj xaiv) siv ob peb lub koob digital. Cov pins D0 txog D3 thiab D11 txog D13 tsis siv los ntawm daim ntaub thaiv, tab sis yuav tsis siv ntawm no. Qhov ntsuas qhov sib piv A0 yog siv los ntawm daim ntaub thaiv los tuav cov txiaj ntsig ntawm khawm nias. Yog li, analog pins A1 txog A5 tau siv dawb. Hauv txoj haujlwm no, kom tawm ntawm lub vijtsam LCD tsis muaj kev cuam tshuam Kuv tsuas yog siv lub qhov sib piv thiab tsis siv cov tswv yim digital.

Kuv pom nws yooj yim tshaj plaws los siv lub khob cij nrog txiv neej lub taub hau los tuav cov poj niam lub taub hau rau cov laug (saib cov duab).

Cov lej lej 10 tau siv rau LCD lub teeb pom kev rov qab, thiab peb yuav siv nws hauv peb daim duab kos los tswj lub zog rau LCD thaum cov zaub tsis siv. Tshwj xeeb, peb yuav siv lub "LEFT" khawm ntawm daim ntaub thaiv kom qhib lub teeb nraub qaum rau thiab tawm kom txuag lub zog thaum lub teeb tsis xav tau.

Kauj Ruam 6: Siv DHT22 Vaum thiab Kub Sensor

Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor
Siv DHT22 Vaum thiab Kub Sensor

Ntxig plaub tus ntiv tes ntawm DHT22 rau hauv ib nrab ntawm lub khob cij me me, yog li txhim kho lub ntsuas ntawm lub khob cij.

Kuv suav tus DHT22 tus pin 1 txog 4 raws li qhia hauv daim duab suav nrog. Lub zog rau lub ntsuas hluav taws xob tau muab los ntawm tus pin 1 thiab 4. Tshwj xeeb, tus pin 1 muab lub zog +5v, thiab tus pin 4 yog siv rau hauv av. Tus pin 3 tsis siv, thiab tus pin 2 yog siv los muab cov ntaub ntawv xav tau rau peb cov zaub.

Txuas peb tus pin uas tau siv ntawm DHT22, siv lawv cov khoom sib txuas ntawm lub khob cij, txuas rau daim ntaub thaiv, thiab yog li Arduino UNO raws li hauv qab no:

1) Pin 1 ntawm lub sensor mus rau daim thaiv lub qhov hluav taws xob 5v, 2) Pin 4 ntawm lub ntsuas mus rau ib qho ntawm daim thaiv GND txuas, 3) Tus Pin 2 ntawm lub ntsuas, cov ntaub ntawv tso tawm tus pin, mus rau qhov sib piv A1 (piv rau qhov no rau kuv Cov Lus Qhia ua ntej uas nws tau mus rau lub qhov (socket) 2 ntawm daim ntaub thaiv). Kuv siv lub qhov hluav taws xob sib piv ntau dua li ib qho digital ntawm no kom tawm ntawm lub vijtsam LCD yam tsis muaj kev cuam tshuam. Nws yog qhov muaj txiaj ntsig kom nco ntsoov tias txhua tus pins analog kuj tseem tuaj yeem siv ua tus lej digital. Txawm hais tias ntawm no A0 tau tshwj tseg rau cov khawm khawm.

DHT22 sensor tsuas tuaj yeem muab cov ntaub ntawv hloov tshiab txhua txhua 2 vib nas this. Yog li, yog tias koj teeb tsa lub sensor ntau dua ib zaug txhua ob vib nas this, zoo li tuaj yeem tshwm sim ntawm no, koj tuaj yeem tau txais cov txiaj ntsig uas yog hnub tim me ntsis. Rau tsev thiab chaw ua haujlwm qhov no tsis yog qhov teeb meem, tshwj xeeb tshaj yog cov txheeb ze cov av noo thiab qhov kub tau muab tso tawm ua tus lej tag nrho yam tsis muaj zauv.

Kauj Ruam 7: Ntxiv Lub Sijhawm Tiag (RTC)

Ntxiv Lub Sijhawm Tiag (RTC)
Ntxiv Lub Sijhawm Tiag (RTC)
Ntxiv Lub Sijhawm Tiag (RTC)
Ntxiv Lub Sijhawm Tiag (RTC)
Ntxiv Lub Sijhawm Tiag (RTC)
Ntxiv Lub Sijhawm Tiag (RTC)

Kuv siv rau tus pin sab ntawm DS3231, txawm hais tias tsuas yog plaub tus pin xav tau. Qhov no yog txhawm rau muab kev ruaj ntseg ntau ntxiv rau RTC no thaum txuas rau hauv lub khob cij. Ib daim duab txuas qhia pom CR2032 roj teeb uas yuav tsum tau ntsaws rau hauv DS3231 RTC txhawm rau tso cai rau nws khaws cov ntaub ntawv txawm tias thaum tsis txuas los ntawm lwm lub zog siv. Ob lub DS1307 thiab DS3231 lees txais tib lub style CR2031 khawm roj teeb.

Kev sib txuas rau DS3231 muaj raws li hauv qab no:

- GND ntawm DS3231 rau GND ntawm daim iav thaiv LCD

- VCC ntawm DS3231 txog 5V ntawm daim iav thaiv

- SDA ntawm DS3231 txog A4 ntawm daim iav thaiv

- SCL ntawm DS3231 txog A5 ntawm daim iav thaiv

Thaum koj ua tiav koj yuav muaj Dupont cables txuas hauv A1 (rau DHT22) thiab A4 thiab A5 rau SDA thiab SCL pins ntawm RTC.

Kuv kuj tau suav nrog daim duab ntawm xaiv DS1307 qhia tus pin uas yuav xav tau txuas nrog. Txawm hais tias nws tsis tuaj yeem nyeem los ntawm daim duab, IC me me nyob ze rau qhov "qhov" tsis tau muag yog DS1307Z uas yog RTC. Lwm qhov IC me me uas tuaj yeem pom yog EEPROM uas tuaj yeem siv rau kev khaws cia; nws tsis siv nws hauv daim duab hauv qab no.

Ob qho RTCs siv lub zog me me, hauv nanoamps ntau, yog li lub sijhawm tiag tiag yuav khaws cov ntaub ntawv thiab tsis ua haujlwm luv yog tias lawv tsuas yog siv roj teeb sab hauv. Nws yog qhov zoo tshaj los hloov lub roj teeb khawm txhua txhua xyoo, txawm hais tias cov dej ntws tam sim no qis heev rau ob qho RTC uas lawv yuav muaj peev xwm tuav tau lawv li ob peb xyoos.

Kauj Ruam 8: Sketch

Lub xaib no tshem tawm tsawg dua thiab ntau dua li cov cim thiab cov ntawv nyob nruab nrab ntawm cov cim no. Yog li kuv tsis tau nkees los suav nrog cov duab kos hauv cov ntawv ntawm no. Txhawm rau pom cov duab kos raws li tau sau, thov rub tawm cov ntawv txuas nrog. Cov vib nas this tsis pom hauv daim duab, tab sis raug xa mus rau qhov tsis pub zais ntawm 1602 LCD tsuas yog dhau ntawm cov zaub tsis pom. Yog li, yog vib nas this yog qee yam koj xav tso tawm, tsuas yog txuas ntxiv cov zaub sab laug thiab sab xis.

Hauv qhov kos duab kuv suav nrog cov ntaub ntawv header rau DS3231, thiab kuv txhais lub hom phiaj ntawm hom DS3231. Cov khoom siv no tau siv hauv daim duab los khaws cov hnub ntawm lub lim tiam, hli, hnub, thiab sijhawm cov ntaub ntawv xav tau. Cov ntaub ntawv no rau hnub ntawm lub lim tiam, hli, thiab hnub ntawm lub hlis tau muab rau cov ntawv hloov pauv, thiab tom qab ntawd cov txiaj ntsig khaws cia hauv cov kev hloov pauv no tau luam tawm ntawm LCD. Lub sijhawm tau luam tawm tag nrho, tab sis ib feem ntawm lub sijhawm, raws li tau tham dhau los, raug xa mus rau qhov tsis pom 24 tus cim tsis nyob ntawm 1602 LCD, tsuas yog dhau los ntawm cov cim tso tawm. Raws li tau sau tseg saum toj no, tsuas yog cov teev thiab feeb tau tshwm sim thiab cov vib nas this tau zais ntawm qhov pib ntawm 24 tus cim no.

Lub teeb nraub LCD tuaj yeem qhib thaum xav tau, thiab tawm mus yam tsis muaj qhov xav tau. Txij li cov zaub tseem ua haujlwm txawm tias muaj lub teeb pom kev tawm, nws tuaj yeem nyeem nrog lub teeb pom kev txawm tias tawm. Ntawd yog, lub teeb pom kev zoo yuav tsum tsis txhob nyeem cov ntaub ntawv nthuav tawm ntawm LCD, uas txuas ntxiv hloov tshiab txawm tias hloov pauv.

Hauv daim duab, koj yuav pom kab:

RTC.adjust (DateTime (2016, 07, 31, 19, 20, 00));

Qhov no siv lub hom phiaj ntawm hom RTC_DS1307 thiab tso cai rau peb yooj yim teeb tsa hnub thiab sijhawm tam sim no. Thov sau hnub tim thiab lub sijhawm tsim nyog ntawm kab no thaum koj khiav daim duab. Kuv pom tias nkag mus ib feeb dhau los lub sijhawm tam sim no, qhia hauv kuv lub khoos phis tawj, ua rau kwv yees ze ze rau lub sijhawm tiag tiag (nws siv sijhawm IDE siv sijhawm me ntsis los ua cov duab, thiab kwv yees li 10 vib nas this ntxiv rau daim duab kos los ua haujlwm).

Kauj Ruam 9: Zam Kev Sib Koom Tes

Muab tso ua ke qhov Project Assembled
Muab tso ua ke qhov Project Assembled

Kuv tau teeb tsa kuv txoj haujlwm ua ke ntawm tus tuav daim npav ua lag luam (saib daim duab). Tus tuav daim npav ua lag luam muaj nyob hauv kuv qhov 'sib txawv thiab xaus' sau. Raws li kuv muaj ntau tus tuav, kuv siv ib qho ntawm no. Txawm li cas los xij, cov phiaj xwm sib sau ua ke tuaj yeem yooj yim pom ntawm tus tuav lub xov tooj ntawm tes, thiab lwm yam. Tus tuav uas nqa cov phiaj xwm sib dhos los ntawm txoj haujlwm tiaj tiaj mus rau lub kaum sab xis ntawm 30-60 degrees yuav tsum ua haujlwm ib yam.

Kauj ruam 10: Tom qab ntawd

Nrog koj zoo siab, yog tias koj ua raws cov kauj ruam saum toj no koj tam sim no muaj koj tus kheej tso saib hnub ntawm lub lim tiam, daim ntawv qhia hnub, sijhawm, txheeb ze cov av noo thiab qhov kub thiab txias.

Yog tias koj pom Cov Lus Qhia ntawm tus nqi no, thiab tshwj xeeb tshaj yog tias koj muaj lus qhia rau kev txhim kho lossis kom kuv paub ntau ntxiv hauv thaj chaw no, Kuv zoo siab tau hnov los ntawm koj. Koj tuaj yeem tiv tauj kuv ntawm [email protected]. (thov hloov qhov thib ob 'kuv' nrog 'e' tiv tauj kuv.

Pom zoo: