Anna’s Status Update for 11/21

Anna’s Status Update for 11/21

I spent this past week learning about SPI works on the Jetson, configuring the new MCP3008 ADC and the analog mics, and testing the setup. Unfortunately, even after all the research that had gone into choosing the MCP3008 and learning about SPI communication, I found that the MCP3008’s 190kHz sampling rate drops to about 600Hz (so 200SPS per microphone…) in reality. I did my best to maximize the sampling rate, knowing that the primary culprits for the immense slowdown were the SPI latency and the software. I tried messing with the SPI clock, but that seemed to have only minor effects. I then tried to speed up my code, first making the existing Python code as efficient as possible, and then trying to write a simple program in C. Neither got me anywhere near the 8kSPS rate we need, so I’m sad to report that yet another audio implementation attempt has gone bust.

In my desperation to get something working, I went back to the USB microphones — I abandoned them earlier because the delay seems to change when a different number of processes is running on the Jetson, but I figured that, once we integrate, we could calculate the delay when everything (the CV, the motor control, etc.) is running and hardcode it into the acoustic location program. Unfortunately, PyAudio, despite working beautifully with two microphones, it gets incredibly angry when I try to read from a third microphone. There was about a 10-second delay in between readings, which really just made me want to sob. I at least take solace knowing that the USB microphone implementation works quite well with two microphones, so, if need be (and I hope it shouldn’t have to come to this), we can fall back on that.

However, there is hope! We discovered Isaac, NVIDIA’s open platform for intelligent robots, that has a high-performance algorithm, or GEM, specifically for acoustic location. I read through the documentation and did some research on how it particularly works on the Nano (which is a little different than some of the other NVIDIA devices it works with). I got a good understanding of how to use it, so now I’m just waiting for the ReSpeaker 4-mic array it was designed to work with to arrive. I know the constant changes for audio have been concerning (trust me, I can feel myself going bald from all of this), but given that this was made by NVIDIA for the Nano, I feel much more confident in this option. I intend to grind exceedingly hard on this this week.

Leave a Reply

Your email address will not be published. Required fields are marked *