Cov txheej txheem:

Arduino FFT Visualizer Nrog LEDs Chaw Nyob: 4 Cov Kauj Ruam
Arduino FFT Visualizer Nrog LEDs Chaw Nyob: 4 Cov Kauj Ruam

Video: Arduino FFT Visualizer Nrog LEDs Chaw Nyob: 4 Cov Kauj Ruam

Video: Arduino FFT Visualizer Nrog LEDs Chaw Nyob: 4 Cov Kauj Ruam
Video: Easy Audio Visualizer Using Arduino FFT 2024, Hlis ntuj nqeg
Anonim
Image
Image
Arduino FFT Visualizer Nrog LEDs nyob tau
Arduino FFT Visualizer Nrog LEDs nyob tau

Phau ntawv qhia no yuav piav qhia yuav ua li cas tsim Lub Suab Visualizer nrog Arduino Uno thiab qee qhov chaw nyob LEDs. Nov yog qhov haujlwm uas kuv tau xav ua rau qee lub sijhawm tam sim no vim tias kuv yog tus nqus rau lub teeb hluav taws xob. Cov teeb no siv FFT (Fast Fourier Transform) lub tsev qiv ntawv los suav qhov zaus nce siab tau hnov los ntawm kev ua hauv mic thiab qhia txhua zaus hauv xim sib txawv.

Kuv tau npaj ua ntej yuav suav nrog lub pob thiab qee qhov kev xaiv rau cov zaub tab sis kuv tsis tau muaj sijhawm los sau cov cai rau nws. Yog tias koj muaj qee qhov kev paub dhau los ntawm Arduino nws yuav tsum tsis txhob nyuaj rau koj los hloov kuv cov cai kom suav nrog lwm cov duab lossis txawm tias tsuas yog xim sib txawv. Al koj yuav tsum tau ntxiv yog khawm nrog 330 ohm resistor.

Code:

STL: https://www.thingiverse.com/thing 4541177

Khoom siv

Elegoo tau ua siab zoo heev thiab xa kuv cov khoom Arduino pib ua haujlwm rau qhov haujlwm no! Koj yuav xav khaws ib qho yog tias koj tshiab rau Arduino lossis txawm tias koj tsuas yog xav tau qee qhov tshwj xeeb ntxiv: Siv cov koom nrog txuas mus txhawb kuv cov ntsiab lus!

amzn.to/3fqEkIJ

Nov yog txhua yam siv:

1/8 Plywood - Lub khw muag khoom kho vajtse hauv zos

Coj Sawb (5m 30 leds/m) -

Acrylic Sheets -

Mic -

Hlau -

Hlau stripper -

Rab Phom Kub Kub -

Soldering Iron -

3D Tshuab Luam Ntawv -

Cov ntsiab lus -

Kauj Ruam 1: Txiav lub hauv paus thiab xuab zeb Acrylic

Txiav lub hauv paus thiab xuab zeb Acrylic
Txiav lub hauv paus thiab xuab zeb Acrylic
Txiav lub hauv paus thiab xuab zeb Acrylic
Txiav lub hauv paus thiab xuab zeb Acrylic

Txiav ntoo rau hauv 1 'x 1' square (lossis phim qhov loj ntawm koj cov acrylic). Qhov no tuaj yeem ua tiav nrog lub ntsej muag pom lossis tes yog tias koj tuaj yeem khaws cov npoo plaub fab, tab sis nws yooj yim tshaj plaws nrog miter lossis rooj pom.

Xuab zeb ob sab ntawm daim ntawv acrylic nrog cov ntawv xuab zeb qis ua kom khov nws. Qhov no tuaj yeem ua tiav nrog lub sander lossis los ntawm txhais tes. Zam cov ntawv xuab zeb siab vim tias koj yuav tso cov pa loj hauv cov khoom uas yuav ua kom puas tas.

Kauj Ruam 2: Hlau LEDs thiab Mic

Hlau LEDs thiab Mic
Hlau LEDs thiab Mic
Hlau LEDs thiab Mic
Hlau LEDs thiab Mic
Hlau LEDs thiab Mic
Hlau LEDs thiab Mic

Txiav koj cov hlua LED rau hauv 8 qhov ntev ntawm 8 LEDs. Muab lawv tso rau ntawm lub hauv paus ntoo, sib nrug sib nrug thiab hloov cov lus qhia. Ua tib zoo mloog cov xub, cov kab ntawv LED no tsuas ua haujlwm ib txoj hauv kev. Solder peb qhov kev tso tawm ntawm txhua kab ntawv mus rau peb qhov kev nkag ntawm kab ntawv tom ntej. Txuas cov tswv yim ntawm thawj kab ntawv mus rau arduino board, yog tias koj siv kuv tus lej Kuv siv tus pin 2 rau Cov Ntaub Ntawv.

Ua ntej tig koj cov hlau txuas kom paub tseeb tias sim koj qhov kev sib txuas nrog FastLED piv txwv kos duab. Kuv nyiam siv ColorPallets.

Qhov no kuj yog lub sijhawm zoo los txuas lub mic rau Arduino. Txuas lub zog rau 3.3V cov zis thiab cov ntaub ntawv rau A0. Koj tuaj yeem sim qhov no nrog kos duab los ntawm kuv nplooj GitHub.

Kauj ruam 3: Upload Code

Nws yog ib qho tseem ceeb los sim cov duab kos nrog koj qhov teeb tsa zaum kawg ua ntej koj muab tshuaj txhuam dab tsi mus tas li. Yog tias ib yam twg tsis ua haujlwm nws yuav yooj yim dua los kho tam sim no dua tom qab. Daim duab kuv tau sau tuaj yeem pom ntawm no:

github.com/mrme88/Arduino-Audio-Visualizer/blob/master/FFT_Visualizer.ino

Qhib nws hauv Arduino IDE thiab xyuas kom tseeb tias txhua qhov txiaj ntsig nyob rau sab saum toj tom ntej #DEFINE cov nqe lus phim koj teeb tsa. Thaum cov duab kos tau rub tawm thiab zoo li ua haujlwm raug koj tuaj yeem txav mus rau theem kawg.

Kauj Ruam 4: Rooj Sib Tham Kawg

Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg
Los Ua Ke Kawg

3D luam plaub plaub 1 spacers kom cais cov acrylic los ntawm LEDs. Yog tias koj tsis muaj lub tshuab luam ntawv 3D koj tuaj yeem siv lwm yam los kho qhov spacers no. Cardboard lossis ntoo thaiv yuav ua haujlwm zoo. Kub kua nplaum spacer hauv txhua qhov ntawm plaub fab thiab lo koj Arduino thiab mic nyob qhov twg hauv qab kom Arduino tuaj yeem tau txais lub zog thiab lub mic tuaj yeem hnov suab nrov.

Kev xaiv koj tuaj yeem laum qee qhov nyob tom qab kom yooj yim phab ntsa teeb nrog ob peb tus ntiv tes xoo. Xwb koj tuaj yeem tso qhov no los ua lub rooj dai kom zoo nkauj lossis hais kom rub nws rau ntawm phab ntsa.

Thaum kawg kub kua nplaum acrylic rau lub spacers hauv txhua lub ces kaum thiab cia nws qhuav. Tam sim no koj muaj lub ntsej muag LED zoo nkauj uas koj tuaj yeem siv ua rau cov phooj ywg zoo siab lossis lom zem rau koj tus kheej!

Pom zoo: