This is only a preview of the December 2015 issue of Silicon Chip. You can view 37 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 "High Visibility 6-Digit LED GPS Clock":
Items relevant to "Check Turntable Speed With This White LED Strobe":
Items relevant to "Speech Timer For Contests & Debates":
Items relevant to "Arduino-Based Fridge Monitor & Data Logger":
Purchase a printed copy of this issue for $10.00. |
Design by JOHN CLARKE
Speech Timer For
Contests & Debates
If you are involved in school or university debating contests or in
Toastmasters International, you will be aware of the importance
of a speech timer. It keeps meetings and events on time and also
prevents individual speakers from droning on past their allotted
time. The timer presented here has a large 3-digit display plus three
large LEDs and a buzzer. Plus, it has a tiny infrared remote control.
T
HE INITIAL impetus for this
Speech Timer project came from a
member of Toastmasters International
who was concerned at the primitive
timer employed at his club. Could we
design a timer which met Toastmasters International rules but did not
involve an olde-worlde mechanical
timer and three crudely switched coloured lights?
Well, of course we could! Mind
68 Silicon Chip
you, Toastmasters rules do not make
any mention of 3-digit LED 7-segment
displays – those rules were drawn up
over 80 years ago when carbon-zinc
batteries and incandescent lamps were
state-of-the-art technology! Microcontrollers, light emitting diodes and infrared remote controls would have been
unimaginable!
So our Speech Timer provides the
basic green, amber and red warning
lights plus a manually-operated final
alarm, as required for speeches defined
by Toastmasters’ rules. It also provides
a 3-digit up/down timer, all controlled
by a cheap microcontroller.
Specifically, we have incorporated
preset time periods that match Toastmasters International rules for various speech lengths. Table 1 shows
the details.
These time periods are based on the
siliconchip.com.au
Clock
Brightness
Features & Specifications
A
B
Presets Up
or Seconds
<
Reset
Pause
Presets Down
or Seconds
Specifications
• Power: 12V DC <at> 100mA
• Current drain: 76mA typical at full brightness; up to 100mA with warning
•
•
•
•
LED and Alarm on
Audible alarm: 1.22kHz tone modulated at 200Hz
Display multiplexing: 100Hz
Low battery indication: warning turns on below 8.8V and off above 8.92V
(voltage sampled at 3.3-second intervals)
Latency: ~18ms from press of IR remote button to timer response
July 2015 to June 2016 Speech Contest
Rule Book. By the way, there are apps
and software to time speeches at Toastmasters’ meetings but these are not really useful when they must be seen by
a room (or even a hall) full of people.
Naturally, the Speech Timer can also
be used to time speakers in debating
contests and meetings. In fact, it can be
used anywhere a highly-visible digital
timer is required. By default, it counts
up but it can also be made to count
down (see panel later in the article).
Presentation
The SILICON CHIP Speech Timer
is housed in plastic case with the
3-digit 7-segment LED display on the
front. Down the righthand side are the
three large LEDs, arranged like traffic
lights with red at the top, amber in
the middle and green at the bottom
of the stack. These are duplicated on
siliconchip.com.au
C
Remote Control in the September 2015 issue.
This remote measures just
80 x 40 x 7mm and is powered by a CR2025 3V cell. It
has nine pushbuttons or more
correctly, small snap-action
domes. The buttons are Power
Start
(shown as a circle logo with
a stroke through the top), A,
B and C and a 5-button array.
We have assigned the buttons as shown in Fig.1. The
power button is used for controlling the display brightness while
buttons A, B and C are the warning
indication controls: A for manually
sound the Alarm, B for the warning
LED Brightness and C for manually
Cycling through the warning LEDs.
The functions of the 5-button array are
described later in this article.
A tiny blue LED on the Speech Timer’s front panel flashes to acknowledge
signals from the infrared remote control and it doubles as a low-battery
indicator, staying lit when the battery
voltage is low.
Cycle
Alarm/ Warning
Volume Brightness Warning
Colours
>
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Battery and/or DC plugpack operation
Readout on large 7-segment displays
Visual warnings via green, amber and red indicator lights
Audible warning buzzer (manually-operated)
Optional automatic visual warning operation
Manual visual and buzzer warning control
Separate duplicated warning lights for timekeeper and speaker
Dimming of main display and warning lights
Volume adjustment for audible warning signal
99-minute maximum time period
Preset Toastmasters’ contests and other presets included
Minutes and tens-of-seconds display (seconds display accessible)
Infrared remote control operation
Reset, pause and start timer controls
Blue acknowledge LED for IR signalling
Low battery indicator
<
Features
Fig.1: this artwork is attached
to the top of the case and
shows the button assignments
on the remote control.
the rear of the case, together with the
small loudspeaker which provides the
ending buzzer.
The Speech Timer can be placed
in the room so that the audience and
the speech timer can see the 3-digit
display, while the speaker can only
see the green/amber/red LEDs when
they are lit.
The Speech Timer can be run from
an internal battery (eight AA alkaline
cells) or from a 12V DC plugpack. You
can also use NiMH or Nicad cells instead of alkalines and these can be
trickle charged via the 12V plugpack.
Remote control
Apart from an on/off switch mounted near the socket for the DC plugpack,
there are no controls on the unit. Instead, all functions are set by a tiny
remote control, made by SparkFun –
the same unit as used in our 9-Channel
>
Circuit description
Fig.2 shows the complete circuit
of the Speech Timer. It’s based on a
PIC16F88 microcontroller (IC1) and
this drives the 3-digit 7-segment LED
display and warning LEDs (via transistors Q1-Q8 and IC2 & IC3). IC1 also
monitors the output from the infrared
receiver (IRD1) and the supply voltage.
Each of the LED display segments
comprises four series-connected LEDs
evenly spaced apart and there are two
series-connected LEDs for the decimal
point. When a segment is lit, it will
typically have 7-8V across the four
series-connected LEDs.
That presents a design problem
since IC1 requires a 5V supply while
the displays need to be driven from a
supply voltage of 12V. We solved that
conundrum by tying IC1’s positive
(Vdd) supply rail to the +12V supply
rail, while its negative rail is supplied
from a 7905 3-terminal regulator.
The segment anode lines of the
3-digit display are driven by PNP transistors Q1-Q8 (for the seven segments
plus the decimal points). The emitter
of each transistor is connected to the
December 2015 69
Table 1: Preset & Manual Time Periods (Counting Up)
Type
Length
(minutes)
(Display when
unit reset)
Green Warning Amber Warning
(elapsed
(minutes or
minutes)
minutes:seconds)
Red warning
(elapsed
minutes)
Disqualification
Minimum Period
(minutes:seconds)
Disqualification
Maximum Period
(minutes:seconds)
Any (manually
operated)
Table Topics*
0:0
when selected
when selected
when selected
1-2
1
1:30
2
1:00
2:30
Evaluation*
2-3
2
2:30
3
1:30
3:30
Tall Tales*
International
& Humorous*
Speech1
3-5
3
4
5
2:30
5:30
5-7
5
6
7
4:30
7:30
10'
7
9
10
Speech2
15'
10
13
15
Speech3
20'
15
18
20
Speech4
30'
20
25
30
Speech5
40'
30
35
40
Speech6
50'
40
45
50
Speech7
60'
50
55
60
Speech8
70'
60
65
70
Speech9
80'
70
75
80
Speech10
90'
80
85
90
+12V supply and the collector connected to the segment anode via an
82Ω current-limiting resistor or via
a 180Ω resistor for the DP (decimal
point). Each segment line is driven
when the base of its transistor is pulled
low by the respective output of IC1.
When the base is taken high (ie, +12V),
the transistor is switched off and the
segments are off.
As shown on the circuit, outputs
RA3, RA4, RB1, RB2, RB4, RA0, RB7
& RA2 of IC1 connect to the bases of
transistors Q1-Q8 via 470Ω resistors.
The three common cathode 7-segment displays are multiplexed. This
means that the seven anode segments
and the decimal points of the digits
are driven by the eight transistors and
then each digit is turned on for about
one-third of the time by pulling its
common cathode low.
For a digit to light, its common cathode needs to be connected to the 0V
line of the 12V supply. But we can’t
directly do this via any of IC1’s outputs
since IC1’s negative rail (GND) is only
5V below the +12V supply rail. So the
circuit needs level shifting from the
negative rail of IC1 to 0V.
IC2 & IC3 take care of this level
shifting requirement and drive the
common-cathode connections at the
same time. IC2 is a 4051 analog single-pole 8-way switch that’s used as
a single pole 4-way switch. IC2 can
70 Silicon Chip
connect its common pole contact “Z”
at pin 3 to one of the Y0, Y1, Y2 & Y3
terminals. Which connection is made
depends on the logic level at the A0
and A1 inputs and that is under the
control of IC1.
IC2 has separate supply rails for the
control inputs (Vss) and for its output
switching (Vee). Vss, pin 8, is connected to ground, the negative supply line
for IC1, while Vee is tied to the 0V rail.
So IC2 does the signal level shifting.
The A0 and A1 inputs of IC2 are
driven from the RB6 and RB5 outputs
of IC1 respectively. When both inputs
are low, the Y0 output of IC2 connects
to the Z pole contact of IC2 and is
pulled high via a 4.7kΩ resistor. This
output then drives the 4B input of IC3.
IC3 is a ULN2003 7-Darlington transistor open-collector driver. We use
four of these Darlingtons to separately drive the common cathodes of the
7-segment displays and the common
cathodes of “traffic light” LEDs 1-6 and
the acknowledge/low battery indicator LED (LED7). When 4B is driven,
the 4C collector (pin 13) connects the
common of display DISP1 to 0V, so
that digit lights up.
Other combinations of the A1 and
A2 inputs select the Darlington transistors at IN5, IN2 and IN3. For example,
when A1 and A2 are both high, IC2’s
Y3 output drives 5B of IC3. IC3’s 5C
collector then connects the common
* Denotes Toastmasters contests.
' is the symbol for minutes
of DISP2 to 0V and the second digit
lights up, and so on.
We drive DISP1 for 2.5ms, then
DISP2, DISP3 and then the LEDs, all
for the same 2.5ms period.
Flashing colon display
Note that the connections to DISP3
are mixed up compared to the connections to DISP1 & DISP2. For example,
the “A” segment for DISP1 is connected
to the “A” segment of DISP2, but this
connects to the “F” segment of DISP3.
The reason for that is partly due to the
fact that DISP3 is actually mounted
upside down compared to the others,
so that we can have a flashing colon
between DISP2 & DISP3.
Also, the connections to DISP3 have
been done in this way to make the PCB
pattern practical. Which segments are
driven for each display is sorted out in
the software for IC1, so the different
connections for DISP3 do not matter.
Several different resistor values are
used for driving the displays and LEDs.
We use 82Ω for the segments but the
decimal points for DISP1-DISP3 use
a 180Ω resistor. This is because the
decimal points have only two LEDs,
compared to four in the segments.
A similar comment applies to the
indicator LEDs, where the resistor values are selected to produce a similar
brightness to the 7-segment displays.
For the red and amber LEDs, 330Ω
siliconchip.com.au
siliconchip.com.au
December 2015 71
+
–
B
B
33pF
0V
4.7k
C
E
E
Q9
BC327
RB0
Vdd
RA5/MCLR
14
RB1
RA4
16
15
9
RB5
RB6
RA2
TO
SPEAKER
5
Vss
CON2
OSC1
OSC2
PWM/RB3
RB7
RA0
11
12
1
13
17
8
7
3
2
100nF
RA3
+12V
K
D1 1N5819
A
RB2
IC1
PIC1 6F8 8
PIC16F88
18
10
RB4
AN1
–I/P
6
470 µF
33pF
Q10
BC337
C
100nF
2.2k
X1
20MHz
BATTERY VOLTS
DETECT
1
4
4.7k
8 x AA CELLS
K
SPEECH TIMER
2
λ
3
100Ω
10 µF
CON1
A
D2 1N5819
3
6
9
10
11
8x 470Ω
1W
15Ω
4.7k
B
Q5
B
Q3
B
Q1
EN
1
5
2
4
8
Vss
Vee
7
Y0
Y1
Y2
13
14
15
IC2
40 51 B Y3 12
Y4
Y6
Y7
10 µF
A1
16
Vdd
B
Y5
A2
C
C
C
E Q7 C
E
E
E
B
Q6
B
Q4
B
Q2
C
C
C
10 µF
B
E Q8 C
E
E
E
8 x BC327
A0
Z
POWER
FOR NiMH &
Nicad CELLS ONLY
– SEE TEXT
S1
7 7B
6 6B
5 5B
4 4B
3 3B
2 2B
1 1B
E
8
OUT
GND
dp
fe
g
d
e
b
c
a
f
7C 10
6C 11
5C 12
4C 13
3C 14
2C 15
1C 16
9
7
6
4
3
2
9
10
8
DISP1
K
1
d
g
a
K
5
dp
c
b
f
0V
+12V
dp
fe
g
d
e
b
c
a
K
1
d
g
a
K
5
DISP2
MINUTES
+12V
TP
GND
7
6
4
3
2
9
10
8
10 µF
TENS OF MINUTES
REG1 7905
COM
IC3 ULN2003
180Ω
82Ω
82Ω
82Ω
82Ω
82Ω
82Ω
82Ω
0V
IN
10 µF
dp
c
b
TP
+12V
9
10
2
7
6
3
4
8
c
dp
b
db
c
e
a
f dp
g
K
1
E
a
g
K
5
f
e
6 b
9 f
10 g
2 e
1
B
C
BC 32 7 , BC337
d
DISP3
K
TENS OF SECONDS
A
1N5819
2
3
IRD1
K
A
34
5
8
12
λ
LED7
λ
LED6
λ
LED3
λ
LED5
λ
LED2
K
K
K
K
K
λK K
LED4
K
IN
76
ACK/LO BAT.
A
A
A
A
A
λ
LED1
AA
A
LEDS
OUT
10
470Ω
1k
1k
330Ω
330Ω
330Ω
330Ω
IN
GND
7 9 05
Fig.2: the Speech Timer circuit is based on a PIC16F88 microcontroller (IC1). This drives a 3-digit 7-segment LED display, six warning LEDs (LEDs1-6) and a blue
acknowledge LED (LED7) via transistors Q1-Q8 and IC2 & IC3. IC1 also monitors the output from the infrared receiver (IRD1) and the supply voltage.
SC
20 1 5
IRD1
12V
DC IN
(IRD1 – UNDER)
19111151
100Ω
470Ω
LAY ON
(LED7
UNDER) SIDE +
10 µF
A
A
Q2
Q4
Q5
470Ω
Q3
470Ω
470Ω
470Ω
82Ω
+
82Ω
82Ω
82Ω
82Ω
1k
+
470Ω
100nF
X1
20MHz
TP
+
+12V
+
10 µF
TP
100nF
GND
BC327
Q9
10 µF
IC3 ULN2003
Q6
470Ω
1k
4.7k
IC2 4051B
Q7
GREEN
LED6
S1
2.2k
4.7k
470Ω
3x
BC327
Q8
IC1 PIC16F88
Q1
5x
BC327
4.7k
33pF
A
AMBER
LED5
470Ω
33pF
82Ω
82Ω
180Ω
330Ω
330Ω
330Ω
330Ω
RED
LED4
TP 0V
BC337
Q10
Q1-Q9 = BC327
Q10 = BC337
+
CON2
REG1
7905
5819
–
D2
TO
SPEAKER
470 µF
+
12V
D1
5819
CON1
15 Ω 1W
FOR NiMH & NiCd
CELLS ONLY
– SEE TEXT
10 µF 10 µF
LOOP
TO BATTERY HOLDER
Fig.3: follow this diagram to install the parts on the rear of the PCB. Note that PC stakes are installed at the three test
points (TP) and at the LED4-LED6 positions. LEDs4-6 are then mounted proud of the PCB, as described in the text.
resistors are used. The green LEDs are
much brighter for the same current
and so the current in these is further
reduced using 1kΩ resistors. A 470Ω
current limiting resistor is used for
blue LED7. Dimming is achieved by
switching the displays off for part of
the normal 2.5ms on period.
Infrared receiver
Infrared receiver IRD1 receives the
signal sent by the SparkFun remote.
A unique code is transmitted from the
remote for each separate pushbutton
and the infrared signal is sent as 38kHz
This oscilloscope grab shows the modulated
1.22kHz signal across the loudspeaker when
the alarm is sounding at full volume.
72 Silicon Chip
bursts, using coding that is known as
Pulse Distance Protocol. For further
information about the infrared coding,
refer to the 9-Channel Infrared Remote
Control article in the September 2015
issue – see www.siliconchip.com.au/
Issue/2015/September
IRD1 includes an amplifier and a
demodulator. Demodulation removes
the 38kHz component and IRD1’s pin
1 output goes low when it is receiving
the pulsed 38kHz signal and high in
the absence of signal.
IC1 decodes the incoming signal
from IRD1 and reacts to any valid coded signal. So, for example, when the
“A” button is pressed on the remote
control, the speaker will be driven.
This alarm signal comprises a 1.22kHz
signal modulated at 200Hz.
This 1.22kHz signal is produced
by a PWM (pulse width modulated)
output at pin 9 of IC1. The signal is
buffered using complementary transistors Q9 & Q10 and AC-coupled to
the loudspeaker via a 470µF capacitor.
The volume is set by the actual pulse
width of the signal, with a 50% duty
cycle giving maximum volume.
The accompanying scope waveform
shows the signal across the loud-
speaker when sounding an alarm at
maximum volume. The alarm signal
comprises six or seven cycles of the
1.22kHz tone modulated on and off
at a 5ms rate.
Clock signal
IC1 runs at 20MHz using crystal
X1, to ensure timekeeping accuracy.
20MHz is used in preference to a lower
frequency such as 4MHz, as the software requires considerable processing to drive the displays, update the
timer and decode the infrared signal
without faltering.
The battery voltage is monitored at
analog input AN1 (pin 18) of IC1, via
a 2.2kΩ and 4.7kΩ resistive divider.
IC1 converts the monitored battery
voltage to a digital value and compares
this against the low-battery voltage
threshold of 8.8V. If the battery voltage is low, it turns on LED7 continuously, at a low level. LED7 also flashes
when IC1 receives a valid signal from
the remote control.
As previously noted, the circuit can
be run from a 12V DC plugpack and/
or a battery comprising eight AA cells.
They are connected to power switch
S1 via Schottky diodes D1 & D2. These
siliconchip.com.au
This view shows the fully-assembled PCB. The 15Ω 1W resistor at bottom left is
installed only if rechargeable NiMH or Nicad cells are fitted to the unit. Be sure
to leave this resistor out if you intend using alkaline cells.
diodes provide reverse polarity protection and isolate the 12V plugpack
supply from the AA cells. D2 could
be a standard 1N4004 instead but a
Schottky diode is specified to avoid
any mix up when installing D1 & D2.
A 15Ω 1W resistor can be fitted between the battery and the 12V supply
following D2 to allow trickle charging
of rechargeable NiMH or Nicad cells.
This resistor must be omitted if alkaline cells are used.
REG1 is a 7905 negative regulator
which provides the 5V supply to IC1.
As shown, 10µF supply decoupling
capacitors are included at the input
and output of this regulator while the
supply to IC1 (pin 14) is further decoupled with a 100nF capacitor.
mounted on both sides of the PCB.
Most of the parts are mounted on the
“rear” of the PCB, while the “front” carries the three 7-segment LED displays
(DISP1-DISP3) plus five other parts,
including the infrared receiver (IRD1).
Begin the Speech Timer assembly
by installing the parts on the rear of
the PCB – see Fig.3. The resistors can
go in first, taking care to ensure that
the correct value goes in each location. Table 2 shows the resistor colour
codes but you should also check each
one using a digital multimeter (DMM)
before soldering it into position.
Note that the 15Ω 1W resistor is
Building it
Building the Speech Timer is easy
since all the parts are mounted on a
double-sided PCB coded 19111151
(162.5 x 102mm). This is housed in a
UB2 plastic case (197 x 113 x 63mm),
with the lid replaced by a red Perspex
or acrylic transparent sheet. Alternatively, a cut-out can be made in the lid
that comes with the case and a transparent window fitted to this cut-out.
As shown on Figs.3 & 4, parts are
Table 2: Resistor Colour Codes
o
o
o
o
o
o
o
o
o
o
siliconchip.com.au
No.
3
1
2
9
4
1
1
7
1
Value
4.7kΩ
2.2kΩ
1kΩ
470Ω
330Ω
180Ω
100Ω
82Ω
15Ω
4-Band Code (1%)
yellow violet red brown
red red red brown
brown black red brown
yellow violet brown brown
orange orange brown brown
brown grey brown brown
brown black brown brown
grey red black brown
brown green black brown
5-Band Code (1%)
yellow violet black brown brown
red red black brown brown
brown black black brown brown
yellow violet black black brown
orange orange black black brown
brown grey black black brown
brown black black black brown
grey red black gold brown
brown green black gold brown
December 2015 73
15111191
C 2015
19111151 rev.1
MINUTES x10
DISP1
DISP2
f
b
DISP3
dP
b
e
c
dP
1 2 3 4 5
1 2 3 4 5
A
d
c
b
AMBER
LED2
f
A
dP
RED
LED1
e
g
c
d
5 4 3 2 1
A
g
g
NB: DISP3 MOUNTS
UPSIDE DOWN
SECONDS x10
a
f
d
A
LED7
10 9 8 7 6
a
e
LOW BATT.
IRD1
MINUTES
10 9 8 7 6
8
88
SPEECH TIMER
a
GREEN
LED3
6 7 8 9 10
Fig.4: here’s how to install the parts on the front of the PCB. The 7-segment LED displays (DISP1-DISP3) plug into
5-way SIL socket strips and DISP3 must be installed upside down. IRD1, LEDs1-3 & LED7 are all mounted proud of
the PCB, as described in the text (see also Figs.5 & 6).
only installed if you intend to run the
Speech Timer using NiMH or Nicad
cells. DO NOT install this resistor if
you will be using alkaline cells.
Diodes D1 & D2 can go in next, followed by an 18-pin DIL socket for
IC1. Make sure that these parts are all
orientated correctly before soldering
them to the PCB. IC2 & IC3 can then
be fitted and these parts can either be
directly soldered in place or mounted
via 16-pin sockets.
Regulator REG1 is next on the list.
As shown, this part mounts horizontally with its leads bent down through
90° to fit into the allocated holes. Fasten the regulator’s tab to the PCB using
an M3 x 6mm screw and nut before
soldering its leads. Don’t solder the
leads first – you could crack the PCB
Make sure that all the pins on the 7-segment LED displays
go into the SIL sockets when they are installed.
74 Silicon Chip
tracks or pads as the tab is fastened
down if you do.
Crystal X1 can now be fitted; it’s
mounted just to the right of IC1 and
can go in either way around. That
done, install PC stakes at the 12V supply positions near CON1 (to connect
the battery leads), at the TP 12V, TP
GND and TP 0V positions and at the
LED4-LED6 positions.
The next step is to mount transistors Q1-Q10. Note that Q1-Q9 are all
BC327s, while Q10 is a BC337. Make
sure that the BC337 goes in the Q10
location. Make sure also that the tops
of the transistors sit no more than
10mm above the PCB, otherwise they
will later foul the AA cells (if fitted).
Now for the capacitors. Install these
as shown, making sure that the electrolytic types are correctly orientated.
Note that the 10µF electrolytic capacitor at top left must be installed with its
side flat against the PCB (see photo),
so that it will later clear the AA cells.
Follow with the DC socket (CON1),
the screw terminal block (CON2) and
switch S1. Be sure to install CON2
with its wire entry side towards REG1.
That completes the assembly on
the rear side of the PCB apart from
siliconchip.com.au
Take care to ensure that the LEDs and the three 7-segment displays are all orientated
correctly. Note that DISP3 is installed upside down in order to obtain a flashing colon.
The diode test facility on a DMM can be used to sort out the LED colours (see text).
LEDs4-6. Leave these off for the time
being.
Front PCB assembly
Fig.4 shows the layout on the front
of the PCB. The first step is to install
six 5-way SIL (single in-line) socket
strips to mount the three 7-segment
displays. These socket strips are cut
from three 14-pin IC sockets and the
cut edges filed to a smooth finish before installation. Be sure to push the
socket strips all the way down so that
they sit flush against the PCB before
soldering their pins.
Next, cut the pins on each 7-segment
display to 4mm in length using a pair
of side-cutters. That’s best done by first
cutting a 4mm-wide length of cardboard and then holding this against the
pins as they are trimmed. Don’t install
the displays just yet though. That’s
done after the remaining parts have
been installed on this side of the PCB.
LEDs1-3 can go in first. These must
all be orientated correctly, with the
longer anode leads going to the “A”
position, and they must be mounted
on 12mm lead lengths.
These LEDs all come with clear lenses, so you will have to sort out which
siliconchip.com.au
is red, which is amber and which is
green. That’s easily done by using the
diode test facility on a DMM. Each LED
should light when the DMM’s probes
are connected with the correct polarity (ie, red to anode, black to cathode).
Use a 12mm-wide cardboard spacer
to set the LED heights. It’s just a matter
of sliding the spacer between the leads,
pushing the LED down onto the spacer
and then lightly tack soldering one of
the leads. The other lead can then be
soldered, after which extra solder can
be added to the first lead.
Once all the LEDs are in place, tin
their leads from the PCB to just shy of
the plastic lenses. This will stiffen the
leads and ensure that the LEDs cannot be pushed in from the front panel
when the PCB is installed in the case.
Alternatively, before installing the
LEDs, fit their leads with 12mm lengths
LED7 DETAILS
13mm
A
PCB
K
Fig.5: LED7 is stood off the PCB on
13mm long leads, as shown here.
of 1mm-diameter heatshrink sleeving
(this will also eliminate the need to cut
a cardboard spacer).
LED7 is fitted in similar fashion on
13mm-long lead lengths (Fig.5). Once
again, its anode lead is the longer of
the two and there’s a flat side on the
plastic body adjacent to the cathode.
Now for the infrared receiver. Fig.6
shows how this part is mounted. First,
bend its leads down through 90° exactly 5mm from its body, then fit it to
the PCB on 15mm vertical lead lengths
(use a 15mm-wide cardboard spacer to
set this). It’s a good idea to lightly tack
solder one lead first, then check that
all is correct before soldering the remaining two pins and then refreshing
the first pin with extra solder.
Installing LEDs4-6
The PCB can now be flipped over
IRD1
5mm
15mm
Fig.6: the mounting
details for IRD1.
Its body sits 15mm
above the PCB.
PCB
December 2015 75
all been correctly trimmed to 4mm, as
described earlier.
Battery holder connections
This view shows the case lid with the red Perspex window
in place and the holes drilled and cut for the LEDs & IRD1.
and LEDs4-6 installed. These LEDs
must be installed so that their plastic
bodies are 34mm above the PCB and
to do that, it’s necessary to solder their
leads to tinned copper wire risers.
The first step is to fit 35mm lengths
of 1mm-diameter tinned copper wire
to the six PC stakes in the LED locations. Make sure that these wires are
perfectly straight and vertical. You
can straighten tinned copper wire by
clamping one end in a vice and then
stretching it slightly by pulling on the
other end with pliers. Once the risers
are in place, cut a 34mm-wide cardboard strip and use this as a guide to
trim the wire lengths so that their ends
are exactly 34mm above the PCB.
The next step is to cut six 25mmlengths of 2mm-diameter heatshrink
sleeving. These are then slipped over
the risers and the PC stakes, leaving
bared 9mm-long wire ends at the top.
The final step is to install the LEDs.
As before, you will first have to use
The PCB is secured to
the case lid on four M3
x 15mm tapped Nylon
spacers.
76 Silicon Chip
the diode test facility on a DMM to
sort out the colours. That done, install
LED4 by first feeding its leads down
the heatshrink tubing. Push it all the
way down until its body contacts the
tops of the risers, then solder each lead
to its riser between the heatshrink and
the LED’s body. Repeat this procedure
for LEDs5 & 6, taking care to ensure
that the LEDs are correctly orientated.
Finally, complete the PCB assembly
by plugging in the three 7-segment
displays (DISP1-DISP3). There’s just
one thing to watch out for here: DISP3
must be fitted upside down, so that its
decimal point is at top left (see Fig.4).
As explained earlier, that’s done to obtain a flashing colon between DISP2
and DISP3.
Note that the top surfaces of the
displays should be 15mm above the
PCB when they are installed. Check
that this is so and if not, check that the
5-way SIL socket strips have been installed and that the display leads have
As shown on Fig.3, the leads from
the battery holder are looped through
two stress relief holes in the PCB. They
are then soldered to the supply PC
stakes, with the red wire going to the
positive terminal and the black wire
to the negative terminal.
If you are using two 4-AA holders
instead of a single 8-AA holder, it will
be necessary to connect the two holders in series. That’s done by connecting the red wire from one holder to the
black wire from the second holder. The
easiest way to do that is to feed these
red and black wires through the two
stress relief holes and connect them
to the two terminals marked LOOP
on the PCB. The remaining red and
black wires are then also fed through
the stress relief holes and connected
to the 12V PC stakes as before (enlarge
the stress relief holes if necessary).
Case preparation
The PCB assembly can now be put
aside while you drill and cut the necessary holes in the case. As mentioned
previously, the lid can be replaced
with either a Perspex or acrylic transparent red sheet (195 x 110mm). Alternatively, you can use the lid supplied
with the box and make a cut-out (fitted with a transparent window) for the
7-segment display.
The first step is to download the
drilling template file (in PDF format)
from the SILICON CHIP website (go to
www.siliconchip.com.au and search
for the project). Print this template
out, then cut out the individual sections and attach them to the case using
adhesive tape.
If you are completely replacing the
lid, then you don’t have to make the
rectangular cut-outs for the displays
or for infrared receiver IRD1, since
they simply sit behind the transparent panel. However, 3mm holes will
be required for the four corner mounting positions where it attaches to the
box pillars (see the template).
Conversely, if you are using the lid,
you will need to make the rectangular
cut-outs.
In either case, it’s best to use a pilot drill (eg, 1mm) to start the holes
and then enlarge them to size. All the
small holes are 3mm diameter, while
the larger holes are 10mm diameter.
siliconchip.com.au
The larger holes should be drilled
out to about 4mm and then carefully
reamed to the correct size. It’s best to
ream one of these larger holes first, so
that one of the 10mm LEDs just fits.
You then push the reamer into the hole
as far as it will go and wind a ring of
tape around the shaft (on the outside).
The remaining five holes can then all
be reamed out until the tape stops the
reamer from going any further.
Be careful when drilling or reaming Perspex, by the way. It can easily
crack if the drill or reamer is forced
into the hole.
If using the original lid, the rectangular cut-outs can be made by drilling
a series of small holes inside the perimeter, then knocking out the inside
piece and filing to shape. Make sure
that the large cut-out is exactly the
same size as the Perspex window so
that the latter is a tight fit. The window can be secured in place using a
few spots of contact adhesive.
The rear of the box has to be drilled
for LEDs4-6, while a pattern of 5mm
holes is also required for the loudspeaker. In addition, a hole is required
in the righthand end of the case to
provide access to the DC socket and
on/off switch (these holes go in the
end of the case adjacent to the 10mm
LED holes).
Front-panel label
The front-panel label is available in
PDF format on the SILICON CHIP website. It’s just a matter of downloading
it and printing it out onto an A4 sized
synthetic Dataflex or Dataplex sticky
label (see panel). This label can then
be attached to the lid and the holes cut
out using a sharp hobby knife.
Alternatively, you can print out a
paper label and attach this to the lid
using double-sided tape.
An additional label (Fig.1) shows
the function of each of the buttons on
the handheld remote and this is affixed
to top panel of the case (see photos).
Final assembly
Now for the final assembly. The first
job is to mount the PCB assembly on
the lid (or Perspex panel) using M3 x
15mm spacers and eight M3 x 6mm
machine screws. Once that’s done, the
AA cell holder can be secured inside
the case. This is mounted against the
base of the box and is secured to the
top panel using a No.4 x 9mm selftapping screw.
siliconchip.com.au
The view inside the completed prototype. The battery holder is secured to the
top of the case using a No.4 x 9mm self-tapping screw that goes into a slot at
one end of the holder’s plastic moulding.
Drill a 3mm hole for this screw in
the top panel exactly 77mm from the
righthand side of the case and 38mm
from the front (as measured without
the lid). The self-tapping screw is then
fed through this hole and goes into
one of the slots in the end of the cell
holder’s plastic moulding.
The last part to go in is the loudspeaker. It’s just a matter of securing it
in place on the rear panel (ie, the base
of the box) using a suitable adhesive
such as super glue, contact adhesive or
neutral-cure silicone. Smear the glue
around the perimeter of the speaker
frame, then centre it over the holes
made in the base of the box and wait
for the adhesive to set. The speaker
is then connected to the 2-way screw
terminal block on the PCB using figure-8 cable.
Testing
Now for the smoke test. Check that
IC1 is out of its socket, then apply
power and check that the voltage between TP +12V and TP GND (ie, between pins 14 & 5 of IC1’s socket) is 5V.
Note that this reading can be anywhere
between 4.75V and 5.25V, depending
on the regulator.
If this is correct, switch off and install IC1 into its socket, taking care
with its polarity. That done, reapply
power and check that the displays
show 0:0 but with DISP1 unlit. This
unlit digit is due to the leading zero
blanking that’s incorporated in the tim-
Dataflex/Datapol Labels
(1) For Dataflex labels, go to:
www.blanklabels.com.au/index.
php?main_page=product_info&
cPath=49_60&products_id=335
(2) For Datapol labels go to: www.
blanklabels.com.au/index.php?
main_page=product_info&cPath
=49_55&products_id=326
December 2015 77
Parts List: Speech Timer
1 double-sided PCB, code
19111151, 162.5 x 102mm
1 front panel label, 195 x 110mm
1 remote control button function
label, 23 x 64mm
1 UB2 plastic case, 197 x 113 x
63mm
1 9-button IR remote control (Little
Bird Electronics, SparkFun SFCOM-11759)
1 CR2025 3V alkaline cell
1 141 x 68 x 3mm transparent red
acrylic or red Perspex sheet (or
195 x 110mm – see text)
1 PCB-mount vertical slider switch
(Altronics S2071) (S1)
1 8-AA cell holder or 2 x 4-AA
holders (optional)
8 AA alkaline, NiMH or Nicad cells
(optional)
1 12V DC 400mA plugpack
(optional)
1 2.5mm or 2.1mm PCB-mount
DC socket (CON1)
1 2-way screw terminal block,
5.08mm pitch (CON2)
1 76mm 8Ω loudspeaker
er. DISP1 should light up only when it
is required to display anything other
than zero.
Check that the blue acknowledge
LED flashes when using the infrared
A hole is cut in the righthand end of
the case to provide access to the DC
socket & on/off switch.
78 Silicon Chip
1 20MHz parallel resonant crystal (X1)
1 DIP18 IC socket
3 DIP14 IC sockets cut into 6 x 5-way
SIL socket strips
4 M3 x 15mm tapped Nylon spacers
9 M3 x 6mm screws
1 M3 nut
1 No.4 x 9mm self-tapping screw
(when 8-AA cell holder is used)
1 100mm length of medium-duty
figure-8 wire
11 PC stakes
1 210mm length of 1mm-dia. tinned
copper wire
1 150mm length of 2mm-dia. heat
shrink tubing
Semiconductors
1 PIC16F88-I/P microcontroller
programmed with 1911115A.hex
(IC1)
1 4051B single-pole 8-way analog
switch (IC2)
1 ULN2003 7-Darlington array (IC3)
1 7905 negative 5V regulator (REG1)
9 BC327 PNP transistors (Q1-Q9)
1 BC337 NPN transistor (Q10)
remote. Further operation can then be
tested using the remote control, as set
out in the following section.
Remote control
We’ve already briefly mentioned
the SparkFun remote and its button
functions. Let’s now take a look at the
5-button array below the A, B & C buttons and describe how they control the
Speech Timer.
The left arrow button is for Reset –
it stops and resets the clock timer to
zero. In this state, the Up and Down
buttons can be used to scroll up or
down through the preset timer selections. These selections include the 0:0
setting and the presets 1-2, 2-3, 3-5,
5-7, 10', 15' and so on up to 90' (the [']
symbol indicates minutes).
Pressing the right arrow button
(Start) starts the timer running. It starts
with 0:0 displayed and the colon flashing at a 1-second rate.
The central “O” button is the Pause
button and is used to stop the clock,
so that it ceases incrementing. When
paused, the colon stops flashing to indicate that it is in this mode.
Pausing is useful for stopping the
Speech Timer after the contest so that
3 58mm 7-segment displays
(Jaycar ZD-1850) (DISP1DISP3)
2 waterclear red 2000mcd
10mm LEDs (LED1,LED4)
2 waterclear amber 9000mcd
10mm LEDs (LED2,LED5)
2 waterclear green 13000mcd
10mm LEDs (LED3,LED6)
1 3mm blue LED (LED7)
1 TOSOP4136 38kHz IR receiver
or similar (IRD1)
2 1N5819 1A Schottky diodes
(D1,D2)
Capacitors
1 470µF 25V PC electrolytic
5 10µF 16V PC electrolytic
2 100nF MKT polyester
2 33pF ceramic
Resistors (0.25W, 1%)
3 4.7kΩ
4 330Ω
1 2.2kΩ
1 180Ω
2 1kΩ
1 100Ω
9 470Ω
7 82Ω
1 15Ω 1W 5% (optional – see text)
the overall time can be read off the display (and written down if necessary).
The timer can then resume from that
time by pressing the Start button or reset back to zero by pressing the Reset
(left arrow) button.
Note that there is only a single “seconds” digit on the timer display and
this normally only shows the tens of
seconds. It increments by one each 10
seconds when the clock is running.
The exact seconds value can be
viewed by pressing the Up or Down
button. For example, let’s say that the
display shows 12:4 (ie, 12 minutes
and 40 seconds). Pressing the Up or
Down button then causes the display
to show the exact number of seconds,
eg, 43'' (ie, 43 seconds). This was only
partially displayed as the 4 in the 12:4
display.
Note that the [''] after the 43 is the
symbol for seconds and the exact number of seconds is only displayed while
the Up or Down button is held pressed.
Note also that the seconds only
show when the timer clock is running
or when it is paused but not when
reset. The seconds are reset to zero
when the unit is reset (left arrow button) and the Up and Down buttons are
siliconchip.com.au
A pattern of 5mm holes is drilled in the rear panel for the
loudspeaker, while an artwork showing the remote control
functions is attached to the top panel.
then instead used to select one of the
timer presets.
Additional buttons
The SparkFun remote’s power button is used to adjust the brightness of
the 7-segment displays (DISP1-DISP3).
These displays can be dimmed up
or down, with the dimming direction changed each time the button is
pressed. Pressing and holding the but-
ton begins dimming in either direction.
The remote’s “B” button is used to
independently adjust the Brightness of
the indicator LEDs in the same way as
the power button.
The “A” button serves two functions: (1) to manually sound the alarm
and (2) to set the volume. If this button
is pressed for more than five seconds,
it operates as a volume control. After
this time, the normally modulated
Using The Speech Timer In Count-Down Mode
Normally, all times set for the Speech
Timer, whether preset or manual, are in
Count Up mode, eg, a 10-minute speech
will start from zero and count up to the set
time, at which point the red warning LED
will come on. But the counter will continue
to run after that and if the speech was being
given at a Toastmasters’ meeting, there is a
risk of disqualification if the speech runs for
another minute or more (whatever the rule).
In addition, the Speech Timer can also operate in Count Down mode. In this case, for
a 10-minute speech (say), the Speech Timer
will start at 10:0 minutes and then count
down in 10-second decrements to zero.
At zero, the buzzer will also sound briefly.
To access the Count Down mode, you
simply press the Up button on the remote
repeatedly until you get a display of 0:0. Further presses of the Up button then increase
the timer setting from 0:0 to 0:1 and so on
up to 99:5 (ie, 99 minutes and 50 seconds).
siliconchip.com.au
Once the timer setting is above 0:0, the
remote’s Down button can be used to decrease the setting if necessary.
In operation, the Up and Down buttons
increase/decrease the timer setting in single
step with each button press. Alternatively,
holding down a button will cause the timer
value to rapidly change up or down.
Once the timer value has been set, pressing the Start (right arrow) button) will cause
the timer to start counting down to 0:0.
When it reaches 0:0, the timer will stop and
the buzzer will automatically sound for 2.5s.
The previous Count Down timer setting can
then be restored by pressing the Reset (left
arrow) button.
Warning LEDs
The warning LEDs can also be preset.
That’s done simply by selecting a warning
LED with the remote’s “C” button. The selected LED can then be programmed to turn
alarm tone becomes continuous, indicating that the unit is in volume setting mode. The “A” button then has
to be released and repressed within
1.25 seconds. When that’s done, the
modulated alarm tone is restored and
the volume begins to change.
If the volume is changing in the
wrong direction, it’s just a matter of
releasing and repressing the “A” button once more. The volume will then
change in the opposite direction. The
volume will continue to change for
long as you continue pressing the button until it reaches its maximum or
minimum level.
Releasing the “A” button for more
than 1.25s exits the volume setting
mode and this will be indicated by
a brief “chirp” from the loudspeaker.
The alarm (A) button will then operate as normal unless pressed again for
longer than five seconds.
The “C” button cycles through the
warning LED indicators, starting with
all LEDs off and then lighting the green
LED, then the amber LED and finally
the red LED in a cyclic fashion for each
press of the button.
Finally, note that the timer presets,
display brightness and volume settings
are stored in EEPROM and are retained
when power is switched off. This saves
you from having to re-enter the setting
each time power is reapplied.
That’s it – your Speech Timer is
SC
ready for action.
on at a certain time during the count down
using the Up & Down buttons.
You can program each warning LED but
note that you need to select the next LED
using the “C” button before changing the
time setting. Note also that, during the count
down, you need to have the green LED light
before the amber LED which in turn lights
before the red LED. This means that it’s best
to program the green LED first, followed by
the amber LED and then the red LED, each
with a progressively lower time setting.
The warning LED programming an be
cancelled by setting the timer to 0:0 and
then cycling through each LED with the
“C” button.
Restoring count up timing
Pressing the Down button when the timer
is at 0:0 re-selects the preset periods, starting with 90', then 80' etc. This resets the
Speech Timer to function as a Count Up
timer and the presets can then be selected
using the Up and Down buttons.
December 2015 79
|