This is only a preview of the July 2024 issue of Silicon Chip. You can view 42 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 "Automatic LQ Meter":
Items relevant to "180-230V DC Motor Speed Controller":
Items relevant to "New use for Mains Sequencer":
Items relevant to "Lava Lamp Display":
Items relevant to "Digital Compass":
Items relevant to "Workman 1kW Loudspeaker":
Purchase a printed copy of this issue for $12.50. |
Project by John Clarke
Repurposing the
Mains Power-up
Sequencer
Generators and inverters are not
always powerful enough to run more
than one high-current appliance at a time. For
example, if you have more than one refrigerator or a
separate freezer and fridge and want to run them off-grid, they
may need to run at different times. The Mains Power-Up Sequencer from
February & March 2024 can be programmed to do that automatically.
T
he Mains Power-Up Sequencer
from the February & March 2024
issues (siliconchip.com.au/Series/412)
was intended for powering up appliances in sequence with brief delays in
between to avoid overloading a circuit
breaker at switch-on.
However, the fact that each outlet is
controlled independently by a microcontroller means that the way each
outlet is controlled can be changed
with new software.
We hadn’t considered this second
application until a reader wrote to us.
His letter was published in the Ask Silicon Chip section of the April issue. In
part, he wrote:
Say a business has several fridges/
freezers to run from a small emergency
power source. It would be very useful
to be able to sequence the output to
several loads for varying periods, like
15 or 20 minutes, making it unnecessary to manually switch loads to avoid
overloading a generator or inverter.
A shortlist of features
» Powers on two to four mains
outlets individually in a rotating
sequence
» Adjustable powered-on period of
eight seconds to 30 minutes
» Optional daisy-chain connection for
up to four more outlets (up to eight
total)
» ‘Phantom Appliance’ load detection
option (for up to four outlets)
54
Silicon Chip
Happily, we can satisfy this request.
The re-purposed version of the project mainly requires the microcontroller software to be changed, plus some
minor wiring adjustments.
Three options
Three new versions of the Sequencer
are described here, all using the same
revised software. The first is called the
Primary unit (see Fig.1). It operates
with a rotating sequence, switching on
Outlet 1 for a period, then switching
it off before switching on Outlet 2 for
the same period. This sequence continues for all outlets, and when Outlet
4 switches off, the sequence repeats.
The power-on period is adjustable
from eight seconds to 30 minutes. The
eight-second period is mainly useful
for testing the unit to see if it works
without waiting too long. As with the
original Sequencer, you can build it to
have fewer than four outlets. If only
two or three are required, it will return
to Outlet 1 after Outlet 2 or Outlet 3
switches off.
The second version operates similarly to the Primary version but
includes current detection. When an
outlet is first powered, it monitors the
current drawn. If an appliance draws
power, the outlet stays powered. The
outlet switches off after the timeout
period, or earlier if the appliance
draws less than 35W.
We call this the Phantom Appliance
Australia's electronics magazine
Detection (PAD) mode, where only the
outlets that have an appliance connected (or are ready to run in the case
of a fridge or freezer) will be included
in the sequence.
This mode can be useful for powering refrigerators and freezers because
they don’t run constantly. Powering an
outlet for an appliance that is not doing
anything useful wastes time, since it
could power the next fridge or freezer
instead. Also, the fridge or freezer may
finish running its compressor before
the timeout expiry. In this case, the
PAD unit will move on to power the
next appliance early.
This mode is also useful where you
have the four outlets on the Sequencer,
but you may sometimes only use
it for two or three appliances. The
Sequencer will skip over the unused
outlets, and you won’t have to manually change the configuration to set the
number of outlets used. It also gives
you the flexibility to switch one or
more loads off when you want them
to be skipped.
Daisy-chain mode
The third configuration, Daisy
Chain, can give you more than four
outlets (up to eight). Daisy-chaining is
impractical for PAD units; only the Primary unit can be daisy-chained. That
is because the AN4 input of microcontroller IC9 used to enable daisy chaining is also used for current detection
siliconchip.com.au
the code. The software checks the RA3
and AN4 inputs to the microcontroller
at power-up.
If the RA3 input is low (near 0V), the
software runs for a PAD unit, while if
RA3 is high (5.1V), either the Primary
or Daisy Chain code runs. To discern
between these two options, it checks
the AN4 input. If the voltage is low,
the software determines it is a Daisy
Chain unit. If the AN4 input is above
the threshold voltage for mains voltage detection, it runs the code for a
Primary unit.
It is important to build the Sequencer
according to the build details for the
version you are making so the software
runs correctly.
Building it
Fig.1: when used as a Primary unit, it continually sequences through up to four
outlets, switching them on for a fixed time in turn. The PAD unit is similar,
except it will only switch on outlets with an appliance connected and drawing
at least 35W. Otherwise, after a 1s delay, it skips that outlet.
on a PAD unit, and it can’t perform
both jobs simultaneously.
Fig.2 shows how a Daisy Chain unit
is connected to the Primary unit. The
Daisy Chain unit monitors the last outlet from the Primary unit via its Mains
Detect Input. Its Outlet 1 is powered
after the last outlet from the primary
unit (shown as Outlet 4) powers on
and then off. The Daisy Chain unit
then powers each outlet on and off in
sequence, stopping after the last outlet.
When used in this mode, the Primary unit powers each outlet on and
off in sequence, but after powering
Outlet 4 off, there is a delay before
powering Outlet 1 again. That gives
the Daisy Chain unit time to run its
complete sequence. We call this delay
the return delay, and it is set so that
the Daisy Chain unit finishes its entire
cycle before the Primary unit starts the
cycle again.
The return delay can be selected as
between one to four times the usual
delay period that is set with VR1. That
allows you to build the Daisy Chain
unit with between one and four additional outlets, with the delay multiplier on the Primary unit set to match
the number of outlets on the Daisy
Chain unit.
Version selection
The three versions use the same
software but run different sections of
This article mainly describes the
changes required for the new functions, so for the full PCB assembly
instructions, you will need to refer
to the articles in the February &
March 2024 issues (siliconchip.au/
Series/412).
Those articles describe various
build options. You can build a unit
with between one and four mains
outlets (see Table 1), and the optional
Current Detection and Mains Voltage
Detection circuitry may need to be
included.
With the new software, switches
S1-S3 provide functions different
from the original Mains Power-Up
Sequencer, as shown in Table 2 and
Table 3. VR1 is now only used to adjust
the power-on period for each outlet.
The wiring and PCB changes for
all three versions are shown in Fig.3.
In all cases, the two connections at
CON7 are bridged using 10A mains
Fig.2: for more than four outlets (up to eight), you can connect a Daisy Chain unit to a Primary unit, as shown here. The
Daisy Chain unit is triggered when the last Primary outlet switches off; the Primary unit waits for the Daisy Chain unit to
finish before restarting the sequence.
siliconchip.com.au
Australia's electronics magazine
July 2024 55
Photos of the completed Mains Power-Up
Sequencer before of any of the modifications in this
article have been made. Changes to the hardware are minimal.
wire. Current transformer T1 is only
used for the PAD unit, with the mains
Active wire passing through T1’s core.
The snubber components for the
OUT1 circuitry across TRIAC1 are a
10nF X2-rated capacitor for C1 and a
330W 1W resistor for R1. Do not use
the alternative 220nF X2 rated capacitor and 470W 1W resistor values mentioned in the original articles.
Microcontroller IC9 must be programmed with the revised software,
coded 1010823M.hex. You can download the HEX file and assembly language source code (siliconchip.au/
Shop/6/358) and program the chip
using a PIC programmer. Or you can
purchase a programmed microcontroller from the Silicon Chip website.
The above components and wiring
changes are common to all the revised
versions, but specific modifications are
Table 1 – setting the number of
outlets (for all units)
# outlets
RA1
(pin 18)
RA0
(pin 19)
4 (default)
0V (PCB
bottom
layer)
0V (PCB
bottom
layer)
3
0V (PCB
bottom
layer)
5.1V (PCB
top layer)
2
5.1V (PCB
top layer)
0V (PCB
bottom
layer)
5.1V (PCB
top layer)
5.1V (PCB
top layer)
1
56
Silicon Chip
required for each version, as described
below.
Primary unit
For the Primary unit, the current
and voltage detection sections are
left unpopulated. The mains Active
wire shown going through the current
transformer for the original Sequencer
instead goes directly to CON6. Place a
wire link between pins 4 and 5 of the
pads for IC11 so that the Sequencer
will run the Primary unit version of
the code at start-up.
You can select the number of active
outlets by making the linking options
as shown in Table 1. Set VR1 for the
required on-period of each outlet.
Fully clockwise sets a 30-minute timeout; a mid setting is about 15 minutes.
If the Primary unit is not being used
with a Daisy Chain unit, set switch S3’s
Table 2 – return delay setting
Return delay
S3 position
No
Left (open)
Yes
Right (closed)
Table 3 – return delay multiplier
(for daisy-chained Primary unit)
Multi. S1 position
S2 position
×4 Left (open)
Left (open)
Right
(closed)
Left (open)
×2 Left (open)
Right
(closed)
×3
Right
Right
×1
(closed)
(closed)
Australia's electronics magazine
lever to the left, so there is no return
delay (see Table 2). The switch positions for S1 and S2 do not matter for
this version.
If the Primary unit is used with a
Daisy Chain unit, set switch S3’s lever
right so there is a return delay (see
Table 2). The return delay setting is
made using switches S1 & S2, as shown
in Table 3; select the ×4, ×3, ×2 or ×1
delay multiplier to match the number
of outlets used on the Daisy Chain unit.
Daisy Chain unit
The Daisy Chain unit requires
the voltage detection circuitry to be
installed, with no wire link between
pins 4 & 5 of IC11’s pads. You can
select the number of outlets installed
in the Daisy Chain unit as per Table
1. Set VR1 for the required power-on
period of each outlet, but ensure it is
slightly less than the period set for the
Primary unit.
Set switch S3 for the Daisy Chain
version with the lever to the left so
there is no return delay (see Table 2).
The switch lever positions for S1 and
S2 do not matter for this version.
Phantom Appliance Detect
(PAD) unit
The PAD version requires the current detection circuitry to be installed,
with the Active wire from CON5 looping through current transformer T1
before terminating at CON6.
You will also need to connect a wire
between the 0V test point and the bottom of the 10kW resistor that connects
siliconchip.com.au
Fig.3: besides reprogramming IC9 with the new software, just a few changes are required to the hardware. Add one of the
wire links shown in red if building the Primary or PAD version. The mains Active wire only goes through T1 for the PAD
version; otherwise, it connects directly to CON6.
(through tracks on the PCB) to the pin
4 RA3 input of IC9, as shown above.
This informs the software that the unit
is the PAD version. With the revised
software, the RA3 pin is set as a digital input rather than as a master clear
(MCLR) reset line, as it was in the original version of the Sequencer.
Put switch S3’s lever left so there
is no return delay (see Table 2). The
switch lever positions for S1 and S2
do not matter for this unit.
Testing
As per the original Mains Power-Up
Sequencer articles mentioned, all wiring and adjustments must be made
with the input mains power disconnected since the circuitry is live when
plugged in. Also, any adjustments of
the period using VR1 are only detected
at power up, so there is no benefit to
siliconchip.com.au
adjusting VR1 with the power on.
So, each time you want to make an
adjustment, ensure that the power is
off before opening the lid of the enclosure. Replace the enclosure lid before
reapplying power.
If VR1 is set to its minimum fully
anti-clockwise position, the period
for each outlet will be short, at eight
seconds. That makes monitoring and
checking its operation easier. You can
see the sequencing occur as the indicator LEDs light up for each outlet.
For the PAD unit, the output LED
indicator for each channel will only
light when an appliance that draws
power (at least 35W) is detected. That
is because only the Triac for each channel is switched on initially, while the
current drawn by the appliance is first
detected, and the LED indicators only
show the relay status.
Australia's electronics magazine
Using the Triac to apply voltage
initially saves the relay from operating if there is no current drawn by
the appliance, extending the relay life
considerably.
For the PAD sequence, you can
check each outlet by connecting a
load that will draw 35W or more,
such as a 40W 230V AC halogen lamp.
Cycling through outlets that do not
have a load connected takes one secSC
ond per outlet.
Warning: Mains Voltage
All circuitry within the Mains
Sequencer operates at Line
(mains) voltages. It would be an
electrocution hazard if built incorrectly or used with the lid open.
Only build this if you are fully experienced in building mains projects.
July 2024 57
|