Author Topic: Driving one LED with two lines  (Read 1278 times)

0 Members and 1 Guest are viewing this topic.

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Driving one LED with two lines
« on: September 14, 2020, 09:16:12 pm »
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 work  |O
How would you do it?

I have a 12V rail available.
The signal lines are 4.6V high.
0V low.

Thanks,

G



« Last Edit: September 14, 2020, 09:47:31 pm by Northy »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Driving one LED with two lines
« Reply #1 on: September 14, 2020, 09:36:53 pm »
'Lighting' a resistor is 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.
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Driving one LED with two lines
« Reply #2 on: September 14, 2020, 09:50:14 pm »
Thanks Ian, it's too late, I've edited it now.  :palm:

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
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Driving one LED with two lines
« Reply #3 on: September 14, 2020, 10:15:15 pm »
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.

How 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 VF drop and the additional series "isolating" diode VF drop.

Do you have any idea 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.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Driving one LED with two lines
« Reply #4 on: September 14, 2020, 10:32:06 pm »
Thanks Ian, it's too late, I've edited it now.  :palm:
Ahhh.... you've spoiled my fun ;)
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!

If 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 the LM319 to 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.
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Driving one LED with two lines
« Reply #5 on: September 15, 2020, 02:28:07 am »
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.
« Last Edit: September 15, 2020, 02:39:35 am by phil from seattle »
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Driving one LED with two lines
« Reply #6 on: September 15, 2020, 09:37:10 am »
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 means only the 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.  :)
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Driving one LED with two lines
« Reply #7 on: September 15, 2020, 05:19:47 pm »
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.  :)

Yes, 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. 
 

Offline drussell

  • Super Contributor
  • ***
  • Posts: 1855
  • Country: ca
  • Hardcore Geek
Re: Driving one LED with two lines
« Reply #8 on: September 15, 2020, 06:08:10 pm »
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.  :)

Yes, I'm surprised there hasn't been a microcontroller solution presented...

Lol, 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 in my day, we had to walk two miles, barefoot, in the snow, uphill both ways to 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....    ;)

Quote
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.

Indeed.  Without knowing what is driving those signals, and what else might 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.   :popcorn:
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Driving one LED with two lines
« Reply #9 on: September 15, 2020, 06:51:20 pm »
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.
 

Offline NorthyTopic starter

  • Regular Contributor
  • *
  • Posts: 217
  • Country: england
Re: Driving one LED with two lines
« Reply #10 on: September 16, 2020, 09:47:21 am »
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
 

Offline S. Petrukhin

  • Super Contributor
  • ***
  • Posts: 1140
  • Country: ru
Re: Driving one LED with two lines
« Reply #11 on: September 19, 2020, 04:56:21 pm »
 :-/O
And sorry for my English.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf