Cov txheej txheem:

LED Pendant Los Ntawm Cov Qub Qub Tsav Tsheb: 11 Kauj Ruam
LED Pendant Los Ntawm Cov Qub Qub Tsav Tsheb: 11 Kauj Ruam

Video: LED Pendant Los Ntawm Cov Qub Qub Tsav Tsheb: 11 Kauj Ruam

Video: LED Pendant Los Ntawm Cov Qub Qub Tsav Tsheb: 11 Kauj Ruam
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Kaum ib hlis
Anonim
LED Pendant Los Ntawm Cov Qub Qub Tsav
LED Pendant Los Ntawm Cov Qub Qub Tsav
LED Pendant Los Ntawm Cov Qub Qub Tsav
LED Pendant Los Ntawm Cov Qub Qub Tsav

Hauv Cov Lus Qhia no, Kuv yuav qhia koj yuav ua li cas koj tuaj yeem ua ib qho-ntawm-ib-yam-zoo-teeb saw caj dab los ntawm lub lens sib dhos ntawm lub khoos phis tawj qub qub, ntxiv rau ob peb yam khoom siv hluav taws xob ntxiv.

Kuv tau txais kev tshoov siab kom ua qhov no rau kuv tus ntxhais thaum kuv sib cais daim CD qub qub thiab pom qhov txias ntawm lub lens sib dhos zoo li cas. Kuv paub nws yuav ua kom zoo "techy" saw caj dab yog tias kuv tsuas tuaj yeem nrhiav txoj hauv kev ntim cov microcontroller thiab thiab LED nyob ntawd. Kuv xav tias qhov txiaj ntsig kawg yog qhov khoom zoo nkauj tshwj xeeb ntawm geek nqaij.

Ua ntej pib ntawm Cov Lus Qhia no, koj yuav xav kom ntseeg tau tias koj muaj kev ua haujlwm txhim kho Arduino ib puag ncig thiab tuaj yeem tsom thiab phiaj xwm ATtiny AVR microcontrollers. Muaj ob peb Phau Ntawv Qhia Pab Tau Zoo nyob rau ntawm qhov chaw no kom koj mus, suav nrog qhov no:

Qhov no tseem yuav cuam tshuam nrog qee qhov kev ua kom zoo nkauj me me ntawm qhov me me, yog li txhuam koj li kev txawj ntse.

Yog tias koj npaj txhij mus txuas ntxiv, txheeb xyuas cov npe khoom thiab cia peb mus!

Khoom siv

Ib lossis ntau lub khoos phis tawj qub qub (nyiam dua CD tsav - DVD lossis BluRay tsav kuj tseem ua haujlwm, tab sis peb tsis yog neeg siab phem).

Ib sab saum toj ATtiny85 (8-pin SOIC pob).

Zero-ntxig zog (ZIF) 8-pin SOIC rau DIP adapter.

Roj teeb CR2032.

Lub roj teeb CR2032 (Kuv pom hom ntsug zoo tshaj rau txoj haujlwm no).

Tus txheej txheem hloov tactile.

Ib sab saum toj LED (qhov loj 5050 ua haujlwm zoo). Liab yuav ua haujlwm zoo tshaj plaws, tab sis kuv kuj tau siv ntsuab thiab xiav.

Ib qho tooj dag thiab tooj liab.

Ib co xaim.

Super kua nplaum.

Qee tus tweezers, txhais tes khov kho, thiab qab haus huv ntawm cov hlau.

(tsis teb los tau) breadboard thiab xov hlau rau kev tsim qauv

(xaiv tau) 5mm LED rau kev tsim qauv

Kauj Ruam 1: Sib nrug ntawm CD Drive

Tshem tawm CD Drive
Tshem tawm CD Drive
Tshem tawm CD Drive
Tshem tawm CD Drive
Tshem tawm CD Drive
Tshem tawm CD Drive

Kev kho qhov muag qub yog cov khoom muaj nqis ntawm cov phiaj xwm qhov project, tab sis, rau tam sim no, peb tsuas yog txaus siab rau kev teeb tsa lub lens.

Sib cais CD tsav thiab pom lub lens sib dhos. Nws yuav yog ib feem ntawm cov txheej txheem uas nyeem los ntawm CD. Lub tshuab tsav feem ntau muaj ob peb lub tshuab tsav CD thiab txav lub lens.

Kev tshem lub rooj sib dhos lens yuav siv sijhawm me ntsis, tab sis nws tsis nyuaj heev. Sawb tawm ntau npaum li cov khoom siv hluav taws xob uas koj tuaj yeem ua yam tsis muaj kev rhuav tshem cov qauv ntawm lub lens sib dhos. Yam tsawg kawg, koj xav tshem qhov chaw tom qab lub lens nws tus kheej. Nov yog qhov chaw uas peb lub voj voog yuav mus.

Kuv nyiam txoj kev zoo li no, uas yog qhov uas muab kuv lub tswv yim rau txoj haujlwm no ua ntej. Yog li futuristic thiab techy, nws txaus!

Kauj Ruam 2: Nkag Siab / Hloov Kho Txoj Haujlwm

ATtiny85 microcontroller yuav yog lub hlwb tom qab lub caj dab, tab sis ua ntej, nws yuav tsum tau programmed.

Kuv tau txuas qhov program kuv tau sau los ua kom pom txoj hlua saw caj dab. Muaj ob daim ntawv: kos duab nws tus kheej thiab cov ntawv teev cov teeb ua ntu ntu lub pendant yuav ua haujlwm dhau los. Kuv tau sim tawm tswv yim txog cov cai, tab sis nws tej zaum tseem xav tau qee yam haujlwm.

Lub pendant yog tswj los ntawm tus tes hloov qhov. Thaum qhov hloov pauv raug thawb, nws ua rau ATtiny85 rov pib dua, uas nws ua raws li kev nkag. Ib lub laub qhia lub pendant kom tig mus rau ntu ntu LED tom ntej. Ob qhov thawb tsis pub dhau ib lo lus txib ATTiny85 kom tsis txhob ci ntsa iab hauv koj lub ntsej muag thiab tsuas yog mus pw. Nws tseem yuav cia li tsaug zog tom qab 10 feeb kom txuag lub roj teeb.

Koj tuaj yeem ntxiv, hloov pauv, lossis tshem tawm cov kab lus LED los ntawm kev hloov kho cov ntawv txuas ntxiv.h. Kuv tau sim ua kom pom tseeb ntxiv ntu tshiab.

Kauj Ruam 3: Program ATtiny85

Program ATtiny85
Program ATtiny85
Program ATtiny85
Program ATtiny85

Ua ntej txav mus rau tom ntej, cia peb tau txais qhov program rub tawm ntawm ATtiny85. Koj yuav xav tau lub khoos phis tawj muaj peev xwm ua haujlwm nrog ATtiny85 teeb tsa thiab npaj mus. Ua kom tiav cov lus qhia nyob sab nraum qhov kev qhia no, tab sis kuv yuav rov qhia koj ntawm no:

Tshwj tsis yog koj lub khoos phis tawj kho vajtse txhawb nqa SOIC pob, koj tseem yuav xav tau koj li 8-pin SOIC rau 8-pin DIP adapter. Kuv tsis nco qab qhov kuv yuav kuv qhov twg, tab sis kev tshawb nrhiav nrawm rau "8 tus pin soic to dip adapter zif" yuav tsum tau txais koj qhov twg koj yuav tsum mus.

Lub cajmeem nws tus kheej zoo nkauj ncaj nraim rau:

Rub tawm ob daim ntawv txuas (LED_pendant.ino thiab sequences.h) rau hauv koj daim ntawv Arduino kos duab, hauv daim nplaub tshev npe "LED_pendant" thiab qhib qhov haujlwm hauv Arduino IDE

Txhim kho Arduino IDE rau ATtiny85 thiab koj cov programmer xaiv

Nco ntsoov tias IDE tau teeb tsa los teeb tsa ATtiny85 kom siv nws 8MHz moos sab hauv

Siv 8-tus pin SOIC adapter txhawm rau ntsaws koj ATtiny85 rau hauv koj tus programmer

Hlawv lub bootloader rau lub nti. Tsis txhob hnov qab qhov no, lossis koj lub moos moos nrawm yuav qeeb dhau thiab koj lub teeb ua ntu zus yuav tsis ua haujlwm raug (lub suab ntawm kev paub? Yog)

Thaum kawg, rub qhov program rau koj lub nti

Kauj Ruam 4: Breadboard Koj Lub Circuit (xaiv tau)

Breadboard Koj Lub Vaj Tsev (xaiv tau)
Breadboard Koj Lub Vaj Tsev (xaiv tau)
Breadboard Koj Lub Vaj Tsev (xaiv tau)
Breadboard Koj Lub Vaj Tsev (xaiv tau)

Nws ib txwm yog lub tswv yim zoo rau breadboard ib lub Circuit Court ua ntej koj tawm ntawm cov laug thiab ua kom raug. Nws yog lub tswv yim zoo tshwj xeeb hauv qhov no, txij li koj yuav tsis tuaj yeem rov sau dua ATtiny85 yog tias koj paub tias koj tau ua yuam kev (dua, qhov no yog lub suab ntawm kev tham).

Koj lub SOIC rau DIP adapter yuav tsum tso cai rau koj ntsaws koj ATtiny85 ncaj qha rau koj lub khob cij. Thaum koj tau ua cov kev sib txuas uas tau qhia hauv kab thaiv thiab daim duab qhia chaw, LED yuav tsum teeb. Cov ntu yuav tsum hloov pauv nrog ib lub pob nyem, thiab LED yuav tsum tua tom qab ob npaug nias.

Yog tias nws ua haujlwm, koj npaj txhij mus txuas ntxiv!

Kauj Ruam 5: Npaj Tsim Lub Circuit Court

Npaj los Ua Tus Circuit
Npaj los Ua Tus Circuit
Npaj los Ua Tus Circuit
Npaj los Ua Tus Circuit

Daim duab kab hluav taws xob txuas nrog qhia pom tias yooj yim npaum li cas hauv Circuit no. Qhov nyuaj los vim txhua yam me me.

Txhawm rau txuag chaw, peb yuav txuas peb cov khoom sib koom ua ke yam tsis siv lub rooj tsav xwm hauv Circuit Court. Hloov chaw, txhua yam yuav tuav ua ke nrog cov laug, kua nplaum, thiab kev hlub.

Pib los ntawm kev ua tib zoo khoov tus pin ntawm ATtiny85 nqes ib puag ncig "plab" ntawm lub nti. Lawv tsis tas yuav khoov dhau, lawv tsuas yog yuav tsum tau rub tawm ntawm txoj kev me ntsis.

Kauj Ruam 6: Kaw cov LED mus rau ATtiny85

Kaw cov LED rau ATtiny85
Kaw cov LED rau ATtiny85

Ntxiv qhov poob ntawm superglue rau hauv plab (hauv qab) ntawm ATtiny85. Qhov no yuav tuav LED nyob rau hauv qhov chaw.

Siv sijhawm me ntsis los tshuaj xyuas qhov kev taw qhia ntawm LED hauv kev cuam tshuam nrog lub nti vim tias koj tsuas yog txhaj ib zaug ntawm qhov no. Nws yuav siv sijhawm me ntsis los xav txog yuav ua li cas rau nws, tab sis tsis muaj qhov rov qab los. Xyuas kom tseeb tias tus pin zoo ntawm LED nyob ze rau ntawm 8 ntawm lub nti thiab tus pin tsis zoo ntawm LED nyob ze rau tus pin 5.

Siv koj tus tweezers kom tau LED nyob rau hauv txoj haujlwm thiab sim tsis lo koj tus kheej rau lub nti (lub suab ntawm kev paub dua)!

Koj yuav pom tias kuv tau siv RGB LED ntawm no, vim tias yog txhua yam kuv muaj. Kuv tsuas yog siv qhov ntsuab xwb. Tej zaum yuav yog qhov nyuaj rau kev sim siv tag nrho peb xim…

Kauj Ruam 7: Kaw Cov Tactile Hloov mus rau ATtiny85

Kaw cov Tactile Hloov mus rau ATtiny85
Kaw cov Tactile Hloov mus rau ATtiny85
Kaw cov Tactile Hloov mus rau ATtiny85
Kaw cov Tactile Hloov mus rau ATtiny85
Kua Tactile Hloov mus rau ATtiny85
Kua Tactile Hloov mus rau ATtiny85

Qhov kev hloov pauv tau yooj yim yuav tau ua rau sab nraud ntawm ATtiny85 txhawm rau muab cov tswv yim.

Nws txuas nrog RESET tus pin thiab hauv av kom lub nti tau rov pib dua thaum twg hloov pauv. Qhov kev zov me nyuam siv cov phiaj xwm no hloov pauv LED ua ntu zus lossis ua kom lub zog nws tus kheej nqes thaum hais kom ua.

Tus txheej txheem hloov pauv tau yooj yim muaj plaub tus pin, uas yog ob khub ntawm tus pin txuas. Kuv tau sim taw tes tawm cov khub txuas hauv daim duab txuas.

Ua ntej tshaj, tshem ob lub UNCONNECTED pins los ntawm ib sab ntawm qhov hloov, raws li qhia. Koj tuaj yeem txiav lawv tawm, tab sis nws yooj yim dua kom khoov lawv rov qab mus txog thaum lawv tawm los.

Ua ntej mus txuas ntxiv, txheeb xyuas qhov kev taw qhia ntawm koj ATtiny85. Ob lub pins ntxiv yuav tsum tau nyob ze rau tus pin 1 thiab 4 ntawm lub microcontroller. Siv cov kua nplaum tso kom ruaj ntseg hloov mus rau sab saum toj ntawm ATTin85 (sab nraud los ntawm LED).

Nrog koj zoo siab! Koj tab tom tuav cov khoom sib tw uas yuav yog lub hlwb tom qab lub caj dab!

Kauj Ruam 8: Hloov lub Circuit Court

Solder lub Circuit Court
Solder lub Circuit Court
Solder lub Circuit Court
Solder lub Circuit Court
Solder lub Circuit Court
Solder lub Circuit Court

Nrog txhua yam glued ua ke hauv pob zoo siab me me, koj npaj tau los txuas cov LED thiab hloov mus rau ATtiny85. Nov yog qhov nyuaj tshaj plaws ntawm txoj haujlwm, vim txhua yam me me.

Txhua yam yuav tsum tau ua kab. Cov laug txuas raws li qhia hauv daim duab. Kev pab txhais tes yuav muaj txiaj ntsig ntawm no.

Tus pin zoo ntawm LED yuav tsum tau muab txuas rau tus pin 8 ntawm ATtiny85 (ceev faj kom tsis txhob ua kom sov LED!).

Tus pin tsis zoo ntawm LED yuav tsum tau muab txuas rau tus pin 5 ntawm ATtiny85.

Cov pins ntawm qhov hloov yuav tsum tau muab txuas rau tus pin 1 thiab 4 ntawm ATtiny85. Lawv yuav tsum yooj yim, vim tias lawv yuav nyob ze rau ib leeg.

Cov kab xaim hluav taws xob txuas rau tus pin 4 thiab 8 ntawm ATtiny85. Tawm cov ntev no kom lawv tuaj yeem txiav kom ntev thaum peb txuas lub roj teeb.

Nrog cov xov hluav taws xob txuas nrog, txuas koj lub xov tooj ntawm tes mus rau lub roj teeb kom ntseeg tau tias nws ua haujlwm.

Kauj Ruam 9: Kaw lub Circuit Court mus rau lub rooj sib dhos Lens

Kaw lub Circuit Court mus rau lub rooj sib dhos Lens
Kaw lub Circuit Court mus rau lub rooj sib dhos Lens

Siv qee lub sijhawm los ua haujlwm yuav ua li cas lub Circuit Court yuav haum rau hauv lub lens sib dhos. Nws yog lub voj voog me me, tab sis qhov chaw tseem nyob ntsiag to.

Kuv muaj peev xwm txiav tawm qee cov hlau thiab yas los ua chaw rau hauv Circuit Court thiab xov hlau.

Tam sim no, tsuas yog lo lub Circuit Court rau hauv qhov chaw nrog LED tig mus rau hauv lub lens sib dhos thiab hloov taw tes tawm. Yog tias tsis muaj cov khoom siv txaus rau cov kua nplaum super los ua kom muaj kev sib txuas zoo, sim cov kua nplaum zoo li gel, lossis, yog tias koj ceev faj, cov kua nplaum kub tuaj yeem ua haujlwm ib yam.

Tseem nrog kuv nyob deb? Zoo! Peb yuav luag tiav.

Kauj Ruam 10: Txuas Lub Roj Teeb

Txuas lub Roj Teeb Nrog
Txuas lub Roj Teeb Nrog

Siv lub xaim hluav taws xob txuas rau lub roj teeb (dua, nco ntsoov ua tib zoo mloog rau ntawm no!)

Hauv qhov no, koj yuav tsum muaj lub pendant ua haujlwm tau zoo. Muab lub roj teeb tso thiab cia ci!

Koj tuaj yeem tso lub roj teeb khawm, uas yuav ua haujlwm yog tias koj tau ceev faj nrog nws, lossis txuas nws kom nyab xeeb dua nrog super kua nplaum lossis kua nplaum kub.

Kauj ruam 11: Txaus siab rau

Txaus siab rau!
Txaus siab rau!

Txuas qhov no rau ib txoj saw caj dab thiab nws ua khoom plig zoo tshaj plaws rau qhov tshwj xeeb geek hauv koj lub neej.

Lub roj teeb lub neej ntawm qhov no yuav tsum zoo heev. LED tsis siv lub zog loj heev thiab lub pendant nws tus kheej mus pw tom qab li 10 feeb.

Kuv yuav nyiam saib koj ua. Thov tshaj tawm lawv yog tias koj ua ib qho ntawm koj tus kheej!

Pom zoo: