LED Dice Logic Gates Diagrams

LED Dice


Our aim is to create an LED Dice using a breadboard and 7 LEDs disposed as follows:
LED-Dice

We will then use three buttons/switches to control the 7 LEDs of the dice to recreate the following patterns:
LED-Dice-6

Octal Number System

The octal numeral system, or oct for short, is the base-8 number system. It uses 8 digits from 0 to 7. Octal numerals can be converted into binary using 3 binary digits and the following conversion table.
octal-conversion-table

We will use three input buttons A,B,C representing the 3 binary digits to generate 8 binary patterns representing the 8 octal digits from 0 to 7.
LED-Dice-input-output

We will then use logic gates circuits to control each of the 7 LED based on the three inputs:

LED Dice: Truth Tables & Karnaugh Maps


We will use three inputs A,B and C to represent the three digits as ABC (A is the most significant digit, C is the least significant digit). When creating the electronic circuit we will use 3 switches to represent these 3 inputs.

We will need 7 outputs one for each LED. So let’s investigate each LED one at a time.

LED 1 & 6LED 2 & 5LED 3 & 4LED 7
LED 1 & LED 6 (top-left and bottom right) should be on for the following values:

LED-Dice-value-4ABC:100 LED-Dice-value-5ABC:101 LED-Dice-value-6ABC:110 LED-Dice-value-7ABC:111

LED 1 & 6 should be off for the following values:

LED-Dice-value-0ABC:000 LED-Dice-value-1ABC:001 LED-Dice-value-2ABC:010 LED-Dice-value-3ABC:011

Hence the Truth Table for LED 1 & LED 6 is as follows:

Inputs Output
A B C LED 1
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1

This Truth table can be represented using a Karnaugh Map:

Karnaugh Map for LED 1 & LED 6

Karnaugh Map for LED 1 & LED 6

LED 2 & LED 5 (top-right and bottom left LED) should be on for the following values:

LED-Dice-value-2ABC:010 LED-Dice-value-3ABC:011 LED-Dice-value-4ABC:100 LED-Dice-value-5ABC:101 LED-Dice-value-6ABC:110 LED-Dice-value-7ABC:111

LED 2 & LED 5 should be off for the following values:

LED-Dice-value-0ABC:000 LED-Dice-value-1ABC:001        

Hence the Truth Table for LED 2 & LED 5 is as follows:

Inputs Output
A B C LED 2
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1

This Truth table can be represented using a Karnaugh Map:

Karnaugh Map for LED 2 and LED 5

Karnaugh Map for LED 2 and LED 5

Follow the same process to define the Truth Table and Karnaugh Map of LED 3 and LED 4 which have the same truth table.

LED 3 & LED 4 (middle-left and middle-right) should be on for the following values:

LED-Dice-value-6ABC:110 LED-Dice-value-7ABC:111        

LED 3 & 4 should be off for the following values:

LED-Dice-value-1ABC:001 LED-Dice-value-2ABC:010 LED-Dice-value-3ABC:011 LED-Dice-value-4ABC:100 LED-Dice-value-5ABC:101 LED-Dice-value-0ABC:000


Follow the same process to define the Truth Table and Karnaugh Map of LED 7 (LED in the middle of the dice).
LED 7 (in the middle) should be on for the following values:

LED-Dice-value-1ABC:001 LED-Dice-value-3ABC:011 LED-Dice-value-5ABC:101 LED-Dice-value-7ABC:111

LED 7 should be off for the following values:

LED-Dice-value-4ABC:100 LED-Dice-value-0ABC:000 LED-Dice-value-2ABC:010 LED-Dice-value-6ABC:110


LED Dice: Boolean Expressions


The Karnaugh maps will help us define the Boolean Expressions associated with each of the 7 LEDs.

LED 1 & 6LED 2 & 5LED 3 & 4LED 7
Karnaugh Map:
Karnaugh Map for LED 1 & 6

Karnaugh Map for LED 1 & LED 6

Boolean Expression:
Boolean Expression for LED1 & LED 6

Boolean Expression for LED1 & LED 6

Karnaugh Map:
Karnaugh Map for LED 2 & LED 5

Karnaugh Map for LED 2 & LED 5

Boolean Expression:
Boolean expression for LED 2 & LED 5

Boolean expression for LED 2 & LED 5

Use the Karnaugh Map for LED 3 & 4 to define the Boolean Expression of LED 3 & LED 4.
Use the Karnaugh Map for LED 7 to define the Boolean Expression of LED 7.

LED Dice: Logic Gates Diagrams


We can now convert each Boolean expression into a Logic Gates circuit to link our 3 inputs (switches) to our 7 LEDs display using a range of logic gates.
LED 1 & LED 6LED 2 & LED 5LED 3 & LED 4LED 7
Boolean Expression:
Boolean Expression for LED1 & LED 6

Boolean Expression for LED1 & LED 6

Logic Gates Diagram:
In this case, the Boolean expression being so basic, there is no need for any logic gates to control LED 1. The LED is directly connected to input A.
Logic Gates Diagram for LED 1 & LED 6

Logic Gates Diagram for LED 1 & LED 6

Boolean Expression:
Boolean expression for LED 2 & LED 5

Boolean expression for LED 2 & LED 5

Logic Gates Diagram:
In this case, the Boolean expression being so basic, only one OR gate is needed using input A and input B.
Logic Gates Diagrams for LED 2 & LED 5

Logic Gates Diagrams for LED 2 & LED 5

Use the Boolean Expression of LED 3 & LED 4 to draw the logic gates diagram required to control LED 3 & LED 4.
Use the Boolean Expression of LED 7 to draw the logic gates diagram required to control LED 7.

Testing


You can now recreate your logic gates circuit using our logic gates circuit simulator to test if it behaves as expected for all 8 entries.

You can also recreate the electronic circuit using bread boards, LEDs, resistors and logic gates or create your electronic cricuit online using tinkercad.

LED Dice - Electronic Circuit - Using AND and OR gates.

LED Dice – Electronic Circuit – Using AND and OR gates.

unlock-access

Solution...

The solution for this challenge is available to full members!
Find out how to become a member:
➤ Members' Area

Did you like this challenge?

Click on a star to rate it!

Average rating 4.2 / 5. Vote count: 42

No votes so far! Be the first to rate this post.

As you found this challenge interesting...

Follow us on social media!