Driving 6 LEDs - Page 1
Forum section: electronics / projects

author: kcs
author_rank: Regular Contributor
timestamp: October 29, 2014, 05:46:58 am
content: I want to drive 6 LEDs using MSP430. I will control their brightness with PWM. One of these LEDs is bi-polar.All LEDs have Vf=2V4@20mA and I want to be able to drive them at max brightness. I also want to be able to set 3 states for bi-polar LED: 1st LED on, 2nd LED on and both LEDs off.1. My selected mcu cannot sink/source 20mA per pin, so I need a driver. Is ULN2004D1013TR a good choice? I am also considering using transistor arrays with integrated resistors (something like MUN5215DW1T1G).2. What is the best way to drive a bi-polar LED? I guess one option is to use a H-Bridge driver (something like ZXMHC3A01T8TA), but I have a feeling it is a bit of an overkill.I have very little space on my board, so I am looking for the small size SMD components like TSSOP, SO (small yet still solderable at home) etc. I also want to have as little discrete components as possible, so I give a preference to single-chip solutions.

author: dannyf
author_rank: Super Contributor
timestamp: October 29, 2014, 09:15:24 am
content: QuoteThe answer depends on how you define "best".One solution, since you have two unused pins, is to tie the led's two pins to those unused pins and from there to Vcc via two resistors. Outputting a high on one pin and low on the other turning on the led. It does have the downside of higher current consumption.

author: kcs
author_rank: Regular Contributor
timestamp: October 29, 2014, 09:49:23 am
content: Quote from: dannyf on October 29, 2014, 09:15:24 amThen I will rephrase this question. Given my listed constraints, how would you choose to drive that bi-polar LED?If I understand you correctly, your suggested method will increase power consumption substantially (3.3/47=70mA). That is not desirable.

author: bktemp
author_rank: Super Contributor
timestamp: October 29, 2014, 10:05:53 am
content: You always need some kind of push-pull driver for a bipolar LED. Maybe some logic gates. 2 in parallel should be able to drive 20mA.The best solution would be: Use a different LED. There are many dual colour LEDs with seperate anode/cathode connections.

author: dannyf
author_rank: Super Contributor
timestamp: October 29, 2014, 11:03:32 am
content: QuoteWell, you didn't list current consumption as a constraint; and we do many undesirable things every day. Life is tough.Having said that, another alternative is to use two such leds, in opposite directions.Beats out other more undesirable alternatives,

author: kcs
author_rank: Regular Contributor
timestamp: October 30, 2014, 03:26:09 am
content: I have not said that explicitly, but those LEDs are already within a product, I cannot change them.

author: HalfSpace
author_rank: Regular Contributor
timestamp: October 31, 2014, 09:14:39 pm
content: Hi kcs,You could try a PI74FCT3244 it has eight 3.3V tri-state drivers @ 24mA (source & sink) and is available in TSSOP.http://www.pericom.com/assets/Datasheets/PI74FCT3244.pdfHalfSpace

author: dannyf
author_rank: Super Contributor
timestamp: October 31, 2014, 09:34:43 pm
content: QuoteIf you put sufficient constraints on a problem, you will always get to a point of no solution.

author: Paul Price
author_rank: Super Contributor
timestamp: November 01, 2014, 02:36:02 am
content: Ummmm, maybe this?Use 470 ohm pullup resistors to 3V3 at Out3 Out5 pins of ULN2004Transistors can be any general purpose tiny PNP/NPN S0T23 size 3-pin surface mount instead of those shown here.When Out3 is hi Out5 is low or else both on(for both LEDS off) or else Out3 lo while Out5 hi.

author: HalfSpace
author_rank: Regular Contributor
timestamp: November 02, 2014, 12:31:37 am
content: Hi kcs,The circuit below using a PI74FCT3244 may be suitable.HalfSpace

author: NiHaoMike
author_rank: Super Contributor
timestamp: November 02, 2014, 02:04:01 am
content: If current draw is critical and the driver is open collector/open drain, you can use cross connected P channel signal MOSFETs or PNPs (plus base resistors) to connect the pullup to the opposite side when one of the pins go low.

author: kcs
author_rank: Regular Contributor
timestamp: December 01, 2014, 08:44:13 am
content: HalfSpace, it is (almost) impossible to buy PI74FCT3244 in small quantities from main distributors like DigiKey, Mouser, Farnell and alike. It is just not available. However, even if it was, it will not be able to drive 20mA LED at its full power, because voltage drop will be too big at 20mA.I would really like to use buffer in my case, as it would be the easiest solution. I have looked quite thoroughly for any other octal buffer that could be able to drive my specified LEDs, but I could not find any. Voltage drops are just too big when 20mA @3V3 is considered.Btw, ULN2004 is not going to work in my application as well (voltage drop is 1V). I wonder how nobody has pointed out this obvious mistake I made.So, I am back to square one

author: Zero999
author_rank: Super Contributor
timestamp: December 01, 2014, 12:51:07 pm
content: The 74AC04 should be able to provide enough current with the series resistors values lower than expected and perhaps with no series resistors for the bipolar LED.

author: SL4P
author_rank: Super Contributor
timestamp: December 01, 2014, 09:20:49 pm
content: Keep in mind that if you ever want the 'both-on' color from the bi-polar LED- then you want to look at how you can PWM/invert the driven states to get a 50/50 reverse-cycle effecte.g. R/G = Orangey-Yellow.It can be useful for sealed box debugging if there aren't enough LEDs