This is only a preview of the November 2014 issue of Silicon Chip. You can view 35 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 "Currawong 2 x 10W Stereo Valve Amplifier, Pt.1":
Items relevant to "48V Dual Phantom Power Supply":
Items relevant to "Programmable Mains Timer With Remote Switching":
Items relevant to "One-Chip 2 x 5W Mini Stereo Amplifier":
Purchase a printed copy of this issue for $10.00. |
Programmable mains timer
with remote switching
Remote-controlled mains switches are very convenient but what
if you could add a versatile easy-to-program timer to one of these
units? Well, now you can. This Remote Switch Timer can be
programmed to switch the power on and off after a set period or to
switch the power on and off at set times.
By JOHN CLARKE
M
AINS TIMERS are ideal for
switching appliances on or off
at predetermined times. Their complexity ranges from simple mechanical timers with a synchronous motor
and switch actuator cams through to
complex menu-driven fully-electronic
timers which tend to have fiddly buttons and can be difficult to program.
However, none have the advantage of
remote control, whereby the timer is
remote from the actual mains-switched
power socket.
To give an example, say you have
an appliance in your garage that you
want to control with a mains timer.
Wouldn’t it be nice if you could pro66 Silicon Chip
gram and control the timer without
having to be in the garage? This idea
can be extended to a lot of applications.
To meet this need, we’ve devised
this “Remote Switch Timer”. It’s
designed to work with just about
any commercially-available remote
control mains socket (provided the
hand-held remote is powered by a
12V battery). Basically, it interfaces
with the remote’s PCB and provides
the extra timing functions. The remote
then automatically switches the mains
socket on and off, as required.
As shown in the photos, the Remote
Switch Timer is housed in a plastic
box, along with the PCB from the remote. It has 10 pushbutton switches
and a 2-line LCD which has a dimmable backlight for night-time use.
The front-panel buttons are used to
program and control the unit.
Remote control mains sockets
For those unfamiliar with these devices, a remote control mains socket
consists of a mains plug and piggyback
socket, together with a relay and UHF
receiver inside the plastic housing. It
is controlled using a UHF hand-held
remote control which is used to switch
the mains socket on and off.
Both 3-channel and 8-channel
siliconchip.com.au
The Jaycar remote controlled mains switch comes with a
3-channel hand-held remote. The MS-6142 comes with a
three mains sockets, while the MS-6145 has one socket.
remotes are typically available and
these come either with a single socket
or with a number of sockets. Alternatively, the additional sockets have to
be purchased separately. The remote
controls each socket individually
and it’s just a matter of either using a
learning procedure to set the socket’s
channel number of setting a channel
switch on the rear of the socket.
The Altronics A0340, Jaycar MS6145 and Jaycar MS-6142 are typical
of the units currently available.
How does it work?
The SILICON CHIP Remote Switch
Timer is designed to activate any
pair of on/off switches on the remote
control. It does this by controlling two
small relays which have their contacts
wired across the desired on and off
switches on the remote’s PCB.
Basically, it’s just a matter of removing the remote’s PCB from its case and
housing it together with the Remote
Switch Timer inside a plastic utility
case. The two are then wired together
and powered from an external 12V DC
plugpack and an optional internal 9V
back-up battery.
As well as using the new automatic
timing functions, you can still manually control the mains socket using
separate On and Off pushbuttons on
the Remote Switch Timer. Alternatively, another hand-held remote can
be used.
In preset-time mode, the Remote
Switch Timer is used to send an on or
siliconchip.com.au
The Altronics A0340 has an 8-channel remote control
and is supplied with a single mains socket. Additional
mains sockets can be purchased separately.
off signal to the remote mains socket
after a set period of time. You simply
program when you want the socket to
switch on or off and then press the Set/
Start button. The timer then automatically switches after the preset time,
which can range from a minimum
of one minute to a maximum of 255
hours and 59 minutes (that’s more
than 10 days!).
During the time-out period, the
displayed time decreases by one every
minute until the timer reaches zero.
The relay for that timer function then
closes and the UHF signal from the
remote is sent to the mains socket.
To set the time-out period, you first
select either the On or Off timer using
the Next pushbutton. The separate Up
and Down hours and minutes pushbuttons are then used to set the required
timing period.
If you want more complexity, the
Remote Switch Timer can use both its
timers. One timer can be set to turn the
mains socket on after a preset time,
while the other can be set to then turn
it off (or vice versa). In addition, the
On and Off pushbuttons can be used
to set the initial status of the remote
control mains socket; ie, you can start
with the mains power on or off.
Default timing cycle
The default timing cycle for the unit
is for it to run once only. This is where
the timers are set to their required values and decrease over time until they
reach zero. Once a timer has counted
down to zero, there is no more control
from that timer unless it’s set to a new
value.
Note that the timer will just show
dashes when the time-out is zero.
The default setting can be changed
from “once only” to “repeat”. This is
where the timers are returned to their
original settings after both timers have
timed out.
As an example, let’s say that you’ve
set the On timer to two minutes and
the Off timer to three minutes. This
means that after two minutes, the On
timer will have counted down to zero
and sent an “on” signal to the mains
socket to turn on the power. The Off
timer now continues to count down
and when it too reaches zero (ie, after
one minute more), an “off” signal will
be sent to the mains socket. Both timers will then be reset to their original
2-minute and 3-minute settings and so
the cycle repeats every three minutes.
The on and off timers for this countdown style of timing are called the
“ON IN” and “OFF IN” timers (ie, on
in a certain period and off in a certain
period). The once only and repeat
timer options are predictably named
“ONCE ONLY” and “REPEAT”.
This style of timer is quite useful
(and simple to use) for many timer
applications. However, for even more
flexibility, a “real-time” timer mode is
also included. This is similar to setting
an alarm clock and allows you to set
the time of day for the on/off switching to occur.
November 2014 67
Parts List
1 double-sided, plated-through
PCB, code 19112141, 104 x
76mm
1 front panel PCB, code
19112142, 157 x 94mm* OR
1 front panel label, 144 x 84mm*
1 UB1 plastic utility case, 158 x 95
x 53mm*
6 M3 x 9mm tapped spacers*
1 LCD module with backlighting
(Altronics Z-7013, Jaycar QP5512)
1 UHF remote-controlled mains
switch with 12V powered
remote controls (eg, Altronics
A0340, Jaycar MS-6145, MS6142)
2 SPST DIP 5V reed relays
(Altronics S4100A, Jaycar SY4030) (RLY1,RLY2)
1 4MHz low-profile crystal
(HC49US case) (X1)
10 click-action pushbutton PCB
switches (white) (Jaycar SP0723, Altronics S1099)
1 12V DC plugpack (100mA or
greater)
1 16-way SIL pin header with
2.54mm pin spacing
1 panel-mount DC socket (2.1 or
2.5mm to suit plugpack)
4 2-way polarised headers
(2.54mm pin spacing)
4 2-way polarised header plugs
(2.54mm pin spacing) (CON1CON4)
12 M3 x 5mm machine screws (2
preferably countersunk for the
rear of the box)
1 100mm cable tie
1 400mm length of medium-duty
black hook-up wire
1 200mm length of medium-duty
red hook-up wire
Semiconductors
1 PIC16F88-I/P microcontroller
programmed with 1911214A.
hex (IC1)
1 LP2950ACZ-5.0 low-dropout 5V
regulator (REG1)
1 BC337 NPN transistor (Q1)
6 1N4148 diodes (D1,D2,D4-D7)
2 1N4004 1A diodes (D3,D8)
Capacitors
2 10µF 16V PC electrolytic
1 100nF MKT polyester
2 33pF C0G (NP0) ceramic
Resistors (0.25W, 1%)
1 100kΩ
1 330Ω 0.5W
1 10kΩ
2 100Ω
1 2.2kΩ
1 10kΩ miniature horizontal
trimpot (VR1)
*Alternative enclosure parts
1 sealed polycarbonate case
with clear lid 115 x 90 x 55mm
(Jaycar HB-6246 or similar)
1 front panel label, 103 x 78mm
4 M3 x 12mm tapped spacers
Optional parts for battery back-up
1 9V battery snap with lead (Jaycar PH-9232, Altronics P 0455)
1 9V battery (522/6LR61)
1 9V U-clamp battery holder (Jaycar PH-9237, Altronics S 5050)
1 2-way polarised header & plug
(2.54mm pin spacing) (CON5)
1 M3 x 6mm machine screw
1 M3 nut
selection as to whether you want a
timer to be operational or not.
There are two possible settings for
real-time switching: (1) where the
sequence occurs once only; and (2)
where the on and off cycle is repeated
each day. As before, these options are
called “ONCE ONLY” and “REPEAT”.
For the once only selection, the
timer will revert to zero (with the
LCD showing dashes) once that timer
has matched the clock. For the repeat
selection, the timer will remain at its
time setting so that it can repeat the
switching sequence each day.
Clock accuracy
The long-term timing accuracy depends on the accuracy of the crystal
timebase used in the Remote Switch
Timer. This in turn is dependent of the
crystal tolerance and on temperature
variations throughout the year.
For a standard ±50ppm crystal, the
clock could be fast or slow by up to
130s (ie, two minutes & 10 seconds)
over a period of 30 days. However, the
timing accuracy can be easily adjusted
by changing a value in the software
that runs in the PIC microcontroller
used in the Remote Switch Timer.
Basically, the can be adjusted to run
faster or slower in 1ppm steps, up to a
maximum of ±99ppm. A 1ppm change
represents about 2.6s in 30 days, while
the 99ppm maximum adjustment corresponds to 256s in 30 days.
Adjusting the clock accuracy may be
necessary if you want the “ON AT” and
“OFF AT” timers to switch the unit at
certain times of the day. However, it
will not usually be necessary for the
“ON IN” and “OFF IN” timers which
are used to switch the unit in a certain
time period.
Battery back-up
In order to do this, a real time clock
is required and the one used here is in
24-hour format.
Real-time switching
For this mode, we call the real-time
timers “ON AT” and “OFF AT” (ie, on
at a certain time and off at a certain
time). You can set either one timer or
both. The timers are also in 24-hour
format and are compared against the
time on the clock. When the clock and
timers match, an on or off signal is sent
to the mains socket.
Note that in this mode, the timer
values do not change during the time68 Silicon Chip
out period. Instead, they are simply
compared with the clock for a timeout match.
Note that a 00h:00m setting for
either timer will show as dashes on
the LCD and there is no on or off
switching for this setting. 00h:00m
also corresponds to midnight, so it is
not possible to have the timer switch at
precisely midnight. However, switching times one minute before (23h 59m)
and one minute after midnight (0h 1m)
are possible.
This rather minor shortcoming allows for simplified timer operation
because it doesn’t require an extra
An option is to include a battery
back-up for the Remote Switch Timer.
That way, all settings will be retained
and timing will continue in the event
of a black-out or if mains power is
removed from the unit.
Of course, the mains socket will not
be powered in the event of a blackout
and so it will not respond to any on
or off signals from the unit. However,
when power is restored, the last on
or off signal is sent again after a short
delay. That way, the mains socket will
switch to the required setting for the
present time.
Note that the backlighting for the
siliconchip.com.au
siliconchip.com.au
K
A
1N4004
7,8
2
RLY 2
100Ω
C
K
A
1N4148
33pF
OSC1
16
15
OSC2
RB1
Vss
5
RB5
RB4
11
RB2
8
S10
S9
A
S5
D7
REMOTE SWITCH TIMER
S8
S3
S4
K
A
S7
D6
S2
K
A
S6
D5
K
A
D4
S1
SC
S1:
S2:
S3:
S4:
S5:
4
14 13 12 11 6
7–10
5
1
4x
1N4148 K
20 1 4
HOUR UP
HOUR DOWN
MINUTES UP
MINUTES DOWN
SET/START
S6: NEXT
S7: CYCLE
S8: ON
S9: OFF
S10: BACKLIGHT
10
RB0
6
RA2
RA3
1
RA4
2
3
18
RA1
IC1
PIC16F88
PIC1 6F8 8
RB6
RA0
7
12
17
RB3/PWM
Vdd
RA5/MCLR
RB7
13
LED 16
CATHODE
D7 D6 D5 D4 EN RS
GND R/W D0–D3
3
CONTRAST
16 x 2
LCD MODULE
Vdd
2
LED 15
ANODE
LCD
CONTRAST
10k
VR1
10k
330 Ω 1W
4
14
9
100nF
2.2k
B
X1 4.0MHz
E
33pF
Q1
BC337
C
100Ω
E
B
BC 33 7
D2
1N4148
K
A
6
2
A
D1
1N4148
(POWER DETECT)
10V
10 µF
+5V
Fig.1: the circuit is based on PIC16F88-I/P microcontroller IC1 and an LCD module. IC1 monitors switches S1-S10, drives the LCD, controls the timing
and drives miniature relays RLY1 & RLY2. The relays have their contacts wired across the On and Off buttons of a UHF remote control module.
OUT
IN
GND
LP2950
UHF
REMOTE
OFF
SWITCH
1,14
7,8
1,14
RLY 1
K
100k
GND
IN
OUT
REG1 LP2950ACZ–5.0
16V
10 µF
6
Circuit details
Take a look now at Fig.1 for the
circuit details of the Remote Switch
Timer. It’s quite simple and is based on
a PIC16F88-I/P microcontroller (IC1),
an LCD module, a couple of miniature
relays, 10 pushbutton switches and a
few other parts.
Most of the complexity is hidden
inside the software that’s programmed
into IC1. This allows the micro to
monitor the switch inputs and drive
the LCD module and relays according
to the actions required by the switches
and internal timers.
IC1’s RA2, RA3, RA4 & RB0 data
lines send character data to the LCD
module. In addition, the RA1 & RB7
lines drive the Enable (EN) and Register Select (RS) inputs. The LCD is set
to run using four bits of data to save on
outputs from IC1. The necessary data
bits are sent to the LCD as two separate
transfers, to make up the eight bits
necessary to fully drive the display.
The RA2, RA3, RA4 & RB0 lines also
drive a matrix based on pushbutton
switches S1-S10 and diodes D4-D7. To
check if a switch is closed, the RA2,
RA3, RA4 & RB0 lines are driven low
and the RB2, RB4 & RB5 inputs monitored. These latter inputs are normally
pulled high (to +5V) via internal pullups but one of these inputs will go low
(ie, close to 0V) if a switch is closed.
When a low is detected, the RA2,
RA3, RA4 & RB0 lines are taken high
again and then taken low one at a time
while IC1 continues monitoring RB2,
RB4 & RB5. This allows the micro to
determine which switch button is
being pressed. For example, if S3 is
closed, this will be detected when RA4
goes low and in turn pulls RB4 low.
Diodes D4-D7 are there to prevent
shorts between the RA2, RA3, RA4 &
RB0 lines if two switches are pressed
at the same time. Shorts between these
lines would not only affect switch detection but would also affect the drive
CON2
CON1
+
–
CON4
CON5
A
K
D8 1N4004
UHF
REMOTE
ON
SWITCH
UHF
REMOTE
SUPPLY
(OPTIONAL)
+
–
TO 9V
BATTERY
SNAP
12V DC
TO
SOCKET
+
–
CON3
A
K
D3 1N4004
LCD module is switched off to conserve the battery when the unit is running from battery power alone.
Without battery back-up, the Remote Switch Timer will reset with all
timers set to zero when a black-out
ends. In addition, the mains socket
will be reset with the power off.
In summary, it’s an incredibly
versatile unit that’s easy to program.
It should cover a very wide range of
timing applications.
November 2014 69
ON
14121191
H CLCD
TI WMODULE
S S NIA M F HZ-7013
U R OF R(B/L)
E MI T
16X2
ALTRONICS
RLY1 SY4030
D1
OFF
4148
4004
4148
D6
4148
D7
UP
HOURS
S1
BACKLIGHT
VR1 10k
100nF
IC1 PIC16F88–I/P
10k
DOWN
100Ω
UP
S2
S3
Q1
S7
S8
CYCLE
ON
S6
S9
NEXT
DOWN
MINUTES
S4
S5
OFF
SET/START
TIMER FOR UHF MAINS SWITCHES
FRONT VIEW
TO REMOTE’S
ON SWITCH
CON1
19112141
TIMER FOR UHF MAINS SWITCH
(LCD MODULE UNDER)
CON2
TO REMOTE’S
OFF SWITCH
DC
INPUT
SOCKET
UHF
–
+
SUPPLY
POWER FOR
UHF REMOTE
GND
CON4
CON3
(IC1 UNDER)
+12V
D5
S10
100Ω
D2
4148
SUPPLY
+
–
330Ω
19112141
C 2014
D4
4148
UHF
2.2k
33pF
10 µF
33pF
4148
4004
+
–
Backup
CONTRAST
100k
D8
4MHz
BC337
D3
X1
GND LP2950
ACZ-5.0
+12V
REG1 10 µF
RLY2 SY4030
14 13 12 11 10 9 8 7 6 5 4 3 2 1 16 15
CON5
–
STRESS RELIEF
HOLES FOR
BATTERY SNAP
LEADS
+
FOR 9V
BATTERY
SNAP LEAD
(OPTIONAL)
REAR VIEW
Fig.2: install the parts on PCB as shown here. Be sure to use a socket for IC1
and make sure that all polarised parts are correctly orientated. The 2-way
header sockets (CON1-CON5) are the only parts that mount on the rear of
the board.
signals to the LCD and cause corrupted
characters to be displayed.
Ports RB1 & RB6 drive relays RLY1
& RLY2 via 100Ω resistors. The NO
(normally open) contacts of the relays
go to CON1 & CON2 and these in turn
are wired in parallel with the ON and
OFF switches respectively on the UHF
remote’s PCB. Diodes D1 & D2 are there
to prevent damage to RB1 & RB6 by
clamping the back-EMF generated by
the coils when the relays switch off.
The 100Ω resistors in series with the
relay coils also help protect IC1’s RB1
& RB6 outputs. They are not needed
70 Silicon Chip
in normal operation but will limit the
back-EMF current from a relay coil if
its associated diode fails or develops
a dry joint connection.
Timing
A 4MHz crystal (X1) between pins
15 & 16 of IC1 is used to provide an
accurate reference for the timing oscillator. It’s loaded with fixed 33pF
capacitors to ensure it starts correctly.
Normally, the crystal would be
trimmed to a precise 4MHz using a
trimmer capacitor in place of one of
the fixed values. However, without
suitable calibrated test equipment, it’s
not possible to accurately adjust the
trimmer without a great deal of trial
and error. As a result, as previously
stated, we chose to use a software
adjustment procedure instead.
If the 4MHz crystal is precisely on
frequency, the program runs at exactly
1MHz. The software uses a counter
(Timer1) that overflows after a count of
40,000 or after 1/25th of a second if the
clock frequency is precisely 1MHz (ie,
25 of these 40,000 counts will take 1s).
If the crystal runs too fast or too
slow, it’s just a matter of altering the
40,000 number used in the counter
to provide the correct 1s period. For
example, for a 1ppm adjustment, the
number for Timer1’s overflow counter
must either be 40,001 (ie, one more) if
the crystal is too fast or 39,999 (ie, one
less) if the crystal is too slow.
Note that this change is only done
for one of the 25 overflow counts that
make up one second for Timer1. The
remaining 24 counts still use 40,000
as the count.
As stated, the overall adjustment
range is from -99ppm to +99ppm. In
operation, the software then adds or
subtracts the ppm correction value
from 40,000 in order to compensate
for the crystal frequency.
The overflow ppm adjustment is
done via the front-panel switches as
described later, with the setting shown
on the LCD. The correction required
is determined by comparing the time
of the Remote Switch Timer against a
known accurate clock over a set period. Each 2.592 seconds in 30 days
that it is off is equivalent to 1ppm.
Note that the clock on the Remote
Switch Timer shows the seconds,
so that the clock’s accuracy can be
checked. The timing functions, however, are only to the nearest minute.
Backlighting
Backlighting is provided for the LCD
so that the timer can be used in the
dark. This can be adjusted in 16 steps
from fully off through to full brightness
by pressing the Backlight pushbutton
(S10). This brings up the backlighting
value which is shown as a number
ranging from 0-15, with 15 being full
brightness. A bargraph is also used to
show the brightness setting.
For brightness levels between 1-14,
the backlight LEDs are driven using
PWM (pulse width modulation). Pin
9 (PWM) of IC1 provides the PWM
siliconchip.com.au
to power up and for the companion
mains socket to power up if there has
been a blackout.
Construction
All the parts (except for the UHF
remote) are installed on a PCB coded
19112141 and measuring 104 x 76mm.
Fig.2 shows the parts layout on the
PCB.
Begin by installing the resistors
and diodes. Table 1 shows the resistor
colour codes but we recommend that
you also check each one using a DMM
before installing it. Be sure to install
the diodes with the correct polarity.
REG1 and Q1 are next on the list.
These two devices look the same, so be
careful not to get them mixed up. Once
they’re in, install an 18-pin socket for
IC1, with the notched end towards D5.
Follow with the capacitors. The two
10µF electrolytics must be installed
with the polarity shown and bent over
so that they lie flat against the PCB, so
that they later sit below the top edge
of the LCD module (see photo). The
ceramic and MKT capacitors can be
mounted either way around.
Crystal X1 and trimpot VR1 can now
go in, followed by the two relays. Note
that each relay must be installed with
its notched end towards the LCD.
Now for the LCD module. This
is mounted using a 16-way SIL pin
header at the bottom lefthand edge.
Begin by fitting the header in place
with its short pins going into the PCB.
Solder these pins, then fit the LCD
module over the longer pins and push
it all the way down before soldering
these pins as well.
The 10 pushbutton switches can
now be installed. These go in with
The completed timer PCB. Note how the two
10μF electrolytic capacitors are bent over so
that they don’t later foul the lid of the case.
waveform and this drives the cathodes
of the backlight LEDs via transistor Q1
and a 330Ω current-limiting resistor.
For level 0, there is no drive to the
LED cathodes (Q1 permanently off)
and for level 15, the LEDs are continuously driven (Q1 permanently on). At
other levels, the duty cycle of the PWM
pulse determines the LED brightness.
At half brightness, for example, the
LEDs are switched on and off via Q1
using a 50% duty cycle.
The PWM frequency is 66.66kHz, so
the on and off switching of the LEDs
will not be noticeable.
The contrast of the LCD module is
adjusted using VR1. It’s just a matter
of tweaking VR1 to suit.
Power supply
The Remote Switch Timer is normally powered from a 12V DC plugpack
supply connected to CON3. Diode D3
provides reverse polarity protection
and the nominal 11.4V supply rail is
then filtered using a 10µF capacitor
and used to power the backlight LEDs
in the LCD module.
The 11.4V rail is also fed to lowdropout regulator REG1. This produces a regulated 5V rail to power
microcontroller IC1, the LCD module
and the remaining circuitry.
The optional 9V back-up battery is
connected to CON5. Diode D8 provides reverse polarity protection and
both it and D3 isolate the two supplies.
IC1’s RA0 input (pin 17) monitors
the 12V supply line from CON3. If
this goes to 0V but IC1 is still powered
via the back-up battery, the software
detects this loss of 12V power and
switches off the backlight. When the
12V is subsequently restored, this is
detected by RA0 and the last ON or
OFF signal is resent to the remote PCB
by turning on the appropriate relay.
In practice, the ON or OFF relay
is activated about 3s after power is
restored and remains on for around
900ms. This 3s delay gives enough
time for the remote control circuit
Table 2: Capacitor Codes
Value µF Value IEC Code EIA Code
100nF 0.1µF
100n
104
33pF NA
33p
33
Table 1: Resistor Colour Codes
o
o
o
o
o
o
siliconchip.com.au
No.
1
1
1
1
2
Value
100kΩ
10kΩ
2.2kΩ
330Ω
100Ω
4-Band Code (1%)
brown black yellow brown
brown black orange brown
red red red brown
orange orange brown brown
brown black brown brown
5-Band Code (1%)
brown black black orange brown
brown black black red brown
red red black brown brown
orange orange black black brown
brown black black black brown
November 2014 71
0V TO CON4
+12V TO CON4
OFF TO CON2
ON TO CON1
Fig.3: here’s how to make the connections to the Altronics UHF remote PCB.
The red and black leads shown are all part of the original wiring.
The timer PCB is mounted on spacers on
the rear of the front panel and is secured
using eight M3 x 6mm machine screws.
+12V TO CON4
ON CONTACTS:
TO CON1
OFF CONTACTS:
TO CON2
0V TO CON4
is almost certainly fully functional and
it can be installed in a case, along with
the remote’s PCB module. If it doesn’t
work, go back over the PCB and check
carefully for incorrect component values, incorrectly orientated parts and
missed solder joints.
Case installation
Fig.4: the wiring connections to the Jaycar UHF remote. You will need to scrape
away the solder masking from some of the tracks before soldering the leads.
their flat sides orientated as shown
and must be pushed all the way down
before soldering their pins.
The PCB assembly can now be
completed by installing CON1-CON5.
These polarised 2-way headers are
installed on the rear of the PCB with
their plastic tabs orientated as shown
in the bottom diagram of Fig.2.
Wiring the header sockets
The header sockets are wired by
crimping the wires into the crimp lugs
and then pushing them into the socket
shell. These wires can all initially be
about 100mm long and you will need
to use red and black leads for CON3CON5 as shown. The leads for CON1
& CON2 run to the ON & OFF switches
on the remote PCB, so their polarity is
unimportant.
Test & adjustment
Before applying power, make sure
that IC1 is out of its socket and that
72 Silicon Chip
all polarised parts are correctly orientated. That done, apply 12V DC to
CON3 and use a DMM to check the
supply between pins 14 & 5 of IC1’s
socket. This should be somewhere
between 4.75V and 5.25V.
If this is correct, switch off, install
IC1 (notch towards D5) and reapply
power. The LCD should now show
characters. Adjust VR1 for best contrast, then switch the backlighting on
by pressing the backlight button (S10).
Check that brightness can be adjusted
by holding S10 down (the adjustment
direction changes each time you press
S10).
Now press the On button (S8). A
click from the ON relay should immediately be heard and the top line of the
LCD should display “ON”. Similarly,
pressing the Off button should briefly
turn the OFF relay on and cause “OFF”
to be displayed on the bottom line of
the LCD.
If the unit passes these tests, then it
The PCB can be installed either in
a UB1 plastic utility case (158 x 95 x
53mm) or in a sealed polycarbonate
case with a clear lid (115 x 90 x 55mm).
A front panel PCB coded 19112142 and
measuring 157 x 94mm can be used
with the UB1 box. This PCB replaces
the plastic lid and comes with all holes
drilled and screen-printed lettering.
It’s available from the SILICON CHIP
PartShop, as is the main PCB.
Alternatively, a label measuring 144
x 84mm can be used with the existing
lid on the UB1 box. A front panel label
measuring 103 x 78mm is also available for the polycarbonate box. These
labels can be downloaded in PDF
format from the SILICON CHIP website
and printed out.
You will need to print out two copies – one onto plain paper for use as
a drilling template and another onto
photo paper to use as the front-panel
label. The labels show the screwmounting locations for the PCB on the
lid, along with the switch locations.
A rectangular cut-out for the LCD
surround will also be required for the
siliconchip.com.au
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
UB1 box but this isn’t necessary for the
polycarbonate case with the clear lid.
The PCB mounting holes should be
drilled to 3mm, while the switch holes
should be started using a pilot drill and
then carefully enlarged to 10mm using a tapered reamer. The rectangular
display cut-out can be made in the
UB1 box lid by first drilling a series
of holes around the inside perimeter,
then knocking out the centre piece and
filing to a smooth finish.
Once the holes have been drilled,
the front-panel label can be affixed to
the lid using a suitable glue or neutralcure silicone. Alternatively, you can
print onto an A4-size synthetic “Dataflex” sticky label if you have an inkjet
printer or onto a “Datapol” sticky label
if you have a laser printer. This can
then be trimmed to size and affixed to
the base of the case using the label’s
self-adhesive backing.
Dataflex and Datapol labels are
siliconchip.com.au
Above: these two views show the inside of the unit with all wiring completed
(Jaycar remote PCB used, no back-up battery fitted). Use neutral-cure silicone
or hot melt glue to hold the wiring to the remote PCB in place.
Features & Specifications
•
•
•
•
•
•
•
•
Power: 12V DC at 30mA
Current: 30mA with full backlighting; 3mA with backlighting off
Battery backup current: typically 3mA
On & Off IN: adjustable from 0h 0m to 99h 59m in 1-minute steps
On & Off AT: adjustable from 0h 0m to 23h 59m (0h 0m shown as --:-– and
timer is off)
Real Time Clock: 24-hour format with hh:mm:ss
Crystal tolerance compensation: ±99ppm
Dimming: off to full brightness in 16 steps; 66.66kHz PWM (pulse width
modulation).
November 2014 73
Instructions For Using The Remote Switch Timer
The very first time the Remote Switch Timer is powered up, the backlighting will be off and the timer will be in the ON IN
and OFF IN Once Only mode (Fig.5). Two lines will be displayed on the LCD, with the top line showing ON IN“---:--” and the
lower line OFF IN ---:-- The inverted commas in the first line show that the ON IN time can be changed using the Hours and
Minutes Up/Down buttons.
The dashes mean that the timer is off. Note that three dashes are allocated for the hours position and two for the minutes.
This represents three digits for the hours and two for the minutes. The settings can be up to 255h 59m.
Note that if you want an hour value above 127, it’s quicker to reach this by pressing the down button to count back from
zero hours.
Pressing the Next button (S6) moves the inverted commas to the second line. The LCD then shows OFF IN “---:--” and
the hours and minutes for this setting can again be adjusted using the up and down buttons.
Depending on the above setting, you also need to select whether the mains switch is initially on or off. That’s done by
pressing the ON or OFF button (Fig.7). Pressing the Set/Start pushbutton (S5) then starts the timing, with the colon between
the hours and minutes digits flashing and the inverted commas off.
Pressing the Set/Start button again stops the timing or you can do this to change the ON IN or OFF IN values. Note that
timing will not begin unless the colon is flashing.
Changing the cycle
To check which cycle you are running or to change the cycle, press the Cycle button (S7). The current cycle will be displayed and this will initially be ON/OFF IN Once Only. Other selections are ON/OFF IN Repeat, ON/OFF AT Repeat and ON/
OFF AT Once Only (Figs.8-10).
You can just view the setting, by pressing the Cycle button for up to 10s. Pressing it for longer than 10s lets you move to the
alternative settings. After 10s, the cycle indicator will be shown and the unit will count down from 10 to 0. When zero is reached,
the cycle changes to the next selection. It’s just a matter of holding the Cycle button down until the required cycle is reached.
The hours & minutes settings for the ON/OFF AT cycle are achieved in exactly the same manner as for the ON/OFF IN
cycle, with the Next pushbutton again used to select the OFF AT timer.
Adjust ppm correction
Pressing the Next button after OFF AT has been selected brings up the “Adjust ppm” correction value on the top line and
the real time clock on the bottom line (Fig.11). A right arrow shows which line can be changed using the Hours and Minutes
buttons. As before, pressing the Next button cycles through the selections.
The ppm setting is initially zero but can be changed using either the Hours or Minute buttons to ±99 maximum. A positive
value speeds up the clock, while a negative value slows it down. A 1ppm change represents about 2.6s in 30 days or about
1s every 11.5 days. The 99ppm maximum adjustment corresponds to 256s in 30 days or about 8.53s per day.
The real-time clock runs continuously and its time can only be changed in Set mode. The seconds are reset to zero each
time the hours or minutes are changed, allowing the clock to be easily synchronised with another clock. Note that only the
clock is shown in run mode, not the ppm crystal correction value.
In practice, it’s all very straightforward and is far less complicated than it sounds. A few minutes spent playing with the buttons will familiarise you with the way it works.
What’s remembered?
If you don’t use the battery back-up, then the Remote Switch Timer will power off in a blackout or when you disconnect
power. When power is restored, the timers will be at zero (showing dashes) and the clock will initially begin from zero (midnight). However, the cycle setting, backlight dimming level and crystal ppm correction value will all be restored to their values
before power went off.
By contrast, with battery back-up, the clock and timers will continue to run and their settings will not change. In addition,
the last ON or OFF setting required for the remote mains socket will be remembered and re-sent after a 3s delay when power
is restored.
available from www.blanklabels.com.
au and sample sheets are available on
request to test in your printer – see
panel.
Once the label is in position, the
Remote Switch Timer PCB can be
attached to the rear of the lid using
tapped spacers and M3 x 5mm ma74 Silicon Chip
chine screws. M3 x 9mm spacers are
used for the UB1 box, while M3 x
12mm spacers are used for the polycarbonate case so the LCD module sits
inside the clear lid (this eliminates the
need for a display cutout).
Alternatively, if you are using a
PCB front-panel with the UB1 box, it’s
simply a matter of mounting the PCB
on M3 x 9mm spacers.
DC socket & battery holder
An 8mm-diameter hole has to be
drilled in the lefthand end of the
case for the panel-mount DC socket.
This can then be fitted in position
siliconchip.com.au
Fig.5: when first powered up, the unit
is in ON IN and OFF IN Once Only
mode. The inverted commas indicate
that the ON IN time can be set using
the Hours and Minutes buttons.
Fig.6: the unit has been programmed
here to turn on in 7.5 hours and off
after 15 hours. Pressing the Set/Start
button starts the timers.
Fig.7: pressing the On or Off button
sets the initial on/off state of the
remote mains socket.
Fig.8: different settings (or modes)
are selected by pressing and holding
down the Cycle button. ON/OFF-IN
Repeat mode has been selected here.
Fig.9: the ON/OFF-AT mode. Both
Once Only and Repeat settings are
available.
Fig.10: the unit has been programmed
here to turn on and off at set times.
Fig.11: pressing the next button after
OFF AT has been selected lets you
adjust the clock and set the time.
and the wiring leads connected (the
other ends of these wires terminate in
2-way header socket CON3). Be sure
to connect these leads to the correct
terminals on the DC socket (check with
a DMM if necessary).
As stated, the back-up battery is
optional. If you wish to use it, it’s just
siliconchip.com.au
a matter of connecting a 9V battery
snap to CON5 and installing a 9V
battery holder. Before soldering the
battery snap leads, loop them through
the adjacent strain relief holes. The
holder can be secured to the base or
to one side of the case using an M3 x
6mm machine screw and nut.
Remote control PCB
Before removing the remote’s PCB
module, the remote control mains
socket (either from Jaycar or Altronics;
see parts list) should be set to operate
as described in the instructions. This
will familiarise you with the way the
units works and allow you to set the
channel number and test its operation.
Once you’ve done that, the handheld remote can be disassembled. The
Jaycar remote has one screw located
beneath the battery cover and when
removed, the two halves of the remote
case can be cracked open along the
sides with a screwdriver. By contrast,
the Altronics remote has two screws
under the battery compartment lid
and removing these allows you to
split the case.
It’s then just a matter of removing
the remote PCB and connecting the
leads from CON1, CON2 and CON4.
CON1 is wired across the ON contacts
for the selected channel, CON2 across
the OFF contacts and CON4 to the UHF
remote’s supply rails. Figs.3 & 4 show
the details.
On the Jaycar remote, it will be
necessary to scrape away the solder
masking from the rear of the PCB before soldering the connections. Once
all the wires are in place, fit a cable
tie around the four switch wires to
prevent them from pulling away from
the PCB. It’s also a good idea to use
neutral-cure silicone or hot melt glue
to hold the wires in place.
The remote PCB can now be mount
ed on the base of the case. Both the
Jaycar and Altronics remotes have
two holes that can be used as mounting points, although the Jaycar unit’s
holes will need to be enlarged to 3mm.
In each case, the unit can be mounted
(copper side up) on 9mm tapped
spacers and secured using M3 x 5mm
machine screws.
Once it’s in place, plug the various
leads into the sockets on the back of
the timer PCB and fasten the lid down.
That’s it – the unit is ready for use.
The full instructions on driving it are
SC
in the accompanying panel.
Helping to put you in Control
LogBox RHT 32K Readings
IP65 dual channel data logger with built-in temperature &
humidity sensor. It can be easily
programmed and configured via a
handy IR-LINK 3 interface which
connects to a USB port under
Windows® software or PDA IrDA interface.
Replacabe internal lithium (3.6V ½ AA)
battery.
SKU: LOG-005
Price:$159 +GST
Any-Direction Microswitch
Industrial microswitch with springy
actuator triggers when the actuator
is pushed or deflected in any direction. This makes it trivial to mount
in a wide variety of situations.
SKU: HES-204
Price:$12.95 +GST
10-Port USB Charging Hub
10 dedicated USB ports with a
massive 60 W built in power in
a compact design. 2 selectable
types of charging current, 1 A or
2 A, 240 VAC powered.
SKU: UHB-003
Price:$89.95 +GST
USB Serial Stepper Controller
Four axis stepper motor
controller fitted with USB and
RS-485 ports. Takes simple
serial commands and produces ramped frequency profiles
for stepper or servo motor
control. Revised version can
be 8 to 35 VDC powered and has analog
inputs.
SKU: KTA-290
Price:$79 +GST
Power Multiplexer Carrier
The Texas Instruments
TPS2113A autoswitching
power multiplexer allows you
to switch seamlessly between
two power sources of 2.8 V to
5.5 V, while blocking reverse
current into either source & and the board
also breaks out a USB Micro-B connector
that can be used to supply one of the rails.
It has an adjustable current up to 2 A.
SKU: POL-2596
Price:$9.95 +GST
Bluetooth 4.0 BLE Shield
Bluetooth Low Energy (BLE)
shield for Arduino based on the
Nordic Semiconductor nRF8001.
This shield lets your Arduino
talk to your smartphone or
other Bluetooth 4.0 equipped
devices. 3.3 V or 5 V powered.
SKU: SDA-001
Price:$34.95 +GST
New MeanWell Slim Line Series
MeanWell has recently announced the released of their
highly anticipated new slim
line series: EDR-120, NDR-120
& EDR-150. Only EDR-120 &
NDR-120 offers standard output
such as 12 VDC, 24 VDC and
48 VDC. EDR-150 is currently
only available with 24 VDC output, but can
be adjusted up to 156 W. These series will
be available in late October. Contact us via
phone, fax or e-mail to place your preorder.
Price starting from $35 ea + GST.
For OEM/Wholesale prices
Contact Ocean Controls
Ph: (03) 9782 5882
oceancontrols.com.au
November 2014 75
|