audio_capture_lab

docx

School

University of Colorado, Denver *

*We aren’t endorsed by this school

Course

112

Subject

Electrical Engineering

Date

Feb 20, 2024

Type

docx

Pages

3

Uploaded by gg379703

Report
In Class Activity 2: Audio Capture Introduction In this lab, we will create a LabView VI that captures the audio signal from a headphone jack. We will read the analog voltage signal using DAQ hardware and LabView, then save the data as a .wav file that can be played back using a media player. We will also plot the collected audio signal. Learning Objectives After completing this exercise, you should be able to: Create a simple LabView VI to record an analog voltage signal Use LabView express VIs to collect data Present collected data on the front panel of a LabView VI Use NI DAQ hardware to collect analog voltage data Part 1: Hardware Connections Obtain a headphone cable from the instructors. Cut this cable in half if it is not already. You will probably find three wires inside: Red: The right audio channel positive signal White: The left audio channel positive signal Bare copper: A common ground Some cables use a different wire color coding system. Refer to the following diagram to find out which wire is which. At your workstation, you should have a toolbox with a breadboard and various tools. In the toolbox or out on the bench should be BNC to banana plug adapters. They look like this:
The BNC connection can be plugged into the channels of your DAQ using the accessory board on your bench. The red terminal is the positive connection and the black is negative. The different input and output channels are labeled on the accessory board. Find two analog input channels and connect the audio right and left channels as shown in the diagram below. Note, the diagram shows the AI0 and AI1 input channels being used. You can use any analog input channels as long as you configure LabView to read those channels in the next part. Question 1.1: Must you always use one or two wires to measure a voltage with the DAQ? Why? Answer: Part 2 LabView VI Besides hardware, we will also need software to read the voltage measurements from the DAQ, process, and save the data. We will create a LabView VI to control the DAQ hardware, collect data, and process the data. Consider the following pseudo code for the VI: 1. When activated, the VI continuously collects analog voltage readings 2. The readings are saved in an appropriate data type to be saved as a .wav file and graph 3. When the VI is stopped, the readings are written to the .wav file and plotted on a graph From this description, we can see that we have inputs and outputs. We can also describe the basic operation of the VI. Inputs: Audio right channel: An analog voltage signal
Audio left channel: An analog voltage signal Outputs: A .wav file of the recorded audio signal A graph of the audio signal waveforms Use the provided video tutorial or follow along with your instructor to set up your VI to capture and record the audio signals. Be sure you collect the items in the checklist below before leaving the lab. Part 2: Questions for reflection After completing the in lab activity, answer the following questions: Question 2.1: Paste your VI screenshot from the in lab activity below. Paste Screenshot Here Question 2.2: Describe the quality of your recorded audio file. Is the sound quality as good as the original source? What are some factors that could degrade the quality of the audio signal? Answer: Question 2.3: Describe any difficulties you had completing the lab and the steps you took to troubleshoot these problems. Answer: Question 2.4: Explain what a shift register does and how you can use it to record a song for this lab. Answer: Question 2.5: What three components are contained in the waveform variable? How are these components used to represent an analog voltage signal? Answer:
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help