This is only a preview of the January 2022 issue of Silicon Chip. You can view 38 of the 112 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. Articles in this series:
Items relevant to "Two Classic LED Metronomes":
Articles in this series:
Items relevant to "Multi-Channel Speaker Protector":
Items relevant to "The Raspberry Pi-based PicoMite":
Articles in this series:
Items relevant to "Remote Control Range Extender":
Purchase a printed copy of this issue for $11.50. |
Classic LED
Metronomes
These two Metronome designs simulate
the classic mechanical, invertedpendulum metronome with its batonlike pointer swinging left-and-right,
producing a click at each extreme. Both
designs use only discrete components
and simple logic chips, making them easy
to understand and build. Plus they are
both great projects for a beginner.
By Randy Keenan
I
dislike typical “modern” electronic
metronomes that only click and/or
blink once per beat. I came up with
these designs to better simulate the
mechanical metronomes that I know
and like. Both designs light a series of
LEDs, accompanied by a speaker that
produces beat sounds.
The first design uses eight LEDs and
fits in a standard plastic case, while
the second, slightly more complicated
design has 10 LEDs and uses a custommade timber case. So the latter is a
good project for those readers who
have some woodworking experience.
In both cases, the LEDs are arranged
in an arc and light up in sequence, forward and reverse, to mimic the swing
of an inverted pendulum. A click at
each end of the LED arc further simulates a mechanical metronome. A
typical metronome tempo range is
40-208 beats/minute, a ratio of 5.2 to
one; in these Metronomes, the range
is extended to 36-216 beats/minute, a
ratio of six to one.
Either project is excellent for a
beginner; there are no high-frequency
signals, high voltages or tricky wiring
involved. Nor is there any need to
program a chip with software. However, some measurements and adjustments will be needed to calibrate the
instruments after construction, given
the expected component tolerances.
Two designs
The slightly simpler 8-LED Metronome uses 74HC-series logic ICs
and can be battery-powered, while
the 10-LED Metronome uses CD4000series logic ICs and is intended to be
powered from a plugpack. The two circuits operate similarly: A pulse generator clocks an up/down counter IC at
Fig.1: the 8-LED Metronome is based around three 74HC-series digital logic ICs. The 74HC132 generates pulses at a
selectable frequency. These clock the 74HC191 counter, and its three-bit output drives the eight LEDs via the 74HC137
decoder chip. The remaining three gates in the 74HC132 quad NAND package are used to form a set-reset flip-flop to
reverse the LED chaser’s direction each time it reaches one end, and to generate a pulse from the speaker.
24
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
although it is a different logic chip.
Both versions enable the LEDs at
each end of the arc to flash brighter.
You could also use either of these
circuits anywhere a LED ‘chaser’ is
needed.
LED options
The LED metronome comes in two versions; one with eight LEDs and
another with 10 LEDs (shown in this photo). The case to house it can be as
simple as a small timber frame with a clear plastic panel at the front.
the rate required for the desired tempo.
Another IC decodes the counter value
to light the LEDs sequentially.
A set/reset flip-flop (SR-FF) switches
the counter direction when either end
LED is lit, giving forward and reverse
LED sequences. The click is produced
by ORing the signals to the end LEDs,
followed by a differentiator to shorten
the pulse and a one-transistor amplifier to drive a small loudspeaker.
The block diagrams of the two Metronomes are shown in Figs.1 & 2. In the
8-LED design, the tempo pulse is generated by a Schmitt-trigger NAND gate
(part of a 74HC132). This clocks fourbit up/down counter IC2 (7HC191).
Only three of the four binary outputs
are used to drive 3-to-8-line decoder
IC3 (74HC137) that lights the LEDs in
sequence (eight is the 137’s limit). The
SR-FF is made from two more NAND
gates in the 74HC132.
In the 10-LED design, the pulse is
generated by a CMOS version of the
ubiquitous 555 timer. It clocks fourbit up/down counter IC3 (CD4029)
which drives decoder IC4 (a CD4028)
with 10 outputs. The SR-FF logic is
again provided by two gates from IC1,
There are many options for the LEDs
in these Metronomes. The parts lists
indicate the suggested LEDs, but other
sizes, shapes and colours can be substituted. The two end LEDs could even
be different from the middle LEDs.
However, all LEDs should have
high luminous intensity, ideally at
least 4000mCd (sometimes called
“superbright”). This is to reduce
power consumption. For the 8-LED
Metronome, that maximises battery
life, while in the 10-LED design, it
limits the load on the CD4028 driving IC to a safe level.
Both Metronomes were made using
5mm oval LEDs: green for the 8-LED
version, and red for the 10-LED version. I used oval LEDs because they
glow in a line rather than a dot, providing a more interesting display. 3mm
& 5mm round LEDs are also suitable.
Tinted and diffused lenses look best.
You can use different LEDs from
those specified, but you might need
to adjust some resistor values.
The 8-LED version
The LEDs should be of the same
type and matched; if using different
LEDs at the ends, use matched LEDs
for those two and separately matched
LEDs for the rest. The minimalist circuit is shown in Fig.3 and it works as
follows.
Schmitt-trigger quad NAND gate
IC1d is configured as a pulse generator.
Fig.2: the 10-LED Metronome uses a 555 timer IC instead of a logic-gate-based oscillator as the pulse generator. The
remaining logic ICs are from the 4000-series; a 4029 acts as the up/down counter, while a 4028 is the 4-to-10 decoder that
drives the LEDs. Two of the gates of the 4001 quad NOR IC form the set-reset flip-flop, and the other two gates form the
click pulse.
siliconchip.com.au
Australia's electronics magazine
January 2022 25
The pulse frequency, and thus the
metronome tempo, is determined by
potentiometer VR1, resistors R1 & R2
and capacitors C1-C3.
For an explanation of the operation
of a Schmitt-trigger pulse generator,
see the adjacent panel. Its pulses clock
IC2, an up/down binary counter. IC2’s
outputs are fed to decoder IC3 to light
the eight LEDs in sequence.
The outputs of IC3 and the inputs
of IC1a, IC1b and IC1c use negative
(active-low) logic because IC1 is a
NAND gate rather than a NOR gate
(see the panel on SR-FFs).
The alternative would have been
to use the 74HC7002 Schmitt-trigger
NOR gate with a 74HC237 decoder
and positive logic, but the 74HC7002
is less common and more expensive
than the 74HC132.
When IC3 is counting up, it lights
each LED in sequence, from LED0 to
LED7. When LED7 lights, the low level
at pin 7 of IC3 (Y7) is also applied to
the SR-FF formed by IC1a and IC1b.
This causes pin 6 of IC1b (Q) to go
high, causing IC2 to reverse its direction and count down. Each LED is
now lit in sequence in the opposite
direction. When the first LED, LED0,
is lit, the SR-FF is reset, IC2 reverses
and counts up, and the cycle repeats.
VR2 controls the overall LED brightness. The circuit is designed to make
LED0 and LED7 brighter than the others. The relative brightnesses of the
end-vs-middle LEDs is maintained as
VR2 is adjusted by LED8 or a zener
diode, ZD2. Whenever current is
applied to LED1-LED6, LED8/ZD2 is
in series with that LED, reducing the
voltage across the current-limiting
resistors and thus the LED current.
VR2 could be changed from 500kW
to 1MW to extend the brightness range
down to very dim levels. If you want
VR2 to turn the LEDs completely off
at minimum, fit R3 (300kW), but note
that this creates a large ‘dead zone’ in
the lower range of VR2.
LED8 may be the same type as LED0
through LED7, but for more brightness
contrast between the end and middle
LEDs, use a type with higher forward
voltage such as blue or white, or use a
zener diode of approximately 4.7V. If
you want all LEDs to have equal brightness, fit a wire in place of LED8/ZD2.
Click sounds
When either end LED is lit, the low
level at Y0/Y7 is also sent to IC1c,
which behaves as a NOR gate when
operated in negative logic mode (a low
at either input causes a high output).
Its output is fed to the Click Loudness
control (VR3) and then to a simple
transistor amplifier.
However, the pulse from IC1c is
too long and would cause a click at
the end of the pulse as well as at its
beginning, and the current would be
high during the pulse on-period. To
avoid this, the pulse passes through
C4 and/or C5 to yield a short pulse at
each end of the original pulse, a positive one at the beginning and a negative one at the end.
Diode D1 shunts the negative pulse
so that only the positive pulse is
applied to the base of transistor Q1.
Power supply
This design is powered by a battery
of four AAA cells. 74HC ICs are used
rather than 74HCT or 74LS because
the 74HC series allows a slightly
higher supply voltage, up to 6V. Fresh
standard alkaline AAA cells supply
marginally more than 6V, so the voltage rail for the ICs is limited using
a 47W resistor and a 6V zener diode
(ZD1). Alkaline, dry cell, rechargeable NiMH or Li-ion AAA cells can
be used.
Fig.3: this 8-LED Metronome circuit shows more details than Fig.1. VR2 allows you to set the LED brightness while LED8
or ZD2 reduces the brightness of the middle six LEDs compared to the outer two. Extra capacitors C2-C3 and resistor
R2 allow you to adjust the frequency range to match the beats-per-minute (bpm) range shown on the dial. Additional
capacitor C5 is provided to change how the clicks sound.
26
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
Using a Schmitt-trigger gate as a pulse generator
Gate IC1d of the 74HC132 Schmitttrigger input NAND chip generates the
pulses that clock the counter (IC2).
So what is a Schmitt-trigger gate, and
why are we using one?
An ‘ordinary’ non-Schmitt-trigger
gate or inverter is effectively a highgain but mostly linear amplifier. As
a result, the output transition from
high-to-low or low-to-high takes place
over a narrow input voltage range, as
shown in Fig.a, a plot of the output
voltage versus the input voltage.
As a result, the negative-feedback
RC circuit shown in Fig.b will typically
reach equilibrium at some point (E),
with the output ‘stuck’ at an intermediate voltage. If the input were to
increase in voltage, as indicated by
the arrow, the output would respond
by decreasing and would restore the
circuit to point E with a time constant
determined by R and C. The reverse
is true if the input voltage decreases.
You can test this yourself on a
breadboard if you have a spare
74HC00 NAND gate chip. Just
remember to connect all the unused
inputs to one supply rail or the other.
A DVM will show that the voltage at
pin 3 is stable.
In contrast, the Schmitt-trigger version of the gate ensures oscillation
due to its built-in hysteresis and associated positive feedback. This is illustrated in Fig.c, an equivalent plot to
Fig.a but for a gate with Schmitt-trigger inputs.
Once the input voltage increases
above the upper-threshold input voltage (VT+, point U), the output immediately ‘snaps’ to a low level (point
V). It remains there until the input
decreases below the lower-threshold
input voltage (VT−, point L) and the
output ‘snaps’ high (point W).
This can be demonstrated by breadboarding the circuit shown in Fig.d.
Begin with the pot at extreme clockwise (pins 1 & 2 at +6V) and apply
power. The LED should remain off.
Slowly decrease the input voltage via
the pot until the LED goes on; note
the input voltage. Now increase the
input voltage gradually until the LED
goes off. There should be a couple of
volts difference; this is the hysteresis
spread (VT+ − VT−).
You have made one clockwise trip
siliconchip.com.au
Fig.a & b: the transfer function of a standard NOR gate.
The output is low when the input is high and vice versa,
but if the input voltage is intermediate, the output
voltage can be anywhere in between.
Fig.c & d: a Schmitt-trigger inverter has
hysteresis, so once its input voltage is high
enough, the output snaps low and stays low
until the input voltage drops significantly.
Similarly, when the input voltage drops and
the output goes high, it remains high until the
input voltage increases significantly.
Fig.e: the
input & output
waveforms for a
Schmitt-trigger
inverter used as
an oscillator.
around the hysteresis rectangle, as indicated by the arrows in Fig.c.
Because of this, if you substitute
a Schmitt-trigger 74HC132 for the
74HC00 in Fig.b, you will find that it
oscillates, generating a square wave
at the output. The input exhibits an
Australia's electronics magazine
exponential pseudo-triangle wave
of amplitude equal to the hysteresis
spread, as shown in Fig.e.
One crucial point to consider is
how the rate of oscillation will vary
with supply voltage (especially in a
battery-powered circuit). As it turns
out, the deceased capacitor charging
current is somewhat compensated by
the decrease in hysteresis spread (as
it is somewhat proportional to the IC’s
supply voltage). Thus, the pulse rate
only changes by a few percent from
6V to 5.5V (an 8% change in voltage).
January 2022 27
The 4700μF and 470μF bulk bypass
capacitors, in combination with the
47W series resistor, reduce the supply
voltage pull-down by the click-pulse
current through the speaker.
As PCB-mounting potentiometers
with built-in switches are rare, a separate power switch is used. A regulated 6V DC plugpack could be used
instead of a battery. Make sure you
verify it is regulated as otherwise, its
output voltage would be too high for
the circuit.
The 10-LED version
The circuit for this version is shown
in Fig.4. It is similar to the 8-LED
version but positive logic is used
throughout. The pulses are generated by CMOS 555 timer IC2. It clocks
IC3, a four-bit up/down counter. IC3’s
outputs are decoded to 10 individual
outputs by IC4, lighting the 10 LEDs
in sequence.
When an end LED (LED0 or LED9)
is lit, the SR-FF formed by IC2a & IC2c
is set or reset, thus switching IC3 into
up or down mode, reversing the LED
sequence.
VR5 controls the LED brightnesses.
Instead of the technique used for the
8-LED design to make the end LEDs
brighter, this version uses a current
mirror comprising Q1 and Q2 with
trimpot VR4, control potentiometer
VR5 and some fixed resistors. VR4
adjusts the brightness of the middle
LEDs relative to the brightness of the
two end LEDs. See the adjacent panel
for an explanation of how this works.
Click generation and circuit variations are the same as for the 8-LED
design. The higher supply voltage of
this version provides a louder click.
Construction
Fig.5 is the PCB layout diagram for
the 8-LED version, while Fig.6 is for
the 10-LED version. Most components
mount on the boards. A few might need
their values tweaked; that is why some
parts do not have an associated value.
Whichever version you are building,
the construction process is initially
similar. Start by fitting all the resistors
with fixed values given, using a DMM
to check the values before soldering
them in place.
Follow with the diode(s), ensuring
their cathode stripes face as shown
Fig.4: the 10-LED Metronome uses a more complicated LED brightness control scheme with PNP transistors Q1 & Q2
forming a current mirror, so the brightnesses of the middle eight and outer two LEDs track over a wide adjustment range.
LED10 lights up the beats-per-minute adjustment dial. Besides these differences, and using a CMOS 555 timer as the pulse
generator, the circuit is quite similar to the 8-LED version.
28
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
How a current mirror works
A current mirror circuit is used to match two or possibly
more currents under varying conditions. Fig.f shows a basic
example; similar NPN bipolar transistors Q1 and Q2 have
their bases tied together and set at a control voltage, Vb.
Thus, their emitters will be at equal voltages, approximately
0.6V lower than Vb.
If the emitter resistors, R1 and R2, are of equal resistance, they will conduct equal currents of approximately
Ic = (Vb – 0.6V) ÷ R.
Assuming a sufficiently high current gain (>≈100) for the
transistors, and thus negligible base currents, the collector current of each BJT would be the same as its emitter
current; in other words, the currents through LOAD 1 and
LOAD 2 would be matched. If the base voltage (Vb) is varied,
the emitter and collector currents will vary, but will remain
matched between the two transistors.
Likewise, if one or both loads vary in resistance – within
limits – their currents will still be equal and given by the
equation above.
For the brightness control of the 10-LED Metronome, we
want the current to the middle LEDs to be a fraction of the
current to the end LEDs, and to be the same fraction over
a wide range of currents. If we used the above scheme, the
circuit would be something like Fig.g, with R being a fraction of VR + R, ie, unequal emitter resistors.
However, there is a problem with this: since each group of
LEDs is alternately turned off, that load resistance becomes
extremely high. As a result, the transistor in the off leg of
the circuit has no collector current, and the base current
becomes large because the base-emitter junction is a forward-biased diode. This reduces the base voltage, and thus
the collector current of the other transistor.
For example, Fig.g shows one of the middle LEDs on,
while the end LEDs are both off, resulting in high base current through their transistor (Q2).
To avoid this, I devised a different scheme for the 10-LED
Metronome, shown in Fig.h. This works because the two
loads are, in practice, nearly constant and equal, each consisting of one LED at a time.
The current-mirror circuit is turned on its head, using PNP
transistors rather than NPN. Each group of LEDs is made
part of an emitter circuit, in series with a resistor that will
determine its current and relative brightness.
When lit in sequence, each middle LED is in series with
R1 + VR4, which is made larger than R2 in series with each
end LED. The collector current of Q1 will be a fraction of
that of Q2 (R2 ÷ [R1 + VR4]). This fraction — the ratio of currents — will be maintained over a range of Vb as controlled
by VR5, and thus the brightnesses of the eight middle LEDs
will be a fraction of the brightnesses of the two end LEDs
over a wide range.
This situation will break down if Vb is above 12V − Vled −
0.6V or about 10V. This is avoided by padding the ends of
VR5 with fixed resistors. Trimpot VR4 allows the resistance
ratio R2 ÷ [R1 + VR4] to be set as desired, thus setting the
brightness difference.
Fig.f: a basic current mirror circuit. Since Q1 & Q2
are similar transistors, and thanks to the negative
feedback provided by the emitter resistors, varying
their base voltages using the potentiometer results in
closely matched currents through the two independent
loads.
Fig.g: different emitter resistor values can be used to
make the load currents different, but they keep similar
current ratios when the base voltage is varied.
Fig.h: the circuit shown in Fig.g can suffer from excessive base current problems when the loads can be switched on
and off independently. This circuit solves that by swapping the NPN transistors for PNP and keeping the currentsetting resistor connections at the transistor emitters.
siliconchip.com.au
Australia's electronics magazine
January 2022 29
Fig.5: most of the
8-LED Metronome
components mount
on the PCB, as shown
here. Assembly is
straightforward
but be careful
to orientate the
ICs, LEDs and
diodes as shown.
Also, don’t get the
potentiometers
mixed up as they all
have different values
(check the codes
printed on their
bodies).
in the appropriate overlay diagram
and that you don’t get the different
types mixed up. Remember that for
the 8-LED version, you either fit zener
diode ZD2 or LED8, not both. If using
LED8, push it down onto the board
with the longer lead to the pad marked
A and then solder it in place.
The ICs are next. They can be soldered directly to the PCB or plugged in
via sockets; it’s up to you. Either way,
make sure the pin 1 notches/dots face
as shown and don’t get the two different 16-pin ICs mixed up. Note that
IC3 on the 8-LED board (74HC137) is
oriented opposite to the other two ICs.
Fit the capacitors next, starting
with the smaller non-polarised types
and then moving onto the electrolytic
capacitors, which must be orientated
with their longer positive leads placed
towards the + symbols. The 1000μF
capacitor on the 10-LED board is laid
over as shown before soldering and
trimming its leads. As with the resistors, leave off any that don’t have values indicated as those pads are for
tuning later.
There are no trimpots or discrete
transistors on the 8-LED board. However, on the 10-LED board there are
three trimpots: two 5kW (VR1 & VR3)
and one 100kW (VR4); as well as two
PNP transistors (Q1 & Q2) and one
NPN transistor (Q3). Fit them now,
being careful not to get the different
30
Silicon Chip
types of transistors mixed up. If your
Q3 transistor is taller than the others,
bend its leads so that it is laid over on
its side before soldering to ensure sufficient clearance for the front panel later.
Note that the PCB has footprints to
accommodate different types of transistors from those specified; assuming
you are using the BC558 suggested in
the parts list, they are placed as shown
in Fig.6.
Both boards use a 3-way terminal
block for power, although you can solder wires to its pads instead. If fitting
it, do that next, with the wires entering the front of the board and passing
around to the rear via the notch on the
edge of the board.
Continue by selecting the LEDs you
are going to use. You might wish to
order extras so that you can pick out
a matched set from the larger number.
Fig.7: a drilling
template for the front
panel of the 8-LED
version. Eleven holes
need to be drilled:
eight for the LEDs
(size & shape to suit
the LEDs you are
using, marked “A”)
and three 8mm holes
for the potentiometer
shafts, marked “B”.
The dashed circles
show the positions of
mounting posts within
the specified case; do
not drill those.
While we specify 3mm
diameter holes for “A”,
the size will depend on
what type of LEDs you are
using.
Australia's electronics magazine
siliconchip.com.au
Fig.6: the 10-LED Metronome is slightly more complicated than the 8-LED version. Note the components laid on their sides
and make sure to place the transistors in the positions shown, unless you are substituting those with a different pinout.
Note that it’s common for their brightnesses to look similar when fairly
bright, but at very low currents (say
around 30μA), they can vary considerably when dim. Try to select the ones
which match best for the middle LEDs.
If you have a bench supply, one
good way to compare the brightness
is to connect several in series, along
with a current-limiting resistor, then
power the entire string from the bench
supply and slowly wind its voltage up.
That way, you can make a direct comparison over a range of brightnesses.
The construction now diverges for
the two versions.
Finishing the
8-LED Metronome
Measure the resistance across VR1’s
track (from one end pin to the other)
and divide the reading by five. This is
the value you should aim for with R1 +
R2. We’ve specified two 10kW resistors
in the parts list because VR1 should
be close to 100kW.
If VR1 does not measure close to
100kW, vary the values of one or both of
those 10kW resistors (eg, changing one
to 9.1kW or 11kW) to get their total as
close as possible to 20% of VR1’s value.
The 8-LED version fits in a Serpac
siliconchip.com.au
131-BK plastic enclosure, but other
enclosures could be used instead. If
using the 131-BK, use the side with
the best appearance as the upper end.
After selecting the LEDs, drill the LED
and potentiometer holes in the front
half of the enclosure. Fig.7 may be used
as a drilling template.
You can print the guide onto card
stock, punch out the mounting holes
to 5mm and temporarily glue the guide
to the inside of the front half of the
enclosure.
If using the recommended oval
LEDs, you will need to carefully elongate the holes after drilling. Note that
the illuminated line from an oval LED
is perpendicular to the larger dimension of the LED body. Decide which
orientation you want and orientate the
LEDs and holes accordingly. When
drilling or adjusting the LED holes,
check that the LEDs fit into the holes
snugly but do not require excessive
insertion force.
Fit the three pots to the PCB without
soldering them, and attach the PCB to
the front of the enclosure. I removed
the small protruding bits on the front
of each pot. To allow space for the components on the PCB, you might need
spacers on the screws. Check the shaft
Australia's electronics magazine
lengths and shorten them as needed
for your knobs.
The shaft-gripping sections of the
knobs that I used were recessed by
several mm. So for pots VR2 and VR3,
I sanded down the backs of the knobs
to about 12.5mm total height to enable
the knobs to grip the shorter pot shafts
adequately.
If the knobs are not tight enough,
the plastic shafts of the potentiometers can be deformed a bit by pinching them with pliers. Solder the three
pots now, after re-checking they have
the correct values.
Now, paying attention to their orientations (see the A & K markings on
the PCB), insert the LED leads into
the board without soldering them. If
using oval LEDs, they will need to be
twisted slightly to conform to the arc.
Again, attach the PCB to the front
half of the enclosure and manoeuvre
each LED into its proper hole in the
front of the enclosure. It’s best to have
them protruding slightly. Check the
LEDs’ appearance and adjust as necessary, then solder the LEDs to the
PCB while it is in place. The LEDs
will probably not be seated on the
PCB but spaced away from it by several millimetres.
January 2022 31
Fig.8 is the tempo dial; this can be
downloaded from the Silicon Chip
website. It is a good idea to print it on
photo paper for a good appearance.
This assumes that VR1 is equivalent
to the type specified in the parts list;
it needs to rotate through a 280° arc.
Align the dial to the tempo pot shaft
and glue it to the front of the enclosure. Fit the knob to the tempo pot
such that its rotation extends equally
beyond the 36 and 216 tempo lines;
this is because pots typically have a
dead zone at each extreme where the
resistance changes very little.
NPN transistor Q1, the 4700μF
capacitor, switch S1, the speaker, and
the battery holder are not mounted on
the PCB but attached to the rear half of
the enclosure (see the photo below).
The speaker holes may be in any pattern. I used a perforated metal sheet,
selected a drill bit of the diameter of its
holes, clamped the sheet to the inside
of the rear half of the enclosure and
used it as a drilling guide.
Attach the slide switch to the panel
using small screws and nuts. The battery holder and speaker are held in
place with clips made from a large,
heavy-duty paper clip.
Q1 and the 4700μF capacitor are
mounted close to the speaker and
wired directly to the speaker terminals to minimise parasitic resistances;
they are not switched by S1, likewise
to reduce parasitic resistance. This can
be important since the supply voltage
is relatively low and speaker impedance is 8W.
When the Metronome is switched
off, there will be only a minuscule
leakage current through these components. However, if the Metronome
is unused for an extended period, it’s
best to remove the cells.
Solder the emitter lead of transistor
Q1, the negative lead of the capacitor,
and a wire to a solder lug before fitting them to the enclosure. Check the
wiring of these components carefully:
a mistake can cause excessive current
and damage Q1 or cook the speaker
coil and cone.
Cut a timber base to suit the enclosure and attach the rear half to it using
screws, giving the enclosure a slight
backward tilt.
Finally, attach the off-PCB parts to
the 3-way terminal block as shown in
the photos. If you don’t want to use
a terminal block, you can solder the
wires directly to the PCB pads.
Adjustments
The tempo and its range will likely
need adjustment. Eight different
74HC132 ICs showed a spread of a
few percent, with one about 7% above
the average. The tempo may not correspond to the dial markings because
of this, plus variations in the timing
capacitors and the resistances of VR1
and R1/R2. Pots can vary by as much
as 20%.
For the LED Metronome, some of
the components such as the speaker
and battery holder are not mounted
on the PCB, but are instead fitted
onto the rear of the enclosure. This
photo shows the 8-LED Metronome
arrangement.
48
44
40
38
36
54 60 72
88
104
120
160
216
50mm
Fig.8: print this dial artwork for the
8-LED version on photo paper, cut it
out and glue it to the front of the case.
The exact diameter is not critical,
but it should be close to 50mm. This
is available to download from our
website as a PDF.
32
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
If you are not happy and want to
bring the tempos into agreement, a
frequency meter is very helpful. The
type built into many low-cost DMMs
is adequate.
Measure the pulse frequency at pin
11 of IC1 or pin 14 of IC2. With VR1 set
at the lowest tempo (aligned with the
marking showing 36 beats/minute),
find a capacitor or paralleled capacitors for C1-C3 that give a pulse frequency of 4.2Hz (see Table 1).
If you don’t have a selection of
capacitors to try out (or want to save
time), calculate the percentage error in
the frequency (actual vs expected) and
measure the capacitance across C1-C3.
Multiply the capacitance reading by
the percentage and divide by 100. This
is how much capacitance you need to
add (if it’s too fast) or subtract (if it’s
too slow).
To subtract capacitance, you’ll need
to replace C1 and/or C2 with lower
value capacitors, then re-check and
possibly add a bit more capacitance by
fitting C3 to get the frequency spot-on.
Assuming you selected R1 & R2
as 1/5th the value of VR1, with VR1
aligned with 216 beats/min, you
should get a frequency reading of
25.2Hz (see Table 1). If this is significantly off, you might want to adjust
those resistor values, reducing the total
to speed it up or increasing them to
slow it down. Calculating the percentage frequency error relative to 25.2Hz
tells you the percentage by which the
total resistance must change.
CON1
3
2
1
Similar to the 8-LED Metronome, the 10-LED metronome also has components
mounted on the rear panel rather than on the PCB, as can be seen in the photo
below, with the wires emanating from the top of this one.
The final result should have all tempos from 36 to 216 (and thus pulse frequencies in Table 1) agreeing with the
dial markings.
Finally, check the click loudness
and timbre. Check that VR3 varies
the click loudness smoothly from zero
to maximum. If it is too soft at maximum, a transistor with a higher hFE
is needed. If the click does not vary
smoothly, replace the 220W resistor
with a higher value until the loudness
variation is satisfactory.
You can vary the timbre of the click
by adding a capacitor at the position marked C5. Adding capacitance
should give a more ‘mellow’ click.
You can also try the speaker in both
polarities as that can affect the sound.
Troubleshooting
If the LEDs don’t light up or behave
Table 1 – Pulse frequency (Hz)
versus tempo (beats/minute)
Tempo
(bpm)
36
38
40
44
48
54
60
66
72
80
88
104
120
160
216
8 LEDs
(Hz)
4.20
4.43
4.67
5.13
5.60
6.30
7.00
7.70
8.40
9.33
10.3
12.1
14.0
18.7
25.2
siliconchip.com.au
10 LEDs
(Hz)
5.40
5.70
6.00
6.60
7.20
8.10
9.00
9.90
10.8
12.0
13.2
15.6
18.0
24.0
32.4
CON1 pin 3
CON1 pin 1
CON1 pin 2
Australia's electronics magazine
January 2022 33
strangely, check the orientation of all
the parts.
Check for solder bridges or poor
joints and that IC pins are not bent.
Check also that there is a pulse at pin
11 of IC1 and pin 14 of IC2.
Finishing the
10-LED Metronome
The mounting holes for VR2 can
accept a 280° pot (matching the others) or a larger 300° pot. While the difference is subtle, the 300° pot allows
the tempo numbers to be spread out
slightly more. Before fitting VR2, measure its resistance, divide by 5.5 and
check that this is close to 18kW. If not,
you might need to replace the 18kW
resistor with a different value that’s
close to this.
If your IC3 is a 4029, fit the solid
red wire link shown in Fig.6. Otherwise, fit the wire link where there is
a dashed red line. You can use a component lead off-cut for either.
Insert LED10 through the PCB from
the back (see the photo on page 33).
Solder its leads on the back of the PCB
to pads “K” and “A”.
Rather than a dial applique as used
in the 8-LED version, the 10-LED
Metronome uses a transparent plastic
disc printed black with clear tempo
numbers (Fig.9). Choose the design
appropriate for your VR2 potentiometer type. If the printed disc is not
sufficiently rigid, a clear backing disc
might be needed.
Glue the disc to the back of a plastic
bushing fitted by friction or glue onto
the shaft of VR2. This bushing can be
made from a cut-down knob. LED10
illuminates the tempo numbers of the
disc to show through the plastic panel.
LED10’s brightness is determined by
the value of resistor R2, specified as
10kW; if you aren’t happy with the
brightness, lower the value of R2 to
make it brighter or increase it to make
it dimmer.
For the 10-LED version, the LEDs do
not protrude through the front panel,
but show through, so holes for the
LEDs are not needed. The holes for the
two lowest potentiometers (VR5/6) can
be 8mm, but VR2 will require a larger
hole to accomodate the bushing holding the tempo dial.
You will need to cut a thin panel on
which to mount the PCB with 15mm
threaded standoffs. This panel will fit
into the back of the timber frame. This
panel also carries the speaker, power
34
Silicon Chip
Parts List – 8-/10-LED Metronome
8-LED Metronome
1 double-sided PCB coded 23111211, 71 x 98mm
1 3-way terminal block (CON1)
1 Serpac 131-BK plastic instrument case, 111 x 82.5 x 38mm
[Mouser 635-131-B, Digi-Key SR131B-ND]
1 timber base, 75 x 90 x 12.5mm (DIY)
4 AAA cells, preferably NiMH rechargeables (BAT1)
1 4xAAA battery holder (BAT1) [Keystone Electronics 2482;
Mouser 534-2482, Digi-Key 36-2482-ND]
1 8W loudspeaker, 36mm diameter (SPK1) [DB Unlimited SM360608-1;
Mouser 497-SM360608-1, Digi-Key 2104-SM260608-1-ND]
1 100kW linear 9mm/10mm vertical potentiometer (VR1)
[Mouser 652-PTV09A4025UB104]
1 500kW linear 9mm/10mm vertical potentiometer (VR2)
[Mouser 652-PTV09A4020UB504]
1 5kW linear 9mm/10mm vertical potentiometer (VR3) [Mouser
652-PTV09A4030UB502, Digi-Key PTV09A4030UB502-ND]
1 SPST or SPDT slide switch (S1) [Alpha SS60012F-0102-4V-NB; Mouser
SS60012F-0102-4V-NB]
1 14-pin DIL IC socket (optional; for IC1)
2 16-pin DIL IC sockets (optional; for IC2 and IC3)
3 knobs to suit VR1-VR3
4 adhesive rubber feet
2 small machine screws and nuts (for mounting slide switch)
1 large, heavy-duty paper clip
8 No.4 x 6mm self-tapping screws
2 small, short (~10mm) panhead wood screws (for mounting case to base)
1 solder lug with ~3.25mm diameter hole
various lengths and colours of light-duty hookup wire
Semiconductors
1 74HC132 quad 2-input Schmitt-trigger NAND gate, DIP-14 (IC1)
1 74HC191 presettable 4-bit binary up/down counter, DIP-16 (IC2)
1 74HC137 or 74HC138 3-to-8 line decoder, DIP-16 (IC3)
1 30V 1A NPN transistor, TO-92 (Q1)
[KSD471ACYTA, KSC2328AYTA or ZTX690B]
8 ‘superbright’ LEDs, round or oval (LED0-LED7)
[Broadcom HLMP-HM74-34CDD (green, oval), Kingbright WP7083ZGD/G
(green, 5mm), Jameco 2169846 (green, 3mm)]
1 6.0V 500mW zener diode (ZD1) [1N5233 or equivalent]
1 blue/white LED or 4.7V zener diode (LED8/ZD2) [1N5231]
1 150mA schottky diode; eg, BAT46/BAT48/BAT85 (D1)
[Jaycar ZR1141, Altronics Z0044, Mouser 511-BAT46]
Capacitors
1 4700μF 6.3V electrolytic [Mouser 667-EEU-FS0J472]
1 470μF 6.3V low-profile electrolytic [Mouser 232-63AX470MEFC8X75]
4 1μF 50V multi-layer ceramic
1 100nF 50V ceramic
1 220pF 50V ceramic
Resistors (1% 1/4W, 1/8W or 1/16W small body metal film unless otherwise stated)
1 300kW (optional)
2 10kW
While we recommend using 1% resistors, you can
1 2.2kW
use 5% resistors if desired. It might need more
2 220W
adjustments to get the tempo range correct.
1 47W
10-LED Metronome
1 double-sided PCB coded 23111212, 108 x 89mm
1 12V DC 100mA+ plugpack
Australia's electronics magazine
siliconchip.com.au
Table 2: resistor colour codes
1 3-way terminal block (CON1)
1 chassis-mount barrel socket to suit plugpack (CON2)
1 8W loudspeaker, 50mm diameter (SPK1)
[DB Unlimited SM500208-1; Mouser 497-SM500208-1]
2 5kW top-adjust mini trimpots (VR1, VR3)
1 100kW 280° linear 9mm/10mm vertical potentiometer (VR2)
[Mouser 652-PTV09A4025UB104] OR
1 100kW 300° linear 9mm/10mm vertical potentiometer (VR2)
[Mouser 652-PDB12-M4251-104BF] (see text)
1 100kW top-adjust mini trimpot (VR4)
1 20kW linear 9mm/10mm vertical potentiometer (VR5)
[Mouser 652-PTV09A-4030UB203, Digi-Key PTV09A-4030U-B203-ND]
1 5kW linear 9mm/10mm vertical potentiometer (VR6)
[Mouser 652-PTV09A4030UB502, Digi-Key PTV09A4030UB502-ND]
1 SPDT slide switch (S1) [Alpha SS60012F-0102-4V-NB;
Mouser SS60012F-0102-4V-NB]
1 14-pin low-profile DIL IC socket (optional; for IC1)
1 8-pin low-profile DIL IC socket (optional; for IC2)
2 16-pin low-profile DIL IC sockets (optional; for IC3 and IC4)
1 timber base, 75 x 150 x 12mm (DIY)
1 timber frame, 110 x 130 x 40mm (DIY)
1 red-tinted transparent acrylic panel, 100 x 125 x 2.5-3mm (or to fit frame)
3 knobs to suit VR2, VR5 & VR6
1 clear, printable plastic and plastic backing for tempo dial, bushing or cutdown knob for mounting onto VR2
4 M3-tapped 15mm spacers (for mounting PCB to panel)
8 M3 x 6mm panhead machine screws (for mounting PCB to panel)
2 small machine screws and nuts (for mounting slide switch)
2 M3 x 10mm panhead machine screws, flat washers and nuts (for mounting
speaker)
1 large, heavy-duty paper clip
6 small, short (~10mm) panhead wood screws
various lengths and colours of light-duty hookup wire
1 55x55mm square of speaker cloth
Semiconductors
1 CD4001BE quad 2-input NOR gate, DIP-14 (IC1)
1 TLC555IP or LMC555CN CMOS timer, DIP-8 (IC2)
1 CD4029BE, CD4510BE or CD4516BE 4-bit binary up/down counter, DIP-16
(IC3)
1 CD4028BE 4-to-10 binary decoder, DIP-16 (IC4)
2 BC558 30V 100mA PNP transistors, TO-92 (Q1, Q2)
1 30V 2A NPN transistor, TO-92 (Q3) [KSC2328AYTA or ZTX690B]
1 150mA schottky diode; eg, BAT46/BAT48/BAT85 (D1)
[Jaycar ZR1141, Altronics Z0044, Mouser 511-BAT46]
10 ‘superbright’ LEDs, round or oval (LED0-LED9)
[Cree C566D-RFE-CV0X0BB1 (red, oval) recommended]
1 5mm ‘superbright’ red LED (LED10) [Kingbright WP7113SRD/J4
recommended]
Capacitors
1 4700μF 16V electrolytic, 13mm diameter [Mouser 232-16PK4700MEFC125X]
1 1000μF 16V electrolytic, 8mm diameter [Mouser 232-16ZLH1000MEFC8X2]
5 1μF 50V multi-layer ceramic
2 100nF 50V ceramic
Resistors (1% 1/4W, 1/8W or 1/16W small body metal film unless otherwise stated)
1 22kW
1 18kW
2 10kW
1 4.7kW
1 3.3kW
2 390W ½W
4 220W
2 22W
siliconchip.com.au
Australia's electronics magazine
jack, power switch, 4700µF electrolytic and two 22W resistors (see photo).
Use the correct power socket to match
your plugpack output.
The speaker is held in place by
screws and nuts, with washers that
have been bent down on one side.
You can use hot melt glue or silicone
sealant to secure the large electrolytic
capacitor.
This panel, and thus the PCB, is
secured to the frame by small wood
screws that attach to four approximately 8 x 8 x 12mm pieces of timber glued to the inside corners of the
frame.
There’s nothing extraordinary
about the case; I made mine in the
same manner as a picture frame, with
four 45° mitred timber pieces glued
together. If you don’t like doing
woodwork, you could probably find
a plastic box with a clear lid that’s
large enough to house the PCB and
other components, and drill holes in
the lid for the pots.
Checkout and adjustment
Before applying power, carefully
check the wiring to the off-board components; a mistake here can cause
excessive current and damage Q3 or
cook the speaker coil or cone. Compare your wiring to that shown in our
photos.
Because of variations in components, the tempo will likely need to be
brought into line. A frequency meter
(even a very basic one as found in
many DMMs) or scope is helpful for
adjusting the tempos.
January 2022 35
120
120
50mm
Fig.9: there are two dials for the 10-LED Metronome to suit the larger 300°
potentiometer (left), or the standard 280° potentiometer (right). Unlike the 8-LED
version, these are printed on transparent film and connected to the rotating pot
shaft. Thus LED10 behind can shine through and illuminate the selected tempo.
Set-reset flip-flops (SR-FF)
Both Metronome designs incorporate
a set/reset flip-flop (SR-FF), a logic
circuit with two states: set and reset.
Applying a high level to the S input
while keeping the R input low puts
the flip-flop into the set state, and it
remains there until reset. Similarly,
applying a high level to the R input
while keeping the S input low puts
the SR-FF into the reset state, staying
there until set again.
By today’s naming standards, the
SR-FF is a transparent latch and not
a flip-flop as it has no clock input, but
the traditional term “flip-flop” continues to be used. Another way of thinking of it is as a 1-bit memory store or
a bistable circuit.
An SR-FF is a simple type of sequential logic circuit, which means that its
output depends on its ‘history’; it has a
memory. Compare this to combinatorial logic in which the outputs depend
only on the value of the inputs; there is
no history or memory involved.
An SR-FF can be made from two
NOR gates, as shown in the adjacent
diagram, or you can get dedicated flipflop ICs. In the 10-LED Metronome,
we’re already using NOR gates for
other purposes, so doing it this way
avoids the need for an extra IC.
It works as follows. Imagine that
both the S and R inputs are low. The
circuit can initially be in either state:
set, with Q high and Q low, or reset,
vice versa. Pulsing S high will cause
Q to go low or to stay low, which will
cause Q to go high, which is the set
state. Further pulsing of S will have
36
Silicon Chip
no effect since Q holds the upper
NOR-gate input high, assuming that
R remains low.
Similarly, pulsing R will cause Q to
go low and thus Q to go high, which
is the reset state. Further pulsing of
R will have no effect, assuming that
S remains low.
For the 8-LED Metronome, the
SR-FF is constructed from two NAND
gates rather than NOR gates. All this
means is that the SR-FF uses negative
logic; in negative logic, NAND gates
become NOR gates, and the SR-FF is
set and reset by negative (low) pulses,
specifically, from LED7 (set) and LED0
(reset). The SR-FF Q output is sent to
the 74HC191 counter to change its
counting direction.
The 10-LED Metronome has an
SR-FF, constructed from two NOR
gates in the CD4001. Positive logic
is used, and the SR-FF operates as
described above.
Turn VR2 to the slowest tempo (36
beats/min) and measure the pulse frequency at pin 3 of IC2 or pin 15 of IC3.
Adjust the control voltage (pin 5) of
the timer, IC2, via trimpot VR1 to get
a frequency of 5.4Hz (see Table 1). If
adjusting trimpot VR1 cannot bring the
frequency to 5.4Hz, you need to add
another capacitor in parallel with C1
& C2 (at position C3) to slow it down,
or reduce the value of C1 and/or C2
to speed it up.
Once this frequency is correct, set
the tempo to 216 beats/min and adjust
trimpot VR3 to get 32.4Hz. If VR3 cannot bring the frequency to 32.4Hz,
change the value of its 18kW series
resistor, then repeat the adjustments
for the slowest and fastest tempos.
Finally, adjust trimpot VR4 to
the desired difference in brightness
between the two end LEDs and the
middle LEDs.
Click timbre and loudness can also
be modified for the 10-LED version.
Adjust the value of resistor R1 for
a smooth variation in loudness, as
described for the 8-LED version.
To change the timbre of the click,
experiment with the combined value
of C4-6. A larger capacitance should
produce a more mellow click. The
speaker can also affect the tone, so try
the speaker in both polarities if you
aren’t satisfied with the initial result.
Troubleshooting
If the Metronome is not working,
check the orientation of IC2 and associated parts. Also, check that the IC
pins are all inserted correctly; they
sometimes get bent and don’t go into
the socket or PCB. Check if there is a
pulse at pin 3 of IC2 and pin 15 of IC3.
If the LED sequence is only in one
direction, it is likely that the SR-FF is
not working or not receiving the S and
R pulses from IC4.
Operation
A set-reset flip-flop (SR-FF) made
from two NOR gates. The Q and
Q outputs always have opposite
polarity; Q is brought high when the
S input goes high, while Q goes low
when the R input goes high. Both
inputs must not be high at the same
time.
Australia's electronics magazine
The operation of either version is
straightforward. Turn the Metronome
on and adjust the Click Loudness, LED
Brightness and Tempo as desired.
The supply current for the 8-LED
Metronome is about 2-4mA, depending on the LED brightness, click loudness and tempo. AAA cells typically
are rated at about 900mAh. Thus,
assuming it is used for about half an
hour a day, alkaline or rechargeable
cells should power the 8-LED version
for about a month.
SC
siliconchip.com.au
|