Problem simulating LED driver design - Page 1
Forum section: electronics / projects

author: ddcc
author_rank: Regular Contributor
timestamp: January 10, 2015, 09:33:09 pm
content: I'm looking to design an LED driver using the LT3478 regulator (http://cds.linear.com/docs/en/datasheet/34781f.pdf), and am currently running into some problems simulating one of their example circuits in LTSpice. On pg. 21 of the datasheet, they provide a sample design for a 4W, 1 LED @ 1A Buck-Boost Mode LED Driver, with dimming over PWM. However, my simulation for this design in LTSpice (attached) doesn't seem to function at all, with the driver not even powering up. I've checked my schematic against the sample design, and verified that the overvoltage and inductor inrush current protections aren't triggering.I suspect that the problem might be in the external PWM circuitry with the two MOSFET's, but even if I remove that circuitry and connect the output of the LED (D2) directly to GND, the simulation shows 7.5A through the LED at 4.2V. But the datasheet states LED current for the LT3478-1 is set by Min(CTRL1, 1.05) = 1.05 Amps, where CTRL1 = VREF = 1.24V.Note that in the simulation, n005 is the net from the LED output pin of the LT3478-1 to the input of D2 (the LED). The only external PSPICE library being used is XML2.lib for the LED; si2315bd.lib is for Q2 and B320.lib is for D1, but neither are being used.I'd appreciate any suggestions.

author: georges80
author_rank: Frequent Contributor
timestamp: January 10, 2015, 10:27:10 pm
content: I only looked at the datasheet quickly, but if you tie the LED cathode to ground you have a boost driver that will then go direct drive (DC path from Vs through L through D through sense resistor through LED to ground)...For buck-boost the LED cathode must go back to Vs/Vin.cheers,george.

author: ddcc
author_rank: Regular Contributor
timestamp: January 11, 2015, 12:22:38 am
content: Right, I missed that, thanks! If I connect the LED cathode to the Vin/Vs rail, the simulation result is similar to the original screenshot that I posted, except with a faster decay on the LED current. So it seems that the problem is not with the external PWM circuitry after all, but something preventing the switcher from starting up.Edit: Attached is the LTSpice schematic.

author: georges80
author_rank: Frequent Contributor
timestamp: January 11, 2015, 05:01:23 am
content: I downloaded your ltc file. It appears that you MUST configure the pmos/nmos fets otherwise they don't switch.i.e. if you probe the Drain of the NMOS fet you'll find it is stuck at high, should be low with the PWM input voltage at 3.3V.You need to fix both FETs then things will start up. I guess that the default/generic pmos/nmos have their Vgs set fairly high.cheers,george.

author: ddcc
author_rank: Regular Contributor
timestamp: January 11, 2015, 09:52:02 pm
content: You're correct about the default threshold being too high on the MOSFET, but I'm not sure that's the cause of the problem. I've fixed the simulation to use the actual PSPICE models for both MOSFETs, and verified that the NMOS is conducting, but when I graph V(n005)  - V(in), it reaches a max of 2.77V before dropping. It almost seems like it's hitting some sort of internal cut-off, but I've checked the overvoltage and the inductor current. Attached is the updated schematic and simulation.Since you seem to work with LED drivers fairly often, I was wondering how you would convert a constant-voltage SMPS into constant-current mode for driving an LED? I've seen some low-voltage (e.g. 1.8 - 5.5V) ~3A buck-boost converters like the TPS63020 and the LTC3113 that use a resistor divider on the output as feedback for regulating voltage, and have tried converting them to current mode using a current sense amplifier on the output for feedback, but have run into problems with oscillations on the feedback loop.

author: georges80
author_rank: Frequent Contributor
timestamp: January 11, 2015, 10:12:00 pm
content: It is very difficult and often impossible to take a voltage regulated switcher and turn it into a current regulated one. As you've found, adding an opamp into the feedback path messes everything up - since you now have an active component that moves the poles/zeroes of the control loop.There are many very good LED driver IC's out there these days, versus 5+ years ago, so I see no reason not to use a switcher specifically designed for current regulation.I did get your original schematic at least running on LTC but changed the FETs. Though it was weird that the current through the LED was around 2A (versus the expected 1A). I lost interest since I typically don't simulate these kind of designs and go straight to a prototype PCB. The schematic part of the design is really a minor part of the puzzle and it's the physical PCB layout that really makes/breaks things. Some LED switcher IC's require 4 layer boards, so can be done on 2 layers. How the components are placed and traces/planes make a huge difference - worst case the driver will not run in a stable loop at all.I generally use Linear Tech driver IC's since they are very good quality and provide excellent features (current control, PWM etc), albeit they are expensive.cheers,george.

author: dannyf
author_rank: Super Contributor
timestamp: January 12, 2015, 12:01:28 am
content: QuoteIt is fairly easy, as long as the said regulator (switching or linear) has a feedback pin with a fixed voltage reference: put a current setting resistor on that feedback pin to program the desired current levels. That pin to the regulator's output is your load.The regulator will maintain a fixed level of current through the load. This approach works with both switching and linear regulators.

author: georges80
author_rank: Frequent Contributor
timestamp: January 12, 2015, 12:04:52 am
content: Not at high current it isn't. Most FB pins of voltage regulators/switchers are generally in the 1.2V region. So, how much power are you dissipating in that sense resistor at 1A or 2A or 3A? Seems to defeat the efficiency point of using a switching regulator in the first place...LED drivers typically sense at 0.1V or lower (on the current sensing pins).cheers,george.

author: dannyf
author_rank: Super Contributor
timestamp: January 12, 2015, 12:21:58 am
content: QuoteThat's true.One way to solve it, without resorting to a new dedicated chip, is to amplify that signal before feeding it to the FB pin.

author: georges80
author_rank: Frequent Contributor
timestamp: January 12, 2015, 12:25:01 am
content: Yes, AND that amplification is the problem. You are adding an active device into the feedback path that then creates the stability issues. So that is NOT "one way to solve it..."THAT loss of stability is the issue that I explained and you appear to have ignored...cheers,george.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 12, 2015, 12:42:33 am
content: Hi,I have looked at the model and fixed it for you. The changes are indicated in this picture:ResultGreen Trace LED currentBlue trace PWM inputRegards,Jay_Diddy_B

author: dannyf
author_rank: Super Contributor
timestamp: January 12, 2015, 12:52:33 am
content: Here is a minimalist circuit, straight out of the datasheet, with random components.The pwm signal is a 1ms/2ms pulse, for demonstration purposes.It seems that the simulation works.

author: ddcc
author_rank: Regular Contributor
timestamp: January 12, 2015, 04:12:39 am
content: georges80, jay_diddy_b, dannyf, thanks for all your help! So it turns out after all that the problems in the simulation were with the default MOSFETs in LTSpice having too high of a Vth to conduct, and switcher startup occurring after the simulation stops due to the soft start value.