Cov txheej txheem:

Suab paj nruag cuam tshuam lub raj mis Sawv Nrog Teeb Pom Kev: 14 Cov Kauj Ruam
Suab paj nruag cuam tshuam lub raj mis Sawv Nrog Teeb Pom Kev: 14 Cov Kauj Ruam

Video: Suab paj nruag cuam tshuam lub raj mis Sawv Nrog Teeb Pom Kev: 14 Cov Kauj Ruam

Video: Suab paj nruag cuam tshuam lub raj mis Sawv Nrog Teeb Pom Kev: 14 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Kaum ib hlis
Anonim
Image
Image
Suab paj nruag sib cuam tshuam lub raj mis Sawv Nrog Teeb Teeb
Suab paj nruag sib cuam tshuam lub raj mis Sawv Nrog Teeb Teeb
Suab paj nruag sib cuam tshuam lub raj mis Sawv Nrog Teeb Teeb
Suab paj nruag sib cuam tshuam lub raj mis Sawv Nrog Teeb Teeb

Qee lub sij hawm dhau los, ib tus phooj ywg ntawm kuv tau xaj 16 Ntsis LED-ntiv nplhaib kom tinker ncig nrog, thiab thaum ua li ntawd nws tau txais lub tswv yim tso lub raj mis saum nws. Thaum kuv pom nws, Kuv tau txaus siab los ntawm qhov pom ntawm lub teeb pom kev zoo ntawm lub hwj thiab nco txog qhov haujlwm txaus "Mc Teeb" los ntawm Hackaday tus neeg siv Tobias Blum:

hackaday.io/project/122568-mc- teeb pom kev zoo

Ib qho ntawm nws txoj haujlwm tau tswj hwm WS2812 LEDs ntawm tus kheej-sau lub vev xaib-interface yam tsis siv kev pabcuam sab nraud. Kev tshoov siab los ntawm nws txoj hauv kev tswj hwm LED-ntiv nplhaib, Kuv txiav txim siab los ua ke ob lub tswv yim no thiab coj lawv mus rau qib tom ntej. hom suav nrog cov uas cuam tshuam nrog cov nkauj ib puag ncig. Txhawm rau tsim lub cuab yeej nqa tau, nws tau siv lub roj teeb Li-Ion.

Hauv cov lus qhia no kuv yuav mus dhau cov txheej txheem tsim tsev thiab qhia koj txog nws lub luag haujlwm tseem ceeb. Tom qab ntawd koj yuav tsum muaj peev xwm tsim koj tus kheej version thiab muaj lub tswv yim txog yuav ua li cas ntxiv webcontrol rau ib qhov haujlwm yam tsis siv lwm qhov kev pabcuam.

Kauj Ruam 1: Kev Xaiv Tsev

Thaum nws los txog cov khoom siv hluav taws xob ntawm txoj haujlwm no, koj tuaj yeem siv NodeMCU-board, uas yooj yim siv thiab pheej yig heev, lossis koj tuaj yeem tsim koj tus kheej lub rooj tsavxwm zoo li kuv. Tsis muaj qhov txiaj ntsig tshwj xeeb hauv kev ua li ntawd, Kuv tsuas yog muaj ESP8226-12E nti dag ib puag ncig thiab txiav txim siab siv nws yog li kuv tuaj yeem khaws NodeMCU pawg thawj coj rau kev ua qauv sai. Tsuas muaj ib qhov sib txawv loj: koj xav tau 3.3V USB rau Serial board los teeb tsa lub rooj tswj hwm tus kheej. Txawm hais tias nws tsis ua qhov sib txawv hom twg koj xaiv, tsuas yog nco nws thaum nws los txog rau qhov yuav tsum tau ua.

Muaj qhov kev xaiv uas ua rau qhov sib txawv txawm tias: hom nkauj. Yog tias koj txiav txim siab suav nrog nws, lub raj mis tuaj yeem siv ua VU-meter thiab ntxiv rau yog tuaj yeem hloov LEDs xim thaum twg lub suab paj nruag ntses bass thaj tsam nce mus rau qhov pib. Qhov no xav tau qee yam khoom siv ntxiv txawm hais tias. Koj yuav tsum tsim lub tshuab ua kom nrov nrov uas ua rau lub tshuab tso kua mis tso rau hauv lub condenser thiab lub lim dej qis rau cov zaus bass. Txawm hais tias qhov no yuav suab nyuaj, nws yeej tsis yog. Nws tsis xav tau ib feem tshwj xeeb thiab kuv xav pom zoo suav nrog hauv Circuit Court no vim nws txhim kho lub cuab yeej ntau heev.

Kauj Ruam 2: Yuav Tsum Muaj Cov Khoom thiab Cov Khoom

Yuav Tsum Muaj Cov Khoom thiab Cov Khoom
Yuav Tsum Muaj Cov Khoom thiab Cov Khoom

Cov ntaub ntawv:

Tej zaum qhov nyuaj tshaj plaws ntawm txoj haujlwm no yog rooj plaub. Raws li kuv xav sim qee yam tshiab, Kuv txiav txim siab siv MDF daim hlau nrog tuab 18 hli thiab pleev xim rau lawv. Piv rau lwm hom ntoo/cov ntaub ntawv, MDF muaj qhov txiaj ntsig uas nws cov nplaim tuaj yeem raug tshwj xeeb yog du thiab yog li cov xim ntawm nws tuaj yeem saib zoo nkauj heev. Ib qho ntxiv, koj xav tau qee cov iav acrylic nrog tuab ntawm 4 hli raws li npog ntawm lub nplhaib LED.

Cov ntaub ntawv muaj qhov ntev ntawm 33 cm thiab dav txog 9 cm, yog li kuv pom zoo kom muab cov phaj nrog qhov ntev hauv qab no:

MDF-phaj 400 x 250 x 18 hli

LED-ntiv nplhaib npog muaj txoj kab uas hla ntawm 70 hli, yog li koj cov phaj ntawm iav iav yuav tsum muaj tsawg kawg yog cov hauv qab no:

Acrylic-phaj 250 x 100 x 4 hli

Txhawm rau pleev xim nws kuv tau txais kuv tus kheej 125ml ntawm cov xim dawb acrylic thiab 125ml ntawm cov xim ci ntsa iab. Ntau kuv qhia koj kom siv cov menyuam ua npuas ncauj vim qhov no tso cai rau koj siv cov xim ntau dua tusyees. Rau qhov xuab zeb kuv tau siv cov ntawv xuab zeb uas muaj qhov ntxhib ntawm 180, ib qho nrog 320 thiab ib qho nrog 600.

Electronics:

Rau cov khoom siv hluav taws xob koj xav tau peb 16 Bit WS2812 LED-rings. Tsuas yog ceev faj raws li kuv pom ob hom 16 Bit LED-rings, koj xav tau cov uas muaj lub taub loj dua (ib ncig 70 mm), thiab yog li qhov sib txawv loj dua ntawm LEDs.

Rau lub zog siv hluav taws xob koj xav tau Li-Ion roj teeb ntawm tes, lub charger sib xws, thiab hloov pauv. Ib qho ntxiv, koj xav tau 3.3 V tus tswj hwm qhov hluav taws xob nrog qhov tso hluav taws xob qis (LDO) thiab ob lub tshuab hluav taws xob los ua lub zog tswj hwm lub microcontroller. Kuv piav qhia vim li cas koj thiaj xav tau tus tswj hwm LDO ntawm qib 7.

Yog tias koj txiav txim siab los tsim qhov kev xaiv suab paj nruag lub suab nrov thiab lim Circuit, koj xav tau Op-Amp thiab qee yam khoom siv tsis zoo. Thiab yog tias koj xaiv los tsim koj tus kheej chav tswj hwm, koj xav tau ESP nti, pawg thawj coj tawg, qee qhov tiv thaiv, khawm thiab qee tus pin.

Thiab kuv xav pom zoo kom ua ib daim perfboard los txhuam txhua yam ntawm nws.

LED-nplhaib

3.7V Li-Ion cell (Kuv khaws ib yam ntawm TW18650 tawm ntawm lub roj teeb uas tsis siv)

Li-Ion Charger

Hloov (Tsis muaj dab tsi tshwj xeeb, Kuv tau siv qhov qub uas kuv tau khaws los ntawm cov neeg hais lus tawg)

