This is only a preview of the August 2024 issue of Silicon Chip. You can view 45 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Items relevant to "The Styloclone":
Articles in this series:
Items relevant to "Dual Mini LED Dice":
Items relevant to "JMP007 - Ultrasonic Garage Door Notififier":
Items relevant to "JMP009 - Stroboscope and Tachometer":
Items relevant to "Beer Can Filler":
Items relevant to "180-230V DC Motor Speed Controller Part 2":
Purchase a printed copy of this issue for $12.50. |
Dual Mini LED Dice
This article is a blend of the old and the new. It’s
similar to our May 1994 Dual LED Dice design but
has been updated to use more modern parts (still
with discrete logic) and runs from a 3V coin cell. As
we have used mostly SMDs (on the larger side), it
will easily fit in your pocket.
Project by Nicholas Vinen
T
his small board ‘rolls’ two sixsided ‘dice’ each time you activate it, giving you a pair of random numbers in two different colours.
It’s small and light at just 60 × 28 ×
15mm so it’s convenient to use. You
could even build two or three for
games that require more than two dice
to be rolled.
I am sure there are plenty of dice
apps on smartphones these days, but
there’s something pleasing about a
design based on old-fashioned discrete
logic with Das Blinkenlights (in this
case, 14 LEDs). I also think it’s interesting to have such simple circuitry that
does a useful job and only draws a few
milliamps. It even switches itself off
automatically, so the small coin cell
should last a long time.
One thing I did to make it a little
more interesting is add the option of
triggering the dice roll with a vibration sensor. That way, you can shake
it to roll! That part is optional, but it’s
pretty fun as you can just pick it up and
quickly get some random numbers.
Coming up snake eyes
My original plan was to shamelessly
copy borrow the May 1994 project circuit by Darren Yates, change the parts
to make it run from a lower voltage
and redesign the PCB to be smaller.
However, I quickly ran into a problem.
He had used four 4000-series logic
ICs: two 4015 dual 4-bit shift registers
and two 4093 quad schmitt-trigger
NAND gates. The shift registers kept
track of the state of the dice and also
did some of the ‘decoding’ to drive the
LEDs (more on that later). The NAND
gates formed the oscillators to ‘roll’ the
dice & performed some logic to always
keep the shift registers in valid states.
There are direct equivalent 74-series
logic chips to the 4093 NAND gates,
such as the 74HC132, which would
run from a 3V supply. However, I
could not find any such equivalent of
the 4015 dual 4-bit shift registers, at
least, not at a reasonable price. There
are 74-series shift registers but single eight-bit shift registers seem to be
much more common/popular than
dual 4-bit types.
So, while it might be possible to
base a new circuit off the old one, it
would make building it quite expensive, which I thought was against the
spirit of the project. I wanted to have
cheap kits, under $20 each, to make it
a fun device that you can build several
of if you are so inclined.
So, back to the drawing board then,
to come up with an equivalent circuit
using more modern (readily available
and inexpensive) parts. While I was
revising the design, I thought I would
see if I could come up with a way to
do it with fewer chips. Spoiler: my
design uses just three to do the same
job (with two spare logic gates!). But
before we get to that, let’s look at the
problem I had to solve.
Of course, I considered using a PIC
to do this, but what’s the fun in that?
The software would be trivial and the
resulting board would be tiny and
pretty cheap to build, but it would be
a ‘black box’. Keeping with the discrete
logic means that anyone can understand how the circuit works.
Rolling the bones
There are basically four things a
battery-powered circuit needs to do
to emulate rolling two dice:
1. Switch on when the button is
pressed (and switch itself off some
time later, so you can’t forget)
2. Trigger two oscillators when the
button is pressed, each
The SMD and through-hole LED prototypes. Both versions have the option
of a white or black PCB. The black PCB is showing the dice rolls four & three, while
the white PCB shows six & one (although it’s only faintly visible due to the camera flash).
44
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
of which increments the number on a
die, going through the sequence 1, 2, 3,
4, 5, 6, 1... with decreasing frequency,
so it eventually stops on two numbers.
3. Keep track of what number each
die is currently showing.
4. Convert that number (1-6) into a
pattern of LEDs akin to the dots on the
face of a traditional die.
For #1, I decided on a trick we’ve
used a few times in previous projects:
a Mosfet with a capacitor and parallel resistor between gate and source,
plus a second resistor (and in this
case, diode) to pull the gate up when
the button is pressed. The RC time
constant of the first two components
sets the maximum time the Mosfet
will remain on, powering the circuit,
before switching itself off.
The advantage of this approach is
its simplicity and low cost, requiring
just one small Mosfet (as the circuit’s
current requirements are low) and a
few passives. The disadvantage is that
it switches off by slowly lowering the
supply voltage. That means the dice
LEDs fade out rather than just switching off, but I can’t see the harm in that.
That gives you a bit of warning that it’s
going to switch off!
For #2, I copied the design from
the May 1994 circuit, where the
same button that switches the unit
on also charges up a pair of capacitors that control two oscillators using
schmitt-trigger NAND gates as inverters. The voltage on the capacitor affects
the oscillator rate, so they slow down
and then stop when you release the
button.
I made one change here; the original
circuit used two capacitors of identical values and relied on the fact that
no two capacitors will be exactly the
same value to cause the oscillators to
desynchronise, so you don’t get the
same numbers on each die.
I found that did not work too well –
in one test, I had 20 rolls in a row where
both dice gave the same number! I think
this was because the oscillators were
close enough that feedback through
the power supply was locking them
together. Using two different values for
the capacitors fixed that, and I think
it’s more pleasing that the ‘dice’ stop
at different times; just like real ones.
#3 and #4 are where the designs
really differ, and this is where I was
able to save one IC. Unlike the 1994
design, where state-keeping and
decoding were somewhat muddled
siliconchip.com.au
together, my design keeps them mostly
separate.
To keep track of the state of each
die, instead of using shift registers, I
am using the registers in a dual 4-bit
counter IC, the common 74HC393.
Normally each counter will go from
0 to 15 and then back to 0, repeating
forever, with the counter incrementing on each clock pulse. However, we
want it to roll back to zero after five,
so it has six discrete states.
We achieve that by creating a ‘crude’
AND gate for each counter out of a
dual common anode schottky diode.
We connect the cathodes to the O1
and O2 outputs, the anode to the CLR
input and pull the CLR input up with
a resistor.
Fig.1 shows how the O1 and O2
outputs both go high for the first time
when the counter reaches 6. It is at this
point that the diode stops conducting,
allowing the pull-up resistor to assert
the clear input, causing the counter to
reset to zero. When it resets, O1 and
O2 go low, so clear is immediately de-
asserted. This causes the counter to go
0, 1, 2, 3, 4, 5, 0, 1, 2, 3...
LED driving
So we have our die states and we
can roll them, but how do we drive the
LEDs? I spent a couple of hours pondering how to convert the O0-O2 outputs of each counter to the six required
LED states that are shown in Fig.1, trying to find the absolute minimum of
low-cost logic to do it.
The logic required can be minimised
by driving some LEDs from one end,
with others driven at both ends. By
driving the LED from both ends, we
effectively get a ‘free gate’, because it
will only light in one of the four possible states of a pair of digital outputs.
It will light with the anode pulled
high and the cathode low. In two other
states (low/low and high/high), there
is no voltage across the LED. In the
fourth, it is reverse-biased and will not
conduct (at least, not with the meagre
3V we are applying).
Complicating things a bit is the fact
that our counter doesn’t go from 1 to
6, but from 0 to 5. I considered that we
don’t necessarily need the numbers to
come in order; as long as all are present
and equally likely. However, I figured
out a way for them to occur in order,
so I kept it that way.
The problem with mapping counter
values of 0-5 to die face numbers of 1-6
Australia's electronics magazine
is that the O1 and O2 outputs change
on the counter transitions from 1 to 2,
3 to 4 and 5 to 0 on the counter. That
would correspond to die face values of
2 & 3, 4 & 5 and 6 & 1, when those are
actually the most similar states (two
of them differing only by the state of
the middle LED).
Instead, I decided that a counter
value of zero should show six on the
die face, with the other five values
(1-5) mapping to those same values
on the die face. That makes decoding
much easier, but keeps the numbers
in sequence (6, 1, 2, 3, 4, 5, 6, 1, 2...).
Circuit details
Having decided on that, we can
immediately sort out the central LED.
It is always lit for odd numbers but
never for even numbers. As shown in
Fig.1, O0 is always high for odd die
case numbers and low for even ones,
so we just need to connect the O0 output to the middle LED’s anode (via a
resistor) and connect its cathode to
ground, as shown in Fig.2, and it will
light at the right times.
Next, let’s consider the two diagonal
LEDs that will light initially to show
two, then three, remaining on for four,
five and six. We could chose either
diagonal pair but I have opted for LED2
(upper left) and LED3 (lower right), as
per Fig.1. The only die face number
Fig.1: how the three binary counter
outputs O0-O2 correspond to the
counter value and die faces.
August 2024 45
where they are off is one; they are on
for the five remaining possibilities.
The logic required to detect a one
from the O0-O2 outputs is O0 AND
NOT (O1 OR O2), which gives 1 for
a die face of one and 0 for everything
else. That can be rewritten as O0 AND
(O1 NOR O2). NAND ICs are more
common than AND, but that’s OK
because using one instead just inverts
the result, meaning we get a result of
0 for a die face of one from IC2b/IC1c.
We therefore connect this gate output (pin 8 of IC1c) to the anodes of
LED2 & LED3, connect their cathodes
to ground, and they will light for any
die face state but one.
So far, besides the counter IC, we
just need two NOR gates and two
NAND gates for both dice. Two-input
logic ICs usually have four gates each,
so with one NOR and one NAND IC,
we have two of each gate type left. We
want to use two NAND gates for our
oscillators, leaving us with just two
NOR gates. Is that enough to drive the
remaining four LEDs?
Actually, we don’t need any more
logic gates; we’ve already performed
all the logic we need! The other two
diagonal LEDs, LED6 & LED7, need to
light for die face states of four, five and
six. That’s the same set of states as for
LED2 & LED3, except the ones where
the O1 output is high (two and three).
Therefore, all we need to do is connect the anodes of LED6 & LED7 to
the same point as LED2 and LED3
and connect their cathodes to the O1
output. LED6 and LED7 will therefore light when LED2 and LED3 are,
except when the O1 output is high. In
that case, both ends of LED6 & LED7
will be at the same voltage. Therefore,
LED6 and LED7 are off for values of 1,
2 & 3 and on for 4-6.
Finally, we have the middle LEDs on
either side, LED4 & LED5. They only
come on to show six, when all three
digital outputs of the counter, O0-O2,
are low. We already have a NOR gate
(IC2b) combining outputs O1 and O2;
its output will be high only for two die
face values, one and six. So all we need
to do is eliminate one.
So we connect the NOR gate output
(pin 4 of IC2b) to the anodes of LED4
Fig.2: the circuit is based on one dual 4-bit counter, four
schmit-trigger NAND gates, two NOR gates and a few
other bits.
46
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
& LED5, and join their cathodes to the
O0 output. They will only light when
the anode is high (states one & six)
and cathode is low (states two, four
and six). Therefore, they only light
up for six.
That’s it – all LEDs are lit at the
appropriate times, and we have two
NOR gates to spare! I couldn’t think
of anything useful to do with them; I
suppose they could have been used to
buffer some LEDs, so the NAND gate
didn’t need to drive so many, but I
found it easier to leave them unused
and tie their inputs to GND.
Power supply and oscillators
22μF capacitor C6 is usually charged
up to the full cell voltage, so Q1’s gatesource voltage is 0V and it remains off.
The circuit’s ground is therefore disconnected from the bottom end of the
cell, and the circuit is not powered. In
case of any leakage, C6 is kept charged
by the 10MW resistor between Q1’s gate
and source terminals.
When the contacts of S1 (tactile
pushbutton) or S2 (vibration switch)
close, current can flow from the positive terminal of the 3V cell via the two
schottky diodes in D5 to two places.
One of those current paths flows
through a 1kW resistor to discharge C6,
raising Q1’s gate voltage to around 3V
and switching it (and thus the rest of
the circuit) on.
Once the switch is released, the
10MW resistor slowly recharges C6,
eventually switching Q1 and the rest
of the circuit off after about a minute.
22μF capacitor C7 is discharged at
the same time, via a second 1kW resistor, but this one charges more quickly,
via a 100kW resistor to ground. This
produces the voltage that varies the
oscillator speed from fast to slow, then
stopped, to simulate the dice roll.
That voltage starts high when the
switch is pressed and then drops.
It is applied to the inputs of both
schmitt-trigger inverters (IC1a and
IC1d) via 1MW resistors, charging up
the 47nF & 68nF capacitors from those
points to ground. Once those capacitors charge to a certain point, the output of the inverter goes low, discharging the capacitor quickly via D3 or D4.
The cycle then repeats.
We only use parallel diodes for D3
and D4 so that we can use identical
diode parts throughout the circuit,
making component sourcing and construction easier.
siliconchip.com.au
As the ‘dice roll’ voltage drops, the
charge current through 1MW resistor drops, so it takes more and more
time for the oscillator cycle to complete. When the voltage from C7 drops
below the negative-going threshold
of schmitt-trigger inverters IC1a and
IC1d, they can no longer oscillate, and
the dice display remains static until a
switch contact closes or the unit powers down.
The reason we have both C6 and
C7 is that we want C6 to charge more
slowly, so the unit stays on for a while,
but C7 charges fast so the dice roll
completes within a couple of seconds.
There is a 22μF capacitor across the
coin cell to improve its surge current
capability, plus a 22μF bypass capacitor for IC1 and 100nF bypasses for IC2
and IC3. A high-value bypass capacitor is used for IC1 because we don’t
want voltage variations due to different LEDs lighting to affect the oscillators too much, or that could bias the
dice rolls (increasing the chance of
them stopping on certain numbers).
The different value oscillator capacitors (47nF & 68nF) ensure the oscillators run at different rates, so there is
no relationship between the number
shown on the two dice.
LED colours
You could use the same colour of
LED for both die faces but we think
it’s helpful to have them be different
colours. For example, if two people
need to roll one die, you can assign
them each a colour and roll them
together. Still, it’s up to you.
We chose blue and red because
they both have a high efficiency and
give similar brightness with 1kW current-limiting resistors running from a
3V supply. The red LEDs do draw a little more current, as they have a lower
forward voltage, but both are pretty
economical on power. The blue LEDs
are quite bright at about 0.5mA while
the red LEDs are similar at around
1.2mA.
We tried green LEDs and they barely
lit up with the 1kW series resistors running from 3V. We considered lower
resistor values but that would put quite
a strain on the button cell. Another
colour that could work well is white.
Yellow or amber LEDs might work
well if they are high-efficiency types.
A note on vibration sensors
One of the biggest challenges during
Australia's electronics magazine
the development of this project was
finding vibration sensors that actually
worked! One of the most common such
devices is the SW-18010P, which we
have used before. However, it turns out
that there a lot of dud/fake/counterfeit/
badly made devices around sold under
the name SW-18010P. So you have to
make sure you get them from a reputable supplier.
The first lot of SW-18010Ps we got
were complete duds, despite getting
them from a supplier who had sent us
good parts previously. They have tiny
writing on the black body, as shown
below. While they showed some signs
of life, you had to shake them at Earthquake Magnitude 10 level to get any
sort of switch closure and it seemed
very inconsistent. So in the bin they
went.
Thinking that maybe the SW-18010P
was not a good part to use, we looked
for alternatives and found several
likely ones: the SW-200D, SW-420D
and SW-520D, all described as “highly
sensitive vibration switches”. We duly
purchased some of each, and were
shocked upon receiving them to find
that they were all tilt sensors, not
vibration sensors!
It’s easy to tell that because you
can hear a ball rolling inside them
when you tip them, and they have a
high resistance in some orientations
and a low resistance in others, even
when static. So they clearly were not
suitable.
Finally, we found a seller online
who actually supplied us with
SW-18010P sensors that worked. As
you can see in the photo, they have a
slightly lighter body and larger writing. DigiKey also sells the AdaFruit
version of this part (Cat 1528-2158ND) which would be a good option if
you need to buy it yourself.
Still, our kits will come with parts
that we’ve checked and found to be
working, so if you build this from a kit,
Two different SW-18010P vibration
sensors we purchased. We found that
the ones with smaller writing on the
side were highly unreliable! The ones
shown at the top work much better.
August 2024 47
The underside of the SMD (left) and through-hole (right) versions of the Dual
Mini LED Dice use the same components. There is also a Nylon screw used to secure the
coin cell, to reduce the risk of a child getting a hold of it.
you shouldn’t have to worry too much
about the sensor being functional. By
the way, the less-sensitive SW-18015
and SW-18020 devices are probably no
good because even the SW-18010P is
barely sensitive enough (you have to
give it a pretty firm shake to activate it).
While the vibration sensor makes it
a very fun device to use, it it is a bit of
a gimmick. Even though you have to
shake it fairly hard to get a good roll,
accidental triggering is still a problem.
For example, if you transport it in a
car, it will roll the dice if you go over
a pothole or big bump in the road. If
you keep it in a pocket, it could be triggered while you walk, wearing down
the battery.
If you’re playing a game and depend
on a good roll, we suggest you use the
pushbutton to roll the dice as it seems
to give better randomisation. Still,
as long as you make sure you give it
a good shake, it seems to work well
enough, and it certainly will wake it
up from sleep reliably.
Construction
Despite the design being mostly
SMD based, we’ve chosen to use 3mm
through-hole LEDs as we think they
look more like the coloured dimples on
a die face and, as their lenses project
above the tops of the SMDs, they stop
the other components on the board
from detracting from the LED display.
We have produced an alternative
PCB (coded 08103242) that uses SMA/
M3216/1206 (imperial) sized SMD
LEDs instead, for any constructors who
might prefer the slimmer result. We
could have designed a PCB to accept
both but then we think it wouldn’t
have looked as good when using the
3mm through-hole LEDs.
Both PCBs measure 59.5 × 26mm
and the overlay diagrams are shown in
Figs.3 & 4. Components mount on both
sides of the PCB. The top side mainly
has the LEDs and their current-limiting
48
Silicon Chip
resistors, while all the ICs and the battery are on the other side. Once assembled, the whole thing can be encapsulated in a length of clear heatshrink
tubing for protection.
We recommend that you start by
mounting all the SMDs on the side of
the PCB with the LEDs (the ‘front’). The
resistors will be labelled with codes
like those shown in the parts list; you
may need a magnifier to see them. The
capacitors will not be labelled so don’t
get them mixed up once you remove
them from their packages.
There are various ways to solder
these components but the way we
assembled the prototype was to put
a little solder on one pad then, holding the part with tweezers, slide it
into place while heating that solder.
We removed the iron and let it solidify once the part was centred on its
pads. We then checked its alignment
and, if it was off, reheated the solder
and gently repositioned the part with
tweezers.
Once it was nicely centred and flat
on the board, we soldered the opposite
pad, ensuring we added enough solder
for it to flow onto and adhere to both
the pad and part. We then waited for
that to solidify, added a tiny bit of flux
paste to the initial joint and heated it
with the iron tip to reflow it. Repeat
until all the passives are in place on
the top side.
Next, mount Mosfet Q1 (SOT-23)
towards lower left. Use a similar technique but this time there are three pins
to solder. Follow with the other SOT23 package devices on the top side,
diodes D3 through D5.
If you are building the board with
SMD LEDs, fit them next. Don’t get the
different colours mixed up or it will
look odd; use all the same colour LEDs
for each die face. Ensure the cathodes
are orientated as shown for LED1 in
Fig.4. You can check this with a DMM
set on diode test mode. Carefully touch
the probes to the LED leads. When it
lights up, the red probe is on the anode
and the black probe on the cathode.
Now is a good time to clean any
flux residue off this side of the board
with isopropyl alcohol, methylated
spirits or (ideally) a specialised flux
cleaning formula. After that, flip the
board over.
Parts on the other side
The three ICs mount on this side. All
three are in similar 14-pin SOIC packages, so don’t get them mixed up, and
make very sure that you identify pin 1
and locate it as shown on the underside overlay. It’s difficult to remove
and refit an SMD IC unless you have
a hot air station!
Use a similar technique as before,
tacking one pin in place and checking that all the pins are aligned over
their pads before soldering the other
corner pins, then the remainder. You
can add a little flux paste along both
rows of pins and drag solder them, or
just touch a soldering iron loaded with
a little solder to each pin and the flux
should draw it onto the pin and pad.
Don’t be too concerned if you accidentally bridge two pins. Once all
pins are soldered, check for bridges
and, if you find any, add more flux
paste to those pins and use a piece of
Both versions of the LED Dice
(shown at actual size) can be
covered with heatshrink for
protection. You can then use it
via the pushbutton, or by shaking
it (if you have mounted the
vibration sensor).
Australia's electronics magazine
siliconchip.com.au
solder-wicking braid to draw off the
excess solder. Once all three ICs have
been soldered, clean off the flux residue and check that all the solder joints
are good with a magnifier, and verify
there are no bridges.
You can then fit the two remaining
diodes on this side, then the three
100nF capacitors and two 100kW resistors. Clean off any new flux residue,
then flip the board back over and solder the tactile pushbutton in place.
Try to get it straight so it looks neat.
If using the through-hole LEDs, now
is a good time to solder them in. With
the board right-side up (the side that
the LEDs sit on), the anodes (longer
leads) all go towards the top, and the
flat side of the lenses to the bottom.
Insert each LED fully, then solder and
trim the leads once you are sure it is
sitting flat on the PCB.
Return to the underside of the
board and tin one of the rectangular
cell holder pads near the edge. Add a
smear of flux paste onto both of those
rectangular pads.
Rest the cell holder in place and
make sure the entry side is facing the
edge of the board (if you’re unsure of
the correct orientation, consult our
photos). Add a bit more flux paste
on top of the two tabs that rest on the
PCB. Once you’re sure it’s lined up
correctly, gently press it down and
feed solder onto one of the tabs. You
may need to turn your iron up due to
the thermal mass of the metal holder.
If you will be using the vibration
switch, leave it off for now as it’s easier to test the circuit without it.
Testing
If you have a current-limited bench
supply, you can set it to 3V/50mA and
connect it using clip leads. Clamp the
red alligator clip to the metal shell of
the cell holder but make sure it isn’t
touching any other components or
tracks on the PCB. Carefully clip the
black one to the edge of the PCB near
the cell holder so it contacts the round
pad under the holder but nothing else.
Switch the supply on.
If you don’t have that, you can just
use a lithium coin cell. They can’t
deliver a lot of current and it’s easy to
temporarily slip one into the side of
the cell holder, making enough contact to power the circuit but allowing
you to quickly pull it out if something
seems wrong.
Note that if you use a coin cell, the
siliconchip.com.au
Figs.3 & 4: we didn’t find the coin cell shorted the adjacent LED leads, but make
sure you trim them close to the PCB. For the SMD version, the LED cathodes all
go towards the bottom of the PCB.
circuit will take a little while (probably
60s) to settle. The LEDs may be dim at
first but should get brighter, assuming
you are using a fresh cell.
When power is applied, you should
Australia's electronics magazine
see the LEDs immediately light up
and the dice roll. If that doesn’t happen, or the circuit draws more than
20mA, switch it off check for incorrectly placed or soldered components.
August 2024 49
Parts List – Mini LED Dice
1 double-sided PCB coded 08103241, 59.5 × 26mm ●
1 SMD 20mm coin cell holder (BAT1)
1 CR2032 lithium coin cell
1 2-pin SMD tactile pushbutton (S1)
1 SW-18010P vibration sensing switch (S2) (optional)
1 75mm length of 30-40mm diameter clear heatshrink tubing
1 M2 × 6mm Nylon panhead machine screw
1 M2 Nylon hex nut
Semiconductors
1 74HC132 schmitt-trigger quad 2-input NAND gate CMOS IC, SOIC-14 (IC1)
1 74HC02 quad 2-input NOR gate CMOS IC, SOIC-14 (IC2)
1 74HC393 dual 4-bit binary counter CMOS IC, SOIC-14 (IC3)
1 AO3400 30V 5.8A N-channel logic-level Mosfet or equivalent, SOT-23 (Q1)
7 blue 3mm high-brightness diffused lens LEDs (LED1-LED7) ●
7 red 3mm high-brightness diffused lens LEDs (LED11-LED17) ●
5 BAT54A dual common-anode schottky diodes, SOT-23 (D1-D5)
Capacitors (all SMD M3216/1206 size 50V X7R unless noted)
4 22μF 6.3V 2 100nF
1 68nF
1 47nF
Resistors (all SMD M3216/1206 size 1% unless noted)
1 10MW (code 106 or 1005)
2 10kW (code 103 or 1002)
2 1MW (code 105 or 1004)
16 1kW (code 102 or 1001)
3 100kW (code 104 or 1003)
Substitutions for SMD LED version (replaces the parts marked with ●)
1 double-sided PCB coded 08103242, 59.5 × 26mm
(instead of PCB coded 08103241)
7 blue 3mm high-brightness SMD M3216/1206/SMA size LEDs (LED1-LED7)
7 red 3mm high-brightness SMD M3216/1206/SMA size LEDs
(LED11-LED17)
1 Mini LED Dice kit with through-hole LEDs (SC6849; $17.50)
2 Mini LED Dice kit with SMD LEDs (SC6961; $17.50)
Each kit includes everything in the parts list, except the cell. Price does not include postage.
A common cause of faults is a bridge
between IC pins that’s near the body
of the IC, making it hard to spot.
Assuming it’s working, check that
both dice show valid numbers (refer
to Fig.1). Press S1 and roll the dice,
then check again that the states are
valid. Repeat until you have seen all
six numbers on both dice.
If any of the dice don’t look right,
check if it’s because one or more LEDs
are not lighting. If so, they might be
connected backwards, have bad solder
joins or (in rare cases) be duds. If all
the LEDs are lighting but some of the
patterns are wrong, check for solder
bridges between IC pins or between
components.
About 30 seconds after pressing S1,
you should notice the LEDs fading out.
Typically the blue ones will fade out
and switch off before the red ones due
to their higher forward voltages. After
about 90 seconds, the LEDs should be
off and the circuit is in a low-power
state. Pressing S1 should switch it back
on and roll the dice again.
50
Silicon Chip
Note that it’s possible to get a short
roll with a short press of S1. The
results should still be random, but if
you want to be sure, hold it down for
a half a second or so rather than just
pressing it.
Final assembly
If you are fitting the vibration sensor, remove the cell and bend its leads
at right-angles to fit the PCB pads. We
suggest doing this with two pairs of
fine-nosed pliers to avoid damaging
the sensor by applying too much force
to the lead where it enters the sensor
body. Lay it over the rectangle in the
top-left corner of the board, solder it
in place and trim the leads.
Now reinsert the cell and shake the
board. It should switch on and roll
the dice. They should roll every time
you shake it.
Insert a short Nylon M2 machine
screw through the small hole in the
PCB, with the head next to the coin
cell, and add a Nylon hex nut on the
back. Do it up tightly, then trim off the
Australia's electronics magazine
excess screw shaft length with side
cutters. While it is almost impossible
for children to remove the coin cell
(due to the holder’s tightness), it provides an extra layer of safety against
especially keen toddlers.
Finally, slip a length of ~35mm
diameter clear heatshrink tubing over
the whole assembly, shrink it down
(try to spread the heat out, rather than
heating just one area) and trim the
ends. That will protect it from moisture, dust, shorting against anything
metal etc. To change the cell, cut it off
and shrink on a new piece.
You can use the board without the
heatshrink tubing but be aware that,
as parts of the circuit operate at fairly
high impedances to improve the battery life, your skin resistance (which
can be well under 100kW) can mess
with its operation. So it’s better to
sleeve it.
I noticed when I encapsulated the
prototype, because the board got quite
hot, it activated and the dice started
rolling really fast. It went back to normal when it cooled down. I put this
down to increased leakage through
the Mosfet due to heat, providing
enough current for the circuit to run,
along with changes to the schmitt-
trigger thresholds affecting the oscillator speed.
Also, if you are using the vibration
sensor, its operation could be affected
if it is squeezed too tight. I noticed a
slight reduction in sensitivity but that
could probably be fixed by adding a
small slit in the tubing near the sensor
to relieve the pressure on it. Alternatively, try to avoid shrinking the tubing fully in that area.
Conclusion
We aren’t sure whether the randomness of our Dual SMD LED Dice
is sufficiently good to run a tournament, but it should be fine for casual
game playing and it’s a conversation
piece compared to regular dice. It also
demonstrates what you can achieve
with some very simple digital logic!
If using the vibration sensor, it probably isn’t a good idea to keep it in a
bag, a pocket or a vehicle as it might
use up its battery quite quickly. SC
Coin Cell Precautions
Even though we have added protections
such as the locking screw, it is best to
make sure that children do not use this
device unattended.
siliconchip.com.au
|