For novel ideas about building embedded systems (both hardware and firmware), join the 28,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.
Episode 3: LabTool: A Fairly-Decent Low-Cost Scope/Logic Analyzer
|June 16, 2014||
(Go to the complete list of videos)
The LabTool is a 99 € USB instrument that contains a two channel oscilloscope, 11 channel logic analyzer and a waveform generator. Best of all, the hardware and software are open source. None of the specs will excite you, but for the price it's pretty hard to beat. It's good option, especially for firmware people, who need a low-bandwidth scope or 80 MHz logic analyzer.
Watch the 12 minute video for Jack's review of the LabTool.
(There are tons of additional tool reviews here).
Hi, I'm Jack Ganssle and welcome to the Embedded Muse video blog, a companion to my free Embedded Muse newsletter available online.
I get a lot of questions about the inexpensive USB oscilloscopes and logic analyzers. There are dozens on the market right now and they're really attractive. The price point is generally very low and they offer a fair amount of capability especially when you consider the price. Today, we're going to look at the LabTool. This is a small combination wave form generator oscilloscope and logic analyzer from a company named Embedded Artists, which has got to be one of the best names ever for an embedded tools company. If you look at a conventional bench tool, you've got this big screen, all these buttons, very expensive. They add a lot of cost to the product. Why not move those over to the PC? Use a PC screen and use virtual buttons on the screen, and indeed that's what all of these USB devices do, and as a result, they can drastically reduce costs. Of course, there are other extremes you can go to.
For instance, this is the Xprotolab from Gabotronics. It has got to be the smallest oscilloscope ever built, you know, as it has a screen, it's a logic analyzer, eight-channel logic analyzer, two-channel analog scope, wave form generator, and all this for $49, and it's about the size of a postage stamp. This is a very cool product, probably not terribly useful as a lab instrument though.
The LabTool has two analog channels, 11 digital channels. As you can see, it's actually just a stack of two printed circuit boards. There's no box. Handle it with care. It has all the test probes, but as you'll notice, there are no grabbers. You have to buy your own grabbers. These are about two bucks each from Digi-Key. What they do do that's nice though that the analog inputs are B.N.C.'s. Some of these really cheap USB products use just simple wires for the analog input and as you'll see, the people at Embedded Artist took a lot of care with the design of the analog part of this device. It does come with this cable. I have no idea what it's for.
The device can sample digital channels at up to 80 million samples per second. The analog bandwidth varies between 3 and 12 megahertz depending upon the gain of the input amplifiers. That's fairly typical for these low-end devices. The bandwidth is really pretty poor on all of these. The only exception I know of is from Pico Technologies. They make USB scopes with incredibly wide bandwidth and with incredibly high prices as you would expect. The device will decode SPI, I2C, and UART buses. And then a critical feature, of course, is memory depth. On this device, the memory depth is 64K bytes. That allows you to take in up to 16,000 samples if you're just reading the analog channels, or up to 49,000 samples if you're reading only digital. If you start to combine digital and analog, those numbers go down in a way that's well documented in the user's manual.
One of the nice things about the lab tool is that the schematics and the source code are all freely available. They're open source. Let's take a look at the schematic. Here is a part of the circuit for one of the input channels. The analog comes in here through this capacitor, a little unusual, but around the capacitor, we see this low impedance switch which can be controlled by the computer. So, here's one of the first unusual features about this little device. It can be either AC or DC coupled. If we look a little bit deeper, we see this pair of variable capacitors. These are compensators so that the displayed signal is actually the real signal. Now, usually, we put compensation in an oscilloscope probe, so I'm going to guess that the reason that they do it on the board here is so that you can use cheap probes.
The next interesting feature is this analog multiplexer with these resistors of different variables. This is actually selecting which of these resistors gets placed in the feedback loop of that amplifier. In other words, there's a variable gain which is very puzzling because this device has a 12-bit A to D, and if you do the math, especially for a low-cost device like this, you really don't need to have this variable gain, and I'm thinking that might be there for some other feature that gets added in the future, or for a customer who is hacking the code to put in some other feature that they want.
The next interesting feature pertains to the digital inputs, the logic analyzer inputs. You see that they go through ferrite beads and are using these E.S.D. protection diodes. The designers went through an awful lot of effort to make sure that you're not going to blow this thing up from static or poor handling. Nice, nicely done.
I mentioned that the LabTool is really two boards. One of those is a standard board that they use for other products.Well, the last design feature I want to point out is this voltage regulator here, which is used as a clamp to ensure that the analog voltage provided from the actual analog board to the standard board can't exceed a certain value so it can't blow up the other board. It's probably totally unnecessary, but it shows the care that went into the hardware design of this product.
Turning now to the user interface, you can see it's very clean, very simple, very few controls are displayed. If I want to display a signal, I have to add that channel. In this case, I'll add channel A0, analog channel zero, and there is a sine wave. Of course, at this point, it's not acquiring data. It's in a stop mode. I can acquire a single shot by pressing that or go to continuous acquisition there. You can see that there's no trigger. Trigger is set by this. I click on that box that says that is going to be the trigger and this is the trigger level. Over on the left here is the amplitude volts per division.
I can change that and you can see that things are extremely responsive. DC and AC are selected with those controls there. I can move around in time just by dragging in horizontal like this. You can see that the displayed time changes. I'm not a major fan of the way this works. It's sort of counter intuitive if you're used to bench instruments, but it's adequate. Or I can use this horizontal control down here to move back and forth, and as you can see here, this red line is the trigger point. The mouse scroll wheel is the zoom, zoom in, zoom out. I think it's a little strange is it's not really deterministic. It seems like if you look at this 23.3 microseconds, I'll scroll in a couple of clicks, scroll out a couple of clips, and it's not 23.3. I have no idea what's going on there.
You can see as I move along the sine wave, it displays the voltage at the point that I'm point to, and over on the right, it's displayed there as well. One thing that's a little bit concerning is it's jittery. You can see the sine wave is jumping back and forth for no apparent reason. It has nothing to do with the trigger level. This seems to happen no matter where I set the trigger. At first, I thought this might be something to do with the sampling rate or quantization error until I put a square wave in and discovered that the square wave does not jump. So, you can see one pixels worth of jumping here. That's just a display, but the trigger seems to be very consistent. And so my hypothesis is that the problem is this device has some issues with triggering.
Let's put some digital signals in there. I'll turn on a half a dozen of the digital inputs and there we have some wave forms. I'm feeding a pattern generator into the device and you can see that the data is completely unsynchronized because we're triggering off the analog channel. Let's go ahead and turn off the the analog trigger and use one of the digital channels as a trigger.
Now, of course, the analog is all running around because it's not synchronized to anything. If I zoom in with the scroll wheel, this is the trigger point, of course, you can see the patterns. I'm going to go ahead and turn off the analog. It's not doing anything for us at this point. And you can see as we scroll around in the data, it provides us with information about timing off to the right. There are also cursors, four cursors. Here I'm moving cursor three around and off to the right, you can see that indeed the time is changing as well. What's a little puzzling to me is the delta time here. It's not being updated and I don't understand that. In terms of triggering the acquisition, it's very simple. Let's see, the trigger condition is a logical or of these conditions. So, it can be on a falling edge, a rising edge, no trigger at all, and that's about it. It depends upon which channels you've combined here and as I say, they're all logically ORed. So, it's very simple, but it's adequate for an awful lot of work.
Let's look at the pattern generator. Let me just flip on that tab and there's a digital generator here, which is pretty uninteresting. An important point to make is these digital outputs are in the same pins as the digital inputs, so they can't run simultaneously. The analogs, however, come out on their own channel. So there's two-analog output channels. I'll turn them both on here and those are, as I said, distinct from the analog inputs. Let's go ahead and generate a square wave coming at the analog channel at one kilohertz. You can see from the other oscilloscope display that indeed a square wave is coming out, or I could change that to a triangle wave. And again, you can see that on the other oscilloscope also at one kilohertz. Now, it's important to note that the bandwidth on these is really low. If I go to a ten kilohertz triangle wave, as you can see on the other oscilloscope it's, pretty distorted, and that's true no matter what kind of wave form is being generated. These are pretty narrow bandwidth outputs.
So, would I recommend the lab tool? Yes, in the right circumstances. One of the very strong features is the fact that the hardware and software design are open source. That means if you want to enhance or extend the capability of that product, it's easy to do so. It's a very inexpensive tool at 99 Euros. It's pretty hard to beat that. If you're looking for a device just for learning about electronics and you don't need a lot of performance or a lot of bandwidth, this isn't a bad choice. I have shown it to a few friends and they all want one, so that says something.
Thanks for watching and don't forget to go over to ganssle.com for more embedded videos, over 1000 articles on the subject, and be sure to sign up for the free Embedded Muse newsletter.