A Workspace for “Engineering Magic”

Brandsma_workspace2

Photo 1—Brandsma describes his workspace as his “little corner where the engineering magic happens.”

Sjoerd Brandsma, an R&D manager at CycloMedia, enjoys designing with cameras, GPS receivers, and transceivers. His creates his projects in a small workspace in Kerkwijk, The Netherlands (see Photo 1). He also designs in his garage, where he uses a mill and a lathe for some small and medium metal work (see Photo 2).

Brandsma_lathe_mill

Photo 2—Brandsma uses this Weiler lathe for metal work.

The Weiler lathe has served me and the previous owners for many years, but is still healthy and precise. The black and red mill does an acceptable job and is still on my list to be converted to a computer numerical control (CNC) machine.

Brandsma described some of his projects.

Brandsma_cool_projects

Photo 3—Some of Brandsma’s projects include an mbed-based camera project (left), a camera with an 8-bit parallel databus interface (center), and an MP3 player that uses a decoder chip that is connected to an mbed module (right).

I built a COMedia C328 UART camera with a 100° lens placed on a 360° servomotor (see Photo 3, left).  Both are connected to an mbed module. When the system starts, the camera takes a full-circle picture every 90°. The four images are stored on an SD card and can be stitched into a panoramic image. I built this project for the NXP mbed design challenge 2010 but never finished the project because the initial idea involved doing some stitching on the mbed module itself. This seemed to be a bit too complicated due to memory limitations.

I built this project built around a 16-MB framebuffer for the Aptina MT9D131 camera (see Photo 3, center). This camera has an 8-bit parallel databus interface that operates on 6 to 80 MHz. This is way too fast for most microcontrollers (e.g., Arduino, Atmel AVR, Microchip Technology PIC, etc.). With this framebuffer, it’s possible to capture still images and store/process the image data at a later point.

This project involves an MP3 player that uses a VLSI VS1053 decoder chip that is connected to an mbed module (see Photo 3, right). The great thing about the mbed platform is that there’s plenty of library code available. This is also the case for the VS1053. With that, it’s a piece of cake to build your own MP3 player. The green button is a Skip button. But beware! If you press that button it will play a song you don’t like and you cannot skip that song.

He continued by describing his test equipment.

Brandma_test_equipment

Photo 4—Brandsma’s test equipment collection includes a Tektronix TDS220 oscilloscope (top), a Total Phase Beagle protocol analyzer (second from top), a Seeed Technology Open Workbench Logic Sniffer (second from bottom), and a Cypress Semiconductor CY7C68013A USB microcontroller (bottom).

Most of the time, I’ll use my good old Tektronix TDS220 oscilloscope. It still works fine for the basic stuff I’m doing (see Photo 4, top). The Total Phase Beagle I2C/SPI protocol analyzer Beagle/SPI is a great tool to monitor and analyze I2C/SPI traffic (see Photo 4, second from top).

The red PCB is a Seeed Technology 16-channel Open Workbench Logic Sniffer (see Photo 4, second from bottom). This is actually a really cool low-budget open-source USB logic analyzer that’s quite handy once in a while when I need to analyze some data bus issues.

The board on the bottom is a Cypress CY7C68013A USB microcontroller high-speed USB peripheral controller that can be used as an eight-channel logic analyzer or as any other high-speed data-capture device (see Photo 4, bottom). It’s still on my “to-do” list to connect it to the Aptina MT9D131 camera and do some video streaming.

Brandsma believes that “books tell a lot about a person.” Photo 5 shows some books he uses when designing and or programming his projects.

Brandsma_books

Photo 5—A few of Brandsma’s “go-to” books are shown.

The technical difficulty of the books differs a lot. Electronica echt niet moeilijk (Electronics Made Easy) is an entry-level book that helped me understand the basics of electronics. On the other hand, the books about operating systems and the C++ programming language are certainly of a different level.

An article about Brandsma’s Sun Chaser GPS Reference Station is scheduled to appear in Circuit Cellar’s June issue.

Traveling With a “Portable Workspace”

As a freelance engineer, Raul Alvarez spends a lot of time on the go. He says the last four or five years he has been traveling due to work and family reasons, therefore he never stays in one place long enough to set up a proper workspace. “Whenever I need to move again, I just pack whatever I can: boards, modules, components, cables, and so forth, and then I’m good to go,” he explains.

Raul_Alvarez_Workspace _Photo_1

Alvarez sits at his “current” workstation.

He continued by saying:

In my case, there’s not much of a workspace to show because my workspace is whichever desk I have at hand in a given location. My tools are all the tools that I can fit into my traveling backpack, along with my software tools that are installed in my laptop.

Because in my personal projects I mostly work with microcontroller boards, modular components, and firmware, until now I think it didn’t bother me not having more fancy (and useful) tools such as a bench oscilloscope, a logic analyzer, or a spectrum analyzer. I just try to work with whatever I have at hand because, well, I don’t have much choice.

Given my circumstances, probably the most useful tools I have for debugging embedded hardware and firmware are a good-old UART port, a multimeter, and a bunch of LEDs. For the UART interface I use a Future Technology Devices International FT232-based UART-to-USB interface board and Tera Term serial terminal software.

Currently, I’m working mostly with Microchip Technology PIC and ARM microcontrollers. So for my PIC projects my tiny Microchip Technology PICkit 3 Programmer/Debugger usually saves the day.

Regarding ARM, I generally use some of the new low-cost ARM development boards that include programming/debugging interfaces. I carry an LPC1769 LPCXpresso board, an mbed board, three STMicroelectronics Discovery boards (Cortex-M0, Cortex-M3, and Cortex-M4), my STMicroelectronics STM32 Primer2, three Texas Instruments LaunchPads (the MSP430, the Piccolo, and the Stellaris), and the following Linux boards: two BeagleBoard.org BeagleBones (the gray one and a BeagleBone Black), a Cubieboard, an Odroid-X2, and a Raspberry Pi Model B.

Additionally, I always carry an Arduino UNO, a Digilent chipKIT Max 32 Arduino-compatible board (which I mostly use with MPLAB X IDE and “regular” C language), and a self-made Parallax Propeller microcontroller board. I also have a Wi-Fi 3G TP-LINK TL-WR703N mini router flashed   with OpenWRT that enables me to experiment with Wi-Fi and Ethernet and to tinker with their embedded Linux environment. It also provides me Internet access with the use of a 3G modem.

Raul_Alvarez_Workspace _Photo_2

Not a bad set up for someone on the go. Alvarez’s “portable workstation” includes ICs, resistors, and capacitors, among other things. He says his most useful tools are a UART port, a multimeter, and some LEDs.

In three or four small boxes I carry a lot of sensors, modules, ICs, resistors, capacitors, crystals, jumper cables, breadboard strips, and some DC-DC converter/regulator boards for supplying power to my circuits. I also carry a small video camera for shooting my video tutorials, which I publish from time to time at my website (www.raulalvarez.net). I have installed in my laptop TechSmith’s Camtasia for screen capture and Sony Vegas for editing the final video and audio.

Some IDEs that I have currently installed in my laptop are: LPCXpresso, Texas Instruments’s Code Composer Studio, IAR EW for Renesas RL78 and 8051, Ride7, Keil uVision for ARM, MPLAB X, and the Arduino IDE, among others. For PC coding I have installed Eclipse, MS Visual Studio, GNAT Programming Studio (I like to tinker with Ada from time to time), QT Creator, Python IDLE, MATLAB, and Octave. For schematics and PCB design I mostly use CadSoft’s EAGLE, ExpressPCB, DesignSpark PCB, and sometimes KiCad.

Traveling with my portable rig isn’t particularly pleasant for me. I always get delayed at security and customs checkpoints in airports. I get questioned a lot especially about my circuit boards and prototypes and I almost always have to buy a new set of screwdrivers after arriving at my destination. Luckily for me, my nomad lifestyle is about to come to an end soon and finally I will be able to settle down in my hometown in Cochabamba, Bolivia. The first two things I’m planning to do are to buy a really big workbench and a decent digital oscilloscope.

Alvarez’s article “The Home Energy Gateway: Remotely Control and Monitor Household Devices” appeared in Circuit Cellar’s February issue. For more information about Alvarez, visit his website or follow him on Twitter @RaulAlvarezT.

Evaluating Oscilloscopes (Part 4)

In this final installment of my four-part mini-series about selecting an oscilloscope, I’ll look at triggering, waveform generators, and clock synchronization, and I’ll wrap up with a series summary.

My previous posts have included Part 1, which discusses probes and physical characteristics of stand-alone vs. PC-based oscilloscopes; Part 2, which examines core specifications such as bandwidth, sample rate, and ADC resolution; and Part 3, which focuses on software. My posts are more a “collection of notes” based on my own research rather than a completely thorough guide. But I hope they are useful and cover some points you might not have otherwise considered before choosing an oscilloscope.

This is a screenshot from Colin O'Flynn's YouTube video "Using PicoScope AWG for Testing Serial Data Limits."

This is a screenshot from Colin O’Flynn’s YouTube video “Using PicoScope AWG for Testing Serial Data Limits.”

Topic 1: Triggering Methods
Triggering your oscilloscope properly can make a huge difference in being able to capture useful waveforms. The most basic triggering method is just a “rising” or “falling” edge, which almost everyone is (or should be) familiar with.

Whether you need a more advanced trigger method will depend greatly on your usage scenario and a bit on other details of your oscilloscope. If you have a very long buffer length or ability to rapid-fire record a number of waveforms, you might be able to live with a simple trigger since you can easily throw away data that isn’t what you are looking for. If your oscilloscope has a more limited buffer length, you’ll need to trigger on the exact moment of interest.

Before I detail some of the other methods, I want to mention that you can sometimes use external instruments for triggering. For example, you might have a logic analyzer with an extremely advanced triggering mechanism.  If that logic analyzer has a “trigger out,” you can trigger the oscilloscope from your logic analyzer.

On to the trigger methods! There are a number of them related to finding “odd” pulses: for example, finding glitches shorter or wider than some length or finding a pulse that is lower than the regular height (called a “runt pulse”). By knowing your scope triggers and having a bit of creativity, you can perform some more advanced troubleshooting. For example, when troubleshooting an embedded microcontroller, you can have it toggle an I/O pin when a task runs. Using a trigger to detect a “pulse dropout,” you can trigger your oscilloscope when the system crashes—thus trying to see if the problem is a power supply glitch, for example.

If you are dealing with digital systems, be on the lookout for triggers that can function on serial protocols. For example, the Rigol Technologies stand-alone units have this ability, although you’ll also need an add-on to decode the protocols! In fact, most of the serious stand-alone oscilloscopes seem to have this ability (e.g., those from Agilent, Tektronix, and Teledyne LeCroy); you may just need to pay extra to enable it.

Topic 2: External Trigger Input
Most oscilloscopes also have an “external trigger input.”  This external input doesn’t display on the screen but can be used for triggering. Specifically, this means your trigger channel doesn’t count against your “ADC channels.” So if you need the full sample rate on one channel but want to trigger on another, you can use the “ext in” as the trigger.
Oscilloscopes that include this feature on the front panel make it slightly easier to use; otherwise, you’re reaching around behind the instrument to find the trigger input.

Topic 3: Arbitrary Waveform Generator
This isn’t strictly an oscilloscope-related function, but since enough oscilloscopes include some sort of function generator it’s worth mentioning. This may be a standard “signal generator,” which can generate waveforms such as sine, square, triangle, etc. A more advanced feature, called an arbitrary waveform generator (AWG), enables you to generate any waveform you want.

I previously had a (now very old) TiePie engineering HS801 that included an AWG function. The control software made it easy to generate sine, square, triangle, and a few other waveforms. But the only method of generating an arbitrary waveform was to load a file you created in another application, which meant I almost never used the “arbitrary” portion of the AWG. The lesson here is that if you are going to invest in an AWG, make sure the software is reasonable to use.

The AWG may have a few different specifications; look for the maximum analog bandwidth along with the sample rate. Be careful of outlandish claims: a 200 MS/s digital to analog converter (DAC) could hypothetically have a 100-MHz analog bandwidth, but the signal would be almost useless. You could only generate some sort of sine wave at that frequency, which would probably be full of harmonics. Even if you generated a lower-frequency sine wave (e.g., 10 MHz), it would likely contain a fair amount of harmonics since the DAC’s output filter has a roll-off at such a high frequency.

Better systems will have a low-pass analog filter to reduce harmonics, with the DAC’s sample rate being several times higher than the output filter roll-off. The Pico Technology PicoScope 6403D oscilloscope I’m using can generate a 20-MHz signal but has a 200 MS/s sample rate on the DAC. Similarly, the TiePie engineering HS5-530 has a 30-MHz signal bandwidth, and similarly uses a 240 MS/s sample rate. A sample rate of around five to 10 times the analog bandwidth seems about standard.

Having the AWG integrated into the oscilloscope opens up a few useful features. When implementing a serial protocol decoder, you may want to know what happens if the baud rate is slightly off from the expected rate. You can quickly perform this test by recording a serial data packet on the oscilloscope, copying it to the AWG, and adjusting the AWG sample rate to slightly raise or lower the baud rate. I illustrate this in the following video.


Topic 4: Clock Synchronization

One final issue of interest: In certain applications, you may need to synchronize the sample rate to an external device. Oscilloscopes will often have two features for doing this. One will output a clock from the oscilloscope, the other will allow you to feed an external clock into the oscilloscope.

The obvious application is synchronizing a capture between multiple oscilloscopes. You can, however, use this for any application where you wish to use a synchronous capture methodology. For example, if you wish to use the oscilloscope as part of a software-defined radio (SDR), you may want to ensure the sampling happens synchronous to a recovered clock.

The input frequency of this clock is typically 10 MHz, although some devices enable you to select between several allowed frequencies. If the source of this clock is anything besides another instrument, you may have to do some clock conditioning to convert it into one of the valid clock source ranges.

Summary and Closing Comments
That’s it! Over the past four weeks I’ve tried to raise a number of issues to consider when selecting an oscilloscope. As previously mentioned, the examples were often PicoScope-heavy simply because it is the oscilloscope I own. But all the topics have been relevant to any other oscilloscope you may have.

You can check out my YouTube playlist dealing with oscilloscope selection and review.  Some topics might suggest further questions to ask.

I’ve probably overlooked a few issues, but I can’t cover every possible oscilloscope and option. When selecting a device, my final piece of advice is to download the user manual and study it carefully, especially for features you find most important. Although the datasheet may gloss over some details, the user manual will typically address the limitations you’ll run into, such as FFT length or the memory depths you can configure.

Author’s note: Every reasonable effort has been made to ensure example specifications are accurate. There may, however, be errors or omissions in this article. Please confirm all referenced specifications with the device vendor.

Evaluating Oscilloscopes (Part 3)

In Part 3 of my series on selecting an oscilloscope, I look at the software running the oscilloscope and details such as remote control, fast Fourier transform (FFT) features, digital decoding, and buffer types.

Two weeks ago, I covered the differences between PC-based and stand-alone oscilloscopes and discussed the physical probe characteristics. Last week I discussed the “core” specifications: analog bandwidth, sample rate, and analog-to-digital converter (ADC) resolution. Next week, I will look into a few remaining features such as external trigger and clock synchronization, and I will summarize all the material I’ve covered.

Topic 1: Memory Depth
The digital oscilloscope works by sampling an ADC and then stores these samples somewhere. Thus an important consideration will be how many samples it can actually store. This especially becomes apparent at higher sample rates—at 5 gigasamples per second (GS/s), for example, even 1 million samples (i.e., 1 megasample or 1 MS) means 200 µs of data. If you are looking at very low-cost oscilloscopes, be aware that many of them have very small buffers. Searching on eBay, you can find an oscilloscope such as the Hantek DSO5202P, which has a 1 GS/s sample rate and costs only $400. The record length is only 24 kilosamples (KS) however, which would be 24 µs of data. You can find even smaller buffers:  the Tektronix TDS2000C series has only a 2,500-sample (2.5 KS) buffer length. If you only want to look around the trigger signal, you can live with a small buffer. Unfortunately, when it comes to troubleshooting you rarely have a perfect trigger, and you may need to do a fair amount of “exploration.”  A small buffer means the somewhat frustrating experience of trying to capture the signal of interest within your tiny window of opportunity.

Even if the buffer space is advertised as being huge, you may not be able to easily access the entire space. The Pico Technology PicoScope PS6403D advertises a 1-GS buffer space, one of the largest available. With the PC-based software you can configure a number of parameters; however, it always seems to limit the sample buffer to about 500 MS.  I do admit it’s fairly impressive that this still works at the 5 GS/s sample rate, since that suggests a memory bandwidth of 40 Gb/s! Using the segmented buffer (discussed later in this article) enables use of the full sample memory, but it cannot record a full continuous 1 GS trace, which you might expect based on the sales pitch.

Topic 2: FFT Length
Oscilloscope advertisements often allude to their ability to perform in a “spectrum analyzer” mode. In reality, what the oscilloscope is doing is performing an FFT of the measured signal. One critical difference is that a spectrum analyzer typically has a “center frequency” and you are able to measure a certain bandwidth amount to either side of that center frequency. By sweeping the center frequency, you can get a graph of the power present in the frequency system over a very wide range.

Using the oscilloscope’s FFT mode, there is no such thing as the center frequency. Instead you are always measuring from 0 Hz up to some limit, which is usually user-adjustable. The limit is, at most, half the oscilloscope’s sample rate but may be further limited by the oscilloscope’s analog bandwidth. Now here is the trick—the oscilloscope will specify a certain “FFT length,” which is how many points are used in calculating the FFT. This will also define the number of “bins” (i.e., horizontal frequency resolution) in the output graph. Certain benchtop oscilloscopes may have very limited FFT lengths, such as those containing only 2,048 points.  This may seem fine for viewing the entire spectrum from 0–100 MHz. But what if you want to zoom in on the 95–98 MHz range? Since the oscilloscope is actually calculating the FFT from 0 Hz, it will have only ~60 points it can display in that range. It suddenly becomes apparent why you want very long FFT lengths—it allows you to zoom in and still obtain accurate results. You can set the oscilloscope sample rate down to zoom in on frequencies around 0 Hz. So, for example, if you want to accurately do some measurements at 1–10 kHz, it’s not a big issue since you can set a low enough sample rate so that the 2,048 points are distributed between 0–20 kHz or similar. And when you zoom in you’ve got lots of detail.

In addition to the improved horizontal detail, longer FFT lengths push down the noise floor.  If you do wish to use the oscilloscope for frequency analysis, having a long FFT length can be a huge asset. This is shown in Figure 1, which compares an FFT taken using a magnetic field probe of a microcontroller board. Here I’ve zoomed in on a portion of the spectrum, with the left FFT having 2,048 points, the right FFT having 131,072 points.

Figure 1: When zooming in on a portion of the fast Fourier transform (FFT), having a larger number of points for the original calculation becomes a huge asset. Also, notice the lower noise floor for the figure on the right, calculated with 131,072 points, compared to the 2,048 used for the figure on the left.

Figure 1: When zooming in on a portion of the fast Fourier transform (FFT), having a larger number of points for the original calculation becomes a huge asset. Also, notice the lower noise floor for the figure on the right, calculated with 131,072 points, compared to the 2,048 used for the figure on the left.

A note on selecting a unit: The very low-cost oscilloscopes with small data buffers will obviously use a very small FFT length. But specifications for some of the larger memory depth oscilloscopes, such as the Rigol Technologies DS2000, DS4000, and DS6000 models, show they use smaller FFT lengths.  These models use only 2,048 points, according to a document posted on Rigol’s website, despite their large memory (131 MS).  PC-based oscilloscopes seem to be the best, as they can perform the FFT on a powerful desktop PC, rather than requiring it be done in an embedded digital signal processor (DSP) or field-programmable gate array (FPGA). For example, the PicoScope 6403D allows the FFT length to be up to 1,048,576 points.

Topic 3: Segmented Buffer
A feature I consider almost a “must-have” is a segmented buffer. This means you can configure the oscilloscope to trigger on a certain event, and it will record a number of waveforms of a certain length. For glitches that occur only occasionally (which is, 90% of the time, why you are troubleshooting in the first place), this can speed up your ability to find details of what the system is doing during a glitch.

Figure 2 shows an example of the segmented buffer viewer on the PicoScope software, where the number of buffers can be configured up to 10,000. Similar features exist in the Rigol DS4000 and DS6000, which call each segment a “frame” and can record up to 200,000 frames! Once you have a number of segments/frames, you can either manually flip through looking for the glitch, or use features such as mask limit testing to highlight segments/frames that differ from the “usual.”

Figure 2

Figure 2: Segmented buffers allow you to capture a number of traces and then flip through them looking for some specific feature. Using mask-based testing will also speed this up, since you can quickly find “odd man out”-type waveforms.

Certain oscilloscopes might make the segmented buffer an add-on. For example, only certain Agilent Technologies 3000 X-Series models contain segmented buffers by default; others in that same family require you to purchase this feature for an extra $800! Of course, always review any promotional offers—Agilent has recently advertised that it will enable all features on that oscilloscope model for the price of a single option.

Topic 4: Remote Control/Streaming
One more advanced feature is controlling the oscilloscope from your computer. If you wish to use the oscilloscope in applications beyond electronics troubleshooting, you should seriously consider the features different oscilloscopes provide.

PC-based oscilloscopes tend to have a considerable advantage here, as they are typically designed to interface to the computer. It seems most PC-based oscilloscopes from popular suppliers come with nice application programming interfaces (APIs) for most languages: I’ve found examples in C, C#, C++, MATLAB, Python, LabVIEW, and Delphi for most PC-based oscilloscopes. Some of the “no-name” PC-based oscilloscopes you find on eBay do not have an API, so always check closely for your specific device.

Most of the stand-alone oscilloscopes also have a method of sending commands, typically using a standard such as the Virtual Instrument Software Architecture (VISA). However, I’ve found these stand-alone oscilloscopes seem to have a considerably slower interface compared to a PC-based oscilloscope. Presumably for the PC-based oscilloscope, this interface is critical to overall performance, whereas for the stand-alone it’s simply an “add-on” feature. This isn’t a sure thing, of course—for example, see the PC interface for the Teledyne LeCroy oscilloscope, as described in a company blog post. It looks to give you access to features similar to those of PC-based oscilloscopes (multiple windows, etc.).

Beyond just controlling the oscilloscope, another interesting feature is streaming mode. In streaming mode data is not downloaded to an internal buffer on the oscilloscope. Instead it streams directly over the PC interface (typically USB or Ethernet). This feature is considerably more complex to work with than simple PC-based control, as achieving fast streams via USB is not trivial. However, using streaming mode opens up many interesting features. For example, you could use your oscilloscope as part of a software defined radio (SDR). If you wish to use such a feature, be sure to carefully read the specification sheets for the streaming mode limitations.

Topic 5: Decoding Serial Protocols
Decoding of serial protocols is another useful feature. If you have a digital logic analyzer, it will almost certainly include the ability to decode serial protocols. But it can be helpful to have this feature in the oscilloscope as well. If you are chasing down an occasional parity error, you can use the oscilloscope’s analog display to see if the issue is simply a weak or noisy signal.

While most oscilloscopes seem to support this feature, many require you to pay for it. Typically PC-based oscilloscopes will include it for free, but stand-alone oscilloscopes require you to purchase it. For example, this feature costs $500 for the Rigol Technologies DS4000 series, $800 for the Agilent Technologies 3000X, and $1,100 for the Tektronix DPO/MSO3000 series. Depending on the vendor, it may include multiple protocols or only one. But if you wish to enable all available protocols, it could cost more than your oscilloscope! It would typically be cheaper to purchase a PC-based logic analyzer than it would be to buy the software module for your oscilloscope.

This is one of the major reasons I prefer PC-based oscilloscopes: There tends to be no additional cost for extra features! Without the decoding you can look at the signal and see if it “looks” noisy, but having the decoding built-in means you can easily point to the specific moment when the error occurs. I’ve got some examples of such serial decoding in my video below.

Topic 6: Software Features
I’ve already mentioned it a few times in passing, but you should always check to see what software features are actually included. You may be surprised to find out some features require payment—even some models adding the FFT or other “advanced math” features require payment of a substantial fee.

There is hope on the horizon for getting access to all features in stand-alone oscilloscopes at a reasonable cost. As I mentioned earlier, Agilent Technologies recently announced it would be providing access to all software features for the cost of one module in the X-2000, X-3000, and X-4000 series. Once this goes into effect, it means that it’s really just $500–$1,500 for decoding of all serial protocols and all math features, depending on your oscilloscope. They sell this as saving you up to $16,500. (Which to me just shows how insanely expensive all these software add-ons really are!) With luck, other vendors will follow suit, and perhaps even finally include these software options in the selling price.

If you’re looking at PC-based oscilloscopes, you’ll often be allowed to download the software and play with it, even if you don’t have an instrument. This can give you an idea of how “polished” the user interface is. Considering how long you’ll spend inside this user interface, it’s good to know about it!

Closing Comments
This week I covered a number of features revolving around the software running the oscilloscope. Next week I’ll be looking into a few remaining features such as external trigger and clock synchronization, which will round out this guide.

Author’s note: Every reasonable effort has been made to ensure example specifications are accurate. There may, however, be errors or omissions in this article. Please confirm all referenced specifications with the device vendor.

Evaluating Oscilloscopes (Part 2)

This is Part 2 of my mini-series on selecting an oscilloscope. Rather than a completely thorough guide, it’s more a “collection of notes” based on my own research. But I hope you find it useful, and it might cover a few areas you hadn’t considered.

Last week I mentioned the differences between PC-based and stand-alone oscilloscopes and discussed the physical probe’s characteristics. This week I’ll be discussing the “core” specifications: analog bandwidth, sample rate, and analog-to-digital converter (ADC) resolution.

Topic 1: Analog Bandwidth
Many useful articles online discuss the analog oscilloscope bandwidth, so I won’t dedicate too much time to it. Briefly, the analog bandwidth is typically measured as the “half-power” or -3 dB point, as shown in Figure 1. Half the power means 1/√2 of the voltage. Assume you put a 10-MHz, 1-V sine wave into your 100-MHz bandwidth oscilloscope. You expect to see a 1-V sine wave on the oscilloscope. As you increase the frequency of the sine wave, you would instead expect to see around 0.707 V when you pass a 100-MHz sine wave. If you want to see this in action, watch my video in which I sweep the input frequency to an oscilloscope through the -3 dB point.

Figure 1: The bandwidth refers to the "half-power" or -3 dB  point. If we drove a sine wave of constant amplitude and increasing frequency into the probe, the -3 dB point would be when the amplitude measured in the scope was 0.707 times the initial amplitude.

Figure 1: The bandwidth refers to the “half-power” or -3 dB point. If we drive a sine wave of constant amplitude and increasing frequency into the probe, the -3 dB point would be when the amplitude measured in the scope is 0.707 times the initial amplitude.

Unfortunately, you are likely to be measuring square waves (e.g., in digital systems) and not sine waves. Square waves contain high-frequency components well beyond the fundamental frequency of the wave. For this reason the “rule of thumb”  is to select an oscilloscope with five times the analog bandwidth of the highest–frequency digital signal you would be measuring. Thus, a 66-MHz clock would require a 330-MHz bandwidth oscilloscope.

If you are interested in more details about bandwidth selection, I encourage you to see one of the many excellent guides. Adafruit has a blog post “Why Oscilloscope Bandwidth Matters” that offers more information, along with links to guides from Agilent Technologies and Tektronix.

If you want to play around yourself, I’ve got a Python script that applies analog filtering to a square wave and plots the results, available here. Figure 2 shows an example of a 50-MHz square wave with 50-MHz, 100-MHz, 250-MHz, and 500-MHz analog bandwidth.

Figure 2: This shows sampling a 50-MHz square wave with 50, 100, 250, and 500-MHz of analog bandwidth.

Figure 2: This shows sampling a 50-MHz square wave with 50, 100, 250, and 500 MHz of analog bandwidth.

Topic 2: Sample Rate
Beyond the analog bandwidth, oscilloscopes also prominently advertise the sample rate. Typically, this is in MS/s (megasamples per second) or GS/s (gigasamples per second). The advertised rate is nearly always the maximum if using a single channel. If you are using both channels on a two-channel oscilloscope that advertises 1 GS/s, typically the maximum rate is actually 500 MS/s for both channels.

So what rate do you need? If you are familiar with the Nyquist criterion, you might simply think you should have a sample rate two times the analog bandwidth. Unfortunately, we tend to work in the time domain (e.g., looking at the oscilloscope screen) and not the frequency domain. So you can’t simply apply that idea. Instead, it’s useful to have a considerably higher sample rate compared to analog bandwidth, say, a five times higher sample rate. To illustrate why, see Figure 3. It shows a 25.3-MHz square wave, which I’ve sampled with an oscilloscope with 50-MHz analog bandwidth. As you would expect, the signal rounds off considerably. However, if I only sample it at 100 MS/s, at first sight the signal is almost unrecognizable! Compare that with the 500 MS/s sample rate, which more clearly looks like a square wave (but rounded off due to analog bandwidth limitation).

Again, these figures both come from my Python script, so they are based purely on “theoretical” limits of sample rate. You can play around with sample rate and bandwidth to get an idea of how a signal might look.

Figure 3

Figure 3: This shows sampling a 25.3-MHz square wave at 100 MS/s results in a signal that looks considerably different than you might expect! Sampling at 500 MS/s results in a much more “proper” looking wave.

Topic 3: Equivalent Time Sampling
Certain oscilloscopes have an equivalent time sampling (ETS) mode, which advertises an insanely fast sample rate. For example, the PicoScope 6000 series, which has a 5 GS/s sample rate, can use ETS mode and achieve 200 GS/s on a single channel, or 50 GS/s on all channels.

The caveat is that this high sample rate is achieved by doing careful phase shifts of the A/D sampling clock to sample “in between” the regular intervals. This requires your input waveform be periodic and very stable, since the waveform will actually be “built up” over a longer time interval.

So what does this mean to you? Luckily, many actual waveforms are periodic, and you might find ETS mode very useful. For example, if you want to measure the phase shift in two clocks through a field-programmable gate array (FPGA), you can do this with ETS. At 50 GS/s, you would have 20 ps resolution on the measurement! In fact, that resolution is so high you could measure the phase difference due to a few centimeters difference in PCB trace.

To demonstrate this, I can show you a few videos. To start with, the simple video below shows moving the probes around while looking at the phase difference.

A more practical demonstration, available in the following video, measures the phase shift of two paths routed through an FPGA.

Finally, if you just want to see a sine wave using ETS you can check out the bandwdith demonstration  I referred to earlier in the this article. The video (see below) includes a portion using ETS mode.

 

Topic 4: ADC Resolution
A less prominently advertised feature of certain oscilloscopes is the ADC bit resolution in the front end. Briefly, the ADC resolution tells you how the analog waveform will get mapped to the digital domain. If you have an 8-bit ADC, this means you have 28 = 256 possible numbers the digital waveform can represent. Say you have a ±5 V range on the oscilloscope—a total span of 10 V. This means the ADC can resolve 10 V / 256 = 39.06 mV difference on the input voltage.

This should tell you one fact about digital oscilloscopes: You should always use the smallest possible range to get the finest granularity. That same 8-bit ADC on a ±1 V range would resolve 7.813 mV. However, what often happens is your signal contains multiple components—say, spiking to 7 V during a load switch, and then settling to 0.5 V. This precludes you from using the smaller range on the input, since you want to capture the amplitude of that 7-V spike.

If, however, you had a 12-bit ADC, that 10 V span (+5 V to -5 V) would be split into 212 = 4,096 numbers, meaning the resolution is now 2.551 mV.  If you had a 16-bit ADC, that 10-V range would give you 216 = 65,536 numbers, meaning you could resolve down to 0.1526 mV. Most of the time, you have to choose between a faster ADC with lower (typically 8-bit) resolution or a slower ADC with higher resolution. The only exception to this I’m aware of is the Pico Technology FlexRes 5000 series devices, which allow you to dynamically switch between 8/12/14/15/16 bits with varying changes to the number of channels and sample rate.

While the typical ADC resolution seems to be 8 bits for most scopes, there are higher-resolution models too. As mentioned, these devices are permanently in high-resolution mode, so you have to decide at purchasing time if you want a very high sample rate, or a very high resolution. For example, Cleverscope has always advertised higher resolutions, and their devices are available in 10, 12, or 14 bits. Cleverscope seems to sell the “digitizer” board separately, giving you some flexibility in upgrading to a higher-resolution ADC. TiePie engineering has devices available from 8–14 bits with various sample rate options. Besides the FlexRes device I mentioned, Pico Technology offers some fixed resolution devices in higher 14-bit resolution. Some of the larger manufacturers also have higher-resolution devices, for example Teledyne LeCroy has its High Resolution Oscilloscope (HRO), which is a fixed 12-bit device.

Note that many devices will advertise either an “effective” or “software enhanced” bit resolution higher than the actual ADC resolution. Be careful with this: software enhancement is done via filtering, and you need to be aware of the possible resulting changes to your measurement bandwidth. Two resources with more details on this mode include the ECN magazine article “How To Get More than 8 Bits from Your 8-bit Scope” and the Teledyne LeCroy application note “Enhanced Resolution.” Remember that a 12-bit, 100-MHz bandwidth oscilloscope is not the same as an 8-bit, 100-MHz bandwidth oscilloscope with resolution enhancement!

Using the oscilloscope’s fast Fourier transform (FFT) mode (normally advertised as the spectrum analyzer mode), we can see the difference a higher-resolution ADC makes. When looking at a waveform on the screen, you may think that you don’t care at all about 14-bit accuracy or something similar. However, if you plan to do measurements such as total harmonic distortion (THD), or otherwise need accurate information about frequency components, having high resolution may be extremely important to achieve a reasonable dynamic range.

As a theoretical example I’m using my script mentioned earlier, which will digitize a perfect sine wave and then display the frequency spectrum. The number of bits in the ADC (e.g., quantization) is adjustable, so the harmonic component is solely due to quantization error. This is shown in Figure 4. If you want to see a version of this using a real instrument, I conduct a similar demonstration in this video.

Certain applications may find the higher bit resolution a necessity. For example, if you are working in high-fidelity audio applications, you won’t be too worried about an extremely high sample rate, but you will need the high resolution.

Figure 4: In the frequency domain, the effect of limited quantization bits is much more apparent. Here a 10-MHz pure sine wave frequency spectrum is taken using a different number of bits during the quantization process.

Figure 4: In the frequency domain, the effect of limited quantization bits is much more apparent. Here a 10-MHz pure sine wave frequency spectrum is taken using a different number of bits during the quantization process. (CLICK TO ZOOM)

Coming Up
This week I’ve taken a look at some of the core specifications. I hope the questions to ask when purchasing an oscilloscope are becoming clearer! Next week, I’ll be looking at the software running the oscilloscope, and details such as remote control, FFT features, digital decoding, and buffer types. The fourth and final week will delve into a few remaining features such as external trigger and clock synchronization and will summarize all the material I’ve covered in this series.

Author’s note: Every reasonable effort has been made to ensure example specifications are accurate. There may, however, be errors or omissions in this article. Please confirm all referenced specifications with the device vendor.