Beginner Analog Discovery, Module 1

Voltage Instrument

DC Power Supplies

Applying voltage using the Analog Discovery's Voltage instrument to a diode to produce light.

26.4K
×
Voltmeter Instrument

Measuring DC Voltages

Utilize the Analog Discovery's Voltmeter instrument to measure voltage in a circuit.

15.9K
×
Basic Periodic Signals

Project 1: Waveform Generator

Using the Analog Discovery's arbitrary waveform generator to apply a time-varying signal to an LED to make it flash on and off. This project builds off of the previous Analog Discovery material.

14.9K
×
Sinusoids and Swept Signals

Project 2: Waveform Generator

Use the arbitrary waveform generator on the Analog Discovery to apply sinusoidal and swept sinusoidal voltages to a speaker.

15.6K
×
Modulated Signals

Project 3: Waveform Generator

Use the arbitrary waveform generator on the Analog Discovery to create frequency modulated signals and apply them to a speaker. This project builds off of the previous Analog Discovery material.

10.5K
×
Audio and .wav Files

Project 4: Waveform Generator

Use the Analog Discovery to play back .wav files through the speaker included in the analog parts kit. This project builds off of material presented in previous Analog Discovery projects.

14.5K
×
Importing Files and Playing “Scales”

Project 5: Waveform Generator

Use the Analog Discovery's ability to import "custom" waveforms from a file.

11.2K
×
Creating Signals from Math and “Beating”

Project 6: Waveform Generator

Use the Analog Discovery's ability to create "custom" waveforms according to a mathematical function.

9.40K
×
Basic Waveform Measurement and Display

Project 1: Oscilloscope

Introduces the Analog Discovery's Oscilloscope instrument. Explains the basics of the ways in which voltages are acquired and displayed by the oscilloscope.

21.0K
×
Triggered Acquisition

Project 2: Oscilloscope

The Arbitrary waveform generator instrument will be used to apply relatively rapidly varying wave forms to the oscilloscope, and then triggering of the waveform will be used to make the waveform easier to view and analyze.

11.9K
×
Measurements and Cursors

Project 3: Oscilloscope

How to use some of the most basic and common oscilloscope tools to simplify the measurement process.

13.4K
×
Math Channels

Project 4: Oscilloscope

Introduces the use of the math channel function on the Analog Discovery. This function allows the user to perform a wide variety of mathematical operations, all of which can be applied to the voltages being measured.

14.2K
×
XY Plots

Project 5: Oscilloscope

Use the Analog Discovery to plot the voltage-current characteristics of a light emitting diode.

16.6K
×
Exporting data

Project 6: Oscilloscope

Export the voltage-current data of a light emitting diode.

13.0K
×
Single Sequence Acquisition

Project 7: Oscilloscope

Acquiring vibration data from the piezoelectric sensor from the analog parts kit.

9.10K
×

Importing Files and Playing “Scales”

Project 5: Waveform Generator

Importing Files and Playing “Scales”

Project 5: Waveform Generator

Introduction

In this experiment, we will use the Analog Discovery's™ ability to import “custom” waveforms from a file. Custom waveforms do not fall into any particular category of common waveforms (e.g., sinusoids, square waves, and triangular waves all fall into broad categories—their names provide intrinsic information as to the basic shape of the waveform).

The Analog Discovery allows us to import waveforms from either .txt (text) or .csv (comma separated variable) files. These files can be created by other applications such as Microsoft Excel®, Microsoft Notepad®, or MathWorks MATLAB®. It is also common to record data in .csv or .txt format—thus, one can record a waveform using (for example) an oscilloscope and then use the AWG to re-generate the recorded signal. This allows ready testing of circuits under expected operating conditions.

In this project, we will import a waveform into the AWG which was created in Microsoft Notepad. The imported file will have a number of discrete “levels”—when we modulate the frequency of a sinusoid with this signal, we will get a signal which consists of a number of different frequencies. When we play this signal through our speaker, we will get a set of discrete tones which will sound somewhat like playing scales.

Before you begin, you should:
  • Be able to use the Analog Discovery waveform generator to apply Sinusoids and Swept Signals to a circuit.
  • State what file formats can be imported to the Analog Discovery waveform generator.
  • State how the period of a swept signal changes with time.
After you're done, you should:
  • Use the Analog Discovery waveform generator to import and play files.

Inventory:

Qty Description Typical Image Schematic Symbol Breadboard Image
1 Buzzer/Speaker
The Buzzer/Speaker in the analog parts kit has two terminals. If a time-varying voltage is applied between the terminals a film in the speaker vibrates, converting the voltage waveform to a pressure waveform with a similar "shape." Note: The speaker in your parts kit may have different markings than the one pictured.

Procedures

Shortcut!

If you have completed the Sinusoids and Swept Signals project and your circuit is still intact, feel free to skip to Step 2 of this exercise.

Step 1: Understanding the Circuit

A. Circuit Schematic

  1. Connect one terminal of the speaker to the W1 terminal of your Analog Discovery.

  2. Connect the other terminal of the speaker to a ground terminal on your Analog Discovery.

B. Create Circuit

  1. Insert the terminals of the speaker into your breadboard so that they are in different rows.

  2. Connect W1 (the yellow wire) to one terminal of the speaker.

  3. Connect ground (, the black wire) to the other speaker terminal.

Step 2: Set up Instruments

A. Open WaveGen Instrument

  1. Open WaveForms™ to view the main window.

  2. Click on the WaveGen icon to open the waveform generator.

B. Create a “Stair Step” Waveform Using Notepad

  1. Open up the Microsoft Notepad program on your computer. Type, on successive lines, the values: 1, 2, 3, 4, 5, 6. Save the result as steps.txt. The result should look as shown in the figure below.

Screenshot of Microsoft Notepad 2009 running on Microsoft Windows 7.

C. Import the File from Part B as the Baseband Signal

  • Note: At some point during the above steps, you may get a pop-up error message to the effect that “Output amplitude exceeds device limits”. You can ignore this message; it will get fixed when we disable Amplitude Modulation in a later step.

Step 3: Experiment

A. Create and Apply the Frequency Modulated Signal

The images above are screenshots of Digilent WaveForms running on Microsoft Windows 7.
  1. Click on Run AWG1 or Run All to provide power to your circuit. You should hear a series of “tones” of successively increasing frequency. If the sound is difficult to hear, use a set of headphones plugged into the audio jack on the back of the Analog Discovery to listen to the sound.

Interpreting the Data

The steps.txt file does not contain information relative to the sampling rate of the data it contains (that is, the AWG does not know how far apart in time to put the data points—it only knows that there are six data points). The AWG assumes that the data points are evenly spaced throughout the buffer. Thus, the data created by the AWG consists of six different levels, each corresponding to one of the levels defined in the .txt file, and each occupying one-sixth of the total time period.

Test Your Knowledge!

  1. The above sequence of tones doesn't really constitute musical “scales”. The frequencies of our tones are equally spaced; in scales, the frequency doubles between successive notes. Try playing a set of real scales by creating a text file whose successive values double (e.g. the values 1, 2, 4, 8, ...) and using this file to modulate a sinusoid.

  2. Put a pause between each of the tones in our project. You can do this by adding a “zero” between each of the values in our above text file (e.g. create a text file with the values 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6 on separate lines and using that file to modulate our sinusoidal carrier wave).
    • Does the result sound like you would expect? Why? (Hint: modulating a sinusoid with “zero” gives a signal with zero frequency—it's a constant. Speakers need a time-varying input to create an audible sound.)

  • Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.
  • Circuit and breadboard images were created using Fritzing.