MCU for programmable guitar pedal - Page 1
Forum section: electronics / general

author: goli095
author_rank: Newbie
timestamp: May 21, 2019, 10:06:51 pm
content: Hi. I want to make a programmable guitar pedal. I was looking for information on the internetand I saw that there are many microcontrollers options that can be used. I know thatthat the resolution of the ADC and DAC is important to achieve a good quantification of the audio, butI'm new to the subject and I still do not know what other features of the MCU I have to look at.I have an Arduino board that carries an AtMega328p, the board has a 10 bit ADC and 8 bit PWM outputs.Could I use this board with external ADC and DAC?Another newbie doubt that I have is what difference in the quality there is between using PWM outputs and analog outputs.Most of the projects that I saw on the internet use the STM32, I wanted to know if it is recommendedstart directly with that MCU or if it's better for me to learn first with the Arduino board. I found the development board NUCLEO - L432KC, which use the STM32, I wanted to know if someone has experience with this board. Here is the link to de datasheet:https://datasheet.octopart.com/NUCLEO-L432KC-STMicroelectronics-datasheet-62334095.pdfThe last question is about the preamplifiers. I need to make a preamplifier at the input and output of the MCU. I wanted to know in what way the different MCUs can influence the design of the preamplifiers.Thank you very much !

author: lucazader
author_rank: Regular Contributor
timestamp: May 21, 2019, 11:33:11 pm
content: The main reasons the stm32 might be more suitable for this application are:- both the ADC and DAC are 12-bit. This means higher resolution sampling- The adc and DAC will likely have a much higher sampling rate to follow the incoming waveform.You can also definitely go further down this rabbit hole:- You could look into external DAC's specific to audio applications. These will likey have higher bit accuracy, 16-bit DAC's aren't too expensive.- External, or even higher accuracy ADC's. while an ADC might be 12 bit or 14 bit or 16 bit. What might matter for your application is how linear that ADC is. usually the ones built into MCU's arent as good as purpose built external ADCs.- More high performance MCU (such as stm32h750) that has a higher resolution (16 bit) ADC, and some I2S peripherals to talk to and audio DAC and or Audio ADC if you go further down that path.However to start with i probably wouldn't go down that rabbit hole too far.I would probably start out with the stm32 boards that other people are using and then go from there.Look at the projects, their code, and how everything works together. Then once you get a solid handle on this expand into more advanced/specialist hardware if necessary

author: MarkF
author_rank: Super Contributor
timestamp: May 21, 2019, 11:50:08 pm
content: It seems to me that you are getting the cart in front of the horse.What effects you want will determine to some extent what the MCU requirements will be.Since you already have an Arduino Uno, build this pedalSHIELD for little cost and experiment with it.Then, you can proceed to something more elaborate with the experience under your belt.https://www.electrosmash.com/pedalshield-unoThe project looks simple enough and it should answer the questions you asked.All of the effects are performed in software.Therefore, the effects you can do are going to be determined by the processing power and update rates of the UNO.

author: goli095
author_rank: Newbie
timestamp: May 22, 2019, 02:00:56 am
content: Quote from: lucazader on May 21, 2019, 11:33:11 pmQuote from: MarkF on May 21, 2019, 11:50:08 pmThank you both ! As you say, I think I will start doing the PedalShield and then go for the stm32.

author: Jan Audio
author_rank: Frequent Contributor
timestamp: May 22, 2019, 01:02:02 pm
content: Make sure to mix the digital effect with the analog signal, dont use dry/wet in the processor.

author: goli095
author_rank: Newbie
timestamp: May 23, 2019, 12:59:35 am
content: Quote from: Jan Audio on May 22, 2019, 01:02:02 pmdo you mean to put a summer at the output that adds the original and the effect signal ?thk you !

author: Jan Audio
author_rank: Frequent Contributor
timestamp: May 23, 2019, 10:32:41 am
content: Dont buy this chip : DSPIC33FJ128GP802It has very noisey DAC ( delta sigma ).The problem is those STM chips they suggest are miniature only (SMD), if you have no problem with that go for it, they have the power for reverbs.What you can do for making a flanger effect to start with :Make a 6 bit flanger, you will see the quality dont matter much if you mix it with the original, the effect will be badly lowpassed so its analog again.Use 6 pins towards a 7414 hex inverter to get higher impedance.Now mix those pins with resistors : 5K 10K 20K 40K 80K 160K ( or the very closest 1% resistor you can find ) with inverting amplifier opamp.Tataa, your own custom 6 bit DAC.Works with any chip, and wont empty your batterys very fast ( if you have 8 bit chip )When you made this you can continue, you can add this chip next to your newer project chips for a bigger sound.Taking all from 1 chip dont sound good, analog mixing is better.It gonna be a big pedal, better go for the STM32, much smaller.The only difference in pre amplifier is the voltage ( 3,3volt or 5volt ), depends on your chip.Dont forget protection diodes before your chip, better is to use a 5volt rail to rail opamp as security so you wont overvoltage your MCU ADC .