Projects / 3-to-8 decoder selector

3-to-8 decoder selector

Beginner45 minGuided buildReviewed

Build it step by step

0 of 7 done
  1. Power the chip

    Pin 16 to +5 V, pin 8 to GND.

  2. Enable it

    Pins 4 and 5 to GND, pin 6 to +5 V. Without this no output goes low.

  3. Make the address switches

    Three DIP sections to pins 1, 2 and 3 with pull-downs.

  4. 18.6 mA

    Add the LEDs

    Each LED with 330 Ω from +5 V to its output pin.

  5. 18.6 mA

    Set an address

    Switch to binary 101 (5) and see LED 5 light.

  6. Count through all eight

    Step the switches from 000 to 111.

  7. Connect to the real world

    Think of the eight outputs as chip selects for eight memory chips.

In short

How do you build a 3-to-8 decoder selector?

Three switches pick one of eight LEDs through a 74HC138, the way chip selects work in computers. You need 74HC138 3-to-8 decoder, DIP switch 8-position, Resistor 10 kΩ × 3, LED 5 mm red × 8, Resistor 330 Ω × 8, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter. It takes 7 steps and about 45 minutes.

Level
Beginner
Time
About 45 min
Parts
9

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
74HC138 pin 16 (VCC) and pin 8 (GND)+5 V and GNDPower
Pins 4 and 5 (E1, E2, active low)GNDEnabled
Pin 6 (E3, active high)+5 VEnabled
Switches A, B, COne side +5 V, other side to pins 1, 2 and 3 with 10 kΩ to GNDAddress inputs
LED anodes330 Ω to +5 VCurrent limit
LED cathodesY0 to Y7 (pins 15, 14, 13, 12, 11, 10, 9, 7)Active-low outputs

No code needed

No code. Power: a breadboard power supply module (MB102) from the 12 V adapter, with its jumper set to 5 V. The outputs go low for the selected address, so each LED is wired from +5 V through a resistor into its output pin and lights when that output is pulled low.

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Address 000Only the LED on Y0 lights
Address 101Only the LED on Y5 lights
Address 111Only the LED on Y7 lights
Disable (E3 to GND)All LEDs off

If it does not work

All LEDs on or none

An enable pin is wrong. Check pins 4, 5 and 6.

Two LEDs light

An address pin is floating. Add a pull-down.

LED order looks wrong

Y7 is on pin 7, which is out of sequence. Check the pin list.

Nothing lights

LEDs are backwards or power is off.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the 3-to-8 decoder selector?

74HC138 3-to-8 decoder, DIP switch 8-position, Resistor 10 kΩ × 3, LED 5 mm red × 8, Resistor 330 Ω × 8, Breadboard 830 Tie Points, Jumper wires male to male (40 pcs, 20 cm), Breadboard power supply module (MB102) and 12 V 2 A DC adapter.

How long does the 3-to-8 decoder selector take to build?

About 45 minutes for a beginner maker, in 7 steps.

How do I know the 3-to-8 decoder selector works?

Address 000: Only the LED on Y0 lights. Address 101: Only the LED on Y5 lights. Address 111: Only the LED on Y7 lights.

All LEDs on or none: what should I check?

An enable pin is wrong. Check pins 4, 5 and 6.

Two LEDs light: what should I check?

An address pin is floating. Add a pull-down.

LED order looks wrong: what should I check?

Y7 is on pin 7, which is out of sequence. Check the pin list.

Nothing lights: what should I check?

LEDs are backwards or power is off.