Cov txheej txheem:

Smartphone Controlled Infinite Clock: 5 Kauj Ruam (nrog Duab)
Smartphone Controlled Infinite Clock: 5 Kauj Ruam (nrog Duab)

Video: Smartphone Controlled Infinite Clock: 5 Kauj Ruam (nrog Duab)

Video: Smartphone Controlled Infinite Clock: 5 Kauj Ruam (nrog Duab)
Video: Lil Nas X, Jack Harlow - INDUSTRY BABY (Official Video) 2024, Hlis ntuj nqeg
Anonim
Image
Image
Smartphone Tswj Infinite Clock
Smartphone Tswj Infinite Clock
Smartphone Tswj Infinite Clock
Smartphone Tswj Infinite Clock

Kuv tau pom ntau txoj haujlwm ntawm Infinity Mirrors thiab Infinity Clocks ntawm Cov Lus Qhia, yog li kuv txiav txim siab ua kuv li. Nws yuav tsis txawv ntawm lwm qhov … tab sis kuv tau ua nws tus kheej, yog li nws yog!

Duab
Duab

Yog koj tsis paub nws twb:

Dab tsi yog lub moos infinity?

Lub moos tsis muaj qhov kawg siv ntau qhov kev xav ntawm daim iav thiab ib daim iav tsom iav los muab qhov ua tsis tau zoo ntawm qhov tob thaum nws tsuas yog ib centimeter tob!

Lub sijhawm tau qhia los ntawm LEDs uas cuam tshuam ntau zaus ntawm cov kev cuam tshuam no thiab muab qhov kev xav ntawm qhov tob.

Duab
Duab

Ntau qhov kev xav tau muab lub tswv yim ntawm qhov tob

Cov LEDs yog qhov chaw nyob thiab muaj ntau xim, yog li nws yooj yim siv lawv los ua lub teeb pom kev zoo.

Kuv xav ua kom nws sib tham sib thiab hloov pauv, yog li kuv ntxiv Smartphone tswj siv Bluetooth kev sib txuas lus. Muaj tiag ob txoj hauv kev sib txuas lus ntawm lub moos thiab lub xov tooj ntawm tes. Tus neeg siv tuaj yeem siv HMI (Tib Neeg Lub Tshuab Sib Txuas) los hloov ntau yam tsis xws li cov duab, xim. Tab sis nws kuj tseem tuaj yeem xa cov lus txib ncaj qha piv txwv los hloov lub sijhawm, thiab lub moos cov lus teb hais tias cov lus txib tau txais lossis tsis yog.

HMI tau ua tiav siv cov programmable Android app, yog li kuv tsuas yog yuav tsum tsim nws thiab sau cov kev sib txuas lus ntawm sab Arduino.

Duab
Duab

Cia peb pib tam sim no …

Kauj Ruam 1: Koj Xav Tau Dab Tsi?

Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?
Koj Xav Tau Dab Tsi?

Txhawm rau tsim lub moos infinity no, ntawm no yog yam koj xav tau (tus nqi yog qhov qhia tau):

  • Ib qho Arduino nano (2 USD)
  • Ib txoj kab lus coj los hais, xws li WS2812 leds, 60 leds ib 'meter' (6 USD)
  • Ib lub bluetooth module, xws li HC-05 (3 USD)
  • Ib daim ntawv qhia zaub mov (1.5 USD)
  • 5V khoom, tuaj yeem xa 4A lossis ntau dua
  • Ob peb cov xov hluav taws xob
  • Lub xov tooj siv Android, thiab Bluetooth Electronics app, los ntawm KeuwlSoft
  • Qee daim ntawm Medium-density fibreboard (MDF, ib qho 3mm tuab thiab ib qho 10 mm tuab)
  • Pob tshab plexiglas lossis phaj perspex (ib puag ncig 15 txog 20 USD)
  • Daim iav thiab ib daim iav tsom iav tsom iav (los ntawm 4 txog 15 USD)
  • Connectors, resistors thiab ib 1000µF capacitance
  • Qee cov kua nplaum thiab kab xev.
Duab
Duab

Daim duab ntawm lub hauv paus ntsiab lus ntawm lub moos geometry

Plexi phaj yuav tsum yog 2 txog 3 hli tuab yog li nws nyob ruaj khov hauv qhov chaw thaum siv.

Daim duab saum toj no piav qhia lub geometry ntawm lub moos. Cov hlua coj tau muab tso rau nruab nrab ntawm ob daim iav. Tau kawg, koj xav tau 60 ntawm cov leds ntawm kab txaij. Koj tuaj yeem pom cov kab ntawv coj hauv online nrog 60 leds ib 'meter', yog li ib qho ntawm qhov zoo. Tom qab ntawd ib puag ncig ntawm lub voj voog coj yog 1m, nws txoj kab uas hla yog 100/PI = 31.8 cm (kwv yees li 12.53 ntiv tes).

Npaj koj cov khoom

Txiav lub voj voog ntawm txoj kab uas hla no hauv 3mm MDF board. Txhawm rau ua qhov no, kuv tau mus rau hauv fablab hauv zos thiab thov kom siv lub tshuab txiav laser. Lawv tuaj yeem ua nws rau koj, yog tias koj thov ua siab zoo thiab koj tuaj nrog lub rooj tsavxwm: nws tsuas yog siv ob peb feeb xwb. Thaum koj nyob ntawd, txiav tib lub disc hauv koj lub phaj plexiglass.

Los ntawm MDF phaj, tam sim no koj muaj lub disc thiab phaj nrog lub qhov ncig. Khaws ob qho tib si rau tom qab.

Txhawm rau kom cov LED nyob hauv qhov chaw, txiav ib qho hauv 1cm tuab MDF ib lub tog raj kheej nyias ntawm tib txoj kab uas hla. Lub thickness tsis tseem ceeb tsuav nws tsis tawg yooj yim. Cov hlua LED yuav muab tso rau sab hauv lub tog raj kheej no, yog li nws yog qhov tseem ceeb uas sab hauv ib puag ncig zoo ib yam li qhov ntev ntawm kab txaij. Ntev dhau los lossis luv dhau, thiab qee lub leds tuaj yeem sib txawv tsis xwm yeem, yog li ua qhov tseeb ntawm no.

Txiav cov phaj tuab no yuav siv sijhawm ntev me ntsis dua li txiav cov nyias nyias. Nug tus tswv tsev fablab yog tias lawv lub tshuab txiav laser muaj zog txaus los txiav qhov tuab ntawd. Rau kuv, lub laser yuav tsum hla ntau dua kaum zaug rau qhov ntawd, piv rau tsuas yog ob qho rau lwm lub phaj.

Koj tseem tuaj yeem…

Nws kuj tseem tuaj yeem siv pob tshab lossis xim plexiglass laug cam ntawm no hloov ntawm MDF. Plexiglas muaj nyob hauv ntau yam xim, los ntawm dub rau daj rau ntsuab thiab ntshav, yog li tsis txhob maj sim lawv.

Duab
Duab

Fablab paub yuav txiav lawv li cas, thiab txiav plexiglass yog "huv" heev piv rau ntoo uas tuaj yeem "hlawv" (Kuv txhais tau tias hloov xim vim yog lub zog laser) ntawm txoj kev laser. Daim iav plexiglass kuj tseem muaj, uas tuaj yeem txuag koj los ntawm kev yuav daim iav iav. Tsuas yog nco ntsoov thaum txiav nws, kom xa lub laser nyob tom qab ntawm daim iav …

Hauv qab no yog cov duab geometry rau kev txiav laser.

Kauj Ruam 2: Sib Sau Sijhawm

Sib Sau Clock
Sib Sau Clock
Sib Sau Clock
Sib Sau Clock
Sib Sau Clock
Sib Sau Clock
Sib Sau Clock
Sib Sau Clock

Txhawm rau ua lub moos, koj tsuas yog yuav tsum sib sau ua ke, raws li cov txheej txheem.

Npaj rooj plaub

Ua ntej tshaj, lo daim iav zaj duab xis ntawm MDF disc. Nws yuav yog hauv qab ntawm lub moos.

Qhov thib ob, lo zaj duab xis ib nrab pob tshab ntawm daim plexiglas disc. Qhov no yog daim iav ntawm lub moos. Cov ntawv no yuav muab ntxig rau hauv MDF phaj, hauv lub voj voos: ua kua nplaum siv ntoo ua kua yog tias tsim nyog, lossis siv roj hmab silicone.

Thaum kawg, npaj cov LEDs. WS2812 LEDs siv 3 cov ntawv sib txuas: cov khoom siv hluav taws xob, hauv av thiab hais kom ua. Yog tias twb muaj 3 lub xov tooj hluav taws xob txuas nrog, tsuas yog siv lawv. Txwv tsis pub siv 3 lub xov hlau rau cov ntawv sib txuas. Nco ntsoov tias LEDs yog cov khoom siv polarized: qhov no txhais tau tias cov dej ntws tam sim no hauv ib qho nkaus xwb. Qhov kev taw qhia no tau qhia ntawm kab txaij nrog tus xub. Tom qab ntawd, koj yuav tsum muab cov xov hlau tso rau ntawm qhov kawg ntawm txoj hlua los ntawm qhov xub xub tuaj (tsis yog qhov kawg uas tus xub taw qhia).

Khaws cov LEDs sab hauv lub tog MDF tuab thiab sib sau ua 3 ntu, nrog kua nplaum thiab / lossis kab xev.

Duab
Duab

Tom qab ntawd cov khoom siv hluav taws xob

Muab cov Arduino tso rau hauv lub khob cij thiab tsim lub voj voog raws li qhia saum toj no. Xyuas kom txhua thaj chaw (GND) txuas nrog (GND los ntawm Arduino, HC-05 module, LED sawb thiab khoom siv).

  • RX thiab TX pins ntawm HC-05 Bluetooth module txuas nrog tus pin D3 thiab D2 ntawm Arduino
  • Cov ntaub ntawv kab ntawm LED sawb txuas nrog tus pin D12, koj tuaj yeem ntxig rau 300 Ohms resistor nyob nruab nrab yog tias koj muaj.

Yog tias koj xav hloov tus pin, hloov lawv cov lus txhais hauv txoj cai (kab 7 thiab 13 ntawm cov ntaub ntawv ino).

Nco ntsoov tias HC-05 tus qauv xav tau kev faib hluav taws xob rau nws RX tus pin, raws li qhia hauv qab no. Yog li koj xav tau ib qho 1000 Ohms thiab ib qho 2000 Ohms resistors.

Duab
Duab

Cov khoom siv yog siv ob qho tib si rau Arduino thiab LED sawb. Ua ntej txuas lub 1000µF capacitor hauv lub dav hlau ntsia hlau (domino). Koj tuaj yeem siv txuas nrawm yog tias koj muaj qee yam. Saib ntawm no kom paub meej ntxiv.

Duab
Duab

Lub tshuab hluav taws xob no kuj tseem tuaj yeem sib txawv: xyuas kom tseeb tias + thiab - ob txhais ceg txuas nrog rau + thiab - ntawm cov khoom siv. Raws li tuaj yeem pom ntawm daim duab ntawm lub capacitor, tus - txhais ceg tau sau nrog lub cim rho tawm loj.

Duab
Duab

Tom qab ntawd los ntawm qhov txuas, ntsaws cov xov hluav taws xob txuas rau LED Sawb thiab Arduino board. Raws li tau hais los saum no, txhua GND yuav tsum txuas nrog ua ke. Los ntawm qhov muaj peev xwm zoo ntawm cov khoom siv, txuas 5V xaim ntawm kab txaij thiab kos cov xaim rau 5V tus pin ntawm Arduino: tso nws tsis txuas rau lub sijhawm no, koj yuav txuas nws thaum kawg.

Txheeb txhua yam… ob zaug

Txheeb xyuas txhua qhov kev sib txuas ob zaug … Siv lub multimeter yog tias koj muaj ib qho los tshuaj xyuas hluav taws xob txuas ntxiv.

