Sanya makullin lantarki naka wanda zaku iya buɗe ƙofar garejin ku saboda yatsanku

kofar gareji sanye take da makullin lantarki

Muna cikin lokacin da ga alama cewa mafi aminci ko mafi sauri shine amfani da zanan yatsanka zuwa, misali, buɗe wayarka ta hannu har ma zuwa aiki, a wannan yanayin komai yana tafiya ta hanyar tsaron da ake buƙata ko aka ɗora don aiwatarwa wasu ayyukan.

Nisa daga wannan, gaskiyar ita ce, a matsayin aikin da koyon yadda wannan nau'in na'urar dijital ke aiki zai iya zama mai ban sha'awa, saboda wannan a yau ina son bayyana muku yadda zaka hau makullin lantarki don kofar garejin ka wanda za'a iya budewa ta amfani da zanan yatsan ka.


Kulle lantarki

Gina makullin lantarki don ƙofar garejin mataki zuwa mataki wanda zaku iya buɗewa tare da zanan yatsa

Idan muka kara bayani dalla-dalla, zan gaya muku cewa don wannan aikin zamuyi amfani da zanan yatsan hannu kamar SparkFun GT-511C1R. Kamar yadda aka saba a cikin irin wannan koyarwar, dole ne a tuna cewa asali duk waɗannan nau'ikan samfuran suna da aiki iri ɗaya, don haka ba lallai bane ya zama daidai wannan samfurin.

Idan kun kuskura ku aiwatar da wannan aikin amma kuna da wasu bambance-bambance, kamar su na'urar daukar hotan yatsan hannu da aka yi amfani da su ya bambanta da wanda ke cikin koyarwar ko kuma kofar garejin ku kawai yana amfani da wasu tsarin, wani abu da zai faru kusan tare da yiwuwar duka, a'a dole ne ku me yasa tsoro, zaku iya bin karatun amma ba yadda yake ba tunda Dole ne kuyi wani gyare-gyare duka a cikin wayoyi da cikin lambar kanta don daidaita ta da kayan aikin ka.

abubuwa masu mahimmanci

Matakan da ake buƙata don gina mai karatun yatsan hannunka wanda zaka buɗe ƙofar gareji

Mataki na 1: Waya da derarfafa Dukkan Tsarin

Domin bude kofar garejin ka godiya ga zanen yatsan yatsan ka, zaka bukaci abubuwa biyu daban daban. A gefe guda, muna buƙatar kera namu kwamiti, wanda zamu girka a waje da gidanmu. A cikin wannan kwamitin sarrafawa zai kasance inda za mu girka na'urar daukar hoton yatsa, karamin allon bayani da wasu karin maballan.

Na biyu za mu buƙaci shigar da akwati na biyu a cikin garejin kanta. Wannan zai kasance yana kula da tabbatar da cewa yatsan da aka shigar a cikin kwamiti mai karba ya karbu ko a'a ta hanyar tsarin kuma, a yayin tabbaci daidai, ci gaba da kirkirar siginar da motar zata bude wacce zata bude kofar garejin mu.

Don aiwatar da wannan za mu buƙaci mai sarrafa microM na ATMega328p wanda zai kasance mai kula da ba da rai ga rukunin sarrafawar da za mu girka a waje da gidanmu yayin, don kwamitin cikin gida za mu ci kuɗi a kan ATTiny. Allon biyu zasuyi sadarwa tare da juna ta hanyar amfani da jeri. Don kara tsaro ga dukkan tsarin, za mu girka na’urar watsa labaru ta yadda katin ATTiny zai iya rufe mahaɗin, ta yadda idan ɓarnata ta fara zauren kula da waje, ba za su iya buɗe ƙofar garejinmu ta hanyar ƙetare wasu igiyoyin ba.

Idan wannan aikin ya gamsar da ku kuma kuna sha'awar aiwatar da wannan aikin, wannan shine jerin abubuwan haɗin da zaku buƙaci:

zane zane

A wannan lokacin lokaci ya yi da za a haɗa duk kayan aikin da ke cikin jerin. Tunanin, kamar yadda kuke tsammani tabbas, ya wuce bi zane wanda yake saman saman waɗannan layukan, iri daya wanda zaka iya ganin shimfidar bangarorin sarrafawa da kuma tsarin cikin gidan. Shawara daya da zan iya baku ita ce ta ba wa igiyar na masu sauyawar ta yanzu da LCD wani tsayi saboda za ka iya rataye su ka gyara su a madaidaicin matsayin da ka ƙirƙiri a cikin akwatin na ruwa mara kyau.

Idan a wannan gaba munyi nazarin wani lokaci lambar da mai kula zai aiwatar a ƙarshe, zaku lura cewa madannan suna haɗe da fil 12, 13 da 14, waɗanda ke cika ayyukan 'zuwaba','OK"da"kasa'bi da bi. Wannan yana nufin cewa yana iya zama kyakkyawan ra'ayin sanya su ta wannan hanyar don kiyaye ƙirar gani da kyau fiye da yadda suke aiki.

Don samar da na yanzu ga dukkan tsarin da zamu yi amfani da shi, kamar yadda jerin abubuwan da ake buƙata suka faɗi, cajar tarho tare da kowane mai haɗin microUSB. Tunanin yin amfani da wannan nau'in caja yana mai da martani ga gaskiyar cewa suna da arha sosai kuma sama da duk mai sauƙin samu.. Wani ra'ayi daban shine iya samun ikon sarrafa masu sarrafawa ta hanyar amfani da batura, kodayake a wannan lokacin yana iya zama mafi kyau a yi amfani da wani abu mai canza wutar lantarki a yanzu don jagorantar yanzu tunda firikwensin sawun yatsa yawanci yana cinye mai yawa a halin yanzu kuma, ciyar da dukkan tsarin tare da batura zaka iya canza su kowace rana.

IDE na Arduino

Mataki 2: Yin lamba da gudana akan masu kula

A wannan lokacin musamman gaya muku hakan duka lambar da za a zartar ta ATMega328p da ATTiny85 an rubuta su kuma an haɗa su tare da Arduino IDE. A wannan takamaiman lamarin dole ne mu aiwatar da garagefinger.ino fayil a cikin ATMega328p da ƙaramin_switch.ino fayil a cikin ATTiny85. A gefe guda, NokiaLCD.cpp da NokiaLCD.h dakunan karatu su ne dakunan karatu guda biyu na fuskar LCD, wadannan an hada su ne daga misalai da aka debo daga shafin Arduino kuma, kamar kusan dukkanin dakunan karatu, ya kamata a sanya su a cikin fayildakunan karatu'don ID ɗinku na Arduino don nemo su. Wannan babban fayil yawanci yana daga tushen inda kuka sanya IDE, a cikin Windiows yawanci "% HOMEPATH" \ Takardu \ ɗakunan karatu Arduino \. Na bar muku fayiloli don saukarwa a ƙasa da waɗannan layukan:

Baya ga wannan zaku kuma buƙaci dakunan karatu don na'urar daukar hotan yatsa zata iya aiki. A wannan lokacin dole ne a tuna cewa rashin alheri Dakunan karatu masu nasaba da shafin SparkFun ba zasu yi aiki ba tunda an kirkiresu don samfurin GT-511C3, yafi tsada, kuma ba don sigar da muke amfani da ita ba, wataƙila wani abu mafi wahalar samu amma yafi rahusa. Ana iya samun dakunan karatu na aiki don GT-511C1R a github.

Idan bayan zazzage dukkan fayiloli da duban lambar da kuke so samar da cikakken tsaro ga tsarin Ina ƙarfafa ku, alal misali, don nemowa da maye gurbin duk lokuta a 'amintacce'ta hanyar kalmar sirri. Wani dalla-dalla mai ban sha'awa wanda zai iya taimakawa tsarinka ya kasance amintacce shine canza canjin buf a cikin fayil ɗin kankany_switch.ino don ya zama daidai da kalmar sirrin da kake son amfani da ita.

