Cov txheej txheem:

Retro LED Sawb Suab Visualizer: 4 Kauj Ruam (nrog Duab)
Retro LED Sawb Suab Visualizer: 4 Kauj Ruam (nrog Duab)

Video: Retro LED Sawb Suab Visualizer: 4 Kauj Ruam (nrog Duab)

Video: Retro LED Sawb Suab Visualizer: 4 Kauj Ruam (nrog Duab)
Video: twitch.tv/monotonetim 2017-08-06 [21:08] 2024, Hlis ntuj nqeg
Anonim
Image
Image
Daim Ntawv Teev Npe
Daim Ntawv Teev Npe

Raws li cov tub ntxhais kawm tshuab raj thiab tshuab hluav taws xob, Kuv nyiam txhua txoj haujlwm uas cuam tshuam nrog ob thaj chaw no. Kuv tau pom qee qhov DIY audio visualizers (ntawm no, ntawm no, ntawm no, thiab ntawm no), tab sis txhua tus tau plam yam tsawg ib ntawm ob lub hom phiaj uas kuv tau tsim los rau kuv tus kheej: tus kws tshaj lij tsim kom muaj txiaj ntsig zoo thiab nthuav dav loj (wimpy 8*8 LED matrix yuav tsis txaus ntawm no!). Nrog qee qhov zoo nkauj vintage, thiab zaum ntawm 40 "x 20", lub suab pom kev no ua tiav ob qho ntawm cov hom phiaj no.

Thov txim ua ntej rau cov duab ntsug. Ntau ntawm lawv raug coj mus rau social media.

Kauj Ruam 1: Daim Ntawv Teev Npe

Kuv muaj ob peb yam ntawm cov lus dag nyob ib puag ncig. Cov kev sib txuas tsuas yog siv rau kev siv xwb. Thov tsis txhob yuav cov khoom kim uas tsis tsim nyog.

Electronics

  1. WS2811 60LEDS/m @ 5m, IP30 (Tsis Waterproof), Chaw Nyob - Cov no pheej yig dua WS2812 thaum lub sijhawm. Koj muaj qee qhov tawm ntawm no tab sis xyuas kom tseeb tias qhov ntev yog qhov raug thiab koj tuaj yeem tham nrog LEDs. Tseem nco ntsoov tias WS2811s yog 12V thaum WS2812s yog 5V.
  2. 9 x 3-Pin JST Connectors + Txais
  3. DC 12V 20A (240W) Lub Hwj Huam Fais Fab-Kuv tau pib npaj ua 2 lub strips LED, thiab xav tau lub tshuab-koj-lub tsev-hais lus teeb. Txhua lub teeb pom kev zoo yog 90W hauv qhov xwm txheej tsis zoo (Kuv tsis tau ntsuas kom paub tseeb), uas ua rau kuv ~ 60W rau tus hais lus + lub suab nrov nrov. Qhov kev xaiv 15A tsuas yog $ 4 tsawg dua.
  4. Fais fab qaum (3 Prong)
  5. Arduino Uno - Kuv muaj R3 dag ib puag ncig yog li kuv siv qhov ntawd. Koj tuaj yeem tuaj yeem nrhiav qhov kev xaiv pheej yig dua los ntawm ib qho ntawm qhov tsis raug lossis lwm tus neeg muag khoom.
  6. TRRS Breakout - Rau kev pab tswv yim
  7. L7805 5V Regulator - Txhua 5V tus tswj hwm uas lees txais 12V cov tswv yim yuav ua haujlwm.
  8. 330 nF, 100 nF capacitors - rau L7805 cov ntaub ntawv
  9. 2 x 10kR, 2 x 1kR, 2 x 100 nF capacitors - rau kev tawm suab tsis ncaj ncees
  10. Lub Stereo Receiver - ib lub vintage stereo receiver yuav ua haujlwm tsuav nws muaj cov tswv yim pab (3.5mm lossis RCA). Kuv khaws Panasonic RA6600 tawm ntawm cov npe khoom lag luam rau $ 15. Kuv pom zoo txheeb xyuas Goodwill, craigslist, thiab lwm lub khw muag khoom kom zoo ib yam.*
  11. Hais lus - Tsis yog tus hais lus BT. Tsuas yog tus hais lus teeb. Ua tib zoo saib dab tsi impedance yog sib xws nrog koj tus txais. Kuv pom teeb tsa ntawm 3 20W (= nrov) hais lus ntawm Goodwill rau $ 6, thiab uas tuaj nrog "chaw" thiab ob "pem hauv ntej" tham.
  12. Logitech BT Audio Adapter - cov cuab yeej no tuaj yeem tso suab tawm mus rau tus hais lus tso suab thiab mus rau koj lub Circuit Court
  13. RCA txiv neej rau RCA txiv neej cable
  14. Aux qaum

Kho vajtse

  1. 2x6 (8ft) - Tsis kho siab. Yuav tsum yog ~ $ 6 lossis tsawg dua ntawm HD lossis Lowe's
  2. 40% Lub Teeb Hloov Acrylic - Kuv xaj 18 "x 24" x 1/8 ", thiab nws tau siv tshuab 17.75" x 23.5 ". Khaws nws hauv qhov qhwv thaum koj mus rau laser txiav.
  3. Ntoo Stain - Koj tsuas xav tau lub raj mis me me. Kuv siv Minwax liab mahogany thiab nws tawm los zoo heev. Kuv twv yuav raug hu pom lub suab tsaus. Kuv tau sim thawj lub xeev thiab nws tsis zoo li zoo nkauj.
  4. Lacquer - Ua ntej tshaj tawm, tshuaj xyuas qhov vis dis aus no los ntawm Steve Ramsey thiab txiav txim siab rau koj tus kheej tias qhov twg ua haujlwm zoo tshaj plaws. Kuv tau txais cov tshuaj tsuag tuaj yeem ib nrab ci (tsis muaj qhov ci) thiab ua siab ncaj, nws tsis ua li ntawd ntau. Tab sis kuv kuj tsuas tau ua ib lub tsho tiv no vim lub sijhawm txwv.
  5. 40 x 1/2 "Ntoo ntsia hlau - Kuv muaj lub taub hau puag ncig rau kuv tab sis kuv pom zoo siv lub tiaj tiaj yog tias koj tuaj yeem ua tau.
  6. Seem ntoo, kua nplaum gorilla, kua nplaum kub, muab tshuaj txhuam, xaim, thiab cov kab hais kom ua (velcro style, 20 nruab nrab lossis 10 loj)

* Kuv npaj tsim lub suab nrov kom ua txoj haujlwm no tag nrho "los ntawm kos," uas yuav hloov 9-13 saum toj no. Kuv vam tias yuav hloov kho cov lus qhia no nrog qhov kawg ntawm lub caij ntuj sov.

Kauj ruam 2: Prototyping

Prototyping
Prototyping

Ntu no tsis yog yam koj xav tau ua kom tiav, tab sis kuv xav qhia qhov project zoo li cas thaum nws mus.

Ntawm no, Kuv tau kaw cov LEDs hauv tus qauv nab, thiab tau sim ua kom pom kev sib kis ntawm lub thoob thoob thoob ntawm nws tus kheej (Kuv pom zoo tias yog lwm txoj hauv kev rau acrylic yog tias koj tab tom sim txiav tus nqi. Txawm hais tias koj yuav tau muab nws qee txoj kev sib txawv).

Kev teeb tsa 10x10 ua haujlwm rau kuv, tab sis koj yuav nyiam 8x12 lossis 7x14. Xav tias dawb mus sim. Ua ntej kuv muaj kuv lub tso suab, Kuv pom lub suab nrov thiab txuas nws hauv kuv lub khob cij, thiab ua ntej ntawd, Kuv tau ua suab los ntawm kuv lub laptop mus rau hauv Circuit Court rau kev tshuaj xyuas lub suab thiab ib txhij ntaus "ua si" ntawm kuv lub xov tooj kom hnov nws.

Kuv yog tus ntseeg loj hauv kev ntsuas ob zaug, txiav ib zaug. Yog li txawm koj ua dab tsi, ua raws phau ntawv qhia no thiab koj yuav raug teeb tsa.

Kauj ruam 3: Circuitry + Code

Circuitry + Code
Circuitry + Code
Circuitry + Code
Circuitry + Code
Circuitry + Code
Circuitry + Code

Cov lej muaj nyob ntawm GitHub.

Cov qhob noom xim kasfes, cov kab laug sab rau ntawm daim txiag, lossis tsim koj tus kheej PCB. Xijpeem ua haujlwm zoo tshaj rau koj ntawm no, ua nws. Kuv qhov demo ntawm no tab tom khiav ntawm lub khob cij, tab sis thaum kuv tsim lub suab nrov kuv yuav hloov txhua yam mus rau PCB. Txhawm rau kom tau txais lub zog los ntawm lub khoos phis tawj, txiav tus poj niam kawg thiab tshem cov rwb thaiv tsev dub. Siav txaus ntawm cov kab hluav taws xob tiag tiag kom ntswj nws mus rau lub dav hlau txuas. Nco ntsoov ceev faj ua haujlwm nrog AC! Lwm yam tshaj qhov ntawd, tsuas yog qee yam yuav tsum nco ntsoov ntawm no.

  1. Ib qho ntxiv yog kom paub tseeb tias koj txoj hauv kev yog qhov zoo. Koj xav tau av los ntawm tus hloov pauv mus rau Arduino rau aux input, uas tseem yuav txuas rau hauv av ntawm Logitech BT tus txais thiab los ntawm qhov av hauv lub tso suab. Yog tias ib qho ntawm cov no tau tawg lossis txuas tsis zoo, koj yuav tau txais lub suab nrov nrov heev thiab yog li cov lus nrov nrov heev.
  2. Audio Input BiasingAudio ua si dhau aux qaum, los ntawm koj lub xov tooj lossis laptop lossis txhua qhov chaw, yuav ua si ntawm -2.2 txog +2.2V. Arduino tsuas yog muaj peev xwm nyeem 0 txog +5V, yog li koj yuav tsum tsis txhob cuam tshuam cov suab tawm tswv yim. Qhov no tuaj yeem ua tiav kom muaj txiaj ntsig zoo nrog op amps, tab sis yog tias lub zog siv hluav taws xob tsis yog qhov teeb meem (tej zaum koj yuav 240W fais fab mov?), Nws kuj tseem tuaj yeem ua tiav nrog cov tiv thaiv thiab cov khoom siv hluav taws xob. Qhov tseem ceeb kuv xaiv tau txawv vim kuv tsis muaj 10uF capacitors ntawm tes. Koj tuaj yeem ua si ib puag ncig nrog lub simulator kom pom tias yam koj xaiv yuav ua haujlwm.
  3. Txhua txoj haujlwm uas siv Fourier hloov pauv yuav muaj ntu keeb kwm tham txog lawv. Yog tias koj twb muaj kev paub dhau los, zoo heev! Yog tias tsis yog, txhua yam koj yuav tsum nkag siab yog tias lawv coj lub teeb liab ntawm lub teeb liab thiab xa cov ntaub ntawv hais txog qhov zaus uas muaj nyob hauv cov teeb liab ntawd nyob rau lub sijhawm ntawd. Yog li yog tias koj coj Fourier hloov pauv ntawm kev txhaum (440 (2*pi*t)), nws yuav qhia koj tias muaj 440Hz zaus nyob hauv koj lub teeb liab. Yog tias koj coj Fourier hloov pauv ntawm 7*kev txhaum (440 (2*pi*t)) + 5*kev txhaum (2000 (2*pi*t)), nws yuav qhia koj tias ob qho tib si 440Hz thiab 2000Hz teeb liab muaj, thiab cov txheeb ze qib uas lawv nyob tam sim no. Nws tuaj yeem ua qhov no rau txhua lub teeb liab nrog ib tus lej ntawm cov haujlwm ua haujlwm. Txij li txhua lub suab ib txwm yog ib qho ntawm cov sinusoids, peb tuaj yeem siv Fourier hloov pauv ntawm pawg ntawm cov duab me me thiab pom dab tsi tshwm sim tiag tiag. hloov Ntau ntawm qhov ntawd tuaj yeem pom ntawm no, tab sis piav qhia luv luv yog tias lub teeb liab peb yeej kawg muab qhov hloov pauv zoo ib yam, thiab lub qhov rais kho qhov ntawd rau peb. Koj tus lej yuav tsis tawg yog tias koj tsis siv lawv, tab sis cov zaub yuav tsis zoo li qub. Tej zaum yuav muaj cov txheej txheem zoo dua (YAAPT, piv txwv li), tab sis ua raws cov hauv paus ntsiab lus ntawm KISS, Kuv tau xaiv los siv dab tsi twb muaj lawm, uas yog ob peb qhov zoo sau Arduino tsev qiv ntawv rau Kev Hloov Pauv Fourier, lossis FFT.
  4. Puas yog Arduino tuaj yeem ua tiav txhua yam hauv lub sijhawm tiag tiag? Yog tias koj xav tau 1/16th ceeb toom qhov tseeb ntawm 150bpm (ze rau qhov kawg ntawm qhov kawg ntawm cov nkauj feem ntau), koj yuav tsum tau ua txhua yam hauv 100msec. Ib qho ntxiv, tib neeg lub qhov muag tuaj yeem pom ntawm 30FPS, uas sib haum rau 30msec thav duab ntev. Cov ntawv tshaj tawm blog no tsis ua rau kuv muaj kev ntseeg siab tshaj plaws, tab sis kuv txiav txim siab pom rau kuv tus kheej yog tias Arduino yuav tuav tau. Cov lej suav yog nyob deb ntawm qhov txwv, tab sis kuv tuaj yeem ua tiav 128 qhov ntev FFT ntawm UINT16s hauv tsuas yog 70msec. Qhov no tsis pub dhau lub suab lees paub, tab sis ntau dua ob npaug qhov muag pom. Ntawm kev tshawb fawb ntxiv, Kuv pom Arduino FHT, uas ua kom zoo dua FFT sib npaug thiab tsuas yog suav qhov tseeb tiag. Hauv lwm lo lus, nws hais txog 2x nrawm dua. Thiab paub meej txaus, nws coj tag nrho lub voj nrawm mus rau ~ 30msec. One lwm qhov ntawv ntawm no ntawm cov lus daws teeb meem. Qhov ntev N FFT piv txwv ntawm Fs Hz xa rov qab N bins, qhov twg kth bin sib raug rau k * Fs/N Hz. Arduino ADC, uas tau nyeem lub suab tawm tswv yim thiab coj mus kuaj, ib txwm ua haujlwm ntawm ~ 9.6kHz. Txawm li cas los xij, FFT tsuas tuaj yeem xa cov ntaub ntawv hais txog zaus ntau txog 1/2 * Fs. Tib neeg tuaj yeem hnov txog 20kHz, yog li peb xav xav ua piv txwv ntawm> 40kHz. ADC tuaj yeem raug nyiag kom khiav nrawm dua, tab sis tsis pom qhov twg nyob ze. Qhov txiaj ntsig zoo tshaj plaws uas kuv pom yam tsis poob kev ruaj ntseg yog ntawm 14kHz ADC. Ib qho ntxiv, FFT loj tshaj plaws kuv tuaj yeem ua rau tseem tau txais lub sijhawm tiag tiag yog N = 128. Qhov no txhais tau tias txhua lub thoob sawv cev ~ 109Hz, uas yog qhov zoo ntawm ntau zaus tab sis tsis zoo ntawm qhov kawg. Tus neeg pom kev zoo sim khaws ib qho octave rau txhua lub bar, uas sib haum rau kev sib cais ntawm [16.35, 32.70, 65.41, 130.81, 261.63, 523.25, 1046.50, 2093.00, 4186.01] Hz. 109Hz txhais tau hais tias thawj 2.5 octaves tag nrho hauv ib lub thoob. Kuv tseem tuaj yeem tau txais qhov pom kev zoo, ib feem los ntawm qhov nruab nrab ntawm txhua lub thoob, qhov twg ib lub thoob yog ib pawg ntawm cov thoob ntawm ob ntawm cov ciam teb no. Kuv vam tias qhov no tsis nkag siab, thiab tus lej nws tus kheej yuav tsum qhia meej tias yog dab tsi tiag tiag, tab sis xav tias yuav nug hauv qab no yog tias nws tsis nkag siab.

Kauj ruam 4: Sib dhos

Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke
Los ua ke

Raws li kuv tau hais ua ntej, Kuv xav tau qee yam nrog kev tsim qauv zoo. Thaum xub thawj kuv pib ntoo gluing slats ua ke, tab sis ib tus phooj ywg (thiab cov kws txawj siv tshuab ua haujlwm zoo) qhia txog txoj hauv kev sib txawv. Nco ntsoov tias 2x6 yog tiag tiag 1.5 "x 5". Thiab thov ceev faj ua haujlwm nrog ib qho ntawm cov tshuab hauv qab no.

  1. Coj koj 2x6x8 thiab xuab zeb yog tias xav tau. Txiav nws mus rau 2 "x 6" x 22 "ntu. Qhov no muab rau koj ob slats rau" hlawv "yog tias koj cuam tshuam.
  2. Siv txhua 22 "ntu thiab khiav nws los ntawm lub rooj pom ntev mus ua 1.5" x ~ 1.6 "x 22" slats. Qhov thib peb zaum kawg yuav nyuaj rau txiav ntawm lub rooj pom, yog li koj tuaj yeem hloov mus rau ib pab pawg pom. Tsuas yog xyuas kom txhua yam ncaj ncaj raws li tuaj yeem ua tau. Ib qho ntxiv, 1.6 "yog phau ntawv qhia, thiab tuaj yeem nce mus txog 1.75". Qhov ntawd yog kuv daim, tab sis tsuav yog lawv txhua tus sib npaug ib leeg nws tsis muaj teeb meem ntau. Qhov txwv txwv yog acrylic ntawm 18 ".
  3. Qhov kawg ntawm daim, khij lub U-puab uas yog 1/8 "hauv ob sab thiab me ntsis ntau dua 3/4" sib sib zog nqus. NCO TSEG: Yog tias koj siv acrylic sib txawv, qhov tob yuav hloov. Ntawm <3/4 ", kuv cov acrylic tsis nthuav tawm lub teeb hlo li. Ntawm qhov me ntsis ntxiv, nws nthuav tawm tag nrho. Koj xav kom zam ib qho" beadiness. "Kuv pom qhov Hackaday tshaj tawm no yog qhov siv tau zoo, tab sis tau txais kev nthuav tawm zoo meej yog nyuaj heev!
  4. Nrog lub xov tooj ntawm tes router, txiav tawm qhov nruab nrab U txhua txoj hauv kev nqes hav. 22 "yog ntev dua qhov koj xav tau, yog li tsis txhob txhawj txog chipping qhov kawg yog tias koj ua. Routers tuaj yeem ua qhov nyuaj, tab sis tau txais me ntsis uas dav dua me ntsis ib nrab ntawm qhov dav ntawm U thiab ua tib zoo txiav ntau dua 1/ 8 "khoom ntawm ib lub sijhawm. Rov Ua Dua: Tsis txhob sim ua txhua yam hauv 2 kis. Koj yuav ua rau ntoo puas thiab yuav ua rau koj tus kheej raug mob. Ua haujlwm nrog lub router kev sib hloov ntawm kev txiav 1-4, thiab ua haujlwm tawm tsam nws ntawm 5-8. Qhov no ua kom ntseeg tau tias koj muaj kev tswj hwm zoo tshaj ntawm lub router lub zog.
  5. Txiav cov hlua LED rau hauv 30-ntu ntu (tsuas yog txhua txheej ntawm 3 LEDs yog qhov chaw nyob). Tej zaum koj yuav xav tau desolder ob peb qhov kev sib txuas. Muab cov kab ntawv tso rau ntawm txoj kab. Ib sab yuav tsum zaum yaug, thiab lwm qhov yuav tsum muaj chav me me rau JST qhov chaw txais tau, uas yuav zaum yaug. Hmoov tsis kuv tsis tau daim duab ntawm no, tab sis pom daim duab txuas. Kos qhov ntev ntawm no, tab sis tsis txhob txiav dab tsi.
  6. Ntsuas qhov dav ntawm txhua qhov slat. Nrog qhov no thiab qhov ntev los ntawm qib 7, laser txiav cov acrylic rau hauv 10 daim duab plaub tsim nyog. Nws zoo dua kom ntev me ntsis me ntsis luv dua. Yog tias nws tau hlawv, so nws nrog isopropyl.
  7. Paub meej tias txhua qhov acrylic slat zaum ntawm qhov ntev uas koj tau kos rau hauv qib 5, tom qab ntawv txiav cov ntoo kom ntev li no.
  8. Tam sim no koj xav tau ob daim choj los txuas cov acrylic. Qhov no tso cai rau kev saib xyuas yooj yim ntawm daim kab xev yuav tsum muaj dab tsi tshwm sim. Cov ntawv no yuav tsum yog ntxhib [koj qhov dav] - 2 * 1/8 "ntev nrog 1/2" square ntsej muag, tab sis lawv yuav tsum haum nruj me ntsis. Nrog cov ntawv no khov kho nyob rau hauv qhov chaw thiab yaug nrog lub ntsej muag pem hauv ntej ntawm slats, laum qhov hla nruab nrab ntawm txhua tus choj los ntawm sab nraud ntawm slats. Ua koj qhov zoo tshaj plaws los ua txhua qhov kev xyaum txawm tias. Tsis txhob khaws cov choj txuas rau hauv, tab sis xyuas kom lawv tuaj yeem ua tau. Ceev faj tsis txhob tsav cov ntsia hlau nqes mus deb thiab muab ntoo cais.
  9. Txij ntawm no mus, stain cov slats thiab siv txhua qhov ua tiav.
  10. Tam sim no ntsia hlau hauv tus choj. Xyuas kom lawv zaum zaum yaug! Yog tsis yog, koj yuav tsum tau ntxiv qee yam shim. Siv cov kua nplaum nplaum (nyiam dua) lossis kua nplaum kub (uas tuaj yeem ua ob zaug ua shim) rau cov choj thiab txuas cov acrylic. Tsis txhob siv ib qho nplaum raws tus slat nws tus kheej.
  11. Solder JST cov khoom rau ib sab ntawm txhua qhov tab sis ib qho LED sawb. Muab lawv tag nrho rau tib qhov kawg raws li muab los ntawm cov cim cim. Muab cov xov hlau ntawm JST ntsaws rau lwm qhov kawg. Tej zaum koj yuav xav tau xaim xov hlau ntau ntxiv ntawm txhua qhov txuas. Nco ntsoov tias kev sib txuas yuav raug thaum plugged! Cov nplaum rau sab nraum qab ntawm LEDs yog qhov txaus ntshai, yog li tsis txhob ntseeg nws. Muab cov LEDs tso rau hauv nruab nrab txoj kab thiab ua kua nplaum rau lawv nrog cov kua nplaum gorilla, ua tib zoo saib xyuas cov lus qhia ntawm kab ntawv. Nco ntsoov tias koj tab tom ua txhua yam.
  12. Nyob rau thawj slat, siv cov xov hlau ntev txaus kom tau txais lub zog + hauv av los ntawm lub adapter thiab lub teeb liab los ntawm Arduino.
  13. Ntsia cov ntoo thiab cov choj rov qab. Txuas cov kab hais kom ua rau sab nraub qaum (velcro style, 2 nruab nrab rau saum thiab hauv qab lossis 1 loj hauv nruab nrab). Ua txhua qhov kev sib txuas tsim nyog, thiab dai ntawm phab ntsa ntawm ~ 3 "sib nrug. Txaus siab rau cov txiv hmab txiv ntoo ntawm koj txoj haujlwm.

Pom zoo: