Electronic – Which OR Gate to use

logic-gates

I am creating a circuit that will light an LED when either signal A or signal B is high. I know of three choices to accomplish this: a diode based OR Gate, a transistor based OR Gate, or an OR gate IC (Schematics below). Aside from minimizing cost and part lists, what are the pros and cons of each?

Edit 1:
Full disclosure. I am recreating the Adafruit Powerboost 500c Circuit, but I want to reduce the LED's I need down to one. It has four LED's to represent the following signals, next to which I put the desired behavior for my circuit:

BLUE – Power (I don't care about this signal)
RED – Low Battery – The LED should be lit when the battery is Low.
ORANGE – Charging – The LED should be lit when the battery is charging.
GREEN – Fully Charged – The LED should be unlit when the battery is charged.

I am removing the BLUE LED and R5. I am removing the GREEN LED and R7. I want to light a single LED if either the input to the RED LED or the input to the ORANGE LED is high. I wasn't sure if just hooking both inputs to an LED without other circuitry was a good idea so I googled "OR Gate circuit" and discovered three possibilities: a Diode OR Gate, a transistor OR Gate, and an OR Gate IC. If any of these is the best choice, which is it and why? If none is best, then what is? I would like to reduce costs if possible.

enter image description here

Best Answer

I would say: none of the above.

Let's take them one at a time.

The first one you are assuming enough current from your logic outputs to drive the LED. You also need to take into account the voltage drop from the diodes. With silicon diodes that can be as high as 0.7V. It would work, and you don't need the 10KΩ resistor as it serves no purpose at all.

The second one the transistors are in the wrong place. They should be below the LED, not above it. The voltage to switch on is relative to the emitter, and with the LED and resistor in that path you're offsetting that voltage a lot. You should have the emitter to ground and the LED on the collectors. See my circuit below.

The third one I actually have no problem with, and if you want to use a chip then that's fine. Be sure to choose one that can source enough current to drive the LED.

The discrete component option I would use would be to use a pair of NPN transistors:

schematic

simulate this circuit – Schematic created using CircuitLab

With that arrangement the inputs aren't inverted (either HIGH turns a transistor on), and Vcc can be any voltage you like (with the right resistor and suitable transistors of course). The LED can draw as much current it needs to and isn't limited to just what the logic outputs can provide.


By the way, the layout of your circuits is not easy to follow. Especially the habit you seem to have of letting your ground points stick out at all angles. A good schematic has:

  1. Inputs to left
  2. Outputs to right
  3. +ve voltages to the top
  4. Ground to the bottom
  5. (If you have them) -ve voltages right down the very bottom.