This is only a preview of the May 2026 issue of Practical Electronics. You can view 0 of the 80 pages in the full issue. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
Constructional Project
PROJECT BY PHIL PROSSER
Tool Safety
Timer
Have you ever accidentally left your soldering iron
switched on? This project will help allay your fears. It’s
also a great idea for fitting to a hot air rework system or
other mains-powered tools.
» Switches a mains-powered device off after a period of inactivity
» Activity of user movement sensed using a PIR (passive infrared) sensor
» Selectable timeout of 10, 20, 30 or 60 minutes
» Pushbutton to switch tool back on again after timeout
» Indicator LED shows when PIR is picking up motion
» Power supply: 12-20V DC, 9-15V AC <at> 200mA maximum with the device handling up to 10A/2.3kW
T
he hot air gun we use is one of
those ubiquitous ones sold under
many different brands. These tools
are quite low in cost but function
surprisingly well. To operate them,
you lift the handpiece and the heater
and fan start automatically. They run
until you place the handpiece back
in the cradle, which is sensed by a
magnet in the cradle and everything
cools down.
The hot air gun is often set well in
excess of 300°C and is therefore fully
capable of igniting combustible material. Unfortunately, this author is really
forgetful and often comes back hours
later to find the hot air gun ready to
go. If, for example, a mischievous cat
brushes against it, or a child decides
to play with it, the hot air gun may fall
from its cradle with nobody around to
avert disaster.
This has the real potential to set the
house on fire, which is the one thing
about this tool that we really dislike. It
should shut itself down after a period
of being idle.
On a somewhat less dramatic note,
our soldering iron is left on more often
than not. The one in our lab does not
have an automatic shutdown, and we
have found it running at full temperature after many days. This is much less
likely to cause a fire, but we have replaced many more tips than necessary
(and wasted expensive electricity too).
My modified hot air gun. We mounted the PCB to the inside of the lid, a
transformer to the base and the sensor and start switch to the side. This has
proven to be very effective. Yes, our hot air gun has seen some use.
60
This project is to provide a very
simple and convenient approach to
automatically switching these tools
off. You run your tool from a switched
mains source with a timer you can set.
If you are present and moving the tool
around, or moving around yourself,
the timer will be reset. If you leave the
room, when the timer expires, your
tool is switched off.
When you come back later, you just
need to press a button on the box to
restart it.
You might be sitting there for an
hour or two and the tool might run
for this time, but our theory is that if
you are present, you would catch any
significant hazard. Once you leave,
the system will ‘time out’ and protect
you and your tools.
Our tests have shown that with the
sensor on the desk near the user and
tool, it will easily detect the user’s
hand, and especially a hot soldering
iron or hot air gun.
We recommended the PIR is pointed
in the direction of your tool stand, ideally away from yourself and definitely
away from thoroughfares. This way,
it can detect when you stop using the
tool or when you leave the desk. In
practice, this works as long as there
is a line-of-sight from the sensor to
you or the tool when you place it in
its stand.
We considered two ways to use the
Tool Timer. The first is to mount it in
a UB1 ABS plastic case and power it
from an external 12V DC plugpack.
Practical Electronics | May | 2026
Tool Safety Timer
230V AC
MAINS INPUT
CON4
+3.3V
100nF
3×
4.7kW
JP1
LED1
4.7kW
2
2
3
2
IC1
PIC16F15214
RA4/AN4
RA1/ICSPCLK
1
4
JP2
1
2
MCLR
RA3/MCLR/Vpp
AN2/RA2
7
4
PGD
5
PGC
S1
L
RLY1
N
C
4.7kW
B
E
4.7kW
5
Q1
BC338
+~~–
D2–D4: 1N4148
K
4.7kW
4
1
MOD1
CON6
V+ 1
8
E
A
IC 1
W04
8
230V AC
MAINS OUTPUT
2
PIR
2
3
+V
O UT
GN D
MINI PIR
MOTION SENSOR
MODULE
BC338
CON5
ICSP
START
D2
A
6
3
E
CON2
1
K
4.7kW
A
N
R1
1
D3
V ss
+3.3V
l
K
RA0/ICSPDAT
RA5/AN5
1
2
K
1
V dd
L
CON8
A
2
F1
1
1A
CON3
LM317T
IN
V+
REG1 LM317T
CON7
START
CON1
O UT
V+
1
BR1
W0 4
+
IN
470mF
~
~
–
JP1
IN
IN
OUT
OUT
B
ADJ
2
100nF
O UT
ADJ
E
C
+3.3V
JP2 MINUTES
IN
10
O UT
20
30
IN
60
O UT
K
330W
D4 10mF
100nF
A
560W
Fig.1: the circuit is based around microcontroller IC1 and the PIR sensor. When the sensor’s output goes high, meaning it
has detected movement, the timer is reset. Once the time period has elapsed, the relay is de-energised, switching off the
tool. It can be switched on again by pressing S1.
The second is to embed this in a tool,
like our hot air gun. We will describe
how to package it in the UB1 case
in detail.
Because we do not know the specifics of your tools, we can’t go into great
detail on how to fit it inside a tool. However, we will provide notes and advice
on this. If you are not completely confident and comfortable analysing and
understanding how your specific tool
operates, we recommend you stick to
the UB1-packaged version.
Circuit details
The Tool Timer circuit is shown in
Fig.1. Switching of the tool power is
via a 10A mains-rated relay. The recommended relay can actually carry
and break 16A, which is more than
enough. We have heavy tracks on both
sides of the PCB so it can handle 10A
continuously.
The Tool Timer switches the Live
line only. Never assume that a device
that is disabled by it is isolated from
the mains.
We use an IEC plug/socket combo
for the mains input and output. This
has the Earth link integrated. We link
Practical Electronics | May | 2026
Neutral to Neutral directly on this
part, and wire the Live input through
our PCB to the Live output. It does not
matter which pins of CON2 are used
as the input and output.
For the PIR sensor, we chose one
that can operate from a wide range of
voltages, up to 20V DC, and provides
a 3.3V logic high level on the middle
pin when an object is detected. We
have included a test point on the PCB
to which you could connect another
LED with a series resistor to indicate
when an object is being detected by
the PIR. This is labelled “PIR”.
This PIR signal is fed to the PIC and,
if movement is detected before the Tool
Timer has switched the load off, it will
reset the timer. This means that if you
use a soldering iron or heat gun, taking
the tool from its holder and replacing
it, the PIR will sense this and reset the
timer. So it will never time out while
you are actively working.
The PIC has two jumpers, JP1 and
JP2, that allow you to program a timeout period of 10, 20, 30 or 60 minutes.
The timer starts when the PIC is powered up, and the relay is switched on
while the timer is counting down. In
practice, it won’t expire if you are using
the tool; there is even time to get a cup
of coffee, even from the shop, if you
are using 30 or 60 minute timeout!
Once the timer expires, the relay
switches off, and will only switch on
again if you press the START button
on the front panel (S1). That is really
all there is to this project.
Other uses of the Tool Timer are
quite varied. It could be used as a
night light that times out after 60 minutes and after people stop moving in
the room.
Another potential use is as a timer
for kitchen equipment, such as coffee
makers, toaster ovens etc. You can start
the device by pressing the button and
it will continue to run while people
are around and for a set period thereafter. This will help avoid that burned
coffee smell when the pot is left running too long, or that toasty maker sitting there running forever, waiting to
burn unsuspecting fingers.
Power supply
The power supply includes provision to mount a bridge rectifier, which
might seem odd. The intent is that if
61
Constructional Project
you are integrating this into an existing
piece of equipment, it may be easier
to power it from AC. Our heat gun, for
example, has 9V AC accessible. With
the bridge rectifier, this works just fine.
Of course, you can run DC via the
bridge rectifier, provided you have at
least 12V available for driving the relay.
We use an LM317 regulator to generate 3.3V for the PIC, but we operate
the PIR from the raw DC. The recommended PIR has its own regulator and
can accept 5-20V DC. This same PIR
sensor module is widely available from
various suppliers on the internet, so it
should not be difficult to get.
Table 1 – R1 values for a DC
supply (BR1 linked out)
Table 2 – R1 values for an AC
supply (BR1 loaded)
Supply
R1 value
Supply
R1 value
12V
0W (wire link)
9V
0W (wire link)
14V
33W ¼W
11V
39W ¼W
16V
68W ½W
13V
82W ½W
18V
100W 1W
15V
150W 1W
20V
150W 1W
OUT
D4
4148
START
CON7
330W
PIR
560W
REG1 LM317T
Q1
BC338
GND
A
K
CON8
LED
4.7kW
4.7kW
4.7kW
4.7kW
R1
Tool Timer v12 Nov 2024
62
CAUTION 230V AC
4.7kW
4148
+
PIR
CON6 10mF
RLY1
250V AC 10A
12V DC COIL
4.7kW
CON5 ICSP
~ –
+ ~
12-20V DC/AC
+3.3V
4.7kW
4.7kW
PCB and in Fig.2. In our testing, using
a 12V DC plugpack, the relay operates
just fine with this bridge in place, but
it is not necessary.
Double-check that you are inserting
it the right way around (pay attention
PCB design
to the markings on the device and the
We have added slots in the PCB to board), as these are really fiddly to
ensure isolation between the mains remove from the PCB if installed inand low-voltage sections of the board. correctly.
They will make certain that whatever
Follow by fitting the fuse clips (with
load you connect won’t cause arcing the retention tabs on the outside) and
across the relay tracks.
all the capacitors, watching the polarity of the electrolytics. Next, mount the
Construction
headers and screw terminal. The screw
The Tool Timer is built on a double- terminal specified is rated to 300V
sided board coded 10104251 that meas- AC and 16A. This part has a standard
ures 71 × 88mm. Assembly is fairly easy 5.08mm lead spacing; if you substias all the parts are through-hole types tute it, make sure the part is rated for
and the board is not tightly packed. at least 250V AC and the current you
Start with the resistors; fit all the 4.7kW are switching.
parts, then the others. Next, mount the
Now mount the transistor, relay and
three 1N4148 diodes, making sure they regulator. The relay has a very standard
face as shown in the PCB overlay dia- footprint and you will find many opgram, Fig.2.
tions. If you substitute this part, again
We have specified a W02/W04 (or you need to pay attention first to the
similar) diode bridge. If you are run- voltage and current ratings, as well as
ning this from DC, you could install the coil voltage rating.
wire links in its place, as shown on the
We have wired the relay to operate from the input supply. If
JP1 IN, JP2 IN → 10min
FIT RED WIRE
this is a 12V DC plugpack, we
JP1 IN, JP2 OUT → 20min
LINKS INSTEAD JP2
JP1 OUT, JP2 IN → 30min
want this to power the relay
OF BR1 FOR DC
JP1 OUT, JP2 OUT → 60min
JP1
directly. In this case, R1 is a
F1 1A
wire link (ie, 0W). If your DC
BR1
supply is more than 12V, we
W02/W04(M)
CON2
want to drop this back to 12V
IC1
TO LOAD
+ PIC16F15214
with a resistor.
This dropper does not need
470mF
to be very accurate. If the relay
100nF
D3
gets a supply within a volt
CON1 100nF
Power 100nF
or two of 12V, it will be OK.
COIL
4148
D2
Fig.2: there is nothing
terribly difficult about
assembling this PCB. We don’t
recommend using a socket
for IC1, as it could fall out
and cause a safety hazard.
Watch the orientation of the
bridge rectifier, electrolytic
capacitors, regulator, diode
and IC and note the three
safety clearance slots.
Table 1 provides values for R1 if your
DC supply us higher than 12V, while
Table 2 provides various R1 values for
AC supplies. If using an AC supply, it
must not exceed 15V.
With all the parts aside from the PIC
loaded, apply power to your board
using a plugpack or bench supply and
measure the voltage between pins 1 and
8 of IC1’s pads. The reading should be
3.3V ±0.2V. If this is not right, check that
the bridge is in the right way around
and that the regulator is mounted correctly. Also check the 330W and 560W
resistors and diodes.
With the power supply operating
OK, disconnect the power supply and
fit the PIC. Double-check its orientation before soldering it. If yours is preprogrammed, you can move onto the
Packaging section. There is a programming header on the PCB (CON5); this
uses the standard Microchip pinout
so a SNAP or PIC kit can be plugged
straight in. You can download the required firmware from siliconchip.au/
Shop/6/1825
Packaging
A UB1 Jiffy box is a good match
for this board and associated parts.
Figs.3 & 4 show the holes and cutouts
that are required. Mark and drill the
round holes first. We used a stepped
drill for the PIR hole. If you have
never used one of these, we reckon
you should try one – they are awesome for making larger holes in plastic and aluminium.
There are a couple of locations where
you will need to trim back the PCB
guide rails on the inside of the case
using a sharp knife or chisel.
For the holes in the base for the PCB,
a quick cheat is to drop the board into
the case and mark through the mounting holes. We wanted the PCB on the
opposite side of the box from the PIR
to allow room for connectors, and we
suggest you do the same.
We used an oscillating multi-tool for
the rectangular cutout, which made a
Practical Electronics | May | 2026
Tool Safety Timer
Figs.3 & 4: just four holes are required
in the base – you can use the PCB as
a template to mark their positions
before drilling. Make the holes as
shown here (and in Fig.6 overleaf) to
verify how they relate to each other.
You can use a multitool or rotary tool
to cut the rectangular opening, or
drill a series of small holes inside its
perimeter and then file it to shape.
Fig.5: the label for the Tool Safety
Timer is shown here at 50% actual
size. You can download it from
siliconchip.au/Shop/11/1827
63
Constructional Project
Fig.6: here is how to run the wiring. While you could solder most of the wires to the PCB, the headers and plugs make it
much easier to disassemble it should you need to. Don’t omit the cable ties and make sure the mains wires are correctly
rated, the right colours and routed to the appropriate terminals (they are usually marked L (or A), N & E on the connector).
somewhat fiddly job easy. So if you
have one, crack it out for this part of
the job. The recommended case is
made of ABS plastic, which is not
hard, so you can easily use a small
hand saw for this. Make sure this hole
starts smaller than needed and file it
to the final size.
Lastly, you should add a 1.6mm
thickness (or more) piece of insulating material like fibreglass between the
IEC socket and PCB. The insulation material should
be cut to fit the UB1
case (89 × 48mm),
and you will
need to use
a sharp knife to cut a small hole to
allow wiring to pass through.
Setup and wiring
With the box ready, we can now
start pulling it all together. Use the
wiring diagram, Fig.6, and photo opposite as guides while you read the
following steps.
Headers JP1 and JP2 set the timeout
period to 10, 20, 30 or 60 minutes. We
are using jumpers since our experience
is that once you settle on a workable
period, you don’t need to change it. It
is possible to wire these to a switch or
switches if you have an application
in which this is necessary.
Refer to the circuit diagram
(Fig.1) to determine whether to place shunts on JP1
and/or JP2 for your preferred timeout and
set that up now.
Next, com-
We have used a 33W
resistor for the relay, as
our DC supply is 14V. You
need to select the right value
for your application.
64
plete the wiring to the panel-mounting
LED, start button, PIR sensor and power
input connector. You need these installed in the case and secured with the
appropriate washers and nuts before
you connect the headers to their connecting wires, as the headers will not
fit through the holes in the case.
Assuming your DC supply is from a
plugpack and you’ll be using a barrel
socket, wire it to the board using two
90mm lengths of light-duty hookup
wire. We used red and black, with the
red wire going to the positive middle
pin on our 2.1mm inner diameter barrel
socket.
For a DC supply, make sure that
your positive wire goes to the pin of
CON1 marked +. If you don’t have the
crimping tool for the plug, you can
use a pair of side cutters or needle-
nose pliers to crimp the wire in. This
crimp will not be great, so solder over
your temporary crimp, and it will be
secure. Just don’t add a lot of solder
or you won’t be able to insert the pin
into the plastic block.
For the PIR, use 70mm of light-duty
wire. We used a ribbon cable offcut as
this helps keep the wiring tidy. You
need to ensure that the headers are
wired correctly, ie, the + pin on the
PCB goes to the positive supply on the
Practical Electronics | May | 2026
Tool Safety Timer
module, the – pin goes to the negative
supply and the centre pin goes to the
PIR output.
For the LED, use two 90mm lengths
of light-duty hookup wire or another
ribbon cable offcut. You need to make
sure you get the anode and cathode to
the right pins. The cathode has a chamfer on the side of the LED and a shorter pin (it goes to the pad marked K).
For the start button, use another two
90mm lengths of light-duty hookup
wire or a ribbon cable offcut. Any colour
will do. The button is not polarised,
so connect the button to the two-way
plug however you want.
Testing
With the timer set to 10 minutes
(JP1 & JP2 in), apply power. Put something over the PIR sensor so it cannot
detect your presence; a sheet of paper
will do the trick. The LED should light
and stay lit for pretty close to 10 minutes, then it should switch off. You
should hear the relay switching along
with the LED.
If the LED stays on permanently,
check that you have the PIR covered
and that it is not detecting you move
around, as it will reset the timer and
the LED won’t go off. Also check that
the voltages on the PIR are right. You
should be able to monitor the PIR
output using a DVM on the PCB test
point, and see the PIR detecting
your hand if you wave it in front
of the PIR.
If it still isn’t working, check for
short circuits on the PCB around the
PIC and the PIR header, and verify
that the transistor is in the right way
around and that you have used an NPN
type (BC337 or BC338).
Once it has timed out, press the start
button. The relay should switch and
the LED should come on again for a
further 10 minutes.
Finally, run the same test with the
PIR pointing in your general direction
and wait the 10 minutes. Unless you
sit statue still, the PIR will sense you
and the LED and relay should stay on.
Final assembly
We can now assemble this lot into
the enclosure. Install the standoffs
using shakeproof washers and machine
screws, then mount the PCB into the
enclosure. If you haven’t already, plug
the power, start, PIR and LED headers
onto the board.
Now you can zip tie both the PIR
Practical Electronics | May | 2026
The wiring for the Tool Safety Timer in the
recommended UB1 enclosure. Use 10A mains-rated
wire for the connections to the IEC connector.
and power wires to the PCB using
the two holes provided next to the
power connectors. Similarly, zip tie
the start button and LED wires using
the lower set of 3mm holes provided
on the PCB. We recommend applying a drop of Loctite or similar glue
to the connectors to secure them to
the board.
Now install the IEC connector into
the enclosure. Ensure it is secure and
the mounting snap-in tabs hold it in
place. If it is not totally secure, fix that
before proceeding.
65
Constructional Project
Parts List – Tool Safety Timer
1 double-sided PCB coded 10104251, 71 × 88mm
1 UB1 Jiffy box, 158 × 95 × 53mm
1 1.6mm-thick insulation material cut to 89 × 48mm
(fibreglass, acrylic, Presspahn or similar)
1 12V DC 200mA+ power supply (eg, plugpack)
1 12V DC coil 250VAC/10A+ SPST PCB-mount relay (RLY1)
[eg, SMI-S-112LM (AliExpress 1005004502346634]
1 PIR motion sensor module (MOD1)
[HC-SR501, AliExpress 1005006824167570]
2 M205 PCB-mounting fuse clips (F1)
1 M205 1A fast-blow fuse (F1)
1 SPST red panel-mount pushbutton switch (S1)
2 2-way headers, 2.54mm pitch (JP1, JP2)
2 jumper shunts (JP1, JP2)
Connectors
3 2-pin polarised headers with matching plugs and pins
(CON1, CON7 & CON8)
1 2-way mini terminal block, 5/5.08mm pitch (CON2)
1 chassis-mounting barrel socket (to suit power supply) (CON3)
1 10A 250V IEC mains power input (C13) & output (C14) socket
combination (CON4)
1 5-pin header, 2.54mm pitch (CON5; optional – for ICSP)
1 3-pin polarised header with matching plug and pins (CON6)
Hardware, cable & wire
8 M3 × 6mm panhead machine screws
8 M3 shakeproof washers
4 M3 × 10mm tapped spacers
7 100 × 2.5mm Nylon cable ties
1 100mm length of 5mm diameter black heatshrink tubing
1 100mm length of light blue 10A mains-rated wire
1 300mm length of brown 10A mains-rated wire
1 IEC C13-C14 mains extension cable
4 stick-on rubber feet
Semiconductors
1 PIC16F15214-I/P programmed with 1010425A.HEX, DIP-8 (IC1)
1 LM317T 1A adjustable regulator, TO-220 (REG1)
1 BC337 or BC338 25V 800mA NPN transistor, TO-92 (Q1)
1 red 5mm LED with bezel (LED1)
1 W02(M) or W04(M) 1.2A bridge rectifier (BR1)
3 1N4148 75V 200mA signal diodes (D2-D4)
Capacitors
1 470μF 35V electrolytic
1 10μF 50V electrolytic
3 100nF 63V MKT
Resistors (all ¼W 1% axial unless noted)
8 4.7kW
1 330W
1 560W
1 0-150W 0.25-1W resistor (R1; see Table 1 & text)
Check that the Earth link is good
(that the two Earth pins in the IEC
socket have a very low resistance between them). It is part of the connector
and it’s critical for safety, so we want
to make sure it is OK. You will need
to solder the Earth link on the back of
the IEC connector as its fixing assumes
a wire will be soldered to it.
Now connect a short length of 10A
light blue mains-rated wire between
66
the terminals labelled N on the rear
of the connector.
Use two pieces of 5mm diameter
heatshrink tubing to insulate the connections of this wire to the IEC connector tabs. Note that this wire will
cross over the Earth strap.
Now take two 150mm lengths of
brown 10A mains-rated wire and connect them to the Live terminals on the
IEC connector. Insulate these with 5mm
heatshrink tubing too. Run a 2.5mm
cable tie around the Live and Neutral
wires, under the ground strap, and
secure them together.
With the PCB in the case, trim the
length of the two brown Live wires so
they neatly present to the load switch
connector, CON2, on the PCB. Once
wired to the terminal, secure it to the
PCB using a cable tie.
Stick on four rubber feet onto the
case so you don’t scratch your desk,
and the Tool Timer is complete.
Finally, you can attach a label to the
lid. This is a simple and cheap way of
making this utilitarian project that little
bit neater. The label can be downloaded
from siliconchip.au/Shop/11/1827 and
you can find instructions for printing
and attaching it at siliconchip.com.au/
Help/FrontPanels
We used a 0.75m IEC mains extension
cable to connect our soldering station
to the tool timer. In operation, simply
press “Start” on the tool timer and, while
you are around and moving, your tool
will stay on. When you wander off, it
will switch itself off. Simple!
We will not go into detail regarding
how the tool timer can be installed
inside a heat gun as there are too many
inconsistencies in how these are built
for instructions to be safe. Only attempt
to do this if you thoroughly understand
what you are doing.
After reverse engineering our hot
air gun, we concluded the safest approach would be to shut down the
entire controller after the timeout. We
chose to install a small 12.6V transformer in the case alongside the main
transformer to power the Timer. We
then used the Timer’s onboard relay
to disable the main transformer that
ran the hot air gun controller.
Now I am less worried about my
thoughtless cat setting my house on fire!
Modifications
If you want a timeout period different from the four options we have
provided, the source code for the PIC
firmware is available to download from
siliconchip.com.au/Shop/6/1825
The definitions for the timeout period
are in the header file “util.h”, defined
in four lines (starting with #define
Time_10Min_Runtime).
The timer counts in tenth of a
second intervals, so 10 minutes is
6000 counts. Hence, each value is
the required number of seconds multiplied by ten.
PE
Practical Electronics | May | 2026
|