A Digital Indicator System With 7-Segment Display: Journal of Physics: Conference Series
A Digital Indicator System With 7-Segment Display: Journal of Physics: Conference Series
E-mail:[email protected], [email protected]
Abstract. This paper presents the design and implementation of a digital system that uses a 7-
segment display to indicate the number of drug tablets in a tablet-bottling assembly line. As well as
display the number of tablets in a bottle (from 0 – 9), the display can also indicate the name of the
vitamin tablet being assembled (Vitamin A, b, C, d, E). This work presents the digital implementation
comprising the logic expression, logic circuit and VHDL code for the Vitamin type in the bottle. A
digital implementation to display the number of Vitamins in the tablet bottle as well as the Vitamin
type with a BBC microbit microcontroller is presented. The application of this work can be extended
to give a visual indication of any industrial application that requires indication of the current
production stage/phase.
1. Introduction
Seven segment displays are made up of LEDs combined such that they can be used to display numbers and
letters. As their name implies, they are made of seven LEDs plus an additional LED for a dot. Led dot
matrix displays, on the other hand, are made up of LEDs in a square matrix form to give an indication of a
letter, number or symbol [1]. Seven segment displays can be in form of common anode or common cathode.
They can also be in form of single digit or multi digit seven segment displays.
Seven-segment displays are used in many types of everyday products, for example, in a tablet-bottling
system [2], to give an indication of measurement types such as temperature or a reading on calculator or
meters [3]. The 7-segment display for the bottling system is controlled by logic circuits which encodes a
decimal number in binary form consequently activating suitable LEDs of the display. 7-segment displays
cannot only indicate numbers (0 to 9), they can also display some alphabets.
The application of 7-segment display in this paper is to give a visual indication of the number of tablets in a
drug bottling assembly line as well as give a visual indication of the Vitamin type being assembled. The
digital drug tablet-bottling assembly line works by grouping and assembling a particular Vitamin tablet in a
bottle along a production line after these tablets have been manufactured. In this paper, we design a digital
system to indicate the alphabets (A, b, C, d, and E)which is used to categorise the kind of vitamin tablet that
is assembled in a drug bottling production line. The design of numbers 0 – 9 using a single digit 7-segment
display is also developed to give an indication of the number of tablets in the bottle. In this paper, the
decoding logic for indicating A, b, C, d, and E letters is presented in detail.
Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
light whenever current flows through the powered circuit. An LCD, on the other hand, works on the
principle of polarized light which gets activated when light is not reflected, thereby the letters, alphabets,
numbers and characters appears black. However, inactivation causes incident reflected light to be invisible.
The LED segments in 7 segments displays are organised as shown in Figure 1 and characterized as a, b, c, d,
e, f, g and dp as indicated. When chosen LED segments are turned ON or OFF, certain alphabetical letters or
numbers are created.
Common Anode (CA) displays have the anode of all LED pins connected together to 5v, therefore, a LOW
voltage applied individually on each pin will light up the LED of that particular pin. Conversely, Common
Cathode (CC) displays have the cathode of all LED pins connected together to ground, therefore, a HIGH
voltage applied individually on a given pin will turn ON the LED of that particular pin Figure 2 shows the
internal structure of a single digit 7-segment display.
(a) (b)
Figure 2: Internal structure of 1-digit 7 segment displays. (a) Common Cathode (CC) (b) Common Anode
(CA)
7 segment displays normally have 8 pins which represent the each LED on the display (7 segment plus the
dot making 8 LEDs) (Figure 3a and b). However, there is also a 7 segment display called a Binary Coded
Display (BCD) that has only 4 pins (Figure 3c. In this case, the binary combination as shown in Table 1 will
produce numbers 0 - 9 and letters A - F as shown.
Figure 3: Single-digit 7 segment displays; (a) Generic 7-segment display (b) Common anode/ cathode 7-
segment display (c) Binary coded (BCD) 7-segment display
2
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
For common anode 7-segment displays, Table 2 shows the binary and hexadecimal value that would
produce numbers 0 - 9 and alphabets A - F, this can be traced by using Figure 2. For common cathode 7-
segment displays, the binary and hexadecimal values are shown in Table 3 for numbers 0 - 9 and alphabets
A - F. Notice that the binary values can also be produced by carrying out a NOT operation on the respective
common anode binary value. For example, number‘’2’’is formed by the following segments: a, b, d, e, and
g; number‘’5’’is formed by the following segments: a, c, d, f and g; alphabet ‘’A’’ is formed by the
following segments: a, b, c, e, f and g; letter ‘’E’’ is formed by the following segments: a, d, e, f and g. As
shown in both Tables 2 and 3, there is no one segment that is shared by all digits but segment “e” is shared
to all alphabets that can be displayed by the 7-segment.
3
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
Table 4: Segments activated for each of the five alphabets used in the 7 segment displays.
Letter Activated Segment
A A, B, C, E, F, G
b C, D, E, F, G
C A, D, E, F
d B, C, D, E, G
E A, D, E, F, G
A 7-segment display truth table for producing the alphabets is indicated in Table 5. 4 hexa-decimal inputs
and 7 outputs can be seen for each segment as part of the logic. Since the alphabet F is not utilized as part of
the inputs, therefore, all outputs for F are all fixed to 1.
4
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
5
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
d H 3 H 2 H1 H 3 H 2 H1
Segment e: Segment e is present in alphabetsA, b, C, d and E. The Boolean expression for segment e is:
e H3 H2 H1 H0 H3 H2 H1H0 H3H2 H1H0 H3H2 H1H0 H3H2 H1 H0
Minimization of the expressions for segment e is shown in Figure 8:
6
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
7
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
VHDL implementation of the 7-segment decoding logicin a programmable logic device (PLD) is described
using the following code.
The digital indicator system with a 7-segment display was physically implemented using a BBC Microbit
microcontroller and a single digit 7-segment display to produce numbers 0 – 9 as well as letters A, b, C, d
and E. These numbers and letters give a visual indication for the digital drug bottling system in an assembly
process. The results are presented in the following sections.
4.1 Simulation
The decoder simulation is shown in Figure 4 with the letter C selected. The purpose of simulation is to
verify proper operation of the circuit.
8
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
The implementation of the digital system that displays the count from 0 to 9 as well as the letters A, b, C, d
and E was carried out on a BBC Mibrobit microcontroller as shown in Figure 17.
9
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
(a)
(b)
(c)
(d)
Figure 18: Multi-digit 7 segment displays; (a) 2-digit, 7-segment display (b) 4-digit, 7-segment display (c) 6-
digit, 7-segment display and (d) 8-digit, 7-segment display
7 segment displays can be connected directly to a microcontroller. 74HC573 Latch IC can likewise be used
to drive 7 segment displays, the advantage of using a latch is that only 8 digital pins of a microcontroller can
be used for multi-digit displays. If a latch is not used, the number of pins that is equal to the number of pins
the LED display has will be used by the microcontroller.
4-digit 7-segment displays
10
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
The internal structure of a 4-digit 7-segment common cathode display is shown in Figure 19. The cathode of
each digit are connected together, a LOW voltage on the cathode will light up the corresponding LED if its
anode is HIGH while a HIGH voltage on the cathode will turn off the LEDs.
Figure 19: Internal structure of 4-digit 7 segment display common cathode display
The internal structure of a 4-digit 7-segment common anode display is shown in Figure 20. The anode of
each digit are connected together, a HIGH voltage on the anode will light up the corresponding LED if its
cathode is LOW while a LOW voltage on the anode will turn off the LEDs of the corresponding digit.
Figure 20: Internal structure of 4-digit 7 segment display common anode display
The pinout for 1-digit and 4-digit 7-segment displays is shown in Figure 21a. For 1-digit displays
(Figure21b), pin 3 and 8 are the power pins: in common anode, these pins should be connected to Vcc while
for common cathode, they should be connected to GND.
11
3rd International Conference on Science and Sustainable Development (ICSSD 2019) IOP Publishing
IOP Conf. Series: Journal of Physics: Conf. Series 1299 (2019) 012139 doi:10.1088/1742-6596/1299/1/012139
5. Conclusion
This work provided a proper understanding of seven segment displays. A digital implementation to display
letters and numbers on a single digit seven segment display has been implemented using logic expressions,
logic gates, VHDL implementation and a physical implementation on a microcontroller. The application of
this system is to a drug tablet bottling which displays the count number as well as the Vitamin type being
bottled. The application was also extended to a multi-digit seven segment display in order to increase the
count range. Further work will involve the design and implementation of a four-digit display as a clock to
give an indication and update of the hour, minute and second. The clock will have alarm capability so as to
beep when the alarm goes off as well as set and reset inputs.
Acknowledgment
References
[1] T. E Arijaje, S. O Azi, A Akinpelu, C. A Onumejor, M Omeje and I. E Ogunrinola, Design and
Construction of LED Matrix Display, IOP Conference Series: Earth and Environmental Science,
Volume 173, 2018.
[2] T. L. Floyd, Digital Fundamentals, 11th Edition, Pearson Education India, 2015
[3] H. Wan-Fu, The Design of a Six-digit Digital Clock with a Four-digit Seven-segment Display
Module, IEEE International Conference on Electrical and Control Engineering,2011
[4] T.A. Adagunodo, J.J. Ajigbotosho, L.N. Obafemi, M.R. Usikalu, S.A. Akinwumi, W.A. Ayara,
Construction of an in-situ smart device that measures some basic environmental factors for
agricultural monitoring, IOP Conference Series: Earth and Environmental Science, Volume 173,
2018.
12