Driving one LED with two lines - Page 1
Forum section: electronics / projects

author: Northy
author_rank: Regular Contributor
timestamp: September 14, 2020, 09:16:12 pm
content: Hi,I'm working on a problem that is baffling me quite a bit, sounds simple, but it's not - or maybe I am?I have two signal lines coming from an external board.I want to light one single LED if either or both of them go low.Most things I've mocked up so far don't workHow would you do it?I have a 12V rail available.The signal lines are 4.6V high.0V low.Thanks,G

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2020, 09:36:53 pm
content: 'Lighting' aresistoris not recommended. It will get all hot and bothered, and either desolder itself, set your board on fire or let its magic smoke out and fail.OTOH lighting a single LED from two active low logic signals is simple *IF* they can each sink enough current to light the LED, and you have the logic Vcc rail available. Simply use two diodes (or one dual common anode diode e.g. BAT54A) to wire-OR the signals together and connect the LED + series resistor between logic Vcc and the junction of the two diode anodes.

author: Northy
author_rank: Regular Contributor
timestamp: September 14, 2020, 09:50:14 pm
content: Thanks Ian, it's too late, I've edited it now.I had thought of that solution, but I'm not sure if I can sink current into the line. I have no circuit details of that PCB, I'll have to find out if I can, but I might not be able to.One other thing I forgot is there's no intelligence on the board, all analogue, otherwise the micro could just sort it all out!Thanks,G

author: drussell
author_rank: Super Contributor
timestamp: September 14, 2020, 10:15:15 pm
content: Quote from: Northy on September 14, 2020, 09:50:14 pmHow are you mocking this up if you don't have access to the board?If it works fine with individual LEDs on each line, you should be able to just add a series diode on each of the two lines coming from the external board, as suggested above since you have more than enough voltage headroom for the LED's VFdrop and the additional series "isolating" diode VFdrop.Do you haveanyidea what the circuitry is that these signals are coming from? That is rather important if you think you may not be able to sink any current in the "low" state, but I think that would be rather unusual in most cases.

author: Ian.M
author_rank: Super Contributor
timestamp: September 14, 2020, 10:32:06 pm
content: Quote from: Northy on September 14, 2020, 09:50:14 pmAhhh.... you've spoiled my funQuote from: Northy on September 14, 2020, 09:50:14 pmIf you *REALLY* cant draw significant current from the signals and don't have a 5V rail available, the best option is probably a high output current open collector dual comparator like theLM319to buffer the signals. Power it from +12V and bias both its inverting inputs at about 2.5V with a single 10K : 2K7 potential divider from +12V, to set its threshold voltage to something compatible with your signals. Connect the signals to its non-inverting inputs, and as its got open collector outputs, you can wire-OR them together without needing any diodes, and simply connect the LED + its series resistor betwen the +12V supply and its (paralleled) outputs.

author: phil from seattle
author_rank: Super Contributor
timestamp: September 15, 2020, 02:28:07 am
content: Use a 74LVC1G32. 2 input or gate. 24 mA drive capability. Works at 3.3 or 5V. No other components needed other than the resistor for the LED. Takes up a tiny amount of board space. I've used it in a number of projects.

author: drussell
author_rank: Super Contributor
timestamp: September 15, 2020, 09:37:10 am
content: Yeah, a comparator would work, and the OR-gate idea would also work, but you'll need to have a 3.3V or 5V rail (well, something under 6.5V) available to power a 74LVC1G32 OR-gate with, which due to the OP's wording might require the addition of a regulator on his external board, as they state that "I have a 12V rail available," but I'm not sure if that meansonlythe 12V rail available.Obviously adding a regulator shouldn't be difficult, but if you can sink at least a small current, just not sufficient to properly drive the LEDs, you also might be able to use something like 4000-series CMOS (say, a 4071) running directly on the 12V, but then the caveat becomes that you may possibly still need series diodes and add high-value pull-up resistors to make the OR-gate inputs actually see high, and then you're getting more complex than just putting a regulator on there.Of course, just like most things in electronics, there are usually several completely "valid" ways of doing things, which one happens to be the easiest or "best" in a given situation depends on a number of factors and variables depending on the precise situation.

author: phil from seattle
author_rank: Super Contributor
timestamp: September 15, 2020, 05:19:47 pm
content: Quote from: drussell on September 15, 2020, 09:37:10 amYes, I'm surprised there hasn't been a microcontroller solution presented...In general, it's a bad idea to use a signal to drive a load, even a small one, if there is no documentation or way to determine the signal's sink/source capability.

author: drussell
author_rank: Super Contributor
timestamp: September 15, 2020, 06:08:10 pm
content: Quote from: phil from seattle on September 15, 2020, 05:19:47 pmLol, yeah... One of a plethora of options...These days it seems to always be "of course, you could just use a Paduk or something too!"(Why these days people seem to always insist on using a microcontroller when a couple diodes, or maybe a couple diodes and a transistor or two and a couple of resistors would almost certainly suffice, I don't know.)I guess I'm just "old school". Arrrrr.... Back inmyday, we had to walk two miles, barefoot, in the snow, uphillboth waysto get to the Electron Hut to buy our diodes.... Arrrrr.... They came in these little metal or glass dome bubbles labelled things like 6H6.... Arrrrr....QuoteIndeed. Without knowing what is driving those signals, and whatelsemight be connected to them in the "other" device, it's best to use them just as signals, not even driving something "small" like an LED... That's why I'm surprised the OP doesn't seem to have any idea what is actually at the other end.

author: phil from seattle
author_rank: Super Contributor
timestamp: September 15, 2020, 06:51:20 pm
content: I actually like microcontroller solutions if it's just my project. If I'm making a board for others to build or one I would manufacture to sell, a uC raises the complexity bar. The uC better add significant value to compensate for the added complexity and additional board space for the programming header.

author: Northy
author_rank: Regular Contributor
timestamp: September 16, 2020, 09:47:21 am
content: Thank you all for your responses, I've been reading them but not replied until now due to feeling a little under the weather.Some interesting ideas, it got my brain thinking.I've come up with a circuit that seems to work using a dual fet and a dual diode that are already in our library that seems to work.Thanks,G