Connect guitar to STM32F407 guitar

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

Moderators: RoccoMarco, barthess

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

Connect guitar to STM32F407 guitar

Postby pcardoso73 » Wed Mar 14, 2018 8:51 pm

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: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Connect guitar to STM32F407 guitar

Postby steved » Wed Mar 14, 2018 10:00 pm

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: 14444
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1074 times
Been thanked: 921 times
Contact:

Re: Connect guitar to STM32F407 guitar

Postby Giovanni » Thu Mar 15, 2018 8:35 am

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

Postby pcardoso73 » Thu Mar 15, 2018 11:57 am

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: 823
Joined: Fri Nov 09, 2012 2:22 pm
Has thanked: 12 times
Been thanked: 135 times

Re: Connect guitar to STM32F407 guitar

Postby steved » Thu Mar 15, 2018 2:47 pm

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.


Return to “STM32 Support”

Who is online

Users browsing this forum: No registered users and 14 guests