## Monday, February 20, 2023

How Meke Homemade Large 7 Segment Display

A little (a lot) of electronics

As its name suggests, the 7-segment display has… 7 segments. But what is a segment exactly? Well, it is a portion of the display, which is turned on or off to produce the display. This portion is in fact nothing more than an LED which instead of being round as usual is flat and embedded in a box. There are therefore 8 portions by counting the dot on the display (but it does not count as a segment in its own right because it is not always present). Look how it looks:

LEDs, more LEDs

And LEDs, there are! Between 7 and 8 depending on the model (this is what I have just explained), see a lot more, but we will not dwell on it. Here is a diagram showing you a display model without the dot

As you can see in this diagram, all LEDs have a common pin, connected together. Depending on whether this pin is the cathode or the anode, we will speak of a common cathode display or… common anode (you follow?). In absolute terms, they function in the same way, only the way of connecting them differs (active on low state or on high state).

Common Cathode or Common Anode

In the case of a common cathode display, all the cathodes are linked together at a single point which is itself connected to ground. Then each anode of each segment will be connected to a signal pin. To turn on each segment, the signal will need to be a positive voltage. Indeed, if the signal is at 0, there is no potential difference between the two pins of the LED and therefore it will not light up! If we are in the case of a common anode, the anodes of all the LEDs are linked together at a single point which will be connected to the power supply. The cathodes they will be connected one by one to the signal pins. By setting a signal pin to 0, current will flow and the segment in question will light up. If the signal pin is high, the potential is the same on each side of the LED, so it's stuck and won't light up! Whether the display is common anode or cathode, it must always be taken into account that a current limiting resistor must be added between the isolated pin and the signal pin. Traditionally, we will take a resistance of

330

Ω

330Ω for a voltage of +5V, but this is calculated (see chapter 1, part 2).

If you want to increase the brightness, just decrease this value.

If on the contrary you want to decrease the luminosity, increase the resistance.

Choice of display

For the writing I made the choice to use common anode displays and it is not trivial. Indeed and we have seen it so far, we connect the +5V LEDs to the pin of the Arduino board. Thus, in the case of a common anode display, the LEDs will be connected on one side to +5V, and on the other side to the signal pins. So, to turn on a segment, we will put the signal pin at 0 and we will turn it off by putting the signal at 1. We have always done it like this from the beginning, so it will not cause you any problem. ;)

"Complete" connection of the display

We will now see how to connect the common anode display.

Presentation of the case

The 7-segment displays are presented on a DIP 10 type box.* The DIP format governs the spacing between the various pins of the integrated circuit as well as other constraints (presence of a heat exchanger, etc.). The number 10 means that it has 10 pins (5 on either side of the box).

This is a simple counter 0 to 9 circuit built using Arduino! Here, a common cathode 7-segment LED display is connected to Arduino to display numbers.

The code (Arduino sketch) allows pressing the button to increment the counter from 0 to 9.

The whole circuit can be powered by a standard 9V PP3/6F22 battery, or any suitable Arduino adapter.

The seven-segment display is actually a very simple device. It's a combination of 8 LEDs (the DP-decimal point is the 8th), which can be arranged so that different combinations can be used to make numeric digits.

Details of a common cathode type 7 segment LED display is shown here. Note that marks 3 and 8 of the display are at the terminals of the cathode.

Just follow the circuit diagram to make the whole project.

Arduino pins 2, 3, 4, 5, 6, 7, and 8 should go to show pins 7, 6, 4, 2, 1, 9, and 10 in the correct order. If in doubt, consult this table. Press the switch (S1) the input point is at pin 9 of the Arduino.

Connecting display pins directly to Arduino I/O pins is not good practice. For testing purposes only a 330 ohm resistor (R2) is added between the ground rail (0V) and the common cathode pins (3 and 8). It is preferable e to directly connect pins 3 and 8 from the screen to the ground rail. Next, add a 330 ohm resistor between each of the other connections to the Arduino.

How Meke Homemade Large 7 Segment Display

A little (a lot) of electronics

As its name suggests, the 7-segment display has… 7 segments. But what is a segment exactly? Well, it is a portion of the display, which is turned on or off to produce the display. This portion is in fact nothing more than an LED which instead of being round as usual is flat and embedded in a box. There are therefore 8 portions by counting the dot on the display (but it does not count as a segment in its own right because it is not always present). Look how it looks:

LEDs, more LEDs

And LEDs, there are! Between 7 and 8 depending on the model (this is what I have just explained), see a lot more, but we will not dwell on it. Here is a diagram showing you a display model without the dot

As you can see in this diagram, all LEDs have a common pin, connected together. Depending on whether this pin is the cathode or the anode, we will speak of a common cathode display or… common anode (you follow?). In absolute terms, they function in the same way, only the way of connecting them differs (active on low state or on high state).

Common Cathode or Common Anode

In the case of a common cathode display, all the cathodes are linked together at a single point which is itself connected to ground. Then each anode of each segment will be connected to a signal pin. To turn on each segment, the signal will need to be a positive voltage. Indeed, if the signal is at 0, there is no potential difference between the two pins of the LED and therefore it will not light up! If we are in the case of a common anode, the anodes of all the LEDs are linked together at a single point which will be connected to the power supply. The cathodes they will be connected one by one to the signal pins. By setting a signal pin to 0, current will flow and the segment in question will light up. If the signal pin is high, the potential is the same on each side of the LED, so it's stuck and won't light up! Whether the display is common anode or cathode, it must always be taken into account that a current limiting resistor must be added between the isolated pin and the signal pin. Traditionally, we will take a resistance of

330

Ω

330Ω for a voltage of +5V, but this is calculated (see chapter 1, part 2).

If you want to increase the brightness, just decrease this value.

If on the contrary you want to decrease the luminosity, increase the resistance.

Choice of display

For the writing I made the choice to use common anode displays and it is not trivial. Indeed and we have seen it so far, we connect the +5V LEDs to the pin of the Arduino board. Thus, in the case of a common anode display, the LEDs will be connected on one side to +5V, and on the other side to the signal pins. So, to turn on a segment, we will put the signal pin at 0 and we will turn it off by putting the signal at 1. We have always done it like this from the beginning, so it will not cause you any problem. ;)

"Complete" connection of the display

We will now see how to connect the common anode display.

Presentation of the case

The 7-segment displays are presented on a DIP 10 type box.* The DIP format governs the spacing between the various pins of the integrated circuit as well as other constraints (presence of a heat exchanger, etc.). The number 10 means that it has 10 pins (5 on either side of the box).

This is a simple counter 0 to 9 circuit built using Arduino! Here, a common cathode 7-segment LED display is connected to Arduino to display numbers.

The code (Arduino sketch) allows pressing the button to increment the counter from 0 to 9.

The whole circuit can be powered by a standard 9V PP3/6F22 battery, or any suitable Arduino adapter.

The seven-segment display is actually a very simple device. It's a combination of 8 LEDs (the DP-decimal point is the 8th), which can be arranged so that different combinations can be used to make numeric digits.

Details of a common cathode type 7 segment LED display is shown here. Note that marks 3 and 8 of the display are at the terminals of the cathode.

Just follow the circuit diagram to make the whole project.

Arduino pins 2, 3, 4, 5, 6, 7, and 8 should go to show pins 7, 6, 4, 2, 1, 9, and 10 in the correct order. If in doubt, consult this table. Press the switch (S1) the input point is at pin 9 of the Arduino.

Connecting display pins directly to Arduino I/O pins is not good practice. For testing purposes only a 330 ohm resistor (R2) is added between the ground rail (0V) and the common cathode pins (3 and 8). It is preferable e to directly connect pins 3 and 8 from the screen to the ground rail. Next, add a 330 ohm resistor between each of the other connections to the Arduino.