Make Electronics

(nextflipdebug2) #1
Chips, Ahoy! 219

Experiment 23: Nice Dice

Each of the LEDs is grounded through a separate 4K7 load resistor. Unfortu-
nately, this means that when they are displaying the pattern for a 6, all of them
are running in parallel from the output of the NOR gate, which overloads it.
As long as you don’t leave the display in this mode for very long periods, it
shouldn’t cause a problem. You could compensate by increasing the load re-
sistors, or by running pairs of the LEDs through one resistor, but this will make
them so dim that they’ll be difficult to see, as they’re so close to their lower
limit for current already.


Notice how I have added four signal diodes, D1 through D4. When Output C
goes high, it has to illuminate all four corner LEDs, and so its power goes into
the brown wire as well as the gray wire. But we must never allow one output
to feed back into another, so D4 is needed to protect Output B when Output
C is high.


Because there is now a connection between B and C, we need D2 to protect
Output C when Output B is high. And because Output B must only feed two
of the corner LEDs, we also need D3 to stop it from illuminating the other two.
And, we have to protect the output from the NOR gate when either Output C
or Output B is high. This requires D1.


Figure 4-109 shows everything that I’ve described so far assembled in bread-
board format, while Figure 4-110 shows the test version that I built. Note that
the unused logical inputs on the 74LS27 chip are shorted together and con-
nected to the positive side of the power supply. Here’s the rule:



  • When using CMOS chips (such as the HC series), connect unused logical
    inputs to the negative side of the power supply.

  • When using TTL chips (such as the LS series), connect unused logical in-
    puts to the positive side of the power supply.


I assume that you have had enough fun watching the LEDs count slowly, so
I’ve changed the capacitor and resistor values for the 555 to increase its speed
from approximately 1 pulse per second to about 50,000 pulses per second.
The counter could run much faster than this, but I just want it to cycle fast
enough so that when the user presses and releases a button, the count will
stop at an unforeseeable number.


The button starts and stops the 555 timer by applying and releasing power
to the timing circuit only. This is the equivalent of shaking and then throwing
the die.


While the counter is running fast, the LEDs are flashing so fast that all of them
will seem to be on at once. At the same time, the circuit charges a new 68 μF
capacitor, which I have added between the pushbutton and ground. When
you release the button, this capacitor discharges itself through the 1K timing
resistor. As the charge dissipates, the timing capacitor will take longer and
longer to charge, and discharge, and the frequency of the 555 will gradually
diminish. Consequently the LED display will also flash slower, like the reel on a
Las Vegas slot machine gradually coming to a stop. This increases the tension
as players can see the die display counting to the number that they’re hoping
for—and maybe going one step beyond it.


1K

68uF 1K

1K

0.01uF

All above are 4K7

0.1uF

D1

D2
D3

D4

5V DC regulated power supply

1 8
555

74LS 92

74LS27

Figure 4-109. With some extra compo-
nents, the schematics from Figures 4-102
and 4-107 can be combined to make the
working dice simulation.
Free download pdf