What is an oscilloscope meant to do?

My research into the etymology of the word oscilloscope suggests that it is a device for observing, or examining, signals that swing, or oscillate.  At least that was the essence of the definition at the time oscilloscopes were first invented.  Modern oscilloscopes still allow swinging signals to be examined, but they do so much more thanks to advances in measurement technology and the inclusion of plenty of computational horsepower.  Still, the main function of any oscilloscope is to examine signals. This blog looks at a couple of swinging signals I have an interest in understanding better.


At present, I am designing a small exterior LED lighting system.  The system is low voltage and digitally controlled so there are a few signals to examine that present a real life use case to contribute to my Road Test evaluation of the Keysight MSOX3034TMSOX3034T. The MSOX3000T series is new to me, so I thought I would be helpful to also conduct the signal examination with an oscilloscope I am very familiar with, the Tektronix MDO4104-3.


This blog captures my signal exploration journey with the two oscilloscopes.  While using these two oscilloscopes I assessed their performance based on how well each tool enabled barrier free exploration and documentation of signal characteristics. Simple, intuitive operation was considered to be a positive characteristic while operation that felt like learning a secret handshake was considered to be a negative characteristic.


Both instruments helped me better understand the signals I am interested in, so neither is clearly superior from a basic functional perspective.  There are important differences in how each instrument went about performing the exploration tasks I set them to.  For the purposes of this use case the differences I noticed could be classified as personal preferences for one architecture over the other.


Context for the measurement use case

The signals I measured for this blog are associated with a small landscape lighting project that is part of a larger renovation project.  I will put together an overview of the larger project as it is the basis for many of the use cases upon which the MSOX3034TMSOX3034T will be evaluated.  Many of my electronics projects involve me pondering "what if" questions.  In this case I thought, "Hmm, what if I added LED landscape lighting to the garden shed? What would that look like, and how would I do it?" Another aspect to many of my electronics projects involves pondering questions like "How can I repurpose this thing to make it do something more interesting?"  In this case I took some inexpensive solar dock lights containing two cool white LEDs, a couple of solar cells, a photoresistor, and a AAA rechargeable battery and transformed them into more interesting light fixtures.  The fixtures were completely gutted and refurbished.  Basically all I wanted to keep was the stainless steel case and the light diffuser lens. The fixtures now contain three RGB programmable LEDs that are externally powered from the main solar PV system installed in the garden shed.  Brightness, color, and activation time is, or rather, will be controlled through a management system I am developing using components from Mikroelektronika. Newark carries many Mikroelektronika parts.  The image below shows the original two LED dock light on the left and three modified dock lights on the right.


Original and modified dock lights


The WS2812 devices I used to modify the dock lights are mounted on a flexible PCB strip and are they very easy to control.  Each device on the strip has a single Data In line, a single Data Out line, a +5 VDC power line and a ground connection.  There are three LEDs in each device, one green, one red, and one blue.  See the photos below.  Each LED can be programmed to an intensity level from 0 to 255 using a serial data stream.


WS2812 flexible PCB strip


WS2812 single device


Timing specs for the WS2812 can be found here. Sometime ago I developed bit-banging routines that generate the correct timing for WS2812 LED strings on a PIC18F4520 processor using PIC Basic Pro from MELabs.  I could have developed timing code in C, or some other language, but I had working code written in Basic, so I went with that.  Also, I am retired and I only have to answer to myself on personal projects, so I'm fine with using Basic rather than C.  Maybe I'll use C on the next project, or maybe Python.


My installation plans call for 3 modified dock light fixtures to be mounted on the underside of the rafter tails (there is no soffit) placed so as to illuminate the siding behind three hanging flower baskets. An unmodified dock light is shown mounted on the shed below.


Dock light mounting on shed

There are two parametric variables that I want to play with on the LED fixtures.  First is color temperature.  The original dock lights have two cool white LEDs, which I like in some conditions, but at other times I prefer warm white light.  With fully controllable RGB LEDs in the modified fixtures I can change to whatever color suits the occasion; orange at Halloween, red and green at Christmas, red and white on Canada Day, red, white, and blue on Independence day, etc. So, I wrote code that allowed the intensity of all 9 LEDs in the 3 fixtures to be adjustable.  My second interest relates to the power source driving the LEDs.  The LEDs in the modified dock lights are powered by a solar PV charged deep cycle lead acid battery.  In summer when we get about 17 hours of sunlight every day, this is not a concern.  In the winter, when we get 7 hours of low angle sunlight every day, I am more concerned about power budget.


I wrote code to control intensity of the RGB LEDs and code that allows exploration of a power reduction scheme.  The power reduction scheme is based on programming the LEDs to operate at two intensity levels at a fast enough rate that human eyes don't detect significant flicker. I settled on a 10 ms period composed of a low intensity duration followed by a full intensity duration.  When I test this scheme on the bench I barely notice any flicker.  The low intensity duration is adjustable from 1 ms to 9 ms.  The low intensity RGB values can be adjusted from 1/2 to 1/10 of the full intensity values in integer steps (1/2, 1/3, 1/4, etc). Because I was building upon known working code modules, the application came together quickly.


For the signal explorations using the Keysight MSOX3034TMSOX3034T and the Tektronix MDO4104-3 the LED power save parameters were configured as shown in the image below:

LED power save configuration


These settings will cycle all 9 WS2812 devices every 10 ms with a dim illumination for 3 ms followed by a bright illumination for 7 ms.  Maximum value for any LED is 255.  The values for the bright illumination portion of every cycle are Red = 250 , Green = 150, and Blue = 50.  To my eyes, this combination produces a warm (not too blue) white light.  The dim illumination values will be obtained by dividing the bright illumination values by 5.  In this case the dim illumination values will be 50 for Red (250 / 5), 30 for Green (150/5), and 10 for Blue (50/5).


Using two 'scopes to explore LED signals.

Two signals need to be observed.  The first allows operation of the control code to be verified.  The second provides a comparative assessment of power savings achieved at various settings..The first signal to be explored is the LED data in signal.  This signal will be explored to verify the duration of dim and bright timing and to verify that the dim data values are as calculated above.  The second signal to be explored is the LED supply voltage signal, or more precisely, a signal derived from the supply voltage signal that allows rough quantification of power savings under various dimming configurations.  To generate this derivative signal I inserted a 1 ohm resistor in series with the +5 VDC supply line from the power supply.  A small voltage drop proportional to the current drawn by the LEDs can be examined on the oscilloscope.


The Keysight and Tektronix 'scopes were adjusted to make them as comparable as possible, at least in terms of what the user sees on the screen.  This process included setting up the same horizontal time base for main and zoomed displays, and limiting the vertical channel bandwidths to 20 MHz.  The full bandwidth on the Keysight is 350 MHz whereas the full bandwidth on the Tek is 1 GHz.  The Tek can be throttled back to 250 MHz or to 20 MHz, and the Keysight can be limited to 20 MHz, so both were set to 20 MHz bandwidths for this exploration. Some key differences remained including differences in run time sample rate.  Waveform record length is adjustable from from 1000 points to 20 M points per channel on the Tektronix 'scope.  The Keysight record length is automatically adjusted depending on how many channels are in use. Both instruments have a maximum sample rate of 5 GSa/s.  I set the Tek scope to a 5 M sample record which approximates the 4 M sample record depth on the Keysight.  A main time base of 10 ms/div on both instruments captures about 8 cycles of the power saving scheme. A zoomed time base of 2 us/div allows individual pulses to be examined.


Trigger was set to start the waveform record on positive pulse width under 750 ns with a 2.5 V threshold (2.48 on the Tek 'scope).  This configuration causes both instruments to start their records on the beginning of a power saving cycle.   Screen captures from both scopes are provided below, All Keysight screen captures in this blog were made using the LXI web interface built into the instrument.  All Tektronix screen captures for this blog were obtained using Tektronix Open Choice waveform capture software running on a laptop.

Keysight annotated power save screen capture


I will admit I enjoyed using the annotation features on the Keysight 'scope, especially with the touch screen interface and an 27" external monitor.  As a retired educator I found the ability to add and edit screen annotations quite intriguing. The MSOX3034TMSOX3034T allows up to 10 separate screen annotation to be placed anywhere on the screen with changeable text color, background selection (transparent, opaque, or inverted) and precision X and Y positioning.  Also, the Keysight MSOX3034TMSOX3034T supports front panel USB keyboard attachment (as does the Tek MDO4104-3).  Using the touch screen and an external keyboard I was easily able to create 10 screen annotations and drag them into approximate positions using the touch interface, then finely position each annotation using the general purpose rotary knob. The annotation "LED Data" on the main and zoomed trace is a separate annotation capability available through the Labels feature.


The capture made by the Keysight 'scope occurred at 40 MSa/s.  Channel 4 (LED Data) was bandwidth limited to 20 MHz and trigger was configured on a positive pulse with a duration less than 750 ns. The main time base (at 10 ms/div) shows 8 full cycles of the power saving scheme.  Each cycle is composed of a burst of pulses that set up the power saving (dimmed) portion of the cycle, followed by the dim time period, then a burst of pulses that set up regular illumination, finishing with the regular illumination duration.  The zoomed time base of 2 us/div allows examination of specific LED bit patterns.  These WS2812 devices receive data in the sequence Green-Red-Blue.  The first eight bits sent in each 10 ms cycle will be the dimmed value for the Green LED in the first device.  Regular Green intensity is 150 and the dim divisor is 5, so the dimmed Green LED value should be 30.  The bits in the zoomed view read 00011110 in binary, which is 30 in decimal.  All looks good from a data perspective.  Note that I added the bit decode values using the annotation feature.  The Keysight MSOX3000 series does not have built in WS2812 decode capability.


Lets look at the same signal captured on the Tektronix MDO4000 series instrument.


MDO4000 series LED power save signal capture


The 4000 series Tek instrument has a bigger screen, and more of the available screen real estate is devoted to showing waveform.  I prefer the clean, simple layout on the Tek 'scope where the main time base is kept to a ribbon across the top of the screen, rather than occupying a full half of the display space.  Annotation support is not as robust on the Tek 'scope.  A single annotation can be added and positioned with no support for text color changes or transparent background.  Otherwise, kind of 6 of one, a half dozen of the other - no real winner here, but the touch interface on the Keysight and awesome annotation support does give it a slight edge.  Lets pop up some cursors and measure those dimmed and full intensity portions on the power save cycles.


Keysight cursor measurement of dim time


After having a very positive experience using the touch screen to set up annotations, I had a frustrating experience using the touch screen to manipulate the cursors shown above.  First, a positive for the Keysight 'scope is the ability to set fine horizontal time base steps.  This allowed me to select a 350 us/div time base which spread the dim time across most of the screen to allow for more precise positioning of the cursors.  However, getting the touch interface to recognize that I wanted to move the cursor handles was not so easy, and, once it did recognize my intention, there were two obstacles to overcome to actually position the cursors.  First, even with the generous screen on the MSOX3034TMSOX3034T I found myself using the external monitor to more clearly see where the pulse bursts began and ended.  Second, the minimum step size for touch screen cursor movement feels too big and is nearly unreproduceable.  The smallest step size I could achieve (sometimes) at this time base was 5.468 us.  Yes, that is the step size I saw when making the smallest adjustment I could using the touch interface.  The touch screen cursor movement arrows give a clean 5 us shift per touch.  To get finer resolution the MSOX3034TMSOX3034T supports keyboard entry of cursor position down to about 10 ps steps.  Even though it let me key in a 10 ps step size, I don't think the 'scope is capable of that small a step. Wouldn't a waveform sampled at 40 MSa/s have a minimum step size of 25 ns?  Why do the cursor readouts show 9 decimal places?  At any rate, if the readouts can be believed, the dim duration for the LED is exactly 3 ms.  Now on to the cursor measurement with the Tek MDO4000 series.


MDO4000 series dim time cursor measurement

This waveform was sampled at 1.25 GSa/s.  The cursor delta readout only has 4 decimal places, but like the Keysight measurement, reads exactly 3 ms.  Cursor positioning on the Tek instrument is accomplished with two multipurpose rotary knobs, one for cursor "a", the other for cursor "b".  Tek engineers provided a very smooth, natural response for these knobs that makes precise cursor positioning easy.  At this time base (400 us/div) the multipurpose knobs provide a consistent minimum step size of 4 us. In terms of operational ease, the Tek instrument has a slight edge over the clumsy touch interface on the Keysight, in my opinion.  Now onto the power supply signal to check out actual power saving using this scheme.


Selecting the right tool for the job

Oscilloscopes are all about measuring voltage vs time.  Unlike a digital multimeter, you can't move probes from the voltage input to a current input, switch ranges and start measuring current.  You can purchase current sensing probes, but they are often very expensive.  I have been shopping around for a Keysight N7026A 150 MHz/30 A current probe.  The best deal I've found so far is from the Keysight eBay store for a refurbished probe, without power supply, on offer for $1902.25 USD.  Yikes!  I'll not be jumping on that deal right away.  In the meantime, there are other ways to coax voltage loving oscilloscopes into representing current behavior in circuits.  I'll use one method to do that later.  First, however, I'll use an ammeter to get a first level approximation of current savings under various divisor and duty cycle settings. I am bench testing this scheme with a Keysight E36313A.  This supply can monitor, and log, voltage, current, and power for each of the three independent DC supplies in the instrument.  I used Keysight's BenchVue application to log current drawn by the LEDs under various divisor and duty cycle settings.  The ammeter tests help answer a couple of questions.  Does the scheme actually work?  That is, do changes in duty cycle (dim/bright timing) and dim LED values make a meaningful difference in power consumption?  If they do, then which settings provide the optimum power savings without seriously impacting visual appeal?  I logged current flow into the LEDs in the 3 fixtures under three condition:


  • Nominal full illumination (R= 250, G = 150, R = 50).  This condition draws about 250 mA and consumes about 1.25 W at 5 VDC
  • Minimum power saving condition. Divisor = 2, Dim Time = 1 ms (9 ms full brightness out of every 10 ms cycle)
  • Maximum power saving condition.  Divisor = 10, Dim Time = 9 ms (1 ms full brightness out of every 10 ms cycle)


The data log below shows that, yes indeed, the power saving scheme makes a measurable and meaningful change to current flow.


Current log showing minimum, maximum, and no dimming effect


From a visual perspective, the minimum dimming condition appears to make no difference.  The maximum dimming condition is obviously dimmer and it flickers.  The optimum setting is somewhere between these two extremes.  The relative flatness of the current draw during dimming is an artifact of sample rate.  The current is changing every few milliseconds during dimming, but the slow sample rate of the ammeter doesn't catch that level of detail.  Here is where the oscilloscope can step in.  What I would like to see is the way that current changes during a 10 ms dimming cycle.  The cycle begins with LEDs being commanded to drop intensity.  That command is composed of 27 bytes of serial data sent to 9 WS2812 devices.  The LEDs glow at the dimmed value for some potion of 10 ms, then a new set of illumination values are sent to cause normal intensity illumination.  The LEDs then glow at normal illumination for the remainder of the 10 ms cycle.  I expected the current draw would increase  (or decrease) in steps as each LED received a new illumination value.  The MSOX3034TMSOX3034T helped me discover that my expectation was incorrect.


To make current changes more visible I put a 1 ohm resistor in series with the +5 VDC supply line to the LEDs, then attached a 'scope probe to the low side of this resistor.  The resulting waveform can show the characteristic of current changes, but shouldn't be used to quantify the magnitude of those changes.  It took more effort than I expected to get a useful image of current changes on the 'scopes.  The first issue was noise in the supply signal. Lots of noise. By selecting Averaging as the acquisition mode, most of the noise was smoothed out.  The next issue was selecting an appropriate trigger condition.  My original trigger condition (pulse less than 750 ns) is too restrictive.  As the divisor value changes I can't assume the first bit in the stream will always be a 1.  Solution:  Trigger on rising edge and set the hold off long enough to make sure the next trigger is at the start of a dimming cycle (11 ms worked well)  The switch from normal mode to dim mode is captured by the Keysight 'scope below.


Entering dim mode captured on MSOX3034T


Even with 64 averaged acquisitions, switching noise is clearly evident on the power supply during data transfer.  The burst of data you see is the dimmed RGB values being transferred into 9 WS2812 devices.  The step-like increase in voltage following the transfer actually represents a decrease in current draw.  The LED Power signal is measured at the bottom end of a 1 ohm sampling resistor whose top end is connected to the power supply. A decrease in current draw corresponds to a decreased drop in voltage across the sampling resistor and therefore, an increase in measured voltage at the bottom of the sampling R.  What took me by surprise is the current draw does not change until after all new data values have been transferred.  I expected a step change in current as each LED received its new intensity value.  My assumption was that received data would immediately drive LED illumination.  The behavior revealed by the 'scope examination suggests that data is buffered first, then, when data transmission finishes, all values are transferred into working registers.  The reset time for the WS2812 data line is given as approximately 50 us, thus the approximately 50 us delay before current changes.  There would be no way to reveal this behavior using the slow sampling data logger on the power supply.  A high speed 'scope with averaging acquisition and zoom capability is needed to reveal subtle detail like this.


The same signals captured on the Tek 4000 series MDO are shown below.


Entering dim mode captured on MDO4104-3


Is anyone winning this race?

When using the Tektronix and Keysight oscilloscopes to perform the measurement tasks described in this blog I kept a couple of criteria in mind.  Not only was I evaluating my power saving scheme, I was also evaluating the two instrument's ability to help me evaluate the signals of interest.  For every measurement idea that occurred I checked to see if the 'scope allowed me to explore the details I was interested in, and assessed how easy it was to achieve the measurement goal.  Clearly, both instruments achieved all of the measurement tasks set before them and both did so very well.  In terms of ease of use, so far the touch screen on the Keysight 'scope has been a bit frustrating to use.  There have been plenty of mis-interpreted selections that popped up unwanted menus or moved (or did not move) screen elements.  When touch works well it is a wonderful thing, when it doesn't work well it is an annoyance.  I will say that I frequently went to touch elements on the Tek 'scope only to remember in disappointment  that it is not touch enabled.


During the creation of this blog I learned many things about the MSOX3034TMSOX3034T which I have only had for a few weeks, and many things about the MDO4104-3, which I have had for 8 years.  I also learned interesting things about how my 4-wire Kelvin test leads are wired and why it is a really bad idea to set power supply voltage early in the morning before putting on my glasses.  Turns out the 8 button is right below the 5 button on the E36313A.  Also turns out that WS2812 devices DO NOT tolerate 8 VDC supply voltage very well at all.  I spent an afternoon replacing every single WS2812 in three deck lights.  I am now using the over voltage and over current protection features on the E36313A. 


Next blog will take a look at I2C and RS232 bus decode.


Kind regards,


Mark A.