High brightness white LEDs damaged by custom switcher

"Fred Bartoli" wrote in message news:463cea98$0$2411$ snipped-for-privacy@news.free.fr...

According to my simulation, the circuit enters continuous mode only for an input of a bit less than 10 VDC. The LEDs have an ESR of about 2 ohms each, so a couple volts of ripple can be tolerated. They are rated for 1.8 A maximum pulse current. The ASCII file following reflects some recent diddling, but is approximately what I have.

Regarding the PIC, the honest answer is probably that I *like* using them, but there are other reasons. The SMPS controllers I am familiar with use reference voltage of 2.5 V or more, so I would need to add an op-amp to boost the current sense voltage. I would like to retain the features of (1) shutdown for output overvoltage (to avoid blowing the cap if the load is disconnected), (2) input undervoltage detection, which sets the PWM to a low current power saving mode, and (3) the unique dual brightness feature. I could use a PIC to control the SMPS controller, but that would add another component on an already tight board.

I am convinced that the precautions I have come up with will eliminate the main problem of excess current surges. I will need to do some actual testing to be sure, of course.

Many thanks to all who have responded.

Paul

LTSpice file: =============================================================================

Version 4 SHEET 1 1216 680 WIRE -128 -240 -128 -256 WIRE -128 -240 -304 -240 WIRE -64 -240 -128 -240 WIRE 224 -240 -64 -240 WIRE 592 -240 224 -240 WIRE -304 -208 -304 -240 WIRE 224 -192 224 -240 WIRE 592 -144 592 -240 WIRE -304 -48 -304 -128 WIRE -192 -48 -304 -48 WIRE 592 -32 592 -64 WIRE 688 -32 688 -48 WIRE 688 -32 592 -32 WIRE 736 -32 688 -32 WIRE 816 -32 800 -32 WIRE 928 -32 816 -32 WIRE 944 -32 928 -32 WIRE 1072 -32 944 -32 WIRE -64 -16 -64 -240 WIRE 592 0 592 -32 WIRE 928 0 928 -32 WIRE 352 16 112 16 WIRE 480 16 480 -16 WIRE 480 16 432 16 WIRE 1072 16 1072 -32 WIRE -192 48 -192 -48 WIRE 224 48 224 -128 WIRE 320 48 224 48 WIRE 816 64 816 -32 WIRE 816 64 752 64 WIRE 224 80 224 48 WIRE 480 80 480 16 WIRE 544 80 480 80 WIRE 752 96 752 64 WIRE 816 96 816 64 WIRE 320 112 320 48 WIRE 928 112 928 80 WIRE -304 128 -304 -48 WIRE 1072 128 1072 96 WIRE 1152 128 1072 128 WIRE 480 144 480 80 WIRE 112 160 112 16 WIRE 1072 160 1072 128 WIRE 1152 176 1152 128 WIRE 592 192 592 96 WIRE 752 192 752 160 WIRE 816 192 816 160 WIRE 816 192 752 192 WIRE 1152 192 1152 176 WIRE 928 208 928 176 WIRE 1072 272 1072 240 WIRE 1152 272 1152 240 WIRE 1152 272 1072 272 WIRE -304 304 -304 208 WIRE -192 304 -192 112 WIRE -192 304 -304 304 WIRE -64 304 -64 48 WIRE -64 304 -192 304 WIRE 112 304 112 240 WIRE 112 304 -64 304 WIRE 224 304 224 144 WIRE 224 304 112 304 WIRE 320 304 320 192 WIRE 320 304 224 304 WIRE 480 304 480 224 WIRE 480 304 320 304 WIRE 592 304 592 272 WIRE 592 304 480 304 WIRE 720 304 592 304 WIRE 784 304 720 304 WIRE 816 304 816 192 WIRE 816 304 784 304 WIRE 832 304 816 304 WIRE 928 304 928 272 WIRE 928 304 912 304 WIRE 1008 304 928 304 WIRE 224 320 224 304 WIRE 720 336 720 304 WIRE 784 416 784 304 WIRE 1072 416 1072 272 WIRE 1072 416 784 416 WIRE 720 448 720 400 WIRE 1008 448 1008 384 WIRE 1008 448 720 448 FLAG 224 320 0 FLAG 480 -16 Vg FLAG 112 16 SigIn FLAG 944 -32 Vout FLAG 688 -48 Vsw FLAG -128 -256 Vsupply SYMBOL voltage 112 144 R0 WINDOW 0 37 59 Left 0 WINDOW 3 -304 182 Left 0 WINDOW 123 0 0 Left 0 WINDOW 39 0 0 Left 0 SYMATTR InstName V1 SYMATTR Value PULSE(0 12 20n 20n 20n 7.5u 10u 2000) SYMBOL res 336 32 R270 WINDOW 0 32 56 VTop 0 WINDOW 3 0 56 VBottom 0 SYMATTR InstName R5 SYMATTR Value 10 SYMBOL voltage -304 112 R0 WINDOW 123 0 0 Left 0 WINDOW 39 24 132 Left 0 SYMATTR SpiceLine Rser=.05 SYMATTR InstName V2 SYMATTR Value PULSE(0 10 .1m 100n 100n 8.6966m 10m 2) SYMBOL nmos 544 0 R0 WINDOW 3 -54 102 Left 0 SYMATTR Value SI7454DP SYMATTR InstName M1 SYMBOL ind 576 -160 R0 SYMATTR InstName L1 SYMATTR Value 10µ SYMATTR SpiceLine Ipk=6 Rser=0.015 Rpar=30000 Cpar=17.04p mfg="Gowanda" pn="121AT1002V" SYMBOL schottky 736 -16 R270 WINDOW 0 32 32 VTop 0 WINDOW 3 0 32 VBottom 0 SYMATTR InstName D2 SYMATTR Value MBR20100CT SYMATTR Description Diode SYMATTR Type diode SYMBOL polcap 800 96 R0 WINDOW 3 24 64 Left 0 SYMATTR Value 47µ SYMATTR InstName C1 SYMATTR Description Capacitor SYMATTR Type cap SYMATTR SpiceLine V=63 Irms=600m Rser=0.13 MTBF=20000 Lser=0 mfg="Nichicon" pn="UPH1J470MRH" type="Al electrolytic" ppPkg=1 SYMBOL cap 736 96 R0 SYMATTR InstName C2 SYMATTR Value 0.47µ SYMATTR SpiceLine V=50 Irms=22m Rser=3.9 MTBF=2000 Lser=0 mfg="Nichicon" pn="UPL1HR47MAH" type="Al electrolytic" ppPkg=1 SYMBOL cap -208 48 R0 SYMATTR InstName C3 SYMATTR Value .47µ SYMATTR SpiceLine V=50 Irms=5.62 Rser=0.007 MTBF=0 Lser=0 ppPkg=1 SYMBOL res 912 -16 R0 SYMATTR InstName R2 SYMATTR Value 5 SYMBOL res 464 128 R0 SYMATTR InstName R6 SYMATTR Value 500 SYMBOL res 576 176 R0 SYMATTR InstName R8 SYMATTR Value .02 SYMATTR SpiceLine pwr=2 SYMBOL zener 944 272 R180 WINDOW 0 24 72 Left 0 WINDOW 3 -69 0 Left 0 SYMATTR InstName D1 SYMATTR Value DFLZ33 SYMATTR Description Diode SYMATTR Type diode SYMBOL zener 944 176 R180 WINDOW 0 24 72 Left 0 WINDOW 3 -108 6 Left 0 SYMATTR InstName D3 SYMATTR Value BZX84C6V2L SYMATTR Description Diode SYMATTR Type diode SYMBOL res 928 288 R90 WINDOW 0 0 56 VBottom 0 WINDOW 3 32 56 VTop 0 SYMATTR InstName R1 SYMATTR Value 1 SYMATTR SpiceLine pwr=1 SYMBOL res 992 288 R0 SYMATTR InstName R3 SYMATTR Value 1k SYMBOL cap 704 336 R0 SYMATTR InstName C5 SYMATTR Value .1µ SYMBOL res 1056 0 R0 SYMATTR InstName R4 SYMATTR Value 10k SYMBOL res 1056 144 R0 SYMATTR InstName R9 SYMATTR Value 499 SYMBOL cap 1136 176 R0 SYMATTR InstName C6 SYMATTR Value .01µ SYMBOL ind -320 -224 R0 SYMATTR InstName L2 SYMATTR Value 100n SYMATTR SpiceLine Ipk=8 Rser=0.00087 Rpar=9.4 Cpar=0 mfg="Coilcraft" pn="SLC7530D-101MX" SYMBOL diode 208 -192 R0 SYMATTR InstName D5 SYMATTR Value MMSD4148 SYMBOL polcap 208 80 R0 WINDOW 3 24 64 Left 0 SYMATTR Value 100µ SYMATTR InstName C7 SYMATTR Description Capacitor SYMATTR Type cap SYMATTR SpiceLine V=25 Irms=145m Rser=0.62 MTBF=1000 Lser=0 mfg="Nichicon" pn="UPR1E101MPH" type="Al electrolytic" ppPkg=1 SYMBOL res 304 96 R0 SYMATTR InstName R10 SYMATTR Value 1k SYMBOL polcap -80 -16 R0 WINDOW 3 24 64 Left 0 SYMATTR InstName C4 SYMATTR Value 100µ SYMATTR Description Capacitor SYMATTR Type cap SYMATTR SpiceLine V=35 Irms=460m Rser=0.16 MTBF=3000 Lser=0 mfg="Nichicon" pn="UPL1V101MPH" type="Al electrolytic" ppPkg=1 TEXT -224 504 Left 0 !.tran 6m startup TEXT -8 376 Left 0 ;R4 not required TEXT -8 440 Left 0 ;91% efficiency possible

Reply to
Paul E. Schoen
Loading thread data ...

The LEDs are in series, so all see the same current, and the voltage required is about 26 VDC for 7 and 49 VDC for 13. The PIC can respond to certain events within a few microseconds, by using interrupts. The difficulty is in generating the interrupt signal outside the PIC. That is why I plan to put a transistor on the current sense to detect an overcurrent. I could also add a similar circuit to detect output overvoltage, and generate the same interrupt.

The first thing to do is disable the PWM output, which can be done in a few clock cycles. Less than 1 uSec for an 8 MHz clock. Then the A/Ds can be used to see what caused it, and act accordingly. All three analog inputs are now read within 1 mSec, but could be within 60 uSec. The A/D can make a reading in 18 uSec.

As long as the external circuitry has a sufficiently slow response, I don't see any problem implementing a switcher with a PIC. The real advantage is that the hardware can be built in a simple, straightforward way, and then changes can be implemented in PIC code. As requirements change, the same circuit can be used with little or no change, and the PIC can be reflashed to the new parameters.

I think the PIC is perfectly suited to this application. It may not be so for situations where the input voltage may change suddenly, or output loads are constantly changing. The main problem here seems to have been identified, and several possible fixes should eliminate it. Extensive testing should prove that.

Thanks,

Paul

Reply to
Paul E. Schoen

It is one thing to get a circuit to work. It is another thing to turn it loose on the general public. This is where the controller chips shine over home brew designs. For instance, what happens if the user inserts weak batteries. That is, how good is the undervoltage lockout. What about an intermittent battery? Both at start up and during operation. There is quite a bit of engineering in a DC/DC chip that the user never sees, but it makes the design robust. Oh, and all this has to work over temperature.

The typical start-up circuit work like this. First, you have enough supply voltage to exceed a VT. One you have a VT, then you have trust worthy logic. Next up, you would wait for the voltage reference to exceed some simple reference, often just a N-fet fed with a current source. The bandgap can take microseconds to start up, to maybe hundreds if it is very low current. Once you trust the reference, you will measure the supply voltage to see if it is suitable. If the voltage is too low, the logic can be flaky. Once all conditions are met, you start a timer circuit because just maybe the voltage source is not steady (switch bounce, whatever). The you fire up the DC/DC, there are other safety circuits. For instance, a relay could fire and glitch the chip. [Probably not your situation.] A watch-dog timer will insure the logic gets reset if the pulse width is well out of spec. There are other safety features, typically over current protection on the power fet.

Basically, the off the shelf chip is (or perhaps should be) bullet proof. I just can't see doing this in a pic. The controller chip you buy has the history of a few in the field failures.

Reply to
miso

Your concerns are way over the top. A RISC PIC endows the circuit with far more flexibility than a dedicated switching chip, which is made from the exact same type of logic elements and reference circuits as the PIC uses.

Reply to
Fred Bloggs

That is exactly what I contend. The 16F684 is a very versatile and inexpensive chip, which has most if not all of the capabilities needed for the safeguards listed above.

The power on reset (POR) and power on timer (PWRT), and oscillator start-up timer (OST) should eliminate any problems when power is first applied, and it is highly unlikely that the 12 VDC battery will be too low to provide regulated 5 VDC. The circuit is used in a dedicated application where input supply and output load will always be known.

The brownout detect (BOD) assures that Vdd must be above VBOD=2.1V for the chip to get out of Reset. When reset, the output PWM is disabled. Once the device is running, the A/D converters monitor the input and output voltages, and output current, to assure they are within normal range. I am using the 5 VDC supply as reference, so erroneous readings could happen if that voltage was way off, but there is minimal chance of that. The most critical parameters of output voltage and current are fail-safe if supply voltage reference is too low.

While running, the watchdog timer will reset the circuit if a glitch causes a software lockup. The WDT can be set as fast as 1 mSec, but even that is not quite fast enough to prevent excess output current if the PWM is maxed out. However, the only relay in the circuit is the one which turns the supply on and off, so transients are unlikely during operation. The unit will be housed in a strong aluminum cylinder, surrounded by water, and powered from a battery pack which is also submerged, so there is little chance of external RF or voltage spikes.

Overcurrent in the power MOSFET is protected by the battery fuse, which is

20 amps. The MOSFET should be able to withstand that. The circuit does not have saturation detection, but that is unlikely if the duty cycle is limited and there are no component failures. The circuit will be encapsulated, and not designed to be repaired. It is just a $5-$10 component in a high-tech flashlight that has $50 to $100 worth of LEDs and a total package cost of $200 or so. Reliability is very important, but protection of the LEDs is essential.

I will agree that a dedicated, pretested SMPS chip might be more reliable, especially if there are errors in the PIC code or the associated circuitry. That puts the burden on me to test the performance under all possible conditions. A dedicated chip could still malfunction if an external circuit element fails or is not properly chosen. I appreciate the words of warning, but Fred's positive response leads me to believe my choice of a PIC is not unreasonable.

Thanks,

Paul

Reply to
Paul E. Schoen

Ypu're right! It was a bad design. But it was on a military project. The cost of the ECP would be way beyond the cost of some transistor matching.

Al

Reply to
Al

Let me get this straight. You have a switcher, and there are no spikes. Uh, yeah.

I think back to the days when Dell had in-house engineers designing their switchers. The operative word is "had."

While most of the Apple recalls were due to bad batteries, they did have a few due to power supply designs. "Let's be careful out there." Apple has a cult following. They screw up often and the cult still buys. Few companies can say this. You sell a turkey, and people remember you sold junk and go elsewhere. It takes a long time to get customers back. All that is left is to change the name of the company and hope nobody notices.

Be sure to look for you reference voltage "walking". This has happened in chip designs that of course never left the factory. Sometime you get a funny coupling from the current spikes on the battery get into the reference and get integrated. One way DC/DC designs avoid this problem is to bootstrap the reference.

Lastly, you need to determine the end of life impedance of your battery pack and insure there is sufficient capacitor bypass so that the end of life impedance doesn't cause problems.

Reply to
miso

another amen!

as with all projects, it's 99 % in the preparation.

with electronics, its 99% design smarts that yields the best fit for the end result!!

so we get (buy) a $120,000 4 year education for our kids, who then spend 99 percent of thier time figuring out how to pay for thier own kids $240,000 education.

it may seem smart, but this country has a lot to learn from asia and others! they pick the right ones to do the education scene, not throw money at bad success rates!

hmmmmmmmm?

or

same

be

borderline

failure

to

simple and

The

blown,

Reply to
HapticZ

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.