====== Using the Audio Adapter ====== ~~TechArticle~~ {{ learn:instrumentation:tutorials:ad2-audio-adapter:spec.png?direct&800 |Spectogram }} ---- From the beginning of our lives we could count on our senses to evaluate the things around us. We could see what the light touched, we could hear and feel vibrations, we could smell scents. In the audio spectrum, while we can hear sound and feel the vibrations, we usually can't see it, making it difficult to analyze. With advances in technology, stimuli can now be perceived with unconventional senses, including sound. Now we have tools to record and visually analyze a sound; we use these tools to manipulate it by changing the frequency or modulate it in different ways. \\ The Analog Discovery already provides a way to manipulate the signals from the WaveGen generator and also listen to the sound they make. There was also a possibility to load an audio file from your PC and using the scope to see how it looks like and manipulate it in different ways.\\ With the new Audio Adapter we can now stream the signals from external sources directly into the Analog Discovery oscillocope and analyze it using Waveforms.\\ **This tutorial will go through the available settings and controls available on the GUI, and and example of acquiring signals for external sources such as speakers or a phone. **\\ ---- ==== Inventory ==== * A Digilent Test & Measurement Device with Analog Input and Output Channels: * [[https://digilent.com/shop/analog-discovery-2-100ms-s-usb-oscilloscope-logic-analyzer-and-variable-power-supply/|Analog Discovery 2]] * Analog Discovery (Legacy) * [[https://digilent.com/shop/audio-adapter-for-analog-discovery/|Audio Adapter Add-on Board]] * [[https://digilent.com/shop/software/digilent-waveforms/|WaveForms software]] * A computer with a USB port * A [[https://digilent.com/shop/usb-a-to-micro-b-cable/|USB A to Micro B cable]] * A load of interest to test and a stereo audio 3.5mm jack cable. Note: If you're looking for the Audio Adapter+ for Analog Discovery 3, check out its resource center, here: [[add-ons/audio-adapter-plus/start]] ---- ===== Getting Started and Controls ===== ===== Setting up the Hardware ===== To set up the hardware for this experiment, you need to: \\ 1. Connect your Analog Discovery to your computer\\ 2. Plug the Audio Adapter in the Analog Discovery \\ 3. Set the Jumper on the Audio Adapter in Stereo position\\ 4. Plug a stereo 3.5mm Audio Jack in the Mono/Stereo Jack Connector (J3) and in the audio output of your computer.\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:d_1.png?direct&800 |Hardware Setup }} ---- ===== Setting up the Software ===== For this tutorial we are going to use the //Scope// instrument from the Waveforms. To launch it, select the //Scope// instrument to from the main interface.\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:open_scope.png?direct&800 |Selecting the Scope Instrument }} ---- WaveForms will show the following view:\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:scope_view.png?direct&800 |Initial look at the Scope Instrument }} ---- A number of options are available at the top of the GUI including File, Control, View, Window. For a more in depth look on the //Scope// features and how to use the instrument, you can check the [[reference:software:waveforms:waveforms-3:start:|Waveforms Tutorials]] or check the help menu for a more detailed description of each option available in the GUI. \\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:help.png?direct&500 |Help Menu }} ---- {{ learn:instrumentation:tutorials:ad2-audio-adapter:scope_help.png?direct&800 |Scope Instrument functionality }} ---- As shown in the view menu and the main toolbar, a variety of different measurements can be taken for the system. For the next steps in the experiment proposed for the Analog Discovery Audio Adapter a few settings need to be made. \\ 1. Set Mode on Record\\ 2. Set trigger condition on Rising\\ 3. Source Channel 1 for trigger\\ 4. Set the level at 70mV\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:set1.png?direct&800 |Scope Settings }} ---- On the Config button, to make sure that for this particular experiment we'll be able to see something on the screen, we'll set some parameters as shown below\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:config.png?direct&300 |Record Configuration }} ---- A sound needs to be played through the audio output of your computer and the sample we used can be found here: [[learn:instrumentation:tutorials:ad2-audio-adapter:soud:|Audio File]] To see how it will look on the //Scope// instrument, we are going to prepare the media file in a player. Click on Record on Waveforms and then Play on your player. The sound has ~1s so this is how your window should look like:\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:play.png?direct&800 |Sound Record }} ---- We can change the time base to see the signal more in detail or we can see the Spectrum of the signal. In order ti see the spectrum, we will select Spectogram and/or Spectogram 3D from the Toolbar.\\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:spec.png?direct&800 |Spectogram }} ---- {{ learn:instrumentation:tutorials:ad2-audio-adapter:3d.png?direct&800 |3D Spectogram }} ---- The 3D representation can be moved around by holding pressed the Right Click of the mouse. \\ By adding a X/Y graph we can see how the signal on one channel is represented reported to the other. \\ {{ learn:instrumentation:tutorials:ad2-audio-adapter:xy.png?direct&800 |X/Y Representation Graph }} ---- A nice showcase would be playing the "Multidimensional effect" of some songs as they can be found on streaming platforms. What they are doing to simulate the multidimensional effect of the sound, is to move it from one channel to the other simultaneously with playing with the levels. \\ ---- ==== Next Steps ==== For more guides on how to use the Digilent Test and Measurement Device, return to the device's Resource Center, linked from the [[test-and-measurement:start]] page of this wiki. If voltage values seen in the //Scope// are significantly different from expected, please calibrate the device by following the [[test-and-measurement:guides:waveforms-calibration|Calibration Guide]]. For more information on WaveForms visit the [[software:waveforms:waveforms-3:reference-manual|WaveForms Reference Manual]]. For technical support, please visit the [[https://forum.digilent.com/forum/8-test-and-measurement/|Test and Measurement]] section of the Digilent Forums. ---- {{tag>audio audio-adapter-tutorial ad2 analog-discovery analog-discovery-2 tutorial}}