Experiment 23: Nice Dice
222 Chapter 4
The final enhancements are up to you. Most obviously, you can add a second
die, as many games require two dice. The 74LS27 chip still has a couple of
spare NOR gates in it, one of which you can make use of, but you will need
an additional 555 timer, running at a significantly different speed to ensure
randomness, and it will have to drive a second counter.
After you get your dice up and running, you may want to test them for ran-
domness. Because the pulses from a 555 timer are of equal length, every num-
ber has an equal chance of coming up; but the longer you hold down the Start
button, the better your odds are of interrupting the counting process at a truly
random moment. Anyone using your electronic dice should be told that “shak-
ing” them for a full second is mandatory.
Of course, I could have simulated dice more easily by writing a few lines of
software to generate random numbers on a screen, but even a fancy screen
image cannot have the same appeal as a well-made piece of hardware. Figure
4-113 shows white 1 cm LEDs mounted in a sanded polycarbonate enclosure
for dramatic effect.
Most of all, I derived satisfaction from using simple, dedicated chips that dem-
onstrate the binary arithmetic that is fundamental in every computer.
Figure 4-113. The open-collector inverter chip in the dice circuit is sufficiently powerful to
drive 1-cm white LEDs that draw about 20mA each, using a potential of 2V. In this finished
version, the LEDs were embedded in cavities drilled from the underside of half-inch poly-
carbonate, which has been treated with an orbital sander to create a translucent finish.