linear1 forums
[part of the linear1 network]
+ [linear1 case mods]
+ [LED Center]
+ [privacy policy]
Welcome, Guest. Please login or register.
March 21, 2010, 02:32:10 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Login Register

linear1 forums  |  LED discussion  |  LED questions and discussion  |  Topic: Problem with (simple) constant-current driver and switch « previous next »
Pages: [1] Print
Author Topic: Problem with (simple) constant-current driver and switch  (Read 991 times)
omega
Strong like bull
*
Offline Offline

Posts: 4


« on: August 22, 2006, 04:07:24 PM »

I've built up a set of LED boards as well as controllers to do theater-style lighting effects (already used to good effect at one concert).  I'm about to build the last 3 LED boards in the group (total of 8 units, 24ea of RGBW superbrights, 768 LEDs total) and I'm pretty sure I'm OK building them without worries of tearing them apart later, but I am having some issues getting full power out of the things.

I've attached a pic of a simplified model of the design.  It's driven by an AVR (atmega8515 in reality) at 5V with a local 7805.  System power is supplied by a 15V, 65W switcher from Meanwell (via Jameco).  +V is sent straight to the LED board over a cat5 cable, while 0V is switched with a cheapo 2n2222 controlled by the uC.

Each color channel on the new boards (first 4 are resistive ballast) is run from an lm317 in constant-current mode.  Total of 8 chains of 3 LEDs each should be 160mA, so the R1 set resistor is ~7.8 ohms (actually two 15.4's in parallel giving ~7.7) to give the appropriate 1.25V Vref.

Here's the problem: the voltage across the sense resistor is not 1.25V, it's only 1.08V (for red channel), implying only ~140mA.  Even stranger, the voltages around the 2n2222 don't seem to make any sense.  The base current of 0.6mA implies a ~235x gain, which is smack in the middle of the 100x(min) to 300x(typ) gain at 100mA for this transistor.  However, according to my readings, the transistor is dropping 5.87V(!!!).

Now, I know I really should be using MOSFETs for this, and that'll be one of the next things I do, but it means replacing both of my driver boards, hopefully without losing too many of my parts (good thing I socket my chips...).  However, my relatively limited understanding of transistors tells me that something is odd here.  Isn't the saturation voltage theoretically how much should be dropped with switched on?  Shouldn't I be getting a collector-to-emitter drop of 0.3-1.0V instead of the measured 5.87V?  That would explain in large part why the sense voltage at the LED board doesn't reach 1.25V, because the transistor is stealing all the voltage needed for the lm317 to get where it wants to go.

Here are the measured voltages in table form, to go with the numbers pasted on the attached schematic model:

Supply          14.91
After cable     14.88   (cable loss 0.03V)
After vreg      13.12   (reg dropout 1.76V)
After ballast   12.04   (sense 1.08V)
1st LED         9.97    (2.07V)
2nd LED         7.95    (2.02V)
3rd LED         5.88    (2.07V)
After cable     5.87    (cable loss 0.01V)


* ledmodel.png (24.84 KB, 1346x952 - viewed 106 times.)
Logged
Rob
LED guy
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1970


The constant-current gardener


WWW
« Reply #1 on: August 22, 2006, 04:26:15 PM »

First, that is the way to post a question, You deserve an award.  oh yeah

Okay, now you asked
Isn't the saturation voltage theoretically how much should be dropped with switched on?  Shouldn't I be getting a collector-to-emitter drop of 0.3-1.0V instead of the measured 5.87V?  That would explain in large part why the sense voltage at the LED board doesn't reach 1.25V, because the transistor is stealing all the voltage needed for the lm317 to get where it wants to go.

You have the right idea. VCE(sat) should be a few tenths of a volt most of the time.

You have your array + current driver in the collector circuit of the 2N2222, so you are relying on the transistor to conduct the current from your array to ground. I believe what's going on here is just Kirchoff's voltage law--the transistor CE junction has to drop that much voltage. It's also dissipating a lot of power, so I'd expect it to heat up rapidly and fail.

Let me think about this for a few minutes, but did you consider four LEDs in series? The cheapest fix I can think of is adding a resistor to each series LED group, designed to drop the not-quite 6 V you need.
Logged

omega
Strong like bull
*
Offline Offline

Posts: 4


« Reply #2 on: August 22, 2006, 04:44:39 PM »

First, that is the way to post a question, You deserve an award.  oh yeah

I try... Grin

Okay, now you asked
Isn't the saturation voltage theoretically how much should be dropped with switched on?  Shouldn't I be getting a collector-to-emitter drop of 0.3-1.0V instead of the measured 5.87V?  That would explain in large part why the sense voltage at the LED board doesn't reach 1.25V, because the transistor is stealing all the voltage needed for the lm317 to get where it wants to go.

You have the right idea. VCE(sat) should be a few tenths of a volt most of the time.

You have your array + current driver in the collector circuit of the 2N2222, so you are relying on the transistor to conduct the current from your array to ground. I believe what's going on here is just Kirchoff's voltage law--the transistor CE junction has to drop that much voltage. It's also dissipating a lot of power, so I'd expect it to heat up rapidly and fail.

I was hoping that the voltage regulator would get to do that job, thus giving it the chance to drop the appropriate amount of voltage in order to set the current.  Guess the transistor gets there first (so to speak)...

Let me think about this for a few minutes, but did you consider four LEDs in series? The cheapest fix I can think of is adding a resistor to each series LED group, designed to drop the not-quite 6 V you need.

For red I could do that - 2.1Vf * 4 + 1.25V(Vsense) + 1.7V(Vdropout) + 1.0V(VCE(sat,max)) = 12.35V, but for the other colors with a Vf of 3.3V, that comes to 17.15, outside my 15V supply.  I already had to bump from 12V to 15V when I switched from ballast resistors to the LM317 constant-current drive, so I don't really want to bump again (and buy yet another supply)...

Putting in MOSFETs is probably the most sane solution, because an RDSon of 0.1 ohms means a whopping 0.016V drop, letting the regulators do all the work as intended.  The two problems there are acquisition (yet another Digikey order) and pinouts (never the same order...), so that'll be a fair bit of work to do.

On another note, I've tried (mostly in vain, so far) to find an adjustable through-hole LDO that can run up to ~15V input / 10V output at 200+mA with better dropout than the LM317.  The only thing I've found that's any better is the FN1117, with a dropout of 1.1V (to the 317's 1.7V).  Anyone have any suggestions?
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #3 on: August 22, 2006, 04:53:00 PM »

ts been my experience the lm317 requires closer to 3 volts to satisfy its drop-out and overhead ... there are some LDO regulators from National which cut that number in half, I don't recall the exact number right now, but I'll toss it on here when I come across it.
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
omega
Strong like bull
*
Offline Offline

Posts: 4


« Reply #4 on: August 23, 2006, 12:47:23 AM »

Here's the problem: the voltage across the sense resistor is not 1.25V, it's only 1.08V (for red channel), implying only ~140mA.

Well, a big piece of the equation seems to be temperature.  While contemplating the rigging of a pair of RC car battery packs as a source for one of these boards on my bike over the weekend, I found some interesting numbers.

With a 1ohm 5W resistor in series between the battery and the LED+regulator set, I can watch the current drop precipitously in the first 30 seconds since power-on.  The first solid reading my cheapo Radio S*ack meter picks up is ~158.5mV/mA.  It start dropping a few mA per second for a while, then takes a dive towards 90mA and below.

Now here's the interesting part: I blow on the LED board and the current draw takes a significant jump upwards.  With a bit of huffing and puffing I can bring it back to 140-150mA...  Obviously the draw is very closely tied to the temperature of the LEDs.  Using a can of air so I don't have to stick my face into the board to cool it down, I can verify there's a definite change in brightness.  Guess I should have expected that Angry

So now the question is whether I should punt and remove one of the 15.4R resistors so that it only drives 80mA at all times and therefore doesn't have a chance to visibly dim...  Since I'm using Bit Angle Modulation to dim them, any temperature-based effects would have a non-linear effect on the resulting brightness curve, and these effects would be variable depending on the angle of the board and all the other environmental factors.

The other option would be a fan, but I don't currently have the wires for that.  Any passive heatsink would only help marginally, because the actual temperature rise is fairly small.  Holding the board vertical instead of horizontal results in a draw of ~86mA instead of ~82, so there is no convective flow to speak of.  Additional holes in the board around the LEDs would be almost irrelevant.

I'll have to see if I can repeat this test with my older boards with a different set of LEDs (these are jeledhk, the others are besthongkong).

<sigh>
Logged
justDIY
Microcontroller Madman
Administrator
Smart like tractor
*****
Offline Offline

Posts: 1652


UFOric


WWW
« Reply #5 on: August 23, 2006, 10:56:42 AM »

you might want a current limiting resistor on each leg of your parallel array, to balance the current draw, so no leg tries taking more than it's share of the current... electricity is going to take the easiest path, which will be the warmest leg of the circuit (warmer leds draw more current), this in turn, will make it an even easier path, the rest is called thermal runaway

another thing to try out, break out your breadboard, and setup a lm317 to be a constant current regulator for a single string of LEDs, no parallel arrays.   make sure that setup works with your driver circuit.   then move on, increasing the current in the regulator and adding more leds.   repeat until you reach the failure point and then backtrack, taking measurements of working versus non working.
Logged

Want to contact me directly? gmail gordonthree
My Project Blog - http://projects.dimension-x.net

Favorite numbers:
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
Pages: [1] Print 
linear1 forums  |  LED discussion  |  LED questions and discussion  |  Topic: Problem with (simple) constant-current driver and switch « previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.275 seconds with 18 queries.