from IPython.core.display import HTML
def set_width(width):
    display(HTML(f"""<style>  
            .container {{ width:{width}% !important; 
                            min-width:800px !important; margin: 0 auto}} 
            .jp-Cell {{ width:{width}% !important; 
                            min-width:800px !important; margin: 0 auto}} </style>"""))
# Set container width to X% of the fullscreen 
set_width(50)

2A: Scope: AC/DC and AC frequency dependency scope#

Learning goal: be able to measure or calculate voltage and frequency with the oscillator, and understand how changing settings on the function generator and oscilloscope change your measurement.

Experiments of this week:

  • experiment 2A: Investigate the AC/DC coupling and the AC frequency dependency with the oscilloscope

  • experiment 2B: Apply the correct triggering between function generator and oscilloscope

  • experiment 2C: Use the picopi to measure the Thevenin equivalent of a circuit

Structure of experiment:

  • Background+Anticipate (10+10+15 min): per person. This is homework.

  • Simulate: not this time

  • Implement & Investigate (25+30+20 min): with partner (group of 2)

  • Compare & Conclude (10 min): with group of 4 (per table)

This is an overview of the settings you will explore. They are broken in to I&I1, I&I2, and I&I3 you will find further below.

  • scope option: channels

  • scope option: measure in AC or DC

  • scope option: triggering on channel 1

  • function generator: duty cycle & scope: coupling

  • function generator + scope: signal with varying duty cycle and varying frequency

Background#

⏳ Estimated time: 10 min

The oscilloscope is an indispensable device to test electronic circuits and is an important complement to the DMM. It allows the observation of signals that vary over time and therefore allows a better study of parameters such as frequency and amplitude for AC signals.

Check out the intro on the scope, read up to the scope basics and cursors https://mwdocter.github.io/TeachBook/main/EI_manuals/intro_scope_Agilent.html

Anticipate 1: Calculate the right Oscilloscope settings#

⏳ Estimated time: 10 min

You need to be able to set the scope settings yourself (the auto setup button is helpful, but not flawless)

Calculate the correct settings (time/div and V/div) for signal 1:

  • Input = a square or block wave of frequency 100Hz, amplitude 3Vpp and duty cycle 50%.

  • Display = 6 full cycles and full amplitude 3 divisions.

  • Oscilloscope (12 divisions wide, 8 divisions heigh)

Calculate the right input voltage and frequency for signal 2:

  • A sine wave is displayed in the oscilloscope (12 divisions wide, 8 divisions heigh)

  • Its peak-to-peak amplitude is 5 divisions and 3 full cycles fit the display.

  • Settings are 500mV/division and 5ms/division.

optional challenge: (feel free, if you want to practice more)
Considering a sine wave of 3Vp, calculate the missing parameter

  • 1.5 Cycles displayed; 10 ms/division: Frequency of the signal (Hz)??

  • 0.02 ms/div; 8300 Hz: how many cycles displayed?

  • 3 Cycles displayed; 500 Hz: what is the scale (ms/div)

### TO DO="the correct settings for signal 1&2"

Anticipate 2: How will AC/DC mode and signal’s frequency influence the measured Voltage#

⏳ Estimated time: 15 min

A scope can display in AC mode (average subtracted), or DC mode. You will vary the duty cycle (% of a blockwave signal being high).

  • What is the influence of changing the duty cycle of a signal, on the displayed AC signal on the scope?

  • When going to low frequency signals (sine < 0.5 Hz), how will the choice of AC/DC coupling affect the measured signal?

https://en.wikipedia.org/wiki/Duty_cycle: The duty cycle D is defined as the ratio between the pulse duration, or pulse width (PW) and the period (T) of a rectangular waveform

In DC mode: the displayed voltage is the actual voltage Vin
In AC mode: the displayed voltage is Vin - average(Vin) Below diagrams from UofW lab notes (https://ece.uwaterloo.ca/~lab140/scope_notes.pdf):

in AC an additional capacitor filters out the low frequencies. Note that a constant value can be seen as a signal with freuqency 0 Hz.

### TO DO="## your answer to: influence of AC/DC mode and frequency on measured signal"

Watch the following movie to get a quick intro on what you will be doing while doing the measurements

Implement & Investigate 1: Measure the function generator’s output with the scope#

⏳ Estimated time: 25 min

  • Connect the output of the function generator to CH1 of the scope and generate a signal.

  • Generate a 25 Hz sine wave with an amplitude of 3 Vpp, a DC offset of 1.5 V

  • Change the settings such that you see a nice representation of your signal

  • Write down how many cycles or periods you see on the scope screen

ℹ️ Hints
  • Use a coax cable to connect the two devices.

  • Make sure that the correct LOAD resistance is entered (HIGH Z) under UTILITY / OUTPUT SETUP.

  • Set the generator to a 25 Hz sine wave with an amplitude of 3 Vpp, a DC offset of 1.5 V.

  • Don’t forget to switch the output on

  • Turn on Channel 1 on the oscilloscope.

  • Set channel 1 to ‘DC’ coupling

  • Use 1.00 V/div, offset 0.00 V (small coloured knob)

  • trigger level is approximately 0.50 V, and trigger source is channel 1.

ℹ️ Hints Scope can be a little finicky when adjusting settings with a knob. Don’t get discouraged! Also if you don’t see the full sine wave, change the 1V/div to a different value so you see the whole function

### TO DO="How many cycles did you observe on the oscilloscope screen?"

Implement & Investigate 2: Investigate the influence of AC/DC mode on the measured signal#

⏳ Estimated time: 30 min

We will investigate what the difference is between AC and DC coupling

  • To observe this difference you can use a rectangular wave of 25 Hz, 4 Vpp, 50% duty cycle, DC offset -2V.

  • Change the duty cycle and toggle AC and DC mode to your liking

ℹ️ Hints
  • On the scope:

    • Set the DC offset on the scope to zero.

    • verify that the minimum and maximum of the measured signal are -2V and +2V.

    • switch CH 1 between DC and AC coupling.

Are the displayed signals different between DC and AC coupling?

  • On the function generator: set the duty cycle of the rectangular wave to 20%.

  • On the scope: switch CH 1 between DC and AC coupling.

    • Now you should observe a difference between DC and AC coupling.

ℹ️ Hints You do not see any difference? Make sure you are coupling the signal, not the trigger

Describe and explain what happens to the displayed signals when using AC or DC coupling.

### TO DO="Describe and explain the difference between AC/DC for 20% duty cycle?"

Implement & Investigate 3: Investigate the influence of the signal’s frequency on the measured signal#

⏳ Estimated time: 20 min

  • Try to use different signals.

  • Bring down the frequency and see what happens.

ℹ️ Hints
  • on the Scope: use AC coupling, 100 ms/div or even 1 sec/div

  • on the function generator: Select a sine wave of 25 Hz, 4 Vpp, no DC offset.

    • Adapt the frequency, and observe the influence on the Vout

      • Decrease the frequency from 25 Hz in steps of 1 Hz down to 1 Hz.

      • Further decrease the frequency of the sine wave, in steps of 100 mHz down to 100 mHz.

  • on the scope, set CH1 to DC coupling.

Describe the difference between DC and AC coupling for 100mHz.

### TO DO="Describe the influence of DC and AC coupling for a 100 mHz signal"

Compare&conclude#

⏳ Estimated time: 10 min

Like previous week:

  • Wait till all (4) group members finish their observation

  • Compare your results with your other group members.

  • If your results agree, and are in line with all predictions, then talk to a TA and get checked off

  • Otherwise, so if your results do not agree, or your results are not in line with your predictions, then first discuss amongst your group before getting a TA.

to be checked off by a TA:

  1. explanation of the effect of duty cycle on displayed blockwave (DC/AC mode)

  2. explanation of the difference between low frequency AC and DC display

  3. exit card:

    1. Write a brief abstract on what you learned (conclusion, useful graph),

    2. Which troubleshooting skills do you want to remember for next sessions,

    3. Which code do you copy for use in next sessions,

  4. How do you think this notebook could be improved

#2A scope

### TO DO="1. explain duty cycle effect"

### TO DO="2.explain the AC-DC difference at low freuqency"

### TO DO="3a. abstract"


### TO DO="3b. troubleshooting"


### TO DO="3c. code"


### TO DO="4. what changes would you suggest?"

If you got stuck during the measurement, at the end of the lab assignment we offer you a movie clip with our recorded efforts in the lab. If you were successfull with measuring, then skip this movie clip