This is only a preview of the October 2012 issue of Silicon Chip. You can view 21 of the 104 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 "LED Musicolour: Light Up Your Music, Pt.1":
Items relevant to "Reverse Loop Controller For DCC Model Railways":
Items relevant to "The Nick-Off Bad Cat Deterrent":
Items relevant to "Colour MaxiMite Microcomputer, Pt.2":
Items relevant to "Wireless Remote Control For The Barking Dog Blaster":
Purchase a printed copy of this issue for $10.00. |
SCENE
E
H
T
:
1
IT
IB
H
X
E
OF THE CRIME
Simple circuit uses a PIR sensor to
detect movement. Use it as a cat
deterrent, door minder or burglar
alarm . . .
EXHIBIT 2:
MISCREANTTHE
The NickNick-O
Off
Bad Cat Deterrent
Do you have a miscreant “puddy-tat” that likes to jump on kitchen
benches (or worse)? It can be a real problem, especially at night when
no-one is looking. The Nick-Off Cat Deterrent (aka the Ted-Off) is the
perfect solution. It uses an infrared sensor to detect said cat and triggers
an answering machine to play back simulated, demented barking. It also
lights two white LEDs which form the eyes of an angry dog.
A
LLOW US TO introduce Ted. Ted
is a 13-year-old black-and-white
de-sexed male moggie and is the muchloved pet of a family friend.
According to his owner, Ted’s had
13 years of practice getting humans
to do exactly what he wants them to
do. Want to be fed? Make a first-rate
nuisance of yourself until a human
complies with the goodies. Want to
62 Silicon Chip
go outside? Dig your claws into the
screen door, or claw the carpet or
start ripping the newspaper under the
food bowl to shreds. Any one of those
actions is absolutely guaranteed to attract attention and gain the necessary
compliance from Ted’s owner.
Apart from that and some minor indiscretions such as the occasional fight
(and a trip to the vet for repairs), Ted
has been relatively trouble-free. Until
recently, that is, when Ted developed
a rather revolting habit.
You see, Ted has the run of a downstairs living area at night, comprising a
kitchen/dining room, a rumpus room
and the laundry (with his litter tray).
But just recently, after 13 years of being a good pussy cat, Ted suddenly
decided that he was going to jump
siliconchip.com.au
EXHIBIT 3: THE
PURRRFECT
SOLUTION!!!
Article: Greg Swain
Circuit : Nicholas Vinen
up on the kitchen bench at night and
scent-mark the glass splashback in one
particular corner of the kitchen.
The result each morning was a
smelly liquid pool that had to be thoroughly cleaned up and the splashback
and benchtop washed down with disinfectant – not a pleasant job. And he
didn’t do it just a few times. Having
started the practice, it quickly became
a habit, much to his owner’s disgust
and annoyance.
Ted’s human has a theory as to why
he suddenly started doing this. Just
before the first incident, he had been
shoved into a pet box and unceremoniously carted off to the vet for his
annual flu injection. And while he
was waiting for said injection, Ted
had been forced to share the waiting
room with a rather boisterous and
over-friendly Labrador.
Ted was not at all impressed with
this and the subsequent flu injection
only added to his trauma and bad
temper. Having had his jab, he was
taken home and released from the
confines of his pet box, whereupon
siliconchip.com.au
he immediately made plain his considerable displeasure by attacking his
scratching post.
And then that night, the indiscretions started. Perhaps it was Ted’s
revenge for the vet trip or perhaps it
was to re-establish territory and to let
everyone know who really was the
boss. But whatever the explanation,
the result was . . . uggghhhh!!
A solution
Shortly after he started his shenanigans, Ted’s owner asked me if I knew of
an electronic device, perhaps an alarm,
that would keep him off the bench. A
quick search on Google soon revealed
the “Ssscat”, a battery-powered device
that combines a motion detector (presumably a PIR sensor) with a can of
harmless, odourless spray. The device
detects the cat’s movement out to about
1m and releases a brisk spray to warn
the cat off.
That got me thinking. I had a spare
PIR (passive infrared) sensor, as used
in burglar alarm systems, plus an old
analog telephone answering machine
It Has Other Uses
This circuit is basically a simple movement detector/alarm circuit with a 30s exit
delay and two outputs: one to simulate a
button press and the other to drive two
series LEDs or a relay (or some other
load) for an adjustable period ranging
up to 60s. As such, it could also be
used as a shop minder or as a simple,
low-cost burglar alarm for a garage. Or
it could be used just to trigger a message machine or activate some other
device when movement is detected
(eg, close to a display counter).
You don’t have to use a PIR sensor
to trigger the device either. The Nick-Off
can be used with virtually any sensor
that features NC or NO contacts, eg, a
reed switch or pressure mat.
tucked away in a drawer. Could I
combine them somehow so that the
PIR sensor triggered the answering machine when movement was detected?
As with most telephone answering
machines, this one had a message
October 2012 63
D1 1N4004
POWER SWITCH
A
Q1 2N7000
K
1
1
2
A
RLY2
–PWR
1
LK1*
2
D3
1N4148
VR1 A
500k
1M
10M
4
4
LK2
2
10nF
LK4
LK3*
RST1
1
13
12
Trig1
RST2
1M
100nF
CV1
1M
180
D4
1N4148
Out2
9
A
10nF
A
K
10nF
Thrsh2
Trig2
3
CV2
GND
7
11
NICK-OFF CAT DETERRENT
LED1
K
2
A
LED2
10nF
1
EXT
LEDS
CON3
K
*NOTE: INSTALL LK1 & LK3 FOR NC (NORMALLY
CLOSED) PIR RELAY CONTACTS, OR LK2 & LK4
FOR NO (NORMALLY OPEN) CONTACTS
SC
CON2
5
IC1
556
Disch2
8
10k
Out1
Thrsh1
10
100F
100F
14
Vcc
Disch1
6
3
CON1
2012
TO
PLAYBACK
BUTTON
K
10k
RLY1
2
2.2k
470F
+PWR
1
G
K
D2 1N4004
K
TO PIR
DETECTOR
100nF
100F
CON5
CON4
POWER
LED3
2
D
S
A
LEDS
1N4004
1N4148
A
A
K
K
K
A
2N7000
G
D
S
Fig.1: the circuit is based on IC1, a 556 dual-timer IC. This is triggered by the PIR and generates a short pulse to trigger
the answering machine via Mosfet Q1 and a longer pulse (up to 60s) to drive two high-brightness LEDs (LEDs1 & 2).
pushbutton that you momentarily
press to play back the recorded message. In theory, it would be just a matter
of processing the output from the PIR
sensor to simulate this button press.
A simple transistor circuit was
quickly lashed up on stripboard and
this proved the basic concept. This circuit detected when the NC (normallyclosed) relay contacts in the PIR sensor
opened (ie, when movement was detected) and produced a brief low-going
pulse at its output. This output was
wired across the message button in
the answering machine (to simulate
the button press) and it worked like
a charm.
By then recording a suitably scary
barking sound on the answering machine, it just might do the trick. In
practice, this was more of a demented
WOOF WOOF WOOF WOOF WOOF
. . . Get-Ooorrrf-There-Ted . . . WOOF
WOOF WOOF Grrrr WOOF WOOF
sequence, which I imagined would
have the desired effect.
Introducing the Ted-Off
Having established that the circuit
worked, I decided to build the proto64 Silicon Chip
type into a spare biscuit tin, with the
PIR sensor attached to one side. At
the same time, a scary bulldog graphic
was also added to the lid, along with
a couple of white LEDs for his eyes.
These LEDs required an extra transistor and lit up for around 30s each time
the device was activated.
And so was born the “Ted-Off”,
named in honour of the miscreant
himself. It was duly installed in my
friend’s kitchen for its maiden run.
Did it work?
Ted was nailed by the Ted-Off on the
very first night. At 3.15 in the morning.
Just when you would least expect it.
As Ted’s owner put it, the demented
barking sound from the answering
machine, at full volume, in the middle
of the night was enough to awaken the
dead. Her first thought was “what the
hell’s that?” and then, having realised
what it was, she rushed down the stairs
and opened the door into the kitchen
. . . just in time to spy Ted’s hindquarters disappearing under one of the
chairs around the dining table.
Eureka!! – it had worked and there
wasn’t a scent mark anywhere.
Not only that but it has since proved
to be a very effective deterrent. After
the shock of that first encounter, Ted
behaved himself for quite some time
before getting sprung again about 10
days later. And that was it – despite
several months having now passed, the
Ted-Off has since remained mute and
Ted has kept out of the kitchen at night.
According to his owner, just having
the device sitting on the kitchen bench
is now probably enough to deter him,
whether it’s powered or not.
The Nick-Off version
For the version described here, we
decided to do away with the messy
transistor circuit which admittedly
had a few whiskers on it (pun intended). Instead, our resident genius
Nicholas Vinen came up with a new
circuit based on a dual-timer IC and
designed a PCB to make the assembly
easy.
The result is the “Nick-Off”, a more
generic name than “Ted-Off”. In reality, the Nick-Off is Ted-Off Mk.2 and
it’s built into the original Ted-Off biscuit tin. Even the original front-panel
label has been retained. We simply
siliconchip.com.au
Switching A Relay Output
Normally, you will install either the onboard output LEDs (LED1 & LED2) or wire
an external pair of white or blue LEDs to
CON3. However, you can also use this circuit
to switch a relay which can then turn on a
variety of other devices.
Fig.2 shows how this is done. The relay
coil voltage should be chosen to match the
unit’s supply voltage, while the 180Ω series
resistor from pin 5 of IC1 is replaced with a
wire link. The additional diode is required to
absorb any back-EMF from the relay coil when
it is de-energised (you may be able to solder
this diode across the pads for LEDs1 & 2).
removed the original transistor circuit
and installed the new (and improved)
circuit in its place.
As with the original circuit, the
Nick-Off processes the output from a
PIR sensor and generates a brief (about
100ms) low-going pulse to trigger an
answering machine (or you could trigger the Digital Sound Effects Module
described last month). It also has a
second output to drive the two highbrightness LEDs (the dog’s eyes) for
a period that’s adjustable anywhere
between a fraction of a second up to
about 60 seconds.
This output could also be used to
trigger a buzzer or a relay, or some
other low-voltage device (see panel).
The Nick-Off also features an exit
delay, something lacking on the original Ted-Off. This exit delay is normally
around 30s but is less than this (about
10s) if the device is switched off and
then immediately switched on again.
In addition, the Nick-Off caters for
both NC (normally closed) and NO
(normally open) sensors, whereas the
original transistor circuit worked with
NC sensors only.
Circuit description
Take a look at now at Fig.1 which
shows the circuit diagram. It’s based
on IC1, a 556 dual timer IC.
The PIR sensor is wired to 4-way
terminal block CON1, at left. This
provides power to the PIR from pins
1 & 4, while the PIR’s output relay
contacts are connected to pins 2 & 3.
When triggered, the PIR activates IC1
which in turn drives the white LEDs
and activates the answering machine
(via Mosfet Q1).
The PIR signal is AC-coupled to
siliconchip.com.au
14
Vcc
Out1
CV1
180 RESISTOR
REPLACED BY
WIRE LINK
5
3
D2
1N4148
IC1
556
Out2
9
A
10nF
K
10nF
CV2
GND
7
RELAY COIL
CONNECTED
TO CON3
180
11
10nF
IC1 via a 10nF capacitor and a 1MΩ
pull-up resistor, so that the trigger
pulse is kept short (about 50ms). This
ensures that IC1 is not immediately
re-triggered if the PIR stays on for the
entire duration of the timing period
(eg, if there is constant motion in front
of the sensor). Instead, IC1 can only
be retriggered by a new event after it
has timed out.
Some PIRs have normally open (NO)
contacts, which close when activated
by motion, but most have normally
closed (NC) contacts which open when
motion is detected. In addition, a few
PIRs have both NO and NC contacts
available. Our circuit caters for both
types of contacts using links LK1-LK4
and two 10kΩ resistors. One of these
resistors acts as a pull-up, while the
other acts as a pull-down.
Links LK1 & LK3 are installed for
PIRs with NC contacts. This means
that the lefthand side of the 10nF capacitor is normally pulled up to the
positive supply rail (Vcc) via LK3,
the closed relay contacts and LK1.
However, when the contacts open
(ie, movement is detected), this side
of the 10nF capacitor is pulled down
via LK3 and the lower 10kΩ resistor,
thereby generating a brief pulse and
triggering IC1.
Conversely, for a PIR with NO relay
outputs, links LK2 & LK4 are installed.
The lefthand side of the 10nF capacitor
is then normally pulled high via LK2
and the upper 10kΩ resistor. When motion is detected and the contacts close,
this side of the capacitor is pulled
down via LK2, the relay contacts and
LK4, again generating a brief pulse that
triggers IC1.
IC1 is configured as two monosta-
LED1
RELAY
D4
1N4004
CON3
LED2
K
2
1
A
LED1 & LED2 OMITTED
ble pulse generators but let’s initially
concentrate on timer 1. When this
is triggered, its pin 5 output (Out1)
goes high, supplying power to two
white LEDs (LED1 & LED2) via a 180Ω
current-limiting resistor. The duration
that they are lit for is set by 500kΩ
trimpot VR1 and a 100µF timing capacitor. VR1 allows this duration to
be set anywhere from a fraction of a
second up to about one minute.
LEDs1 & 2 are high-brightness 5mm
white LEDs and the 180Ω series resistor limits the current through them to
(12V - 2 x 3.3V) ÷ 180Ω = 30mA (assuming a 12V supply). This will vary
depending on the supply voltage and
the forward voltage of these LEDs.
It’s obviously lower for a 9V supply,
although the LEDs will still be quite
bright.
To prevent the timer from being
triggered when you first apply power
to the unit, the reset input (pin 4) of
timer 1 is initially held low via a 100µF
capacitor. This then slowly charges via
a 10MΩ resistor and the reset is subsequently released (goes high) about 30s
after power is applied. This provides
the “exit delay”.
When the unit is switched off, the
100µF reset capacitor quickly discharges via diode D3 so that the exit
delay operates if the unit is quickly
switched on again. Note, however,
that D3 only initially discharges this
capacitor down to about 0.5V. IC1’s
reset threshold is around 0.7V so if the
unit is switched off and then immediately switched on again, the exit delay
will be shorter than usual (about 10s).
Triggering sound
The second half (timer 2) of IC1 is
October 2012 65
+
LED1
Specifications
•
•
Power Supply: 9-12V DC
Exit Delay: 30s (less if unit is
switched off and on again quickly)
•
Can be triggered by both NC & NO
contacts on alarm sensors
•
100ms pulse output to trigger an
answering machine or sound module
•
Second output to drive high-bright
ness LEDs (or some other load) for up
to 60s (adjustable)
used to generate a short pulse to trigger a telephone answering machine.
As shown on Fig.1, connector CON2
is wired to the trigger input of the
sound playback device. Pin 1 of this
connector is briefly pulled low when
a sound is to be played.
For our prototype, we wired CON2
across the playback pushbutton of a
telephone answering machine. However, we could have just as easily used
the Sound Effects Generator module
described in September 2012, which
also has open-collector compatible
trigger inputs by default.
In operation, timer 2 in IC1 is triggered by timer 1. It works like this:
when the pin 5 output of IC1 goes high
100nF
CON2
2
100nF
D4
4148
LEDs
2102 C
LED2
TO PLAYBACK
BUTTON
1
10nF
10nF
180
1M
1M
LK4
Q1
CON3
NC
+
100F
NO
NC
LK1
NO
0V
–
CON1 +12V
+
IC1 556
D2
+
470F
CONTACTS
PIR
SENSOR
+
D3 4148
10M
4004
10k
1M
–
10nF
9-12V DC
SUPPLY
LED3 500k
2.2k
4004
D1
10nF
100F
CON4
+
100F
VR1
10k
12101130
CON5
SWITCH
POWER SWITCH
CONNECTS TO THESE PINS
1
2
TO EXTERNAL
LEDS +
–
Fig.3: follow this diagram and the photo to build the PCB
(note: photo shows a prototype PCB)
to drive the white LEDs, a positivegoing pulse is also AC-coupled to the
threshold pin (pin 12) of timer 2, again
via a 10nF capacitor and a 1MΩ resistor. Normally, a 556 (or a 555) timer is
triggered using a negative-going pulse
but it’s also possible to use a positive
trigger by simply swapping the trigger
and threshold pins (pins 8 & 12).
In this case, the output sense is
inverted and the timing capacitor
(100nF) is normally charged and
discharges while the timer is active
(rather than the reverse situation).
Timer 1 is used to trigger timer 2 so
that the latter can’t be re-triggered until
timer 1 has reset. This ensures that,
provided VR1 is suitably adjusted to
set the period of timer 1, a second trigger event cannot cancel or restart the
playback, especially if the playback
period is quite long.
In practice, it’s just a matter of adjusting VR1 so that the white LEDs are
on for longer than the sound playback
period.
The main wrinkle with the configuration of timer 2 is that there is
no dedicated pin to recharge the timing capacitor. However, that’s easily
solved with the addition of diode D4,
which allows the timing capacitor to
charge directly from the timer output
at pin 9 (which is high when the timer
is reset). In this case, the timing capacitor is 100nF and the discharge resistor
is 1MΩ, giving a time constant very
close to 100ms (0.1s).
When the circuit is first powered
up, the 100nF timing capacitor is
initially discharged and so trigger
pin Trig2 (pin 8) is initially low. This
effectively resets the timer 2 and its
output at pin 9 goes high, which is its
quiescent state. When timer 2 is triggered (ie, by timer 1), its output goes
low but more importantly, so does its
discharge pin (pin 13). This pin is used
as an open-collector output to trigger
the playback device.
Mosfet Q1
There is a bit of a problem with this
scheme, though. While the timer is set
up to be immediately triggered, during
power-up and power-down when the
supply voltage is very low (<3V), IC1
is automatically reset by its internal
circuitry. At this time, the discharge
pin (pin 13) sinks current regardless
Table 2: Capacitor Codes
Value µF Value IEC Code EIA Code
100nF 0.1µF
100n
104
10nF
0.01µF 10n
103
Table 1: Resistor Colour Codes
o
o
o
o
o
o
No.
1
3
2
1
1
66 Silicon Chip
Value
10MΩ
1MΩ
10kΩ
2.2kΩ
180Ω
4-Band Code (1%)
brown black blue brown
brown black green brown
brown black orange brown
red red red brown
brown grey brown brown
5-Band Code (1%)
brown black black green brown
brown black black yellow brown
brown black black red brown
red red black brown brown
brown grey black black brown
siliconchip.com.au
Connecting The Message Button In The Answering Machine
T
HE ANSWERING machine is connected via a 2-wire cable that’s
wired across the message button and
runs back to the Nick-Off via a 3.5mm
mono jack plug.
You will have to split the case of the
answering machine in order to get at
the message button. That’s normally
done by undoing a few self-tapping
screws. In our case, we also removed
one of the telephone sockets at the
rear of the machine (since this was
no longer required) and fed the 2-wire
cable in through the vacant hole.
Before wiring in the playback cable, use a DMM to identify which side
of the message button connects to
ground (0V). This side of the button
must be connected to the ground
terminal (2) of CON2 in the Nick-Off
(ie, via the ground side of the jack
socket). This is shown in Fig.2 as the
black wire on CON2.
The other side of the button goes
to terminal 1 of CON2 in the Nick-Off
(blue wire).
In our case, the ground wire running into the answering machine was
soldered to a ground stake that was
of the state of the trigger and threshold
inputs. As a result, we have added
Mosfet Q1 between the discharge
pin and playback button connector
(CON2) to prevent false triggering.
This works as follows. First, LED3
acts as both a power indicator and as a
simple shunt regulator. It is a blue LED
and so has a typical forward voltage of
3-3.6V. Its anode is connected to the
positive supply rail and its cathode
to the gate of Q1, as well as its 2.2kΩ
current-limiting resistor.
Q1 needs a gate voltage of around
1-2V above its source in order to switch
on. This means that it remains off until
the supply voltage rises to about 3.3V
+ 1V = 4.3V. It’s also off if the supply
voltage falls below 4.3V (ie, during
switch-off). This prevents false triggering when power is applied or removed.
Note that if you change the colour
of LED3 to a type which has a lower
forward voltage (eg, green, red, yellow
or orange), then Mosfet Q1 may turn
on prematurely and you could get false
triggering at power-up and/or powerdown. The same comment applies if
siliconchip.com.au
EARTH
STAKE
MESSAGE
BUTTON
already present on the PCB at the
rear of the machine. The other wire
was run to the front of the answering
machine and soldered directly to one
of the message switch contacts on
the top of the board.
In some answering machines
though, it may be necessary to remove the PCB in order to get at the
LED3 is disconnected or not installed,
so don’t leave this part out of circuit.
Supply components
IC1’s two control voltage terminals
(CV1 and CV2) have the recommended
10nF bypass capacitors. These filter
IC1’s internal 2/3 supply voltage dividers, giving it better rejection of supply
voltage variations.
Diode D1 provides reverse supply
polarity protection for the timer circuit. The resulting supply rail is then
filtered using a 100µF capacitor.
Diode D2 serves two purposes. First,
it provides reverse polarity protection
for the supply to the PIR sensor and
second, it isolates this supply from
the timer supply rail. As a result, at
switch-off, the supply rail to the PIR
is maintained for longer than the
supply rail to IC1. This prevents the
relay contacts in the PIR sensor from
opening prematurely and false triggering the timer circuit and thus the
answering machine (assuming that it
has an NC output).
Because of D2, the PIR’s supply
switch contacts. If so, it’s usually just
a matter of removing a few more selftapping screws.
Make sure you correctly identify
the switch contacts – the ground
contact must run back to the ground
in the Nick-Off. If you get the wires
mixed up, you could damage the answering machine’s playback circuit.
rail will be about 0.7V less than the
external supply voltage. However, this
shouldn’t be an issue.
CON5 is a 2-pin header that’s wired
in series with the external supply.
It can either be fitted with a jumper
link so that the circuit is permanently
powered or wired to an external power
switch. The power supply is fed in via
2-way terminal block CON4.
PCB assembly
Take a look now at Figs.3 & 4 for the
assembly details. All the parts, with
the possible exception of the LEDs and
power switch, are mounted on a small
PCB coded 03110121.
There are a few options when it
comes to the PCB assembly. First of
all, you can either mount LEDs1 &
2 directly on the board or you can
mount them externally (ie, connect
them in series) and run flying leads
back to screw terminal block CON3.
Similarly, power indicator LED3 can
either be mounted directly on the PCB
or connected via flying leads.
There are also several power switch
October 2012 67
There’s plenty of room inside the tin to accommodate call the bits. Note the old doorstop sitting in the bottom of the
tin – it’s full of old nuts and bolts and acts as a weight to provide stability.
Fig.4: the Nick-Off PCB is installed in
a biscuit tin and wired up as shown
in the diagram at right. Be sure to use
a blue LED for the power indicator,
as this is necessary to ensure correct
operation of Mosfet Q1.
The four leads from the PIR
sensor are fed in through a
hole drilled in the back of
the tin. A P-clamp keeps the
wiring in place.
68 Silicon Chip
options. If you don’t need an on/off
(power) switch, you can simply install
a wire link in place of CON5 or you
can fit a 2-way pin header and install
a jumper link. Conversely, if you do
need an on/off switch, then it’s simply
a matter of connecting it via flying
leads, either via a female header or
by soldering the switch leads to the
header pins.
No particular order need be followed
with the PCB assembly, although it’s
best to start with the low-profile parts
(resistors and diodes) first and finish
with the connectors. Take care with
the orientation of the IC, diodes, LEDs
and electrolytic capacitors and leave
siliconchip.com.au
4148
–
4004
CON2
LED3
CON4
+
+
12101130
CON5
S1
POWER SWITCH
2
K
1
A
0V
+
CON3
NO
NO
CON1
OUTPUTS
+
NC
12V
NC
+
4148
+
4004
BLUE
POWER
LED
LED1
1
2
TO 2 x 5mm
WHITE LEDS
WIRED IN SERIES
– & MOUNTED
ON LID
+
2102 C
LED2
PCB
TO PIR
DETECTOR
TIP
TERMINAL
3.5mm MONO
JACK TO
PLAYBACK
BUTTON
COLLAR
–
+
2 x 2.1mm DC
POWER SOCKETS
WIRED IN PARALLEL
the LEDs off the board if you intend
mounting them externally.
A 2-way pin header (similar to
CON5) can be substituted for LED3 to
make any external wiring connections
to this LED easier. Do not leave LED3
out and be sure to use a blue LED.
Note particularly the orientation
of IC1. It must be installed with its
notched end towards VR1. It can be
soldered directly to the PCB, or you
can mount it via a socket if you wish.
Once the PCB has been assembled,
you need to fit jumpers to the LK1-LK4
positions to suit your PIR detector. If
the detector has NC (normally closed)
contacts, then fit jumpers to the two NC
siliconchip.com.au
pin headers (LK1 & LK3). Conversely,
if your PIR has NO (normally open)
contacts, fit the jumpers to the NO
headers (LK2 & LK4).
Note that some PIR sensors have
both NC and NO contacts available.
The NC contacts open when movement is detected, while the NO
contacts close when movement is detected. In that case, it’s just a matter of
choosing either contact set and installing the LK1-LK4 jumpers accordingly.
Housing it
As stated earlier, the original TedOff (now the Nick-Off) was built into
a biscuit tin, with the bulldog artwork
mounted on the lid. This not only
maintains a kitchen theme but also
saves you forking out extra dollars for
a case. That’s assuming, of course, that
you already have a biscuit tin and have
eaten all the biscuits.
The biscuit tin used for the prototype measures 190mm in diameter,
which is pretty much standard. The
size isn’t critical – just as long you can
get all the bits in.
An inverted plastic dinner plate (as
used for barbecues) was used for the
base. Anything around 160-170mm
diameter is suitable and it’s secured
to the bottom edge of the biscuit tin
via three M3 x 15mm machine screws
October 2012 69
Preventing False Triggering When The Unit Is Switched Off
V
IRTUALLY ALL PIR sensors have an
NC (normally-closed) output in the
quiescent state. This output is usually
provided by a relay that’s energised to
close a pair of contacts when the PIR
sensor is powered but no movement is
detected.
This scheme is employed to help
make the sensor tamper proof. If the
power supply to the sensor is cut, the relay opens and triggers an alarm module,
just as if movement had been detected.
One problem we encountered in
developing this unit was that the answering machine (which was separately
powered) false-triggered whenever the
Nick-Off was switched off. The reason
for this was simple: when we cut the
power to the Nick-Off and thus to the
PIR sensor, the relay in the sensor immediately opened its contacts. This was
then detected as a valid trigger pulse by
IC1 which had yet to completely power
down (the 100µF supply bypass capacitor takes time to discharge). As a result,
the timer generated an output pulse
which triggered the answering machine.
We overcame that problem by isolating the supply rail to the PIR sensor
using diode D2 and then bypassing this
rail with a 470μF capacitor. That way,
after switch-off, the supply rail to the
PIR sensor remains intact for a period
that’s long enough for the timer circuit to
power down, ie, before the relay contacts
eventually open.
If you find that your unit still false triggers, it’s just a matter of reducing the
100μF bypass capacitor between D1’s
cathode and ground, eg, to 47μF or 22μF.
Alternatively, in some cases, you
might want to keep the PIR sensor permanently powered and just switch the
timer circuitry on and off. That can be
done by simply connecting the positive
supply lead from the PIR sensor direct
to pin 1 of CON4 or to the supply side
of the power switch.
the prototype, it didn’t quite work
out that way because the answering
machine plugpack couldn’t supply
the necessary juice to power both the
answering machine and the Nick-Off.
The extra current required by the PIR
sensor, particularly when activated,
was probably the main culprit here.
As a result, the prototype Nick-Off
had to be powered by a separate 9V
DC plugpack.
Mounting the PIR sensor
The PIR sensor is attached to the side of the tin using hook and loop material
(Velcro), while the rubber foot stops it from rotating. At the rear, the cable from
the answering machine is connected via a 3.5mm jack plug and socket.
arranged in a tripod formation (two
at the front and one centred between
them at the back). You will need to use
a couple of M3 nuts as spacers on the
two front screws to compensate for the
curvature of the tin.
The bulldog artwork (available on
the SILICON CHIP website) is secured
to the lid using double-sided tape,
after which two 5mm holes are drilled
through the dog’s eyes to accommodate the external white LEDs. On the
prototype, these were secured in place
using neutral-cure silicone sealant.
Alternatively, you can make the holes
slightly larger and secure the LEDs using plastic mounting bezels.
Fig.4 shows the wiring details. The
PCB was mounted on three M3 x 10mm
70 Silicon Chip
tapped Nylon spacers and it’s simply
a matter of drilling matching holes
through the base (rear) of the tin. In
addition, you have to mount a 3.5mm
mono jack socket (to plug in the cable
from the answering machine) and
two 2.1mm panel-mount DC sockets
towards the bottom.
The DC sockets are wired in parallel to provide power “pass-through”.
That way, you can use the answering
machine plugpack (provided it’s rated
at 9-12V DC) to power both the NickOff and the answering machine. You
will have to make up a cable fitted
with DC plugs at both ends to connect the answering machine to one of
these sockets.
Well, that’s the theory anyway. On
As shown in the photos, the PIR sensor is secured to the lefthand side of
the tin using hook and loop material,
eg, Velcro (available from hardware
stores). This consists of two 15mmdiameter pads, one attached to the side
of the tin and the other to the side of
the sensor.
In addition, a rubber foot is secured
to the side of the tin about 50mm away
from the pad, using an M3 x 10mm
machine screw nut and washer. This
foot provides a “rest” for the bottom
righthand edge of the sensor and
ensures that it stays upright. Without
this rest, the sensor tends to rotate (or
“sag”) anticlockwise.
The four wires from the PIR sensor
are fed in via a hole drilled in the
rear of the tin and are connected to
CON1. Alternatively, the PIR can be
permanently powered by connecting
its positive supply lead direct to the
supply side of the power switch.
Testing
Once the assembly is complete,
apply power (without the answering
machine connected) and check that
siliconchip.com.au
Parts List
1 PCB, code 03110121, 50 x
50mm
5 2-way mini terminal blocks,
5/5.08mm pitch (CON1-4)
5 2-way pin headers, 2.54mm
pitch (LK1-LK4, CON5)
3 shorting blocks
1 500kΩ mini horizontal trimpot
1 2-way header plug, 2.54mm
pitch (CON5) (optional)
What’s new pussycat? – the original Ted-Off,
proudly standing guard in the kitchen.
the blue power LED lights. The two
white LEDs (LEDs 1 & 2) should be
off at this stage.
If the power LED doesn’t light, check
the supply polarity and that D1 and
LED3 are correctly orientated.
Assuming that all is correct, switch
off and check that you have the correct
linking options for LK1-LK4. In most
cases, you will need to install links
in the NC positions (ie, LK1 & LK3) if
you are using a PIR sensor.
That done, reapply power and wait
for the exit delay (up to 30s) to expire.
In addition, PIR sensors require a
warm-up period of up to two minutes
before they start working, so you will
have to wait this period out if it’s
longer than the exit delay.
siliconchip.com.au
Once the PIR sensor is operational,
move in front of it so that it triggers
and check that the two white LEDs
immediately light up. These should
then stay on for a preset period (up to
60s), depending on the setting of VR1.
Adjust VR1 to suit your particular application.
Finally, plug in the answering machine, switch it on and re-trigger the
PIR. The two LEDs should again immediately light up and the answering
machine should trigger and play back
the recorded message (or barking).
If that all works, the Nick-Off is
ready for action and can be set on the
kitchen bench to watch out for errant
puddy tats. And that is the end of this
SC
tail . . . err, tale.
Semiconductors
1 556 dual timer IC (IC1)
1 2N7000 Mosfet (Q1)
2 1N4004 diodes (D1, D2)
2 1N4148 diodes (D3, D4)
2 white high-brightness 5mm
LEDs (LED1, LED2)
1 blue 5mm LED (LED3)
Capacitors
1 470µF 16V electrolytic
3 100µF 16V electrolytic
2 100nF MKT/MMC
4 10nF MKT/MMC
Resistors (0.25W, 5%)
1 10MΩ
1 2.2kΩ
3 1MΩ
1 180Ω
2 10kΩ
Extra Parts For Nick-Off
1 telephone answering-machine or
electronically-triggered sound
generator module
1 9-12V 300mA DC plugpack
1 PIR sensor (9-12V)
1 biscuit tin, 190mm diameter
1 plastic dinner plate, 160mm
diameter (approx.)
1 front panel artwork (available
from siliconchip.com.au)
1 chassis-mount toggle switch
2 2.1mm panel-mount DC sockets
1 3.5mm mono jack socket & plug
3 5mm plastic LED bezels
1 Nylon P-clamp, 5mm
3 M3 x 10mm tapped Nylon
spacers
1 rubber foot (screw-mount)
Hook & loop material (15mm-dia.
pads)
6 small cable ties
1 M4 x 10mm machine screw
1 M4 nut
1 M4 flat washer
3 M3 x 15mm machine screws
1 M3 x 10mm machine screw
6 M3 x 6mm machine screws
8 M3 nuts
8 M3 flat washers
3 300mm lengths of medium-duty
hook-up wire (red, black & blue)
October 2012 71
|