|For novel ideas about building embedded systems (both hardware and firmware), join the 39,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 22: Perils of Using a Scope's Invert Feature to Do Differential Measurements
May 8, 2018
(Go to the complete list of videos)In the olden days we often did differential measurements on a scope by inverting one of the channels. That worked with analog scopes, but can be a problem with digital versions.
Hi, I'm Jack Ganssle, and welcome to my Embedded Muse video blog. In episode 19, I reviewed EE equipments, EE-701 differential preamp for an oscilloscope. A number of people contacted me and asked why can't they just feed both inputs into the oscilloscope directly without the preamp, invert one channel, and they use the Math function in order to sum the two? That would give the same sort of result as a differential input. Unfortunately, it doesn't work.
To recap from episode 19, here's a EE-701 fed by two sine waves from my arbitrary waveform generator. Both are in phase, one's set to four volts, and the other to 4.01 volts. That's just a tiny 10 millivolt difference. With the preamp's gain set to 1,000, you can see the scope, which is set to two volts per division, show that 10 millivolt difference quite permanently. Now I'll remove the preamp and feed both channels directly into the scope.
So, as you can see, both the channels from the waveform generator are going into channels one and two on the oscilloscope. Now go ahead and slide channel two and invert that one. You can see the phase is now up by 180 degrees. And I'll turn on the Math function and I've set it to sum the two channels, and we get this very strange-looking waveform. Here, I'm setting the gain of that very strange waveform to 100 millivolts per division. The result is garbage. Remember, there's only 10 millivolt difference between these two input channels, but this garbage occupies something like 200 millivolts on the screen. If I crank the gain of the sweep rate up to two nanoseconds per division, you can see that the sample rate is something like 250 picoseconds. It looks like at each division there's two nanoseconds. So, but you can see, quite a bit of a signal in between them. This particular scope is now sampling at 4 billion samples per second, which pretty closely corresponds with what we're looking at here.
Crank the gain back down, or the sweep rate. I'm gonna turn the gain on the two input channels up to 500 millivolts per division. And you can see that that apparent noise goes down. There's some clipping in there. You can see clipping here. It gets bigger. That's just because the A-to-D is saturated there. Go into 200 millivolts per division, free to the channels. You can see the noise gets to be very small, much smaller than it was. And yes, we're clipping here and here because the A-to-D is just saturated. But the noise is going down. This scope, like most scopes, uses 8-bit A-to-D converters and basically, what we're looking at is quantization error. And in fact, all you're looking at is the scope's inability to sense these very low voltages.
Now, just as a signing check, I'm going to go ahead, on the arbitrary waveform generator, and continue to have one channel at five volts and on the other channel, I'll go to... Oh, I'm sorry. One channel's at four volts and the other channel is now at five volts. And you can see that this difference signal is starting to make a whole lot more sense. Indeed, it passes common sense just to... At least the Math function is doing exactly what it should. Could this be a problem with this particular scope? No, not really. Any scope with 8-bit resolution is gonna have the same kind of problem. You can get scopes with greater resolution, for example, PicoScope makes some really nice USB connected scopes with much more vertical resolution. But at some point, you're gonna still see some sort of quantization error trying to do this. And this is where the EE-701 really shines. Basically, when it comes down to is that you need to know what your tools are doing.
Thanks for watching, and be sure to head over to ganssle.com for over a thousand more articles about building embedded systems.