LDO tus tswj hluav taws xob (ntxiv rau cov capacitors tau hais hauv cov ntawv: 2 x 1uF ceramic capacitor)

perfboard

Suab paj nruag Circuit (yeem):

Raws li schematic

Microcontroller:

NodeMCU

ESP8266 12E (phaj phaj, khawm, resistors thiab pins raws li schematic)

USB rau Serial (yuav tsum tau ua haujlwm rau tus kheej ua tus tswj hwm lub rooj tsavxwm, yog tias koj twb muaj lawm tsis tas yuav tau txais lwm tus)

Kauj Ruam 3: Milling Case

Milling Case
Milling Case
Milling Case
Milling Case
Milling Case
Milling Case

Ib tus phooj ywg ntawm kuv tau tsim nws tus kheej MP-CNC thiab tau ua siab zoo rau kuv ob lub MDF qhov thiab peb lub nplhaib acrylic. Cov ntoo ntoo yog sab saum toj thiab hauv qab ntawm lub npov zoo li lub thawv. Ntawm lub npov, muaj peb qhov chaw rau LED-rings thiab lawv cov npog acrylic. Raws li cov kev sib sib zog nqus no tau tsim los kom tsuas yog ib feem loj dua li PCBs, lawv haum thiab zaum hauv qhov chaw yam tsis xav tau kua nplaum lossis ntsia hlau. Tib yam mus rau cov npog acrylic. Raws li lawv muaj txoj kab uas hla loj dua li LED-rings, lawv tau muab tso rau ntawm ib sab ntug saum cov LEDs (saib daim duab).

Kauj Ruam 4: Ua tiav Rooj plaub

Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub
Ua kom tiav rooj plaub

Tej zaum koj yuav tau pom tias tamsim no, muaj ntau yam uas ploj lawm ntawm rooj plaub. Tej yam zoo li qhov rau lub nplhaib lub xov tooj, lub qhov rau lub USB ntsawb thiab lub hnab rau lub roj teeb. Ib qho ntxiv, yog tias koj xaiv suav nrog cov suab paj nruag Circuit, yuav tsum muaj lub qhov rau lub microphone. Ib qho ntxiv, Kuv pom zoo kom koj txhawm rau qhov hauv qab LED-Rings kom koj tuaj yeem thawb lawv tawm ntawm rooj plaub. Kuv siv cov cuab yeej sib tsoo los ntxiv cov lus piav qhia saum toj no.

Ntawm daim duab thib peb, koj tuaj yeem pom "kev saib xyuas" thiab lub qhov rau cable rau lub nplhaib. Raws li koj tej zaum twb tau pom lawm, Kuv tau tsim ob txoj kab hluav taws xob. Qhov no tsis yog lub hom phiaj. Qhov no yog nyob rau theem pib uas kuv xav tias cov ces kaum ntawm lub nplhaib yuav tsis tseem ceeb, tab sis lawv tsis yog. Mount tag nrho peb ntawm lawv nrog lawv cov xov txuas rau tib sab. Kuv tau xaus nrog kev teeb tsa lawv mus rau ntawm qhov chaw.

Tseem ceeb: Ib txwm hnav lub npog ntsej muag plua plav thaum pom, drilling lossis milling rau hauv MDF. Tib yam mus rau sanding nws.

Kauj Ruam 5: Tiav Cov Ntaub Ntawv

Tiav Case
Tiav Case
Tiav Case
Tiav Case
Tiav Case
Tiav Case

Tam sim no rooj plaub tau pleev xim. Ua ntej koj ua qhov no, Kuv pom zoo kom koj saib lossis nyeem phau ntawv qhia txog qhov no, vim qhov no ua pov thawj nws tus kheej kom nyuaj dua li qhov kuv xav. Qhov no npog txhua yam koj xav paub txog lub ncauj lus.

Ua ntej, txhuam cov xuab zeb sab nraum ntawm MDF qhov chaw. Kuv tau siv cov ntawv mos 160 rau qhov no. Tom qab ntawd, ntau qhov kev qhia qhia kom kaw qhov chaw, tshwj xeeb tshaj yog ntawm ntug, nrog tshwj xeeb MDF primer. Kuv hla ntu no vim tias tus lej tseem kim heev thiab, txawm tias qhov txiaj ntsig tsis zoo li nws tuaj yeem ua tau, kuv yuav rov ua dua.

Tom qab ntawd, koj tuaj yeem pib pleev xim rau qhov koj xav tau xim. Kuv txiav txim siab pleev xim rau kuv dawb. Tos kom cov xim kom qhuav, tom qab ntawd xuab zeb nws nrog cov xuab zeb zoo (Kuv siv cov av 320), plua plav nws tawm thiab siv txheej xim tom ntej. Rov ua cov txheej txheem no kom txog thaum koj txaus siab rau qhov opacity ntawm cov xim. Kuv thov plaub txheej xim.

Tom qab txheej txheej kawg ntawm cov xim, xuab zeb nws nrog cov ntawv xuab zeb zoo dua li ua ntej (hauv kuv cov ntaub ntawv cov pob zeb 600) thiab tshem tag nrho cov hmoov av uas seem ntawm qhov chaw. Tom qab ntawd koj tuaj yeem thov thawj txheej ntawm lub ntsej muag ci ntsa iab. Raws li nrog cov xim, thov ua ntau txheej raws li nws xav tau los ua kom txaus siab rau koj. Kuv siv peb rau saum thiab ob sab, thiab ob qho rau hauv qab. Koj tuaj yeem pom qhov tshwm sim ntawm ib daim duab. Txawm hais tias qhov saum npoo tuaj yeem du dua (ntau dua sanding thiab MDF primer), Kuv zoo siab nrog qhov ua tiav qhov ua tiav.

Kauj Ruam 6: Npaj Rings

Npaj Rings
Npaj Rings
Npaj Rings
Npaj Rings

Parallel rau txheej txheem kom qhuav ntawm thawj txheej xim koj tuaj yeem xuab zeb acrylic-iav rings. Tom qab ntawd cov hlua no nthuav tawm lub teeb tawm los ntawm LED-Rings. Hais txog qhov twg, Kuv tau ntsib PCBs ntawm cov nplhaib no kom muaj qee qhov tsis xav tau ntxiv los ntawm cov txheej txheem tsim khoom, yog li koj yuav xav tau deburr lawv. Txwv tsis pub lawv yuav tsis haum rau hauv rooj plaub.

Tom qab ntawd, qee qhov xov hlau yuav tsum tau muab txuas rau lub nplhaib. Kuv pom zoo koj siv cov xov hlau hloov pauv tau. Kuv siv tawv ib qho thiab muaj teeb meem uas lawv thawb ob ntu ntawm rooj plaub sib nrug, uas yuav tsum tau khoov dab tuag. Tsis tas li ntawd, cov xaim hluav taws xob feem ntau yuav tawg uas ua rau cov txheej txheem tsis zoo raws li koj yuav tsum tau txais lub nplhaib sib xws thiab cov tswj hwm pawg thawj coj tawm ntawm rooj plaub.

Kauj Ruam 7: Lub Hwj Huam Fais Fab

Hwj chim Mov
Hwj chim Mov

Ib leeg Li-Ion roj teeb ntawm tes tau siv los ua lub zog siv. Nws raug them los ntawm kev them nqi hluav taws xob. Cov kab hluav taws xob no suav nrog kev tshaj tawm thiab dhau kev tiv thaiv tam sim no. Txhawm rau tua lub cuab yeej hloov pauv, uas cuam tshuam qhov txiaj ntsig zoo ntawm lub rooj tsav tsheb, tau tsim.

Raws li qhov siab tshaj plaws ntawm lub roj teeb ntawm tes yog 4.2V, ESP8266 tsis tuaj yeem siv ncaj qha. Qhov hluav taws xob siab dhau rau 3.3V microcontroller vim nws tsuas yog muaj txoj sia nyob nruab nrab ntawm 3.0V - 3.6V. Ib qho kev tso tawm qis (LDO) qhov ntsuas hluav taws xob yog qhov ntsuas hluav taws xob uas ua haujlwm txawm tias thaum qhov hluav taws xob nkag tau ze rau qhov tshwj xeeb tso tawm qhov hluav taws xob. Yog li, qhov tso tawm qhov hluav taws xob ntawm 200 mV rau 3.3V LDO txhais tau tias, nws tso tawm 3.3V tsuav yog qhov ntsuas hluav taws xob siab dua 3.5V. Thaum nws undershoots tus nqi no, qhov hluav taws xob tso tawm pib qis. Raws li ESP8266 ua haujlwm nrog cov hluav taws xob qis rau 3.0V, yog li nws ua haujlwm kom txog thaum cov hluav taws xob nkag ntawm LDO nqis qis dua ib puag ncig 3.3V (qhovntsej thiaj tsis yog tawm). Qhov no tso cai rau peb ua lub zog tswj hwm ntawm lub roj teeb ntawm tes kom txog thaum nws raug tso tawm tag.

Kauj Ruam 8: Microcontroller Board

Microcontroller Board
Microcontroller Board

Yog tias koj siv NodeMCU-board cov kauj ruam no yooj yim heev. Tsuas yog txuas 3.3V cov zis thiab hauv av ntawm lub zog hluav taws xob mus rau ib qho ntawm cov laug cam 3V thiab G pins. Tsis tas li ntawd, kuv pom zoo kom muab cov laug cam tso rau ntawm ib daim perfboard, vim qhov no ua rau nws yooj yim dua los txuas txhua yam.

Yog tias koj txiav txim siab los tsim koj tus kheej lub rooj tswj hwm, thawj kauj ruam yog txhawm rau txhawm rau ESP nti mus rau lub phaj adapter. Tom qab ntawd, ntxiv txhua qhov khoom siv thiab kev sib txuas raws li qhia hauv kab lus. Ob lub nyees khawm yog qhov tsim nyog kom rov pib dua thiab nyem lub maub los. Koj yuav pom ntawm cov duab hauv qab no uas kuv tsuas siv ib lub pob. Qhov laj thawj rau qhov ntawd yog tias kuv nyuam qhuav pom ib qho pw ib ncig, yog li hloov lub pob rau GPIO0, Kuv siv ob tus pin thiab lub jumper.

Koj tuaj yeem pom kuv qhov kev ua tiav ntawm cov kauj ruam tom ntej.

Kauj Ruam 9: Music Circuit (yeem)

Suab paj nruag Circuit (yeem)
Suab paj nruag Circuit (yeem)
Suab paj nruag Circuit (yeem)
Suab paj nruag Circuit (yeem)
Suab paj nruag Circuit (yeem)
Suab paj nruag Circuit (yeem)

Raws li cov tswv yim rau lub suab paj nruag yooj yim condenser microphone capsule tau siv. Nws tau siv los ntawm kev txwv tam sim no tiv thaiv txuas nrog 3.3V fais fab kev tsheb nqaj hlau. Hauv qhov ua piv txwv, lub tsiav tshuaj ua haujlwm zoo li lub tshuab hluav taws xob, yog li thaum lub suab nrov tsoo nws lub diaphragm, nws lub peev xwm, thiab sib piv rau qhov nws qhov hluav taws xob, hloov pauv. Qhov hluav taws xob no tsawg heev uas peb tsis tuaj yeem ntsuas nws nrog ESPs analog to digital converter (ADC). Txhawm rau hloov qhov no, peb nthuav lub teeb liab nrog Op-Amp. Lub zog tso zis ntau ntxiv tom qab ntawd tau lim los ntawm kev lim dej qis dhau ntawm thawj qhov kev txiav txim nrog txiav tawm ntawm ib puag ncig 70Hz.

Yog tias koj txiav txim siab siv NodeMCU-board, koj tuaj yeem txuas cov zis ntawm cov lus piav qhia saum toj no mus rau A0 tus pin ntawm pawg thawj coj saib. Yog tias koj xav tsim koj tus kheej lub rooj tswj hwm, koj yuav tsum ntxiv qhov faib hluav taws xob rau hauv Circuit Court. Qhov laj thawj rau qhov ntawd yog ESPs onboard ADC uas muaj qhov siab tshaj tawm hluav taws xob ntawm 1V. NodeMCU muaj qhov faib hluav taws xob no twb tau tsim nyob rau hauv, yog li txhawm rau txhawm rau cov cai thiab lub tshuab ua haujlwm kom ua haujlwm ntawm ob lub rooj tsavxwm, tus kheej-ua ib tus xav tau nws ib yam nkaus.

Kauj Ruam 10: Ua kom tiav thiab Mount Cov Khoom Siv Hluav Taws Xob

Tiav thiab Mount Electronics
Tiav thiab Mount Electronics
Tiav thiab Mount Electronics
Tiav thiab Mount Electronics
Tiav thiab Mount Electronics
Tiav thiab Mount Electronics

Ua ntej tshaj, ntxig rau LED-rings rau hauv qhov kev sib sib zog nqus uas tau tsim nyob rau sab saum toj ntawm rooj plaub. Tom qab ntawd, txuas cov khoom siv hluav taws xob, lub microcontroller, lub nplhaib thiab, yog tias koj tsim nws, lub tshuab hluav taws xob ua haujlwm raws li cov txheej txheem.

Lus ceeb toom: Ua ntej koj ua li ntawd, rov ntsuas ob zaug yog tias koj tua lub hwj chim uas siv qhov hloov. Kuv tsis nco qab ua li ntawd thiab kib LDO tus tswj hwm thaum siv tshuaj txhuam. Tom qab ntawd, koj npaj tau los teeb cov khoom siv hluav taws xob sab hauv.

Kuv pib los ntawm kev txuas lub roj teeb ntawm tes rau rooj plaub nrog qee cov kua nplaum kub. Tom qab ntawd kuv tso lub charger txuas thiab tshawb xyuas seb kuv puas tuaj yeem txuas hauv USB cable lossis tsis tau. Raws li kuv tsis ntseeg cov kua nplaum kub kom tiv taus lub zog ntawm kev thawb hauv kab ntau zaus, Kuv ua tib zoo hammered cov ntsia hlau los ntawm lub charger lub lauj kaub rau cov khoom siv hluav taws xob. Tom qab lub charger kuv tau kaw lub capsule microphone nyob hauv qhov chaw.

Tom qab ntawd kuv tau siv qee cov xov hlau khoov los kho lub microcontroller. Txoj kev no tso cai rau kuv coj tus maub los tawm ntawm rooj plaub rau kev kho thaum twg los xij uas kuv xav tau yam tsis tas yuav txiav los ntawm cov kua nplaum kub thiab ua rau MDF puas.

Tam sim no, Kuv tau siv qee qhov kev sib txuas cable thiab khoov cov xov hlau txhawm rau txhim kho cov xov hlau. Qhov kawg uas yuav tsum tau ua, yog kom ntxig cov npog npog acrylic. Ceev faj thaum ua li ntawd, yog li koj tsis ua kom cov xim puas tsuaj vim qhov no yog qhov haum zoo nkauj. Tej zaum koj tseem tuaj yeem txo qis rau sab hauv thiab/lossis sab nrauv ntawm cov nplhaib acrylic raws li MDF pawg thawj coj tau nqus qee cov xim thiab yog li qhov tob tau txais me me.

Kauj Ruam 11: Teeb lub Microcontroller

Teeb nyem Microcontroller
Teeb nyem Microcontroller

Tom qab ua tiav kev tsim kho vajtse, txhua yam uas tseem tshuav yog nyem lub software. Kuv siv Arduino IDE rau qhov ntawd. Tab sis ua ntej koj tuaj yeem teeb tsa tus tswj hwm, koj yuav tsum ntxiv qee lub tsev qiv ntawv thiab xaiv lub rooj tsav xwm raug.

Tsev qiv ntawv

Koj tuaj yeem siv IDEs Tus Thawj Saib Xyuas Tsev Qiv Ntawv (Sketch -> suav nrog Tsev Qiv Ntawv -> Mange Libraries) ntxiv rau lawv, lossis koj rub tawm thiab txav lawv mus rau koj lub tsev qiv ntawv IDEs. Kuv pom zoo tus thawj coj vim nws yooj yim dua, thiab koj tuaj yeem nrhiav txhua lub tsev qiv ntawv xav tau nyob ntawd.

DNSServer los ntawm Kristijan Novoselic (tsim nyog rau WiFiManager)

WiFiManager los ntawm tzapu thiab tablatronix (qhib AP uas koj tuaj yeem nkag mus rau koj li WiFi cov ntaub ntawv pov thawj)

WebSockets los ntawm Markus Sattler (tsim nyog rau kev sib txuas lus ntawm cov cuab yeej siv thiab lub raj mis)

Adafruit NeoPixel los ntawm Adafruit (tsim nyog rau kev tswj hwm LED-rings)

Pawg Thawj Coj

Tsis muaj teeb meem dab tsi ntawm pawg tswj hwm koj xaiv los siv, hauv Cov Cuab Yeej -> Pawg tswj hwm xaiv NodeMCU 1.0 (ESP -12E Module). Nco ntsoov tias lub teeb nyem loj tau teeb tsa rau 4M (1M SPIFFS) thiab rub tawm nrawm rau 115200.

Flashing

Txhawm rau nyem rau ntawm NodeMCU-board yooj yim txuas nws rau koj lub khoos phis tawj, xaiv qhov chaw nres nkoj kom raug thiab muab qhov program tso rau. Txuas koj USB rau Serial hloov pauv mus rau peb tus pin ntawm pawg thawj coj saib. Txuas GND thiab GND, RX thiab TX, thiab TX thiab RX. Txhawm rau nkag mus rau hom nyem ntawm tus tswj, rov pib dua nrog RST-khawm thiab thaum ua li ntawd khaws GPIO0-khawm thawb. Tom qab ntawd ua kom ntseeg tau tias koj lub rooj hloov pauv tau teeb tsa rau 3.3V. Ua kom tiav cov txheej txheem los ntawm kev rub tawm qhov program.

Tseem ceeb: Qhib koj lub cuab yeej ua ntej flashing.

Kauj Ruam 12: Upload Lub Vev Xaib

Upload lub Vev Xaib
Upload lub Vev Xaib
Upload lub Vev Xaib
Upload lub Vev Xaib
Upload lub Vev Xaib
Upload lub Vev Xaib

Cov ntaub ntawv xav tau rau lub vev xaib raug khaws cia ntawm microcontrollers flash nco. Ua ntej siv thawj zaug, koj tus kheej yuav tsum xa lawv mus. Txhawm rau ua li ntawd, siv lub cuab yeej (tej zaum koj yuav tsum tau them nws ua ntej). Cov LEDs yuav tsum ci liab (vim kuv lub koob yees duab zoo li txiv kab ntxwv ntawm daim duab), uas txhais tau tias lub raj mis sawv ntsug tsis txuas nrog lub network. Tom qab lub sijhawm luv luv, WiFi nkag mus rau lub npe hu ua "bottleStandAP" yuav tsum qhib. Tus password tsis raug yog "12345678", koj tuaj yeem hloov nws hauv cov ntaub ntawv ino. Txuas koj lub smartphone/ntsiav tshuaj/laptop rau nws. Kev ceeb toom yuav tsum tshwm thiab xa koj mus rau lub vev xaib. Yog tias tsis muaj dab tsi zoo li no tshwm sim, tsuas yog qhib koj lub browser thiab ntaus hauv 192.168.4.1. Ntawm nplooj ntawv no, nyem rau Configure WiFi thiab nkag mus rau koj cov ntaub ntawv pov thawj network. Tom qab ntawd, qhov chaw nkag yuav tsum kaw thiab LEDs hloov lawv cov xim rau lub teeb xiav. Qhov no txhais tau tias lub cuab yeej tau ua tiav txuas nrog koj lub network.

Tam sim no koj yuav tsum txiav txim siab cov cuab yeej IP chaw nyob. Ua li ntawd, koj tuaj yeem txuas nws rau koj lub computer, qhib Serial Monitor ntawm Arduino IDE (tus nqi baud yog 115200) thiab rov pib dua lub cuab yeej. Xwb, koj tuaj yeem qhib lub vev xaib ntawm koj li WiFi-router. Tom qab koj paub tus IP tus ntaus ntawv, qhib koj tus browser thiab ntaus hauv xxx.xxx.xxx.xxx/upload (qhov xs sawv ntsug rau lub hauv qab IP). Tshem cov ntaub ntawv los ntawm.rar thiab rub tawm txhua yam. Tom qab ntawd tsuas yog ntaus tus IP ntawm koj lub cuab yeej thiab nplooj ntawv tswj hwm yuav tsum qhib. Thiab los ntawm qhov ntawd, koj ua tiav kev tsim koj tus kheej lub raj mis. Nrog koj zoo siab!

Kauj Ruam 13: Lub Vev Xaib

Lub Vev Xaib
Lub Vev Xaib
Lub Vev Xaib
Lub Vev Xaib

Lub vev xaib tso cai rau koj los tswj koj lub raj mis. Thaum koj qhib nplooj ntawv tseem ceeb, koj tuaj yeem pom peb lub voj voos xiav nyob rau sab saum toj. Cov no tso cai rau koj xaiv lub nplhaib uas koj xav hloov. Lub log xim hloov cov xim uas tau xaiv thaum koj nyem rau nws. Cov lus hauv qab no qhia koj cov xim uas koj xaiv. Los ntawm kev thawb lub khawm tsis raug, lub nplhaib xaiv tau teeb tsa rau xim hom xim. Qhov no txhais tau tias cov xim hloov pauv thaum twg lub voj voog ntawm hom kev ua pa tau dhau mus.

Ntawm nplooj ntawv thib ob koj tuaj yeem xaiv hom sib txawv. Tsau cov xim thiab qhov ci ci ua raws nraim li lawv lub npe cuam tshuam. Hom kev ua pa tsim "ua pa" cov txiaj ntsig, txhais tau tias lub nplhaib ci ntsa iab nce ntxiv nyob rau lub sijhawm tshwj xeeb rau nws qhov siab tshaj, tom qab ntawd txo qis mus rau qhov tsawg kawg nkaus. Lub voj voog hom teeb tsuas yog ib qho LED rau lub sijhawm muab, tom qab ntawd teeb tom ntej, tom qab ntawd txuas ntxiv thiab ntxiv rau. Hom suab paj nruag pib hloov xim thaum twg lub microphone pom lub teeb liab siab dua tom qab ntawd tau teeb tsa kev cai. Tsis yog suab paj nruag tuaj yeem ua rau qhov no, npuaj teg, piv txwv li, tuaj yeem ib yam nkaus. Hauv VU meter hom pes tsawg tus LEDs uas lub teeb nyob ntawm qhov ntim ntawm lub suab paj nruag lub ntses bass thaj tsam.

Faj seeb: Koj tuaj yeem siv tus kav tsis tau qhib kev ua haujlwm. Piv txwv li: Yog tias koj siv hom kev hloov pauv thiab hloov qhov ci ci ntawm tus kav ntawm qhov ci ci, lub nplhaib yuav nyob hauv hom kev hloov pauv tab sis hloov lawv qhov ci raws li qhov koj tau teeb tsa.

Kauj Ruam 14: Txhua Qhov Ua Haujlwm Li Cas?

Lub hauv paus ntsiab lus ntawm kev ua haujlwm yog qhov yooj yim to taub. Thaum twg los xij koj qhib lub vev xaib, ESP8266 xa cov ntawv web mus rau koj lub cuab yeej. Tom qab ntawd, thaum koj hloov qee yam ntawm nplooj ntawv, tus yam ntxwv tshwj xeeb, feem ntau ua raws los ntawm tus lej tus lej, raug xa mus rau lub microcontroller ntawm kev sib txuas websocket. Tus tswj hwm ua cov ntaub ntawv no thiab hloov lub teeb kom haum.

Ib feem ntawm lub vev xaib tau sau ua html, css thiab javascript. Txhawm rau ua txoj haujlwm no yooj yim dua, Kuv ua rau peb ntawm Materialize CSS moj khaum thiab jQuery. Yog tias koj xav hloov pauv qhov zoo ntawm lub vev xaib, saib cov ntaub ntawv ntawm lub moj khaum. Xwb, koj tuaj yeem yooj yim sau koj tus kheej nplooj ntawv thiab upload nws. Koj tsuas yog yuav tsum tsim lub websocket txuas thiab xa tib cov ntaub ntawv.

Pom zoo: