Cov txheej txheem:

Mini RGB Lub Teeb Cube!: 8 Kauj Ruam
Mini RGB Lub Teeb Cube!: 8 Kauj Ruam

Video: Mini RGB Lub Teeb Cube!: 8 Kauj Ruam

Video: Mini RGB Lub Teeb Cube!: 8 Kauj Ruam
Video: NRG Laser Know How 3W RGB ILDA 30K 3D Laser Beam Light Show Demonstration 2024, Hlis ntuj nqeg
Anonim
Mini RGB Lub Teeb Cube!
Mini RGB Lub Teeb Cube!

Qhov no yog qhov tseem ceeb ntawm Hypnocube, tsis yog ua 64 LEDs, yog li raug nqi tsawg kawg $ 150 los ua, Kuv tau ua qhov me me ntawm 8 LEDs rau qis dua $ 30. Qhov tshwm sim yog 2x2x2 lub voos xwmfab uas txhua lub teeb tuaj yeem tswj tau ntawm nws tus kheej. Kuv tsis paub tseeb pes tsawg xim koj tuaj yeem tau txais los ntawm txhua lub teeb, tab sis kuv tuaj yeem ua 64 zoo yam tsis muaj "kev co" hauv cov xim.https://www.hypnocube.com

Kauj ruam 1: Cov ntaub ntawv

Khoom siv
Khoom siv

Yog, koj yuav tsum tau tsim nrog cov khoom. Txij li nws yog qhov tshiab rau koj, Kuv tau piav qhia txhua yam uas koj xav tau.*Kho vajtse*Soldering Iron (Cov lus qhia zoo xav tau)*Cov laug*Hlau Cutters/Strippers*Legos (Cov txuj ci zoo uas muaj qhov nyob ib sab)*AVR Programmer (Saib Hauv Qab)*Kev ntsuas txuas mus tas li*Qhov chaw*8 RGB LEDs*1 Atiny2313*Cov tiv thaiv*Hlau*Nyuaj Hlau (Yas sib txuas sib txuas)*Txoj hauv kev muab 5v (Wort Wall, roj teeb, tus tswj hwm, thiab lwm yam)*Yeem*Protoboard/ PCB*Breadboard*Xim Txhais Dawb*Programmer*Chaw Nkoj Parallel (Txiv neej, 20 Tus Pin)*20-Pin DIP Qhov (Socket)*Protoboard lossis 20 Pin DIP Breakout Board Yog, koj xav tau Legos. Lawv yog lub luag haujlwm zoo tshaj plaws rau txoj haujlwm no. Yog tias koj tsis tuaj yeem yuav lawv, koj yuav tsum ua tus jig tawm ntawm 2x4. Kuv tau ua AVR programmer zoo ib yam li tau hais hauv Ghetto Programming qhia tau, tshwj tsis yog kuv tawm ntawm lub header pins thiab muab cov xov txuas ncaj qha rau tus pin cov cim. Mus ntsib nws cov lus qhia kom paub nws, thiab ua kom nws ua haujlwm nrog koj lub khoos phis tawm. Hauv qee qhov ntawm kuv cov duab koj tuaj yeem pom Cov Ntawv Nyiaj Stamp yooj yim, tab sis kuv tsuas yog siv nws rau nws 5v lub zog muab khoom, thiab nws lub khob cij. Kuv yuav tag nrho kuv qhov chaw ntawm SparkFun Electronics, thiab kuv zoo siab heev.

Kauj ruam 2: Npaj

Kev npaj
Kev npaj
Kev npaj
Kev npaj
Kev npaj
Kev npaj

Txij li thaum kuv twb tau ua qhov no rau koj, koj tsis tas yuav tsum ua cov kauj ruam no! Cov no tsuas yog qee qhov kev xav ua ntej uas tau mus rau hauv nws.

Txij li thaum kuv RGB LEDs tsis tau daus, thiab cov xim tau "cais", Kuv txiav txim siab pleev xim rau lawv nrog cov xim pleev xim acrylic uas siv ib txwm ua rau qhov ua tiav. Kuv tau muab nws txhuam nrog lwm cov xim uas tau pob tshab thaum qhuav, thiab muaj qhov ci me me rau nws. Qhov txiaj ntsig tau txaus siab heev, zoo li koj tuaj yeem pom nrog thawj ob peb daim duab. Raws li koj tuaj yeem pom hauv "pab pawg" thib ob ntawm cov duab. Thawj yog 4 LEDs hauv kuv Lego Jig. Qhov tseem ceeb, koj xav tau nws kom yog rau qhov ntev txog 6 pob, thiab 3 lub cib thiab 2 daim hlau siab, thiab nws zoo heev ze rau ua ib lub xwmfab. (Nws 0.07 studs tawm, rau koj tus lej freaks) Kuv khoov anodes (cov luv luv) dhau thiab tom qab ntawd muab lawv muag rau tom ntej khoov-dhau anode. Koj tsis tuaj yeem kov cov cathode! Yog tias koj sim soldering qhov no thiab xav tias nws nyuaj, nws nyuam qhuav pib! Thaum qhov ntawd ua tiav, rov ua dua nrog teeb tsa tom ntej ntawm LEDs Tom qab ntawd, khoov qhov kawg ntawm cov cathode pins sab hauv me ntsis, zoo li hauv daim duab #6. Muab cov no tso rau hauv qab txheej txheej ntawm cathodes, yam tsis tau kov lub anode "ring". Thaum kawg, tau txais 2 daim hlau xaim, thiab txuas txuas los ntawm txhua lub nplhaib anode mus rau hauv qab, rau tag nrho ntawm 6 kev sib txuas los hauv qab. Tam sim no cov LEDs tau sib txawv. Xaiv cov qib thiab kab kom pom lub teeb ci LED. Nws ua haujlwm, thiab kuv tau npaj txav mus rau qhov tiag. Excuse kuv Marco-hom-tsawg-lub koob yees duab. Kuv yuav sim piav qhia qhov tsis pom kev siv Photonotes. (Lawv yuav tsum yog 3.1 megapixel cov duab, yog li yog koj txiav txim siab ua nws, tej zaum koj tuaj yeem nthuav nws rau nws)

Kauj Ruam 3: Qhov Zoo

Qhov Zoo
Qhov Zoo
Qhov Zoo
Qhov Zoo
Qhov Zoo
Qhov Zoo
Qhov Zoo
Qhov Zoo

Ua raws li Hypnocube cov lus qhia, Kuv tau ua 3 ntu nrog tib lub npe: Qhov Zoo, Qhov Tsis Zoo, thiab tau kawg, Qhov Tsis Txaus Siab. Koj yuav xav tias cov no lom zem me ntsis monikers, tab sis tiag. Thaum nws yuav siv sijhawm koj ib feeb los nyeem Cov Dab Neeg, nws siv kuv 2 teev los ua thawj zaug. Koj tuaj yeem pib tawm los ntawm kev pom tias koj yuav khoov cov LEDs li cas. Kuv mus RCBG, koj li yuav txawv, yog li kos! Tom ntej no, tso tag nrho 4 LEDs rau hauv koj lub jig. xws li cov coj tau taw qhia kab pheeb ces kaum sab hauv, liab nyob ze, cathode. Thaum koj khoov cov liab, lawv yuav tsum tsuas yog kov, yog tias tsis mus me ntsis dhau qhov liab kawg. Tom qab ntawd quav cov kev nyuaj siab hauv qhov rov qab, tom qab ntawd cov zaub ntsuab zoo ib yam li liab. Kev nyuaj siab yuav luag yuav luag txog, tej zaum zoo li 1mm tawm, tab sis cov zaub ntsuab yuav dhau 1cm luv dhau. Lub sijhawm no, Kuv khoov cov cathode me ntsis ntawm cov liab, muab rau kuv ib chav soldering, tom qab ntawd muab tag nrho cov liab tso ua ke. Tom qab koj tau txais lub nplhaib liab ua tiav, koj yuav tsum ntsuas qhov txuas ntxiv hla lub nplhaib. Yog tias koj tau nyob ze rau cathode, ua qhov kev ntsuas txuas ntxiv kom ntseeg tau tias koj tsis tau muab tshuaj txhuam rau nws. Yog tias koj ua … zoo sim ua kom nws tawm. Qhov ntawd yog cov kauj ruam yooj yim tshaj plaws! YAJ!

Kauj ruam 4: Qhov phem

Qhov phem
Qhov phem

Yog li, tam sim no koj tau siv cov xim liab, nws yog lub sijhawm txav mus rau ntsuab thiab xiav. Ua tib zoo muab cov hmoov txhuas ua kom ze li koj tuaj yeem coj mus rau tom ntej. Nws yuav zaum muaj qhov sib txawv 1 hli. Hmoov zoo, cov laug yog qhov zoo ntawm qhov ntawd. (Ceeb toom! Yog tias koj muaj hlau kub dhau, koj tuaj yeem txuas qhov sib txawv, tso mus, thiab cov hlau lead yuav rov qab los, pov cov laug kub kub hla koj!) Ntawm liab, koj xav siv ua kom tsawg li sai tau. Ntawm no, Kuv siv lub ntiaj teb loj dua. Tsis txhob siv ntau dhau, lossis koj yuav txuas rau lwm lub xaim. (Yog tias koj ua, txheeb xyuas qib 5) Rov ua dua 4 zaug, thiab tam sim no koj tau txais lub nplhaib xiav! Yay! Nco ntsoov xyuas kom txuas ntxiv mus;-) Qhov phem tsis yog qhov phem tiag, puas yog?

Kauj Ruam 5: Qhov Tsis Zoo - Ntu 2

Qhov phem - Part 2
Qhov phem - Part 2
Qhov phem - Part 2
Qhov phem - Part 2

Thaum kawg, koj yuav tau ua ntsuab.

Rau qhov no, koj yuav xav tau lub hlawv LED lossis lub zog tiv thaiv qub uas koj tsis nyiam. (Peb xav tau xaim) Kuv tsuas xav tau txog 8mm rau ib qho txhuas, 1 lub teeb daj daj LED tau ua qhov dag. Muab tus neeg pub dawb tso rau qhov kawg ntawm cov hmoov txhuas ntsuab, tom qab ntawd txiav nws tawm, siv 1/2 ntawm tus pub dawb. Cov ntsuab yuav tsum yog plently ntev txaus kom mus txog qhov chaw tom ntej, qee yam uas peb tuaj yeem siv rau peb qhov zoo dua. Rov ua dua rau lwm plaub. Peb tuaj yeem khoov nws ncaj, tab sis nws yooj yim dua yog tias peb khoov nws ib ncig. Siv qee daim ntawv ntawm rab riam, tuav cov xaim nyob ze ntawm lub hauv paus, thiab tig nws sab hauv 20 degrees (Ua rau 160 degree kaum). Tom qab ntawd rov ua dua qhov kawg. Qhov no yuav tsum tsuas yog hla mus rau xaim tom ntej yog tias koj ua nws raug. Rov qab mus thiab kho nws yog tias nws tsis ua. Tom qab ntawd rov ua dua 4 zaug. (Yog tias tus neeg pub dawb coj tawm, vim yog cov khoom sib dhos txias lossis ib yam dab tsi, koj yuav tsum tau muab nws rov qab siv dua.)

Kauj Ruam 6: Qhov Tsis Zoo

Tus Ugly
Tus Ugly

Haha! Tam sim no, "Tus Phem"! Tam sim no nws yog lub sijhawm siv! Muab cov xim ntsuab tso rau ntsuab tom ntej. Yog vim li cas qhov no tsim nyog nws tus kheej cov kauj ruam yog yooj yim - Nws nyuaj heev. Nov yog qee cov lus qhia:*Tsis txhob kov cov hmoov txhuas. Nws zoo dua los ntawm cov "sab nrauv" uas ncaj nraim rau hauv qab.*Tsis txhob cia koj cov hlau kub dhau, lossis tso nws ntev ntev. Txwv tsis pub nws yuav ua rau tus neeg pub dawb coj tawm.*Tsis txhob siv cov laug ntau. 5mm yog txaus. *Yog tias cov hlau lead yog "ntab" saum cov taw tes, thiab koj tsis tuaj yeem thawb nws, muab cov cuab yeej tuav rau nws lossis qee yam kom nws nqes mus, tsis yog siv koj cov hlau txuas. Yog tias koj ua kom tiav cov xim xiav, ntawm no yog li cas kuv tau tshem ntawm nws. (Kuv tsis yog tus tswv lauj kaub, thiab kuv lwm yam cuab yeej desoldering tsis pab)*Sim ua kom nyias nyias tawm ntawm cov coj. Ua qhov kev sib txuas nruab nrab ntawm lawv kom tsawg li sai tau*Tom qab ntawd, koj tuaj yeem tuaj yeem nkag mus rau hauv nrog cov xaim txiav thiab txiav tus choj. LOSSIS*Sim txav cov laug txuas qee qhov xaim seem, piv txwv li lwm qhov LED tuag. Thaum koj ua tiav lub nplhaib ntsuab, kos rau txuas ntxiv mus. Txawm li cas los xij, tsis txhob ua kev zoo siab! Rov qab mus thiab ua cov kauj ruam 3-6 dua, hla ntu no. Koj xav tau 2 teeb ntawm 4 LEDs, ib qho rau txhua qib;-)

Kauj Ruam 7: Qhov Tsis Zoo - Ntu 2

Lub siab phem - Part 2
Lub siab phem - Part 2
Lub siab phem - Part 2
Lub siab phem - Part 2

Tam sim no nws yog lub sijhawm los muab ob qib sib dhos ua ke! Daim duab tiag tiag qhia nws txhua yam. Nyob rau theem saum toj, khoov 7-9mm ntawm cov lus qhia sab nraud, tom qab ntawd tig tag nrho cov hlau lead sab hauv. Kuv muab cov no tso rau hauv lub jig thaum kuv tuav lub sab saum toj nyob rau hauv qhov chaw thiab soldered rau nws. Qhov ua kom yuam kev, rau cov uas koj tsis muaj 3 txhais tes, yog txhawm rau txhawm rau 2 cov ntsiab lus, tom qab ntawd nws yuav tsum tuaj yeem sawv ntawm nws tus kheej, thiab koj tuaj yeem tau txais lwm yam 2. Txheeb xyuas txuas ntxiv mus, thiab txav mus ntxiv. Rau ntu tom ntej, koj yuav xav tau qee cov xaim xaim. Yog tias koj tsis muaj ib qho ua raws cov lus qhia no:

Cov khoom sib tw no muaj qhov tseem ceeb ntawm cov xaim uas peb tuaj yeem siv tau. (Ib tus txawm tias muaj tooj liab hauv nws!) Txhawm rau rho tawm, kuv tsuas yog rub mus rau ob qho kawg thiab rub, zoo li koj pom hauv daim duab. Pib nrog qib siab dua, thiab xaiv LED. Ntawm sab xis, muab tshuaj txhuam liab, ces ntsuab. (Nyob rau hauv qhov kev txiav txim!) Cov mus rau hauv yooj yim. Xyuas kom tseeb tias cov hlau tsis kub heev, lossis nws tuaj yeem tsis muag cov khoom sib txuas. Qhov no nyuaj nyob hauv thaj tsam uas raug kaw. Reatat rau qib qis dua, tab sis xaiv qhov sib txawv LED. Test rau txuas ntxiv mus thoob plaws txhua yam thiab kho txhua yam uas tsis txuas ntxiv. Koj tau ua tiav nrog qhov nyuaj! (Yog tias koj yuav pleev xim LEDs, tam sim no lub sijhawm ua;-))

Kauj ruam 8: Phoo! Programming

Phem! Programming!
Phem! Programming!
Phem! Programming!
Phem! Programming!
Phem! Programming!
Phem! Programming!

Qhov no yog cov kauj ruam lax ntau dua: cov phiaj xwm Kuv tau siv kuv li ntawm lub khob cij, vim tias kuv tsis muaj lub DIP qhov txuas ntxiv los hloov lub microcontroller tas li. Kuv siv Amtel's Atiny 2313. Koj tuaj yeem siv txhua yam nrog tsawg kawg 10 Kuv/ O pins Txuas cov pins raws li daim duab. ('v' txhais tau tias qib qis dua, ''txhais tau tias yog qib siab dua. 'D5' thiab xws li yog cov npe ntawm I/O's)Programming qhov no yog qhov yooj yim heev! Kuv tau sau tawm lub moj khaum kom nws yooj yim rau leej twg ua! Nov yog cov ntawv

#include #define F_CPU 100000UL // Teeb tsa lub hauv paus nrawm rau ncua sij hawm.h #suav nrog // Thawj tsab ntawv yog saum lossis hauv qab // Tsab ntawv thib ob yog xim (R/G/B) // Tsab ntawv thib peb yog On/Off // TRN = Top Red On #define TRN PORTD = _BV (PD0);#define TRF PORTD & = ~ _BV (PD0);#define TGN PORTD = _BV (PD2);#define TGF PORTD & = ~ _BV (PD2);# txhais TBN PORTD = _BV (PD4);#txhais TBF PORTD & = ~ _BV (PD4);#txhais BRN PORTD = _BV (PD1);#txhais BRF PORTD & = ~ _BV (PD1);#txhais BGN PORTD = _BV (PD3);#txhais BGF PORTD & = ~ _BV (PD3);#txhais BBN PORTD = _BV (PD5);#txhais BBF PORTD & = ~ _BV (PD5); // Thawj tsab ntawv yog kab ntawv (A/B/C /D) // Tsab ntawv thib ob yog On/Off // AN txhais tau tias Kab A Rau#txhais tus PORTB & = ~ _BV (PB7);#txhais BN PORTB & = ~ _BV (PB6);#txhais CN PORTB & = ~ _BV (PB5);#txhais DN PORTB & = ~ _BV (PB4);#txhais AF PORTB = _BV (PB7);#txhais BF PORTB = _BV (PB6);#txhais CF PORTB = _BV (PB5);#txhais DF PORTB = _BV (PB4); // Siv "WO" tos lub sijhawm me me los hloov xim // Kho kom cov xim LED los ntawm "vibrating" #define WO _delay_ms (15); // Siv "WL" tos 1 thib ob#txhais WL _delay_ms (1000); int main () {// Teeb I/O cov chaw nres nkoj: TSIS TXHOB DDRD = _BV (PD4); DDRD = _BV (PD2); DDRD = _BV (PD3); DDRD = _BV (PD0); DDRD = _BV (PD1); DDRD = _BV (PD5); DDRB = _BV (PB7); DDRB = _BV (PB6); DDRB = _BV (PB5); DDRB = _BV (PB4); // Lub xeev tsis raug rau kab ntawv nyob ntawm AF; BF; CF; DF; // KAWG DEFINES thaum (1) {// Txhua yam hauv no yuav voj mus ib txhis // Ntxig koj tus lej ntawm no} rov qab (0);}Kuv tau tawm tswv yim rau koj, thiab nyeem lawv yuav tsum piav qhia nws. Hauv paus, koj tuaj yeem siv thawj "txheej" ntawm cov lus txhais los xaiv cov xim thiab qhov siab. Tom qab ntawd koj siv qhov thib ob "teeb" los xaiv kab ntawv. Yog tias koj muab cov hauv qab no tso rau hauv txoj cai, tom qab "// Ntxig koj tus lej ntawm no", nws yuav ua rau sab saum toj 4 LEDs xiav

BGN; AN; WO; AF; BN; WO; BF; CN; WO; CF; DN; WO; DF; BGF;Thawj kab tig rau Ntsuab mus rau qib qis, thaum lwm txoj kab hla los ntawm kab. Txawm li cas los xij, txoj cai no yuav ua rau lub teeb ci LED-dawb

AN; TBO; WO; TBF; TGO; WO; TGF; TRO; WO; TRF; AF;Los ntawm kev caij tsheb kauj vab hla cov xim kom nrawm, lawv sib xyaw ua ke. Yog tias koj tsis tau sib xyaw lub teeb ua ntej, nws ib txwm ua haujlwm zoo li no:*R+G = Daj*R+B = Magenta (Pinky-purple)*B+G = Cyan (Lub teeb xiav) Yog tias koj xav tau lwm yam xim, koj tuaj yeem sim nrog ntau qhov sib piv ntawm lub sijhawm rau txhua xim. Raws li txoj cai: tsis txhob muaj ntau dua 1 xim ntawm 1 LED nyob rau ib lub sijhawm, txwv tsis pub lawv yuav tsis pom kev. Yog tias koj xav ua kom pom tag nrho 8 ib zaug, sim ua kom cov xim yooj yim. Txoj haujlwm no tsis txaus ntseeg tsis yog txoj haujlwm kawm-rau-muag, raws li koj tuaj yeem pom, thiab kuv vam tias kuv muaj kev paub ntau dua ua ntej sim ua qhov no.

Pom zoo: