Cov txheej txheem:

DIY Yooj Yim Arduino Teeb: 5 Cov Kauj Ruam (nrog Duab)
DIY Yooj Yim Arduino Teeb: 5 Cov Kauj Ruam (nrog Duab)

Video: DIY Yooj Yim Arduino Teeb: 5 Cov Kauj Ruam (nrog Duab)

Video: DIY Yooj Yim Arduino Teeb: 5 Cov Kauj Ruam (nrog Duab)
Video: Уроки Ардуино - циклы что это и как их использовать... [ уроки программирования с нуля] 2024, Hlis ntuj nqeg
Anonim
DIY Yooj Yim Arduino Teeb
DIY Yooj Yim Arduino Teeb
DIY Yooj Yim Arduino Teeb
DIY Yooj Yim Arduino Teeb
DIY Yooj Yim Arduino Teeb
DIY Yooj Yim Arduino Teeb

Hauv txoj haujlwm no, kuv yuav taug kev koj los ntawm cov txheej txheem tsim lub teeb nrog Arduino nano thiab LED sawb. Ua ntej pib nws yog qhov tseem ceeb kom paub tias muaj ntau qhov hloov pauv tau raws li cov yam ntxwv koj xav tau hauv koj lub teeb thiab yam twg koj tsis ua (Kuv yuav piav qhia cov kev xaiv sib txawv uas koj tuaj yeem ua dua li txawv ntawm kuv tus kheej ntxiv rau hauv kev qhia).

Kev xav txog kev nyab xeeb - Phau ntawv qhia no suav nrog siv cov hlau txuas. Thov xyuas kom koj ua raws kev tiv thaiv kev nyab xeeb kom raug (piv txwv li tsom iav kev nyab xeeb, tso cua kom raug, teeb tsa chaw ua haujlwm).

Khoom siv

Cheebtsam

- Arduino Nano

- 1 xRocker Hloov

- Jumper xov hlau

- Breadboard (yeem)

- Perfboard (nws yuav tsum muaj peev xwm haum rau sab hauv lub teeb ntawm lub teeb (tso quav tso quav)

- Ib WS2812B Coj Sawb ncig ob metres ntev (106 LEDs) (lwm tus tuaj yeem siv tau tab sis cov cai yuav tsum tau hloov kho rau lawv).

- USB rau Mini-B USB qaum (nws yuav tsum ntev txaus los hla lub pob ntaus pob tesniv thiab ntxiv kom thiaj li ncav cuag lub zog siv.

- 1 x 10k resistor

Khoom siv

Kuv paub tias nws tuaj yeem nyuaj nrhiav lub cev kom raug rau koj txoj haujlwm uas yog vim li cas kuv thiaj ua lub cev ntawm kuv lub teeb tawm ntawm cov khoom siv niaj hnub

- 1 x Pob ntaus pob tesniv tau (cov yas sab nrauv yuav tsum tshem tau)

- 2 x Cov ntawv tso quav tso quav

- 1 x Daim ntawv ci

- Yas qhwv (yeem)

Cov cuab yeej

- Soldering hlau

- Cov nplaum (los yog kab xev)

Kauj Ruam 1: Cov Ntaub Ntawv ntawm Teeb

Ua ntej peb pib tsim lub teeb kuv yuav piav qhia nws lub peev xwm thiab kev txwv. Ua ntej tshaj, cov hlua coj yog 5 volt RGB coj sawb. Qhov hloov rocker tso cai rau tus neeg siv hloov ntawm ob lub xim sib txawv. Raws li pom hauv cov vis dis aus kuv muaj cov xim zaj sawv xim ib yam, thiab cov dej hiav txwv xim ib yam. Lub teeb tau siv los ntawm USB, thaum xub thawj kuv tau siv lub roj teeb cais tab sis kuv pom sai sai tias nws yuav hloov pauv lub roj teeb li cas thiab hloov kho cov cai yog tias kuv tas li yuav tsum qhib lub teeb. Pom tseeb, txij li kuv tab tom siv lub raj ntaus pob tesniv thiab cov ntawv ci, qhov zoo ntawm lub cev yuav tsis zoo tag nrho tab sis kuv xav tias yog DIY project nws yog qhov khoom plig zoo kawg. Daim ntawv kawg yog tias muaj kev xaiv los sau koj tus kheej cov lus ntawm lub teeb raws li pom ntawm kuv. Nrog qhov ntawd tau hais tias peb yuav mus rau qib 1.

Kauj Ruam 2: Xeem Lub Circuit Court

Xeem Circuit Court
Xeem Circuit Court
Xeem Circuit Court
Xeem Circuit Court
Xeem Circuit Court
Xeem Circuit Court

Peb thawj zaug yuav sim ntsuas qhov Circuit kom ntseeg tau tias nws ua haujlwm ua ntej yuav siv nws. (Qhov no yog cov kauj ruam tsis tsim nyog txawm hais tias kuv pom zoo kom paub tseeb ntawm lub Circuit Court ua ntej soldering.) Cov ntu xav tau rau qhov no yog

• Breadboard

• Jumper xov hlau

• Arduino nano

• Coj sawb

• Rocker hloov

• Cov hlau yaj

Thawj kauj ruam yuav muab peb xaim txuas mus rau 5v, Cov Ntaub Ntawv, thiab cov ntsiab lus hauv av ntawm LED Sawb. Koj cov hlua LED tej zaum twb tau los txog nrog txoj hlua nyob ntawm xub ntiag uas kuv pom zoo kom txiav tawm thawj LED. Qhov no yuav tsum zoo ib yam li cov duab saum toj no.

Cov kauj ruam tom ntej yuav muab txuas 2 lub xov hlau txuas rau ob ntawm peb tus pin ntawm tus tes hloov qhov. Ib qho ntawm ob tus pin yog zoo tsuav yog ib qho ntawm lawv yog tus pin nruab nrab.

Thaum koj tau ua tiav ntu no peb tuaj yeem pib txuas cov khoom siv rau ntawm daim txiag ntoo. Ua ntej, txuas Arduino nano thiab tom qab ntawd txuas 5v thiab tus pin hauv av ob txoj kab sib dhos ntawm lub khob cij. Tom ntej no, txuas 5v thiab cov xov hluav taws xob hauv av ntawm cov hlua coj mus rau ob txoj kab sib dhos. Txuas cov ntaub ntawv xov hlau ntawm cov hlua coj mus rau tus pin 8 ntawm Arduino. Tom qab qhov no ntsaws ob lub xov hlau ntawm qhov hloov pauv ib sab ntawm ib sab ntawm lub khob cij. Tam sim no txuas lub 10k resistor rau ib qho ntawm cov xov hlau hloov pauv (ib sab ntawm nws ntawm lub khob cij). Lwm sab ntawm 10k resistor yuav tsum yog ntawm txoj kev tsheb nqaj hlau. Tam sim no txuas lub jumper hlau rau tib lub xaim ntawm qhov hloov pauv uas mus rau tus pin 6 ntawm nano. Thaum kawg, txuas lub xaim jumper mus rau lwm lub xaim ntawm qhov hloov pauv uas txuas rau 5-volt tsheb nqaj hlau. Yog tias koj muaj teeb meem hauv qab no thov mus saib daim duab saum toj no.

Tam sim no cov kauj ruam tom ntej yog xa cov cai mus rau Arduino. Thawj feem ntawm cov txheej txheem no yog teeb tsa Lub Tsev Qiv Ntawv FastLED. Qhib koj li Arduino software, qhib lub kais kos, mus rau suav nrog lub tsev qiv ntawv, xaiv tswj cov tsev qiv ntawv. Thaum koj tau mus txog qhov chaw tshawb pom Fast LED hauv kab tshawb nrhiav thiab nqes mus txog thaum koj pom lub tsev qiv ntawv Fast LED los ntawm Daniel Garcia. (saib daim duab saum toj no). Nruab nws thiab tom qab ntawd koj tuaj yeem npaj mus upload cov cai.

Qhov no cuam tshuam nrog kev luam tawm tag nrho cov cai tau muab ntawm no rau hauv daim duab Arduino. Yog tias koj saib cov duab saum toj no, qhov kev hloov pauv uas koj yuav tsum tau ua yog tus naj npawb ntawm LEDs koj yuav siv. Kuv tau hla hom LED nyob rau hauv rooj plaub ib qho LED Sawb sib txawv rau kuv tus kheej tau siv nyob rau qhov xwm txheej twg yuav tsum tau hloov kho tshiab.

Kauj Ruam 3: Npaj Lub Cev

Npaj Lub Cev
Npaj Lub Cev
Npaj Lub Cev
Npaj Lub Cev
Npaj Lub Cev
Npaj Lub Cev

Cov ntaub ntawv thiab cov cuab yeej xav tau

Lub raj mis ntaus pob tesniv

Ob daim ntawv tso quav

- Superglue (lossis txhua yam uas tuaj yeem khaws cov quav tso ua ke.)

soldering hlau

- hlau tus pin (daim)

Qhov no yog qhov yooj yim haum tab sis tseem ceeb. Ob lub qhov yuav tsum tau ua hauv lub raj mis qhov twg yuav hloov mus. Hauv kuv qhov xwm txheej, Kuv tau ua lub qhov ntawm qhov uas yuav yog sab saum toj ntawm kuv lub teeb (hauv qab ntawm lub raj mis) rau qhov hloov chaw rocker. Kuv ua qhov thib ob ntawm lub raj mis ze rau hauv qab rau USB cable. Saib cov duab saum toj no kom nkag siab zoo dua.

Kuv tsis muaj laum los ua lub qhov yog li kuv tau xaiv yaj cov yas. Nws yog ib qho tseem ceeb uas koj yuav tsum muaj lub qhov cua kom zoo thaum ua qhov no (Kuv pom zoo kom qhib lub qhov rai thiab qhov rooj thaum tig lub kiv cua. Kev hlawv cov yas tuaj yeem muaj qhov tsis zoo rau kev noj qab haus huv yog tias kis tau rau cov pa ntev ntev thiab kuv pom zoo siv qee lub sijhawm los tshawb fawb kom raug. kev npaj ua qhov no.

Txhawm rau yaj cov yas, Kuv tau siv kuv lub lauj kaub los ua kom sov tus pin uas kuv tuav nrog cov yas dhos. Los ntawm kev coj tus pin ntawd tuaj yeem tsim lub qhov xav tau hauv cov yas. Tej zaum koj yuav xav tsis thoob vim li cas kuv thiaj tsis yog siv cov hlau txuas kom yaj cov yas. Kuv tsuas yog tsis xav kom tau yas yaj rau ntawm kuv cov hlau lossis yuav ua rau nws puas tsuaj. Yog tias koj xav tau, koj tuaj yeem siv koj li. Tsuas yog nco ntsoov ua kev tshawb fawb kom raug thiab zam kev nqus cov pa.

Nco ntsoov tias lub qhov nyob rau sab saum toj ntawm lub tuaj yeem haum qhov hloov pauv thaum tso rau hauv.

Tom ntej no, ua lub qhov rau ntawm qhov uas yuav yog hauv qab ntawm lub teeb. Nws yuav tsum yooj yim haum USB cable los ntawm nws.

Kuv yuav tsis siv daim ntawv ci vim kuv xav kom tuaj yeem pom los ntawm lub peev xwm tam sim no thaum txhim kho Circuit Court.

Tam sim no ntu kawg yog qhov yooj yim tshaj plaws. Txhua yam koj yuav tsum ua yog lo ob daim ntawv tso quav tso ua ke raws li pom hauv daim duab. Tsuas yog xyuas kom koj tsis txhob muaj superglue ntawm koj txhais tes!

Kauj Ruam 4: Soldering Final Circuit

Soldering Final Circuit
Soldering Final Circuit
Soldering Final Circuit
Soldering Final Circuit
Soldering Final Circuit
Soldering Final Circuit

Thaum koj tau lees tias lub voj voog ua haujlwm koj tuaj yeem txav nws mus rau ntawm lub rooj tsav tsheb (cov txheej txheem koj tseem tuaj yeem siv lub khob cij yog tias nws haum rau hauv chav dej yob. Raws li kuv tau hais ua ntej ua kom ntseeg tau tias lub rooj tsavxwm haum rau hauv lub qhov tso quav.

Yog tias koj tsis tau siv daim npav ua ntej ua ntej koj yuav tsum xub ua qee qhov kev tshawb fawb sai ntawm nws ua haujlwm li cas. Kev sib txuas ntawm Led sawb yog ib qho zoo ib yam li daim ntawv qhia zaub mov, qhov sib txawv tsuas yog koj tau siv nws tam sim no. Tsuas yog tus pin ntawm Arduino uas yuav tsum muaj ntau dua ib qho txuas yog 5 volt. Muaj ob daim pins hauv av uas txhais tau tias koj tuaj yeem siv av hauv av los ntawm kev hloov thiab coj kab txaij mus rau ib lossis ob qho tib si. Tej zaum koj yuav tau pom tias tus tiv thaiv kab laug sab los ntawm hauv av mus rau tus lej 6. Qhov no ua tau zoo ib yam nkaus li tus lej txuas 6 thiab tus tiv thaiv rau ib tus pin ntawm qhov hloov.

Kuv pom zoo kom siv cov Led Sawb ua ntej rau cov laug cam ua ntej. Tam sim no ib yam uas kuv tau pom tom qab kuv tau ua tag nrho kuv cov laug yog ntev npaum li cas ntawm cov xov hlau jumper tseem ceeb. Thaum kawg, qhov ntev nyob ntawm qhov uas koj npaj siab yuav tso koj li Arduino nano board. Yog tias koj tso nws mus rau hauv qab ntawm lub qhov tso quav tso quav ces nws ua kom ntev tshaj plaws ntawm USB cable thaum tseem tso cai rau koj siv cov xov hluav taws xob luv rau cov hlua LED. Tsuas yog qhov poob qis yog qhov nrug deb ntawm lub pob. Kuv qhov kev pom zoo yog tias rau khawm koj siv xov tooj ob zaug ntawm qhov deb ntawm lub rooj sib tham perf mus rau lub pob vim tias yog tias koj puas xav tshem lub Circuit Court tawm ntawm lub cev yam tsis xav tau lub khawm luv xov hlau yuav ua teeb meem.

Yog tias koj saib cov duab sab hauv ntawm daim ntawv tso quav koj yuav pom ntau daim hlau daj. Qhov no yog vim thaum xub thawj, kuv npaj muab nano rau saum tab sis tom qab ntawd hloov nws mus rau hauv qab. Txhua qhov xaim ntawd yog dab tsi txuas cov hlua coj mus rau lub rooj tsav tsheb.

Kuv qhov lus qhia kawg ntawm kev siv tshuaj yaj yeeb yog kom paub tseeb tias cov hlau los ntawm lub pob los ntawm lub raj mis thaum siv cov laug los yog cov laug cam. Raws li pom hauv daim duab kawg lub khawm yuav tsum tau nyob hauv qhov chaw thaum siv cov laug cam.

Tam sim no ib zaug koj tau ua tiav koj yuav xav paub tseeb tias lub Circuit Court tseem ua haujlwm ua ntej txhim kho Circuit hauv lub cev.

Kauj Ruam 5: Txhim Kho Lub Circuit Court Rau Hauv Lub Cev thiab Kov Kawg

Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg
Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg
Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg
Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg
Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg
Txhim kho lub Circuit Court rau hauv Lub Cev thiab Kov Kawg

Thaum koj tau lees paub qhov kev ua haujlwm hauv Circuit koj tuaj yeem tso cov ntawv ntxig nrog nano rau hauv cov ntaub tso quav. Kuv tau piav yav dhau los qhov zoo thiab qhov tsis zoo ntawm muab nws tso rau saum thiab hauv qab.

Thawj kauj ruam yog yuav tsum khiav LED Sawb tawm hauv qab ntawm koj chav dej tso quav thiab tom qab ntawd qhwv nws ib puag ncig sab nraud txij hauv qab mus rau saum. Feem ntau cov kab LED tuaj nrog cov nplaum ib sab uas koj tev tawm cov yas. Rau cov kauj ruam no, Kuv pom zoo kom sib nrug ntawm LED Sawb. Raws li pom hauv kuv daim duab kuv tsis zoo tag nrho tab sis tsis muaj qhov sib txawv ntawm qhov kawg.

Txog ntawm qhov no, koj yuav tsum muaj USB cable thiab Led Sawb khiav tawm hauv qab ntawm lub raj nrog cov xov hlau khawm tawm sab saum toj. Kuv tsis pom zoo muab lub USB hla nws lub qhov tsis tau vim tias cov kauj ruam tom ntej yog qhwv sab nrauv ntawm lub pob ntaus pob tesniv tuaj yeem hauv daim ntawv ci (txhua daim ntawv uas tso cai rau lub teeb kom dhau mus yuav ua haujlwm). Yog tias lub pob tsis nyob hauv nws tau npaj rau txoj haujlwm koj tuaj yeem ua kua nplaum rau nws. Ib daim ntawv kawg yog kom paub tseeb tias tsis muaj cov xov hlau nyob sab nraum daim ntawv tso quav vim tias tom qab ntawd lawv yuav tsim duab ntxoov ntxoo nrog cov LEDs.

Ua ntej peb ua qhov no tej zaum koj yuav tau pom tias kuv tso lus me me rau ntawm kuv lub teeb. Qhov no tau ua tiav los ntawm kev txiav tawm cov cim los ntawm daim tawv nyias daim ntawv uas tsis tso cai rau lub teeb hla mus. Kuv ces super glued cov cim no rau sab nraum ntawm lub peev xwm ua ntej qhwv nws.

Tam sim no, cov kauj ruam tom ntej yog qhov tseem ceeb tshaj plaws vim tias ib qho quav/creases hauv daim ntawv ci thaum kawg yuav qhia nrog lub teeb. Kuv pom zoo kom siv cov yas ua tus nplaum (xyuas kom nws tsis qhuav sai).

Tam sim no thaum cov kua nplaum tau qhuav lawm koj yuav xav txiav lub qhov me me nrog rab riam ntse lossis qee yam zoo sib xws rau USB qhov. Kauj ruam kawg yog khiav USB cable tawm ntawm lub peev xwm thiab thawb daim ntawv tso quav tso rau sab hauv. Tom qab ntawd kaw lub raj mis nrog lub hau.

Ib kauj ruam xaiv kawg yog qhwv txhua yam hauv hnab yas kom ntseeg tau tias daim ntawv ci tsis puas. Saum toj no kuv tau txuas cov vis dis aus luv ntawm kuv lub teeb thaum kawg. Thov tawm lus yog tias koj muaj lus nug lossis teeb meem txog txoj haujlwm no.

Pom zoo: