Experiment 23: Nice Dice
220 Chapter 4
Note that to maximize this effect, the button has to be held down for a full
second or more, so that the 68 μF capacitor becomes fully charged before the
button is released.
So, this circuit now fulfills the original goal. But can it be better? Of course
it can.
Enhancements
The main thing I want to improve is the brightness of the LEDs. I could add a
transistor to amplify the current to each one, but there’s a simpler alternative:
a TTL “open collector” inverter.
I want to use an inverter because in the world of TTL, as I mentioned earlier, we
can sink much more power into the output pin of a chip than we can source
from it. So, I’m going to turn each LED the other way around and connect their
load resistors to the positive side of the power supply. This way, they’ll sink
their power into the outputs of the inverter.
And the great advantage of an “open collector” version of the inverter chip is
that it is designed to sink much more current than a normal TTL logic chip. It is
rated for 40mA per pin. The only disadvantage is that it cannot source any cur-
rent at all; instead of its output going high, it just behaves like an open switch.
But that’s OK for this circuit.
So the next and final schematic, in Figure 4-111, includes the 74LS06 invert-
er, which has also been added to the breadboarded version shown in Figure
4-112. I suggest that you put aside the little low-current LEDs and substitute
some normal-size ones. Using Kingbright “standard” WP15031D 5mm LEDs, I
find that each draws almost exactly 20mA with a voltage drop of about 2V
with a 120 ohm series resistor. Because each output pin from the 74LS06 in-
verter powers no more than two LEDs at a time, this is exactly within its speci-
fication. I suggest that if you build this circuit, you check the consumption of
your particular choice of LEDs and adjust the resistors if necessary.
Remember: to measure the voltage drop across an LED, simply touch the
probes of your meter across it while it is illuminated. To measure the current,
disconnect one side of the LED and insert the meter, in milliamp mode, be-
tween the leg of the LED and the contact that it normally makes in the circuit.
For a really dramatic display, you can get some 1 cm diameter LEDs (Figure
4-113). Check the specification, and you should find that many of these don’t
use more power than the usual 5 mm type. But whatever kind you use, don’t
forget to turn them around so that their negative sides face toward the in-
verter, and their positive sides face the resistors, which are connected to the
positive side of the power supply.
One last detail: I had to add two 10K resistors to this version of the circuit. Can
you see why? Diodes D1 through D4 are designed to transmit positive voltage
through to the inverter when appropriate, but they prevent the inputs of the
inverter from “seeing” the negative side of the power supply when the counter
outputs are low. These inverter inputs require pull-down resistors to prevent
them from “floating” and producing erroneous results.
Figure 4-110. The electronic dice schematic
applied to a breadboard, with a pushbut-
ton at the top to start and stop the coun-
ter, and 7 LEDs at the bottom to display
the output.