Cov txheej txheem:

Binary moos V1.0: 5 Cov Kauj Ruam
Binary moos V1.0: 5 Cov Kauj Ruam

Video: Binary moos V1.0: 5 Cov Kauj Ruam

Video: Binary moos V1.0: 5 Cov Kauj Ruam
Video: Pulling the bullet out my leg Jackboy Gleno 2024, Kaum ib hlis
Anonim
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0
Binary moos V 1.0

Txhua leej txhua tus nyiam lub moos binary, tshwj xeeb tshaj yog cov neeg tsim khoom zoo li kuv. Hauv cov lus qhia no kuv yuav qhia koj, yuav ua li cas koj tuaj yeem ua koj tus kheej lub moos binary siv tawm-rau-txee thiab perfboard modules.

Kuv tsis txaus siab nrog kev tsim qauv tsim ua ob lub moos los ntawm ebay lossis lwm qhov chaw, yog li kuv tau ua kuv tus kheej. Nws siv tsuas yog ib qho xim, thiab lub ntsej muag yog sib npaug, uas ua rau nws zoo dua.

Khoom siv

Cheebtsam:

  • Arduino Nano (ib qho kev tswj hwm nrog 18 tawm thiab I2C)
  • DS1307 module (DS3231 kuj tseem siv tau)
  • 18 pcs 5mm super ci LED (Kuv siv xiav)
  • 18 pcs 10kOhm resistor (Kuv siv SMD)
  • 18 pcs 100kOhm resistor (Kuv siv SMD)
  • 18 pcs generic diode
  • DC txuas txuas
  • 12V fais fab mov
  • Lub thawv ntoo me me
  • Hlau
  • Cov hlab cua sov-ntsws (xaiv tau)
  • Perfboard

Cov Cuab Yeej:

  • Soldering hlau thiab solder
  • Fais laum
  • Kub kua nplaum phom
  • Cov cuab yeej yooj yim

Kauj Ruam 1: Soldering LED Board

Soldering LED Board
Soldering LED Board

Ua ntej tshaj plaws koj yuav tsum xaiv qhov loj ntawm koj lub moos. Thaum nws pom tseeb koj yuav tsum xaiv daim perfboard nrog qhov loj me uas tsim nyog. Koj tuaj yeem txiav nws kom yooj yim los ntawm kos nws nrog rab riam muaj txiaj ntsig ob peb zaug thiab snapping nws. Koj yuav tsum tau muab cov kab hluav taws xob tso rau hauv qhov chaw hauv tsib kab. Cov naj npawb 1, 3 thiab 5 yuav muaj 4 LEDs, thaum tus lej 2 thiab 4 yuav muaj 3 daim. Cov LEDs ntawm perfboard yuav tsum zoo ib yam li qhov no:

O -------- O -------- OO --- O --- O --- O --- OO --- O --- O --- O --- O --- OO --- O --- O --- O --- O

Os sawv cev rau LED txoj haujlwm.

Thawj kab ntawv qhia cov teev los ntawm 0 txog 12 hauv binary. LED qis tshaj yog LSB thiab LED siab tshaj plaws yog MSB. Kab ntawv thib ob yog kaum ntawm feeb los ntawm 0 txog 5. Kab lus thib peb yog seem ntawm feeb los ntawm 0 txog 9. Qhov seem qhia cov vib nas this tib yam li cov feeb ua haujlwm. Cov duab tom ntej no qhia lub sijhawm, qhov twg Os tawm thiab Xs yog ON:

O -------- O -------- OO --- O --- O --- O --- OO --- O --- O --- O --- O --- OX --- X --- O --- O --- XThe time is 1:10:01

X -------- O -------- XO --- O --- O --- X --- OO --- X --- X --- O --- OO --- O --- X --- O --- X Lub sijhawm yog 8:23:49

