Oscilloscope will only measure voltages as a function of time. However, we are
often interested in something other than simply voltages in a circuit; we would
often like to have a representation of current. Most oscilloscopes provide one or
more **math channels** which provide the ability to calculate and plot simple
mathematical functions of the measured voltages. Adding or subtracting voltages
measured on two channels, for example, are common math functions which are
available on most oscilloscopes.

In this project, we will introduce the use of the math channel function on the Analog Discovery™. The Analog Discovery's math channels provide the ability to perform a wide variety of mathematical operations, all of which can be applied to the voltages being measured. We will use a math channel and Ohm's law to determine the current in a resistor.

- Complete the third scope project relative to Measurements and Cursors.

- Use the Analog Discovery oscilloscope math channel.

- To continue where the
Measurements and Cursors project left off, simply close the
**Measurements**window and remove the cursors from the screen by dragging them back to their starting positions at the lower-left and upper-right of the scope's main time window.

We want to find the current

*I*through the 100Ω resistor in the schematic shown to the right.The channel 2 terminals (

**2+, 2-**) are used to measure the voltage difference across the resistor terminals.By Ohm's law, the current through the resistor is the resistor voltage difference divided by the resistance:

\[I = \frac{{{\rm{C}}2}}{{100}}\]

A

**Custom Math Function**window will open. This window provides buttons with a number of math functions, and a text box where a mathematical function can be typed.

The

**Custom Math Function**window will close, and a red line will appear on the main oscilloscope window.

The default scaling on the math channel will very likely be poor and the displayed units will be incorrect. First, change the units of the math channel, as shown below:

- Now, change the scaling on the math channel:

Change the scale on the math channel to

**10 mA/div**. The math channel should now almost exactly overlap the Channel 2 signal. Does this result agree with your expectations, based on the math function of step A?- Create another math channel which is the sum of channels 1 and 2 of the scope. (Tip: adding channels is considered by the Analog Discovery to be “simple” math. You don't need to create a “custom” math channel, though that is certainly an option.)
- The sum of the two channels should simply be equal to the total voltage applied by the waveform generator. Do your results agree with this statement? (Another tip: keep in mind that the current out of the waveform generator is limited. If you attempt to draw more current from the device than it can provide, you may not get the expected voltage from the waveform generator!)

*Other product and company names mentioned herein are trademarks or trade names of their respective companies. © 2014 Digilent Inc. All rights reserved.*