Controlling a 7-Segment LED Display

In this project, you'll learn how to connect and control a 7-segment LED display to show the numbers from 0 to 9.

Parts needed: Software stuff you'll learn: Arduino      7-Segment LED display      7-Segment LED display      Breadboard     
A 7-segment LED display is a display with seven individual LEDs built inside one package. The seven LEDs form a figure 8 and are given the alphabetical names from a to g. There is an eighth LED for the decimal point. With this configuration, decimal digits can be formed by turning on the individual LEDs.

               7-segment display segments
7-segment display digits
Since each LED requires a positive and a negative connection, if we simply connect eight individual LEDs (seven forming the figure 8 plus the decimal point) then a total of 16 connections would be required.

However, in order to reduce the number of connections needed, either the positive or the negative ends of the eight LEDs are connected in common.

If all the negative ends are connected together, it is referred to as common cathode, and if all the positive ends are connected together, it is referred to as common anode.

Using a common cathode or common anode, only 9 connections (as shown in the figures on the right) are needed instead of the original 16 to control the 7-segment display.
               Common Cathode

7-segment display common cathode

                  Common Anode
7-segment display common anode
1 Making the connections

Different 7-segment displays have different pin connections. Choose the one that matches your 7-segment display.

  • Click here for the F5101AH black color display with pins on the top and bottom (Common Cathode). 7-Segment LED display
  • Click here for the F5161BH, 5161BS, 5611BS, or 5611BH black color display with pins on the top and bottom (Common Anode). 7-Segment LED display
  • Click here for the grey color display with pins on the sides (Common Cathode). 7-Segment LED display