Kev sib txuas rau LEDs yog hauv cov duab kauj ruam. Txhua lub LEDs muaj tib GND thiab VCC ntawm lawv cov kev sib txuas. Rau VCC koj tuaj yeem siv 5V (lossis 3.3V). Nrog 100kOhm resistor LEDs yuav dim heev. Yog tias koj qhib LED nrog Arduino cov zis, tam sim no mus hla qhov kev tiv thaiv me me (10kOhm) thiab LED yuav ci dua. Yog tias tsis muaj qhov sib txawv txaus ntawm qhov tsaus ntuj thiab ci ci LED, koj tuaj yeem txuas cov LED board VCC rau 3.3V. Lub diode xav tau hauv Circuit Court, yog li yog tias koj cov zis raug rub qis, qhov tam sim no tseem ntws hla lub LED. Kuv vam tias nws yog qhov tseeb rau txhua tus.

Kom muaj lub ntsej muag me me Kuv tau siv SMD resistors nyob tom qab ntawm perfboard. Koj tuaj yeem siv cov tiv thaiv tsis tu ncua (THD), yog tias koj muaj chaw txaus rau lawv. Tsis tas li kuv yuav tsum tau muab cov diodes tso rau ntawm ib daim perfboard cais, dua, vim yog qhov chaw. Koj tuaj yeem siv SMD diodes yog tias koj muaj, yog li txhua yam tuaj yeem mus rau ib lub rooj tsavxwm.

Siv cov xov hlau txuas rau GND thiab VCC kab ntawm pawg thawj coj saib thiab tseem rau txhua qhov diode anode tsis tu ncua. Yog tias koj tseem xav ua tus cais diode board, ua kev sib txuas ntawm diode cathodes thiab 10kOhm resistors.

Cov xov hlau los ntawm diode anodes yuav mus rau Arduino cov txiaj ntsig.

Kauj Ruam 2: Ua Lub Thawv

Ua Lub Thawv
Ua Lub Thawv

Tom qab ua lub rooj tsav xwm LED ntawm peb lub moos, peb yuav tsum xaiv lub ntim rau nws. Kuv xaiv lub thawv me me hniav nyiaj hniav kub. Qhov tseeb kuv tau xaiv lub npov ua ntej thiab ua lub rooj tsav xwm LED tom qab ntawd, koj tuaj yeem ua qhov ntawd ib yam.

Koj yuav tsum kos cim txoj haujlwm ntawm LEDs nyob rau ntawm koj lub npov. Koj tuaj yeem xam cov haujlwm lossis koj tuaj yeem siv lwm daim ntawv ntawm perfboard los pab koj. Qhov deb ntawm qhov me me yog 2.54mm, lossis 1/10 nti.

Tom qab khij 18 txoj haujlwm nyob rau ntawm xub ntiag ntawm lub npov, koj yuav tsum tau tho qhov. Kuv tau ua 4mm qhov, yog li cov LEDs tsis ntsia, tab sis koj tuaj yeem ua rau 5mm qhov, yog li cov LEDs tseem yuav pom ntawm sab-saib. Koj kuj yuav tsum tau tho qhov 8mm qhov rau sab nraum qab ntawm lub thawv rau DC txuas.

Koj tuaj yeem siv cov xim lossis cov kua roj vanish ntawm lub thawv ntoo tam sim no. Koj yuav xav tshem lub hinges thiab xauv los ntawm lub thawv ua ntej ntawd. Thaum koj txaus siab rau qhov zoo li, ntsia hlau rov qab thiab lub xauv.

Kauj Ruam 3: Txuas Yam Ntxiv

Koj yuav xav tau ob peb lub xov hlau thiab qee qhov txuas rau theem no.

Koj yuav tsum txuas DC txuas rau Arduino VIN thiab GND. Yog tias koj yuav siv lub zog 5V ruaj khov koj tuaj yeem txuas nws mus rau Arduino 5V hloov VIN.

RTC module muaj 4 tus pin: GND, 5V, SDA thiab SCL. Txuas GND thiab 5V rau Arduino GND thiab 5V. Txuas SDA rau Arduino A4 thiab SCL rau Arduino A5. Yog tias koj siv lwm lub microcontroller, nco ntsoov xyuas I2C tus pin.

Txuas lub rooj tsav xwm LED VCC mus rau 5V lossis 3.3V thiab GND rau Arduino GND. Txuas cov anodes ntawm diodes raws li hauv qab no:

