This is only a preview of the June 2024 issue of Silicon Chip. You can view 57 of the 112 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Arduino Clap Light":
Items relevant to "ESR Test Tweezers":
Items relevant to "MicroMag3 Magnetic Sensor":
Items relevant to "USB-C Serial Adaptor":
Items relevant to "DC Supply Protectors":
Items relevant to "WiFi DDS Function Generator, Pt2":
Items relevant to "Arduino bin reminder":
Purchase a printed copy of this issue for $12.50. |
SILICON CHIP
Mini Projects #005 – by Tim Blythman
Self Toggling
Relay
Here’s a simple circuit, using just one relay and a
handful of passive parts, that allows you to toggle or
switch the relay off and on with just one pushbutton. It
demonstrates some of the finer details of working with
relays and can be used to control a wide range of devices.
O
ver the years, we have had several
requests for simple circuits that
allow a relay to be switched on and
off by pushing a button. Some readers sent in suitable circuits, but they
all involved multiple relays.
This design achieves that goal using
just one DPDT (double-pole, double-
throw) relay, a common type. It provides a free set of ‘dry’ contacts, meaning they are not connected to any circuitry or a power source. You are free
to do whatever you want with them,
within the limits imposed by the
relay’s ratings.
It might be possible to build this circuit using a single-pole (SPST) relay
if the thing you wanted to switch was
completely independent of the relay’s
power source. Still, DPDT relays are
inexpensive, and using a free set of
contacts is safer.
The relay
Our design relies on a property of
relays that we can demonstrate with
the circuit in Fig.1. A capacitor is
connected across the relay’s coil and
charged via a resistor fed from the normally closed (NC) contact.
When power is applied, the capacitor charges until the relay’s armature
pulls in. The contacts open, the capacitor discharges until the armature drops
out, and the cycle continues. It forms a
‘relaxation oscillator’. Scope 1 shows
the resulting waveform for the Jaycar
SY4065 relay that we are using.
The blue trace is the voltage across
the coil, while the red trace shows
Scope 1: the blue trace shows the voltage across the coil, which rises and falls
between the must-release and must-operate voltages. The red trace shows the
relay state changing as the voltage does (with quite a bit of contact bounce at the
transitions, as is expected).
46
Silicon Chip
Australia's electronics magazine
the relay state changing. Although
it is a 12V relay, the contacts open
at around 1V and close at around
9V. The relay data sheet lists those
as the ‘must release’ and ‘must operate’ voltages.
As you can see from the scope grab,
this circuit toggles at around 10 times
per second, so this relay’s minimum
100,000-cycle operating life would be
reached in about three hours!
If you want to apply this design to
another relay, we recommend checking its data sheet first.
Our circuit
Fig.2 shows the circuit for the Self
Toggling Relay. RLY1’s coil has a
resistance of around 160W, and when
power is applied, it has around 6V
across it. That is less than the must-
operate voltage, so the relay remains
off.
The capacitor charges up via the
relay’s NC and COM contacts, reaching
close to 12V after a few seconds. Pressing S1 places the capacitor directly
across the relay coil.
Since it now has 12V across its coil,
the relay pulls in and the contacts
change over. When S1 is released,
the coil voltage returns to around 6V,
above the must-release voltage.
The capacitor now discharges to 0V
via the NO and COM contacts. This
takes around a second, since it will
have discharged slightly while S1 was
pressed. If S1 is pressed again, the
siliconchip.com.au
Fig.1: this is the circuit we used
to test our relay before building
the prototype. Scope 1 shows the
resulting waveform. We suggest
you don’t build this as it will cause
the relay to toggle rapidly, possibly
wearing it out quickly.
reverse happens and the relay drops
out, returning to the earlier state.
Effectively, we are using the hysteresis of the relay coil voltage (the
difference between the must operate
and must release voltages) to maintain its state and using the capacitor to change the state. The capacitor
charging time sets the maximum toggling rate, about once per second for
the chosen components.
Since the relay is not operating at its
full rated voltage, the contacts are not
pulled in as tightly as they would otherwise be. This means the relay may
be more susceptible to vibration and
shocks and might drop out (or in!) if
subjected to rough conditions.
Also note that if power is removed,
the relay will return to the released
state almost immediately; this is a nice
safety feature.
Construction
We have used a socketed relay to
minimise the amount of soldering
needed. The physical arrangement
has been kept similar to the Fig.2 circuit diagram to make it easier to follow. You could use a smaller relay
laying on its back and solder the
other components to its leads, ‘dead
bug style’.
The circuit is also easy to assemble
on a breadboard or prototyping board.
Just be aware that other relays might
have different pinouts or component
requirements; we’ll discuss that later.
siliconchip.com.au
Fig.2: the Self-Toggling Relay circuit
diagram, laid out similarly to our
prototype. The component values
have been chosen to work with the
selected relay; different relays will
likely require different values.
The Parts List reflects what we have
built, but several alternatives exist.
See the photos for how the prototype
was wired up. We used black wire for
the two terminals connected to the
negative end of the 12V supply, while
the red wire connects to the positive
of the 12V supply.
Wire up the lower set of contacts
first, as they will be hard to get to
once the upper components (particularly the capacitor) are fitted. We’ve
mostly made the other connections
using the component leads, with some
extra wire in some places. The blue
and white wires connect to the switch
terminals.
Testing
Hook up the 12V supply; nothing should happen right away. If the
relay starts chattering, disconnect the
power supply and check your wiring.
You might have inadvertently made a
circuit more like Fig.1 than Fig.2. A
wrong value for the 1kW resistor might
also cause chattering.
Wait a few seconds, then press the
pushbutton and confirm that the relay
toggles. Wait another second and confirm that it toggles back when the pushbutton is pressed a second time. In that
case, the circuit is working.
You can use the second set of contacts as though they are an SPDT
switch, or you can use either half (NO
& COM or NC & COM) like an SPST
switch, depending on whether you
want it to default to open or closed
when power is not applied.
If you want to add an indicator light,
a 12V globe or 12V LED could be connected between the COM and NC terminals. This will light up when the
relay is pulled in. Similarly, a globe
or LED connected between the COM
and NO terminals will light up when
the relay is off.
Alternatives
If you need another button that will
always switch the circuit on or off,
you could add another pushbutton,
1000μF capacitor and 1kW resistor
and wire them up in almost the same
fashion.
In this case, instead of feeding the
1kW resistor from the relay’s COM contact, feed it from 12V for an ON switch
or 0V (ground) for an OFF switch.
That gives a circuit that can generate the necessary impulse, but it will
always have the same effect instead
of toggling.
Keep in mind that pressing more
than one switch simultaneously might
connect capacitors charged to different voltages, possibly running high
currents through the switch contacts
and damaging them.
Other relays
The 150W resistor value was chosen to set the coil voltage between its
must-release and must-operate voltages. For other relays, a resistor with
a similar resistance to the relay coil is
a good starting point. By the voltage
divider equation, this will put about
Parts List – Self Toggling Relay (JMP005)
1 DPDT 12V relay (RLY1) [Jaycar SY4065]
1 relay socket base to suit RLY1 [Jaycar SY4064]
1 momentary SPST pushbutton switch (S1) [Jaycar SP0710]
1 1000μF 25V electrolytic capacitor [Jaycar RE6230]
1 1kW 1/2W resistor [Jaycar RR0572]
1 150W 1W resistor [Jaycar RR2554]
1 12V DC power supply
various short pieces of stiff wire to make connections
Australia's electronics magazine
June 2024 47
This simple circuit is a proof of concept. Still, we think readers will find
it handy when they need to toggle a relay using only a single momentary
pushbutton.
half the supply voltage on the coil. If
the data sheet does not mention a figure, measure the coil resistance with
a multimeter.
Note that we used a 1W resistor here;
you should check the power dissipation if making circuit changes. Your
circuit should run from the voltage the
relay is rated for. Don’t try to power a
5V relay from a 12V supply!
An early prototype we built used
a smaller relay and we found that
a 100μF capacitor could provide
enough impulse to toggle the relay.
The exact value depends on the relay,
so we advise experimentation to find
a capacitor value that works consistently.
The second resistor (1kW in our
case) must have a high enough value
to avoid substantially changing the
coil voltage while the pushbutton is
pressed. A value at least five times
higher than the first resistor should
work well.
The combination of the 1kW resistor
and 1000μF capacitor (as used in our
circuit) dictates the maximum rate at
which the pushbutton can toggle the
relay. Larger values will mean a longer
SC
wait time between presses.
Silicon
Chip
as PDFs on USB
¯ A treasure trove of Silicon Chip magazines on a 32GB
custom-made USB.
¯ Each USB is filled with a set of issues as PDFs – fully
searchable and with a separate index – you just need a
PDF viewer.
¯ 10% off your order (not including postage cost) if
you are currently subscribed to the magazine.
¯ Receive an extra discount If you already own digital
copies of the magazine (in the block you are ordering).
The USB also comes with its own case
EACH BLOCK OF ISSUES COSTS $100 OR PAY $500 FOR ALL SIX (+POSTAGE)
NOVEMBER 1987 – DECEMBER 1994
JANUARY 1995 – DECEMBER 1999
JANUARY 2000 – DECEMBER 2004
JANUARY 2005 – DECEMBER 2009
JANUARY 2010 – DECEMBER 2014
JANUARY 2015 – DECEMBER 2019
WWW.SILICONCHIP.COM.AU/SHOP/DIGITAL_PDFS
Ordering the USB also provides you with download access for the relevant PDFs, once your order has been processed
48
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
|