Oscilloscopes 101

NOTE: This document is more like a lesson plan for how to learn in person.

Motivation

As a firmware engineer, I [Sahil] describe it as 20% EE, 80% a messed up version of software. You’re responsible for caring about things on the order of bytes, while also knowing how to jerry-rig boards and know how to read schematics. The oscilloscope is one of the most powerful tools available to a firmware engineer - most are capable of acting as a logic analyzer, but even those without such capability offer an insight into what your code is doing.

Theory of Operation

An oscilloscope, at its core, is simply a multimeter that graphs the voltage of a particular node in time.

Like a multimeter, the oscilloscope is a high-impedance device - that means it will not draw current from the circuit that is being tested. The rightmost part of the oscilloscope is the most recent part of a signal, meaning you read an oscilloscope from left to right (if this doesn’t make sense, it will be made intuitive after a little bit).

Wiring

An oscilloscope usually has a few channels, this allows you to attach multiple probes at the same time. Each probe is a co-axial cable containing one wire for ground and the other should be connected to the waveform source. All of the channels are generally grounded together inside the oscilloscope, however, this is not always the case so we recommend always hooking up the ground of each probe.

It is worth noting that the alligator clip portion of the probe is ground and the “hook” end of the probe is intended to be connecting to the desired waveform supply. Additionally, the hook is often sheathed in the plastic end of the probe so be sure you hook it on strongly before using (I definitely didn’t spent an evening trying to sample a clock using only the ground alligator clips of two probes ). When connecting you your circuit remember that the oscilloscope is a high-impedance device so you can connect it in parallel with any communication signal without affecting the circuit.

The oscilloscope usually has a sample 2kHz waveform on the front that you can use to test your probes and test the oscilloscope itself. It can also be used to tune the oscilloscope prior to connecting to the circuit you are trying to probe.

Scales

An oscilloscope features a horizontal and vertical scale, as well as a horizontal and vertical offset. It is critical to understand how to correctly determine these parameters (though it is more of an art), as not doing so can lead to incorrect conclusions about the data.

→ Hook up the scope to the 2kHz test wave

→ Show the effect of vertical scale and vertical offset

→ Show the effect of horizontal scale and horizontal offset

2 sine waves transposed with differing scale and offset parameters, credit.

If you’re really stuck, just hit auto and call it a day

Trigger

Additionally, an oscilloscope features a trigger function, usually in the form of a dial. Additionally, while adjusting the trigger you should see the trigger bar moving up and down on the y-axis. Where the trigger bar is sets when the oscilloscope registers a high or a low from the raw waveform. When your trigger is set incorrectly you will see unrecognizable rapid oscillations because the oscilloscope doesn’t know where to stop and start measuring. The ideal trigger is halfway between the peak high and the bottom low of the waveform although if your signal is extremely clear anywhere between the high and low of the waveform is correct.

→ Hook up the scope to the 2kHz test wave

→ Adjust your trigger value up and down to see the effects

Additionally, you can adjust the trigger slope mode, usually this is hidden in some menu. This changes where on the waveform the oscilloscope is sampling horizontally while the trigger dial adjust where the waveform is sampled vertically. A visualization of this is below:

Credit: PHYS345 Laboratory: Introduction to the Oscilloscope

Usually you can choose between rising edge, falling edge, and both although some oscilloscopes have more features. Usually when sampling a signal rising edge or falling edge mode are used.

→ Adjust your trigger mode to see the effects

Run/Stop/Single

The stop ability of the oscilloscope stop the oscilloscope and freeze the display in place. This allows you to navigate the menus to find some feature you’re looking for while preserving the useful information. Further, if the display seems frozen, check the oscilloscope is not in stop mode. This is usually a button and it may even have a light to be sure you are aware of what mode you are in. This button is usually found near the power button!

→ Adjust try the “stop”/”run” buttons or toggle button

The single feature of the oscilloscope is meant to catch extrema in the waveform. The idea is that if you set your trigger slightly above the waveform and press the single button when a portion of the waveform crosses your trigger the oscilloscope with automatically stop. This allows you to analyze the waveform right around an extrema and hopefully diagnose an issue! Note that if you have your trigger set normally then hitting the single button will instantly put the oscilloscope into stop mode.

→ Try adjusting trigger and using the single button

This is hard to demonstrate with the provided test wave since the test wave is consistent and doesn’t contain spikes.

Logic Decoding Capability

Logic decoding capabilities are only possible for certain oscilloscopes and are usually hidden in the menus. You are required to choose the communication protocol (i.e. SPI, I2C, etc) and must select which oscilloscope channel is for which wire of the protocol (i.e. for I2C you would select which channel is SCL and which is SDA).

Assuming your trigger and scale is set correctly the oscilloscope will show the hexadecimal bytes on the waveform as they come. Other methods of viewing the data is extremely particular to the specific oscilloscope model you have. For specific ways of viewing the bytes make a few google searches on the model you have you I’m sure you’ll figure it out