This is only a preview of the March 2000 issue of Silicon Chip. You can view 32 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. Items relevant to "Ultra-LD 100W Stereo Amplifier; Pt.1":
Items relevant to "Electronic Wind Vane With 16-LED Display":
Articles in this series:
Articles in this series:
Purchase a printed copy of this issue for $10.00. |
Our weathervane came from a
commercial unit sold by a mail
order company but you could
also adapt one from a garden
supply shop. The wind direction
is indicated on the LED display
unit pictured below, which has
16 LEDs arranged around a
compass.
Build an
accurate wind vane
with a 16-LED display
How would you like to know the wind direction at any time,
day or night? Build this electronic wind vane and its display
to indicate the wind direction from any of 16 points on the
compass. No longer do you have to go outside – just look at
the LED display.
By JOHN CLARKE
40 Silicon Chip
Did you build the nifty wind speed
indicator published in the March
1999 issue of SILICON CHIP? That
design was based on a bicycle computer and was quite popular. In fact
since then we have had quite a few
requests for a companion electronic
wind vane. And here it is.
A common approach to building an
electronic wind vane is to use a circular array of reed relays. The wind vane
is attached to a disc and magnet and
when it comes close to a reed relay, it
actuates to drive a LED to indicate a
particular wind direction. While that
is a simple approach, it does have its
limitations and it does become unwieldy if you want to indicate more
than eight wind directions – you need
a lot of reed relays and a lot of cabling
from the wind vane itself to the LED
display panel.
With that in mind, we set out to
produce a design which would indicate wind direction from 16 points
of the compass and which would
use a modest amount of electronics
to eliminate the need for a thick
multi-way cable. By the way, when
we say 16 points of the compass, it
means that the accuracy with which
you can measure the wind direction
is within 22.5°. In other words you
Fig.1: the basic scheme for the Electronic Windvane. Depending on the
position of the Gray encoded disc, the IR detectors pick up light from the IR
LEDs and this information is decoded by IC1 and fed to the display.
will be able to distinguish between a
Nor-Easterly and a Nor-Nor-Easterly
and so on.
The Electronic Windvane comes
in two parts, one to house the wind
vane detector circuitry and the second
to house the display circuitry. The
readout on the display comprises 16
LEDs to display the directions N, S,
E, W, NE, NW, SE and SW and the
intermediate points NNE, NNW, ENE,
WNW, SSE, SSW, ESE & WSW.
Infrared LEDs and diodes
Fig.1 shows the general arrangement of the circuitry involved. The
detector comprises four infrared LEDs
and four in
frared detector diodes.
They are aligned in two rows, with
LED1 shining on IRD1, LED2 shining
on IRD2, etc, with a translucent encoding disk located in between them.
The disk is made of PC board material
and comprises four concentric rings,
one for each diode and detector pair.
The rings have sections of copper
to block the light transmission and
sections of translucent board to allow
the light to pass.
Depending on whether or not light
is shining on them, the four infrared
diode outputs have two possible
states (0 or 1) to provide us with 16
combinations corresponding to the 16
Fig.2: the complete
circuit diagram for the
Electronic Windvane.
The position of the Gray
encoded disc depends on
the direction of the wind
and this in turn
determines which of the
IR detectors (IRD1-4)
picks up light from its
companion LED. IC1
decodes the detector
outputs and drives the
direction indicator
LEDs.
March 2000 41
Fig.3: this diagram shows
how the major parts are
assembled inside the
plastic case. The Gray
encoded disc (board 3)
sits between the IR LEDs
on board 2 and the IR
detectors on board 4.
an incorrect direction reading as we
move from one code to another with
each change in direction.
The 4-bit outputs from the detector diodes are applied to the 4-16
decoder. This is a binary decoder
which does not decode in the Gray
sequence but it is simple enough to
rearrange the decoder outputs so that
the correct directions are obtained on
the LED display.
Circuit description
compass points. The ring pattern on
the disc is shown in the PC patterns
of Fig.7, toward the end of this article.
Gray code
The ring encoding on the disc is
such that only one of the detector
outputs changes state for any single
change in direction. The 16 possible
codes are shown in Table 1, together
with the equivalent decimal value.
Note that the numbers do not count
in a standard sequence from 0 to 15
but are jumbled.
By studying the table you will see
that only one digit in the 4-bit code
changes between each successive
number. This type of encoding is
called a Gray code (after Elisha Gray)
and it ensures that we will not obtain
Fig.2 shows the complete circuit
and as you can see, there is not much
to it. The four infrared LEDs (IRLED1IRLED4) are connected in series and
powered from the 12V supply via
a 1.8kΩ resistor. This allows about
2-3mA of current through the LEDs.
The IRLEDs shine on to their
respective infrared detector diodes
(IRD1-IRD4) which are reverse biased
between the positive supply and
ground via 10kΩ resistors. When an
IRD does not receive any light, its
anode voltage is pulled low via its
respective 10kΩ resistor. When light
shines on the IRD, reverse current
flows, from cathode to anode, and the
voltage at the anode goes high.
The four anode outputs connect to
the A, B, C & D inputs of IC1, the 4514
decoder. The most significant bit is
the D input and the least significant
bit is the A input. The 16 outputs
drive the display LEDs but only one
is lit at a time. If the A, B, C & D inputs are all low, then the “0” output
at pin 11 goes high to drive the North
LED (LED1).
Similarly, if only the A input is
high, the “1” output goes high and
drives the NNE LED. Current through
Table 1: The Gray Codes
Decimal
B inary
Decimal
B inary
0
0000
12
1100
1
0001
13
1 1 01
3
0 0 11
15
1 1 11
2
0010
14
1110
6
0110
10
1010
7
0 1 11
11
1011
5
0 101
9
1001
4
0100
8
1000
Table 1 above shows the 16 codes that are encoded onto
the disc, while the photo at left shows the corresponding
ring pattern on the board. Note that only one digit in the
4-bit code changes between each successive number.
42 Silicon Chip
Fig.4: install the parts on boards 2 and 4 as shown here,
making sure that the IR LEDs and detectors are correctly
oriented. It’s a good idea to used PC stakes at the external
wiring points, as this will make the wiring easier.
the powered LED is limited by the
common 2.2kΩ resistor.
Power for the circuit is derived
from a 12V DC plugpack and diode
(D1) prevents damage to the circuit if
it is connected the wrong way around.
The 47Ω resistor and zener diode ZD1
limit the voltage to 15V. The 100µF
capacitor decouples the supply.
Construction
While the circuit is simple, the
construction is more com
plicated.
There are four PC boards and two
cases involved.
The display board, board 1, coded
04103001, can be mounted in a plastic
case or as we did, in a circular wooden enclosure 131mm in diameter. It
could be salvaged from an old barometer or turned up if you have a wood
lathe. Alternatively, you can purchase
one from the supplier mentioned in
this article. It includes provision for
a glass or Perspex window in front of
the display.
Boards 2, 3 & 4, coded 04103002,
04103003 & 04103004 are for the
position detector circuitry and are
housed in a weatherproof plastic case
measuring 115 x 90 x 55mm.
You can start work on the PC boards
by checking for shorts or breaks in the
copper tracks. The Gray encoding PC
These are the completed position detector circuit boards, ready for assembly
into the case. Note the metal bushes which have been soldered to boards 3 and 4
(just visible from the top).
March 2000 43
board (code 04103003, board 3) will
need to be cut into a circular shape.
The corners will also need to be removed from board 2 (code 04103002)
to allow access to the retaining screws
which ultimate
ly hold the PC assembly in the case (see Fig.3, which
shows the mechanical assembly of
the PC boards).
The corner holes for the three other
boards should be 3mm in diameter
while the centre hole in board 2 should
provide clearance for a 6mm rod. The
centre holes in boards 3 & 4 (04103003
and 04103004) should be reamed out
to provide an interference fit for brass
bushes which fit over the 6mm (or
1/4-inch) rod.
Four brass bushes with grub screws
will be required. These can be obtained from plastic knobs.
OK. So you get four of these knobs,
remove their grub screws and then
squeeze them in a vise to crack the
plastic housing. Remove the bushes
and re-insert the grub screws so you
do not lose them.
Ream out the holes in boards 3 & 4
so that the bushes are an interference
fit. The bushes are then pressed into
the copper side of the PC boards and
soldered into place. Do not press the
bush for Board 3 in too far otherwise
you will not be able to tighten the
grub screw.
You will need a rod 150mm long
to suit the bushes and this may be
6mm or 1/4-inch in diameter. Test
fit the rod in the bushes in the board
and ensure that all run freely and true
(without wobble).
That done, you can assemble the
electronic components onto each
board. The component overlays are
shown in Fig.4 & Fig.5.
Start by soldering in the PC stakes
which are located at all the wiring
points, then install the links and resistors. Table 2 shows the colour codes.
Make sure you install diode D1,
zener ZD1 and the 100µF capacitor
the correct way around. Similarly,
when inserting IC1, be sure to orient
Fig.5: the main display board carries the 16 direction indicator LEDs and
the decoder IC. Make sure that these parts are all oriented correctly.
Table 2: Resistor Colour Codes
No.
4
1
1
1
44 Silicon Chip
Value
10kΩ
2.2kΩ
1.8kΩ
47Ω
4-Band Code (1%)
brown black orange brown
red red red brown
brown grey red brown
yellow violet black brown
5-Band Code (1%)
brown black black red brown
red red black brown brown
brown grey black brown brown
yellow violet black gold brown
The wooden display housing is drilled to accept the LEDs,
using the label as a template. This shows the rear view
but note that the unit should be drilled from the front.
it correctly before soldering in place.
The infrared LEDs (IRD1-IRD4) are
coloured smokey blue and are inserted into board 2 (code 04103002). Note
that the anode lead is the longer one
and these LEDs must be inserted with
the correct polarity. Solder them so
that the height from the top of the LED
above the PC board is 14mm.
The infrared detector diodes (IRD1IRD4) have clear lenses and are inserted into board 4 (code 04103003)
with a height of 14mm above the
board surface.
Do not insert the 3mm red LEDs for
the display PC board just yet.
You are now ready to assemble the
three wind detector boards as shown
in Fig.3. Insert the rod into the bush
of board 4 and fit another bush onto
the rod to stop it from moving through
the board. These two bushes become
the lower thrust bearing for the wind
vane.
Now place board 3 onto the rod
together with another bush and a
washer. Secure board 2 in position
using the 25mm and 6mm spacers
and 3mm screws. Make sure that the
IRLEDs and IR detector diodes are
lined up directly opposite each other.,
then tighten the grub screw for board
3 so that it is positioned centrally between the infrared LEDs and diodes.
Set the upper bush with a little
clearance between it, the washer and
top board so that the rod can spin freely. A drop of oil on the lower bushes
will allow a freer movement. Attach
The display board is mounted on the back of the housing
using 6mm spacers and 10mm-long wood screws. A cable
clamp is used to anchor the leads.
the lower PC board to the base of the
case with 3mm screws or self-tapping
screws.
The lid of the case can be drilled in
the centre to accept a threaded bush
from a rotary switch or potentiometer. The 6mm rod should fit neatly
through this threaded bush. Also
drill out the hole in the side of the
box for the cable entry and grommet
or cable gland. The lid of the case
should have the supplied gasket fitted
into the grooving, so that it will be
weatherproof.
Display housing
The diagrams showing how the
display board is housed in a plastic
case or circular wooden enclosure are
shown in Fig.6. If you are installing it
in the plastic case, you can tack solder
the LEDs on one lead only with the top
of the LED being 27mm above the PC
board. Then insert the board on 12mm
long standoffs and secure with screws
into the base of the case. Attach the
label to the lid of the case and drill
out the holes for the 16 LEDs.
Note that although we have marked
one LED as the North LED, this is
arbitrary. Any LED can be chosen as
the North LED and so the label can be
oriented in any way to suit the case
you have.
Place the lid on the case and check
that the LEDs are just protruding
through the label. You may need to
readjust the LED height before finally
The front panel
label is glued to
an aluminium disc
and the holes then
drilled around its
circumference so
that is fits over the
indicator LEDs. If
you wish, the label
can be protected
using an acrylic or
glass faceplate.
March 2000 45
Fig.6: these two diagrams show how the display board is mounted in a plastic case (top) or
in a wooden case (above). If using the wooden case, the LEDs are first mounted on the PC
board, then the board is mounted in position and the LEDs pushed through the holes in the
case before soldering.
soldering all the leads in place.
The wooden enclosure can be drill
ed for the 16 LEDs in the front face
using the label as a guide. Push the
LEDs through the holes and secure
the PC board to the case using 6mm
The 6mm metal rod passes through a
6mm threaded bush which is attached
to the case lid. This bush can be
obtained from a rotary switch or a
potentiometer.
46 Silicon Chip
standoffs and wood screws as shown.
Solder the LEDs in position.
This done, remove the PC board
and attach the label to the face of the
enclosure. Again it does not matter
which orientation you choose for the
North LED. You can place a circular
acrylic or glass face in position over
the label if required.
Wire up the boards as shown using
6 or 8-way cable. This cable must be
long enough to extend from the position detector circuitry to the display
board. Initially, the wiring will prob
ably be only temporary since you will
need to install the weather vane on a
mast and the display case inside your
home. We envisage that the wiring
between the two would be passed
through the wall and up to the mast.
Attach the wires for the 12V DC
plugpack supply to a DC line socket and connect up the supply. You
should be immediately greeted with
one LED alight. If you rotate the rod on
the position detector, the LEDs should
each light up in sequence.
If the LED order is jumbled, then
you possibly have the wiring to the
A, B, C & D terminals mixed up.
If the North position appears to
have a greater range of movement
before the adjacent LEDs light, you
can reduce the value of the 1.8kΩ
resistor for the IRLEDs. This will
produce more light from the LEDs to
reduce the shadow effect caused by
the transition from dark to light as the
coding on the Gray disc changes from
copper to translucent PC board material. Increasing the current through
the IRLEDs will reduce the range of
movement that the rod moves with
the North LED alight.
Note also that the circuit is de
signed to operate in the dark; ie, with
the circuit in its box. If you test the as
sembly in daylight or artificial light,
the detectors will not work properly.
Weather vane
We adapted our weather vane from
This is what the unit
looks like before the
bottom of the case is
attached and the
weathervane fitted.
The skirt of the plastic
hose fitting covers the
threaded bush (to keep
water from running
down the shaft) but
sits slightly proud of
the case so that the
shaft can turn. Note the
plastic sleeve over the
shaft.
a commercial unit made of plastic
and supplied by the mail order firm
Magnamail. We just used the plastic
arrow without the clip-on bird (well,
it was an eagle instead of a proper
rooster!). We also used a plastic snapon tap hose fitting which prevents
water running down the rod and into
the box via the top bush. Both the tap
fitting and plastic wind vane were
internally sleeved with Nylex plastic
tubing which made them a friction fit
onto the metal rod.
Calibration
Use a compass to find North. Set the
rod on the position detector so that
Parts List
1 PC board, code 04103001, 89
x 81mm
1 PC board, code 04103002, 89
x 81mm
1 PC board, code 04103003, 69
x 69mm
1 PC board, code 04103004, 89
x 81mm
1 weatherproof plastic box, 115 x
90 x 55mm
1 circular wooden display case,
131mm diameter (see panel)
4 6mm untapped spacers
5 10mm long wood screws
1 cable clamp (see text)
OR
1 plastic case, 115 x 90 x 40mm
4 12mm untapped spacers
4 M3 x 20mm screws
1 6mm ID rubber grommet
1 display label, 71mm diameter
1 12VDC plugpack
1 DC line socket
1 150mm long 6mm or 1/4" metal
rod
4 plastic knobs with 6mm brass
bushes and grub screws
4 25mm tapped brass spacers
4 6mm untapped brass spacers
8 M3 10mm screws
4 M3 6mm self-taping screws to
mount PC board in case
1 6mm brass washer
1 6mm threaded bush (from rotary
switch or potentiometer)
16 PC stakes
1 120mm length of 0.8mm
diameter tinned copper wire
1 length of 6-way or 8-way cable
(for windvane sensor to display)
1 6mm ID rubber grommet or
cable gland
1 100µF 16VW PC electrolytic
capacitor
Semiconductors
1 4514 CMOS 4-16 decoder
(IC1)
16 3mm red LEDs (LED1-LED16)
4 5mm infrared LEDs (IRLED1IRLED4)
4 5mm diameter infrared detector
diodes (IRD1-IRD4)
1 1N4004 1A diode (D1)
1 15V 1W zener diode (ZD1)
Resistors (1%, 0.25W)
4 10kΩ
1 1.8kΩ
1 2.2kΩ
1 47Ω
Miscellaneous
Solder, weathervane, mast, plastic
hose fitting, plastic sleeving, etc.
March 2000 47
Fig.7: here are the full-size artworks for the four PC boards and for
the front panel artwork. The boards should all be correctly drilled
and the corners trimmed as shown before installing any parts.
the North LED is alight and is in the middle of its angular travel
between where the NNE or NNW LEDs light. Now point the weather
vane towards North, make sure that it is not loose and you’re done.
We fitted the underside of the wind vane case with a flange intended for a shower curtain rod. This makes it easy to mount on
SC
top of a wooden dowel or metal pipe.
Where To Buy The Wooden Display Case
The circular wooden display case can be purchased from Mr
Rod Chambers, PO Box 18, Moonbi 2353. Send cheque or
money order to the value of $15 plus $5 p&p.
48 Silicon Chip
|