Demultiplexer - 74HC138 (Arduino Compatible)
by teamlighthouse in Circuits > Electronics
9130 Views, 19 Favorites, 0 Comments
Demultiplexer - 74HC138 (Arduino Compatible)
![4.png](/proxy/?url=https://content.instructables.com/FTZ/XC8J/J5X0IL3W/FTZXC8JJ5X0IL3W.png&filename=4.png)
![6.png](/proxy/?url=https://content.instructables.com/F49/TR84/J5X0ILDL/F49TR84J5X0ILDL.png&filename=6.png)
![1.png](/proxy/?url=https://content.instructables.com/F2Q/F9V4/J5X0IKJ9/F2QF9V4J5X0IKJ9.png&filename=1.png)
![7.png](/proxy/?url=https://content.instructables.com/FJB/RI3C/J5X0ILMI/FJBRI3CJ5X0ILMI.png&filename=7.png)
Micro-controllers play an important role in today's electronics and DIY projects, most mirco-controllers have a large number of Input/Output pins, but in some cases that just is not enough. But being a digital device, there are a number of solutions and add on circuits to use, to overcome this problem one of the such devices is a demultiplexer. A demultiplexer can be used when you have to control a large amount of LEDs.
In this instructable I'm going to show you how to use a 3 to 8 demultiplexer using the arduino using this it is possible to control 8 LEDs with just 3 microcontroller pins.
Tools and Components
![2.png](/proxy/?url=https://content.instructables.com/FDL/6NJ3/J5X0IKSE/FDL6NJ3J5X0IKSE.png&filename=2.png)
![3.png](/proxy/?url=https://content.instructables.com/FV1/443D/J5X0IKZT/FV1443DJ5X0IKZT.png&filename=3.png)
For this instructable you will need.
- 74HC138 3 to 8 demultiplexer
- Bread Board
- Jumper Wires
- LEDs
- Connecting Wires
- Multimeter
- 330 Ohm resistor (Optional)
- 5v power source
Circuit
![circuit.PNG](/proxy/?url=https://content.instructables.com/F1M/FCOI/J5X0ILNG/F1MFCOIJ5X0ILNG.png&filename=circuit.PNG)
![5.png](/proxy/?url=https://content.instructables.com/FM6/COII/J5X0IL95/FM6COIIJ5X0IL95.png&filename=5.png)
The circuit to understand a Demultiplexer is quite simple, you can assemble it on a breadboard. The circuit consists of a 74hc138 IC which is a 3 TO 8 Line Decoder Demultiplexer. IT uses 3 I/O pins from the microcontroller it is connected to and uses it to control 8 lines, i.e you can control 8 LEDs with just 3 pins of the micro-controller. The 74HC138 has a voltage range of 2 to 6 volts so you can power it using any 3.3V microcontroller or a 5V microcontroller.
You will need to add a current resisting resistor suitable to the LEDs used.
Going Further
![IMG_20170801_223237.jpg](/proxy/?url=https://content.instructables.com/FD0/1KCC/J5X0IUPF/FD01KCCJ5X0IUPF.jpg&filename=IMG_20170801_223237.jpg)
The circuit can be assembled on a PCB or as an arduino shield, the image above shows the table of how to control the 8 lines, by supplying various combinations across the 3 input lines.
You could also add a separate 3.3V voltage regulator if you are working with LEDs.