This is only a preview of the December 1996 issue of Silicon Chip. You can view 28 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. Items relevant to "Build A Sound Level Meter":
Items relevant to "Build An 8-Channel Stereo Mixer; Pt.2":
|
A game to
improve your
hand/eye
coordination
Build a laser pistol
& electronic target
Most people can’t legally own guns any more so
if you have a yen for target shooting, this project
will fit the bill. It uses a visible LED laser in the
pistol & a bullseye target which responds visibly
& audibly when you score a direct hit.
By RICK WALTERS
Most people are attracted to the
idea of target shooting even if they
have no wish to own a gun. With this
project, you can indulge that whim in
a completely harmless way and have
a lot of fun in the process.
The game consists of a laser pistol
and an electronic target. The pistol is
a readily available plastic toy which
has been modified to hold a battery, a
switch for the trigger and a 5mW red
laser. Each time it is fired, the laser
58 Silicon Chip
emits a brief pulse. Holding down the
trigger does nothing; you must pull the
trigger fully each time to fire it.
The target is quite different from
anything you might have experienced
in the past. It is active rather than
passive and it gives you immediate
feedback, if you hit the bullseye or if
you miss. While it uses the “Official
100-yard small bore rifle target”, as
produced by the National Rifle Association of the USA, we have mod-
ified it with quite a bit of electronic
circuitry.
Around the outer ring of the target
are 24 evenly spaced LEDs which
chase around the circle for a random
period while a siren sounds. Then
all LEDs go out and you must fire the
pistol within one second and hit the
bullseye. If you miss, you get the sound
of a machine gun which means you
have been SHOT.
If you hit the target, you get one of
three different sound effects which can
be a police siren, ambulance or fire-engine. These are selected randomly by
the circuit as your reward for hitting
the bullseye.
At the bullseye is a PIN diode which
is matched to the gun’s laser. If the
laser beam hits this diode at the appropriate time, the police siren or one of
the other reward sounds will indicate
that you hit your target.
PARTS LIST
(TARGET BOARD)
Fig.1: the circuit
of the laser pistol.
Each time switch
S1 is closed, the
laser circuit dis
charges the 100µF
capacitor to give
a brief pulse.
The target’s electronics is powered
by a 9V DC plugpack.
How it works
Let’s start with the pistol circuit
shown in Fig.1. The 100µF capacitor
is always charged by the battery to
3V via the 1.5kΩ resistor. When the
trigger is pulled, the switch closes,
rapidly discharging the capacitor
through the laser diode and associated circuit.
The current drawn is such that the
laser only emits one pulse of light before the voltage drop across the 1.5kΩ
resistor causes it to turn off. Therefore
you can’t cheat by holding the trigger
down and pointing the barrel at the
bullseye.
The laser diode assembly consists of
a near infrared emitter optically cou-
pled to a detector diode. This is used
to monitor the light output from the
IR emitter and keep it constant, even
while the battery voltage is falling.
Q2 monitors the voltage across the
330kΩ resistor, this voltage being
proportional to the light output from
the diode. The voltage across LED1 is
used as a reference for Q2’s emitter.
The difference between its base and
emitter voltages cause just enough
collector current to flow through the
10kΩ resistor to turn Q1 on to give the
required light output. The 4.7µF and
0.47µF capacitors slow the rate of rise
of the current to ensure that there is
no overshoot, which could damage
the IR diode.
WARNING: the pulse of light from
the pistol, while of short duration, is
dangerous. It should never be point-
PARTS LIST (PISTOL)
1 toy pistol, Toys-R-Us Power
Ranger Dart 099236 or equiv.
1 PC board, code 08112961,
43mm x 16mm
1 momentary contact toggle
switch C&K 7109 or equivalent
(S1)
2 AAA 1.5V batteries
1 AAA or AA battery holder
1 BC338 NPN transistor (Q1)
1 BC328 PNP transistor (Q2)
1 3mm red LED (LED1)
Semiconductors
1 660nm 5mW laser diode and
lens assembly, Oatley Electron
ics 660-5I or equivalent
Resistors (0.25W, 1%)
1 330kΩ
1 470Ω
1 10kΩ
1 1.5Ω
1 1.5kΩ
Capacitors
1 100µF 16WV electrolytic
1 4.7µF 16WV electrolytic
1 0.47µF MKT 63VW or monolithic ceramic
1 PC board, code 08112962,
140mm x 80mm
1 38mm 8-ohm loudspeaker
1 National Target Co target,
TQ-4(T) or equivalent
1 sheet of white perspex to suit
target, 355 x 355mm
1 9V DC plugpack
2 10mm x 3mm tapped spacers
2 3mm x 5mm countersunk
screws
2 3mm x 5mm screws
24 5mm LED bezels
11 PC stakes
Semiconductors
1 40106 hex Schmitt trigger
(IC1)
1 555 timer (IC2)
2 4017 counter (IC3, IC5)
1 4093 quad 2-input NAND
Schmitt trigger (IC4)
1 4016 or 4066 quad bilateral
switch (IC6)
1 UM3561A sound effects
generator DSE Z-6203 (IC7)
1 LM311 comparator (IC8)
1 BC338 NPN transistor (Q1)
8 BC328 PNP transistor
(Q2-Q9)
1 PIN diode (PD1) Oatley
Electronics 04PC2 or
equivalent
1 3.3V 500mW zener diode
(ZD1)
8 1N914 signal diodes
(D1-D8)
1 1N4004 rectifier diode (D9)
24 5mm red LEDs
(LED1-LED24)
Capacitors
1 100µF 16WV electrolytic
2 10µF 16WV electrolytic
4 4.7µF 16WV electrolytic
3 1µF 16WV electrolytic
3 0.1µF MKT polyester
1 .022µF MKT
1 .01µF MKT
Resistors (0.25W 1%)
1 4.7MΩ
1 220kΩ
1 3.9MΩ
1 150kΩ
1 2.7MΩ
4 100kΩ
1 1.8MΩ
5 10kΩ
1 1.5MΩ
1 1.8kΩ
1 1.2MΩ
1 1.5kΩ
3 1MΩ
6 820Ω
1 470kΩ
December 1996 59
60 Silicon Chip
Fig.2: the target circuit has a LED chaser driven by IC3, a sound effects circuit based on IC5 & IC7, and a random timer based on IC1a, IC1b & IC1c.
ed at anyone’s eyes as damage could
result.
Target circuit
Now let’s have a look at the target
circuit in Fig.2. We’ll start with the
chaser circuit which is based on IC3, a
4017 decade counter. We are using just
six of its outputs. As it counts, each of
the six outputs will go high (+V) while
the rest are low (0V). IC3 is clocked by
a Schmitt trigger oscillator based on
IC1e together with the 1.5MΩ resistor
and the 0.1µF capacitor.
Since five of the outputs of IC3 will
always be low, five of the six groups of
four LEDs will always be turned on by
the emitter followers Q4-Q9.
Each time the oscillator clocks the
counter, the “off” group will step,
giving the appearance of rotation.
The oscillator resistor and capacitor
values are selected to make the target
LEDs appear to rotate at a suitable
speed.
Pin 5 of IC3 (the seventh output)
is connected to the reset terminal, so
each time the 4017 steps to this output
it will reset itself and start over again.
Switching another resistor in parallel
with the 1.5MΩ resistor using IC6a
increases the speed of rotation, as we
will see later on.
Random timer
Schmitt triggers IC1a, IC1b and
IC1c, together with their resistors and
capacitors, are three oscillators running at slightly different frequencies.
Fig.3: dimensions of the bracket for
mounting the trigger switch.
Their outputs are fed to an AND gate
formed by diodes D1-D3. When all
three oscillator outputs are low, the
voltage across the associated 100kΩ
resistor will also go low.
The diode AND gate is connected to
the input of IC1f via a .01µF capacitor
and so when the AND gate output
goes low, IC1f’s input will be pulled
momentarily low. This causes pin 12
of IC1f to go high and this will rapidly
charge the 10µF capacitor at pins 2 &
6 of IC2, via diode D6.
IC2 is a 555 timer but the way in
which it is connected is not conventional. In effect, it is a monostable and
when pins 2 & 6 are taken high via
diode D6, the output at pin 3 goes low
for a period set by the 100kΩ resistor
and 10µF capacitor on pins 2 & 6; ie,
around one second.
IC2’s output is normally high and
when it goes low it affects four functions. First, the oscillator formed by
IC1a will stop as D5 will hold its input
pin near 0V.
Second, the monostable formed by
IC4a and IC4b will be triggered, taking
pin 4 of IC4 high. This will hold the
voltage across the 100kΩ resistor high
through D4, preventing any further
pulses being applied to IC1f for around
four seconds.
The third consequence will be for all
the chaser LEDs to extinguish, as the
output pin of IC2 is the supply voltage
for them. The LEDs going out is the
signal to shoot at the target.
The fourth effect is that pin 3 of IC4
will go low and will take pin 1 of IC8
low, thereby grounding the emitter of
an inter
nal transistor which allows
its output (pin 7) to go low. If the PIN
diode (PD1) is now illuminated by the
laser pistol, its current will increase,
pulling pin 2 of comparator IC8 below
its pin 3. This causes pin 7 of IC8 to go
RESISTOR COLOUR CODES
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
❏
No.
1
1
1
1
1
1
3
1
1
1
1
4
6
1
2
6
1
1
Value
4.7MΩ
3.9MΩ
2.7MΩ
1.8MΩ
1.5MΩ
1.2MΩ
1MΩ
470kΩ
330kΩ
220kΩ
150kΩ
100kΩ
10kΩ
1.8kΩ
1.5kΩ
820Ω
470Ω
1.5Ω
4-Band Code (1%)
yellow violet green brown
orange white green brown
red violet green brown
brown grey green brown
brown green green brown
brown red green brown
brown black green brown
yellow violet yellow brown
orange orange yellow brown
red red yellow brown
brown green yellow brown
brown black yellow brown
brown black orange brown
brown grey red brown
brown green red brown
grey red brown brown
yellow violet brown brown
brown green gold brown
5-Band Code (1%)
yellow violet black yellow brown
orange white black yellow brown
red violet black yellow brown
brown grey black yellow brown
brown green black yellow brown
brown red black yellow brown
brown black black yellow brown
yellow violet black orange brown
orange orange black orange brown
red red black orange brown
brown green black orange brown
brown black black orange brown
brown black black red brown
brown grey black brown brown
brown green black brown brown
grey red black black brown
yellow violet black black brown
brown green black silver brown
December 1996 61
This is what the pistol looks like after
being disassembled and having the
electronics installed. The spring-loaded
switch is operated by the existing pistol
trigger.
low, discharging the 1µF capacitor on
pin 13 of IC4 via D7. Phew!
But we’re not finished yet, as this
convoluted circuit has more tricks up
its sleeve. We will now talk about the
functions of gates IC1d, IC4c & IC4d,
counter chip IC5, quad analog switch
IC6 and IC7, the sound effects chip.
If PD1 is illuminated while pin 1 of
IC8 is high, the output will not change.
This prevents anyone cheating by
continuously shooting at the target,
hoping to hit the bull just before the
LEDs go out.
When pin 3 of IC2 goes high after
its 1s period, it pulls pins 8, 9 & 12 of
IC4 high via the 1µF capacitor. Pin 10
will always go low, turning on Q2, thus
applying power to the sound effects
chip IC7 and to pin 13 of IC6a via a
10kΩ resistor. This causes the LED
flasher to speed up.
There will be two different outcomes from the sound effects chip,
depending on whether the bullseye
was hit or not.
IC7 is a low-cost sound effects chip.
If pin 1 is taken to the chip’s supply
voltage (+3.3V), a machine gun sound
is generated, regardless of the voltage
on pin 6. If pin 1 is left floating (ie,
open circuit), three additional sounds
can be generated. If pin 6 is high, a fire
engine sound is generated; if low, an
ambulance sound; and if left floating, a
police siren sound will be heard from
the speaker.
If the bullseye is missed, both inputs
of IC4d go high and its output goes
low to turn on Q3. Q3’s collector going
high will take pin 12 of switch IC6d
high, to connect pin 11 to pin 10. This
generates the machine gun sound and
YOU ARE DEAD! At the same time,
pin 13 of IC6a will be pulled low
via D8, switching out the additional
1MΩ feedback resistor for IC1a, thus
returning the chaser speed to normal.
Conversely, if the photodiode is
illuminated while the LEDs are off
(IC2, pin 3 low), then D7 will discharge
the 1µF capacitor. When pin 3 of IC2
goes high again after one second, Q2
will apply power to the sound chip
as previously. As both inputs of IC4d
are not high, its output will stay high
and Q3 will stay off. This leaves pin 1
of IC7 floating; (ie, IC6d open-circuit).
IC1d with its associated resistor and
capacitor form an oscillator which
clocks IC5, another 4017 decade counter. This time we only use three outputs, resetting it on the fourth. When
pin 3 of IC5 is high, the SEL1 input
of IC7 is connected to ground and the
output sound will be an ambulance.
If pin 4 of IC5 is high, the SEL1 input
will be high and the sound will be a
fire engine. When pin 2 of IC5 (the Q1
output) is high, both IC6b and IC6c are
open circuit and therefore the SEL1
input will be floating and the sound
will be a police siren.
Note that pin 2 of IC5 is not connected in the circuit and therefore is
not shown.
When Q2 turns on it takes the Clock
Enable (pin 13) of IC5 high, effectively
freezing the selected output. This prevents the selected siren sound from
changing halfway through. Thus, IC1d
and IC5 together randomly select the
siren “reward” sound heard each time
the bullseye has been hit.
In both the above cases (ie, bullseye or no bullseye), after the 2.7MΩ
resistor on IC4 pin 12 has discharged
the 1µF capacitor, the outputs of IC4c
and IC4d will go high again, turning
off the siren and returning the chaser
to normal speed.
The 4-second inhibit monostable
(IC4a & IC4b) operating via diode D4
Fig.4: this diagram shows the wiring
details of the laser pistol. Make sure the
IR1 (the laser diode) is wired correctly
and take care to ensure that Q1 (BC338)
and Q2 (BC328) are the correct type
numbers.
62 Silicon Chip
Fig.5: the parts
layout for the target
PC board. Note that
IC3 & IC5 face in the
opposite direction to
the other ICs.
prevents the random timer (IC1a, 1b &
1c) from almost immediately starting
the “fire” sequence again, which could
be the case from time to time.
Pistol assembly
Our prototype pistol was purchased
from Toys R Us. The red plastic pieces
on the handle were prised apart with
a knife blade, giving access to three
small Phillips head screws which hold
the main body together. Once the pistol
is apart the black pillar on each half
near the trigger must be cut off to make
room for the spring-loaded switch.
The type of switch we specified
springs back to the off position and
is actuated by the existing plastic
trigger of the pistol. We made a small
metal bracket (see Fig.3) to mount
the switch and positioned it so that
it operated smoothly with the plastic
trigger. When the trigger is released
the switch pushes it back to the rest
position. The elastic bands which
previously restored the trigger can
be discarded.
Most of the laser circuit of Fig.1
was supplied assembled and tested by
Oatley Electronics, as a laser pointer.
While it could have been used like
this, we still required the 1.5kΩ resistor and the 100µF electrolytic to be
mounted somewhere. As the parts can
be supplied in kit form, we elected to
make another small PC board which
would accept all the components and
be a better fit inside the pistol barrel.
Its component layout is shown in
Fig.4. Having so few parts it should
only take a few minutes to build. Just
ensure that the electrolytic capacitors
are inserted with the correct polarity
and make doubly sure that the wires
to the laser diode are connected to the
correct pins.
The pistol wiring is straightforward
and should cause no problems. An
AAA battery holder is not readily
available so we used an AA holder.
If the batteries are loose, stretch the
springs a little until they are held
firmly.
The pistol barrel comes with a white
plastic tubular insert which was used
to hold the dart. The dart is discarded
and the tube trimmed 10mm from the
end. This piece is used to hold the laser
diode in the end of the barrel.
Test your work before re-assembling
the pistol by pointing the laser at a wall
and pulling the trigger. A brief pulse
of red light should be seen. The lens
will also need to be focused before
final assembly.
Stand at about the distance you
intend to be from the target and, with
the 1.5kΩ resistor shorted out, hold
the trigger down and rotate the end
of the lens until the spot of light is as
small as you can get it. Remove the
short and assemble the pis
tol. The
red barrel needs to be superglued to
the black butt on both pieces before
assembly.
Target PC board
The component layout for the target
This close-up view shows the assembled target PC board. Note how the infrared
diode sits directly behind a small hole which is drilled through the bullseye.
December 1996 63
Fig.6: this diagram shows how the LEDs are wired around the target.
PC board is shown in Fig.5. After checking the PC board for open or shorted
tracks and undrilled holes, the first step
is to fit and solder the 13 links and 11
PC stakes. Fit the resistors, diodes, ICs
and other low-profile components first,
then move on to the taller components.
Be sure to double-check the diode
and electrolytic capacitor polarities.
You should also carefully check the
orientation of the various ICs and that
the single BC338 transistor (Q1) is in
64 Silicon Chip
the correct place.
Testing
This board can be tested now, before
you wire up the target LEDs. Solder
the cathodes of each of six LEDs onto
the six PC stakes near the 820Ω resistors, with all six anodes connected
in parallel to the LED common pin.
Connect the speaker to its terminals
and connect the DC plugpack or a
power supply to the +9V and 0V pins.
Apply power and five of the six LEDs
should light.
After a short time each of the six
LEDs should have turned off, but not
in sequence, then they should all go
out and a second later a burst of machine gun fire should be heard from
the speaker. If all is OK so far, ground
pin 7 of IC8. Over a period you should
hear the three different sirens.
If the board is working, continue
with the target wiring, as shown in
Fig.6.
Fault finding
If the LEDs don’t light, check that
their polarity is correct by reversing
one of them. Pin 3 of IC2 should
measure around 11V or thereabouts,
depending on the actual output voltage
of the 9V DC plugpack. If pin 3 of IC2
is at 0V, look for shorts or a faulty chip.
If the LEDs don’t step, check around
IC3 or IC1e for faulty or incorrect components or perhaps a blob of solder
shorting two pins.
If the three siren sounds are not
produced (after a number of tries) suspect IC5 or IC1d and its components
or a solder bridge. To force a burst of
machine gun fire, use a jumper lead
from pins 8 & 9 of IC4 to Vcc. If pin
13 is then grounded the other sirens
should be heard.
Target wiring
The cardboard target specified is
available from most gun shops. We
mounted ours on a piece of white perspex. Before drilling the 24 LED holes,
we drilled a hole at the bullseye and
two holes to mount the pillars which
support the target PC board. These
were positioned so that the PIN diode
sat behind the bullseye.
The LEDs are wired in series in
groups of four, one in each quadrant as
shown in Fig.6. If you use a different
coloured wire for each group it will
help you to keep track of them.
All the anodes in the first quadrant
are commoned and connected to the
LED common PC stake. The last LED
We used a sheet of white perspex to hold the target. The loudspeaker and PC
board mount on the back, with the PIN diode behind the bullseye hole.
in the first group should be connected
to Q4’s 820Ω resistor, the last LED in
the second group to Q5’s 820Ω resistor
and so on, until the sixth group LED
is connected to Q9’s resistor.
You will have to follow the PC overlay of Fig.5 carefully, as the transistors
are not in sequence.
Now power up the target and check
that all functions are working. You will
need to carefully “sight” the pistol so
that it shoots straight and then you
will find that you need a fair amount of
practice to hit the target consistently.
Have fun.
SC
Fig.7: here are the fullsize etching patterns for
the laser pistol (above)
and the target board
(right).
December 1996 65
|