Microphone in to Raspberry Pi

Hi, I’m trying to get a mic-in to Raspberry Pi. Ideally this would be analogue as the goal is to analyze the frequency and exact timing of a sound, and USB mic will no doubt introduce a lag. The sound coming in will be very short bursts of a pure tone.

I need to capture it, log the time stamp when it arrived and do a FT to get the frequency domain. I have written the bulk of the code to do the analysis and it works on pre-captured wav files, so next step is to do it live through a mic. My programming skills are limited, so I’m also worried about getting it to work through USB as I haven’t had experience there.

So - any advice would be greatly appreciated. Best option would be an analogue mic input, second best would be a straightforward USB mic input. I saw this item on Jaycar’s site - any thoughts on whether / how that would work for my purposes? But open to any other suggestions.

Hi Robert,
The item linked is a USB-C to 3.5mm so will not connect with the Raspberry Pi without another adapter. In the audio signal timescale I do not think you would notice the lag on a usb microphone. Though if you want to get into the hardware you could use an ADC the higher the bit the more accurate it will be able to digitally reproduce the input.

Thank you for that. I hadn’t realised usb-c was not compatible with Raspberry Pi. That’s a pain. I have had a lot of trouble finding a little USB mic but I’ll have a look again for that. The software will time the response between a sound being emitted and then reflection coming back so lag from the USB mic maybe more problematic in that case. However the frequency of the sound is much more important so I could at least get started with a USB mic and I may find that the lag is ok as well. Cheers thanks

Btw, I found they had that same adaptor with a USB 2 so I’ll try that first. Thanks again Robert

1 Like

Awesome, Let us know how you go with it, If you need any help or advice on getting the ADC working let us know and we will see what we can do.