This is only a preview of the August 2019 issue of Silicon Chip. You can view 47 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 "Micromite LCD BackPack Version 3":
Items relevant to "“HEY! THE SIGN SAYS NO JUNK MAIL!”":
Items relevant to "Car Radio Head Unit Dimmer Adaptor":
Articles in this series:
Items relevant to "Discrete Logic Random Number Generator":
Purchase a printed copy of this issue for $10.00. |
SIGNS
DON’T WORK!
YOU NEED THIS
JUNK MAIL
REPELLER!
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!
by Allan Linton-Smith
L
et’s face it, the people who deliver junk mail must be completely blind (or no comprehende
Engrish!) 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 two dollars (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 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
48
Silicon Chip
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.
If you actually like and want junk
mail (and that is about the only mail
you get these days), do not attempt
this project.
The project isn’t
just based on the ISD1820
module . . . it IS the project!
Australia’s electronics magazine
Or maybe you should build it and
use it to say “thank you” to the people
delivering you free catalogs.
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 –
Australia Post only......we are watching you!”
Then have some fun watching their
reactions! (Tough luck if it is your Australia Post postie delivering the junk,
as they sometimes do!).
You can put any message you like,
in any language. We discourage the
recording of a tirade of swear words,
although that would of course but
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
siliconchip.com.au
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
heavier-than-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.
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 x
42.5mm; but (b) more importantly, it’s
cheap and really easy to get; you can
get it from our online shop (see the
parts list for details) or you can wait a
few weeks after ordering from eBay or
AliExpress, etc. Search for “isd1820”.
We’d suggest being just a little careful on line – the best price we found
was US$1.74 including postage. But
another supplier was asking AU$10.58
PLUS $73.83 postage! Whew . . . we
thought Ned Kelly was Australian. . .
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!
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.
And speaking of Australian, Jaycar
have a similar module which is not
that much more expensive but doesn’t
come with a speaker. (Cat XC4605).
siliconchip.com.au
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
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
SC
20 1 9
100k
1nF
10
RECLED
220 F
PLAYE
MIC
PLAYL
AGC
REC
IC1
ISD1820
SP+
SP
ROSC
VSSA
8
4.7k
11
VCCA
MICREF
FT
1k
100nF
1k
2
PLAYBACK LOOP ENABLE JUMPER
VCC
5 100nF
MIC1
4
6
100nF
4.7k SPEAKER
SPK1
+
9
7
–
VSSD
14
4.7 F
CON2
OPTIONAL SWITCHED RESISTOR TO ADJUST SAMPLING RATE
JUNK MAIL REPELLER (isd1820-BASED MODULE)
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.
Australia’s electronics magazine
August 2019 49
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 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.
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 external buttons,
microcontroller outputs etc.
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 & 4, permanently enabling
feedthrough, or between pins 4 & 6,
in which case no connection is made
and feedthrough is controlled by pin 5.
Bridging pins 10 & 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
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Ω.
50
Silicon Chip
is removed (it can be kept on pins 8 &
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 around 10 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!
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.
Australia’s electronics magazine
siliconchip.com.au
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.
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.
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.
While 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
+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!
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
S5 and 390kΩ
RESISTOR
IN SERIES
(OPTIONAL)
0V
8Ω SPEAKER
(VIA CONNECTOR)
TO
MICROSWITCH
siliconchip.com.au
Australia’s electronics magazine
PARTS LIST –
JUNK MAIL REPELLER
1 ISD1820-based voice recorder
module with a small speaker
and speaker wires (SILICON CHIP
Online Shop Cat SC5081)
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.
August 2019 51
Three 3mm screws, with washers and
nuts, hold the speaker in place, as
seen here.
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 2x1.5V battery holder to pins 1 & 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 & 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.
For the speaker, we cut the hole using a 35mm holesaw.The microswitch
depends on which type and size you
have. Ours (13 x 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 above.
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
52
Silicon Chip
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.
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.
Australia’s electronics magazine
Go ahead, try it out! Then hide behind a tree and wait for an unsuspecting junk peddler to wander on by...
And as we mentioned earlier, this
project has plenty of other uses; eg
– how about a pithy message when
someone opens up your school bag?
Don’t forget that most microswitches can operate in a “N-O” mode when
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 becomes
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.
SC
siliconchip.com.au
|