This week I have debugged the audio quality, and integrated our full software system code.
For the audio quality, what I measure in the digital domain (the samples of the ADC) matches the analog signal before the ADC observed on the oscilloscope. Therefore, I decided to check that the audio sent to the BM83 matches the ADC samples. I attempted to use the DAC + 3.5mm jack on the discovery board to hear the sound on the I2S bus to the BM83, but it turns out that we need an extra master clock in sync with the I2S clock in order for the DAC to work. It is not impossible but would bring extra complexities to our integration schedule, so I just plotted the data sent out from the stm32 instead. It turns out that sometimes my double buffering scheme (referencing a basic implementation found in tutorials) could sometimes create discontinuities in the output signal, because the transmit DMA is not always avoiding the buffer that is being actively written to. Therefore, I designed another double buffering scheme using some extra variables and status flags, and I could now validate that our shifted out audio data matches our input data, without discontinuities. The audio quality after this enhancement is slightly better in my opinion but we did not formally verify that.
As for the noise before the ADC in the analog domain, I helped Adam debug in the lab and he has posted the results to Slack.
I have also integrated the UI code from Sam into my main audio signal path code, and I will be working/debugging with Sam in the next few days as he test the full system. I have refactored the code so that it follows good style and provides readability, which is going to help us reduce mistakes as we make small changes from now on.
Throughout the semester there has been hard times, but also times when I enjoy the great joy of finally getting a component to work, especially that second when I hear one of my favorite songs (albeit bad quality at that time) successfully streamed through our board to my Bluetooth earbuds.
I am not a typical, expert embedded systems person and I have not had much experience with analog and signals before. But I did want to play with some cool stuff outside my usual ECE areas so I was very happy to work with Adam and Sam who both have taught me a lot along the way. I have learned a LOT that could not be learned unless I do this capstone project.
Thanks, my teammates, and my TAs and professors, for an unforgettable semester!
Happy graduation : )