Because of the holidays, TI E2E™ design support forum responses will be delayed from Dec. 25 through Jan. 2. Thank you for your patience.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPS40211 LED driver troubles

Other Parts Discussed in Thread: TPS40211, TPS40211-Q1

I've recently just implemented my design on a PCB to test and I'm experiencing some strange behaviour.  For reference, my design is at the bottom. This is the first LED driver I've designed, so I very heavily made use of the WEBench tools as well as reading the part datasheet cover to cover.

The circuit was designed to these requirements:

  • Output: 32V, 0.7A max
  • Input: 6.5 - 25 VDC
  • PWM frequency: 850KHz

My setup is this:

  • Driver on PCB, hooked up to STM32 microcontroller
  • Powered from 23.5V 
  • STM32 starts with DIS/EN pin high to disable the driver
  • Button press Sets DIS/EN pin low, and increments the PWM (@ 20KHz) duty cycle by 10% up to a max of 50% then back to zero with DIS/EN high
  • 47 ohm load resistor on output (simulating 32v, 0.7A LED panel I don't have yet), connected via Ammeter to track the power output.

The problem:

What I am seeing is when I power up the board I am seeing 0.49A flowing into the load, even while the driver is disabled. When I enable the driver and set the PWM to 10% duty cycle I then see 0.79A(!) through the load.

Testing the LED output  with respect to ground I'm also seeing a 20KHz ripple of 9V(peak to peak) when it's active, which is probably just the PWM but I thought I'd mention in case it wasn't normal.

Has anyone seen this before? I have no idea what's going on or how to fix it, help!

Tools I have at my disposal to help fix this: an oscilloscope, multimeter, benchtop power supply.

And a PCB close up for good measure:

  • What you are seeing is almost certainly because you are using a resistive load rather than an LED load. LEDs will conduct almost no current until you reach the forward operating voltage. There is a path from the input to the output in any boost converter through the inductor and diode. A resistor will draw current from the input regardless of whether the converter is operating or not, an LED load will only have some very low leakage current. This also explains your 9V p-p voltage ripple since a resistor will discharge the capacitor much further much faster. A large amount of ripple can also increase the rms current you are reading above the set point. An LED load will behave much differently. You need to test with the LED load to be sure if there are any actual problems.
  • Thank you very much for this! I'll test with a more appropriate load as soon as it's available. Can I ask as well, do you see anything fundamentally wrong with my design? It was somewhat cobbled together from a mixture of WEBench and the datasheet so I don't actually know what it's output capability/range is. Is it likely if I had a different panel (lower voltage, higher current) it might work to test on?
  • It looks like you have the wrong value for R37. 37mohm sets the current for 7A so you should switch it to a 370mohm. Other than that it looks ok. The output capability is limited by the gate drive capability of the IC. With current FETs available that means it's probably only practicle for maybe 50W at the most. But if you would like to test with a lower voltage/higher current that is fine. Just make sure the output voltage is significantly higher than the input voltage or you may have stability issues.
  • In terms of power, the panel I'm going to be using won't need much more than 22W max so 50W is a lot of headroom.

    I've replaced the resistor with the right value and hooked up a different test panel (32-36V) for the time being. It's pretty close to my desired output, but with lower current. I'm noticing some other strange behaviour though. With my input voltage set to around 12V, when I turn on the driver at 20% PWM the panel lights dimly. As I increase the duty cycle I see no change in brightness of the panel. 

    I probed the GDRV output of the IC and I can't see anything but a very short pulse of 5.5V which is consistent despite the changing duty cycle. The frequency of the pulse on that pin seems very irregular too, my scope has a hard time determining it.

    Any idea what's going on here? 

    A few other signals I've been probing:

    RC: sawtooth, 790 KHz.

    SS: 7.8V

    COMP: 1.2V

    FB: 260mV

    BP: ~8V

    Q2 Drain: Sawtooth @ PWM frequency

    I also probed the L2-D2-Q11(D) node, which looks like this:

    EDIT: I also noticed that when I get to 23V the Panel comes on even when the driver is disabled. This is a bit of a problem since my input should be able to range from 6-24V. 

  • I'm sorry, bear with me, I'm not that familiar with this particular device yet. Perhaps that is why I missed the PWM dimming frequency you are using. Did you say it is 20kHz? With this part being a boost and COMP being pulled down for PWM dimming you will never be able to PWM dim that fast. It is probably only good for a couple hundred Hz for PWM dimming, it will not respond fast enough to much higher frequencies. If you need to dim that fast and need a boost you will likely need a disconnect FET like those used in the LM342x family of regulators to keep the output capacitor charged and also disconnect COMP during dim for a faster response.
  • I'm still experiencing the same issues at 130Hz PWM frequency, except now when it's at 90% duty cycle there's a definite visible flickering on the panel output at that frequency.
  • Ok, I've had some time to look at the datasheet versus your circuit and I have some concerns I will put here:

    1. I noticed you have a 10k resistor from ISNS to ground and a much smaller capacitor than the datasheet application. I'm concerned at the huge difference in time constant and the voltages (mainly noise) that could be induced on the 10k resistor. This could cause erratic behavior and possibly current limit tripping if the time constant is not proper. I would match the datasheet and remove the 10k and increase the cap to 220pF.

    2. I have not done the loop analysis so I am not sure if your COMP values are correct. In the end you can always eliminate stability as a concern by putting a large cap from COMP to ground (like 1uF) just to make sure. The bandwidth will be low but it should be stable. If there is no change then stability is not an issue.

    3. My main concern is that you are trying to switch at 1MHz with a FET that has at least 29nC of gate charge. This translates into a BP current of almost 15mA and the datasheet states it is tested up to 5mA before dropout. The BP current required is 1/2*Qg*fsw so you will need to choose a much lower gate charge FET and/or lower your switching frequency. If it is not able to enhance the FET properly at the switching frequency used (BP is in current limit or heavy dropout) you will pull ISNS high and it will trigger a current limit event even if the current is low.

    Also regarding such a high switching frequency you will have a limited duty cycle range given the minimum on and off time constraints. The inductor value is also pretty high for such a high switching frequency and you may not have enough ramp for the current mode control to work correctly.

    I would recommend lowering the switching frequency for sure at least to 300kHz if using that FET (that FET has a very high gate charge) and using a better FET if you need to switch faster. But I would not exceed about 500kHz to make sure you have enough duty cycle range. I would also make the changes from number 1 above to be safe.

  • Hi Clinton, thanks for giving it a closer look.

    Honestly I was never sure about the function of that 10K resistor or the ISNS pin. It was in an application schematic of the datasheet (figure 36) so I just included it. I'll definitely get rid of it and change the capacitor value, which was definitely just a mistake I had missed.

    To avoid having a new PCB made to test on I'm going to try to make the modifications to this one, at least for testing purposes. The unfortunately limits my options for MOSFETs, but I think I might have found something that will work. Same package, but a gate charge of 12nC (PSMN014-40YS).

    Can you explain more about what you mean by duty cycle range? Are you referring to Dmax and Dmin? I calculated it to be 26-78% in continuous mode based on equation 11. This might be a stupid question, but what effect will the duty cycle range have on the driver?

    I thought it might be useful to provide a link to my original WEBENCH design. That's where I got the original calculated inductor value of 33uH.

    My main issue with using a lower frequency was higher value (which meant larger physical size) of the inductor since there are size constraints on the PCB. Maybe that's not an issue though if you think the inductor value is already too large and I could get away with a lower value and smaller one.

     http://webench.ti.com/appinfo/webench/scripts/SDP.cgi?ID=0A11B6C87E27590D

    Edit: it seems I can only find a small enough inductor (<14x14mm ish) when it's value is <=33uH. What do you think would be the lowest frequency I could go to with this inductor value? It seems WEBENCH is happy to recommend FETs with a Qg of up to 18nC at 700 MHz, but now I'm not sure how much to trust it! 

  • That FET would work well and help lower the current required to drive it. I also think you would be just fine switching at say 500kHz with a 33uH inductor.

    As for the duty cycle, there is a section in the datasheet regarding minimum on and off time considerations that explains it. Basically there is a minimum off time each switching cycle of 200ns. So if you are switching at 1MHz you will have a maximum on time of 800ns which means a maximum duty cycle of 80% (maximum on time is 80% of total switching period). At 500kHz it would be 90% maximum. This may be a non-issue for your application. But you will only increase efficiency by lowering the switching frequency.

  • Hi Clinton,

    I made the changes you suggested and lowered the frequency to ~500KHz, but I'm still experiencing the same outcome. It would appear as if I have a square wave on the gate of the FET, butit doesn't seem to change much as I change the PWM frequency, and the driver always drives the LED at roughly the same brightness. At higher PWM input levels perhaps the voltage across the LED is actually slightly lower...

    I took a scope capture of the gate of the FET alongside the ISNS pin:

    I still don't know what's going on, or how to fix it and I'm tearing my hair out at this point. It looks like there's a spike on the ISNS pin which exceeds the 150mV overcurrent detection threshold, but I have no idea how to fix that since I've been very careful with my values. I changed the WEBENCH design to calculate the component values based on a 33uH inductor at 500KHz, so that's what I've replaced all the relevant sections based on.

    http://webench.ti.com/appinfo/webench/scripts/SDP.cgi?ID=4BFFF5FE852BBFCC

    And here's the most recent schematic. Red boxes indicate where I've changed values:

    I really have no idea what I'm doing wrong here. I just CANNOT get this thing to drive as I'd expect.

  • It looks like there is some noise on those waveforms, including some oscillation ground. When all else fails look at the layout, especially if you see ground noise. I did look closer and notices some possible grounding issues. It looks like the current sense resistor ground is separated from the ISNS filter ground which is the IC ground. The IC ground in turn is separated from the current sense ground. I know there are ground vias but I don't know what the inner ground plane looks like or if it is cut by anything, or if there is much of one. But those grounds should be tied together well. I would take very short, thick wires and solder one from the current sense resistor ground to the IC/filter ground and use another to connect the current sense ground to R32/input cap ground and see if that helps.
    Two other things: I would reduce R31 to maybe 4.7 ohms or short it, that should not really be needed. I would also measure resistance across the current sense resistor R37. There is a lot of solder and it would be good to make sure it isn't shorted or damaged.
  • Looks like that 13.7 ohm resistor was the culprit for the ground noise on the GDRV output. Removing it completely diminished the oscillation.

    The current sense resistor was changed when you initially pointed out it was the wrong value so it doesn't look nearly as much of a solder mess with the correctly sized replacement. It's value checks out as 370 mOhms.

    No other ground signal around there shows any sign of noise. The ground scheme I have in the circuit was chosen based on the LED driver application in the Datasheet. Both grounds go back to a star point and have adequate copper pours between them and that point. There is no internal dedicated ground plane but there should be an adequate path for both PGND and GND through the copper pours on top/bottom layers. Even though the planes are cut occasionally, through my liberal use of vias I figured it should be okay. Anyway, I tried what you suggested in terms of adding think wires to join the grounds from those points, but sadly it didn't make any difference.

    Here's what the ground pours look like if you're curious:

  • Ok, this is helpful. Seeing the second plane and where the vias go I can agree with you that the ground points I mentioned should be ok as they are tied to the bottom plane pretty well. But seeing these layers shows me a different and pretty serious grounding issue. While the other components I mentioned before might be ok the issue I see is the grounding of the IC and of the BP capacitor. First, the GND pin of the IC should be tied directly to the DAP of the IC. You have the BP capacitor trace cutting between them. Any IC with a DAP requires this direct connection to prevent the die substrate from being different than the ground pin. If they are not directly connected (or worse, connected to a different ground plane entirely like in this case) you can get substrate current injection and that can cause everything to go haywire. The second point I already mentioned: The DAP and the BP filter capacitor are tied with vias to an entirely different ground plane that is cut off from the GND pin, input caps, and sense resistor. This can and almost always will cause noise problems. I would at a minimum extend the bottom layer ground plane to include the vias for the IC and for C38. You may be able to test this by soldering wires between the IC and C38 vias to the 4 vias that connect C30 from the top layer (the 4 closer to the IC).
  • BTW, that suggestion may show some improvement, but it may not solve everything until you can get the GND pin and DAP tied together.
  • I have made those grounding connections ass you suggested. The BP capacitor ground pin (C38) has been connected to the four vias below R32, but also to the Ground pad that used to below to R34 in order to bridge the DAP to the IC GND pin. Unfortunately I haven't seen any change in the behaviour of the circuit.

    I did some more probing around and found the output from the inductor perhaps looks a little strange? There seems to be a lot of ringing, but it occurs over seemingly random periods; Sometimes you can see the complete signal ring out, and other times they bunch up into a mess of oscillations, each running a couple periods then is cut off by the next.

    Let me know what you think:

    I also noticed that at higher voltages (>18V) there is very very visible flicker in the LED. Not sure if this helps with the diagnosis, or is maybe even something that will resolve itself when the driver operates correctly.

    The ground connections I made can be seen below. Admitted it's not pretty, but my first goal is just to get this thing working!

  • That is a start, but it's not the star grounding I was going for. R37 is left out but really needs connecting. Referring to the pic above jumper a wire from both R34 ground and R37 ground directly to the R32 ground with short wires (like the blue one). Then on the bottom side of the board directly connect the DAP vias and C38 vias to the 4 bottom vias that go up to the R32 ground. It's still important to get the GND pin connected directly to the DAP eventually, but that might help significantly. As you have it connected above the current sense ground is somewhat isolated since its vias are cut by the sense trace to R32 and I don't think the DAP ground is solid enough.
    The waveforms you are seeing are the inductor current going discontinuous and ringing to zero. This tells me there is some noise telling the switch to turn off well before it is supposed to which is why I suspect grounding. Sorry it's frustrating, I've been through the growing pains of switcher layout. They generate a lot of noise so you have to be very careful, especially with grounding.
  • So, just to ensure I'm understanding this scheme correctly I've doodled on this render of the PCB. I'll do this, and remove my current wire links?

    Blue = Top wire link, Red = bottom

    Not sure if by '4 bottom vias that go up to the R32 ground'  you meant the ones that go to R32's ground pin (labelled '1'), or the other 4 vias where the blue wire is currently connected (labelled '4'). I've labelled these nodes in an attempt to make this easier to discuss.

    It's also possible that I could remove some of the soldermask between U3 and C38 and bridge it round to the ground pin there if that would help.

  • That is correct. Actually I meant the 4 vias you are currently soldered to, but either should work fine, they are close to each other on top. It would also be a good idea to try and solidify the ground pin to the DAP with another wire like you mentioned, it might help. It only takes about 300mV differential between the DAP and GND pin to cause issues, so any extra connection will help. In any final design make sure it is connected directly beneath the IC.
  • I've just made the changes like you had suggested, but I've seen no change again... If there is 300mV difference between the ground and the DAP at this point I'd be amazed. I have absolutely no idea what else could be wrong though. Maybe I've chosen some component values wrong? maybe it's still unstable? I've added the capacitor between the COMP and FB pins that you suggested already though, so I don't know what else I can do there.
    Thank you for being patient with me here though, I'd absolutely be tearing my hair out if I was having to tackle this on my own.
  • Over the weekend I made more attempts to diagnose the issues I'm having. Hopefully I've ruled out a few things but I've also confirmed some other things.

    The GND pin and DAP connections

    I've made the best possible effort to connect the DAP to the GND pin. I've measured with a scope the difference between the two, and while there is slight noise on the ground, it's pretty common to both of the locations and never larger than 100mV. I'd be surprised if they ever saw a differential greater than a few tens of mV.  Note: It looks like there's a delay in the noise spikes between the two points, but that delay persists even when probing the same point so it's likely just the differences in the probes themselves.



    The overcurrent condition trigger

    After becoming satisfied that I had done my best to ground the system I decided to check that it was still an overcurrent condition problem. I measured both the ISNS pin as well as the L2-D2-Q1 node this time to confirm. Unsurprisingly you are correct, and there is a spike on the ISNS line that seems to occur just before the inductor starts ringing each time. Still completely and frustratingly clueless as to the source of this overcurrent condition however.

    Interference on the FB pin

    Lastly, I was doing some further probing and I noticed what seems like interference on the FB pin. It's from the PWM input signal, and I'm assuming it's due to the diode used in the PWM that's connected from the COMP pin which is obviously linked to the FB via the comp network. It's probably nothing, but seeing as I still have no idea what the true problem is I though I should include this anyway.

    This afternoon I'm going to continue my futile attempts to resolve this issue, so any additional suggestions you might have will be very very welcome.

    EDIT: It turns out that I'm a complete idiot. The sense resistor that I was certain was the right value happen to be about 3 orders of magnitude off. I don't know how I didn't notice when it was staring me in the face the whole time and I somehow even measured it wrong :/

    Sorry for wasting so much of your time with potentially such a silly problem. I'm very grateful for the time you've spent helping me out, and I've certainly learned loads in the process that will be invaluable when I redesign this later.

    I'm not overly optimistic that this will solve all of the problems, but we'll see. I'll post again tomorrow once the resistors arrive and I've switched them out. 

  • Hi Clinton,

    I replaced the sense resistor with the correct value. Now I'm seeing nothing on the output. Measuring the inductor just shows a DC voltage that matches the input so it seems the switcher isn't even switching! No PWM from the device. The oscillator isn't even active. I have double and triple checked the PWM and EN signal from the microcontroller, they're the same as ever. I have no idea now why changing that one resistor has shut the whole thing down.

    I'm totally lost with this now and the deadline for this design is rapidly approaching, I'd really appreciate some professional input.

  • Have you tried running it with no PWM dimming signal to see if it starts up and runs normally? The COMP cap value is pretty big and perhaps it doesn't have enough time to start up fully? It's hard to say without looking at it directly.
    But I would just make sure you didn't short anything when adding the ground wiring and if that is all fine it may be a good idea to replace the IC itself. Sometime during long troubleshooting I've done something (who knows what?) to damage ICs before. I would also make sure your other sense resistor (R32) is the correct value to be safe.
  • It works!
    The problem was that I actually soldered up a whole new board (like you say, extended debugging has a tendency to break things), and the DAP hadn't joined onto it's pad properly.

    While I'm on this train of learning, what was it that made you say the comp capacitor seemed large? That's the value that WEBENCH spat out at me so I figured it was a safe bet.

    A couple last things...
    Though the driver functions fine from about 6.5 - 20V input, I'm seeing strange behaviour as I go higher than 22V. The LED panel lights dimly even when the driver is completely disabled. What do you think could be causing this, and is there a way to fix it?
    It's important that it can drive normally up to 24VDC.
    And finally, there's a sort of high pitched buzzing that increases in pitch as I increase the output. Seems like it might be from the Inductor or the input capacitor, but it's hard to tell. What's strange is it completely ceases when the LED is driving at just below it's max brightness. What causes this? and is there any way to minimise it?
  • Good to hear, a disconnected DAP could cause problems. As for the COMP cap, nothing really except that it's higher than I'm used to for most designs. But when I look at the error amp specs for the TPS40211 it doesn't really seem all that high anymore.

    As for the LEDs lighting, that is just how a boost converter works. There is a path from Vin through the inductor and diode to the LED string regardless of whether the IC is switching or not. So if the input gets high enough it will begin to light the LED string even with the IC shut down. The only way to prevent this is to use a disconnect switch or to switch to a buck-boost topology which would be a whole different IC and likely a little more complex.

    The buzzing sound you here, is that happening during normal operation or are you PWM dimming? I suspect it is during PWM dimming, but regardless, the inductor and the input capacitor are usually the culprits. Either or both can make audible noise if you PWM dim with an audible frequency. I suspect this even more since you say the pitch increases as the brightness increases. When you get near full brightness the output capacitor has very little chance to discharge so the stress on the input cap and inductor at turn-on is much less and the noise can go away.

    Getting rid of audible noise is a common problem but is mostly black magic. You will need to experiment to find out whether it is the caps or the inductor. If it's the inductor you can try a different inductor (they all have different resonances) or you can pot it with compound to dampen the noise. Sometimes just changing the PWM dimming frequency will do the trick.

    If it's the input capacitor changing the PWM frequency can also work, so can potting. But if neither are an option you can try just changing manufacturers or case sizes, again they all have different audible characteristics. Sometimes replacing a 1210 capacitor with two 1206 size capacitors will work. Sometimes it can also mean you are overstressing the rms current rating on the capacitor so you need to increase the amount of capacitance and/or number of capacitors anyway. Less attractive options for solving this are low audible noise ceramic caps (higher cost) or changing to tantalum or aluminim electrolytics as they do not exhibit the piezo effects ceramics do. If you do that you should still have a parallel ceramic to retain low ESR as they both have a much higher ESR than ceramics.

  • Ahh, that makes sense. I should've just looked at the schematic! At this point I'm mostly assuming any unexpected behaviour is part of the switcher wizardry. I'll persevere with the problem just now, it's possible that I can have a different panel made where the diodes only conduct at >24V.

    You're correct, the buzzing was only when I was PWM dmming. I've done some experiments with the PWM and the IC seems pretty happy for me to push it right up to 20KHz and out of the audible range. Thanks for the tip!

    I guess we can call this resolved! Thank you so much for all of your help, and patience with these problems. I don't know what I would have done without it!
  • Clinton Jensen: as it sounds like you are a expert on drivers. i need to make a min 2A boost driver with min 80W output power on a single layer board. i wanted to use the TPS40211-Q1 for this. do you think this is visible on a single layer our will this be waist of time? (it's a metal core pcb)

    thanks you very much!