Author Topic: MCU for programmable guitar pedal  (Read 4951 times)

0 Members and 1 Guest are viewing this topic.

Offline goli095Topic starter

  • Newbie
  • Posts: 3
  • Country: ar
MCU for programmable guitar pedal
« on: May 21, 2019, 10:06:51 pm »
Hi. I want to make a programmable guitar pedal. I was looking for information on the internet
and I saw that there are many microcontrollers options that can be used. I know that
that the resolution of the ADC and DAC is important to achieve a good quantification of the audio, but
I'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 recommended
start 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.pdf

The 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 !
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 221
  • Country: au
Re: MCU for programmable guitar pedal
« Reply #1 on: May 21, 2019, 11:33:11 pm »
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
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 3299
  • Country: us
Re: MCU for programmable guitar pedal
« Reply #2 on: May 21, 2019, 11:50:08 pm »
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-uno

The 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.

   

« Last Edit: May 22, 2019, 12:10:39 am by MarkF »
 

Offline goli095Topic starter

  • Newbie
  • Posts: 3
  • Country: ar
Re: MCU for programmable guitar pedal
« Reply #3 on: May 22, 2019, 02:00:56 am »
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


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-uno

The 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.

   



Thank you both ! As you say, I think I will start doing the PedalShield and then go for the stm32.
 
The following users thanked this post: lucazader

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: MCU for programmable guitar pedal
« Reply #4 on: May 22, 2019, 01:02:02 pm »
Make sure to mix the digital effect with the analog signal, dont use dry/wet in the processor.
 

Offline goli095Topic starter

  • Newbie
  • Posts: 3
  • Country: ar
Re: MCU for programmable guitar pedal
« Reply #5 on: May 23, 2019, 12:59:35 am »
Make sure to mix the digital effect with the analog signal, dont use dry/wet in the processor.

do you mean to put a summer at the output that adds the original and the effect signal ?

thk you !
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: MCU for programmable guitar pedal
« Reply #6 on: May 23, 2019, 10:32:41 am »
Dont buy this chip : DSPIC33FJ128GP802
It 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 .
« Last Edit: May 23, 2019, 10:44:42 am by Jan Audio »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->