Cov txheej txheem:

Automated MIDI Xylophone: 6 Kauj Ruam (nrog Duab)
Automated MIDI Xylophone: 6 Kauj Ruam (nrog Duab)

Video: Automated MIDI Xylophone: 6 Kauj Ruam (nrog Duab)

Video: Automated MIDI Xylophone: 6 Kauj Ruam (nrog Duab)
Video: Making Phone Sounds in Real Life! #music #phone #sound 2024, Kaum ib hlis
Anonim
Image
Image

Hauv cov lus qhia no peb yuav tshawb xyuas seb hluav taws solenoids siv Arduino Uno thiab MIDI cov cim. Ib qho ntawm cov ntawv thov zoo tshaj plaws rau qhov no yog los tsim lub tshuab xylophone uas siv lub tshuab. Thaum qhov no tsuas yog qhia, Arduino code thiab cov lej hluav taws xob yuav muab.

Ua ntej sim daws qhov haujlwm no koj yuav tsum muaj:

  • Kev txawj ntoo ntoo yooj yim
  • Kev txawj ntse
  • Kev nkag siab ntawm Arduino platform
  • Ua siab ntev ntau.

Cov khoom thiab cov khoom tuaj yeem nrhiav tau ntawm tus muag khoom uas koj xaiv, tab sis yog tias koj tshiab rau lub ntiaj teb cov khoom siv hluav taws xob nws tau qhia tias koj siv Adafruit los yuav koj cov khoom.

Daim ntawv teev npe. (Nco tseg: Kev sib txawv sib txawv hauv xylophone uas koj yuav yuav ua rau xav tau ntxiv thiab/lossis ntu sib txawv)

  • Xylophone 16 qhov tseem ceeb
  • MIDI Jack
  • Arduino Uno R3
  • Arduino Dev. Ntaub thaiv npog
  • MCP23017 I2C Kev nthuav dav
  • 6N136 Kev Kub Ceev Optocoupler
  • Mini 12V Solenoids - x16
  • 1N4007 Diode - x17
  • 470 ohm resistor - x2
  • 1K ohm resistor - x17
  • 10K ohm resistor
  • C1815 NPN transistor
  • C4811 Darlington Transistor lossis TIP120 transistor - x16
  • Header Pins thiab Qhov (Socket)
  • 12V - Cov Khoom Siv Hluav Taws Xob. (Solenoids tuaj yeem siv lub zog me ntsis, Kuv pom zoo kom muab 10A)
  • LED (Xim nyiam ntawm koj xaiv)
  • 3/4 nti txee dai khaub ncaws - 6ft
  • 3/4 nti plywood lossis MDF
  • Perfboard
  • USB rau MIDI interface qaum (yog tswj los ntawm PC)
  • 4mm m2 loj screws - x32
  • m2 tiaj tus ntxhua khaub ncaws - x32
  • Hlau
  • Ntau yam ntoo ntsia hlau

Cov npe cuab yeej (Nco tseg: Txoj haujlwm no xav tau kev tsim ntoo thiab cov cuab yeej ua haujlwm ntoo ntxiv tau qhia.)

  • Soldering Hlau
  • Hlau Strippers
  • Ntsia Hlau.
  • Pliers
  • Kub Nplaum Phom
  • Super kua nplaum
  • Laum.
  • Laum cov khoom. (3/4 nti spade ntsis thiab cov khoom rau qhov ntsuas qhov)
  • Ntsuas Cov Cuab Yeej (Kuv siv ntug ncaj.)
  • Mem hluav.
  • Jigsaw

Yeem Cov Cuab Yeej

  • Cov cuab yeej Desoldering (yog tias koj tshiab rau cov laug)
  • Tweezers

Kauj Ruam 1: Txuas lub Midi Controller

Txuas lub Midi Controller
Txuas lub Midi Controller
Txuas lub Midi Controller
Txuas lub Midi Controller
Txuas lub Midi Controller
Txuas lub Midi Controller

Thawj kauj ruam yog los ua ke MIDI maub los.

Rau qhov no koj yuav xav tau:

  • MIDI Jack
  • Arduino Dev. Ntaub thaiv npog
  • MCP23017 I2C Kev nthuav dav
  • 6N136 Kev Kub Ceev Optocoupler
  • 1N4007 Diode - x1
  • 470 ohm resistor - x2
  • 1K ohm resistor - x1
  • 10K ohm resistor
  • C1815 NPN transistor
  • Header Pins thiab Qhov (Socket)
  • LED
  • Hlau

MIDI Circuit Court tuaj yeem tshwm sim kev hem thawj rau cov pib, tab sis qhov tseeb zoo nkauj ncaj nraim rau pem hauv ntej. Yog tias koj ua raws cov txheej txheem qhia koj yuav tsum tsis muaj teeb meem.

Kev tso npe ntawm cov khoom yuav yog qhov tseem ceeb. Nws yog ib qho yooj yim kom khiav tawm ntawm chav ncaj ncees sai yog li thov siv daim duab muab ntawm tus tswj hwm ua tiav raws li phau ntawv qhia. Muaj ntau qhov txheej txheem uas yuav ua haujlwm rau qib no yog li yog tias koj ua si ib puag ncig nrog kev tso kawm koj yuav pom txoj hauv kev uas ua haujlwm zoo dua rau koj.

Txhua yam yuav sib koom ua ke hauv qhov haujlwm no; uas yuav yog qhov tseem ceeb hauv qib tom ntej.

Txij li thaum peb tab tom ua haujlwm nrog 12 volt fais fab mov, 12 volt solenoids, thiab 12 volts yog nyob hauv qhov kev lees paub kom muaj zog rau Arduino peb tuaj yeem siv tib lub hwj chim rau txhua yam.

Yog tias koj yog tus tshiab rau kev muag khoom Kuv xav qhia tias koj yuav tshuaj xyuas Adafruit cov lus qhia rau kev siv tshuaj thiab ua haujlwm ntawm qee qhov perfboard ua ntej txuas ntxiv nrog txoj haujlwm no.

Ib yam nkaus, yog tias koj tshiab los nyeem cov lej, tam sim no yuav yog lub sijhawm zoo los ua qee qhov nyeem ntawm cov cim thiab qhov sib txawv. Txhua Qhov Hais Txog Kev Siv Hluav Taws Xob yog cov peev txheej zoo rau qhov no.

Kauj Ruam 2: Txuas lub Solenoid Circuits

Txuas cov xov hluav taws xob Solenoid
Txuas cov xov hluav taws xob Solenoid
Txuas cov xov hluav taws xob Solenoid
Txuas cov xov hluav taws xob Solenoid

Tom ntej no Peb yuav txav mus rau qhov txuas hluav taws xob solenoid.

Rau cov kauj ruam no koj yuav xav tau:

  • 1 1N4007 Diode - x16
  • 1K ohm resistor - x16
  • Darlington Transistor lossis TIP120 transistor - x16
  • Header Pins thiab Qhov (Socket)
  • Hlau

Cov hluav taws xob solenoid tsis tshua muaj kev hem thawj. Vim tias cov kab hluav taws xob no yuav me me zoo nkauj nws yog lub sijhawm zoo los siv qee cov khoom seem ntawm perfboard yog tias koj muaj lawv nyob ib puag ncig. Koj yuav tsum ua 16 ntawm cov no. Hauv qhov piv txwv yees duab 4 daim phiaj rau ib lub rooj tsavxwm tau ua thiab nws ua haujlwm tau zoo kawg nkaus.

Nco ntsoov txuas cov xov hlau hauv av ntawm koj cov hluav taws xob solenoid mus rau tib lub dav hlau hauv av uas koj Arduino nyob.

Txhua yam hauv qhov piv txwv yog hloov pauv, yog li lub taub hau thiab lub qhov (socket) tau siv los ua qhov kev xeem yooj yim dua. Txawm li cas los xij, yog tias koj xav txuag ob peb duas las koj tuaj yeem xaim cov xov hlau ncaj qha rau hauv cov laug cam.

Cov solenoids uas tau siv hauv qhov piv txwv tuaj nrog 2 tus pin JST txuas los ntawm lub hoobkas. Thaum tsis muaj JST cov chaw nres nkoj tau yooj yim hauv kuv tus kheej lub cuab yeej, qee qhov kev sib txuas txoj cai kaum sab xis txuas nrog lawv zoo. Lwm qhov zoo siv cov khoom seem.

Kauj Ruam 3: Tsim Tus Qauv

Tsev Ncej
Tsev Ncej
Tsev Ncej
Tsev Ncej
Tsev Ncej
Tsev Ncej

Qhov thib peb, thiab cov kauj ruam loj tshaj hauv tus txheej txheem yog teeb tsa tus ncej.

Koj yuav xav tau:

  • 16 qhov tseem ceeb Xylophone Mini 12V
  • 3/4 nti txee dai khaub ncaws - 6ft
  • 3/4 nti plywood lossis MDF
  • Ntau yam ntoo ntsia hlau

Cov thav duab yog thawj thaj chaw uas koj yuav feem ntau ntawm koj tus kheej. Muaj feem yuav koj yuav tsis muaj xylophone tib yam uas kuv tau siv thiab koj qhov kev ntsuas yuav txawv ntawm kuv li. Tab sis tsis txhob ntshai, Kuv yuav muab cov ntaub ntawv ntau ntxiv txog cov txheej txheem tsim tawm kom ntau li ntau tau.

Ua ntej kuv coj 3 ntsuas ntawm kuv lub xylophone:

  • Qhov siab
  • Ntev
  • Dav ntawm sab qis octave (qhov dav tshaj plaws)

Tom qab ntawd kuv txiav ib lub duab plaub tawm ntawm plywood; qhov ntev ntawm koj lub duab plaub yuav tsum phim koj lub xylophone qhov dav. Qhov siab yuav tsum muab chav txaus rau koj nqa koj lub xylophone ob peb ntiv los ntawm txhua qhov chaw uas koj tso rau. Nws tseem yuav tsum muab koj lub hauv paus chaw txaus chav rau lub tsev solenoids thiab transistor circuitry.

Tom qab txiav kuv cov duab plaub kuv txiav ib lub ces kaum ntawm txhua tus kom lawv zoo nkauj. Cov kauj ruam no yog nyob ntawm yeem tab sis yog tias koj xav ua tib lub cim los ntawm qhov pib ntawm lub kaum sab xis yuav yaug nrog cov yuam sij ntawm kuv lub xylophone thiab txiav mus rau sab saud. Ob tog yuav tsum zoo ib yam rau ib leeg.

Kuv clamped ob sab ua ke thiab siv 3/4 nti spade ntsis los laum tawm qhov uas yuav tso cai rau kuv ntxig kuv lub duav.

Tom qab ntawd ua tiav kuv txiav 2 daim plywood ntxiv raws li kev txhawb nqa los tuav xylophone (zoo ib yam li cov txee pins). Cov mis uas kuv siv los ntsuas qhov kev txhawb nqa tau piav qhia hauv qab no.

Kev Txhawb Nqa:

  • Xylophone txhawb nqa 1 (Qhov siab = 1 nti, Ntev = Dav ntawm qhov qis octave sab ntawm xylophone)
  • Xylophone txhawb nqa 2 (Qhov siab = 1 nti, Ntev = Dav ntawm qhov siab octave sab ntawm xylophone)

Kuv tau kaw thiab ntswj cov kev txhawb nqa rau tus ncej kom ntseeg tau tias lawv tuav kuv qib xylophone. Kuv txiav kuv lub txee dai khaub ncaws ib nrab thiab thawb 2 daim rau hauv lawv lub qhov. Kuv txheeb xyuas qhov yooj yim haum ntawm txhua yam thiab ua ke nws ua ke. Tom qab cov kua nplaum qhuav kuv txiav cov khoom ntxiv ntawm lub txee dai khaub ncaws tawm thiab xuab zeb lawv ncaj rau ntawm ob sab.

Qhov chaw nruab nrab bar yog qhov nyuaj tshaj plaws thiab tseem ceeb tshaj plaws. Nws yuav tsum ua kom ncaj ncaj thiab koj yuav tsum tso qhov yuav luag zoo sib xws ntawm qhov nruab nrab ntawm qhov nruab nrab bar thiab cov yuam sij. Qhov sib txawv ntau dhau thiab koj lub solenoids yuav tsis ua kev sib cuag, tsawg dhau ntawm qhov sib txawv thiab koj lub xylophone yuav tsis zoo.

Kuv txiav qhov chaw nruab nrab kom haum zoo nyob nruab nrab ntawm ob sab ntawm xylophone. Kuv tau xuab zeb, ntsuas, thiab rov ua cov kauj ruam no kom txog thaum kuv lub hauv paus bar ncaj li kuv tuaj yeem ua tau. Tom qab ntawd kuv tso ib phau ntawv xov xwm uas yog 4mm tuab ncaj qha rau ntawm kuv tus xylophone thiab siv nws los ua phau ntawv qhia tuav lub chaw nruab nrab raws qhov nws xav tau. Kuv siv 2 tus ntsia hlau ntawm txhua sab los tuav lub hauv paus bar hauv qhov chaw.

Nrog koj zoo siab, koj ua tiav nrog tus ncej!

Kauj Ruam 4: Tso Solenoids

Tso cov Solenoids
Tso cov Solenoids
Tso cov Solenoids
Tso cov Solenoids
Tso cov Solenoids
Tso cov Solenoids

Kauj Ruam 4 yog txuas cov solenoids mus rau qhov chaw bar.

Koj yuav xav tau:

  • Mini 12v Solenoids - x16
  • 4mm m2 loj screws - x32
  • m2 tiaj tus ntxhua khaub ncaws - x32
  • Ntau yam ntoo ntsia hlau
  • Khoom siv tes ua

Yuav ua li cas koj tso koj cov solenoids txhua yam nyob ntawm koj lub xylophone. Kuv tso cov khoom siv tes ua hla ntau tus yuam sij ntawm nws yuav haum dua thiab cim thaj chaw uas kuv cov solenoids yuav coj mus rau nruab nrab ntawm txhua tus lej xylophone. Qhov kev ncua deb tau dhau los ua 4 solenoids ib qho khoom siv tes ua.

Cov solenoids siv hauv qhov piv txwv tau npaj ua ntej rau M2 qhov ntsia hlau loj. 4mm M2 ntsia hlau nrog M2 tiaj tus ntxhua khaub ncaws ruaj ntseg solenoid rau cov khoom siv tes ua zoo kawg nkaus. Kuv pre-drilled lub qhov rau cov ntsia hlau thiab kaw nruj nreem solenoids rau cov khoom siv tes ua.

Tom qab ntawd kuv txiav ob peb yam khoom siv tes ua thiab muab lawv tso rau tom qab ntawm kuv qhov kev teeb tsa solenoid; qhov no tau ua ob yam. Ua ntej nws sib nrug ntawm kev teeb tsa solenoid kom deb ntawm qhov chaw nruab nrab kom txaus M2 lub hau ntswj taub hau uas haum rau sab nraum qab ntawm solenoids yuav tsis zaum tawm tsam nruab nrab nqaj. Qhov thib ob nws tau muab cov txheej txheem solenoid txuas tau zoo dua los ntawm kev muab cov khoom siv ntau rau ntsia hlau rau.

Txhawm rau txuas qhov kev teeb tsa mus rau qhov nqaj nruab nrab kuv tau hloov pauv qhov sib nrug los ntawm kev sib txuas ua ke ntawm qhov kev teeb tsa solenoid mus rau qhov twg kuv txawm tias nws yuav tsum yog; manually thawb rau ntawm kuv lub solenoid plungers kom ntseeg tau tias lawv txhua tus yuav ntaus lub xylophone tuav tusyees; thiab tom qab ntawd siv cov ntoo ntoo me me los txuas nws mus rau qhov chaw nruab nrab bar.

Kauj Ruam 5: Coding Arduino thiab nkag siab MIDI

Txhawm rau program Arduino koj yuav tsum tau teeb tsa Arduino IDE kawg thiab kawm paub yuav ua li cas qee yam yooj yim xws li upload rau koj Arduino thiab nruab Libraries. Muaj ntau cov lus qhia hauv is taws nem yuav ua li cas thiab nws cov txheej txheem tsis haum rau hauv kev nthuav dav ntawm qhov kev tsim no.

Thaum koj tau yooj yim siv Arduino IDE koj yuav xav tau Cov Tsev Qiv Ntawv hauv qab no.

  • Arduino MIDI Library
  • Adafruit MCP23017 Lub Tsev Qiv Ntawv

Tom qab koj tau teeb tsa cov tsev qiv ntawv rub tawm cov cai los ntawm cov lus qhia no thiab luam thiab muab tso rau hauv Arduino IDE.

Yog tsis txuas MIDI pawg thawj coj uas koj tau tsim, xa cov cai mus rau Arduino. Thaum cov cai tau raug teeb tsa sib txuas txhua yam, nias lub pob pib dua ntawm Arduino, thiab ntsuas tias txhua yam ua haujlwm zoo li nws yuav tsum tau ua.

CEEB TOOM*

Cov xylophones sib txawv muaj cov ntawv npaj sib txawv yog li cov cai uas kuv tau sau yuav tsis ua haujlwm raug rau koj lub xylophone. Tab sis qhov no yog qhov kho tau yooj yim. Xa mus rau daim ntawv MIDI daim ntawv no thiab hloov tus lej cim hauv Arduino code kom sib haum nrog cov ntawv ntawm koj lub xylophone.

Rau kev siv, cov ntawv uas kuv tau npaj ua ntej yog raws li hauv qab no:

  • 79 - G Nws
  • 77 - F Nws
  • 76 - Ib
  • 74 - Ib
  • 72 - Ib
  • 71 - IB
  • 69 - UA
  • 67 - G Nws
  • 65 - F Nws
  • 64 - Ib
  • 62 - Ib
  • 60 - C - Nruab Nrab C
  • 59 - IB
  • 57 - UA
  • 55 - Ib
  • 53 - F Nws

Kauj Ruam 6: Txoj Haujlwm Music

Txoj Haujlwm Music
Txoj Haujlwm Music

Qhov haujlwm uas koj pom hauv daim vis dis aus yog Guitar Pro 6. Nws tsis kim heev, tab sis nws siv tau yooj yim thiab tuaj yeem tso tawm MIDI raws nraim qhov kuv xav kom nws ua. Lwm qhov zoo ntawm GP6 yog tias koj tuaj yeem ntxiv staccato rau tag nrho txoj kev uas pab lub xylophone suab zoo dua los ntawm kev tso cov ntawv sau ua ntej.

Cov ncauj lus tseem ceeb tom ntej yog tias kuv lub xylophone tsuas yog 2 octaves ntawm cov ntawv sau ntuj; lub ntsiab lus tias nws tsis tuaj yeem ua si ntse lossis flats.

Yog tias koj tau tsim txoj haujlwm no, thov koj xav rub tawm Tetris Theme uas kuv tau suav nrog hauv nplooj ntawv no.

Pom zoo: