View Full Version : Using CL6N to drive MightMini
budude
06-17-2010, 07:03 PM
I'm thinking of creating a board to drive six MightyMini's using the Supertex CL6N constant current device. I'm not crystal on how the thing should be configured to operate under PIC control.
Can someone smarter than me recommend a particular configuration to use? I drew up a couple configs (leaning towards #1) that I think might work but if you can suggest either or something different that would be great.
It would use a 16F688 PIC in regular Renard or Renard/DMX configurations.
n1ist
06-17-2010, 08:29 PM
I would do configuration 1, but would probably replace the transistor with a N-channel MOSFET. Config 2 has two problems - you would need a PNP transistor or P-channel MOSFET, and I am not sure how the CL6N likes having Vdd off while the LEDs are connected to Vout. I'd tie Vdd and the top of the LEDs together and switch that instead.
/mike
budude
06-17-2010, 08:46 PM
I would do configuration 1, but would probably replace the transistor with a N-channel MOSFET. Config 2 has two problems - you would need a PNP transistor or P-channel MOSFET, and I am not sure how the CL6N likes having Vdd off while the LEDs are connected to Vout. I'd tie Vdd and the top of the LEDs together and switch that instead.
/mike
Could you suggest an appropriate MOSFET to use - the current draw would be fairly small so I'm thinking a TO-92 type package or MOSFET array chip would work.
I do see the problem with Config 2 - thanks for that.
I am toying with the other suggestion of looking at the LM317 as well. It would be much cheaper (.25 each at Jameco!) - perhaps not quite the precision but probably close enough - and it would allow you to run 300mA LEDs if you wanted with just a resistor change. While at Jameco I found 4.3 ohm (291 mA +/- ~5%) and 13 ohm (96 mA +/- ~5%) resistors (1/2W) which would work well with the LM317... Perhaps a small daughterboard inside the MM? Not sure if there's enough room in the enclosures folks are using but it could be a cheap retrofit if it did...
Thanks again!
budude
06-20-2010, 10:23 AM
This is a dead end - at least from the controller end. I forgot that the MM has two runs of LEDs at 100mA for each channel, not one, so this will not work. It would also not be good to send 200mA using an LM317 since you would be relying upon the LEDs to divide the current equally between them (bad idea...).
It appears that the only other option is to put the current limiting on the MM itself. This would require eight CL6N ($$$) for each board so I don't think I'll be pursuing using those.
I did get some LM317 regulators in so I'll see how hard it will be to modify the MMs this way... It's only about $2.10 in parts so still viable.
Entropy
06-21-2010, 02:06 PM
You should be able to wire an LM317+resistor in a combination that lets you stick it into the holes of the MM that were reserved for just a resistor previously. Might need to do a little bit of fancy soldering of the current sense resistor to the LM317 part.
budude
06-21-2010, 02:11 PM
You should be able to wire an LM317+resistor in a combination that lets you stick it into the holes of the MM that were reserved for just a resistor previously. Might need to do a little bit of fancy soldering of the current sense resistor to the LM317 part.
I'll have to see if it will fit into the resistor holes as they are fairly small. Worst case, I can bundle four of them together and stuff them into the cavity under the board on either side (need eight altogether). I'll have something going by the end of the week for show 'n tell...
Dennis Cherry
06-21-2010, 04:50 PM
I have added the LM-317 + new resistor to 7 MM's for a friend.
Remove the old resistor from the board and install the LM-317 and the new resistor on the back side of the board in the resistor location's.
Solder the resistor to the LM-317 pin 1 and the heat sink tab edge (you might have to clean the surface to get solder to adhere . Cut pin 1 shorter than the input and output pins. insert the input and output pins in the resistor holes, observe polarity and make sure the input pin is on the 24 volt line side.
Take your time and do one at a time and check it is limiting current.
budude
06-21-2010, 04:55 PM
I have added the LM-317 + new resistor to 7 MM's for a friend.
Remove the old resistor from the board and install the LM-317 and the new resistor on the back side of the board in the resistor location's.
Solder the resistor to the LM-317 pin 1 and the heat sink tab edge (you might have to clean the surface to get solder to adhere . Cut pin 1 shorter than the input and output pins. insert the input and output pins in the resistor holes, observe polarity and make sure the input pin is on the 24 volt line side.
Take your time and do one at a time and check it is limiting current.
Cool - - problem solved then - thanks! I got the LM317's for .25 each so basically $2 to upgrade a MM to constant current - not bad!
mikentn
06-22-2010, 08:59 AM
Here's a pretty good web page I found about using the LM317 for a constant current source.
http://users.telenet.be/davshomepage/current-source.htm
cbell
06-22-2010, 05:20 PM
I have added the LM-317 + new resistor to 7 MM's for a friend.
Remove the old resistor from the board and install the LM-317 and the new resistor on the back side of the board in the resistor location's.
Solder the resistor to the LM-317 pin 1 and the heat sink tab edge (you might have to clean the surface to get solder to adhere . Cut pin 1 shorter than the input and output pins. insert the input and output pins in the resistor holes, observe polarity and make sure the input pin is on the 24 volt line side.
Take your time and do one at a time and check it is limiting current.
That's pretty neat and a good solution to making the MM's constant current. Do you have any pics?
Edit: Also what resistor value did you use. I get that 12.7R will give 98mA, but wanted to see what you were using.
budude
06-22-2010, 06:53 PM
I have it as follows:
With the LEDs facing down and the DC blocks to the left, the source from the blocks - or input to the LM317 (pin 3) is at the bottom set of resistor holes and the feed to the LEDs - or output from the LM317 (pin 2) is at the top. The backs of the LM317s face away from the DC blocks.
The leads are not as thick as a Triac so it fits perfectly into the holes. I plan to bend pin 1 back under the LM317, cut most of the lead off, solder a 13ohm resistor lead (also cut short) to that and the other end to the back of the LM317. I guess you could buy precision resistors and get closer but the resistors have a 5% precision so I figure I'll be at 96mA +/- 5% - close enough for me! This is great - no worries about resistor values or cable drop, temperature changes, etc...
n1ist
06-22-2010, 07:15 PM
I'd go with 1%. 10 pieces for $0.90 or 200 pieces for $4.00 - part #271-13-RC. Make sure you use a 1/4W or larger one since it will be dissipating 110 mW.
As for the regulators, Mouser is closing out on 511-LM317MT but still has 3000 in stock at 0.32 each, 0.30 for 10.
/mike
budude
06-22-2010, 07:28 PM
I'd go with 1%. 10 pieces for $0.90 or 200 pieces for $4.00 - part #271-13-RC. Make sure you use a 1/4W or larger one since it will be dissipating 110 mW.
As for the regulators, Mouser is closing out on 511-LM317MT but still has 3000 in stock at 0.32 each, 0.30 for 10.
/mike
I got my LM317s at Jameco - https://www.jameco.com/webapp/wcs/stores/servlet/Product_10001_10001_23579_-1 - .22 each (I said .25 before) since I got over a hundred of them.
I also got some 4.3ohm resistors to support 300mA LEDs (my UV, Orange and bright Whites)
plasmata
06-22-2010, 10:39 PM
I'll have something going by the end of the week for show 'n tell...
Please do! I'm interested in doing this but can't quite picture where/how the resistor fits in this equation.
budude
06-23-2010, 01:08 AM
Well - - oops... I took one of my completed MMs (except for the resistors) and installed the LM317 as I described above. When I plugged in the supply, the LEDs blinked a bit and then at least the first one blew (if not all of them in that row)... :( I double checked the connections and it looked ok to me.
@Dennis Cherry - can you describe exactly what you did for your mods (pics appreciated)? This seemed so simple... D'OH!
Dennis Cherry
06-23-2010, 11:03 AM
Well - - oops... I took one of my completed MMs (except for the resistors) and installed the LM317 as I described above. When I plugged in the supply, the LEDs blinked a bit and then at least the first one blew (if not all of them in that row)... :( I double checked the connections and it looked ok to me.
@Dennis Cherry - can you describe exactly what you did for your mods (pics appreciated)? This seemed so simple... D'OH!
Let me get one of the MM's back and take some pictures.
I used a variable power supply and a current meter (DVM) to check the LM-317 was working in the circuit. That way you can prevent destroying a LED.
BTW: You probably only blew one LED in that circuit.
budude
06-23-2010, 07:25 PM
Please do! I'm interested in doing this but can't quite picture where/how the resistor fits in this equation.
If you look through the LM317 datasheet there is a description for a constant current source circuit (be careful there - some diagrams have the correct pin names but wrong pin numbers!). The LM317 is normally an adjustable voltage regulator so this is exploiting a feature in it. Basically, you place a resistor across the output and the Adjust input. The LM317 keeps a steady 1.25v supply across this so you end up with 1.25V / R to set the current. With a 13 ohm resistor, you get 1.25 / 13 or ~96mA (depending on resistor tolerance) and we're shooting for 100mA for the MM so it's pretty close.
I honestly can not figure out where I went wrong - maybe it's time to get a decent lab supply for future experiments so I can limit the current from it as well... I certainly don't want to blow up any more LEDs (they are not fun to remove from the MM).
(btw - - GO TEAM USA WOO-HOO!) :p
Dennis Cherry
06-23-2010, 09:03 PM
If you look through the LM317 datasheet there is a description for a constant current source circuit (be careful there - some diagrams have the correct pin names but wrong pin numbers!). The LM317 is normally an adjustable voltage regulator so this is exploiting a feature in it. Basically, you place a resistor across the output and the Adjust input. The LM317 keeps a steady 1.25v supply across this so you end up with 1.25V / R to set the current. With a 13 ohm resistor, you get 1.25 / 13 or ~96mA (depending on resistor tolerance) and we're shooting for 100mA for the MM so it's pretty close.
I honestly can not figure out where I went wrong - maybe it's time to get a decent lab supply for future experiments so I can limit the current from it as well... I certainly don't want to blow up any more LEDs (they are not fun to remove from the MM).
(btw - - GO TEAM USA WOO-HOO!) :p
Very true about replacing LED's, the MM's I converted had many blown LED's, Had to purchase another Kit of LED's to fix the 7 MM's.
plasmata
06-23-2010, 09:31 PM
Well - - oops... I took one of my completed MMs (except for the resistors) and installed the LM317 as I described above. When I plugged in the supply, the LEDs blinked a bit and then at least the first one blew (if not all of them in that row)...
I DON'T want to do THIS! ;)
budude
06-24-2010, 03:10 AM
OK - I get the "Idiot of the Day" award... :mad: I had the LEDs connected to pin 2 (Output) instead of pin 1 (Adjust). The output from pin 2 needs to feed through the resistor and then to the LEDs (which also connects to pin 1).
I breadboarded out a circuit using eight cheapo 20mA LEDs left over from my LEDTriks build and promptly let the smoke out of all them immediately. That is when I took a second look at what I was doing and had a 'V8' moment there and slapped myself in the forehead. After rearranging it correctly (resistor is 65 ohms for these LEDs) the circuit works perfectly fine. uh Duh... ok - - well at least I learned something...
So - the way to do it is to cut pin 2 (output) completely off, neatly tack a resistor to the top of pin 1 (adjust) and tack the other end to the heat sink back (which is connected to pin 2). Then take the LM317 (with 2 legs now) and shape pins 1 and 3 closer together to fit into the existing resistor holes. Pin 3 (input) goes into the bottom hole nearest the mounting holes (from the voltage source), while pin 1 (adjust) goes to the top hole (which goes to the LEDs). I like the idea of cutting off pin 2 instead of bending it out of the way so that it won't short to the other 2 pins when you bend them in.
OK - so now - a moment of silence for the eight Red MM LEDs that gave their life for the cause... :rolleyes: I'll post some pix when I get things rebuilt...
Edit - - hmm - - so I hooked a corrected setup to the same MM and initially it worked great - LEDs nice and bright, current at the correct level. That's when the magic smoke started come out of the LM317 (still running though...). It got to approximately the surface of the sun hot when I pulled the plug. OK - - so what now...? Is the drop across it too much for it (esp with Red)? I'm not so convinced this can work at this point...
LabRat
06-24-2010, 07:49 AM
I pushed a link to a discussion about the merits of this approach (Using an LM317 as a constant current regulator) in the other thread where you corrected my mistake about the capabilities of the MM leds in the group buy.
I'm posting it here again, in case you didn't see it. It remarks that the LM317, when used in this mode, are "horribly inefficient" and you have to drive the entire circuit at almost 200% the desired Wattage.
Offsite Webpage (http://projects.dimension-x.net/archives/66)
mikentn
06-24-2010, 08:28 AM
I pushed a link to a discussion about the merits of this approach (Using an LM317 as a constant current regulator) in the other thread where you corrected my mistake about the capabilities of the MM leds in the group buy.
I'm posting it here again, in case you didn't see it. It remarks that the LM317, when used in this mode, are "horribly inefficient" and you have to drive the entire circuit at almost 200% the desired Wattage.
Offsite Webpage (http://projects.dimension-x.net/archives/66)
Labrat, did you read the comments that were posted about the blog? A poster named Ian disputes the efficiency calculations regarding the LM317 circuit.
n1ist
06-24-2010, 08:51 AM
The power dissipated by the regulator depends on the voltage drop across it and current flow, That's why you want your supply voltage to be really close to the LED voltage plus the regulator's dropout voltage. In the case of the 317, you need at least 3v for the regulator, and 1.2v across the resistor. If you have a higher supply voltage, the rest gets dumped as heat.
Of course a switcher would be more efficient, but it won't be implemented with two parts.
/mike
LabRat
06-24-2010, 10:23 AM
Labrat, did you read the comments that were posted about the blog? A poster named Ian disputes the efficiency calculations regarding the LM317 circuit.
No.. I didn't. :(
(Mea culpa... My bad)
P. Short
06-24-2010, 11:14 AM
The efficiency of the constant current solution (or of any linear approach) is the sum of the LED voltages divided by the power supply voltage. So if you have 6 LEDs with forward voltage drops of 3.2V each (at the indicated current) and a 24V supply, the efficiency is going to be 19.2V/24V = 80%. This does not depend on what technique you are using to set the current (resistor or LM317 constant current or some other constant current method).
The benefit of using a constant current source is that the LED current (and hence brightness) will not vary as much as the power supply varies or as the diode Vf varies (from diode to diode, batch to batch, color to color). Also, you can just plop it in without making any calculations or measurements, and you don't have to worry about making calculation mistakes (lol).
In many cases I think that the use of constant current sources for controlling LEDs may be over-kill. The power supplies are usually regulated to within +/-5% or better. The diode-diode variation may result in a +/- 10% variation in voltage across the dropping element in the worst case. In the previous example a +/-0.1V variation of Vf would cause the voltage across the current limit resistor to vary by +/-0.6V, or +/-12%). I don't think that you would notice this variation in brightness so long as it is not occurring rapidly with time (and I don't think that Vf varies significantly in one second).
So for this hobby I would recommend using just a resistor unless the constant current source doesn't cost you anything.
budude
06-24-2010, 11:49 AM
My concern is that I've read several posts about LEDs blowing left and right on their MMs - hence my quest to use a constant current source. It also takes care of differences in cable drops between multiple units. Further, the cost is only about $2 per MM which is nothing so I still think this is the way to go over using a resistor (assuming it can actually work).
So - back to the issue at hand... The Red LEDs are about 2v Vf so that's about a 16v drop leaving 8 - 4.25 or ~3.75v across the regulator to dump - is this too much?. I expected a little bit of heat but not nuclear hot... The only thing I can think of trying would be to drop voltage into the DC block with a few diodes but this would be verging on the point where it's getting too messy...
Entropy
06-24-2010, 11:59 AM
3.75 volts at 100 mA means the regulator will be dissipating 400 mW.
Not sure if an LM317 can handle that much dissipation w/o a heatsink.
(This is why the MM used, if I recall correctly, 1W or 2W resistors.)
3.75v drop seems awfully low for the red channel, or did the MM have extra reds to increase total Vf? I forget, my MMs are at home and unpopulated so far. (Edit: Looked it up, yeah, more reds in the MM.)
Still, 24v -16v = 8 volts or so if the red LEDs are at the low end of the Vf range, so 6.8 volts drop = 680 mW.
Edit: Where are you getting that 4.25 - it's about 1.2-1.25 for the resistor, the rest is dropped by the regulator. It just happens that the minimum drop to maintain regulation is something like 3 volts.
budude
06-24-2010, 12:32 PM
Edit: Where are you getting that 4.25 - it's about 1.2-1.25 for the resistor, the rest is dropped by the regulator. It just happens that the minimum drop to maintain regulation is something like 3 volts.
I was looking at the excess voltage - 3v for regulation and 1.25 across the resistor and then whatever is left would be the excess - does that sound correct? I'm looking at the best case voltage into the regulator so the thing doesn't burn up...
P. Short
06-24-2010, 12:57 PM
Of the 24V, 16 is across the LEDs. The remaining 8V is across the LM317 and the resistor. Of that 8V, 6.8V is across the LM317. It doesn't matter if some of that 6.8V is needed by the LM317 to maintain regulation, that voltage is still across the part. So the power dissipated by the LM317 is 0.68W in this worst case. Assuming that you are using a TO220 part, it should survive without a heatsink, although it will be too hot to touch.
n1ist
06-24-2010, 01:07 PM
I think the problem with using just resistors is that we are operating right at the max current spec for the LEDs, and using bargain-basement LEDs whose part-to-part Vf matching is not the best. Sure, if you calculate the resistors for each particular set of LEDs, and the temperature doesn't change too much, you will probably be fine.
/mike
P. Short
06-24-2010, 02:12 PM
n1ist,
I think that it is probably more than that. The parts shouldn't die (at least not right away) if their current is just a little bit over the spec. What I would expect is that there would be a slightly increased mortality, especially over time, but not right away.
My take is that the bargain-basement parts are production-line rejects that someone has managed to acquire. This means that they do not meet the production-line spec, or are expected to fail soon. In any case, there is something seriously wrong if they fail so soon or under such light stress. And, of course, the people selling them could just as easily be standing behind the counter at McDonalds or Sears, except that they have a few contacts in Asia.
budude
06-24-2010, 02:18 PM
Yep - agreed, the regulator will see ~8v across it - but again what I am looking at is cutting off the excess so the darn thing doesn't start smoking (and yes it did have a "magic" quality about it!). If I can drop ~4v or so using 5-6 diodes it may work (but look very ugly). I got a stack of 1N4004s for .04 each so I'll give that a try. A heatsink is probably not an option since you have to stuff eight of the regulators onto the board AND get them and the wiring into the casing... The problem won't be as bad for the Blue/Green/White LEDs - I may try one of those tonight with the circuit as-is and see what happens.
David_AVD
06-24-2010, 05:38 PM
My concern is that I've read several posts about LEDs blowing left and right on their MMs - hence my quest to use a constant current source.
There's no rocket science here. Reputable LEDs driven within their rating will last longer than your display. Cheap LEDs, or LEDs driven over their limits will almost definitely fail early - some very early.
I can understand that some people want the most hardware for the least price, but buying cheap LEDs and driving them hard is bound to end badly.
aussiephil
06-25-2010, 07:21 AM
I think the problem with using just resistors is that we are operating right at the max current spec for the LEDs, and using bargain-basement LEDs whose part-to-part Vf matching is not the best. Sure, if you calculate the resistors for each particular set of LEDs, and the temperature doesn't change too much, you will probably be fine.
/mike
Only if like most you don't measure what you actually need............
properly measured values would have you operating in the safe region of the Leds regardless of bargain basement or not.......
P. Short
06-25-2010, 10:58 AM
Only if like most you don't measure what you actually need............
properly measured values would have you operating in the safe region of the Leds regardless of bargain basement or not.......
This assumes that the bargain-basement LEDs meet spec. My (somewhat cynical) take on this is that many of the b-b LEDs are factory rejects that somehow or other made their way onto the market.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.