Rigol DS1052E and DS1102E Delayed Trigger

[/caption]

I have an old Tek scope. A great 50MHz analog beast that was surely the envy of every engineer — well every engineer in 1976 anyway.

Of course, its a Tek so it is built like a tank and has the usual great features — for a 1976-vintage analog scope. One thing it has that is very cool is “delayed sweep.” The idea is that the scope will trigger as normal and then you can pick a fixed time delay and a different time base to actually drive the display. Huh? All that means is that while watching a regular wave form you can “zoom” in on a section of it. The delay tells you how far into the original screen to start, and the faster sweep gives you the zoom factor. The user interface for this is comical but effective. The scope has a special mode where the time delay and “zoomed” time base makes the trace very bright. So you twist the knobs until the part you want to zoom in on is bright and then you can zoom in.

The Rigol DS1102E (or is it a DS1052E? I forget) has the same capability, but being digital it is very simple and the user interface is much more effective. See the screen shot? The top trace shows a 32kHz PWM signal (about 4%) generated, of course, from a . The bottom trace is the “zoom in” — you can pick delayed sweep from the menus or if you are lazy just click the horizontal scale knob (did you know if you press and hold any button you’ll get help — unless you’ve uploaded unofficial firmware).

Once you turn on delayed sweep you get blue bars on the top that show you the part of the wave you are zooming. You can move the trace with the horizontal position knob and change the zoom level using the horizontal scale. Note that the main window (top trace) is at 10uS/division (you can read that near the bottom of the screen). But the zoomed in part is 500nS/division (right under the enlarged pulse).

When you have seen enough, just click the horizontal scale knob again and you are back to “undelayed trigger” or whatever you want to call it. This can be really handy when you are navigating a long buffer. The top view shows you where points of interest in the buffer are, but the bottom view shows you the detail you want.

What would all of this been worth in 1976? My Tek retailed for about US$2500 in its day. Amazing.

Rigol Scope – Alternate Triggering

Another Rigol triggering mode is the so called “Alternate” Triggering. This reminds me of the old analog scopes with two channels, but better. In those days the time swept by and something was going to get drawn. You had your choice of “alternate” or “chop” mode. In alternate mode, each trigger caused one of your channels to draw. The next trigger would draw the second channel. That made the traces nice and solid but you weren’t really looking at the same time on each trace. If the signals repeated together at the trigger point, it didn’t matter much. But if the signals were not exactly coordinated it could drive you crazy. Chop mode didn’t look as good, but you saw both signals at the same time because the scope would draw a little bit of channel 1 and then a little bit of channel 2 and then back up to 1 and so on.

Well with a digital scope there’s no need for chop mode at all. You just acquire both channels and display both on the screen which, after all, is really a random access device. So what’s alternate mode? Well suppose you are looking at two signals that don’t really have anything to do with one another. What you really want is two scopes, right? One to trigger on one signal and another to trigger on the other. You might not even want the same time scale for each channel. That’s what alternate triggering does. It splits the screen in half and each half is like an independent scope.

For example, see the picture at the head of this article. The top signal is another JavaScript creation. This one is a good candidate for pulse width triggering. Here’s the code:

io=createGP3();
io.openPort("/dev/ttyS0");
io.setLow(6);
while (1)
{
  io.pulseOut(6,100);
  io.pulseOut(6,50);
}
Just a long pulse and a short pulse over and over again. That's the top signal and a perfect candidate for pulse triggering.
The bottom half of the screen is just the scope's 1kHz calibration signal. No worries using edge trigger there. If you trigger on either signal alone, the other one will go crazy. Notice each half is even using its own time base (200uS/div up top and 1mS/div at the bottom).  But with alternate triggering its like getting two one channel scopes out of your dual channel scope. Of course, you lose some functions (notably delayed trace, a topic I'll cover some other time). But you gain the ability to see two unrelated signals at the same time. 

 

Rigol DS1000E Pulse Triggering

[/caption]

The Rigol DS1102E/DS1052E has several interesting features and I thought I’d try to do a few blog posts highlighting the ones I found most interesting. This time, I’m going to show you “pulse triggering”.

If you are used to an analog scope, triggering is pretty simple. The idea is that when the scope sees the voltage go above (or below if you select negative slope) some trigger level voltage, the scope starts its sweep. Once it starts, its going to go to the end. With a digital scope like the Rigol, the instrument buffers traces all the time and when the trigger event occurs, it marks some point in the buffer and then fills in the rest of the buffer. So nominally that trigger point is the center. You can look backwards at what happened before the trigger and forward to what happened after the trigger.

With a digital instrument you can more fun kinds of triggers. So here’s an example of where “normal” triggering isn’t really adequate. Pulse width modulation (PWM) varies a pulse train to have a particular duty cycle. For example, a 50% PWM signal might be “on” for 10uS and “off” for 10uS. This can be used to control a motor’s speed or a lamp’s brightness efficiently, among other things.

The board is an economical way to convert a serial port (or a USB port with a serial adapter)) into an analog and digital I/O port. There’s 8 digital I/O, 5 analog inputs, a counter, and — what I’m interested in right now — a hardware PWM output. You can actually output “bursts” of PWM on any of the digital ports, but the hardware output just keeps making a PWM signal until you reprogram it or tell it to stop.

[/caption]

The 9.47uS isn’t critical. It just needs to be bigger than the small pulses and smaller than the wide pulses. Then push the down arrow and select Single for the sweep type. This will cause the scope to get one trigger, record the data, and stop.

If the Run/Stop button is red then the scope has already triggered (not likely in this case). It should be green, so if it is red, push it so that it is green. Now you can run the JavaScript program (assuming your CLASSPATH is set right,

java GP3Script pwmtest.js

will do it.

You can see the result at the start of this post. The Run/Stop button turns red and you should see something like the picture. Notice that the trigger point is marked with the T flag. It occurs AFTER it sees a pulse greater than 9.47uS. You can see that the pulse before that was in fact very narrow (the 10% pulse; about 4uS wide). So we did actually capture the exact moment that the board switched from 10% to 75%. Of course there is plenty of data to the left and the right of the trigger if you want to see more of either width pulse.

Don’t forget when using pulse triggering you still need to set the trigger level or the results can be unstable. You want the level high enough up the pulse to keep noise near ground level from triggering it, it seems.

You can select lots of options on the pulse trigger, including when a pulse is greater than a certain width, less than a certain width or equal to a certain width. You can also pick positive or negative pulses. This is a great way to let the scope watch your data instead of having to collect a lot of samples and then try to find the interesting part.