====== Pmod MIC3 Audio Streaming/Recording ====== {{ reference:test-and-measurement:analog-discovery-2:pmod-mic3:freq_sweep.gif |}} /* {{ :reference:test-and-measurement:analog-discovery-2:pmod-mic3:shot_1.png?600 |}} */ ===== Introduction ===== This project streams live audio data from the Digilent Pmod MIC3 and displays it through the WaveForms oscilloscope. It demonstrates how multiple different instruments can be used together to test a sensor, by initiating SPI transactions to capture data, then processing the digital values returned and plotting them as the analog waveforms that they represent. In a situation where a custom sensor is being prototyped, you would also be able to scope the analog data itself, and compare the results of the conversions to the real waveform. The download also includes a script that performs a 1.25 second recording, providing higher-resolution data. The data is presented as a waveform in the time domain and as an FFT. ---- ===== Inventory ===== * A Digilent Test and Measurement device that supports WaveForms' //Scope//, //Patterns//, and //Logic// instruments. * [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]] * [[https://digilent.com/shop/analog-discovery-studio-a-portable-circuits-laboratory-for-every-student/|Analog Discovery Studio]] * //An Analog Discovery (Legacy) can also be used.// * [[https://digilent.com/shop/pmod-mic3-mems-microphone-with-adjustable-gain/|Pmod MIC3]] * WaveForms Installation * [[software:waveforms:waveforms-3:start|Resource Center]] * Breadboard (Recommended) * {{ reference:test-and-measurement:analog-discovery-2:pmod-mic3:pmod-mic3-audio-streaming-recording.zip |ZIP Archive with WaveForms Workspaces}} * //Includes two WaveForms workspaces for displaying live audio data (MicLive) and displaying recorded audio data (MicRec).// ===== Description ===== Each workspace included in the ZIP Archive includes a script which runs each of the relevant instruments and plots the audio data. This script streams live audio data from the Digilent Pmod MIC3 and displays it through the WaveForms oscilloscope. The download also includes a script that performs a 1.25 second recording, providing higher-resolution data. The data is presented as a waveform in the time domain and as an FFT. The script utilizes the pattern generator to produce the clock and chip select signals required for SPI communication with the MIC3. The MIC3 transmits 16-bits of data, of which the 12 least-significant are the audio data. Samples are taken by the logic analyzer every 500 milliseconds (or once, over a period of 1.25 seconds), which is pushed into an array that is displayed in the Oscilloscope plot as a reference channel. The data is displayed in both the time domain and frequency domain. Please read the Pmod MIC3's [[pmod:pmodmic3:reference-manual|Reference Manual]] and see the flow diagram (Figure 1, below) for more information. {{ reference:test-and-measurement:analog-discovery-2:pmod-mic3:flow_diagram.png?direct&400 |}}