Connect guitar to STM32F407 guitar

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
pcardoso73
Posts: 2
Joined: Wed Mar 14, 2018 8:28 pm

Connect guitar to STM32F407 guitar

Post by pcardoso73 »

Hello,
I am starting a project on guitar effects. As I already have an STM32F407 which is DSP capable I thought of using it.
As it has a MEMS microphone, I am considering removing to connect my guitar there.
As the microphone outputs a PDM signal (Pulse Density Modulation), I cannot connect the guitar directly to the board.
So I thought of interfacing the guitar, in some way, to output a signal in PDM format.
Is this possible ? Are there dedicated chips for this on the market or do I have to use a microcontroller ? And if the latter is the option to go, are there any examples on how to do this using a small microcontroller ?
Any ideas ?

Many thanks,
Pedro
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: Connect guitar to STM32F407 guitar

Post by steved »

You might do better to feed the guitar into an analog input on the F407; you might need a simple op amp to provide some gain. Then set an A-D converter going; this will give you a stream of digital values directly.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: Connect guitar to STM32F407 guitar

Post by Giovanni »

Hi,

A student of mine already did something like that:

https://www.youtube.com/watch?v=B6mewrg1pHA

Giovanni
pcardoso73
Posts: 2
Joined: Wed Mar 14, 2018 8:28 pm

Re: Connect guitar to STM32F407 guitar

Post by pcardoso73 »

steved wrote:You might do better to feed the guitar into an analog input on the F407; you might need a simple op amp to provide some gain. Then set an A-D converter going; this will give you a stream of digital values directly.


Could I connect the guitar directly on an analog GPIO and use the internal ADC instead of an external one ?
The voltage of a guitar's can go as high as 2V I guess(for passive pickups). Do you know what's the maximum voltage amplitude that can be applied to an analog port on uC port ?


Giovanni wrote:A student of mine already did something like that

How did he connected the guitar to the uC ?

Many thanks.

Best regards,
Pedro
steved
Posts: 834
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 138 times

Re: Connect guitar to STM32F407 guitar

Post by steved »

pcardoso73 wrote:Could I connect the guitar directly on an analog GPIO and use the internal ADC instead of an external one ?
The voltage of a guitar's can go as high as 2V I guess(for passive pickups). Do you know what's the maximum voltage amplitude that can be applied to an analog port on uC port ?

Almost. The voltage on any GPIO must always be between 0V and the chip's supply voltage (usually 3.0-3.3V). The guitar pickup will probably produce a voltage which goes negative as well as positive. Also, it may be designed to operate with a specific load impedance, which the processor may not provide. (And these are problems you might encounter feeding your guitar into any A-D converter). To give you best protection and flexibility, I'd suggest a simple operational amplifier circuit to do the level shifting and amplify (or attenuate) the signal as appropriate. Not exactly software, but something like the Microchip MCP6021 generates a mid-rail voltage as well as having a single op amp. Figures 3.3 and 3.4 in the data sheet show the basic configurations, and a search should yield many more options.
Post Reply