Creating very easy and cheap interfacing projects for the Raspberry Pi is difficult these days; however, the old 74HC14 hex Schmitt trigger always comes to the rescue, because it is one of the cheapest and most versatile integrated circuits available. I always say that an affordable component is always good for education, I remember using this IC back in 80s and 90s, and it was very affordable then as well costing just a few pence. Today, you could buy it for as little as 16 pence.
The Raspberry PI P1 interface operates at CMOS logic levels, and there are many ICs in the 74HCT series of the logic family that can interface with the GPIO port. Many of these chips are even capable of converting CMOS to TTL logic levels if you understand how they work.
A limitation of the GPIO port is that each pin can supply a maximum of 16 mA and if you draw more current, then it causes damage. Therefore, using a buffer IC is extremely useful to protect the pins.
74HC14 Hex Inverting Schmitt Trigger
The 74HC14 integrated circuit usually works excellently for interfacing projects. The 74HC14 / 74HCT14 series is a high-speed CMOS based device that contains six inverting buffer circuits with Schmitt-trigger action. They can operate on a supply voltage (Vcc) as low as 2 V and as high as 6 V.
An exceptionally useful feature of this IC is that it recognises an input voltage as low as 2 V as logic 1. Since the GPIO pins operate at 3.3 V logic levels, this chip is compatible.
The logic output of this chip can source or sink up to 25 mA, which is good enough for driving a LED. This is very useful if you were experimenting with blinking LEDs, as it protects the GPIO pins.
Compatible Integrated Circuits in the Series
- 74HCT High-speed CMOS TTL inputs
- 74AHC Advanced High-speed CMOS
- 74AHCT Advanced High-speed CMOS TTL inputs
An inverter simply inverts the input signal; therefore, logic 1 at the input generates logic 0 at its corresponding output. Alternatively, logic 0 at the input generates logic 1 at the output.
When the output pin is at logic 1, it acts as a source for voltage, and provides an output voltage equal to its supply voltage. However, when the output pin is at logic 0, it behaves as a ground, and therefore a place for voltage to sink. More information is available in the Current Sinking and Sourcing in TTL Circuits article.
Beginners usually prefer an input of logic 1 to light an LED, however since this is an inverter, it will have the opposite effect, where logic 0 at the input lights the LED. From an electronic engineering view, this is not a problem because you simply connect the anode side of the LED to the positive voltage rail, and the cathode side to the output pin, through a series resistor. This way, when the output pin is at 0 V, the current flows from the positive voltage rail to the 0 V potential. Therefore, even with an inverted logic, the LEDs light when the input is logic 1.
GPIO LED Blink Circuit
It is highly recommended you follow the first GPIO project, which was to blink a single LED. The Raspberry Pi Blink LED article contains information on how to calculate the series resistance value, which would be vital in this project. Use exactly the same type of LED used there. It also shows the Python code to make an LED blink. It is the same application here as well, except there are six individual LEDs to control.
This interfacing circuit controls six LEDs through the 74HC14 hex inverting IC; therefore, six GPIO pins are used. The IC is powered by a 5 V rail and therefore logic 1 will be close to 5 V. The output pin of the IC will sink 25 mA of current, and therefore you can try suitable resistor values to make it light brightly.
To calculate the value of the current limiting resistor, just use the Current Limiting Series Resistance Calculator for LEDs article.
eBay / RS / Google
Many chips are capable of accepting CMOS inputs and therefore compatible with the Raspberry Pi interface. I have chosen this one mainly because of its low cost. There are many firms such as NXP, Texas Instruments, and On Semiconductor, manufacturing these. The cheapest price I found was 16 pence when bought in a quantity of 20 chips.
Related ArticlesRaspberry Pi Blink LED
Current Sinking and Sourcing in TTL Circuits
Current Limiting Series Resistance Calculator for LEDs