In his February column, Robert talked about oscilloscope probes—or more specifically, voltage measurement probes. He explained how selecting the correct probe for a given measurement and using it properly are as important as having a good scope. Here, Robert continues the discussion with another common measurement task: accurately measuring current using an oscilloscope.
Welcome back to The Darker Side. As usual, let’s start with an example. When preparing this article, I wandered around my lab and looked for some electronic stuff that could be used to illustrate what I wanted to show you. The first thing I grabbed was a nice development board from MikroElektronika, the EasyPIC V7 (Figure 1). For the purpose of this article, you just have to know that it’s based on an 8-bit microcontroller, namely a PIC18F45K22 from Microchip Technology. The board has a zillion push-buttons, dip-switches, LEDs, 7-segment displays, LCD connectors, extension headers and so forth. It comes with demo firmware, which blinks some LEDs and increments a counter on the four 7-segment LED displays. It’s powered by an external DC source ranging from 9 V to 23 V. An on-board DC-DC converter provides a stable +5 V to all circuits.
Ok. Now assume you want to measure the current consumption of this board on the +5 V power rail. You could start by simply using a multimeter. Fortunately, a jumper (J6) is present between the output of the DC-DC converter and the +5 V net. I removed this jumper and connected my Keysight U1253B multimeter between its two pins, configured in ammeter mode. The current flowed through the meter and allowed me to get a measurement. As illustrated in Figure 1, the meter reading was around 118 mA.
Job done? Not exactly. When I did this test, the meter reading was fluctuating a lot. Why? Simply because the current consumption of the board was not constant. In this example, the main cause is probably the 7-segment LED displays. The segments are constantly switched on and off by the firmware when counting, so the current is not stable over time. A similar situation appears in a lot of projects. For example, a wireless device would draw a different current when transmitting or receiving. If you can measure not only an average value but also an actual plot of the current over time, you have a far better understanding of the design—currents for each mode, transmit and receive durations and so on.
Measuring current over time requires more than a basic multimeter, and the oscilloscope will be your friend. An oscilloscope measures voltages, not currents—so a kind of current-to-voltage converter will be needed. What are the possible solutions? The most straightforward is to remember Ohm’s law: a current (I) flowing through a resistor (R) will generate a voltage (V) across the terminals of the resistor, simply calculated as V = R × I. So, a simple shunt resistor can transform a current into a voltage, and this voltage can then be measured by an oscilloscope.
Going back to my example, a resistor could be inserted in place of the ammeter, meaning on the +5 V rail. One end of the resistor will then be at a voltage of +5 V, and the other will be at a slightly lower voltage according to Ohm’s law, specifically at 5 V – (R × I). The difference between these two voltages gives R × I, so the current can be measured, because you know the value of R.
How to select the value of this resistor? It should be as large as possible in order to get a measurable voltage, but not too high, because you don’t want to reduce the circuit operating voltage too much. Here the power voltage is 5 V, and the overall current is about 118 mA. Assuming that a 1% voltage drop caused by the measuring resistor is acceptable, this means that I need a voltage drop of about 5 V × 1% = 50 mV. So, I should use a value of R = V / I = 0.05V / 0.118A = 0.42 Ω. I had 1.5 Ω resistors on hand, so I soldered three of them in parallel to get 0.5 Ω, and connected them on the J6 jumper header.
Now how do you actually measure the voltage drop across this resistor with an oscilloscope? If the current measurement resistor were on the 0 V line, or if the circuit under test were fully floating compared to the oscilloscope, then this would be easy. Just take a standard voltage probe, connect its ground clip to one end of the resistor and its tip to the other side, and you would measure R × I. However, such a setup is impossible if the ground of the scope is connected to the ground of the board under test—either directly or indirectly. Unfortunately, this is often the case, for example, if you need to measure other signals on the board simultaneously with the same oscilloscope.
As illustrated in Figure 2, in such a case the easiest solution is to use two voltage probes and a dual-input oscilloscope. Each probe is connected between the system ground and one end of the current-measuring resistor, and the scope is configured to display the voltage difference between the two input channels. I tested this setup for you, as shown in Figure 3. The resulting plot is reproduced in Figure 4, and is not pretty at all—noise!
What happened? The main cause of this bad result is that I used a digital scope. All digital scopes have fast analog-to-digital converters (ADCs) but with a low resolution. 8-bit is typical, even on high-end scopes such as the Teledyne LeCroy WaveRunner 610Zi that I used for this article. The scope digitizes each channel based on the full scale selected through the “volt-per-division” setting. Here, because the measured voltages were +5 V, the ADC full range was larger than 5 V and in fact close to 10 V, so the ADC resolution for each channel was 10 V / 256 = 40 mV. The scope digitized each channel with a 40 mV resolution, then calculated digitally the difference between the two channels, giving a result still with a 40-mV resolution. These 40-mV quantization stairs are clearly visible in Figure 4. The problem is that measuring small variations of a 50-mV difference voltage with a 40-mV resolution is impossible!
DIFFERENTIAL MEASUREMENT AMPLIFIER
How do you greatly improve the measurement? By calculating the difference between the two measured voltages with an analog difference amplifier before digitization. The difference signal can then be amplified as desired, and even low-pass filtered to remove any high-frequency noise. This is how “A-B” mode used to work on analog scopes, and this exactly the job of a differential measurement amplifier—also called differential probe. These instruments are close cousins to the high-frequency voltage differential probes presented in my previous article, but are dedicated to very low differential voltages with quite low frequency bandwidths.
Of course, you could build a differential measurement amplifier by yourself, using op amps or maybe instrumentation amplifiers. If you do it, don’t forget to publish your work in Circuit Cellar. In my case, because I’m quite lazy, I simply took a Teledyne LeCroy DA1822A differential amplifier from my lab, and connected it between the 0.5 Ω current measurement resistor and the scope input (Figure 5). Such a probe has a gain selectable from 1/1,000 to 1,000, and a low-pass filter selectable from 100 Hz to 3 MHz. Here I set the gain to 10—because it was enough to get an output voltage of 500 mV from the 50 mV across the resistor—and a bandwidth of 3 kHz, which was adequate for the measured waveforms.
Is there any improvement in the measurement when using such an amplifier? You bet there is (Figure 6). On this plot, the vertical scale is 100 mV per division, corresponding to 100 mV / (10 × 0.5 Ω) = 20 mA per division. Now you can clearly see why the current measurement was varying. It was oscillating between 100 mA and 120 mA, with a quite complex rectangular-shaped waveform and a period of about 4.3 ms. I haven’t checked the source code of the demo firmware running on this development board, but I’d bet that the LED multiplexing period is 4.3 ms.
NON-RESISTIVE CURRENT PROBES
Shunt-resistors are the most straight-forward current-to-voltage converters, but they have a drawback: you need to cut the power line and add a serial resistor somewhere. Cutting the line is not always easy, and the resistor will surely change the behavior of the circuit under test. Moreover, the resistor needs to make direct electrical contact with the circuit under test and the scope, and this could be a source of noise or even a safety issue for high-voltage or high-power systems.
Now it’s time to present two other families of current-measurement probes, which don’t need a resistor to be inserted in the circuit under test, and do not even make any contact with the circuit. The first is a so-called “current transformer” (Figure 2). This is basically several wire turns around a magnetic core that surrounds the wire carrying the current to be measured. Such a setup acts as a transformer, and the current could be measured through the test wire. As with any transformer, the measurement sensitivity could be improved by using ferrite cores. This kind of current-measurement probe is often in the form of a current clamp, and doesn’t need to open the circuit under test or to make any direct electrical contact with it. The disadvantage of this type of current transformer probe? It doesn’t allow measurement of DC currents, as transformers only work with AC signals. In contrast, the second type of current probes—those based on the Hall effect—can measure both AC and DC currents.
What is the Hall effect about? See Figure 2 for a high-level explanation. The current circulating in the conductor under test generates a magnetic field (B) around it. A so-called “Hall sensor”—positioned close to the wire and in the same plane—is a simple conducting rectangle. A polarization current source is applied between two of its opposed sides. Due to the presence of the magnetic field (B), a voltage then appears between the two other sides, and is proportional to B. That’s the Hall effect. Hall sensors have some drawbacks, mainly the need for a power source and a limited bandwidth. On the other hand, they’re inexpensive and widely available.
As always, current-transformer probes or Hall-effect probes can be home-built, but it’s also possible to buy one. Some are only passive probes, and others come with a companion amplifier unit. An example of an old but trusty Tektronix P6042 current probe is shown in Figure 7. This model was introduced in 1967, can be found on eBay for reasonable prices and is still a great device. This probe has a bandwidth from DC up to 50 MHz, and current-measurement capabilities from less than 1 mA up to 10 A. Its internal circuits are really interesting to study. That’s because this probe is, in fact, a very smart combination of a Hall-effect sensor (for DC measurement) and current transformer (for high bandwidth), packaged in a clamp-on hand-held probe (Figure 8). Both sensors are connected in series, and are precisely matched for a good wideband response. A good article from Paul Rako details how it works—see the Circuit Cellar article materials webpage for link.
I connected this probe to my scope and tried to use it to measure the current consumption of the EasyPIC development board. The measurement was initially disappointing, with a very noisy result as illustrated in the top curve of Figure 9. What happened? The probe was not faulty, but because this probe has a bandwidth of 50 MHz, it was heavily perturbed by high frequency signals coming from the board. In particular, the DC-DC converter, which is very close to the probe, was probably a culprit.
How to improve the result and obtain a nice current signal? By adding a low-pass filter somewhere. One option would be to insert a passive low-pass filter between the current probe amplifier and scope input. The other option is to have a high-end scope with plenty of nice software features. This is the case with my WaveRunner scope. I opened the “math” menu and asked the scope to calculate a low-pass-filtered version of the input signal—using an IIR filter (infinite impulse response) with a cutoff frequency of 3 kHz. The result is the very nice second plot shown in Figure 9. Digital signal processing can be magical, can’t it?
PCB TRACK CURRENT MEASUREMENT
Current transformer probes need to surround the conductor under test, but Hall-effect ones don’t. They can simply be placed close to a wire or conductor, and will give a measurement of the current flowing through the conductor.
See, for example, Figure 10, where I used another nice current probe—an I-prober 520 positional current probe from Aim-TTi. This hand-held probe comes with a small amplifier, and is designed to observe currents on wires, components leads or even PCB tracks or power planes. Its accuracy and bandwidth are lower than the Tektronix unit, but this one can be quickly moved around a circuit to check current waveforms anywhere. As an illustration, I put the probe tip on the 5 V PCB track of the EasyPIC board (Figure 11). The result, still using a software-based 3 kHz low-pass filter on the scope, is shown in Figure 12. The current waveform was easily measured, without any cut or measurement wire added to the circuit. As shown on the plot, the DC offset of the current waveform is oscillating a little, simply because my hand was not steady during the measurement. A qualitative quick measurement like this can be invaluable.
I hope you found that current measurement can be as easy as voltage measurement, but must be done with the proper tools and methods. A shunt resistor could be used, but must be calculated to limit the voltage drop. If the measurement is not made on the ground side, a differential amplifier is essential to transform the voltage between the two ends of the resistor into a ground-referenced voltage, which is easier to amplify, filter and measure with a scope. A differential amplifier can be home-built or bought from equipment manufacturers. Finally, both current-transformer clamps and Hall-effect sensors allow measurement of currents without any cut or shunt resistor, even directly on a PCB track.
As always, nothing is better than experimenting by yourself. Take any electronics project you’ve worked on—or even any battery-powered commercial stuff—and try to measure its current consumption with a scope. You can start with a shunt resistor somewhere, and then try the different methods presented in this article. You will learn a lot. And if you don’t have a scope, well, buy one! Current measurement doesn’t usually require more than a few megahertz of bandwidth, so even $15 small “scopes” from China available on eBay can be used here. So, you have no excuse! Have fun!
EasyPIC V7 development board
WaveRunner 610Zi oscilloscope
Teledyne LeCroy DA1822A differential amplifier
Tektronix P6042 current probe (obsolete)
I-prober 520 positional current probe
“Teardown: The Tektronix P6042 current probe is a classic” Paul Rako -October 04, 2016, EDN Network https://www.edn.com/design/test-and-measurement/4442795/Teardown–The-Tektronix-P6042-current-probe-is-a-classic
Aim-TTi | www.aimtti.com
Keysight | www.keysight.com
Microchip Technology | www.microchip.com
MikroElektronika | www.mikroe.com
Tektronix | www.tekronix.com
Teledyne Lecroy | www.teledynelecroy.com
PUBLISHED IN CIRCUIT CELLAR MAGAZINE • APRIL 2019 #345 – Get a PDF of the issue
Robert Lacoste lives in France, between Paris and Versailles. He has more than 30 years of experience in RF systems, analog designs and high-speed electronics. Robert has won prizes in more than 15 international design contests. In 2003 he started a consulting company, ALCIOM, to share his passion for innovative mixed-signal designs. Robert is now an R&D consultant, mentor and trainer. Robert’s bimonthly Darker Side column has been published in Circuit Cellar since 2007. You can reach him at firstname.lastname@example.org.