This is only a preview of the May 2026 issue of Silicon Chip. You can view 44 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. Items relevant to "Power Amp Clipping Indicator":
Items relevant to "Simple LC Meter":
Items relevant to "WiFi Alarm Monitor":
Articles in this series:
Items relevant to "μDCC Decoder":
Purchase a printed copy of this issue for $14.00. |
O
ver 20 years ago, my mother was
becoming infirm and had a tendency to fall and couldn’t get up.
I lived too far away to visit every day,
but near enough that I could attend
in an emergency. What was needed
was a way to alert me to any potential problem.
These were the days before the
internet was common in the home,
so I devised a plan to connect the PIR
(passive infra-red) movement sensors
in the burglar alarm to a cheap landline telephone handset from the local
discount store. All that was needed
was an interface between the alarm
panel and the ‘phone.
The system potentially saved my
mother’s life on three occasions, when
she had fallen and couldn’t get up. On
a fourth occasion, she had been taken
into hospital but had not bothered to
tell family, friends or the local community services, causing a major panic.
I got the alert just as I landed in
Amsterdam for a well-earned weekend
break. However, at least I was able to
inform family members of a potential
problem.
The original solution
The original circuit is shown overleaf for interest (Fig.1). The burglar
alarm’s communicator outputs and
three PIR sensors on separate zones
were connected to a PIC16F84 microprocessor (IC1) via NPN transistors
Q1-Q5. This allowed the PIC processor
to detect activity in the three PIR zones,
monitor for alarm conditions and also
determine whether the burglar alarm
was set (armed) on unset (clear).
I removed the keypad, microphone and ‘off hook’ switches from
the ‘phone. The keypad was replaced
Image source: https://unsplash.com/photos/a-black-and-white-alarm-clock-on-a-white-background-CfuOZPNSr6E
WiFi Alarm
Monitor
If someone lives by themselves,
especially if they are elderly,
they can end up in situations
where they need help but
can’t get it. This alarm system
provides a way to alert others
when there is a problem.
A project to help the elderly by Kenneth Horton
by two quad opto-isolators (IC3 &
IC4) driven by a 74LS139 dual 1-of-4
decoder, IC6. The ‘off hook’ switch
was replaced by relay RLY1; both were
activated by the PIC16F84.
I replaced the microphone with a
1:1 ratio isolating transformer. The
first version sent an alert in Morse
code, but this was later replaced by
an ISD1110 voice encoder chip (IC5)
to give spoken alerts.
If the burglar alarm was activated,
or no movement was detected for a
set period, the PIC processor would
dial my mobile number and the voice
chip would inform me that there was
a problem. Monitoring whether the
panel was set (armed) or unset (clear)
allowed different time intervals to
be set.
The top and bottom of the PCB used to prototype the WiFi Alarm Monitor. It’s
very simple compared to the older landline-based circuit shown in Fig.1
siliconchip.com.au
Australia's electronics magazine
My mother set the panel at night
upon going to bed, and in this case,
there was a much longer time delay
without movement before an alert was
generated than during the daytime
when the panel was unset.
Bringing it up to date
I am not yet at the stage where I am
infirm, but I know that the time may
come when my family are as concerned about me as I was about my
mother. I decided that I should update
the design, making use of the now
widely available internet and WiFi,
and install it while I have my faculties.
The system performs two functions:
first, it will alert me or my family in
case of an alarm condition, such as the
burglar alarm being set off. Second, it
will monitor my daily activity. If none
is detected, it will alert the family of a
potential problem.
In my case, the alarm system consists of both door switches and PIR
detectors, but the solution can be tailored to individual requirements.
Monitoring alarm conditions is
straightforward. However, monitoring
daily activity is more in-depth. There
are three different modes:
• Daytime, when the occupant is
at home and the alarm panel is unset.
• Nighttime, when the occupant is
in bed and the panel is set (armed).
• When the occupant has left the
premises and presumably armed the
alarm.
May 2026 69
Fig.1: the circuit of my original alarm dialler, which interfaced with the (now
largely obsolete) public telephone network by connecting to an old handset
via CON2, CON3 & CON4. That allowed it to dial me after a
delay if it sensed a lack of activity.
The WiFi Alarm monitor uses
a single Raspberry Pi Pico W
(shown enlarged).
Fig.2: the new Alarm Monitor is
simpler and more modern, using a
Raspberry Pi Pico W to send emails
and/or SMSs if the activity coming
from the alarm via level-shifters IC2
and IC3 looks suspiciously quiet.
▶
During the daytime, the system
needs to check on activity by monitoring door switches and PIRs. At night,
when the panel is set, the system needs
to check that the panel is unset the following morning.
If the occupant has gone out, the
activity monitor needs to be disabled
because the user may simply have
popped to the shops, or they may have
gone on a three-month world cruise!
In this case, inactivity alerts would be
annoying, to say the least!
The use of the exit door within minutes of the panel being set (armed) differentiates between the panel being set
70
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
give a degree of separation between the
alarm panel and the interface.
These 12 inputs, together with an
optional test button (S1) are connected
to a Raspberry Pi Pico W, which provides all the intelligence and a connection to the internet. The Raspberry
Pi Pico W is the version with built-in
WiFi.
The only other components are a
simple linear power supply with an
axial fuse to convert the 12V from the
panel to five volts for the Raspberry
Pi Pico W. This is fed to the Raspberry Pi via a schottky diode so that
it can safely work in parallel with a
USB supply.
Software description
while the user is in the premises and
when he or she has gone out.
The system can send emails to four
different groups of people, depending
on what has triggered the alert, and can
also send SMSs to up to four different
telephone numbers. To send SMS text
messages, you will need a free Twilio
account.
Setting one up is easy; visit www.
twilio.com for more details. Twilio
works in the UK, Australia, NZ, EU,
USA and many other countries too.
Circuit description
As with many modern circuits, the
siliconchip.com.au
hardware is relatively simple, and all
the intelligence is within the software.
The updated circuit is shown in Fig.2.
Up to 12 inputs from the alarm
panel, both individual zones and communicator outputs, can be monitored
via CON1 & CON2. Communicator
outputs are typically: panel armed,
alarm condition, fire, panic and abort,
together with a 12V supply.
The 12 inputs are connected via
10kW resistors to two 74HC4050
high-voltage input non-inverting buffers, which allow the (typically) up to
12V signals from the alarm panel to be
safely converted to 3.3V. The resistors
Australia's electronics magazine
The software for the Raspberry Pi
Pico W is written in MicroPython.
There are three files: main.py, umail.
py and parameters.py. The first two
files should be installed as supplied.
The parameters.py file needs to be
edited to tailor the system to your individual requirements.
The parameters.py file contains
numerous constants and arrays. The
program has been designed to be as
flexible as possible, to allow for many
different scenarios. The file parameters.py can be edited in a text editor,
or with Thonny, as described later.
Note that MicroPython’s code is
strictly case sensitive, so great care is
needed while editing to avoid unintentional errors!
The first section of parameters.py
contains constants that should not
be altered. The user-defined parameters are from around line number 47
through to the end of the file. Looking
at each section in turn:
The first section of comments on
lines 47 to 77 is not essential, but
I found it useful in clarifying my
requirements. I suggest that you review
and change these comments to define
your own requirements. Don’t forget
to include a hash mark (#) at the start
of each comment line.
Editor's note: the line numbers do
not match up to the Listings shown in
this article (taken from “parameters.
py”, as we have removed the comments and line breaks due to space
restrictions. The downloaded file
match the referenced lines.
The next section (lines 78-101, Listing 1) sets timings for various functions in seconds, minutes or hours as
appropriate.
May 2026 71
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
Watchdog = const(True)
Set_timeout = const(11 * Hours)
Primary_timeout = const(8 * Hours)
Secondary_timeout = const(5 * Hours)
Exit_timeout = const(3 * Minutes)
First_delay = const(30 * Seconds)
Second_delay = const(5 * Minutes)
WiFi_timeout = const(15)
WiFi_retry = const(10 * Minutes)
Maximum_retries = const(3)
Periodic_checking = const(7 * Days)
Listing 1: this section of the code defines various delays and settings. We have
removed comments and new lines for brevity. The line numbering isn’t an exact
match to the actual file, it’s just there to make it easier to follow.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
WiFi_username = "Your SSID"
WiFi_password = "Your password"
smtp_address = "smtp.aaa.com"
smtp_port = 25
smtp_username = "Your login"
smtp_password = "Your password"
Email_from = "from<at>aaa.com"
Email_subject = "Alarm status report"
Email_to_1 = "Contact1<at>aaa.com"
Email_to_2 = "Contact2<at>aaa.com"
Email_to_3 = "Contact3<at>aaa.com"
Email_to_4 = "Contact4<at>aaa.com"
Twilio_Account = "Twilio account number"
Twilio_Auth = "Twilio authorisation"
Twilio_phone_no = "Twilio phone no"
SMS_to_1 = "00000000001"
SMS_to_2 = "00000000002"
SMS_to_3 = "00000000003"
SMS_to_4 = "00000000004"
Listing 2: the WiFi, email, and SMS settings.
136. Zone_name = {
137.
0: ["Front door", Primary_zone | Exit_zone],
138.
1: ["Lounge PIR", Secondary_zone],
139.
2: ["Dining door", Primary_zone],
140.
3: ["Back door",
Primary_zone],
141.
4: ["Hall PIR",
Secondary_zone],
142.
5: ["Kitchen PIR", Secondary_zone],
143.
6: ["Abort",
Abort_status],
144.
7: ["Panic",
Communicator],
145.
8: ["Spare",
Spare_zone],
146.
9: ["Spare",
Spare_zone],
147.
10:["Panel",
Panel_status],
148.
11:["Alarm",
Alarm_status],
149.
12:["Test",
Test_button]
150.
}
Listing 3: the zone definitions.
Watchdog should be set to “True”.
Only set it to “False” while testing.
Set_timeout is the amount of time
before an alert is sent when the panel
is set.
Normally, this will be at nighttime
when the alarm panel is set and the
user is in bed. As noted previously,
this timeout is disabled if the exit zone
has been triggered, indicating that the
user has left the premises.
The values Primary_timeout and
Secondary_timeout similarly set the
amount of time before an alert when
the panel is unset; usually, this will
be during the day, when the user is
its home.
Primary zones are where there is
a definite action by the person being
monitored, such as opening or closing
a door that has a door switch.
Secondary zones are typically PIR
movement sensors, and these may
be triggered accidentally by a person
who has fallen trying to get up unsuccessfully, or a pet wandering through.
As such, they are less reliable as an
indication of activity compared with
the primary zone. When relying on
PIRs, you need to monitor more than
one zone!
Exit_timeout defines the amount
of time between the panel being set
(armed) and the exit door being triggered; it will usually be two or three
minutes. It must be set for a longer time
than that set in the alarm panel itself.
Otherwise, the exit condition will not
be recognised.
First_delay is the amount of time
between an alarm condition and the
first alert being sent, and is typically
set to one or two minutes so that false
alarms can be cancelled.
Second_delay is the amount of time
between the alert being sent to the first
contact and the subsequent contacts.
WiFi_timeout is the length of time
the system tries to connect to the router
before timing out.
180. Alarm_types = {
181.
"Alarm":
["Alarm", Delay1 | Email_Contact1 | Delay2 | SMS_Contact2],
182.
"Communicator":
["Communicator", Email_Contact1],
183.
"No_Activity_Clear": ["No activity panel NOT set", Email_Contact1 | Delay2 |
Email_Contact2 | SMS_Contact3],
184.
"No_Activity_Set":
["No activity panel set", Email_Contact1 | Delay2 |
Email_Contact2 | SMS_Contact3],
185.
"Test":
["Test message", Terminal | Email_Contact1],
186.
"Check_in":
["Periodic check-in", Email_Contact1],
187.
"Restart":
["Alarm monitor restart", Email_Contact1]
188. }
Listing 4: the actions to be performed for each alert condition.
72
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
WiFi_retry is the amount of time
between attempts to connect to the
WiFi network, assuming that it has
been unsuccessful.
Maximum_retries sets the maximum number of attempts to connect
to WiFi or send an SMS text message.
This is to prevent the monitor from
entering an endless loop due to a WiFi
or SMS problem, and allows it to move
on to subsequent actions.
Periodic_checking enables the monitor to send a periodic email or text
message to confirm that it is up and
running. A value of 0 disables it.
The next section (lines 103 to
125, Listing 2) sets your WiFi username and password, and your email
login details, followed by the email
addresses and SMS phone numbers
of your contacts. I have found different email providers to be a little fickle
about the format of parameters, so
some tailoring may be required. You
should be able to set more than one
email address, possibly separated by
a semicolon (;).
Caution and careful testing are
needed when setting the email login
parameters. Incorrect values can cause
the program to crash and thus not send
the alert messages. As previously mentioned, you will need a free Twilio
account to send SMS text messages.
The following section (lines 127 to
150, Listing 3) defines the function of
each of the 13 input channels to the
system. For each input channel, there
are two parameters: a text description,
followed by its functions. More than
one function can be defined with the
‘inclusive or’ symbol (|), so “Primary_
zone | Exit_zone” defines the input as
both a primary zone and an exit zone.
• Panel_status defines whether the
alarm panel is set (armed) or unset
(clear).
• Alarm_status is set when the burglar alarm is activated (an alarm condition) by an intruder.
201. Activity_conditions = [
202.
[2,0],
203.
[1,2],
204.
[0,3],
205.
[-1,-1]
206.
]
Listing 5: this section of the code sets
the number of primary/secondary
zones that need to be triggered to
indicate activity.
siliconchip.com.au
Parts List – WiFi Alarm Monitor
1 single-sided PCB coded 01304261, 57 × 57mm
1 suitable plastic enclosure (eg, 3D printed)
1 Raspberry Pi Pico W microcontroller module (MOD1)
2 20-pin headers, 2.54mm pitch (for MOD1)
2 20-pin female header sockets, 2.54mm pitch (for MOD1)
1 250mA miniature axial fuse (F1)
2 74HC4050 level-shifter ICs, SOIC-16 (IC2, IC3)
1 AMS1117-5 5V LDO linear voltage regulator, SOT-223 (REG4)
1 1N5819 40V 1A axial schottky diode (D1)
12 10kW ±5% or better axial resistors (4.7kW to 22kW resistors would likely work too)
2 100nF 50V X7R SMD ceramic capacitors, M2012/0805 or M3216/1206 size
1 10μF 50V X7R SMD ceramic capacitor, M3216/1206 or M3226/1210 size
4 3-way miniature (0.15in/3.81mm) screw terminal blocks (CON1, CON2)
OR
3 4-way miniature (0.15in/3.81mm) screw terminal blocks (CON1, CON2)
1 2-way polarised header and matching plug, 2.54mm pitch
(CON3; optional; for S1)
1 2-way miniature (0.15in/3.81mm) screw terminal block (CON4)
1 momentary pushbutton switch (S1; optional)
• Communicator is typically the
‘panic’ or ‘fire’ communicator outputs,
if required.
• Abort_status indicates that an
alarm condition has been cancelled.
• Spare_zone defines any unused
inputs; these should also be connected
to ground electrically.
• Test_button monitors the 13th
input (S1) and will send a test message.
The next section (lines 152 to 188,
Listing 4) defines which actions are
to be performed for each of the alert
conditions:
• alarm
• communicator output
• no activity while the panel is not
set (clear)
• no activity while the panel is set
(armed)
• test message
• periodic ‘health’ check-in
• start-up/reset
These are fixed conditions in the
software and should not be altered.
For each of the alert conditions,
there is a text description followed
by a list of actions. These consist of
delays, emails and SMS messages to
various contacts.
• Delay1 is typically a short delay
to allow time for a false alarm to be
cancelled.
• Email_contactx sends an email
to that contact or group of contacts.
• SMS_contactx sends an SMS
message to a single contact.
• Delay2 sets a delay between contacting contact 1 and the other contacts.
Australia's electronics magazine
• Terminal is for testing only and
sends output via the USB interface.
All the actions occur in a fixed
sequence, defined in the subroutine
Poll_alerts() in main.py. The sequence
is: Delay1, Terminal, Email_contact1,
SMS_contact1, Delay2, Email_contact2, SMS_contact2, Email_contact3,
SMS_contact3, Email_contact4, SMS_
contact4.
If no action is required for a certain condition, it can be set to 0. For
example:
“Restart”: [“Alarm
monitor restart”, 0]
If a WiFi connection cannot be
made, the interface keeps trying at
WiFi_retry intervals until Maximum_
retries has occurred and will not move
on to the next action until a successful
connection is made or the retry limit
is exceeded.
Maximum_retries also applies to
attempts to send emails. No check is
made that emails or SMS messages
have been completed successfully;
the interface will simply move on to
the next action. If an email or SMS is
unsuccessful, it is likely to be a hard
fault due to a parameter error, and the
interface would be tied up indefinitely!
The final section (lines 190 to 206,
Listing 5) sets the number of primary
and or secondary zones that need to be
triggered to indicate activity. As previously mentioned, primary zones give
a clear indication of activity, while
secondary zones may be triggered by
a person in distress or a pet.
May 2026 73
So, for accurate monitoring, a minimum of two secondary zones are
needed unless a primary zone has
been triggered. As a result, various
combinations of primary and secondary zones can be set, for example [two
primary zones] or [one primary zone
and two secondary zones] or [three
secondary zones].
Obviously, you cannot define more
primary or secondary zones than those
that are being monitored. Each line has
the number of primary zones followed
by the number of secondary zones.
Each additional line provides an
‘inclusive or’ function, so 2,0 followed
by 1,2 means [two primary zones and
no secondary zones] or [one primary
zone and two secondary zones].
Software libraries
My software makes use of a thirdparty library, uMail (MicroMail) for
MicroPython (https://github.com/
shawwwn/uMail). Also, for the SMS
interface, I used code from Mahmood
Mustafa Shilleh at siliconchip.au/
link/acat
Construction
The prototype was built on a single-
sided printed circuit board with a RPi
mounted on headers and sockets so it
can be easily removed (and because
there’s a diode mounted underneath
it). The 74HC4050 ICs, linear voltage
regulator and associated capacitors are
all surface-mount devices.
Axial resistors were used on the
inputs of the 74HC4050s, as the layout of the gates on these chips is not
particularly user-friendly and resistors
are a convenient way of bridging to the
input connectors.
The prototype used Molex KK-style
connectors for compatibility with previous wiring, but the PCB has been
re-designed to use miniature screw terminal blocks with 0.15-inch (3.81mm)
pin spacing (not the more typical
0.2-inch/5.08mm spacing).
Looking at Fig.3, I recommend fitting the surface-
mount components
first, followed by the resistors and then
the other components.
If you only require a maximum of
six inputs, the second 74HC4050 can
be omitted; the weak internal pullups on the Raspberry Pi Pico module
will automatically disable the remaining inputs.
The finished board can be mounted
in any convenient plastic project box,
or if there is room, within the alarm
panel itself. The author made a custom 3D-printed enclosure, but that is
not necessary. If you do want to print
that, the STL files are included in the
software package at siliconchip.au/
Shop/6/3613
Software installation
The software is installed on the
Raspberry Pi using the free Thonny
integrated development environment
(IDE). The first step is to install the IDE
from https://thonny.org
Installation is quite straightforward
and you will find a lot of useful information on the Thonny website and
also at https://github.com/thonny/
thonny/wiki
Once Thonny is installed, connect
the Raspberry Pi to your computer
using a USB lead while holding down
the white button (BOOTSEL) on the
Raspberry Pi, then start Thonny. You
should see a window similar to that
in Screen 1. Click on the bottom right
corner where it says <no backend>
and then select Install MicroPython
(Screen 2).
You should then see Screen 3. Target
volume sets the location of the Raspberry Pi and should be filled in automatically. If it is blank, you need to
disconnect the Raspberry Pi and connect it again while pressing the white
button. Set:
• MicroPython family to ‘RP2’
• Variant to ‘Raspberry Pi • Pico W
/ Pico WH’
• Version should be set automatically to the latest.
Check that the parameters are correct and then click Install.
When the installation is complete
(which should only take a few seconds), click on the stop button (white
square inside the red circle) and you
should see Screen 4. If it does not
appear, close Thonny, disconnect
and reconnect the USB without pressing the white button, and then restart
Thonny.
The next step is to copy the source
files onto the Raspberry Pi. As previously mentioned, MicroPython is
strictly case sensitive, and this applies
to file names as well as the source program. In the next step, the source files
from your computer will be copied
onto the Raspberry Pi.
Editing files either on your computer or on the Raspberry Pi, does
not update the other copy. You need
to explicitly make a copy. Note that
it may not be obvious whether files
you are editing in the Thonny editing
window are located on the computer
or Raspberry Pi.
The files main.py, parameters.py
Fig.3: the board can be easily etched as it is single-sided, with all the through-hole parts on the top and a few SMDs on
the underside. Take care with the polarity of the SMD ICs (their pin 1 indicators go towards the Pico) and note how D1 is
mounted underneath the Pico W module. Because of that, and to make maintenance easier, it’s best to socket the Pico W.
74
Silicon Chip
Australia's electronics magazine
siliconchip.com.au
Screen 1: the initial
state of Thonny (a
Python IDE) when
you run it after
installation.
and umail.py need to be copied from
your computer onto the Raspberry Pi.
This is the time to edit the parameters.
py file if you haven’t already done it
(use your favourite text editor). Don’t
forget to save a copy both to your computer and to the Raspberry Pi.
In Thonny, click File → Open... and
then select “This computer”. Open
umail.py from your computer, then
click File → Save copy... and this time
select “Raspberry Pi Pico”. Type the
filename “umail.py” and click OK.
Repeat the above for the files main.
py and parameters.py after making
your edits.
Now close Thonny, disconnect and
reconnect the USB lead. The green
light on the Raspberry Pi should flash
at one-second intervals.
Connecting the interface to
the alarm panel
Different alarm panels will vary
slightly, but all should have multiple
zones and a set of communicator outputs. The communicator outputs are
fairly standard, as they are designed
to interface with a range of devices.
Each zone usually has two connections, ignoring tamper circuits. One
connection will be at a fixed voltage
(or ground), while the other is used
to detect the input from the switch or
sensor. It is necessary to connect the
interface to this active signal. A quick
test with a multimeter should identify the correct input to use. Failing
that, try one and, if it does not work,
try the other.
On my Honeywell alarm panel, the
active inputs are on the left.
Don’t forget to ground any unused
inputs. If they are left floating, they
can overwhelm the Raspberry Pi with
unwanted interrupts.
If you want to send SMS messages, don’t forget to get a free Twilio
account!
The author’s monitor has been
running without failure for over 18
months, so the Raspberry Pi and
MicroPython software appear to be
extremely stable.
If possible, once the unit is installed,
there should be easy access to the USB
connector so that parameter updates
can be easily installed.
The Raspberry Pi will need to connect to a reliable WiFi network, so this
needs to be taken into account. In particular, metal enclosures are unlikely
SC
to be suitable.
siliconchip.com.au
Screen 2: this menu
lets you install
MicroPython on the
Pico W.
Screen 3: set the
options in this dialog
as per the instructions
in the text to install
MicroPython.
Screen 4: the Thonny IDE with MicroPython on the Pico W up and running.
Australia's electronics magazine
May 2026 75
|