Troubleshooting my pdm microphone output

New to electronics in general, that includes Particle devices. I figured I'd pick up my first IoT device to see what programming them was all about. In short, there's A LOT to learn on my end! It's a pretty big learning curve for me, I admit. Most of my experience is with web applications. I picked up the Photon 2 and the Edge ML kit as my first purchase.

All that being said, I am trying to troubleshoot why my PDM microphone is giving me a "shorted out" sound when I play it back. I am pressing MODE saying "testing 1,2,3"...then presssing MODE again to stop recording. 1I am using the Microphone_PDM: Microphone_PDM as a guide. It was really easy to get it to compile and flash. My experience with VS Code, Node.js, etc...probably helped as well. I decided on the "3-wav" example b/c it's seems to be the easiest way to test. I didn't have to add in a framework or SD card so I went with that.

I use particle serial monitor --follow | tee t1.hex and then convert it via xxd -r -p t1.hex t1.wav

Here is a link to the recording of what I am hearing. I am mostly looking for a list of things that ti could be more than an official answer. GPT has given me a few things to troubleshoot for but in addition to that I figured posting here was the best option starting off.

I've seen that happen before, but I never found the root cause and the problem went away. The noise is presumably electrical. Since the PDM connection is digital, it's probably not on the digital signal pins, except as far as these could induce a power issue.

I found in one case the problem was pronounced when I put the microphone on the right (antenna) side of the Photon 2 in a solderless breadboard, and was using plain unshielded DuPont wires for both signal and power. I suspect that the wires were picking up RF interference, which ended up causing a buzz in the microphone module.

I tried adding capacitors on the power pins of various sizes, and that didn't seem to make a difference, but it might for you.

You could also try temporarily using SYSTEM_THREAD(SEMI_AUTOMATIC) and not enabling Wi-Fi to see if it might be RF related.

The buzzing frequency is higher than the buffer size, so I don't think it's related to buffer swapping in software, but you could try different sampling frequencies to see if the frequency of the buzzing changes.

I also had a different background sound caused by the microphone picking up vibrations from a fan on my desk, but that's a different sort of sound.

In any case, it also stopped happening for me, so I never found out the cause.

tl;dr post update

changed node server.js --rate 16000 --bits 8 to
node server.js --rate 16000 --bits 16 and everything works flawlessly :crossed_fingers: ...of course, I spent all day thinking it was the wiring/hardware. :upside_down_face: I'm surprised, the recording comes out very well, nice quality...I figured it would sound "bit-crushed". super happy with the PDM MEMS Microphone and especially the library (and examples) for this GitHub - particle-iot/Microphone_PDM: Library for PDM microphones for RTL872x and nRF52.

...

I've finally had success in getting (really good) sound out of the PDM Microphone. To me at least, it was very clear...really nice! I am pretty much using the exact code from the examples here:
https://github.com/particle-iot/Microphone_PDM/blob/main/examples/1-audio-over-tcp and here:
https://github.com/particle-iot/Microphone_PDM/tree/main/more-examples/tcp-audio-server

I am sending the audio to my websites IP address where I have the node.js server running. Like I said, this worked out great this morning. I have a good 3 or 4 recordings of sounds, my cat and my voice....etc...

But I come back to the device (not touching the breadboard as far as I remember) and now all I get is a wall of maximum amplitude(?) for the recording. So, I am wondering what could have happened? My guess is the wiring but I am not so sure. Because there's a WALL OF NOISE it's tough to tell but I think I hear some of the sounds that I made during the recording. Not 100% on that yet though.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.