Cov txheej txheem:

MIDI-tswj Stepper Motor Nrog Kev Ncaj Ncees Digital Synthesis (DDS) Chip: 3 Cov Kauj Ruam
MIDI-tswj Stepper Motor Nrog Kev Ncaj Ncees Digital Synthesis (DDS) Chip: 3 Cov Kauj Ruam

Video: MIDI-tswj Stepper Motor Nrog Kev Ncaj Ncees Digital Synthesis (DDS) Chip: 3 Cov Kauj Ruam

Video: MIDI-tswj Stepper Motor Nrog Kev Ncaj Ncees Digital Synthesis (DDS) Chip: 3 Cov Kauj Ruam
Video: Python! Writing pandas DataFrames to Multiple Tabs in a Spreadsheet 2024, Kaum ib hlis
Anonim
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip
MIDI-tswj Stepper Motor Nrog Direct Digital Synthesis (DDS) Chip

Puas muaj lub tswv yim tsis zoo uas koj tsuas yog yuav tsum tig mus rau hauv qhov project mini? Zoo, Kuv tau ua si ib puag ncig nrog cov duab kos kuv tau ua rau Arduino Vim lub hom phiaj ua suab paj nruag nrog AD9833 Direct Digital Synthesis (DDS) module … qhov no . Thiab lub tswv yim ntawd yog dab tsi ua rau qhov me me ntawm lub khob cij ua haujlwm.

Suav nrog hauv txoj haujlwm no yuav yog qee qhov cai siv MIDI-dhau-USB los tswj Arduino Due thiab xa cov duab plaub fab ntawm AD9833 tus qauv thiab tus tsav tsheb. Tseem yuav muaj daim duab thiab cov lus qhia yooj yim rau kev txuas qhov no mus rau Arduino Due.

Khoom siv:

Dab tsi koj yuav xav tau rau txoj haujlwm no:

Arduino Dhau

NCO TSEG: Cov cai tau sau rau Lub Sijhawm, tab sis nws yuav tsum ua haujlwm thiab/lossis hloov pauv rau Zero. Nws siv Arduino's MIDIUSB lub tsev qiv ntawv, uas xav tau lub chaw nres nkoj USB ib txwm muaj.

Solderless Breadboard + Jumpers

AD9833 Breakout Module

A4988 Stepper Tsav Tsheb (lossis zoo sib xws)

NEMA 17 Stepper Motor (lossis zoo sib xws)

- 24V Cov Khoom Siv Hluav Taws Xob (nco ntsoov, kuv tau xaiv tus nqi no 24 Volts vim tias nws ntau dua li tus lej stepper lub cev muaj zog. Koj qhov kev siv yuav txawv yog tias koj siv lub cav loj dua)

Kauj ruam 1: Breadboarding

Breadboarding
Breadboarding

Lub tswv yim yooj yim tom qab qhov no yog qhov Direct Digital Synthesis IC yuav tsim lub voos xwmfab kom tsav tus tsav tsheb stepper tus tsav "kauj ruam" tus pin. Tus neeg tsav tsheb stepper no yuav txav lub cav ntawm qhov pom tau hnov ntau zaus. Cov kev taw qhia ntawm lub cev muaj zog yog qhov xav tau ntev npaum li nws tau ua theem ntawm qhov raug.

Txoj hauv kev uas kuv nyiam coj nrog kev ua zaub mov noj yog ua kom lub zog fais fab thiab thaj chaw ua ntej thiab tom qab ntawd pib ua haujlwm tag nrho lwm qhov, kev sib txuas tsis muaj zog.

Hauv av:

- Txuas AGND thiab DGND Pins ntawm AD9833 Module mus rau GND Rail ntawm lub khob cij.

- Txuas ob GND Pins ntawm Stepper Tsav Tsheb mus rau GND Rail

- Nqa qhov no mus rau ib qho ntawm Arduino Due's GND Pins

3.3V Hwj chim:

- Txuas tus VDD Pin ntawm Tus Tsav Tsheb Stepper rau lub khob cij V+ Rail

- Txuas VCC Tus Pin ntawm AD9833 Module rau lub khob cij V+ Rail

- Nqa qhov no mus rau Arduino Due's 3.3V Pin

24V Hwj chim:

- Txuas tus VMOT tus pin mus rau 24V DC Lub Hwj Huam muab khoom siv (nyob ntawm koj xaiv lub cev muaj zog, koj yuav xav khiav lub siab dua lossis qis dua kev tsheb nqaj hlau)

Module-rau-Module Kev Sib Txuas:

- Txuas tus OUT tus pin los ntawm AD9833 tus qauv rau STEP tus pin ntawm tus tsav tsheb

Stepper Tsav Sib Txuas:

- Txuas Stepper Motor txuas rau 2B/2A/1A/1B Pins. Polarity tsis yog qhov tseem ceeb, tsuav yog tus tsav tsheb sib phim nrog cov Stepper Motor.

- Txuas RESET thiab SLEEP Pins ua ke, thiab coj cov ntawd mus rau Arduino Due Pin 8.

- Txuas DIR Pin rau 3.3V Rail

AD9833 Module Kev Sib Txuas:

- Txuas SCLK rau Arduino Due's SCK tus pin. Nco ntsoov tias tus pin no nyob ntawm 6-tus pin txiv neej ICSP lub taub hau nyob ze lub microcontroller, tsis nyob ntawm tus poj niam sab nraud ib txwm.

- Txuas SDATA Tus Pin mus rau Tus MOSI tus pin. Nco ntsoov tias tus pin no nyob ntawm 6-tus pin txiv neej ICSP lub taub hau nyob ze lub microcontroller, tsis nyob ntawm tus poj niam sab nraud ib txwm.

- Txuas FSYNC mus rau Arduino Due Pin 6 (qhov no yog Chip Xaiv tus pin rau txoj haujlwm no)

Tam sim no tias daim ntawv qhia zaub mov tau sib sau ua ke, nws yog lub sijhawm los saib cov cai!

Kauj ruam 2: Programming thiab MIDI Teeb

Programming thiab teeb MIDI
Programming thiab teeb MIDI

Cov ntawv txuas.ino kos duab yuav siv USB-MIDI cov tswv yim los ntawm Arduino Due's Native USB chaw nres nkoj, thiab yuav siv lawv los tsav AD9833. Cov nti no muaj DAC uas khiav ntawm 25MHz w/ 28 khoom ntawm kev daws teeb meem zaus (tag nrho overkill rau yam uas xav tau ntawm no), thiab ntau ntawm cov cai ntawm no tau teeb tsa uas kom khiav thiab tso tawm ib puag ncig yoj.

Nco tseg: muaj ob lub USB Ports. Ib qho yog siv rau kev teeb tsa lub rooj tsavxwm, thiab lwm qhov yuav siv rau MIDI-dhau-USB comm

Nco tseg tias daim duab kos no yuav tsis ua haujlwm zoo li yog nyob ntawm Arduino Uno - txoj haujlwm no tshwj xeeb hauv nws qhov xav tau rau Native USB hauv Arduino Due lossis cov cuab yeej zoo sib xws

Customization Options:

- Muaj 2 hom, uas tuaj yeem teeb tsa los ntawm cov txheej txheem ua ntej txheej txheem macro. Yog tias "#define STOPNOTES" tseem nyob tsis tau zoo, tus stepper yuav nres ntawm nruab nrab ntawm cov ntawv. Qhov no tsis yog ib txwm xav tau (piv txwv li, ua si nrawm arpeggios), yog li txhawm rau hloov tus cwj pwm no, tsuas yog rho tawm lossis tawm tswv yim tias #define nqe lus thiab tus stepper yuav ua haujlwm tas li ib zaug ua si.

-Kuv siv tus pheej yig 2-octave MIDI keyboard nrog qhov no uas muaj octave nce/nqis khawm, tab sis yog tias koj tsis muaj qhov kev xaiv ntawd, koj tuaj yeem octave-hloov qhov kev hloov pauv hauv qab no los ntawm kev sib npaug lossis faib los ntawm 2 lub zog.

Kev txhais MIDI-rau-zaus tau ua tiav nrog kab no hauv playNote muaj nuj nqi: int f_out = (int) (27.5*pow (2, ((float) midiNote-33)/12)));

- Kuv zoo li siv kuv lub PC rau cuam tshuam nrog USB MIDI - koj tuaj yeem ua qhov no los ntawm koj nyiam Digital Audio Workstation (DAW) software. Yog tias koj tsis muaj ib qho, nws yooj yim zoo los teeb tsa qhov system siv LMMS - pub dawb, qhib qhov chaw. Thaum nws tau teeb tsa thiab ua haujlwm, yooj yim teeb tsa Arduino Due raws li MIDI Cov Khoom Siv Tawm, thiab yog tias koj siv USB MIDI keyboard, teeb qhov ntawd raws li kev nkag.

Kauj Ruam 3: Kuaj thiab Kuaj

Lub sijhawm los ua si koj lub cav stepper!

Raws li tau hais tseg, tag nrho lub tswv yim tom qab qhov no yog ib qho kev sim tawm, yog li ntawm txhua txoj hauv kev, ua qee qhov kev sim ntawm koj tus kheej!

Pom zoo: