Measuring LED ripple current with a scope

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Hey all,
I'm trying to analyze the waveform of my home-made buck converter. A multimeter is great for giving an average, but doesn't tell the whole story for switching regulators.

I have a Rigol 1054Z 4-channel scope and I've tried a few methods. I started by trying to simply measure the output ripple of my linear DC power supply, and it turns out there are several ways to do this, so I'm wondering what the best way is for the LED driver.

Just to give you an idea of where I'm at now - the last thing I tried was using two channels on either side of a 0.01ohm shunt in series with the LEDs and do a differential on the scope. I also tried one lead on the LED+ and the ground lead on the LED- to just measure voltage, since that should have a similar shape. Both of these were done with AC coupling since I want to see the high frequency part of the waveform. All I ended up seeing was a lot of 'noise'. I was expecting to see sort of a sawtooth pattern, like this:
QLGxGF9.jpg



Any ideas, hints, tips? Thanks in advance.
 

HKJ

Flashaholic
Joined
Mar 26, 2008
Messages
9,715
Location
Copenhagen, Denmark
You are aware that all gnds to the scope is connected together and also connected to the mains gnd connection. This means all gnd connections must be to the same potential and you better check if your power supply is isolated from earth gnd.
I do often use current clamps when needing multiple channel measurement and some of them has to be current. Pico TA189 is good for this, but do not have enough bandwidth for all types of switcher.

If you are only looking for lower frequencies, you can also use a low pass filter on the scope (I do not know if the Rigol supports this).
 

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Yes, I'm aware of that. From what I can tell, there is some noise on my AC line, so it would be nice to filter that out. The scope does offer a filtering function down to 500kHz.

The problem is I'm still not seeing my waveform like I expected, even amidst noise. I will take some screenshots and pictures to illustrate my setup.
 

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Thanks for the reply SemiMan. To clarify - I am using a 10uF input cap and currently have no output cap. With my selected components, this correlates to greater than a ~400mA ripple peak-to-peak on the LEDs according to the calculations. The switching frequency at nominal input voltage is ~230kHz calculated. My DC supply is an enormous 0-32V supply with advertised 0.1% ripple.

I'm a little confused by the setup you suggest. One probe on the output, and one probe on the FET, both grounded to the same point? Should I be using a 10X or 1X probe? My understanding is that a 10X is attentuated, so for small signals a 1X might be the better choice.

I appreciate the input.
 

HKJ

Flashaholic
Joined
Mar 26, 2008
Messages
9,715
Location
Copenhagen, Denmark
Try connecting the probe ground lead to the probe tip and see how much radiated noise you are picking up.
To get as little noise as possible you twist the probe ground lead a few turns around the probe and only uses one probe. If you can measure the current this way you have a starting point and can experiment with using the other probe.
 

magellan

Honorary Aussie
Joined
Feb 3, 2014
Messages
5,003
Location
USA
Interesting discussion.

Scopes are still fun, not to mention very useful. I always liked working with them.
 

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Try connecting the probe ground lead to the probe tip and see how much radiated noise you are picking up.
To get as little noise as possible you twist the probe ground lead a few turns around the probe and only uses one probe. If you can measure the current this way you have a starting point and can experiment with using the other probe.

I will give this a shot. I watched a really long video about measuring DC power supply ripple and learned that, well, it's not so straightforward as I thought.

Interesting discussion.

Scopes are still fun, not to mention very useful. I always liked working with them.

Indeed. I purchased it specifically for this project, but I will no doubt find a use for it as time goes on :)

It sounds like you are trying to do a capacitor-less peak or average current control buck circuit?

400mA is still only 4mV pk-pk voltage. If that 1mV is with a 1x probe and you are using a 10x probe, the best you do is 10mV per division, so this is only 4/10 of a division.

1x probe will give you more sensitivity.

Is your buck regulator a fixed ground, or fixed +. Either way, put measure current from the fixed lead. I am suggesting that you trigger on the FET, but both probes need to have the same ground, so pick wisely, and make sure you place the sense resistor such that one lead is ground so that you don't need to do a two probe differential.

This is the buck regulator I am using: http://www.ti.com/lit/ds/symlink/lm3409-q1.pdf It uses a controlled off-time PFET and peak current detection to control average LED current, which is equal to current through the inductor. There is an article I read about whether an output capacitor is necessary, since LEDs aren't affected by output ripple and the frequencies are high enough to not be noticeable by the human eye. However, the current that ripples beyond the rated current of the LED can be dangerous because despite the average current being within spec, the nonlinear thermal effects can cause more heat and reliability issues (for example, an LED rated for 3 amps, with an average current of 3 amps but a ripple from 2A to 4A... as an extreme case). Since I designed the circuit to be about 90% of the rated current, I wanted to be sure the ripple is within spec. Also, by using a cap, I can reduce the size of the inductor. I designed my circuit with an output cap included and a peak ripple that would not exceed the rated current.

SO.... with all that in mind, my goal here is to learn how the circuit adapts to changing input voltage, load, temperature, inductor rating, output capacitance, etc. and learn the theory behind it.

You have a good point with the voltage measurement. Maybe buying a 0.01 shunt wasn't the best idea. I didn't want its resistance to affect my circuit but now it looks like I can't even measure it. A 0.1 ohm 2W or 3W shunt would probably be better for measurement's sake.

The regulator is fixed ground... I think? What does that mean?

In 'playing' with it earlier, I managed to successfully capture the FET gate and it is a nice square wave with a duty cycle and frequency that changes with changing input voltage, as I expected. At my nominal voltage it's also within 2% of my calculated switching frequency, which is nice. So now, you suggest placing the shunt at the tail end of the LED string with the probe on the + side and the ground on... ground, and see what kind of things I can see. Smart! I'm going to give it a shot and will post some screenshots once I figure out how to do that.

Really appreciate the suggestions :)
 
Last edited:

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
You might have to buy an evaluation board. They are kind of pricey at $75.00..........sometimes just the price of education. That way you could compare scope signals between the two different boards.
http://www.ti.com/lit/ug/snva391d/snva391d.pdf
Whenever an evaluation board is available, I always look those over in addition to the data sheet.

It's a struggle with switchers, when looking at scope shots because of all the radiated noise. Even using the scope at different ground points on the board will make a difference. That is why if you got the evaluation board then you could compare to see if its a design / layout issue or a scope connection issue. If the FET gate has any kind of back and forth wiggle that will introduce noise. Is the wave form square without excessive ringing, etc? If doing any type of measurements where the V- ref of the scope isn't at ground, then I put a cheater plug at the 120vac that takes earth ground off of my scope. This might be worth a try anyhow to see if it makes a difference especially if you are powering your board with a power supply that has the same ground as your scope, then I suppose there could be the possibility of a ground loop when the scope ground is connected to your board.

I don't see a problem using a small series resistor with the LEDs to measure the current. If the resistor is on the anode side of the LEDs, you're going to want to have that cheater plug on the 120Vac (unless you're using a battery to power the circuit). If the resistor is on the cathode side of the LED's, then you should be fine to measure voltage across the resistor and leave your scope connected to 120vac without the cheater plug.

I think we talked about using a capacitor on the output. Did you end up using one?

Just some suggestions
 
Last edited:

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
You might have to buy an evaluation board. They are kind of pricey at $75.00..........sometimes just the price of education. That way you could compare scope signals between the two different boards.
http://www.ti.com/lit/ug/snva391d/snva391d.pdf
Whenever an evaluation board is available, I always look those over in addition to the data sheet.

It's a struggle with switchers, when looking at scope shots because of all the radiated noise. Even using the scope at different ground points on the board will make a difference. That is why if you got the evaluation board then you could compare to see if its a design / layout issue or a scope connection issue. If the FET gate has any kind of back and forth wiggle that will introduce noise. Is the wave form square without excessive ringing, etc? If doing any type of measurements where the V- ref of the scope isn't at ground, then I put a cheater plug at the 120vac that takes earth ground off of my scope. This might be worth a try anyhow to see if it makes a difference especially if you are powering your board with a power supply that has the same ground as your scope, then I suppose there could be the possibility of a ground loop when the scope ground is connected to your board.

I don't see a problem using a small series resistor with the LEDs to measure the current. If the resistor is on the anode side of the LEDs, you're going to want to have that cheater plug on the 120Vac (unless you're using a battery to power the circuit). If the resistor is on the cathode side of the LED's, then you should be fine to measure voltage across the resistor and leave your scope connected to 120vac without the cheater plug.

I think we talked about using a capacitor on the output. Did you end up using one?

Just some suggestions

Right now, I am testing without a capacitor on the output. Then, I will add a cap and see what changes occur.

This is the square wave I see on my FET gate:
bG3uTLJ.png


I'm not sure what the odd "ghost" I see is on the rising edges of the adjacent pulses. No adjustment to the trigger would change this. This is with one 1X probe, AC coupled, with the ground lead connected to DC ground. Any idea? Also, if I removed the ground lead, I saw this waveform: http://i.imgur.com/jZOinOF.png. The good news is that it is behaving how I designed it as far as frequency and average current goes.

I attempted to measure ripple on the output, and got a little confused. I did this on the anode (before I saw your post) and attempted to do a CH1-CH2 math function.
Uw5J3xL.png


It just doesn't really add up to me. Also, it was difficult to trigger these as they appeared to be riding on a larger 60Hz wave: http://i.imgur.com/RJ7urTg.png

Maybe one day this will all make sense :) In the mean time, I still scratch my head and pray to the internet community to help my noob questions.

Oh! Regarding the evaluation board, it's not a bad idea. I like to think that I designed the board well. I followed all the datasheet instructions to a T. I'm not sure what to look for when "ringing" is suggested, but I don't hear any audible noise from the circuit. Here she is: http://i.imgur.com/cOc4kCj.jpg

Thanks all for the wonderful input.
 

HKJ

Flashaholic
Joined
Mar 26, 2008
Messages
9,715
Location
Copenhagen, Denmark
Think there's any way to stabilize it, or at least stabilize the capture?

There is no way to stabilize the capture, because it shows the curves mostly as they are. Using intensity grading may help a bit (The brightness will depend on how often the event occur).
The reason for the variation is probably noise and "soft" connections.
 

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
Kuksul08, you've got a little jitter on the gate drive (what I called back and forth movement). I wouldn't worry about fixing it. If this is a one time project, then I think you can live with it. If this is a product for manufacture, then you'd want to improve on it with further board layouts.........and that may be when you consider buying the evaluation board to compare with what the manufacturer considers acceptable.

Like they say in real estate........location, location, location. With switching power supplies its layout, layout, layout. Most likely its a function of the layout in some way. Sometimes these are black magic designs. Any chance of posting the top and bottom layer of your layout (without parts so as to see the copper traces)? All you can do is follow the recommendations of TI and hope for the best. I've seen some parts more sensitive to noise than others. I once did 3 different buck designs because I wanted to see which controller I liked (or worked) the best. It's interesting the differences you get even though you follow the guidelines. Interesting, the one that I had the most problem with was the one that used a small current sense resistor like this design has.

The ripple on the output looks OK because this isn't a type of power supply used to power sensitive equipment but is more designed for LEDs that don't care about that ripple. Besides, the LM3409 is stated to work without a capacitor on the output. And this part is designed to work without requiring any control loop compensation.

Another thing you can do is post these same questions on the TI forum and see what response you get. At any rate look over the various responses for the LM3409
https://e2e.ti.com/search?q=lm3409
 
Last edited:

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Kuksul08, you've got a little jitter on the gate drive (what I called back and forth movement). I wouldn't worry about fixing it. If this is a one time project, then I think you can live with it. If this is a product for manufacture, then you'd want to improve on it with further board layouts.........and that may be when you consider buying the evaluation board to compare with what the manufacturer considers acceptable.

Like they say in real estate........location, location, location. With switching power supplies its layout, layout, layout. Most likely its a function of the layout in some way. Sometimes these are black magic designs. Any chance of posting the top and bottom layer of your layout (without parts so as to see the copper traces)? All you can do is follow the recommendations of TI and hope for the best. I've seen some parts more sensitive to noise than others. I once did 3 different buck designs because I wanted to see which controller I liked (or worked) the best. It's interesting the differences you get even though you follow the guidelines. Interesting, the one that I had the most problem with was the one that used a small current sense resistor like this design has.

The ripple on the output looks OK because this isn't a type of power supply used to power sensitive equipment but is more designed for LEDs that don't care about that ripple. Besides, the LM3409 is stated to work without a capacitor on the output. And this part is designed to work without requiring any control loop compensation.

Another thing you can do is post these same questions on the TI forum and see what response you get. At any rate look over the various responses for the LM3409
https://e2e.ti.com/search?q=lm3409

I'll post up the board layout tonight. Yeah, I read in the datasheet that the layout is just as important as the component selection! Crazy to think about that. I guess these high frequencies have a tendency to make little antennas which are easily affected by adjacent components and ground loops.

Regarding the jitter - do you think it's a functional issue, and why? I do plan to ultimately sell some of these to at least cover the tools/materials, so I want it to be perfect. It's also a personal goal to learn to optimize it and perfect it. The engineer at the ti forum suggested probing the L/D/M node rather than the gate, so I'm going to give that a shot too.

Thanks for the input! :twothumbs
 

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Kuksul08, you've got a little jitter on the gate drive (what I called back and forth movement). I wouldn't worry about fixing it. If this is a one time project, then I think you can live with it. If this is a product for manufacture, then you'd want to improve on it with further board layouts.........and that may be when you consider buying the evaluation board to compare with what the manufacturer considers acceptable.

Like they say in real estate........location, location, location. With switching power supplies its layout, layout, layout. Most likely its a function of the layout in some way. Sometimes these are black magic designs. Any chance of posting the top and bottom layer of your layout (without parts so as to see the copper traces)? All you can do is follow the recommendations of TI and hope for the best. I've seen some parts more sensitive to noise than others. I once did 3 different buck designs because I wanted to see which controller I liked (or worked) the best. It's interesting the differences you get even though you follow the guidelines. Interesting, the one that I had the most problem with was the one that used a small current sense resistor like this design has.

The ripple on the output looks OK because this isn't a type of power supply used to power sensitive equipment but is more designed for LEDs that don't care about that ripple. Besides, the LM3409 is stated to work without a capacitor on the output. And this part is designed to work without requiring any control loop compensation.

Another thing you can do is post these same questions on the TI forum and see what response you get. At any rate look over the various responses for the LM3409
https://e2e.ti.com/search?q=lm3409

Board layout as promised. Thoughts?
http://i.imgur.com/GIxej5n.jpg

My latest realization is how hot the circuit gets - I realized that the inductor I spec'd is very close to the saturation current. I will need to up the rating, and it wouldn't hurt to do some heatsinking.
 

hiuintahs

Flashlight Enthusiast
Joined
Sep 12, 2006
Messages
1,840
Location
Utah
Board layout as promised. Thoughts?
http://i.imgur.com/GIxej5n.jpg

My latest realization is how hot the circuit gets - I realized that the inductor I spec'd is very close to the saturation current. I will need to up the rating, and it wouldn't hurt to do some heatsinking.
Here is a stab at what it might take to improve the jitter. I'm not an expert but I have read a few application notes on switchers. I'm going to use the layout for the evaluation board, page 5, figure 3 as a guide.
http://www.ti.com/lit/ug/snva391d/snva391d.pdf

1) L1, D1 & M1 want to be next to each other. You're pretty good there, however I'd probably turn D1 around. Not sure I like having ground run under the inductor to pick up the ground lead of the diode.
2) If possible place D1 ground next to Cin ground while still keeping the cathode next to L1 and M1. (see application note below on this placement)
3) The gate drive signal to the mosfet from the IC wants to be short. Thus I'd rotate the mosfet 90 deg like they have on the evaluation board.

This is a good article by Jeff Barrow on minimizing noise.
http://www.eetimes.com/document.asp?doc_id=1279232
Take a look at figure 4.

"Magnetic flux = (B-field) × (current loop area). Changing flux induces
voltage. As a buck switches, the changing current-loop path causes a changing flux
and induces ground bounce."

Thus the smaller that loop area is, the less magnetic flux and noise. By placing Vin (-) next to the anode of D1 reduces the loop area for the high di/dt current path. Note the tight path from Cin to Rsense to mosfet to diode and back to Cin(-) on the evaluation board.

I hope this helps. These are educated guesses at this point.
 

kuksul08

Enlightened
Joined
Jun 4, 2007
Messages
783
Location
California
Here is a stab at what it might take to improve the jitter. I'm not an expert but I have read a few application notes on switchers. I'm going to use the layout for the evaluation board, page 5, figure 3 as a guide.
http://www.ti.com/lit/ug/snva391d/snva391d.pdf

1) L1, D1 & M1 want to be next to each other. You're pretty good there, however I'd probably turn D1 around. Not sure I like having ground run under the inductor to pick up the ground lead of the diode.
2) If possible place D1 ground next to Cin ground while still keeping the cathode next to L1 and M1. (see application note below on this placement)
3) The gate drive signal to the mosfet from the IC wants to be short. Thus I'd rotate the mosfet 90 deg like they have on the evaluation board.

This is a good article by Jeff Barrow on minimizing noise.
http://www.eetimes.com/document.asp?doc_id=1279232
Take a look at figure 4.

"Magnetic flux = (B-field) × (current loop area). Changing flux induces
voltage. As a buck switches, the changing current-loop path causes a changing flux
and induces ground bounce."

Thus the smaller that loop area is, the less magnetic flux and noise. By placing Vin (-) next to the anode of D1 reduces the loop area for the high di/dt current path. Note the tight path from Cin to Rsense to mosfet to diode and back to Cin(-) on the evaluation board.

I hope this helps. These are educated guesses at this point.

Sometimes all it takes is another set of eyes to bring out the details I may have overlooked. Thanks for looking over it with such detail - I will surely take these suggestions and alter my final board. I was concerned about the gate drive path, but just didn't see how to fix it. Guess my head is just so buried in the details at this point. I think I can easily make these changes and still have it fit in my space requirements too.

Worth noting is that I realized my actual inductor uH rating is slightly too high. With this driver, there is a minimum current ripple that it needs in order to regulate properly. In an effort to reduce ripple I overlooked this and so maybe it could contribute to the jitter. Just an idea! On the plus side, the solution is to decrease the inductance, which inherently increases the current rating in the same package size, so I might still be able to keep the same package.

I also just realized that I didn't show you the bottom layer. It's rather simple: http://i.imgur.com/YAIPBta.jpg

It's mostly a ground plane, except there are two paths to connect the enable pin and another pin to Vin. It looks like the eval board does this too. I made all my traces as wide as possible everywhere - figured it wouldn't hurt. Further up on the board is simply a pair of automotive relays for switching.
 
Top