Cov txheej txheem:

Arduino Synthesizer: 20 Kauj Ruam (nrog Duab)
Arduino Synthesizer: 20 Kauj Ruam (nrog Duab)

Video: Arduino Synthesizer: 20 Kauj Ruam (nrog Duab)

Video: Arduino Synthesizer: 20 Kauj Ruam (nrog Duab)
Video: $20 DIY Arduino Synth Example Sounds through Zoom CDR-70 2024, Kaum ib hlis
Anonim
Lub Arduino Synthesizer
Lub Arduino Synthesizer

Arduino muaj peev xwm tso suab los ntawm lub tsev qiv ntawv uas tau tsim los hu ua Tone Library. Los ntawm kev tsim cov kev sib tham thiab cov haujlwm uas tuaj yeem hu qee qhov tseem ceeb kom tso tawm rau lub suab tawm, Arduino Synthesizer yog lub cuab yeej muaj zog rau ua lub tshuab ua suab nrov. Nws siv cov txheej txheem sib xyaw ua ke kom tsim lub suab sib txawv uas tuaj yeem muaj kev lom zem ntau rau cov kws ntaus nkauj, cov kws ua yeeb yam, cov kws tshaj lij, thiab cov nyiam ua haujlwm.

Kauj Ruam 1: Nws Ua Haujlwm Li Cas

Nws Ua Haujlwm Li Cas
Nws Ua Haujlwm Li Cas

Lub suab tau tsim los ntawm kev ua si tib lub suab zoo, lossis kuaj (ib qho me me ntawm ib ncig ntawm 1 txog 50ms) ntau thiab ntau dua ntawm qhov nrawm heev. Peb lub pob ntseg thiab lub paj hlwb tig qhov no mus rau hauv lub suab sib xyaw ntawm qhov rov ua dua thiab qhov qub, thiab nws zoo li lub suab tsis tu ncua.

Cov nplej muaj ob lub voos plaub voos ntawm qhov hloov pauv tau, thiab kho tau tus nqi lwj. Tus nqi rov ua dua tau teeb tsa los ntawm lwm qhov kev tswj hwm.

Kauj Ruam 2: Cov Khoom Siv thiab Cov Cuab Yeej

Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej

Txhawm rau ua txoj haujlwm no, koj yuav xav tau cov khoom hauv qab no.

Qhov:

(5X) 5K potentiometer (5X) Potentiometer pob qhov rooj (3X) LEDs (1X) SPDT hloov (1X) Lub teeb nyob ntawm tus yees duab Resistor (1X) Arduino (1X) Arduino Protoboard (1X) Tactile Switch (1X) Project enclosure (1X) 1/ 8 Audio Jack (1X) tag nrho ntau ntawm cov tub ntxhais hlau (1X) cua sov ntsws (1X) lub thawv ntawv (1X) jumper xaim (3X) 10K ohm resistors (3X) 220 resistors (1X) 9V roj teeb (1X) 9V roj teeb clip (1X) loj M coaxial DC fais fab ntsaws

Cov Cuab Yeej:

  • cam khwb cia hlau
  • laug
  • dej ntws
  • kua nplaum
  • multimeter
  • laum

Kauj Ruam 3: Txoj Cai, Daim Duab Circuit, thiab Lub Hwj Chim

Code, Circuit Diagram, thiab Fais Fab
Code, Circuit Diagram, thiab Fais Fab
Code, Circuit Diagram, thiab Fais Fab
Code, Circuit Diagram, thiab Fais Fab

Kuv tau txuas cov cai rau Arduino rau Cov Lus Qhia no. Koj yuav xav tau USB 2.0 txhawm rau rub nws mus rau koj lub rooj tsavxwm. Tom qab koj tau xa cov cai los ntawm koj lub khoos phis tawj, mus tom ntej thiab txuas Proto Shield rau koj Arduino.

Koj muaj ntau txoj kev xaiv thaum nws los txog rau lub zog. Arduino muaj peev xwm khiav ntawm 9v phab ntsa wart fais fab mov, lossis koj tuaj yeem siv lub roj teeb 9V nrog lub roj teeb txuas mus rau qhov loj M coaxial DC fais fab ntsaws. Koj kuj tseem tuaj yeem siv zog ntawm koj lub USB cable. Daim duab qhia chaw tau ua nrog Fritzing, nws kuj tseem tau txuas nrog rau theem no.

Kauj Ruam 4: Siv Breadboard

Siv Breadboard
Siv Breadboard
Siv Breadboard
Siv Breadboard
Siv Breadboard
Siv Breadboard

Los ntawm kev siv lub khob cij los tsim lub Circuit Court ua ntej, nws yog qhov yooj yim dua los hloov lub Circuit Court mus rau koj Protoboard tom qab. Khiav cov xov hlau los ntawm GND thiab 5V mus rau - thiab + txoj kab ntawm koj lub khob cij.

Tom qab ntawd, txuas cov kab hluav taws xob los ntawm cov hwj huam mus rau Analog Input 0-4 ntawm Arduino. Cov sab xis thiab sab laug yuav txuas nrog cov tsheb nqaj hlau hauv av, thiab txoj kev tsheb nqaj hlau zoo ntawm lub khob cij. Kev sib txuas cov potentiometers yuav tswj hwm cov qoob loo, zaus, thiab lwj ntawm cov khoom sib xyaw. Analog in 0: Grain 1 pitch Analog in 1: Grain 2 decay Analog in 2: Grain 1 decay Analog in 3: Grain 2 pitch Analog in 4: Grain repetition frequency

Kauj Ruam 5: Hlau Koj Lub Suab Jack

Hlau Koj Lub Suab Jack
Hlau Koj Lub Suab Jack
Hlau Koj Lub Suab Jack
Hlau Koj Lub Suab Jack

Cov xov hlau txuas rau koj li 1/8 mono audio jack, ua rau koj ua ncaj ncees ntev. Txuas koj tus coj zoo mus rau PWM ~ 3 ntawm Arduino. Koj yuav xav tau 10K ohm resistor ntawm arduino board thiab qhov ua tau zoo ntawm koj lub suab nkaus Txuas qhov tsis zoo ntawm koj lub jack rau hauv av tsheb nqaj hlau.

Kauj Ruam 6: Txuas Koj Tus Photoresistor

Txuas koj Photoresistor
Txuas koj Photoresistor

Ib txoj hauv kev ntawm koj lub photoresistor tau txuas ncaj qha rau koj 5V txoj kev tsheb nqaj hlau zoo ntawm lub khob cij, nrog rau Analog Input 5 ntawm Arduino. Lwm cov hlau lead ntawm tus kws yees duab txuas nrog 10K ohm tiv thaiv kev tsheb nqaj hlau hauv av.

Kauj Ruam 7: Txuas SPDT Hloov

Txuas SPDT Hloov
Txuas SPDT Hloov

Txuas lub teeb liab, nruab nrab, coj koj tus SPDT hloov mus rau Digital pin 02 ntawm Arduino. Cov uas tseem tshuav txuas nrog hauv av, thiab 5V txoj kev tsheb nqaj hlau uas tawm tsam los ntawm 10K ohm resistor.

Kauj Ruam 8: Hlau Tactile Hloov

Hlau Tactile Hloov
Hlau Tactile Hloov
Hlau Tactile Hloov
Hlau Tactile Hloov

Qhov hloov pauv tau yooj yim muaj plaub txoj hauv kev. Tso cai kom hloov mus rau ntawm tus choj ntawm lub khob cij. Txuas ib qho ntawm ob txoj kab sib txuas rau koj 5V txoj kev tsheb nqaj hlau zoo ntawm lub rooj noj mov, thiab lwm qhov mus rau 10K ohm tiv thaiv tus pin hauv av. Qhov kev sib txuas zaum kawg ntawm koj lub peev xwm hloov pauv txuas lub teeb liab xaim ntawm qhov hloov pauv thiab Digital Pin 6 ntawm Arduino.

Kauj Ruam 9: Txuas cov LEDs

Txuas cov LEDs
Txuas cov LEDs

Kauj ruam 10: Xeem nws

Kuaj Nws!
Kuaj Nws!

Nov yog qhov ua tiav breadboarded Circuit. Kuaj nrog ib khub ntawm lub mloog pob ntseg, lossis txuas rau tus hais lus me me. Yog tias koj siv lub mloog pob ntseg, qhov no yog tso tawm mono, thiab nws yuav nrov nrov. Tsis txhob tso koj lub mloog pob ntseg ncaj qha rau ntawm koj lub pob ntseg thaum tua hluav taws no.

Kauj Ruam 11: Laum qhov thaiv

Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure
Laum qhov Enclosure

Laum tawm qhov nyob hauv qhov phiaj xwm phiaj xwm rau txhua qhov khoom siv uas tau muab tso rau hauv lub khob cij. Kuv siv tus cwj mem xim kub los cim qhov twg kuv xav tau kuv lub qhov.

Laum tsib qhov rau lub zog loj. Tsib qhov me me hauv ib lub xwmfab rau kev hloov pauv. Peb khub ntawm qhov me me rau txhua tus ntawm LEDs Ob lub qhov nyob ze ua ke rau lub photoresistor. Ib lub qhov rau koj lub suab tso suab. Ib qhov ntxiv rau SPDT hloov.

Kauj Ruam 12: Pib Ntxiv Cov Cheeb Tsam rau Qhov Ruaj Ntseg

Pib Ntxiv Cov Cheeb Tsam rau Qhov Ruaj Ntseg
Pib Ntxiv Cov Cheeb Tsam rau Qhov Ruaj Ntseg
Pib Ntxiv Cov Cheeb Tsam rau Qhov Ruaj Ntseg
Pib Ntxiv Cov Cheeb Tsam rau Qhov Ruaj Ntseg

Xov tsib lub hwj chim los ntawm lub qhov uas tau raug laum, tom qab ntawd ruaj ntseg rau hauv qhov chaw.

Kauj Ruam 13: Ntxiv Tshooj Ntawm Cov Cheeb Tsam

Ntxiv Cov Cheeb Tsam Ntxiv
Ntxiv Cov Cheeb Tsam Ntxiv
Ntxiv Cov Cheeb Tsam Ntxiv
Ntxiv Cov Cheeb Tsam Ntxiv

Ruaj ntseg cov LEDs, hloov SPDT, hloov lub peev xwm, lub mloog lub suab, thiab tus kws yees duab tso rau hauv qhov chaw. Ib dab ntawm cov kua nplaum kub ua haujlwm zoo kom nrawm tag nrho cov khoom no.

Kauj Ruam 14: Txuas Lub Suab Jack rau Protoboard

Hlau Lub Suab Jack rau Protoboard
Hlau Lub Suab Jack rau Protoboard
Hlau Lub Suab Jack rau Protoboard
Hlau Lub Suab Jack rau Protoboard
Hlau Lub Suab Jack rau Protoboard
Hlau Lub Suab Jack rau Protoboard

Ob peb kauj ruam tom ntej piav qhia yuav ua li cas txav lub Circuit Court los ntawm lub khob cij mus rau Protoboard. Vim tias txhua yam ntawm koj cov khoom siv tau ruaj ntseg rau hauv lub thawv ntawv, nws yuav yooj yim rau siv xov hlau los ntawm koj cov khoom mus rau lub rooj tsavxwm.

Cov hlau lead ua cov hlau txuas rau txhua qhov khoom siv hauv lub thawv ntawv, siv cov xov tooj liab thiab dub sib txuas ua ke kom pom tias qhov ua tau zoo thiab tsis zoo. Ntawm Protoboard, txuas ib lub xaim rau tus lej digital 3, thiab txuas rau hauv qhov chaw, khiav lub xov hlau txuas mus rau nruab nrab ntawm lub rooj tsavxwm kom koj tuaj yeem tsoo txoj kab nrog tib 10K ohm resistor los ntawm lub khob cij. Thaum koj muab cov no tso rau hauv qhov chaw, xyuas kom tseeb tias koj tso cov laug kom txaus rau ntawm lub rooj tsavxwm kom txuas cov xaim mus rau tus tiv thaiv.

Kauj Ruam 15: Cov Cuab Yeej hauv Cov Kws Tshaj Lij rau Kev Tiv Thaiv Duab, Tactile Hloov, thiab SPDT Hloov

Solder in the Resistors for Photo Resistor, Tactile Switch, and SPDT Switch
Solder in the Resistors for Photo Resistor, Tactile Switch, and SPDT Switch

Txuas ob lub xov hlau jumper los ntawm cov tsheb nqaj hlau hauv av, thiab xaim xaim xaim los ntawm txoj kev tsheb nqaj hlau zoo, tawm mus rau nruab nrab ntawm pawg thawj coj saib. Tsim kev sib txuas rau koj qhov seem 10K ohm resistors.

Txuas ib lub xov hlau me me los ntawm Analog 5 uas yuav khiav mus rau tus thawj coj ntawm tus yees duab tiv thaiv.

Kauj Ruam 16: Tua Koj Cov LEDs Rau Hauv Qhov Chaw

Muab koj cov LEDs tso rau hauv qhov chaw
Muab koj cov LEDs tso rau hauv qhov chaw

Txuas 3 220 Ohm resisotrs rau tus pin 9-11 ntawm Protoboard, tog lwm qhov kawg ntawm cov neeg tawm tsam rau hauv qhov qhib qhov ntawm lub protoboard, thiab tom qab ntawd muab cov xov hlau rau koj LEDs.

Daisy txuas cov xov hlau hauv av rau cov LEDs, tom qab ntawd khiav ib lub xov hlau hauv av rov qab rau hauv txoj kev tsheb nqaj hlau ntawm Protoboard.

Kauj Ruam 17: Hlau lub Potentiometers rau Protoboard

Hlau tus Potentiometers rau Protoboard
Hlau tus Potentiometers rau Protoboard

Daisy saw cov txiaj ntsig zoo thiab hauv av coj los ntawm cov peev txheej ua ke, tom qab ntawd ntxig lawv rau hauv lawv cov kab sib txawv ntawm Protoboard.

Hlau xaim cov xov hluav taws xob ntawm lub zog ntsuas mus rau Analog 0-4, Kuv khaws cov qoob loo thiab cov pob qhov zaus ntawm thawj kab ntawm pob qhov rooj, thiab cov pob qhov sib txuas hauv qab lawv. Ib zaug ntxiv, cov xov hluav taws xob sib txuas ua ke raws li: Analog hauv 0: Grain 1 pitch Analog hauv 1: Grain 2 decay Analog in 2: Grain 1 decay Analog in 3: Grain 2 pitch Analog in 4: Grain repetition frequency

Kauj Ruam 18: Txuas Koj Cov Pob Ntseg Rau Koj Cov Kws Muaj Peev Xwm

Txuas koj cov pob qhov rooj rau Koj Cov Kws Muaj Peev Xwm
Txuas koj cov pob qhov rooj rau Koj Cov Kws Muaj Peev Xwm

Xoom tag nrho koj cov potentiometers tawm, tom qab ntawv kho kab ntawm lub pob qhov rooj nrog xoom txoj haujlwm ntawm lub zog potentiometer.

Siv lub taub hau me me ntswj taub hau, txuas koj lub pob qhov taub.

Kauj Ruam 19: Txuas Protoboard mus rau Arduino

Txuas Protoboard mus rau Arduino
Txuas Protoboard mus rau Arduino
Txuas Protoboard mus rau Arduino
Txuas Protoboard mus rau Arduino
Txuas Protoboard mus rau Arduino
Txuas Protoboard mus rau Arduino

Txuas cov xov hluav taws xob luv luv ntawm Protoboard mus rau txoj kab ntev hauv qhov thaiv. Muab cov xov hlau txuas ntxiv rau hauv txoj kev tsheb nqaj hlau, thiab 5V tsheb nqaj hlau ntawm Protoboard, feem.

Snap lub Protoboard tso rau saum Arduiono. Plug nws, kaw nws, thiab koj npaj txhij jam!

Kauj ruam 20: Ua Si Nrog Nws

Ua Si Nrog Nws!
Ua Si Nrog Nws!

Txhua qhov hloov pauv thiab lub hwj chim muaj peev xwm hloov pauv tau! tsis txhob siv tag nrho cov potentiometers sim hloov txhua ntawm lawv nrog cov duab tiv thaiv, lossis ua ke ntawm ob.

Cov neeg siv: https://blog.lewissykes.info/daves-auduino/ https://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation https://arduino.cc/en/Tutorial/Tone

Pom zoo: