Cov txheej txheem:
Video: ATMega1284 Quad Opamp Effects Box: 4 Cov Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Lub Stomp Shield rau Arduino los ntawm Qhib Music Labs siv Arduino Uno thiab plaub lub suab opamps ua lub thawv ntaus suab paj nruag. Zoo ib yam li cov lus qhia yav dhau los uas qhia tias yuav ua li cas thiaj nkag tau Electrosmash Uno Pedalshield, Kuv kuj tseem tau xa Qhib Music Labs Guitar Effects lub thawv mus rau ATMega1284P uas muaj yim zaus ntau dua li Uno (16kB piv rau 2kB).
Piv rau cov lus qhia yav dhau los siv ATMega1284 cov teebmeem, lub thawv no muaj qhov zoo hauv qab no:
(1) Nws muaj cov khoom sib xyaw uas sib xyaw lub teeb liab tsis tau ua tiav nrog MCU cov teeb liab ua tiav - uas txhais tau tias qhov ua tau zoo ntawm lub teeb liab ntawm qhov tso tawm tau zoo dua qub.
(2) Nws ua 16 qhov kev ua haujlwm me me rau ob qho PWM tso tawm wheras lub thawv cuam tshuam yav dhau los siv 8 khoom rau qee qhov piv txwv xws li cuam tshuam qeeb.
(3) Nws muaj cov lus tawm tswv yim potentiometer uas tuaj yeem siv los txhim kho qhov cuam tshuam - tshwj xeeb nrog cov flanger/phaser cuam tshuam txog 30 feem pua cov lus tawm tswv yim ntxiv ntau rau qhov ua tau zoo.
(4) Qhov qis -lim lim zaus yog 10 kHz piv rau 5 kHz ntawm lub npov cuam tshuam dhau los - qhov no txhais tau tias lub teeb liab ntawm cov suab tso tawm ntau "nkig".
(5) Nws siv qhov cuam tshuam cuam tshuam sib txawv uas tuaj yeem piav qhia txog qib qis qis qis uas pom los ntawm lub thawv cuam tshuam no.
Kuv pib los ntawm qhob cij-boarding Uno-based Open Music Labs Stompbox Shield thiab kuv zoo siab nrog qhov ua tau zoo ntawm plaub qhov OpAmp teeb liab ua Circuit (txawm tias thaum siv Arduino Uno), uas kuv tau hloov nws mus rau kab txaij kom siv tau tas mus li.
Tib qho plaub qhov kev sib tw opamp thiab DSP code tau xa mus rau ATMega1284-dua, qhov xav tsis thoob ntawm qhov tsis tseem ceeb hloov pauv xws li muab cov hloov pauv thiab LED rau lwm qhov chaw nres nkoj, thiab faib 7,000 kilo-lo lus tsis yog 1, 000 kilo-lo lus ntawm RAM rau ncua sijhawm ncua, tsuas yog ob qhov kev hloov pauv tseem ceeb yuav tsum tau ua hauv qhov chaws, uas yog hloov mus rau ADC0 los ntawm ADC2, thiab hloov Timer1/PWM OC1A thiab OC1B tawm los ntawm Port B ntawm Uno mus rau Port D (PD5 thiab PD4) ntawm ATMega1284.
Raws li tau sau tseg yav dhau los, txawm hais tias kev txhim kho cov laug cam rau lub ATMega1284 muaj (Github: MCUdude MightyCore), nws yog ib qho yooj yim siv los yuav tus liab qab (bootloader-free) nti (yuav PDIP version uas yog qhob cij-board thiab strip-board phooj ywg), tom qab ntawd rub Mark Pendrith diav rawg ntawm Maniacbug Mighty-1284p Core Optiboot bootloader lossis MCUdude Mightycore, los ntawm kev siv Uno ua tus ISP programmer, thiab tom qab ntawd thawb duab dua ntawm Uno mus rau AtMega1284. Cov ncauj lus kom ntxaws thiab txuas rau cov txheej txheem no tau muab hauv ntu 1 ntawm cov lus qhia yav dhau los.
Kauj Ruam 1: Daim Ntawv Teev Npe
ATMega1284P (PDIP 40 tus lej pob ntawv) Arduino Uno R3 (siv los ua ISP los hloov lub khau raj loader thiab kos duab mus rau ATMega1284) OpAmp MCP6004 quad OpAmp (lossis zoo ib yam RRIO (Rail rau Rail Input thiab Output) OpAmp xws li TLC2274) 1 x Liab LED 1 x 16 MHz siv lead ua 2 x 27 pF capacitors 1 x 3n9 capacitor 1 x 1n2 capacitor 1 x 820pF capacitor 2 x 120 pf capacitor 4 x 100n capacitors 3 x 10uF 16v electrolytic capacitors 4 x 75k resistors 4 x 3k9 resistors 1 x 36k resistor 1 x 24k resistor 2 x 1M resistors 1 x 470 ohm resistor 3 x 1k resistors 2 x 50k Potentiometers (linear) 1 x 10k Potentiometer (linear) 3 x pushbutton keyboards (ib qho ntawm lawv yuav tsum tau hloov nrog 3-ncej 2- txoj kev footswitch yog tias lub thawv cuam tshuam yuav raug siv rau kev ua haujlwm nyob)
Kauj Ruam 2: Kev tsim kho
Circuit 1 qhia txog kev siv hluav taws xob thiab Stripboard 1 yog nws lub cev sawv cev (Fritzing 1) nrog Duab 1 qhov tseeb ntawm cov mov ci-boarded Circuit hauv kev ua haujlwm. Peb qhov kev hloov pauv me me tau ua: Qhov sib faib ib nrab-theem-qib opamp kev tsis ncaj ncees tau siv rau peb theem OpAmp, 3 x 75k thiab 2 x 75k ohms sib npaug resistors tau hloov nrog ib zaug 24k thiab 36k resistors, thiab cov lus tawm tswv yim tau nce ntxiv rau 120pF rau ob theem OpAmp no. Kev tswj teb tau hloov nrog ob lub khawm uas tau siv los nce lossis txo qhov cuam tshuam. Peb-xaim txuas mus rau ATMega1284 tau qhia ntawm lub Circuit Court raws li ADC rau tus pin 40, PWMlow los ntawm tus pin 19, thiab PWMhigh los ntawm tus pin 18. Peb lub khawm thawb txuas nrog tus pin 1, 36 thiab 35 thiab earthed ntawm lwm qhov kawg. Ib qho LED txuas nrog ntawm 470 tus tiv thaiv rau tus pin 2.
OpAmp Kev Tawm Tswv Yim thiab Cov Sijhawm Tawm: Nws yog qhov tseem ceeb uas RRO lossis nyiam dua RRIO OpAmp tau siv vim tias qhov hluav taws xob loj viav vias xav tau ntawm OpAmp tso tawm rau ADC ntawm ATMega1284. Daim ntawv teev npe muaj cov lej ntawm lwm hom OpAmp. 50k potentiometer tau siv los kho cov tswv yim nce mus rau qib qis dua ib qho kev txawv txav, thiab nws kuj tseem tuaj yeem siv los kho qhov nkag siab nkag siab rau cov tswv yim nkag uas tsis yog siv guitar xws li lub tshuab ntaus nkauj. Theem thib ob OpAmp cov tswv yim nkag mus thiab thawj qib opamp tso tawm muaj qhov kev txiav txim siab dua RC lim kom tshem cov digitally generated MCU suab nrov los ntawm cov suab.
ADC Theem: ADC tau teeb tsa los nyeem ntawm lub sijhawm cuam tshuam. Ib 100nF lub tshuab hluav taws xob yuav tsum txuas nrog ntawm AREF tus pin ntawm ATMega1284 thiab hauv av kom txo suab nrov raws li sab hauv Vcc qhov chaw tau siv los ua qhov ntsuas hluav taws xob - tsis txhob txuas tus pin AREF rau +5 volt ncaj qha!
DAC PWM Theem: Raws li ATMega1284 tsis muaj nws tus kheej DAC, cov suab tso tawm suab tau tsim los ntawm kev siv tes taw dav dav hloov pauv ntawm RC lim. Ob qho PWM tso tawm ntawm PD4 thiab PD5 tau teeb tsa ua qhov siab thiab qis bytes ntawm cov suab tso tawm thiab sib xyaw nrog ob lub resistors (3k9 thiab 1M) hauv 1: 256 piv (qis byte thiab siab byte) - uas tsim cov suab tso tawm.
Kauj ruam 3: Software
Lub software yog ua raws Qhib Music Labs stompbox pedal sketches, thiab ob qhov piv txwv suav nrog xws li flanger/phaser effect, thiab ncua sijhawm. Ib yam li nrog cov lus qhia yav dhau los, cov hloov pauv thiab LED tau hloov mus rau lwm qhov chaw nres nkoj deb ntawm cov uas siv los ntawm ISP programmer (SCLK, MISO, MOSI thiab Pib dua).
Qhov ncua sij hawm ncua tau nce los ntawm 1000 lo lus rau 7000 lo lus, thiab PortD tau teeb tsa ua qhov tso tawm rau ob qho PWM teeb liab. Txawm hais tias nrog qhov nce hauv qhov ncua ncua tsis kos duab tseem siv tsuas yog li 75% ntawm cov muaj ATMega1284 16 kB RAM.
Lwm yam piv txwv xws li tremolo los ntawm Qhib Music Labs lub vev xaib rau tus pedal
(1) Hloov DDRB | = 0x06; // set pwm outputs (pins 9, 10) to outputtoDDRD | = 0x30;
thiab
ADMUX = 0x62; // sab laug kho, adc2, sab hauv vcc raws li siv rau ADMUX = 0x60; // sab laug kho, adc0, sab hauv vcc raws li siv // Cov kev hloov pauv no yog XWB qhov tseem ceeb hloov pauv // thaum xa los ntawm Uno mus rau ATMega1284
Rau ob qhov piv txwv suav nrog ntawm no, cov ntaub ntawv header suav nrog hauv daim duab - piv txwv li tsis muaj cov ntaub ntawv header yuav tsum tau siv
Pushbuttons 1 thiab 2 tau siv hauv qee qhov kev kos duab kom nce lossis txo qhov cuam tshuam. Hauv qhov piv txwv ncua nws nce lossis txo lub sijhawm ncua. Thaum cov duab kos tau pib ua ntej nws pib nrog qhov cuam tshuam siab tshaj plaws. Rau cov flanger phaser kos duab sim ua kom muaj kev tawm tswv yim tswj kom muaj txiaj ntsig zoo dua.
Txhawm rau hloov qhov ncua mus rau cov txiaj ntsig ncho (ntxiv rov ua dua) hloov kab:
tsis [qhov chaw] = tawm tswv yim; // khaws cov qauv tshiab
rau
tsis [qhov chaw] = (tawm tswv yim + tsis [qhov chaw]) >> 1; // Siv qhov no rau echo effct
Tus footswitch yuav tsum yog peb tus ncej ob txoj kev hloov
Kauj ruam 4: Txuas
Electrosmash
Qhib Music labs Music
ATMega Effect Pedal
Pom zoo:
Cov Duab Duab Duab thiab Cov Duab 1: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Cubes thiab Cov Duab 1: Thaum sim nrog qee cov ntoo ntoo thiab cov duab los qhia, kuv pom ob peb txoj hauv kev los ua cov voos thiab lwm yam duab los ntawm cov khoom siv yooj yim. Los ntawm kev muab cov no los ua Cov Ntawv Qhia, Kuv vam tias yuav txhawb nqa kev ua si thiab kev kawm. Kev hloov pauv ntawm qhov kev qhia no
Yuav Ua Li Cas Thiaj Li Tshem Tawm Lub Computer Nrog Cov Kauj Ruam Yooj Yim thiab Duab: 13 Kauj Ruam (nrog Duab)
Yuav Tsum Tshem Tawm Lub Khoos Phis Tawj Li Cas Nrog Cov Kauj Ruam Yooj Yim thiab Duab: Nov yog cov lus qhia txog yuav ua li cas tshem lub PC. Feem ntau ntawm cov khoom siv yooj yim yog hloov pauv thiab tshem tawm tau yooj yim. Txawm li cas los xij nws yog ib qho tseem ceeb uas koj tau koom nrog nws. Qhov no yuav pab tiv thaiv koj kom tsis txhob poob ib feem, thiab tseem ua rau kev rov ua dua tshiab
Proto Pedal rau DIY Guitar Effects: 5 Cov Kauj Ruam (nrog Duab)
Proto Pedal rau DIY Cov Teeb Meem Guitar: Tsim thiab tsim koj tus kheej cov txiaj ntsig guitar yog txoj hauv kev zoo los ua ke muaj kev nyiam rau hluav taws xob thiab ntaus guitar. Txawm li cas los xij, thaum ntsuas cov qauv tsim tshiab, Kuv pom qhov tsis yooj yim ntawm Circuit Court ntawm lub khob cij tsis sib txuas yog qhov nyuaj rau txuas rau thaj c
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: 4 Cov Kauj Ruam (nrog Duab)
Cov Duab Duab Duab Duab, WiFi Txuas - Raspberry Pi: Nov yog txoj hauv kev yooj yim heev thiab tus nqi qis mus rau cov duab thav duab digital - nrog qhov zoo ntawm kev ntxiv /tshem cov duab hla WiFi ntawm 'nyem thiab luag' siv (pub dawb) xa cov ntaub ntawv . Nws tuaj yeem siv tau los ntawm qhov me me £ 4.50 Pi Zero. Koj tseem tuaj yeem hloov pauv
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: 7 Cov Kauj Ruam (nrog Duab)
Rov Qab Siv Cov Duab Duab Nrog Virtual Asistent: Nyob zoo txhua tus! Cov lus qhia no tau yug los ntawm lub laptop faib ua ib nrab, yuav los ntawm ib tus phooj ywg. Thawj qhov kev sim ntawm txoj haujlwm no yog kuv Lego Digital Photo Frame, txawm li cas los xij, yog ib tus neeg mob siab rau Siri thiab Google Tam sim no, Kuv txiav txim siab coj nws mus rau qhov tshiab