EEVblog Electronics Community Forum
EEVblog => EEVblog Specific => Topic started by: EEVblog on September 14, 2014, 08:44:33 am

In this tutorial Dave demonstrates the seldom used and often little understood mathematical integration function available on your modern digital oscilloscope. And demonstrates a practical example use for it in accurately measuring the total power consumption of a microcontroller that sleeps and then wakes up and does some processing before shutting down again. By getting the total area under the current curve.
EEVblog #662 How & Why to use Integration on an Oscilloscope (http://www.youtube.com/watch?v=Dh0xYu8YvaE#ws)

About the inaccurate measurement of sleep current by the integral function  Putting on my pedantic hat; it might be more accurate to blame that error on offset, rather than noise. I only say that because noise is not a DC thing, some of those samples will be high, some will be low, it all cancels out  that's one of the wonderful things about integration, it pulls the interesting lowfrequency stuff out of the noise. What's left over, and what survives integration, is offset error. It would be interesting to short the input to the uCurrent to see what a true zerocurrent reading looks like, and to see if any real signal survived the quantization process (it wouldn't be too bad to use the zerocurrent integral as an offset null).?
[ Doubleposted to the YouTube comments as well because I reflexively commented on YouTube for some daft reason. EEVBlog forum is where it's at! ]

Nice video, I take back that you are only doing mailbag and teardowns :)
Question, is the Area measurement the same thing?
At least on my Rigol it does seem to match:
Both the integral and the area shows 10.5mVs
(http://www.eevblog.com/forum/blog/eevblog662howwhytouseintegrationonanoscilloscope/?action=dlattach;attach=109178;image)
And in here they both agree on 4.20mVs (well, close enough)
(http://www.eevblog.com/forum/blog/eevblog662howwhytouseintegrationonanoscilloscope/?action=dlattach;attach=109176;image)
Edit: updated the images so that it shows VMax of the Math channel, but it doesn't show the scale in mVs just mV.
Also Dave covered this in the video, I guess I wasn't paying attention at that moment.

Sound is wrong on that video... also video looks yellowish, my guess that is the Sony camera.

Sound is wrong on that video... also video looks yellowish, my guess that is the Sony camera.
Canon HF G30.
I used the mid range boost function in the camera, designed for speech. Was an experiment.
Sounds good to me.
Re. the yellow, that's an oops, forgot to turn back on manual white balance after the trade show. That always happens.

Nevermind about the area measurement, you did cover it, I guess when I watch it I was distracted when you mentioned it :)
Edit: plus it's nice to be able to visualize it instead of just looking at a number.

Sound is wrong on that video... also video looks yellowish, my guess that is the Sony camera.
sounds good to me  no issues.

Dave,
You should be able to configure the CRO probe input to convert the voltage to a current, including using a conversion factor such as 1mV = 100uA, (which is the setting on the uCurrent) so that the display shows Amperes (or mA) and the integral is mA Seconds. which is easier to read/do calcs with.
Cheers
Kym

You can also adjust the units in probe menu from volts to amps and change the sensitivity according to transimpedance of your uCurrent.
But there are some limitations max 10V/A minimum 1mV/A. So it is useless for measurement with uCurrent.

At 9:37, you say the average current is 12.1 uA according to the scope, but you have a 2 second period on your integral  so 12.1 mVs / 2 s works out to 6.05 mV average > 6.05 uA, much closer to reality! But since a little bit of offset error could swamp the reading, I agree with your overall conclusion that the number isn't reliable.

I've always known how integration is useful for me when modifying audio signals but this is the first time I've had a good explanation of what exactly integration is.
I see that if the yellow curve was to never settle back all the way down the purple one would just keep going up.
I can easily visualize why integrating a square wave gives you a triangle and integrating a triangle gives you a sine.

About the inaccurate measurement of sleep current by the integral function  Putting on my pedantic hat; it might be more accurate to blame that error on offset, rather than noise. I only say that because noise is not a DC thing, some of those samples will be high, some will be low, it all cancels out  that's one of the wonderful things about integration, it pulls the interesting lowfrequency stuff out of the noise. What's left over, and what survives integration, is offset error. It would be interesting to short the input to the uCurrent to see what a true zerocurrent reading looks like, and to see if any real signal survived the quantization process (it wouldn't be too bad to use the zerocurrent integral as an offset null).?
[ Doubleposted to the YouTube comments as well because I reflexively commented on YouTube for some daft reason. EEVBlog forum is where it's at! ]
Indeed, noise doesn't matter, it's the offset between the average value and zero that will determine the deviation of the integral. That's also why integrals give nice curves even on noisy data: they're inherently averaging things together.
The opposite is true for differentiation, which amplifies noise. A typical high sample rate noise oscilloscope signal is likely to need a lot of averaging/low pass filtering, or the differentiated signal will be nothing but noise.

I am also going to put on my pedantic hat (implying that I ever take it off) and say that the measurement was incorrect.
You measured the charge of that current pulse to be 700nC over the period of 5ms.
Then you connected the multimeter to measure the sleep current. The numbers were jumping from 4.16µA to about 13µA. You then turned on averaging and ruined your whole measurement. The multimeter was averaging the sleep current as well as the spikes. The actual sleep current was about 4.164.17µA (these were the lowest values the multimeter was settling to).
So, your actual current consumption would be closer to:
(4.16µA*(2s5ms)+700nC)/2s = 4.51µA
On a side note, please watch out for correct terminology. You shouldn't confuse energy and charge.

I can easily visualize why integrating a square wave gives you a triangle and integrating a triangle gives you a sine.
OK, I'm just going to declare today rs20haspedantichatday: Triangle integrates to something vaguely sineish, but not a true sine wave  only a (co)sine wave integrates to give a sine wave. However, it's true that as you keep on integrating over and over again, you get closer and closer to a sine wave as you attenuate those harmonics more and more: square > triangle > vaguely sineish string of parabolas > even more sineish string of cubics > (infinity* steps later) > sine > sine > sine
* Where infinity is defined as anything greater than, oh, I dunno, seven.
Indeed, noise doesn't matter, it's the offset between the average value and zero that will determine the deviation of the integral. That's also why integrals give nice curves even on noisy data: they're inherently averaging things together.
The opposite is true for differentiation, which amplifies noise. A typical high sample rate noise oscilloscope signal is likely to need a lot of averaging/low pass filtering, or the differentiated signal will be nothing but noise.
It does leave me wondering why scopes don't have more versatile lowpass filtering capability. For instance, when I'm using my uCurrent, I want my scope to have a bandwidth limit of 0.4 to 0.5 MHz, because I know anything above that isn't a valid signal from the uCurrent, therefore pure noise. Lowpass filtering also gives you more effective bits. But no, all I have are two options: 20 MHz and 100 MHz. It can be done in software; loosely speaking it's averaging contiguous samples in each captured waveform (instead of averaging feature, which averages separate waveforms)... a dialable software bandwidth limit feature would be higher up my list than many other impressive but more contrived features offered by modern scopes.

What is the nature of the noise near the horizontal line? If it's random ac with zero DC average and if the integrator is signed then it should contribute zero charge to the integration.
Several months ago I faced a similar need, to measure the charge of single cell mobile devices. The current consumption fluctuates a lot over time, nothing clean as periodic like in this video. I ended up building a small OSH integrator based on LTC2943. It does continuous integration by a linear Coulomb counter (50mv burden voltage max scale, you provide the shunt) that triggers a digital charge counter. It was designed to have very low integration offset works great also with long term integrations (hours and days). The integrator has a 1.3" OLED display and shows metrics such as average current (charge/time), number of software awakes (current is above a certain threshold), and a real time graph and also allows to log the data on a computer. So far I build 30 of them (3~5 at a time) giving to colleagues that ask.
(https://github.com/zapta/powermonitors/raw/master/pmon_3v8/www/pmon_3v8_with_phone.jpg)
One commercial charge integrator I am aware of is Monsoon Power Monitor https://www.msoon.com/LabEquipment/PowerMonitor/ (https://www.msoon.com/LabEquipment/PowerMonitor/) it is fully controlled via a USB port and contains both a programable power supply and current integrator.

I've seen the famous quantization noise SNR equation for an ideal ADC. The equation assumes that the probability of the error in an ADC sample is equally distributed between +/ 1/2 LSB. I know that SAR ADCs the distribution for the quantization noise will be from 0 to 1 LSB because the logic in a SAR ADC will always produce a result that is less than what the analog input actually is. This would produce quantiztion noise with a constant offset of 1/2 LSB.
Does anyone know if the quantization noise distribution veers from the ideal for other types of ADCs?
Also, what kind of ADCs are typically found in oscilloscopes?

I've seen the famous quantization noise SNR equation for an ideal ADC. The equation assumes that the probability of the error in an ADC sample is equally distributed between +/ 1/2 LSB. I know that SAR ADCs the distribution for the quantization noise will be from 0 to 1 LSB because the logic in a SAR ADC will always produce a result that is less than what the analog input actually is. This would produce quantiztion noise with a constant offset of 1/2 LSB.
Does anyone know if the quantization noise distribution veers from the ideal for other types of ADCs?
Also, what kind of ADCs are typically found in oscilloscopes?
A constant offset of 1/2 LSB with respect to what? None of this is relevant if the scope has a calibration procedure.

OK, I'm just going to declare today rs20haspedantichatday: Triangle integrates to something vaguely sineish, but not a true sine wave  only a (co)sine wave integrates to give a sine wave. However, it's true that as you keep on integrating over and over again, you get closer and closer to a sine wave as you attenuate those harmonics more and more: square > triangle > vaguely sineish string of parabolas > even more sineish string of cubics > (infinity* steps later) > sine > sine > sine
* Where infinity is defined as anything greater than, oh, I dunno, seven.
This resonates with the Fourier transform, and with the Taylor series expansion of sin(x). (Screw pedantism, he's bringing out the calculus? Head for the hills!!)
The expansion is all even (cos) or odd (sin) powers of x from 1 or 2 to n, each with a leading coefficient of 1/n!. This is a true representation of the function, but only as long as n > infty. There's no reason it has to work for small n, though as it turns out, sin/cos are suitable functions which approximate reasonably well. So, the more powers you have, the more accurate the approximation.
Now, one nice thing about a Taylor series is, it's trivial to integrate  it's just a polynomial, so you increment each exponent by one, and divide the constant. The power goes up, and the approximation gets better (assuming you bring in new constant terms every time you hit +/ cos) because the series 'grows'.
The Fourier transform of a square wave (and its subsequent integrals) follows a similar pattern: the harmonics goes as 1/n^(p+1), where p is the number of integrations. A square wave has harmonics that go as 1/n, so the 3rd has an amplitude of 1/3, and so on. Triangle goes as 1/n^2, so the harmonics drop off more quickly. Each time you integrate, it goes lower and lower, until after infinite passes, the harmonics completely disappear.
When it comes to circuits, if you're talking single frequency (not the variable output from a function generator), the harmonics can be attenuated with a filter. An integrator is simply a 20dB/decade everywhere, so it's as good as a lowpass filter if the unity gain frequency is appropriately selected. Practically speaking, the lowest harmonics are the hardest to treat, and you can get better performance with a filter that incorporates zeroes (like an elliptical) at strategic frequencies.
Indeed, noise doesn't matter, it's the offset between the average value and zero that will determine the deviation of the integral. That's also why integrals give nice curves even on noisy data: they're inherently averaging things together.
Arguably not: low frequency noise tends to go as 1/f, which looks like Brownian noise in the integral, and depending on your point of view and scale, manifests as low frequency rumble, uncertain offset, etc.
There's also the matter of quantization: on average, it's just noise  but for a given situation, it may not be incoherent. That is, if your 8 bit ADC is always reading the same numbers for each point on the waveform, averaging won't get you anything, because the noise is correlated with, and now inseparable from, the signal. It actually pays to have a slightly noisy measurement (12 LSBs, say) when you're doing averaging (or oversampling). BTW, note that averaging is the same as equivalent time sampling (with averaging), because it doesn't matter whether the acquisition was obtained in real time (bursts of a screen at a time) or hereandthere (delayed or random trigger per point).
Tim

I can easily visualize why integrating a square wave gives you a triangle and integrating a triangle gives you a sine.
OK, I'm just going to declare today rs20haspedantichatday: Triangle integrates to something vaguely sineish, but not a true sine wave  only a (co)sine wave integrates to give a sine wave. However, it's true that as you keep on integrating over and over again, you get closer and closer to a sine wave as you attenuate those harmonics more and more: square > triangle > vaguely sineish string of parabolas > even more sineish string of cubics > (infinity* steps later) > sine > sine > sine
* Where infinity is defined as anything greater than, oh, I dunno, seven.
Since I'm using the 1KHz 3V test signal I did try to make a triangle wave with Intg(CH1)Intg(3CH1) that gives me a triangle wave.
(http://www.eevblog.com/forum/blog/eevblog662howwhytouseintegrationonanoscilloscope/?action=dlattach;attach=109204;image)
But if I integrate that I do not get a sine wave.
Further I did try Intg(Intg(Intg(CH1)Intg(3CH1))) and I get 2 quadrants of a sine wave on 16 square wave cycles then it does a parabola down to minus infinity.
Edit: here is what it shows:
(http://www.eevblog.com/forum/blog/eevblog662howwhytouseintegrationonanoscilloscope/?action=dlattach;attach=109206;image)
I'm just wondering what should I input in the math function to actually get a sine wave from a square wave (not using the sine cosine and tangent operators of course).
Edit: If I differentiate the result with Diff(Intg(CH1)Intg(3CH1)) I do get the square wave back as expected.

Sorry but I don't get it. What is the advantage of using a scope to measure the avarage current consumption? Would it not be much easier and more accurate to simply add a low pass filter after the uCurrent and measure the avaraged voltage with a DMM?

I used the mid range boost function in the camera, designed for speech. Was an experiment.
Sounds good to me.
There was a kind of "bump" in the sound quality in the middle of the video.

Sorry but I don't get it. What is the advantage of using a scope to measure the avarage current consumption? Would it not be much easier and more accurate to simply add a low pass filter after the uCurrent and measure the avaraged voltage with a DMM?
You would need a really low frequency filter, therefore huge inductance, resistance and capacitance. Capacitor leakage would kill the accuracy.
It might not be a bad idea to use a low pass filter in combination with a fast multimeter. The filter would stretch the pulse enough for a meter like 34401A to sample it at 1000/s or so. Slap the acquired data into Matlab and presto.

Sorry but I don't get it. What is the advantage of using a scope to measure the avarage current consumption? Would it not be much easier and more accurate to simply add a low pass filter after the uCurrent and measure the avaraged voltage with a DMM?
You would need a really low frequency filter, therefore huge inductance, resistance and capacitance. Capacitor leakage would kill the accuracy.
It might not be a bad idea to use a low pass filter in combination with a fast multimeter. The filter would stretch the pulse enough for a meter like 34401A to sample it at 1000/s or so. Slap the acquired data into Matlab and presto.
If you're only looking for DC, any standard integrating DMM will do (i.e., not the $3 cheapshit yellow box kind).
Even if your meter responds poorly to AC (sampleandhold type), a moderate R and sufficiently large C (larger than might be used for line frequency filtering, but no need for sheer farads) will get the cutoff frequency down in the Hz where absolutely any measurement device will do the job.
If you want to know the peaks and pulse widths, you have little choice but to graph or sample it. Measuring the peaks quantitatively is best done with an integral as shown here  the widths, heights and shapes may be deformed, but the integral over that range must be consistent. This is used in many physical analyses, such as MS, NMR, XRD, nuclear spectroscopy and so on.
Tim

Strictly speaking, it doesn't make sense to say 'total power consumption'. It should be 'total energy consumption'. Proper energy units would be uWs. Similarly, when you write 'total current' you probably mean 'integrated current'.

I can easily visualize why integrating a square wave gives you a triangle and integrating a triangle gives you a sine.
OK, I'm just going to declare today rs20haspedantichatday: Triangle integrates to something vaguely sineish, but not a true sine wave  only a (co)sine wave integrates to give a sine wave. However, it's true that as you keep on integrating over and over again, you get closer and closer to a sine wave as you attenuate those harmonics more and more: square > triangle > vaguely sineish string of parabolas > even more sineish string of cubics > (infinity* steps later) > sine > sine > sine
* Where infinity is defined as anything greater than, oh, I dunno, seven.
That would be a funny looking hat :)
I guess you're right but I really don't know anything about this stuff anyway. It's just that this video finally helped me understand what is happening when I build an integrator with an opamp to modify different waveforms.
When making analog synthesizers, nothing's ever perfect and I guess that's why the analog synth geeks love them so much.
I did a little experiment in Excel so I could graph what I was imagining and it works.
I broke up a triangle into little squares under the curve then added them all up and drew a graph.

I am using the Integral function very often to measure discharge energy
Voltage input to Channel 1 [Voltage in kV]
Current input to Channel 2 [Current in mA]
Math function one: CH1 * CH2 [Power Watt]
Math function two: INT (Power) [Energy in mJ]
Once you set the probe correctly, the Energy is shown correctly
in mJ on the oscilloscope measurement output.
This works well on the modern Agilent scope, but the old
FLUKE / Philips scope PM3394B did this already in real time
in the 1990's
Great Video, Thanks

I did a little experiment in Excel so I could graph what I was imagining and it works.
I broke up a triangle into little squares under the curve then added them all up and drew a graph.
That is what is shows per cycle if I do a single integral, but the next cycle goes on top of the other one.
What it's needed is an offset in the triangle wave so that it shows that at a 90 degree phase for half a cycle and then for the other half cycle starting at 270 degrees it produces the inverse.
But when I scaled the single integral of the triangle wave without offset it showed a secondary wave that surely will affect the process above, not sure why that happens yet.

I did a little experiment in Excel so I could graph what I was imagining and it works.
I broke up a triangle into little squares under the curve then added them all up and drew a graph.
That is what is shows per cycle if I do a single integral, but the next cycle goes on top of the other one.
What it's needed is an offset in the triangle wave so that it shows that at a 90 degree phase for half a cycle and then for the other half cycle starting at 270 degrees it produces the inverse.
But when I scaled the single integral of the triangle wave without offset it showed a secondary wave that surely will affect the process above, not sure why that happens yet.
I wish I knew more about he match behind it. I just did another of my crude Adobe Illustrator and Excel experiments with a full cycle and this is what came out of it.

Didn't expect the level of math nitpickiness on my latest video, that was rather foolish of me :palm:

Thanks Dave for the (as usual) clear explanation. :+ Some time ago a found on the Jeelabs blog an interesting post where the power consumption of a board was analysed by type of operation. Great to see correlation between the code/logic executed, specific hardware operated and the power consumption.
http://jeelabs.org/2011/12/30/anatomyofaroomnodetransmission/ (http://jeelabs.org/2011/12/30/anatomyofaroomnodetransmission/)
(http://jeelabs.org/wpcontent/uploads/2011/12/annotatedroompacket1.png)

Didn't expect the level of math nitpickiness on my latest video, that was rather foolish of me :palm:
I guess, when you use the word "Integration" as a math term in your video description,
all the mathematicians are coming out for offering suggestions and corrections.

I use Math functions as well, they are very useful too for quick easy measurements. They also help build reports as well. Either Baffle with Bullshit or hope someone else knows what is being displayed.
I'd sometimes put bullshit units into reports to see if anyone notices, like Furlongs per Fortnight ;D
https://en.wikipedia.org/wiki/FFF_system
No one ever did! :DD

Didn't expect the level of math nitpickiness on my latest video, that was rather foolish of me :palm:
At least it was civilized math nitpickiness.
I don't really understand the math but at least this video finally made me understand what integration is.

I don't really understand the math but at least this video finally made me understand what integration is.
Well, there was hardly any math in this really, it was meant to be a video showing the concept of integration on a scope and a basic usage case for it. If that helped you, then successful video! :+

One of the first things I did with my scope is measure the milliJoules energy output of a number of different car ignition coils. The integration function is a perfect fit for this. Just clamp the high voltage side of the coil to 1700V max with a string of zeners (typical arcing voltage) and integrate volts x current. One really interesting result was after measuring the output of some boxes from a REALLY big name CDI manufacturer. They claim with regard to one particular box "100mJ spark energy" but that is only what their box pumps into the coil primary. Actual coil secondary output with one of their CDIspecific coils was only 38mJ, and with a more conventional coil it was as low as 25mJ. See pics for good conventional ignition output vs CDI under same test conditions.

I don't really understand the math but at least this video finally made me understand what integration is.
Well, there was hardly any math in this really, it was meant to be a video showing the concept of integration on a scope and a basic usage case for it. If that helped you, then successful video! :+
By "the math" I mean the stuff other people have posted in the forums, your video actually showed it visually so that's how it helped. :+

Why is the integral wave less than (below) the wave of the input? If the integral and the pulse begin together, it would seem to me that the integral function would initially follow the pulse curve, then level out as the pulse ended, but it should always be greater than the input and continually rising since it is, after all, the integral of the input (assuming the input is always positive).
Was the integral's scale much, much greater? I can only guess that the scales were different or the integral function actually began before the impulse. Or I'm misunderstanding something...
Very interesting video, BTW. The colors and sound were fine on my computer.

The vertical scale of the integral is representing area under the curve. Even though the current pulse height is very high it is also very narrow yielding a small area.

Does anyone know if the quantization noise distribution veers from the ideal for other types of ADCs?
Also, what kind of ADCs are typically found in oscilloscopes?
They used to use predominantly flash converters but now they use folding interpolating or pipeline converters and of course interleaving is common which will alter the characteristics and *that* may change depending on the number of active channels.
If you can fiddle with the interleaving, then the change in the distribution of the noise may be revealing.

Why is the integral wave less than (below) the wave of the input? If the integral and the pulse begin together, it would seem to me that the integral function would initially follow the pulse curve, then level out as the pulse ended, but it should always be greater than the input and continually rising since it is, after all, the integral of the input (assuming the input is always positive).
Integration is always "PLUS A CONSTANT", which for a proper integral (one which spans a defined width, such as what's shown on screen) is technically zero at the start. It seems this scope adds an additional offset so it remains balanced visually; which is kind of handy, as most integrals veer off to infinity and starting at midscreen means you only get to see half of anything.
As long as the horizontal axis is indicated, it's a visual effect only, the math is still correct. (And anyway, measuring a difference with cursors subtracts the "PLUS A CONSTANT" so even if the offset were wrong, it disappears again in that measurement.)
Was the integral's scale much, much greater? I can only guess that the scales were different or the integral function actually began before the impulse. Or I'm misunderstanding something...
The scale is necessarily different, because the units are different. They're always adjustable, which is definitely handy!
Tim

Oh, another wonderful use of integration:
Current sense probes.
If you do the old "scope probe grounded to clip" trick and wave that over a circuit, you're bound to see impulses and ringing. The ground loop isn't very particular at that size, so what you can do is, wind a small coil (maybe 1020 turns of fine wire) and fit it in the end of a 6mm brass tube, which has been slotted up one side. Add a 50 ohm series termination resistor, and run coax up to the scope (with source termination, it's not necessary to terminate the scope end). Now, the brass tube shields stray E and B fields from your probe, except the ones that are axial with the tip. Wrap it with tape, and you can wave it around your circuit and sniff the currents flowing through components, traces, even individual vias!
But you're not actually measuring current. You're measuring EMF. Which is the derivative of current. So, you can integrate it, and now instead of impulses, you have steps  corresponding exactly to the current steps in your circuit! Of course, it's not calibrated, but knowing the general proportions and how the signal varies with distance, you can get a feel for how much current is flowing in a circuit, and where.
Tim

If you do the old "scope probe grounded to clip" trick and wave that over a circuit, you're bound to see impulses and ringing. The ground loop isn't very particular at that size, so what you can do is, wind a small coil (maybe 1020 turns of fine wire) and fit it in the end of a 6mm brass tube, which has been slotted up one side. Add a 50 ohm series termination resistor, and run coax up to the scope (with source termination, it's not necessary to terminate the scope end). Now, the brass tube shields stray E and B fields from your probe, except the ones that are axial with the tip. Wrap it with tape, and you can wave it around your circuit and sniff the currents flowing through components, traces, even individual vias!
Awesome idea! When you say slotted up one side, do you mean a cut all the way down one side so that the tube has a "C" cross section? Is the idea to prevent the tube from acting as its own shortedout coil and producing its own cancelling EMF? How long would you normally make the tube?

Slotted lengthwise near the end, yes. It doesn't have to be full length. The closer the end of the slot is to the coil, the more it shields the coil in that direction, which makes it less sensitive, more directive, and pushes the pattern off center (imagine the tube were mitered, instead of slit, to the same depth).
More info: http://www.bcarsten.com/?page=appnote (http://www.bcarsten.com/?page=appnote)
Tim

Here's a nice closeup of the tiny coil in the tip of the EMI sniffer probe referred to by T3sl4co1l. This image was extracted from page 55 of AN70 by Linear Technology (Jim Williams). This closeup detail came in handy when I made my EMI sniffer probe a few years ago.
AN70... http://www.linear.com/docs/4159 (http://www.linear.com/docs/4159)

Another great app note by Jim Williams  thanks!
Here's another clever use of integration on a scope, this time to measure output load capacitance:
http://www.edn.com/design/testandmeasurement/4370468/Oscilloscopemathfunctionsaidcircuitanalysis (http://www.edn.com/design/testandmeasurement/4370468/Oscilloscopemathfunctionsaidcircuitanalysis)
This was done on a Tek DPO3034 which has generalized, softwaredriven math functions (like many Tek scopes). This particular example can't be done on the Agilent MSOX because it needs a second computation after the integration, which isn't a supported combination on the MegaZoom ASIC.
It seems this scope adds an additional offset so it remains balanced visually; which is kind of handy, as most integrals veer off to infinity and starting at midscreen means you only get to see half of anything.
(Referring to the Agilent MSOX...) It does. There's an adjustable constant that pops up on the Math menu when integration is selected. Dave didn't show that or maybe he didn't have to do anything since the input offset was already close enough to zero.

Calculating Power Value in the selected time range.
http://blog.hameg.com/?p=1799#more1799 (http://blog.hameg.com/?p=1799#more1799)

Pity my Agilent DSOX 2024A doesn't have integration. At least I can't find it in the Math functions.

Pity my Agilent DSOX 2024A doesn't have integration. At least I can't find it in the Math functions.
That's surprising, but I've had a quick look through the manual for the series and I concur that it doesn't seem to be there. However, the average of a waveform is just its integral divided by its width on the screen. So if you position your signal of interest to be the only thing on the screen, then measure the fullscreenwidth average (page 176 of the manual (http://cp.literature.agilent.com/litweb/pdf/7501597012.pdf)) and multiply it by the width of the screen, you'll get exactly the same result.

Thanks for that info. I was surprised about the missing feature. It's all done in software so would be fairly cheap to implement.

I'm happy to see another video from you Dave. As I'm working on a measurement project for automotive use, I've needed to quantify some signals coming out of the cars electronics, specifically some old diesel fuel injection ones. In the some of the first commercial direct inject diesel applications, primitive monitoring of fuel injection is required for to maintain engine speed and operation. This was done on one fuel injector and the signal lets the engine control unit know what's going on (clicky if you want to ready more (http://"http://www.myturbodiesel.com/wiki/tdinozzleupgradefuelinjectorfaq/")). Well, no one outside of the manufacturers ever really hooked up an oscilloscope to see what this signal looked like, so I decided to.
(http://mobrienphotography.com/MiscPics/TDIPics/Lighting%20%26%20Electrical/Scope/900%20RPM%20Idle%20%20Duration.png)
The cursors are setup at the beginning and end of injection and the voltage is a function of the movement of the needle. In order to figure out its physical location, an integral needs to be taken. I exported the onscreen data plot into a spreadsheet, I ran the integral manually to compensate for the DC offset also so I wouldn't just idle my car forever in a day.
(http://mobrienphotography.com/MiscPics/TDIPics/Lighting%20%26%20Electrical/Scope/FuelInjection.png)
I don't have applicable units, but knowing other parameters of the injector such as fuel pressure, opening pressures, closing pressures, nozzle orifice size, a pretty accurate estimate as to the amount of fuel injected is able to be calculated from this reading. The fuel is also used as a lubricant so there is more fuel that flow through the injector than what is actually injected as well.

clicky if you want to ready more
Link fixed > http://www.myturbodiesel.com/wiki/tdinozzleupgradefuelinjectorfaq/ (http://www.myturbodiesel.com/wiki/tdinozzleupgradefuelinjectorfaq/)

Hi Dave and all you others round here!
At first i must say a really gigantic thank you to Dave.
THIS BLOG AND YOUR VIDEOS ARE ABSOLUTELY AWSEOME! :+
I just picked up this Video because i exactly want to do what was mentioned : measuring my µc power consumption.
I downloaded about 20 gig of your Videos to my Brain during the last week .... :o
(still a bit fuzzy from it) ;D
Inspired by the Scope videos i decided to get a new scope (Rigol MSO1074ZS) for my lab. (should arrive this week 8) )
Unfortunately measuring the low currents of sleeping microcontrollers is almost impossible if you don't own one of Dave's brilliant µCurrent Devices.
And that's where i suffer now.
I can't order at the eevBlog Store cause i'm located in Germany, where Dave won't ship to.
Other source (Adafruit) is sold out.
Can anyone help me getting one of these? Maybe there are additional sources that ship to germany?
I want to support Dave for his great work, so i surely want the original thing!
(not one of the rebuilds, where i don't know how reliable the are also)
cheers Chris