H1 D0H2 D1H4 D2H8 D3

M10 D4M20 D5M40 D6

M1 D7M2 D8M4 D9M8 D10

S10 D11S20 D12S40 D13

S1 A0S2 A1S4 A2S8 A3

H1 txhais tau tias tsawg kawg qhov tseem ceeb ntawm kab teev. Nws yog lub hauv qab sab laug LED. S8 sawv cev rau 8 vib nas this, qhov no yog sab xis saum toj kawg nkaus LED.

Kauj ruam 4: Programming

Ua ntej rub tawm ib yam dab tsi, koj yuav tsum rub lub tsev qiv ntawv RTC thiab kuv cov program code. Tom qab rub tawm txav RTC lub tsev qiv ntawv mus rau Arduino cov tsev qiv ntawv nplaub tshev thiab txoj haujlwm rau koj cov phiaj xwm phiaj xwm. Koj yuav tsum pib lossis rov pib dua IDE tom qab qhov no.

Ua ntej xa kuv cov lej program, peb yuav tsum sau cov ntaub ntawv raug lub sijhawm rau hauv RTC nti. Nco ntsoov kom tau them lub roj teeb ua ntej ua qhov no. Qhib qhov "Teeb sijhawm thiab tso saib" piv txwv los ntawm RTC lub tsev qiv ntawv. Ua kom tiav qhov tseeb lub sijhawm. Peb tsis tshua mob siab txog hnub tim, koj tuaj yeem tso nws raws li nws yog, lossis tej zaum sau qhov ntawd ib yam. Lub sijhawm muaj txiaj ntsig yuav raug sau rau RTC nti thaum peb tso cov cai thiab peb Arduino pib. Nws yog ib qho tseem ceeb kom tsis txhob rov pib dua tus tswj. Tsis tas li koj tuaj yeem teem sijhawm ib feeb ua ntej, yog li koj lub moos yuav tsis ncua nrog lub sijhawm rub tawm thiab pib lub sijhawm.

Nco ntsoov xaiv txoj cai chaw nres nkoj thiab hom board ua ntej tsoo lub pob upload.

Tom qab xa cov piv txwv RTC, koj yuav tsum xa kuv daim duab tsis ntsaws tawm ntawm Arduino, vim txhua qhov rov pib dua yuav teeb tsa lub sijhawm muab hauv qhov piv txwv. Thaum koj upload kuv qhov program, lub sijhawm yuav tsum tshwm ntawm LEDs. Txheeb xyuas tias txhua yam ua haujlwm raug (nws yuav tsum). Yog tias txhua yam zoo, koj tuaj yeem pib muab txhua yam ua ke.

Kauj Ruam 5: Ua Kom tiav

Image
Image
Ua kom tiav
Ua kom tiav
Ua kom tiav
Ua kom tiav

Thaum koj txuas koj Arduino, lub moos yuav tsis hnov qab lub sijhawm kom txog thaum lub roj teeb ntawm RTC tsis muaj zog. Tam sim no koj tuaj yeem ruaj ntseg txhua yam hauv qhov chaw. Siv cov kua nplaum kub, epoxy, daim kab xev ob tog, ntsia hlau, ntsia liaj qhov rooj lossis txhua yam uas koj xav tau.

Txuas koj lub moos rau 12V (lossis qhov hluav taws xob koj siv) thiab saib nws thiab nyiam nws. Kuv kuj tau ntxiv txheej refractive los ntawm tus saib ntawm sab xub ntiag, yog li qhov zoo li zoo dua. Koj tseem tuaj yeem ntxiv ib daim ntawv, lossis qee yam kom ua tiav qhov pom kev sib txawv. Thov qhia rau kuv koj lub tswv yim.

Kuv vam tias koj nyiam cov lus qhia no, thiab tej zaum qee tus neeg yuav pom nws muaj txiaj ntsig. Xav tias dawb nug cov lus nug hauv cov lus. Cov lus qhia no yog rau Kev Sib Tw Xim ntawm Zaj sawv nrog nws cov xim xiav zoo nkauj.

Pom zoo: