This is only a preview of the June 2001 issue of Silicon Chip. You can view 33 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:
Articles in this series:
Items relevant to "A Fast Universal Battery Charger":
Items relevant to "Phonome: Call, Listen In & Switch Devices On & Off":
Items relevant to "Using Linux To Share An Internet Connection; Pt.2":
Items relevant to "Li'l Snooper: A Low Cost Camera Switcher":
Items relevant to "A PC Games Port Tester":
Purchase a printed copy of this issue for $10.00. |
A Low-Cost Camera Switcher
By JIM ROWE
L'IL SNOOPER
If your security system has more than one
CCTV camera but only one monitor, you
really need an automatic “camera switcher”
(or sequencer) to let you keep an eye on
what’s happening in each camera’s field of
view. This easy-to-build unit can handle up
to four cameras and features variable rate
scanning and a pause button, for when you
need to study something interesting.
70 Silicon Chip
I
DEALLY, EACH CAMERA in a
CCTV system will have its own
dedicated monitor – making it easy
to watch and listen to what they’re all
seeing and “hearing”. But video monitors aren’t cheap and this approach
is just too expensive for many of us.
Fortunately, there’s an alternative:
use just one monitor, together with
a gizmo called an “AV sequencer” or
“camera switcher”. This works like a
multiplexer or scanner, automatically
cycling around between the cameras
so that you get the video and audio
first from camera 1, then from camera
2, then from camera 3 and so on. Each
camera’s signals are presented for a
few seconds in turn, allowing you to
keep an eye and ear out for anything
of interest.
AV sequencers are available commercially, of course, but while they’re
much cheaper than additional monitors, they’re still rather pricey. You’ll
be able to build L’il Snooper for much
less than a commercial unit and you
will have the satisfaction of knowing
that you built it yourself.
L’il Snooper can handle the video
and audio from up to four cameras and
its scanning rate can be adjusted over
a range of about 10:1 to suit different
applications. It has a row of LEDs on
the front panel to show which camera
is being presented at any moment and
there’s also a “Pause” button. This
button lets you stop the scanning and
concentrate on just one camera if you
spot or hear anything of interest from
that unit.
Just about all of the parts used in
L’il Snooper’s circuitry fit on a small
PC board, making it very easy to put
together. The completed board assembly fits snugly in a standard low-cost
instrument case, with all input and
output connectors along the rear.
A small DIP switch inside the unit
lets you set up L’il Snooper for sequencing the signals from two, three
or four cameras. The complete unit
runs from a nominal 12V DC supply
and draws less than 110mA, so it can
easily be operated from a small plug
pack or even a battery.
How it works
Fig.1 shows a simplified block diagram of the L’il Snooper. As you can
see, it’s really very straightforward.
Each of the camera video signals
is terminated in the correct 75Ω resistance (to prevent cable reflections
and ringing) and then fed to separate
unity-gain buffer amplifiers. The
buffer outputs are then fed to the
inputs of multiplexing switch SWA
which selects each one in sequence.
From there, the selected signal is fed
to another video amplifier stage, this
time operating with a gain of 2 to
compensate for the loss in the 75Ω
“back terminating” resistor in series
with the output.
The audio signals from the cameras
are handled in a similar way but with
less complication. Here, the inputs are
taken directly via coupling capacitors
to audio multiplexing switch SWB,
with only a unity-gain buffer amplifier
stage required between SWB and the
audio output socket.
As you’ve probably guessed already,
Fig.1: the block diagram of the Li’l Snooper. The audio and video signals
are fed to multiplexing switches which are controlled by a sequencing
counter. VR1 controls the oscillator to set the scan rate.
switches SWA and SWB are driven in
tandem to perform the sequencing (or
switching). In fact, they’re both driven by a counter which is stepped by
pulses from a low-frequency oscillator.
The sequencing or “scanning” rate is
adjusted by varying the oscilla
tor’s
frequency.
So that’s the basic idea of how L’il
Snooper works. Now let’s look at the
full circuit, to fill in the details.
Circuit details
Although we showed the video
and audio signals being selected by a
pair of single-pole rotary switches in
Fig.1, the actual circuit (Fig.2) does
the same jobs using two groups of four
SPST on-off switches. In addition, the
switches are elec
tronic rather than
electromechanical and are based on
two 74HC4066 quad bilateral switch
ICs (IC2 & IC3).
Each pair of switches controls the
video and audio from one of the camera inputs and we do the sequencing
by turning on each pair of switches
in turn. This is done by applying +5V
to their gates, which are connected
in parallel. Only one pair of switches
is turned on at any time, so only one
camera’s audio and video (AV) signals
are passed through.
All of the video inputs use an identical input buffer circuit based on an
emitter follower stage. Transistor Q1 is
the buffer for camera 1, Q2 for camera
2 and so on. The inputs are terminated
in 75Ω resistors and are AC-coupled to
the transistor bases to prevent damage
or signal distortion due to excessive
DC levels.
The 1MΩ resistors and diodes D4-D7
form simple clamp-type “DC restorer”
circuits, setting the sync tip levels of
all the video input channels to the
same voltage level – ie, to +1.2V as
established by forward-biased diodes
D8 & D9. This makes sure that the
video signals remain in the correct
voltage range for correct operation of
the bilateral switches. It also ensures
that the signals all have the same black
level so there’s no undue “flashing” as
June 2001 71
Everything apart from the scan rate pot (VR1) and the pause switch (S1) is
mounted directly on the PC board, so the unit is easy to build. Check that all
polarised parts are correctly orientated and make sure that you don’t get any of
the ICs or the voltage regulators mixed up.
which form a 2:1 voltage divider from
the collector of Q8 back to the base
of Q7.
Audio circuitry
the sequencer switches from camera
to camera.
The video signals on the emitters
of Q1-Q4 are fed directly to video
switches IC3a, IC3b, IC2a & IC2b. And
as you can see, the outputs of these
switches are all connected together,
so whichever signal is selected is fed
to the input of the video output buffer
amplifier (Q6-Q9). As previously mentioned, this simple circuit operates
with a gain of two and has a bandwidth
of over 10MHz.
72 Silicon Chip
Transistors Q6 & Q7 form an input
differential pair, with the output of Q6
fed to the base of output stage Q8. Transistor Q9 is used as an “active load” for
Q8, presenting it with a low DC load
but a relatively high AC load. This is
done by connecting Q9 as a constant
current sink, with LED5 providing a
suitable reference voltage on its base.
Negative feedback is used to set the
amplifier’s gain to two and achieve the
bandwidth we need. The feedback is
provided by the two 470Ω resistors,
The audio section is even simpler
than the video section, as indicated
in Fig.1. As shown, each input is connected to ground via a 470kΩ “bleed”
Fig.2 (facing page): the circuit uses
74HC4066 analog switches to switch
the audio/video signals and these are
sequenced using counter stage IC1.
Transistors Q1-Q4 function as video
input buffer stages, Q5 buffers the
audio output signal and Q6-Q9 form a
video output amplifier.
June 2001 73
Capacitor Codes
Value
IEC Code EIA Code
0.22µF 224 220n
0.1µF 104 100n
.047µF
473 47n
.01µF 103 10n
emitter follower, with the output taken
from its emitter via a 0.1µF coupling
capacitor.
Sequencing
Fig.3: install the parts on the PC board
as shown on this layout diagram.
Make sure that you install DIPSW1
the correct way around and that only
one switch is in the “on” position.
resistor and the audio signals fed via
.047µF coupling capacitors to audio
switches IC3d, IC3c, IC2d & IC2c.
The only extra complication here
is that the switch side of each coupling capacitor is connected to a
“half-supply” voltage of +2.5V via a
47kΩ isolating resistor. This half supply voltage is provided by two 10kΩ
resistors connected between the +5V
rail and ground.
74 Silicon Chip
This ensures that the audio signals
remain in the optimum voltage range
for the bilateral switches (for minimum distortion) and that they’re at
the same DC level to prevent switching
clicks.
The outputs of the audio switches
are connected together, so that whichever signal is selected passes directly
to the base of output buffer transistor
Q5. As you can see, this is simply an
Now let’s see how the sequencing
circuitry works.
The sequencing counter is formed
by IC1, a 4017 Johnson-type decade
counter whose first four outputs (O1O4) are used to drive the four pairs
of switches. We use simple feedback
from these outputs back to the master
reset (MR) input (pin 15) to force the
counter to count by a smaller number
than 10, to suit the number of cameras
being used.
This feedback is controlled by
switch DIPSW1, which is set to suit
the number of cameras used. If there
are four cameras, only the “4” switch
is turned on (closed), which makes the
counter reset each time the O5 output
goes high. This turns the counter into
a modulo-4 counter, so that all four
pairs of analog switches are turned on
repeatedly in sequence.
On the other hand, if you have only
three cameras, the “3” switch of DIPSW1 is turned on instead of “4”, so
that the counter resets each time the
O4 output goes high. This makes the
counter operate in modulo-3 mode so
that only the first three pairs of analog
switches are turned on in sequence.
Similarly if you only have two
cameras, the “2” switch of DIPSW1 is
turned on to make the counter operate in modulo-2 mode. Only the first
two pairs of analog switches are then
turned on, in sequence – or alternately,
if you prefer.
What happens if you turn on only
the “1” switch of DIPSW1? That’s
right, the counter then resets whenever
O2 goes high – so it effectively stops
counting altogether, with the analog
switches for camera 1 turned on continuously. Clearly, there’s no point in
doing this because L’il Snooper then
doesn’t do anything useful. But if you
only have one camera you don’t need
a sequencer, anyway!
I used a 4-pole DIP switch because
you can’t buy one with three poles.
LEDs 1-4 are used to indicate which
camera input channel is selected at
any time. As you can see, they are
driven from the four switch-selecting
outputs of IC1, via inverters IC4c-f.
The LEDs can share a common 470Ω
current-limiting resistor, as only one
of these LEDs is ever turned on.
The low frequency oscillator which
drives the counter is formed by
Schmitt inverter IC4a, connected as
a simple relaxation oscillator. The
500kΩ pot is connected as an adjustable feedback resistor, allowing the
oscillator frequency to be varied over
a range of about 10:1 (from roughly
0.3Hz to 3Hz).
The output of the oscillator is fed to
one of the two count inputs of IC1, at
pin 14. This allows the counter to operate whenever the other count input
(pin 13) is held low. And it normally
is held low by the output of inverter
IC4b, whose input is pulled high via
a 100kΩ resistor to +5V.
Counting can be paused very easily,
simply by pressing the Pause pushbutton switch S1. This shorts pin 3
of IC4b to ground, forcing its output
high and hence stopping the counter.
Pressing the switch again resumes
counting.
The 0.1µF capacitor across S1
provides the necessary decoupling to
prevent miscounting due to contact
bounce.
Power supply
The power supply part of L’il Snoop
er is very straightforward. As shown
The RCA output sockets and the DC power socket are all mounted directly on
the PC board, so there’s very little internal wiring. Use insulated wire to prevent
shorts between adjacent links near IC2 and IC3.
on Fig.2, the nominal +12V DC from
an external source (eg, a plugpack) is
fed in via polarity protection diode D1
and filtered using a 1000µF electrolytic
capacitor. The filtered DC rail is then
fed directly to 3-terminal regulator
REG1 to produce the main regulated
+5V rail.
In addition, the filtered 12V rail
is used to power IC5, a standard 555
timer IC used here as a self-oscillating
commutator switch. This drives a
Resistor Colour Codes
No.
4
4
2
5
3
5
2
1
1
3
5
1
Value
1MΩ
470kΩ
100kΩ
47kΩ
10kΩ
4.7kΩ
2.2kΩ
1kΩ
680Ω
470Ω
75Ω
47Ω
4-Band Code (1%)
brown black green brown
yellow violet yellow brown
brown black yellow brown
yellow violet orange brown
brown black orange brown
yellow violet red brown
red red red brown
brown black red brown
blue grey brown brown
yellow violet brown brown
violet green black brown
yellow violet black brown
5-Band Code (1%)
brown black black yellow brown
yellow violet black orange brown
brown black black orange brown
yellow violet black red brown
brown black black red brown
yellow violet black brown brown
red red black brown brown
brown black black brown brown
blue grey black black brown
yellow violet black black brown
violet green black gold brown
yellow violet black gold brown
June 2001 75
With the sockets all fitted and their
pins soldered underneath, the next
step is to fit switch DIPSW1. Watch
out here – it must be fitted with its
“ON” side towards the rear of the
board.
The rest of the components can
now be installed. As usual, fit the
low-profile resistors and diodes first,
making sure each diode is orientated
correctly. You can then fit the small
non-polarised capacitors, followed
by the TAG tantalums and the electrolytic capacitors – again watching
their polarity.
Next can come the transistors. Note
that there are eight BC548s and only
one BC640 (Q8). You may want to fit
the BC640 first to make sure it doesn’t
end up in the wrong spot.
The next step is to fit the two voltage
regulators and the four ICs. Make sure
you don’t accidentally swap the regulators – the 7805 is REG1 and the 7905
is REG2. The leads of both are bent
down by 90° 6mm from their bodies,
so that their metal tabs can be bolted
flat against the PC board.
Use 10mm-long M3 machine screws
to secure them to the PC board before
soldering their leads.
Watch the static!
Figs.4&5: these full-size artworks can be used as drilling templates for the front
and rear panels. Drill small pilot holes first, then carefully enlarge them to the
correct size using a tapered reamer.
simple charge-pump voltage inverter
using D2, D3 and two 220µF capacitors, to produce a -10V rail. This is fed
to REG2 which produces a regulated
-5V rail for the video amplifiers.
Putting it together
Apart from the 500kΩ pot and Pause
pushbutton S1, all of the components
used in L’il Snooper mount directly
on a PC board coded 02106011 and
measuring 120 x 144mm. The only offboard wiring you have to worry about
is the four short wires which connect
the pot and pushbutton switch to the
front of the board.
The four indicating LEDs mount
directly on the PC board but protrude
through 3mm holes in the front panel. Similarly, the input and output
connectors are also soldered directly
to the PC board and are accessed via
76 Silicon Chip
holes in the back panel.
Fig.3 shows the assembly details
for the PC board. There are 22 wire
links on the board and it’s probably
best that you fit these before anything
else, to make sure you don’t miss any.
Most can be fitted using component
lead offcuts or tinned copper wire but
be sure to use insulated wire for the
longer leads, particularly where they
run close together (see photo).
After the links are in, fit the DC input
socket and the double RCA connectors along the rear edge of the board,
as these can be a bit fiddly. You may
have to enlarge the holes in the board
slightly to take the various pins, in
each case. Note that each double RCA
socket has a “barbed” plastic spigot on
each side and these mate with 3mm
holes in the PC board to help hold
each socket in position.
The four dual-in-line (DIL) ICs are
all CMOS devices, so take the usual
precautions against static charge
damage when you’re fitting them to
the board. Earth the soldering iron
and yourself if possible and solder
each chip’s supply pins to their board
pads before you solder the other pins.
Be sure to fit each IC with the correct
orientation, as shown in Fig.3.
All that should be left now to
complete your board assembly is to
fit the five LEDs. These are of course
polarised, so make sure you fit them
with their longer anode (A) leads to the
left. LED5 is the easiest to fit, because
it’s simply mounted vertically on the
board near Q9. You can leave about
8mm of lead length between the LED
body and the top of the board.
The four “indicator” LEDs (LEDs1-4)
should initially be mounted vertically
also but with their leads left at full
length. When they’re all fitted, carefully bend each LED’s leads forward
by 90°, at a point about 11mm down
from the bottom of the LED body. This
isn’t difficult to do if you use a pair
of long-nose pliers to grip them just
below the bend point. Your four LEDs
Parts List
1 PC board, code 02106011, 120
x 144mm
1 plastic instrument case, 160 x
155 x 65mm
5 dual RCA sockets, vertical PCmount (CON1-5)
1 2.5mm PC-mount DC power
connector (CON 6)
1 4-pole DIP switch (DIPSW1)
1 SPST push-on/push-off switch
(S1)
1 small instrument knob
1 500kΩ linear pot (VR1)
2 10mm x M3 machine screws
with M3 nuts
4 small self-tapping screws, 6mm
long
The audio/video input and output sockets protrude through holes drilled in the
rear panel of the case. Another hole, at bottom right, provides access to the DC
power socket.
should all end up pointing forwards
in a neat row, ready to mate with the
holes in the front panel.
There’s one last step to finish the
board assembly – you have to connect two short lengths (about 50mm)
of insulated twin-lead hookup wire
(eg, rainbow cable) for the rate pot
and pause switch connections. Bare
and tin about 5mm at both ends of all
four wires before soldering them to
the appropriate pads on the PC board.
Fitting it in the case
The board fits snugly inside a standard plastic instrument case measuring
160 x 155 x 65mm. However, before
installing the board, you have to prepare the front and rear panels (note:
some kits may come with these prepunched).
In summary, you have to drill six
holes in the front panel and 16 in the
rear panel (each double RCA socket
also attaches to the rear panel via a
small self-tapping screw, for added
support). The artwork for the two panels is reproduced here and photocopies of these can be used as templates
for drilling the various holes. If you’re
building your own unit from scratch
(rather than from a kit), you might also
want to use a clean photocopy of each
as a dress panel.
Don’t try to drill large holes in one
go, otherwise you’ll end up making a
mess. Instead, drill small pilot holes
first, then carefully enlarge each hole
to its correct size using a tapered
reamer.
When your panels are finished,
cut the pot shaft to length (to suit
the knob), then mount the pot and
pushbutton switch in position. The
knob can then be fitted to the pot, after
which you’re ready for the final assembly. This is best done in a particular
order, to make things easier.
First, slide the rear panel into its slot
in the bottom of the case, then fit the
board assembly so that the RCA connectors pass through their respective
holes. Be sure to push the board all
the way home so that the connector
bodies sit flush against the inside of
the rear panel.
At this point, the PC board’s mounting holes should line up with the support pillars in the bottom of the case.
Once everything is correct, secure the
board with four small self-tapping
screws, then fit the small self-tapping
screws which secure the double RCA
connector sockets to the rear panel
(these go in from the outside).
Both the PC board and rear panel
should then be securely attached to
the bottom of the case.
The front panel assembly can now
be slid down into its slot, gently easing
it down in front of the four LEDs until
they locate with the matching holes.
Semiconductors
1 4017 CMOS counter (IC1)
2 74HC4066 analog switch ICs
(IC2, IC3)
1 74HC14 hex Schmitt inverter
(IC4)
1 LM555 timer (IC5)
1 7805 3-terminal regulator
(REG1)
1 7905 3-terminal regulator
(REG2)
8 BC548 NPN transistors (Q1Q7, Q9)
1 BC640 PNP transistor (Q8)
5 red LEDs (LED1-5)
3 1N4001 diodes (D1-D3)
4 BAW62 diode (D4-D7)
2 1N4148 diode (D8,D9)
Capacitors
1 1000µF 16VW RB electrolytic
2 220µF 16VW RB electrolytic
2 100µF 10VW RB electrolytic
1 10µF 10VW TAG tantalum
4 2.2µF 10VW TAG tantalum
4 0.22µF MKT polyester
2 0.1µF MKT polyester
6 0.1µF monolithic ceramic
4 .047µF MKT polyester
1 .01µF MKT polyester
Resistors (0.25W, 1%)
4 1MΩ
2 2.2kΩ
4 470kΩ
1 1kΩ
2 100kΩ
1 680Ω
5 47kΩ
3 470Ω
3 10kΩ
5 75Ω
5 4.7kΩ
1 47Ω
Finally, the four connecting leads from
the board can be soldered to the lugs
of the pot and pushbutton switch, to
June 2001 77
The remaining possibility is that
LED5 glows steadily and one of
the others also glows steadily. This
would suggest that the power supply
is probably OK but the sequencing
counter isn’t counting for some reason. Possible causes of this are a short
or hairline crack on the PC board in
the vicinity of oscillator IC4a, pause
inverter IC4b or near the counter itself
(IC1). Alternatively, the 10µF tantalum
capacitor may have been installed with
reverse polarity.
Even if none of these problems is
evident, it’s a good idea to check the
+5V and -5V supply rails with a DMM.
They should both be within a few tens
of millivolts of these figures. If so, you
can fit the top of the case and screw
it together – your L’il Snooper is now
ready for business.
Putting it to work
Fig.6: check your PC board for defects by comparing it with this full size etching
pattern before installing any of the parts.
complete the wiring.
Your L’il Snooper is now ready for
the smoke test.
Setting up
The first step in setting up is to
decide how many cameras you’re
going to be using and set DIPSW1 accordingly. Only one of the “4”, “3” or
“2” switches should be pushed to the
ON position – the others (including
the “1” switch) should all be left off.
The Scan Rate pot should initially be
turned fully clockwise.
Now connect your plugpack or other
source of 12V DC to the power socket,
apply power and check LED5 (on the
board, just behind the pot). It should
be glowing steadily.
The LEDs on the front panel should
be glowing in sequence, like a small
light chaser. If so, try turning the pot
78 Silicon Chip
anticlock
wise – this should slow
things down and if it does, your L’il
Snooper is probably working correctly.
If LED5 isn’t glowing and/or all of
the other LEDs are off, disconnect
the power immediately and check for
problems. If all of the LEDs are off,
you may have a problem in the power
supply. Look for a diode or an electrolytic capacitor that’s fitted the wrong
way around. Check also that REG1
and REG2 haven’t been swapped and
check the wiring polarity to the 12V
DC connector plug. These are the most
likely causes of a “no-go” situation,
apart from a hairline crack or short
circuit in the PC board pattern.
If most of the LEDs glow (when it’s
their turn, in the case of those on the
front panel) but one or two don’t, odds
are that you’ve fitted those particular
LEDs the wrong way around.
Putting L’il Snooper to work is easy.
Just plug each camera’s video and audio outputs into the appropriate input
sockets (starting with those for Camera
1) and connect L’il Snooper’s outputs
to the AV inputs of your video monitor
or TV receiver. When it’s powered up,
you can adjust the scanning speed
using the Scan Rate control and stop
the scanning at any time by pressing
and holding in the Pause button. It’s
as simple as that.
By the way, the picture on the monitor may roll for an instant as each
camera is selected. That’s because the
cameras won’t be locked together and
the switching isn’t locked to any of
them either. However, most modern
monitors and TV sets lock very quickly, so this shouldn’t be a problem. You
may have to find the best setting for
the monitor’s vertical hold control,
though.
If you add extra cameras (up to a
total of four) at any stage, you’ll have
to open up L’il Snooper’s case again
and adjust the DIP switch settings so
it scans the right number of inputs.
Tweaking the scan rate
A final word: if you’re not happy
with the scanning rate range, this is
easy to change. All you need to do
is substitute a different value for the
10µF tantalum capacitor connected
between pin 1 of IC4a and ground. A
larger value (say 22µF or 33µF) will
slow the scanning rate range down,
while a smaller value (say 6.8µF or
SC
4.7µF) will speed it up.
|