Dice or die is a throwable object which is majorly used in gambling as a device to generate random numbers. It is a rounded cube with six outer surfaces with numbers or dots ranging from one to six on each face. The oldest dice was recognized to be the one which was used for playing the board game namely Backgammon. Dicing is familiar to Indian games and is included in Buddha games list.
The concept of electronic dice using 555 timer is also similar to a normal dice, but instead of using a hard dice having six outer surfaces with dots or numbers on each face of the dice, the electronic dice is made up of Light Emitting Diodes, astable oscillator circuit, a counter and a display driver. The electronic die effectively generates random numbers by displaying the number of LED’s which is similar to a normal die – when it is thrown and settles down to rest with one surface facing upwards – it displays a particular number or dots.
Block Diagram of Electronic Dice
The block diagram of an electronic dice consists of a BCD counter, a seven-segment LED display, a 555 timer and a BCD to 7-segment decoder which are connected as shown in the below figure along with different blocks.
555 Timer as Astable Multivibrator
A 555 timer is majorly used IC for oscillator applications, timer and as a multivibrator for pulse generation. The 555 timer in astable mode generates continuous pulses with a particular frequency. As shown in the figure, one resistor is connected between the Vcc and the discharge pin, another resistor is connected between the discharge pin and the trigger pin/threshold pin. The pin 2 and pin 6 are connected together such that the circuit triggers itself for every cycle of operation such that it is termed as a free-running oscillator.
The frequency of the generated pulse depends on the values of the resistors and capacitor in the above circuit and the frequency is given by
Where T= cycle time= T1+T2
Hence, it is also termed as a free-running oscillator because without providing the triggering this circuit is capable of generating the output.
The charging and discharging times can be given as follows:
T1= 0.693(R1+R2)*C and T2=0.693*R2*C
Thus, frequency can be given as
The capacitor in the above circuit, charges through R1 and R2, and discharges through R2 resistor, which is connected to the discharge pin.
As shown in the figure, the 4510 Binary Coded Decimal counter consists of four outputs and can count up or down according to the inputs logic if pulses are delivered to a clock input. The BCD follows sequence 0000 to 1001 (the binary equivalent of decimal number 0 to 9) after that the next pulse resets the counter and again repeats from 0000 to 1001. It consists of four synchronously clocked D-flip-flops.
BCD to 7 Segment Decoder
The output must be able to drive the 7-segment display, so for converting the BCD to 7-segment outputs that can drive the 7-segment display, an IC 4511B used as a converter. This IC consists of four input lines and seven output lines and a few extra control lines as shown in the figure.
The state of the segment outputs Qa to Qg can be determined by the data on D0 to D3 if the LE is LOW and the ripple banking is HIGH.
If LE goes HIGH, then the data present on D0 to D3 is stored in latches, while there will be no change in the segments’ outputs.
7 Segment Display
The 7-segment display is an electronic device used for displaying the decimal numerals which are widely used in digital clocks and many other applications.
This device can be developed by using an LCD or LED for display purpose. The device can be differentiated based on the cathodes or anodes of the LEDs used in the device. If all the cathodes are connected to a common pin, then it is termed as a common cathode device, and if all the anodes are connected to a common pin, then it is termed as a common anode device.
Electronic Dice Circuit Working
The block diagram of the electronic dice project is shown in the above figure at the beginning of the article and this circuit represents the internal circuit diagram of the electronic dice. If the switch is pushed, then the 555 timer connected as astable oscillator will generate the pulses with very-high frequencies. These pulses are driven to the IC connected to the 555 timer in the circuit and the counter counts from 0 to 9 in normal applications, but here for the electronic dice the counter counts form 0 to 5, and then the counter gets reset by using the reset pin of the IC. Again the counting cycle repeats from 0 to 5.
However, for better outputs, we need to make it as 1 to 6 instead of 0 to 5, and for this purpose we need one code conversion unit between the counter and the decoder, which is as shown in the circuit. The conversion unit consists of NOR gates in which the two gates are connected with the diodes and resistors which are termed as 4025 IC.
As we know that if all the inputs of the NOR gates are LOW, then the outputs of the NOR gates will be HIGH, such that the DIODE’s will be having the values of anode greater than the cathode. Thus, the DIODE’s will become forward biased, even though the outputs B and C are HIGH, the 10kΩ resistor makes the input to remain LOW by limiting the current flow between the outputs and inputs.
Then, the 4511 IC will be connected to the 7 segment display by using the seven 560Ω resistors to each pin of the display. These resistors are used in series for the protection of 7 segment display by limiting the current. The seven-segment display used in the circuit is a common cathode display as we have discussed earlier that there are common cathode and common anode seven-segment displays.
Hence, as we push the button, the count will be displayed by the 7 seven segment display, and will disappear after some time. Thus, by pushing the switch of the circuit, the electronic dice displays the number from 1 to 6 based on the count given by the counter, and then it is processed by the entire circuit as discussed above.
If the frequency of the 555 timer astable oscillator is very high, then the time period will be very less – then the Light Emitting Diodes operation will not be sufficient for prediction through observation as the time period will be of very short duration, that is, about a few microseconds (if we consider a frequency of 5kHz, then the time period will be 0.0002 seconds, which cannot be observed by a normal human eye).
Hence, this article discusses about the electronic dice and its working along with different blocks of the circuit. For more information regarding the Electronic dice, please post your queries by commenting below.
- Simple Dice by zontikgames
- Block Diagram of Electronic Dice by kitronik
- 555 timer by wikimedia
- BCD Counter by talkingelectronics
- BCD to 7 Segment Decoder by engineersgarage
- 7 Segment Display by sentex
- Electronic Dice Circuit Working by 3x