Yog tias txhua yam raug, koj lub moos yuav luag npaj txhij. Tsis txhob muab nws rau tam sim no.

Kauj ruam 3: Upload Code

Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai
Rub tawm Txoj Cai

Cia qhov program

Txhawm rau upload cov cai hauv Arduino nano, siv Arduino IDE. Muab tag nrho cov ntaub ntawv tso rau hauv daim nplaub tshev hu ua "Horloge_LED3_nano_BTOK" hauv koj daim ntawv Arduino. Qhib IDE, xaiv qhov tsis tsim nyog (hom pawg thawj coj, COM chaw nres nkoj, thiab lwm yam) thiab nyem lub pob upload.

Duab
Duab

Ntawm koj lub xov tooj Android, teeb tsa Bluetooth Electronics daim ntawv thov, koj tuaj yeem pom nws yooj yim hauv Google Ua Si. Rub tawm cov ntawv "BluetoothElectronicsCode.txt" los ntawm Cov Lus Qhia no, thiab hloov qhov txuas ntxiv mus rau zip: koj yuav tau txais tus lej zip nrog cov cai rau lub xov tooj ntawm tes kom ua haujlwm nrog Bluetooth Electronics.

Thaum koj npaj txhij, ntsaws cov khoom siv. Cov LEDs yuav ci ntsa iab, HC-05 tus qauv tseem yuav ua kom pom qhov kev sib txuas. Tua tawm Android app thiab ua raws cov lus qhia los ua ke Bluetooth module nrog koj lub xov tooj. Thaum npaj txhij, tso HMI: koj npaj ua si!

Nco ntsoov tias…

Thawj LED ntawm kab txaij yuav tsum muab tso rau saum lub moos. Yog tias koj tsis tso nws rau qhov ntawd, koj tuaj yeem hloov pauv qhov ntsuas qhov ntsuas hauv tus lej (kab 65 ntawm cov ntaub ntawv ino). Nws saib xyuas qhov ntawd.

Thaum koj glued LED Sawb sab hauv lub tog raj kheej ntiav, muaj 2 qhov kev xaiv: tog twg los sawb tig raws lub moos, lossis tiv thaiv-clockwise. Yog tias koj ua nws tsis raug, lub moos txhais tes yuav tig mus rau qhov tsis raug! Tsis txhawj xeeb. Tsuas yog hloov tus nqi ntawm cov boolean kuj txawv txav sens_horaire kom muaj tseeb (kab 77 ntawm cov ntaub ntawv ino)

Duab
Duab

Kauj ruam 4: Txaus siab rau

Txaus siab rau!
Txaus siab rau!
Txaus siab rau!
Txaus siab rau!
Txaus siab rau!
Txaus siab rau!

Ib qhov chaw kawg…

Tam sim no, teem sijhawm. Qhov no tuaj yeem ua tiav siv cov lus txib yooj yim uas koj ntaus hauv lub console me me nyob hauv qab sab laug ntawm HMI.

  • Hxx: teev teev rau xx (ex: H4)
  • Myy: teeb tsa feeb (ex: M15)
  • Szz: teeb tsa cov vib nas this (piv txwv: S30)

Cov lus txib tuaj yeem raug kaw los ntawm kev tso lub hnub qub nruab nrab ntawm lawv, piv txwv: H4*M15*S35

Teeb teev thiab / lossis feeb yuav rov pib lub vib nas this rau xoom.

Koj yuav pom tias teev teev los ntawm RED LED, feeb los ntawm GREEN LED:

Duab
Duab

Nws yog 9:52:00!

Cov xim ntawm cov vib nas this tuaj yeem hloov pauv siv tus swb ntawm HMI

Duab
Duab

Thaum koj txav tus slider, lub voj voos me me ntawm sab xis qhia qhov xim tam sim no. Thaum tus slider nres, nws xa cov xim rau lub moos thiab LED ntawm lub vib nas this hloov pauv raws li.

KEV POM ZOO thiab PALETTE tuaj yeem siv los xaiv thiab kho lub teeb pom kev zoo ntawm lub moos. Kuaj lawv, thiab saib cov vis dis aus rau qee qhov piv txwv. Thaum koj hloov qee qhov chaw ntawm HMI, lub console me me qhia cov lus teb los ntawm Arduino.

Cov duab…

  • 0: Tsuas yog qhia lub sijhawm, koj tuaj yeem hloov xim ntawm cov vib nas this siv tus swb.
  • 1: Cov xim tom qab (koj tuaj yeem hloov xim) ntawm qhov sib txawv ntawm qhov sib txawv.
  • 2: Hloov zaj sawv
  • 3: Ib pawg xim (uas tuaj yeem hloov pauv) uas ua rau tig ib zaug thib ob.
  • 4: Ib daim kab xev xim uas tawm ntawm ob txhais tes.
  • 5: Cov xim tom qab (koj tuaj yeem hloov lub palette) ntawm qhov dav dav.
  • 6: Tsuas yog qhia lub sijhawm, txhais tes thib ob hloov pauv nws lub suab nrov.
  • 7: Hloov tus chij (hloov lub palette los hloov tus chij ntawm 4 qhov ua tau)
Duab
Duab

Tus chij Fab Kis - nws yog 7:11:51

Lwm qhov kev ua yeeb yaj kiab tsis ntev los no tau ntxiv, uas hloov pauv txhua 15 vib nas this rau kev xaiv ua yeeb yaj kiab tsis raug.

Lub MINUTES khawm hloov thiab tawm dawb LEDs ntawm txhua 5 feeb ntawm lub moos.

Duab
Duab

Nws yog 7:11:25

Nco ntsoov tias cov vis dis aus thiab duab tau ua nrog lub smartphone thiab yog li ntawd tsis zoo. Cov xim tau ci dua thiab raug dua ntawm lub moos tshaj qhov lawv zoo li hauv video…

Dab tsi ntxiv?

Kuv vam tias koj yuav nyiam ua lub moos infinity no. Muaj ntau qhov tseem tshuav los ua: koj tuaj yeem pleev xim rau MDF pem hauv ntej phaj kom nws zoo dua, ntxiv lwm txoj hlua coj ntawm sab nraud ntawm lub tog raj kheej kom muaj qee lub teeb pom kev tso rau ntawm phab ntsa ib yam, thiab lwm yam.

Duab
Duab

Kauj Ruam 5: Hloov Kho Tshiab kom Ncua Sijhawm

Arduino nano lub moos nyhav zuj zus hauv lub sijhawm, vim nws tsis muaj lub moos raug. Kuv tau ua lwm qhov kev siv Lub Sijhawm Tiag (RTC) kom ua lub sijhawm raug.

RTC muaj nyob hauv ntau tus qauv, Kuv pom zoo siv DS3231 tus qauv, uas yog qhov raug (piv rau DS1307). Qhov khoos kas tshiab no siv MD-DS3231 lub tsev qiv ntawv, muaj nyob ntawm no. Tsuas yog tsim daim nplaub tshev tshiab hu ua Horloge_LED3_nano_BT_RTC hauv koj daim ntawv Arduino, thiab rub tag nrho cov ntaub ntawv.

Txuas DS3231 ua I2C ntaus ntawv, xws li SDA rau A4 thiab SCL (lossis SCK) rau A5

Ua ntej tshaj, koj yuav tsum teev sijhawm RTC. Saib ua piv txwv Cov Lus Qhia no lossis cov lus qhia no.

Upload Horloge_LED3_nano_BT_RTC.ino cov ntaub ntawv ntawm koj Arduino nano thiab khiav nws. Lub sijhawm rov ua dua tshiab txhua 30 feeb, yog li lub moos tseem raug txhua lub sijhawm.

Tau kawg, koj yuav tsum muaj lub roj teeb ntawm RTC module, vim nws ua rau RTC muaj txoj sia nyob txawm tias nws tsis muab los ntawm Arduino, thiab nws tuaj yeem khaws lub sijhawm raug.

Pom zoo: