LED Dice
Our aim is to create an LED Dice using a breadboard and 7 LEDs disposed as follows:
We will then use three buttons/switches to control the 7 LEDs of the dice to recreate the following patterns:
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.
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.
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.
ABC:100 | ABC:101 | ABC:110 | ABC:111 |
LED 1 & 6 should be off for the following values:
ABC:000 | ABC:001 | ABC:010 | ABC: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:
ABC:010 | ABC:011 | ABC:100 | ABC:101 | ABC:110 | ABC:111 |
LED 2 & LED 5 should be off for the following values:
ABC:000 | ABC: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:
LED 3 & LED 4 (middle-left and middle-right) should be on for the following values:
ABC:110 | ABC:111 |
LED 3 & 4 should be off for the following values:
ABC:001 | ABC:010 | ABC:011 | ABC:100 | ABC:101 | ABC:000 |
LED 7 (in the middle) should be on for the following values:
ABC:001 | ABC:011 | ABC:101 | ABC:111 |
LED 7 should be off for the following values:
ABC:100 | ABC:000 | ABC:010 | ABC:110 |
LED Dice: Boolean Expressions
The Karnaugh maps will help us define the Boolean Expressions associated with each of the 7 LEDs.
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.
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:
In this case, the Boolean expression being so basic, only one OR gate is needed using input A and input B.
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.
Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area