This is only a preview of the June 2000 issue of Silicon Chip. You can view 29 of the 96 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 "Automatic Rain Gauge With Digital Readout":
Items relevant to "Parallel Port VHF FM Receiver":
Items relevant to "Li'l Powerhouse Switchmode Power Supply; Pt.1":
Items relevant to "CD Compressor For Cars Or The Home":
Purchase a printed copy of this issue for $10.00. |
Once upon a time, rain gauges were as much a
part of the Aussie backyard as the outhouse.
Both started disappearing about the same time
– possibly because both required periodic
manual emptying! Here’s a PIC-powered, fully
automatic rain gauge that reads the rainfall,
empties itself, stores the reading and remembers
up to two months of data – without you leaving
the comfort of your home.
By JOHN CLARKE
PIC-Powered
Rain Gauge
Features
* Self-clearing rain sensor.
* Remote monitoring.
* Rainfall shown on a 3-digit display.
* Max. reading of 254mm (10") per
day.
* Stores 61 days of rainfall data.
* Settable end of day empty time.
* Hold feature to prevent incorrect
readings when cleaning sensor.
* Reset facility to clear previous
readings.
* Valid data indication for previous
days readings.
* Battery backup for operation in a
blackout.
* Tamper-proof against setting
changes.
14 Silicon Chip
T
his fully automatic rain gauge
does not require emptying and
will store 61 days of rainfall
readings. Rainfall is shown on a 3-digit LED display and you can monitor
this without going outside.
A traditional rain gauge consists
of a container with a measurement
scale down the side wall. The idea is
that the rain gauge is mounted on a
post right away from the influences of
buildings (fence posts were typically
used but paling fences alter wind patterns too much). Rain falls, a certain
amount enters the container, it starts
to fill and you read the result off the
scale in either millimetres or inches
and points.
Those old enough to remember
inches and points will also remember
that there are 100 points to the inch –
sort of a pre-decimal decimal, if you
like. A point of rain isn’t much – just
a short shower, really, while an inch
of rain is usually several hours of
steady rain. (Sydney’s annual rainfall
is about fifty inches or so; the recent
outback floods were reported to result
from 8-10 inches in a couple of days).
These days we use millimetres
and, of course, there are 25.4mm to
the inch.
However, we digress: back to our
old-fashioned rain gauge. While accurate and reliable, it suffers from the
disadvantage of requiring emptying
on a daily basis and manual recording
of the rainfall if you want a record.
A better mousetrap rain gauge?
A more useful rain gauge would be
one which did not require the constant
daily maintenance and which could
be monitored remotely. Also it would
be ideal if the rain gauge could log, or
remember, previous days rainfall up to
several weeks in the past. This would
allow the unit to be left unattended
for extended periods without loss of
the rainfall information.
The SILICON CHIP Rain Gauge has
these features and more. Ours uses a
microcontroller to not only record the
rainfall each day but to remember it.
The rain sensor mechanism itself
is housed in a short length of 90mm
PVC stormwater pipe. The rainfall
measurement from this is brought
via suitably long wiring to the display unit which is housed in a small
plastic case.
The display unit comprises a 3-digit
display for the readings and a row of
rectangular LEDs to indicate the current display function or mode. Three
pushbutton switches access the many
features of the rain gauge unit. It is
powered from a DC plugpack and has
a battery backup to ensure operation
in a blackout.
The normal setting of the rain gauge
displays the current day’s rainfall
and this is indicated by the “Rainfall
Today” LED. This reading is updated
as more rain falls.
You can access the previous day’s
rainfall by pressing the Down switch.
This will now be indicated by the
“Previous Days” LED and the 3-digit
display will alternate between showing the day selected and the current
day’s rainfall. The display switches at
a 0.78s rate giving you sufficient time
to read the values.
The next previous day will be
shown at the second pressing of
the Down switch and up to 60 days
past can be selected. The Up switch
provides the means to return to the
“Rainfall Today” display.
Indication of the previous days is
referenced to the current day (today)
so that a -1 on the display means
the day before today (ie, yesterday).
Similarly a -2 means two days before
today. The -60 indication is therefore
60 days before today. It provides us
with a total of 61 days of rainfall
information.
This rain gauge would have been
useful for Noah. He would have been
able to keep a record of the forty days
and forty nights rainfall during the
flood, all while he was sitting back
watching videos and surfing the ’net
The “works” end of the Rain Gauge shown in cutaway format. Rain enters
through the mesh at top and is funnelled (literally) into the pivoted container.
When the weight of the water in the container is high enough it flops over and a
tongue attached to the container interrupts a phototransistor circuit, registering
a pulse. The opposite half of the container then starts to fill in the same manner.
The emptied rain then drains away through the bottom of the unit.
inside the ark. OK, that’s a fib: all the
video stores were flooded out!
At the end of each day, the “today’s
rainfall” tally is transferred to the
previous day’s log (today -1) and the
same goes for the rainfall information
for all the other days past. For example
the today -1 rainfall is transferred to
today -2 with the today -2 information
transferred to today -3.
The today -60 information is lost
since the today -59 rainfall tally is
JUNE 2000 15
Fig.1 (left): the PIC microcontroller
does all the work in the Rain Gauge.
It accepts input pulses from sensor 1,
processes the information and drives
the LED displays.
moved into that day’s location.
Note that during the first 61 days
of use, past days rainfall information
may not be correct since the rainfall
may not have been recorded for that
day. In fact, when you first install
16 Silicon Chip
the Rain Gauge, all the previous days
readings from today -1 up to today -60
will not have been logged.
After each day the next previous
day’s readings will become valid as
they are transferred to that day’s log.
The Rain Gauge includes an “Invalid
Data” LED indicator to circumvent
any confusion over which data has
been recorded and which data has
not been counted by the rain gauge.
The Rain Gauge includes a clock
and an empty time setting facility.
The clock is set at the current time
and the empty time setting is selected
for when you want the day’s reading
to be stored.
For example, if you would normally
check a traditional rain gauge at say
7am then you can set the empty time
to this. Alternatively, you can set
the empty time to midnight so that
a true daily reading is obtained. Or
you could choose any other time. The
rainfall will be counted over a 24-hour
period, starting and finishing at the
empty time. The empty time represents the start and finish of the day,
so far as the rain gauge is concerned.
The clock and the empty time are 24
hour types and only show the hours
and tens of minutes. Thus the time
and empty time can only be set in 10
minute increments. The display will
show 033 for 3:30am, 120 for 12:00
(midday) and 121 for 12:10. Midnight
is indicated as 240 for 24:00.
The clock and empty time are set
by pressing the Mode switch to select
the required function, while the up
and down switches are used to set
the time. The indicator LEDs for “Set
Time” and for “Set Empty Time” show
which particular display is selected.
The Mode switch also selects the
Hold/Reset function. This is indicated by the associated Hold/Reset
LED. With this selection any rainfall
detected by the rain sensor will not
be counted. This feature is useful for
when the rain gauge sensor is being
cleaned or if a sprinkler is placed
near the sensor, causing false rainfall
detection, or for any other reason.
A Reset can be made when the Up
switch is pressed and the Hold/Reset
function is selected. The reset clears
the current days rainfall tally and
resets the “invalid data” indicator
function so that it shows for previous
days starting from today -1. Previous
days’ rainfall values are not cleared
Fig.2: follow this
diagram when
building the PC board.
You could substitute
burglar alarm or other
cable for the link between the main unit
and the remote
sensor. The wiring
to the DC socket
suits positive-tocentre plugpacks. Reverse
this wiring if
your plugpack is
negative-to-centre.
but only indicated as invalid. You
will need to reset the rain gauge after
it has been fully tested and before
commissioning it in use.
The setting functions are tamper-proof meaning that it is not possible to change them unless the Mode
switch is pressed, which can only be
done using a small probe inserted
into the case.
The design has been optimised to
make sure that rainfall data is not lost
easily. As mentioned before, the rain
gauge has battery backup so that it
keeps operating in a blackout. However, if the battery backup is not used
or the batteries go flat, the most data
you can lose is the blackout time plus
up to 10 minutes depending on when
the blackout occurs.
This is because the current time,
the empty time, today’s rainfall and
the previous days’ rainfall are stored
in a permanent memory which is not
lost on power down. The time and
today’s rainfall count are updated into
this type of memory every 10 minutes
while the previous days’ data and the
invalid data counter are updated at
the empty time.
3 are tied together. The LEDs within
DISP4 are tied to the “b”, “a”, “f”, “g”,
“e” and “d” segments respectively
To drive one of these displays one
of the RA0, RA1, RA2 or RA3 lines is
brought low. If RA0 is brought low,
for example, transistor Q4 will be
switched on and allow power to the
common anode connection of the
LEDs in DISP4. Any low outputs on
RB1-RB7 will light the corresponding
LED in the display, DISP4. After this
display is lit for a short time, the RA0
output is taken high and the RA2 line
is brought low to drive Q1 and display
DISP1. The new 7-segment data on the
RB1-RB7 outputs is presented to this
display. Similarly, the RA3 and RA1
lines are brought low to drive DISP2
and DISP3 respectively.
The Mode, Down and Up switches
(S1, S2 & S3) are monitored at the RA4
input. These switches also connect to
the RA2, RA1 & RA3 outputs respectively. Normally the RA4 input is held
high via the 10kΩ resistor connecting
to the 5V supply. When a switch is
closed, it will pull the RA4 input low.
IC1 can test which switch is closed
by knowing that if RA4 is low when
RA2 is low then it is the Mode switch
that is closed. A closed Down switch
will show a low on RA4 when RA1
is low and a closed Up switch will
Circuit details
Fig.1 shows the Rain Gauge circuit.
IC1 is the microcontroller which
forms the basis of the circuit with the
displays, switches and rain sensor
input attached to it.
The LED displays, DISP1-DISP4, are
driven directly from the RB1-RB7 outputs of IC1 via 150Ω limiting resistors.
All of the segments on DISP1, 2 and
The completed PC board sitting inside its case. Note that the vertical PC board
guides have been filed away to a depth of 13mm from the top – this allows the
board to sit in position without screws. The four tapped spacers stop the board
from moving when the lid is in place.
JUNE 2000 17
Parts List For Rain Gauge
1 PC board, code 04105001,107 x 62mm
1 Rain Gauge front panel label, 124.5 x 62mm
1 plastic case, 130 x 67 x 44mm
1 3mm transparent red Perspex or Acrylic sheet, 56 x 18mm
2 AA cells (alkaline or NiCd/NiMH)
1 2 x AA cell holder
1 DC panel socket
1 9V DC 300mA plugpack
1 SPST tactile switch (S1) (Jaycar Cat. SP-0730 or equiv.)
2 PC-mount snap-action keyboard switches (S2,S3)
1 3.2768MHz parallel resonant crystal (X1)
1 18-pin DIL socket
4 M3 x 9mm tapped brass standoffs
5 M3 x 6mm screws
1 M3 nut
1 small rubber grommet
7 PC stakes
1 100mm length of 0.8mm tinned copper wire
2 50mm lengths of medium duty hookup wire
1 10m length of 3-way (or 4-way) cable
Semiconductors
1 PIC16F84P microcontroller programmed with RAINA.HEX* (IC1)
3 LTS542A 7-segment common anode LED displays (DISP1-DISP3)
1 DIL 10-LED (red) bargraph (DISP4) (Jaycar Cat. ZD-1704 or equiv.)
1 photo-interrupter (sensor 1) (Jaycar Cat. Z-1901 or equiv.)
1 7805 5V 1 A regulator (REG1)
4 1N4004 1A diodes (D1-D4)
4 BC328 PNP transistors (Q1-Q4)
Capacitors
1 100µF 16VW PC electrolytic
2 10µF 16VW PC electrolytic
2 0.1µF MKT polyester
2 15pF NP0 ceramic
Resistors (0.25W, 1%)
1 100kΩ
1 10kΩ 1 1kΩ
4 680Ω
1 220Ω 7 150Ω
Mechanicals
The rain detector unit itself is relatively simple to make up – follow the
photographs and the drawings and
you should have no problems.
Most of the mechanical parts are
made by cutting up a standard (83 x
54 x 31mm) jiffy box and using offcuts
from a 90mm stormwater pipe and
end caps.
The rain water enters the unit via a
funnel which directs it into a divided
water container mounted on a pivot.
When one side of the container fills,
the weight of the water causes it to tip,
emptying its water load in the process.
The other side now fills and tips the
container back again.
A lug attached to the container passes through a photo interrupter every
time the unit tips and this is recorded
as 1mm of rain. The unit is calibrated
with a simple screw adjustment to set
the water container tip angle.
The entire assembly is housed
inside 90mm stormwater pipe with
drilled-out end caps on each end. The
ends are covered in flyscreen wire to
prevent spiders entering and fouling
the mechanism with their webs.
Rain sensor
* If you wish to program your own
PIC, raina.hex and raina.asm are
available to download from the
SILICON CHIP website, www.siliconchip.com.au
Parts For The Rain Sensor
1 180mm length of 90mm PVC stormwater pipe
2 90mm UPVC endcaps
1 plastic jiffy box, 83 x 54 x 31mm
4 M3 x 25mm brass screws
2 M3 x 25mm Nylon screws
2 M3 x 12mm Nylon screws
4 M3 x 6mm brass screws
12 M3 brass screws
10 M3 Nylon or brass washers
4 untapped 4BA brass spacers, 6mm long
1 plastic funnel, 86mm diameter (or 90 x 180mm galvanised sheet and
12.5mm diameter x 15mm copper tubing)
2 90mm diameter aluminium or brass flyscreen wire
1 small rubber grommet
1 100mm long cable tie
1 neutral cure Silicone sealant (roof and gutter type)
1 tube super glue
18 Silicon Chip
show a low on RA4 when RA3 is low.
The rain sensor (sensor 1) consists
of an infrared LED and phototransistor
housed in the one package. There is a
slot in the package to allow a vane to
pass and block the light beam to the
phototransistor. Normally, the vane
is out of the slot and the light from
the LED passes to the phototransistor,
switching it on. This means that the
voltage at IC1’s RB0 input is low.
As the weight of water causes the
container to flip over, the vane enters
the slot and the light is blocked. This
turns the phototransistor off and the
RB0 input goes high via the 100kΩ
pullup resistor. The 0.1µF capacitor
suppresses noise on this input. The
transition from a low to a high is acknowledged by IC1 as a count from
the sensor.
The vane quickly leaves the slot as
the container continues to flip over,
allowing the light from the LED to turn
the phototransistor back on again and
pulling the RB0 input low once again.
It stays in this state until the container
is once again flipped over.
Crystal X1 provides the oscillator
component for IC1 which runs at
3.2768MHz. This frequency is
divided down four times by the
microprocessor for its internal operation. Another internal counter
further divides this by 512, resulting in a frequency of 1600Hz which
multiplexes the displays. Further
division provides us with a pulse
once every ten minutes which updates the system clock.
Power
Power for the circuit is derived
from a 9V DC plugpack which
supplies the 5V regulator REG1
via a reverse-polarity protection
diode D1. The 100µF capacitor at
the input to REG1 decouples the
supply, while the 10µF capacitor
at the output provides protection
against oscillation of the regulator.
The normal regulator output of 5V is
increased by about 0.6V due to diode
D2 between the regulator’s ground
terminal and ground. This increase
in voltage at REG1’s output is brought
back down again by diode D3. This
diode isolates the regulator output
from the 3V battery supply, while yet
another diode (D4) isolates the 5V
supply from the 3V battery.
If the regulator is powered, D3
conducts and supplies power to IC1.
Diode D4 will be reverse biased due
to the higher voltage on its cathode
compared to its anode and so the 3V
battery will not supply current.
If you wish to use rechargeable
batteries (2 x NiCd or NiMH giving
2.4V), the 220Ω resistor can be used
to provide a trickle charging current.
If power to the plugpack fails due to
a blackout, D4 will be forward biased
and the 3V battery supplies IC1 with
standby power.
Construction
We’ll start the construction with the
electronic section of the Rain Gauge.
This is built onto a PC board coded
04105001 and housed in a plastic
The front panel (above) can be photocopied and used as is and/or used as a
drilling template for the top of the case. Use the PC board pattern (below) to
check commercial boards or to photographically make your own board.
case measuring 130 x 67 x 44mm. A
front-panel label is glued to the lid of
the case and the LED displays are visible through a transparent red Perspex
or Acrylic window in the case lid.
Begin construction by checking the
PC board for shorts between tracks
or any breaks in the copper connections. Compare the PC pattern with
the published artwork to be sure it is
correct. Now check the hole sizes. The
corner mounting holes and regulator
tab mounting hole should be 3mm in
diameter. The PC stakes should be a
Resistor Colour Codes
No. Value
1 100kΩ
1 10kΩ
1 1kΩ
4 680Ω
1 220Ω
7 150Ω
4-Band Code (1%)
brown black yellow brown
brown black orange brown
brown black red brown
blue grey brown brown
red red brown brown
brown green brown brown
5-Band Code (1%)
brown black black orange brown
brown black black red brown
brown black black brown brown
blue grey black black brown
red red black black brown
brown green black black brown
tight fit into their respective holes.
Install the PC stakes first, followed
by the resistors. Use the resistor colour
code table as a guide to their value.
Alternatively use a digital multimeter
to measure each one. Note that the
220Ω resistor should only be installed
if you intend to use rechargeable cells
for the battery backup.
Insert and solder in the diodes next,
making sure that they are oriented
correctly. The 7-segment LED displays
must be installed with the decimal
point on DISP1-DISP3 facing toward
the switches. DISP4 should be installed with the label side towards IC1.
You can now install the IC socket
with its pin 1 oriented as shown. Don’t
install the microcontroller just yet.
Capacitor Codes
Value
IEC Code EIA Code
0.1µF 100n 104
15pF 15pF 15
JUNE 2000 19
The capacitors can go in next, using
the capacitor code table as a guide to
their values. The electrolytic types,
which are positioned on their sides
as shown in the photographs, must be
oriented correctly, with the positive
lead placed as shown on the wiring
diagram. Similarly, the crystal is
placed on its side and is secured at its
free end using a short length of tinned
copper wire soldered to the PC board
and crystal body.
CI
20 Silicon Chip
A
D
Now install the PC stakes at the external wiring points. The switches can
then go in, taking care to ensure that
the flat sides of S2 and S3 are oriented as shown. S1 must be installed so
that the leads are oriented as shown.
This switch should normally be an
open circuit between the bottom and
top pins.
Transistors Q1-Q4 can be inserted
with their height level with the top
of the displays. REG1 is mounted
Fig.3: these drawings, in
conjunction with the
photographs, show how the
various components are
fashioned from a “Jiffy” box.
Start with the box (without lid)
and carefully make three cuts
with a hacksaw where shown.
Most of piece “A” becomes the
water container itself while that
end of the box (“C”) becomes the
vane which triggers the photo
transistor. The pillars and guides
which need to be removed can be
either broken off and filed neat
or, if you are particularly careful,
melted away with a soldering
iron and then filed neat. Note that
on the “A” piece, only one set
of guides and one pair of pillars
are removed – the rest are used!
Similarly, on the support stands
(“B” pieces), one pillar portion
remains – this forms the support
for the bearing shaft through
which the water container pivots
on Nylon screws inside untapped
spacers.
horizontally with the leads bent down
90° so they can be inserted into their
respective holes. The tab is secured
with a small M3 screw and nut.
The corner mounting holes are used
to mount the 9mm tapped standoffs
above the PC board and are secured
with M3 screws. The PC board is
mounted in the case by cutting the
integral guides on either side of the
case so that their top edges are 13mm
from the top. This will allow the PC
A
C
BII
E
Fig.4: the Jiffy box lid is not wasted – most of it (“D”)
becomes the vertical divider between the two halves of
the water-measuring container (shown below glued in
place with the two adjustment screws in position). One
of the two offcuts (“E”) becomes the mount for the LED/
phototransistor assembly.
board to slide into the case and be held in place by the
standoffs when the lid is attached (see photograph).
Drill a hole in the end of the case for the rubber
grommet required for the rain sensor lead and at the
other end for the DC socket. The leads from the PC
board to the DC socket, the battery holder and to the
rain sensor can now be run as shown in Fig.2.
We used three wires from a length of 4-wire telephone cable for the connection between the sensor
unit and the electronics. Other suitable cable would
be alarm cable or twin conductor shielded cable with
the shield being used for the earth connection.
Use the front panel artwork as a guide to drilling the
holes for the switches and display cutout. This cutout
is drilled and filed so that the red Perspex or Acrylic
window is a tight fit. A tiny drop of super glue may
help hold it in place if it is not a tight fit.
Attach the front panel label and cut out the holes in
this with a sharp knife.
Figs.5a & 5b: how the various pieces go together to make the
tipping bucket. These two drawings show the same assembly
– the top view shows the assembly side-on, while the bottom
drawing is a sectional view (ie, rotated 90°).
Testing
Connect the DC plugpack and test that there is a nominal 5V supply between pins 5 and 14 of IC1’s socket.
If the voltage is between 4.5V and 5.5V, the plugpack
can be removed and IC1 installed. Apply power again
and check that the display lights and shows 0 with the
Rainfall Today LED lit.
Press the Down switch and you should obtain a
display which alternates between a -1 and a 1. The -1
refers to the day selected and the 1 is the initial preset
rainfall data. The Previous Days LED should now be
alight as well as the “Invalid Data” LED. Pressing the
Down switch again will have the display show a -2 and
a 2. Press the switch repeatedly to check that you can
access all the previous 60 days (-60). Each day should
have rainfall data equal to the selected day: day -59, for
JUNE 2000 21
BII
D
A
A
BI
C
BII
E
LED/Phototransistor
Assembly
90mm Pipe Cap
Here’s how the completed bucket/sensor assembly should look. Again, we have
labelled the various components to agree with Figs.3 & 4 to make life easy. Note
how the vane (C) swings through the LED/phototransistor without any restriction.
example, will have rainfall data of 59.
Now press the Mode switch and
select the Set Time function as indicated by its associated LED. It should
show 120 for 12:00 midday. It may
show a later time if you have left
the rain gauge on for more than 10
minutes. Press the Mode switch and
the Set Empty LED should light and
the display will show 240 for 24:00
midnight.
Adjust this time with the down
switch so that it shows the same time
as the Set Time display. Now press the
Mode switch once to obtain the Hold/
Reset LED and “- - r” display and press
it again to obtain the Rainfall Today
display.
Now press the Down switch and
the -1 day should now have 0 as its
rainfall. The “Invalid Data” LED will
not be lit. The -2 day should have a
1 for its rainfall. The “Invalid Data”
will show for this and remaining days.
Each other previous day should have a
rainfall that is a value one less than the
day’s absolute value. For example, the
22 Silicon Chip
-60 day should have 59 as its rainfall.
This demonstrates the end of day
transfer of data from one day to the
previous day.
The input counter can be checked
by momentarily contacting the GND
(E and K connections of sensor 1) to
the collector terminal (C for sensor
1). The Rainfall Today display should
show 1, then 2, etc for each contact,
incrementing from 0 to 254. The next
count will be three dashes, indicating
overrange.
You can clear this data by returning to the Hold/Reset mode and then
pressing the Up switch to reset. The
display will show “rES” indicating
that it has reset. Returning to the
Rainfall Today Mode will show a 0 in
the display. Return to the Hold/Reset
mode and trigger the counter as before.
Return to the Rainfall Today selection
to check that the rainfall display is
still at 0. The Hold feature therefore
prevents any rainfall counting.
When setting the time, the 10 minute counter is reset whenever the Up or
BI
D
E
Another view of the complete assembly
looking almost straight down. The
double-sided water container is
perfectly balanced, brought that way
by adjusting the screws at the top in
and out as required.
Down switch is pressed. This means
that the time begins from the time set
and it will be a full 10-minutes before
the time increments. So to obtain
the correct time you must press the
switch at the time when your reference clock shows a 10-increment.
In practice, this means that the time
should be set when the minutes on
the clock you are setting it against
changes from either a 9 to a 10; eg 19
to 20, 39 to 40, etc.
This does not apply to setting the
empty time which can be set without regard for the current time. The
current time is compared with this
empty time and when they are equal,
the microcontroller moves the daily
rainfall data along by one day.
Rain detector
As mentioned, many of the parts for
the rain detector are made from parts
cut from a plastic case measuring 83 x
54 x 31mm. Part of the base of the case
is used as the water container, with
the lid providing the divider between
the two sides. An end of the case is
used to make a vane for the sensor 1
detector, while the other end of the
case makes up two support stands for
the water container pivot. One end of
the lid makes a mounting plate for the
photodetector (sensor 1).
Fig.3 and Fig.4 show how the parts
are cut from the lid and base of the
case. The base is cut so that some of
the integral slots in the side become
the centre of the water container. The
end marked (C) is cut off as shown
and the pillars removed on the water
container section. File the sawn edges
Rain enters the top of the 90mm pipe
via a protective insect screen. This is
thin enough to be gripped by the cap,
shown removed here.
You can make your own funnel, as we
did, or simply cut the top off a small
funnel so it forms a tight fit in the
pipe. Secure it in place with silicone
sealant.
to a smooth finish.
The support stands are made by
cutting the (B) side of the box into
the sizes shown. Remove one of the
pillars from each support stand (B’
and B’’). The vane (C’) can be cut to
shape as shown.
Cut the lid to size and remove the
small flanges on the divider section
(D). The section marked (E) is to
mount Sensor 1.
You will need to file the two edges
of the divider (D) to 50mm wide so
that it slides neatly into the side slots
of the water container. We rounded
the bottom section of the divider so
that the base of the container will be
curved slightly. This is not strictly
necessary and can be left straight.
The divider is glued into the water
container with super glue. To do this,
first slide the divider in place and run
the glue around the edges to secure it.
The glue sets very fast on this plastic
so do not run glue in place before
inserting the divider or the slots will
become clogged with set glue.
The vane is glued to the underside
of the water container central to and
at right angles to the divider. Draw
a pencil line down the centre of the
underside of the container to mark the
position for the vane. Now run some
super glue along the 45mm long edge
of the vane and attach it to the container in position. Hold it in position
until the glue sets.
The pivots for the water container
need to be 12mm down from the sides
as shown in Fig.5 and in the centre
of the divider. Drill holes so that the
6mm long spacers insert as a tight fit
with about 0.5mm of spacer protruding at each side of the water container.
You will need to seal the edges of
the divider and ends of the spacers
inside the water container with a
smear of silicone sealant to prevent
water from escaping.
The photodetector, sensor 1, can
be mounted onto the (E) mounting
plate using two Nylon screws and
brass nuts. The sensor is mounted
central to the mounting plate. Secure
this mounting plate in the centre of a
90mm stormwater end cap using brass
screws and nuts.
Drill mounting holes in the support
stands B’ and B” as shown in Fig.3.
Drill out the pillars so that the M3
Nylon screws will form a shallow
thread when screwed in place. Mount
the support stands 69mm apart along
the same centre line as the sensor 1
mounting plate using brass screws
and nuts.
Screw in the Nylon screws through
the pillars in the support stands and
cut them to protrude by 5mm from
the inside edge of the support stands.
Drill holes for the M3 x 25mm
screws on the top of the divider. These
are best drilled slightly undersize so
that the screw will cut a thread in
the hole. Place the 6mm spacers in
position as shown using nuts to hold
Fig.6: here’s how we fashioned the
funnel from a small piece of thin
galvanised iron. Alternatively, you
could use a suitable plastic funnel and
cut the top off so it measured 86mm
across.
Similar to the top, the bottom is
protected against spiders and other
insects by a screen. Make sure the
holes are big enough to allow the
water to drain away immediately.
them in place. The second screw does
not have the spacers.
Assemble the unit with the water
container pivoting on the Nylon
screws by gently prising the support
stands outward to allow the screws to
be inserted into the water container’s
bushings.
Check that the vane passes through
the sensor slot without fouling. You
may need to trim this piece for best
clearance. Note how many washers
you will need on each side of the
pivots so that the vane swings through
the centre of sensor 1’s gap. Install
these in place.
Adjust the top screws on the divider so that the tendency of the water
container to fall to either side from
upright is not biased in one direction
or the other.
Mark out where the end stop screws
need to be installed in the end cap so
that the top of the screw end will catch
the underside of the water container
for each side. Note that these screws
will need to be offset from centre to
prevent fouling the vane.
Drill the holes for these end stop
screws slightly undersize so that the
thread will be cut into the plastic. This
will allow easier adjustment. The nuts
are simply used to lock the screw in
place after the adjustment is set. Also
drill holes for the rubber grommet for
the wire entry and large holes to allow
the water to flow out.
Cut the 90mm-diameter stormwater pipe 180mm long and cut out the
inside of one of the end caps so that
it has an 86mm diameter hole. The
86mm diameter is important in the
JUNE 2000 23
calibration process – it must be peramount of water.
because of the water inertia rather
fectly round and it must be exactly
How do you get exactly 5.8ml of than its weight. The calibration can
86mm.
be checked by counting the number
water? By far the easiest way is to use
This endcap becomes a cover to
a 10ml syringe (hypodermic) without of tilts.
hold on the wire mesh over the end the needle, of course. Your local pharFor example, one litre (1000ml) of
of the pipe.
macist or doctor might be able to give
water should tip the water container
you one once he or she has disposed
172 times (1000/5.8 = 172). It is probA funnel can be modified by cutably easier to wire up the sensor to the
ting a slightly larger plastic funnel to of the pointy bit in their sharps bin.
circuit and attach the 90mm pipe and
86mm outside diameter or you can
These syringes are graduated to
fashion your own using galvanised
0.1ml so you can get the right amount funnel assembly, so that the number
iron sheet and a 15mm length of easily – and it’s easy to put the water of tilts can be counted on the display.
12.5mm copper pipe. It is folded so the exactly where you want it, too.
After wiring the sensor you will
two straight edges are placed together
need to cover the connections with
Adjust the end stop screws so
and the 5mm flange is soldered to the
silicone sealant. This will prevent
that the water tips both sides of the
back of the funnel. The copper tubing container with the 5.8ml quantity of
corrosion and also prevent the water
is soldered to make an outlet at the
water. Screw the end stops higher making contact between collector
funnel base.
and emitter of the detector transis(clockwise) so that the amount of tilt
Overall height is about 85mm. The is less if you need more than the 5.8ml tor, which may prevent the sensor
outlet from a plastic funnel may need
of water to tip it. Screw the end stop from detecting the swing of the vane
to be cut shorter to prevent it catching screws anticlockwise to lower the reliably.
the divider.
endstops if you require less than the
Secure the end stop screws with
5.8ml of water to tip.
the lock nuts and insert the 90mm
The funnel is secured inside the
diameter flyscreen inside the bottom
tube with some silicone sealant apThe top weights on the divider will
plied around the inside top edge of
need to be changed if you cannot ob- end cap. Secure with some dobs of
the funnel and pipe. Place the 90mm
tain an adjustment with the end stops silicone sealant.
diameter flyscreen on top of the pipe that calibrates the tipping correctly.
Installation
and place the opened end
cap in position. Wait for the
The rain gauge sensor can
sealant to cure.
be supported using standard
90mm downpipe fittings or
Current consumption: 30-60mA with a 12V DC input,
Calibration
even with heavy-duty cable
3mA when powered by 3V battery.
ties or galvanised wire and
First of all, we need to
2
2
Rain gauge collection area: 5808mm (or 5.8cm ).
attached to a free standing
determine how much water
Volume collected per mm of rain: 5.80884ml (cc).
post or one protruding above
(ie, rain!) entering the gauge
a fence.
represents 1mm. You will
Measurement resolution: 1mm.
recall we said it was imporIt will need to be located
Rainfall accuracy: Depends on calibration adjustment
tant to get the end-cap cutout
away
from trees and similar
(can be set to within 1% plus 1 digit).
exactly an 86mm dia
meter
rain obstructions for the best
Clock accuracy: ±10.5 minutes per year unadjusted.
circle. This is the figure we
accuracy. It should also be
use to calibrate the gauge.
several metres away from
walls and solid fences to
Rainfall is measured in
If the water container tips too early prevent it from being in a rain shadow
millimetres which simply means
the depth of the rain which gathers (ie, before the full quantity of water or even a rain funnel.
has been poured), then the weights
in a specific area where there is no
The clock accuracy depends on
are not sufficient and you will need
run-off or no run-in. To work out the
the actual crystal frequency. These
rainfall, all you need to know is the to add more weight.
have a tolerance of ±20ppm which
Try adding two more 6mm spacers
area. Our area is of course an 86mm
means that the clock could be some
on the second screw and secure with 10 minutes fast or slow at the end of
diameter circle.
two nuts in the same way as the first one year. This should be adequate
The area of a circle is represented
screw. If the amount of water required
for the rain gauge, however, it could
by π times the radius squared (πr2).
be readjusted each year if necessary.
The radius is, of course, half the dia to tip the water container is more than
the 5.8ml, you will need to reduce
meter so that is 43mm. Therefore the
Alternatively you can use a 22pF
collection area is πr2 or 3.14159 x the weight.
trimmer capacitor in place of the
Try removing both of the 6mm
432 = 5808 square mm. For 1mm of
15pF fixed capacitor between pin 16
spacers. Make sure that you use the of IC1 and ground. The crystal can
rain, the volume is 5808 cubic mm
same weight on either side of the di- then be trimmed to 3.2768MHz using
or 5.8ml.
vider to maintain the balance of the a frequency meter or by trial and error
You can initially calibrate the rain
tilting action.
testing over a period of time.
sensor by slowly pouring in 5.8ml
Best calibration results can now be
(or cc) of water directly into one side
Note that a probe on the oscillator
obtained by again slowly pouring in
of the water container without the
pins will affect the crystal frequency
a large quantity of water. Note that – it is best to place a low capacitance
90mm pipe and funnel installed over
if you pour the water in too fast you (10:1) probe on pin 15 (OSC2 input)
the unit. Check that each side of the
SC
water container tips at exactly this will cause the water container to tilt
for least frequency change.
•
•
•
•
•
•
24 Silicon Chip
Specifications
|