PAGE 073 OF 150 · DRIVING WITH SWITCHES & TRANSISTORS
Using a Logic Gate to Light an LED
Gate outputs can drive small LEDs directly.
LED SYMBOLTriangle points from anode to cathode; the arrows show light leaving the part.
Logic outputs can light an LED
A simple gate such as the 74HC04 inverter can light an LED directly through a resistor, provided the current stays at the datasheet limit, usually only a few milliamps.
Examples
- An inverter lights the LED when its input is low, if the LED goes from supply through the resistor to the output.
- An AND gate drives the LED only when both inputs are high.
- An OR gate lights it when either input is high.
Use 1 kilohm for about 2 to 3 mA at 5 V, or add a transistor buffer for brighter LEDs.
REMEMBER
A transistor lets a tiny signal control a much larger LED current.Try it yourself
Sketch the circuit on paper first, calculate the values, then build it on a solderless breadboard using a low-voltage supply. Measure with a multimeter before you make anything permanent.
Explore LED clocks, stopwatches and electronics at cosycom.com.