This is only a preview of the August 2020 issue of Practical Electronics. You can view 0 of the 72 pages in the full issue. Articles in this series:
|
SIGNS
DON’T WORK!
YOU NEED THIS
JUNK MAIL
REPELLER!
by Allan Linton-Smith
L
et’s face it, the people who
deliver junk mail must be completely blind (or unable to read!)
because they can’t seem to understand
the ‘NO JUNK MAIL’ or ‘NO ADVERTISING MATERIAL’ sign in giant letters on your letterbox.
But hopefully they aren’t deaf, too;
that’s where this gadget comes in.
For a little over a pound (plus a few
bits and pieces that you probably already have), you can build this junk
mail-triggered digital audio recorder/
playback device.
Just imagine, as they cram yet another flyer into your letterbox, a voice
yells back at them: ‘HEY YOU! The
sign says NO JUNK MAIL!’
That’s just one of its many uses.
But fundamentally, it’s just a fun project that you could probably think of
a thousand uses for.
Maybe a switch on your bedroom
door and a voice saying ‘sisters (or
brothers) not welcome!’?
By the way, even with a ‘NO JUNK
MAIL’ sign, it isn’t illegal for a business
or individual to put a flyer in your
letterbox (even if it is against the
industry code of practice).
The problem lies with psychology 101: the junk they’re
delivering to you isn’t junk – it’s
a vital message that you would be
most upset not to receive.
Therefore any sign doesn’t apply to
them. Only to the next bloke with junk!
So people who stuff junk mail in
your box can’t be arrested! But you
can discourage (and probably annoy)
them with this device.
32
Is your letterbox full of junk, even though you
have a NO JUNK MAIL sign? If so, you need
to build our Junk Mail Repeller. It might not
completely prevent junk mail from being
shoved in your box. . . but it should at least
help. And you’ll have some fun watching the
reactions of the would-be junkmeister!
If you actually like and want junk
mail (and that is about the only mail
you get these days), do not attempt
this project.
Or maybe you should build it and
use it to say ‘thank you’ to the people
delivering free catalogues.
How does it work?
Every time a flyer or catalog goes into
your letterbox, the extra weight should
be enough to trigger a microswitch –
and they’re greeted with a message –
eg, ‘No junk mail please – Royal Mail
only......we are watching you!’
Then have some fun watching their
reactions! (Tough luck if it is your
postie delivering the junk, as they
sometimes do!).
You can put any message you like, in
any language. We discourage a tirade
of swear words – although that would
of course be possible – as it may land
on inappropriate ears.
There isn’t much to it; it’s made
from a pre-built, low-cost digital
voice recorder which is installed in a
plastic box, along with a microswitch
and a battery. It then becomes a junk
mail repeller!
Description
The voice recorder/playback module
we’re using is based on an ISD1820
IC, which can record up to 11 seconds of audio.
We chose this one because (a) it’s
a nice, small unit, measuring just 38
× 42.5mm; but (b) more importantly,
it’s cheap and really easy to get. You
can readily source it from eBay or
AliExpress – just do a search for
‘isd1820’.
We’d suggest being just a little careful on line – the best price we found
at the time of writing was £1.74 including postage (AliExpress item
2009871627).
Ours came ready-made, complete
with a tiny loudspeaker. The speaker
would cost you more than we paid for
the whole thing if you bought it locally!
The module can be powered from
3V (its stated maximum is 7V) from
two AA cells in series.
The standing current drain is
220µA, and it consumes about 38mA
during playback. The cells should
last for months, depending on your
junk mail load!
The project isn’t just based on the
ISD1820 module . . . it is the project!
Practical Electronics | August | 2020
We built our Junk Mail Repeller into a UB3
Jiffy box but just about any enclosure will
do, as long as it fits inside your letterbox.
The microswitch glued to the outside of
the lid is the secret: it triggers the voice
message whenever anything heavierthan-an-envelope (eg, junk mail!) lands
on it. The switch on the end is optional:
it changes the length (and quality) of
the voice recording which you make
to suit the situation.
Note that there is a slightly different module available than the one we
used, which has a 10-pin header and
two slide switches instead of a 12pin header.
This one is also suitable for use in
this project, but you have to make a
few slight changes. These are simple
enough that we’ll leave them to you.
That alternative module is quoted as
working from 2.4-5.5V, which is fine
since our battery is around 3V.
The circuit
The circuit of our module is shown in
Fig.1. The ISD1820 (IC1) is responsible
for all audio recording and playback
tasks. A 100nF capacitor bypasses its
3V supply (from two AA cells).
During recording, it samples audio
from onboard electret microphone
MIC1, which is AC-coupled to its pin
4 and 5 differential inputs. MIC1’s
power supply voltage is filtered by
the 1kΩ resistor and 220µF capacitor,
while the 4.7kΩ series resistors provide suitable biasing.
A 4.7µF capacitor sets the time constant for IC1’s internal automatic gain
control (AGC), used during recording
to automatically provide a suitable
gain for the microphone. Recording is
initiated by the REC pin (pin 1) going
high and continues as long as it stays
high. During recording, the RECLED
pin (pin 13) is held low, so LED1 lights.
The RECLED output is also pulsed
low at the end of playback, causing
LED1 to flash briefly.
IC1 has a small internal audio amplifier, allowing it to drive the 8Ω speaker directly, via pin header CON2. The
module is supplied with a suitable
cable to connect the speaker to this
JST header. Playback is initiated by
bringing either pin 2 (PLAYE) or pin
3 (PLAYL) high.
The difference is that the recorded
message will continue to play until
the end even if PLAYE goes low again,
whereas PLAYL must be held high for
playback to continue.
In other words, PLAYE is edge-triggered while PLAYL is level-triggered
(hence the names). If pin 12 (FT) is
held high, audio from the microphone
is fed through to the output.
Practical Electronics | August | 2020
The module has on-board tactile
pushbuttons which pull the PLAYE,
PLAYL or REC pins high when they
are pressed.
These signals are also fed through
to pins 7, 9 and 11 of CON1 where
they can be connected to, for example, external buttons or microcontroller outputs.
FT is fed to pin 5 of this header,
while power and ground appear on
pins 1 and 3 respectively.
The other half of CON1 is intended so a jumper can be placed across
pins 2 and 4, permanently enabling
feedthrough, or between pins 4 and 6,
in which case no connection is made
and feedthrough is controlled by pin 5.
Bridging pins 10 and 12 causes the
RECLED output to be connected to the
PLAYE input. Since RECLED is pulsed
briefly low at the end of playback, after
playback finishes, this will cause playback to start again, as there is a lowhigh transition on the PLAYE input.
Therefore, playback will loop forever, or at least until the bridging jumper
is removed (it can be kept on pins 8
and 10 when not used).
Finally, the 100kΩ resistor from
ROSC to ground sets the audio sampling rate to 6.4kHz, which means the
maximum length of the audio recording is 10-ish seconds (we measured it at
11). This can be changed either to give a
longer recording time with worse quality, or a shorter time with better quality.
Chip internals
Fig.2 shows the internal block diagram for the ISD1820 IC. It comprises
a microphone preamplifier, oscillator,
audio sample storage array, audio amplifier, filters, power conditioning and
control logic.
The storage array is quoted as retaining the saved audio data for up to
100 years, or until the next time you
press the REC button.
EXTERNAL MICROSWITCH TO TRIGGER PLAYBACK
VCC
2xAA
or
2xAAA
1
3
FEED-THROUGH ENABLE JUMPER
S4
CON1
2
4
FT
5
6
PLAYL
7
8
PLAYE
9
10
REC 11
12
S3
S2
S1
LED1
RECORD
13
12
3
1
S5
S1: PRESS TO PLAY
S2: HOLD TO PLAY
S3: HOLD TO RECORD
1nF
100k
10
RECLED
220 F
PLAYE
PLAYL
REC
MIC
5 100nF
MIC1
4
6
100nF
AGC
IC1
ISD1820
9
4.7k SPEAKER
SPK1
+
SP+
SP
ROSC
VSSA
8
4.7k
11
VCCA
MICREF
FT
1k
100nF
1k
2
PLAYBACK LOOP ENABLE JUMPER
VCC
7
–
VSSD
14
4.7 F
CON2
OPTIONAL SWITCHED RESISTOR TO ADJUST SAMPLING RATE
SC JUNK
Junk
MailMAIL
Repeller
(ISD1820-based
module)
REPELLER
(isd1820-BASED
MODULE)
20 1 9
Fig.1: the circuit of the voice recorder/playback module, with IC1 providing
all of the recording and playback functions. This diagram includes the three
extra components you will need, ie, a two-cell battery to power the unit, a
microswitch to trigger playback of the recorded audio and optionally, a resistor
connected across the onboard 100kΩ resistor to provide better sound quality.
33
Fig.2: the internal workings of the audio recording and playback chip. The external resistor from ROSC to ground
sets the oscillator frequency which determines the sampling rate. When recording is activated, the output of the
microphone preamp feeds into the storage array via an antialiasing filter. And when playback is activated, the contents
of the storage array are fed to the output amplifier, which is capable of driving an 8Ω speaker at a reasonable volume.
The power amplifier can deliver about 80mW into 8Ω,
which is sufficient to give quite a reasonable volume when
the speaker is mounted in a Jiffy box (ie, using it as a baffle).
A more powerful amplifier could be hooked up to the
output, along with a larger speaker, but this may annoy
your neighbours.
Recording quality vs time
We tested various values for the resistor from ROSC to
ground and plotted the results in Fig.3. As you can see,
it’s very close to being a straight line.
The minimum recommended value is 80kΩ, giving a
sampling rate of 8kHz and a maximum recording time of
eight seconds. But you can reduce the value down to 18kΩ,
giving just under three seconds of recording time, and presumably a sampling rate of around 35kHz.
Fig.3: we varied the value of ROSC and measured the
recording/playback time. As expected (based on what
it says in the data sheet), the sampling rate is inversely
proportional to the resistor value, thus the recording time
is directly proportional to it. The sampling rate is equal to
640,000 divided by ROSC in kilohms, which gives 6.4kHz
with the default value of 100kΩ.
34
The maximum recommended value is 160kΩ, giving a
sampling rate of 4kHz and a maximum playback time of
16 seconds.
You can go as high as 200kΩ, but the resulting sampling
rate of 3.2kHz is poor, giving an audio bandwidth of just
1.3kHz.
Although the default rate of 6.4kHz is good enough for
voice, after some experimentation, we settled on 82kΩ as
the best compromise, giving a sampling rate of 8kHz and
around 8.5 seconds of playback time.
While the 100kΩ resistor is an SMD type, since you will
probably want to lower the value if you’re changing it, you
can simply solder another resistor across it.
For example, connecting a 390kΩ resistor across the existing 100kΩ resistor will get you close to the 82kΩ ideal
value. You can even connect this resistor via a switch, giving you two different options by merely flicking it.
Note though that if you record with the switch in one
position and play back in the other, you will either sound
like a chipmunk or Barry White!
While we mounted the switch and resistor inside the Jiffy box, this may be regarded as superfluous – once you’ve
decided on the resistor you require (if any), it could be soldered across R2 and the switch could be left out.
Building it
Once you have gathered the items in the parts list, building
it is easy. Solder the bare ends of the supplied lead to the
speaker (if they aren’t already connected) and then plug
this into the header on the module.
Wire up the 2×1.5V battery holder to pins 1 and 3 of
CON1, with the positive end to pin 1 (don’t get it the wrong
way around or you might let the smoke out...)
You can do this quite easily by cutting a female-female
jumper lead in half, stripping and soldering the bare ends
to the battery terminals, then plugging these into CON1,
taking care that the right leads go to the right pins.
You can use a similar technique to wire up the microswitch between pins 2 and 9 of CON1. Alternatively, as we
did, you solder the microswitch wires to the appropriate
pads on the back of the PCB (either method is fine).
Next, drill the holes in the Jiffy box to accommodate the
speaker and the microswitch. Once again, exact positioning is not needed.
Practical Electronics | August | 2020
+3V
0V
Fig.4: the measured frequency response of the unit from
microphone to speaker when the recommended 390kΩ
resistor is connected across the 100kΩ onboard resistor from
ROSC to ground. This gives a sampling rate of around 8kHz
and an audio bandwidth of just over 3kHz. The Nyquist limit
(ie, highest possible frequency) when sampling at 8kHz is 4kHz,
but the filter’s transition band reduces the usable bandwidth to
around 3/4 of that figure. This gives eight seconds of playback
time and we deem the audio quality to be adequate.
For the speaker, we cut the hole using a 35mm holesaw.The microswitch
depends on which type and size you
have. Ours (13 × 6mm) had three pins
emerging and we drilled three 2mm
holes through the lid for these pins.
You’ll also want to drill three holes
around the periphery of the speaker
mounting hole, for machine screws
to hold it into place. We drilled three
3mm holes about 3mm out from the
edge of the speaker hole, 120° apart.
With these holes just outside where
the speaker surround will sit, machine
screws with flat washers and nuts will
clamp the speaker onto the lid from
the inside. See the photo.
If using a switch to control audio
quality/recording time (as we did),
also drill a hole and mount this now.
Put this on one side or end of the Jiffy box – you don’t want it to interfere
with the microswitch operation.
Depending on the type of battery
holder you use, you may need to make
a small clamp to hold it in position
with a hole drilled in the base of the
box. With the holder we used, there is
no need to clamp it – it slides down
between the PCB guides in the side
of the case and locks nicely in place.
Check it twice!
Check that everything is working and
record your message. Make sure you
are happy with how it sounds, then use
neutral-cure silicone sealant to seal the
gaps around the edge of the speaker
and microswitch holes, and any other
holes you’ve made in the case.
While a Jiffy box is not waterproof,
(especially with a speaker in the lid)
if you fit the lid on tight, it should survive the sort of splashes it’s likely to be
exposed to in a mailbox. If you want
to be sure, you can always apply silicone around the edges of the lid before
attaching it to the case.
All that’s left is to place the unit in
your mailbox with the microswitch facing up so that anything landing on top
of it will trigger the recorded message.
Go ahead, try it out! Then hide behind a tree and wait for an unsuspecting junk peddler to wander by!
And as we mentioned earlier, this
project has plenty of other uses; for
example – how about a nice pithy
S5 and 390kΩ
RESISTOR
IN SERIES
(OPTIONAL)
+3V
Fig.5: if you solder a 33kΩ resistor in parallel with the
existing 100kΩ resistor, you get 25kΩ and that sets the
sampling rate to around 20kHz, resulting in the nearly
10kHz of audio bandwidth shown here. The sound
quality is better, but the playback time is now limited
to around three and a half seconds. That may or may
not be enough, depending on what message you intend
to convey!
0V
8Ω SPEAKER
(VIA CONNECTOR)
message when someone opens up
your school bag?
Don’t forget that most microswitches can operate in a ‘N-O’ mode when
PARTS LIST
JUNK MAIL REPELLER
1 ISD1820-based voice recorder
module with a small speaker
and speaker wires
1 microswitch
1 UB3 Jiffy box (eg, Jaycar Cat
HB6023 or Altronics Cat H0153)
1 2xAA or 2xAAA cell holder
1 390kΩ 1/4W 5% resistor (other
values can be used; see text)
3 M3 x 10mm panhead machine
screws, flat washers and nuts (for
mounting the speaker)
1 SPST toggle switch (optional, for
switchable sound quality)
2 female-female or 4 male-female
jumper leads
light-duty hookup wire
neutral-cure silicone sealant
Front and rear shots
of the PCB showing
the modifications
we made. The
connections to the
PLAYE switch on the
back of the board
could also be made on
pads 2 and 9 of CON1
(indicated) or indeed
to the pins themselves
on the top side.
TO
MICROSWITCH
Practical Electronics | August | 2020
35
Three 3mm screws, with washers and
nuts, hold the speaker in place.
held down and close when released –
eg, when a bag is opened!
How loud is it?
On the workbench, the answer is ‘not
very’. Certainly loud enough to be really annoying – but when you place
the project in your letterbox, with all
its resonances, it’s surprisingly loud.
Sure, it’s not enough to scare the
deliverer into a quivering mess but it
should be loud enough for them to hear!
Speaking of placing it in the letterbox, make sure it is placed so that
any junk mail (usually larger than legit mail!) can trigger the microswitch
but ordinary mail might not have either enough weight or be in the right
place to switch it.
Reproduced by arrangement with
SILICON CHIP magazine 2020.
www.siliconchip.com.au
Here is the completed project, ready to scare off any junk mail deliverer. The
AA battery holder we used is a nice friction fit in the UB3 Jiffy Box. And the
switch at the end (S5) is optional – in fact, we probably wouldn’t bother fitting it
once we’d decided on the length and quality of our voice recording.
ESR Electronic Components Ltd
All of our stock is RoHS compliant and CE
approved. Visit our well stocked shop for
all of your requirements or order on-line.
We can help and advise with your enquiry,
from design to construction.
3D Printing • Cable • CCTV • Connectors • Components •
Enclosures • Fans • Fuses • Hardware • Lamps • LED’s •
Leads • Loudspeakers • Panel Meters • PCB Production •
Power Supplies • Relays • Resistors • Semiconductors •
Soldering Irons • Switches • Test Equipment • Transformers
and so much more…
JTAG Connector Plugs Directly into PCB!!
No Header!
No Brainer!
Monday to Friday 08:30 - 17.00, Saturday 08:30 - 15:30
Our patented range of Plug-of-Nails™ spring-pin cables plug directly
into a tiny footprint of pads and locating holes in your PCB, eliminating
the need for a mating header. Save Cost & Space on Every PCB!!
Station Road
Cullercoats
North Shields
Tyne & Wear
NE30 4PQ
Tel: 0191 2514363 sales<at>esr.co.uk www.esr.co.uk
36
Solutions for: PIC . dsPIC . ARM . MSP430 . Atmel . Generic JTAG . Altera
Xilinx . BDM . C2000 . SPY-BI-WIRE . SPI / IIC . Altium Mini-HDMI . & More
www.PlugOfNails.com
Tag-Connector footprints as small as 0.02 sq. inch (0.13 sq cm)
Practical Electronics | August | 2020
|