Advice on LED project - Page 1
Forum section: electronics / projects

author: steaky1212
author_rank: Regular Contributor
timestamp: April 17, 2013, 06:22:57 pm
content: Hi,I'm looking to create essentially a flashing LED project, but I'm stuck on a few of the details.The plan is to create a childrens light feature with multiple LEDs.I'm stuck on the drive circuitry though, as I cant decide which is "better".I'm going to drive it all from a PIC24, with total current sink/source of 250mA, which gives ~10mA for each LED assuming I drive every LED directly from the port pin. This would make the LEDs relatively dim, but it would still be lit. Obviously, if I dont use a series resistor, then I can control the brightness using PWM and drive the occasional LED above the 10mA limit.Another advantage is this allows me to connect both legs of the LED to my PIC and reverse bias the LED - allowing me to make the feature more interactive.The flip side is using the port pin to drive a mosfet, and power the LED that way. Now I can run them brighter (up to the limit of my power supply), but I lose the interactivity. This also means needing a mosfet and 2 resistors (each taking up space). I know there are some IC's with integrated current limiting and bias resistors, but I cant remember the part number.I know engineering is all about compromise, but I cant decide what is more important - brightness vs interactivity.Maybe it comes down to a lack of interactivity wont "break" the project, whereas a lack of brightness will....What do you guys reckon?Steaky

author: MrsR
author_rank: Regular Contributor
timestamp: April 17, 2013, 06:57:51 pm
content: Why not use a 555 timer driving a Transistor you can run it Monostable or Astable for faster on off.Just an idea on the KISS principal.HAVE FUNRachael

author: steaky1212
author_rank: Regular Contributor
timestamp: April 17, 2013, 07:25:02 pm
content: Rachael,Thanks for the reply. The project is going to have additional features that require a microcontroller, and I'm planning on about 20 LEDs, with different brightnesses and flash rates. I've done 555 circuits before, and sometimes a uC is the best tool.Also, bipolar transistors waste a fair bit more energy than a mosfet.Steaky

author: kxenos
author_rank: Frequent Contributor
timestamp: April 17, 2013, 07:37:35 pm
content: PCA9551/2 from NXP might suit your needs (I2C, 8 or 16 LED drivers). Also there are generic load drivers like ULN2003/4 for parallel connection.

author: croberts
author_rank: Regular Contributor
timestamp: April 17, 2013, 07:42:25 pm
content: There are high brightness LEDs available that will operate at 2mA and still produce high brightness (example Digi-Key 160-1851-ND). I think you would be wise to keep a series resistor for each LED and drive directly from the PIC pins. I don't see the advantage of connecting each LED to two PIC pins.

author: Jeff1946
author_rank: Regular Contributor
timestamp: April 17, 2013, 08:39:49 pm
content: New high efficiency LEDs are quite bright driven at 10ma, it hurts to stare at them a few feet (a meter) away. I have used ones from Cree. For example Mouser part # 941-C503BRCNCW0Z0AA2. They come in red, green, blue, warm and cool white.

author: Corporate666
author_rank: Unknown
timestamp: April 18, 2013, 02:27:37 am
content: What are you trying to achieve by reverse biasing the LED? Are you thinking to have to different colors connected in opposite directions so you can change color by reversing? I would not do it that way - you would need two pins anyway, so you'd be better off just driving each LED from it's own pin. How many LED's are you trying to drive in total?I also would never consider driving the LED's without series resistors and using PWM to control brightness... you will potentially get huge currents depending on the difference between your micro voltage level and the LED. Not to mention you will get potentially big differences in current due to variations in LED forward voltage.I would maybe check out the ST Micro STP08C line of chips. It's a shift register with built in constant current drivers on each pin, and you set the current with a single resistor. Then with just 3 or 4 pins, you can control all the LED's - and you can string the chips together for almost unlimited numbers of LED's.If that is not something you want to do, I would at the very least use a regulator to provide a power rail and use a N-FET and series resistor on each LED... if component count is a problem, you can look at resistor networks and chips that contain multiple FET's in a single package.Can you give more detail about the number of LED's you're using and what size and power constraints you have?

author: MacAttak
author_rank: Unknown
timestamp: April 18, 2013, 05:01:04 am
content: I assume the OP is interested in reverse-biasing the LED's because they act as a photodiode that way, do they not? I infer that because he mentions "interactivity" with the project.

author: steaky1212
author_rank: Regular Contributor
timestamp: April 18, 2013, 07:40:27 am
content: Kxenos,Thanks for the suggestion of an LED driver chip. I think this would fall under a similar method as using discrete MOSFETs.Jeff1946 and croberts,Thanks for part numbers on LEDs, I was worried that 10mA wouldnt be enough to get brightness, but clearly LED technology doesnt stand still.Corporate666 and MacAttack,The reverse bias LED would indeed be used to act as a photodiode (at least that would be the idea).My main concern is that driving an LED at 10mA would not be bright enough, but that doesnt seem to be the case.Given that, it would seem that the "best" solution is to drive the LED directly. I'll stick some series resistance in, but lower than recommended, so I can over-drive the LEDs for a limited amount of time.

author: Corporate666
author_rank: Unknown
timestamp: April 18, 2013, 07:43:56 am
content: LED output is not linear with current... so you don't get twice the light with twice the current. Also, the eye response is not linear as well, so even if you did get twice the lumens, it would not look twice as bright. In other words, yes, you are correct - the difference between 10mA and 20mA won't be very much at all.Did you check the datasheet about reverse biasing the LED? Many of the LED's I've been working with lately have specifically warned against this - not sure why... but I also work almost exclusively with high power LED's.Good luck with the project!

author: ddavidebor
author_rank: Super Contributor
timestamp: April 18, 2013, 08:58:45 am
content: I disagree, I'm pretty sure is linear with current.

author: BravoV
author_rank: Super Contributor
timestamp: April 18, 2013, 09:26:39 am
content: Quote from: ddavidebor on April 18, 2013, 08:58:45 amGo google for any led datasheet, and read it before making such claim.

author: ddavidebor
author_rank: Super Contributor
timestamp: April 18, 2013, 09:35:28 am
content: I've wrote "led dataheet" on google...http://www.hebeiltd.com.cn/led.datasheet/530xW8C.pdfLooks like i was right

author: BravoV
author_rank: Super Contributor
timestamp: April 18, 2013, 09:52:15 am
content: Quote from: ddavidebor on April 18, 2013, 09:35:28 amLol ... nope, still fail.If you've played with enough different types of LEDs or at least reading led datasheets (plural) from different "reputable" led manufacturers, you will know why.I will leave this riddle for you to answer it your self, great opportunity for learning and gaining more knowledge about led.

author: ddavidebor
author_rank: Super Contributor
timestamp: April 18, 2013, 10:13:01 am
content: Yeah, led with plastic that modify the light aren't linear and bla bla bla and modern leds don't respect that principle perfectly and bla bla blaBut still, you can't beat the phisycs... Electrons are linear with current and light is linear with electrons...

author: BravoV
author_rank: Super Contributor
timestamp: April 18, 2013, 10:24:55 am
content: Quote from: ddavidebor on April 18, 2013, 10:13:01 amYour point is ?Never mind ... our discussion is going no where and just hopeless.

author: ddavidebor
author_rank: Super Contributor
timestamp: April 18, 2013, 11:37:48 am
content: Well, we was going to do a nice and tecnical discussion about led before you arrived.

author: Corporate666
author_rank: Unknown
timestamp: April 18, 2013, 03:38:42 pm
content: Quote from: ddavidebor on April 18, 2013, 09:35:28 amYou're correct that in an ideal world, or with a 100% efficient LED, electrons in would equal photons out... but as is so often the case in electronics, we don't operate in the ideal - heat and inefficiency is always an issue. Sometimes these factors can be ignored, sometimes not.In the datasheet of the LED you posted, it has a maximum forward current of 30mA. On the last page you can see the current vs. intensity graph... it's pretty close to linear up to 20mA, but from 20 to 30mA it starts to flatten out. Also, if you zoom in a lot, you can see that the line doesn't actually hit the 25%, 50% and 75% horizontal lines at 5, 10 and 15mA... it's above them - because the graph is normalized for 20mA. In other words, it's close enough to linear to appear so when zoomed out on this LED - but even on this pretty linear LED, you can see the deviation when you zoom in. As the previous poster mentioned, it's also from a Chinese companyI already take LED datasheets with a grain of salt after the Lumileds ratings fiasco from some years back - and Chinese companies' datasheets get extra skepticism as a matter of courseThe LED datasheet you posted is actually pretty close to linear as far as LED's go though. When I type in "LED Datasheet" to Google, the first result is this onehttp://www.promelec.ru/pdf/204-15UTC-S400-X9.pdf- it illustrates the difference between current and intensity better. There is always going to be some heating of the LED die which will reduce efficiency. That's why when you read Cree's latest press release that they have a million lumens per watt from their new Unobtanium LED, you get excited... then you see that it's only at 100mA forward current for an LED with a max forward current of 20 amps, and you wish the current/intensity curve really was linear

author: ddavidebor
author_rank: Super Contributor
timestamp: April 18, 2013, 03:50:11 pm
content: 100% agree

author: steaky1212
author_rank: Regular Contributor
timestamp: April 19, 2013, 03:22:18 pm
content: Thanks everyone for all the assistance.I've decided that I'm better off just buying samples of prospective LED's and seeing what the brightness is when driven at the lower current. If its "bright enough", then I'll go the direct microcontroller pin route and get the added benefit of photodiode behaviour.If its too dim, I'll lose that cool feature, and drive it with a mosfet or driver chip.