High brightness white LEDs damaged by custom switcher

May 04, 2007 27 Replies

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

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.

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.

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

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

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.

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,

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required