M lambar wucewa, wanda aka bayyana a cikin garagefinger.ino file, yana da wakilci 8-bit na jerin latsa sama / ƙasa latsa jerin hakan za a iya amfani da shi wajen bude kofar garejinka da loda sabbin yatsu a cikin tsarin ba tare da amfani da zanan yatsan da aka sani ba. Wannan yana da amfani a karon farko da ake amfani da na'urar azaman ƙwaƙwalwar ajiyar hoton zata zama fanko. Zai iya zama mai ban sha'awa canza wannan ƙimar ta farko.

waje iko

Mataki na 3: Mun tattara dukkan aikin

Da zarar mun gwada dukkan aikin, to lokacin taro ne na ƙarshe. Don wannan dole ne mu ɗora dukkan kwamitin sarrafawa a cikin akwatin mu na ruwa. Kamar yadda kuke gani a cikin hotunan, ta yadda babu wanda zai iya isa ga mai kula, ban da akwatin ruwa, an yi amfani da akwatin acrylic wanda zamu girka allon LCD ne kawai da maɓallin shiga, sauran tsarin zai kasance shigar a cikin cikin wannan akwatin.

Dole ne a ɗora wannan akwatin a wajen gidanku kuma a haɗa shi kai tsaye zuwa akwatin da za mu girka ATTiny. A wannan gaba, tunatar da ku cewa a cikin ATTiny dole ne ku haɗa igiyoyi don sadarwa da sigina zuwa motar da ta buɗe ƙofar garejin ku. A halin da nake ciki sauki ne a gareni tunda cikin garejin kanta ina da maballin turawa a bango wanda yayi wannan aikin.

tsarin sakawa

Mataki na 4. Amfani da tsarin

Da zarar mun gama amfani da dukkan tsarin, dole kawai mu danna kowane ɗayan maɓallan uku don haskaka allon LCD da na'urar daukar hoton yatsan hannu. A wannan gaba, na'urar tana jira har sai kun sa yatsa akan na'urar daukar hotan takardu. Idan yatsan da kuka sanya akan sikantar ɗin aka gane, ƙofar zata buɗe kuma za a nuna menu a kan allo don sake / rufe kofar kuma, kara / share zanan yatsan hannu, canza hasken allo ... Na'urar tana kashe kusan dakika 8 bayan an danna maɓallin ƙarshe. Don canza tsawon lokacin jiran, dole ne ka canza aikin darinButton a cikin garagefinger.ino fayil.

Kamar yadda muka ambata a cikin sakin layi na baya, zaku iya amfani da jerin tsaurara abubuwa ta amfani da maɓallan sama zuwa ƙasa waɗanda 'OK'don samun damar shiga tsarin. Wannan yana da amfani a karo na farko da ka kunna na'urar saboda, a wannan lokacin, na'urar daukar hotan takardu ba zata sami alamun yatsu a ƙwaƙwalwar ta ba. Ana ba da jerin farko ta wakilcin binaryar 8-bit na lambar da aka adana a cikin canji shawo kanCode a cikin garagefinger.ino fayil inda '1' ke wakiltar maɓallin 'sama' kuma '0' wakiltar maɓallin 'ƙasa'.

Aya daga cikin abin da yakamata a tuna shine cewa, idan har ka canza jerin masu juyawa kuma daga baya ka manta da shi ba tare da sanya zanan yatsan hannu a kan na'urar ba, za a kulle shi sosai kuma dole ne ka sake tsara ATMega328p kuma ka tilasta wa EEPROM gogewa don share lambar.

Ƙarin Bayani: masu koyarwa


Abubuwan da ke cikin labarin suna bin ka'idodinmu na ka'idojin edita. Don yin rahoton kuskure danna a nan.

Kasance na farko don yin sharhi

Bar tsokaci

Your email address ba za a buga. Bukata filayen suna alama da *

*

*

  1. Mai alhakin bayanan: Miguel Ángel Gatón
  2. Dalilin bayanan: Gudanar da SPAM, gudanar da sharhi.
  3. Halacci: Yarda da yarda
  4. Sadarwar bayanan: Ba za a sanar da wasu bayanan ga wasu kamfanoni ba sai ta hanyar wajibcin doka.
  5. Ajiye bayanai: Bayanin yanar gizo wanda Occentus Networks (EU) suka dauki nauyi
  6. Hakkoki: A kowane lokaci zaka iyakance, dawo da share bayanan ka.