This is only a preview of the January 2008 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. Items relevant to "PIC-Controlled Swimming Pool Alarm":
Articles in this series:
Items relevant to "The Minispot 455kHz Modulated Oscillator":
Items relevant to "Water Tank Level Meter, Pt.3: The Base Station":
Purchase a printed copy of this issue for $10.00. |
Pt.3: By JOHN CLARKE
Water Tank Level Meter:
Telemetry Base Station
Designed to team with up to 10 Water Tank
Level Meters, this Base Station lets you
monitor water levels from a remote location
(eg, inside your home). As a bonus, it also
includes an option for electric pump control.
T
HE ABILITY TO MONITOR water
tank levels from a remote location
can be very useful in certain circumstances. This particularly applies if
you have several water tanks or if the
tanks are hard to access, or you want
to include automatic pump control.
This Base Station is intended for
use with the telemetry version of the
Water Tank Level Meter described in
the November & December 2007 issues of SILICON CHIP. It has an inbuilt
433MHz wireless receiver and can
handle data transmissions from up to
10 level meters and display the results
on a 2-line 32-character LCD module.
In bargraph mode, it can show up to 10
tank levels simultaneously, while the
80 Silicon Chip
digital readout mode shows individual
tank levels to 1%.
As shown, the Base Station is a
compact unit that can be placed on
a shelf or a desk or attached to a wall
via integral mounting brackets. The
display is backlit so that it can be readily seen under all lighting conditions.
The only controls are four pushbutton switches situated in a line immediately below the LCD module. These
are used to control the display format
and to set up pump control. Power for
the Base Station comes from a 9V DC
200mA plugpack.
Display format
As mentioned, the display can be
switched to operate in one of two
formats. The first format shows all enabled tanks and their levels as an 8-level
bargraph on the one display (All Tanks
View diagram). In this format, the top
line shows the word “LEVEL” and the
tank levels are displayed as a rectangular tank with sides.
Each tank level is shown by the
height of the bars in the tank and each
bar corresponds to a 12% or 13% step
in level. So, for example, with only
the bottom bar showing, the level is
above 12%. For two bars the level is
above 25%, while four bars represent
a level above 50%.
If the tank is full (ie, at 100%), the
tank symbol is just a full rectangular
block (ie, all bars are on). Conversely,
an empty tank or one that is below 12%
in level shows an “e” for empty.
The second line in the display shows
the word “TANK” and the number of
each tank is displayed directly beneath
each of the tank level bargraphs. As
mentioned last month, each Water
Tank Level Meter is assigned a tank
siliconchip.com.au
number using a 0-9 BCD rotary switch.
These selected numbers are the ones
that are displayed for each tank.
Note that only the tanks that are
monitored with a Water Tank Level
Meter need to be shown on the display.
So if you only are monitoring Tank 1
for example, then that number is all
that needs to be displayed.
Basically, you can enable which
tank numbers the display will show.
If only five tanks are enabled and they
utilise numbers from 1-5, then each
consecutive number will be separated
by a space. If there are more than five
tanks or if numbers above five are
used, then there is no space between
each consecutive tank number on the
display.
In practice, the tanks are displayed
from left to right in a 1-9 and then 0
sequence. However, if one or more of
these tank numbers is not enabled, the
display will include a space where
the tank number would otherwise be
positioned.
View switch
Pressing the View switch accesses
the alternative digital display format
(Individual Tank Detail diagram). In
this mode, individual tank data is
shown. For example, if tank 1 is selected, the first line will show: “TANK1”
followed by “LEVEL” and then the
water tank level value as a percentage.
For example it may show “27%”. The
levels can range from 0-110%.
If no tanks are enabled in this mode,
the display will show “TANK ERROR
ENABLE A TANK!” (we describe how
to do this a bit further on).
The second line in this display
format shows the temperature reading
in °C and this can range from -99°C
through to +99°C (this is the temperature inside the corresponding Water
Tank Level Meter). Following this is
the word “CELL” and then the cell
voltage (eg, 1.21V).
If the cell voltage is below 1.15V,
then a small cross will be displayed
just before the voltage value. This indicates that the cell in the level meter
in not charging correctly which may
soon prevent it from operating.
Each enabled tank can be checked
in sequence using the Up () or Down
() switches to select the tank number
required. Note that only enabled tanks
will be displayed. For example, if you
have enabled tank 1, tank 3 and tank 4,
then the Up switch will cycle between
siliconchip.com.au
Data for the Telemetry Base Station
is transmitted from one or more
Water Tank Level Meters (up to 10),
as described in the November &
December 2007 issues of SILICON CHIP.
1, 3, 4, 1, 3, 4, etc. Similarly, the Down
switch will cycle between these numbers in the reverse sequence.
Note that if you have only enabled
one tank, the Up and Down switches
will have no effect.
If the base station has not received
any data from the selected Water Tank
Level Meter it will show a question
mark (?) in the space that normally
shows tank level. In greater detail, this
will be shown in place of the bargraph
for the “All Tanks View” mode and in
place of the the level and temperature
value portions for the “Individual Tank
Detail” format.
In addition, a ‘?’ is initially displayed for level, temperature and
cell voltage when the Base Station is
switched on, before it receives data
from the Water Tank Level Meter. The
‘?’ will reappear after data for that particular tank has not been received for
more than an hour. However, the cell
voltage will still be displayed and will
show the last measured voltage before
transmission was lost.
Loss of reception for over an hour
Typical Base Station Display Readings
➊
(1). The “All Tanks View” format
gives a graphical view of all enabled
tanks and their contents.
➋
(2). The alternative “Individual
Tank Detail” format shows detailed
data for each tank in digital format.
➌
(3). Pressing the Set switch brings
up the tank options. This is the
display if a tank is not enabled.
➍
(4). The unit can be programmed to
separately control up to 10 pumps,
turning then on or off at set levels.
January 2008 81
Features & Specifications
Features
Monitors up to 10 Water Tank Level Meters
Digital readout shows 1% level resolution for individual tanks
Switchable bargraph level display for monitoring all tanks simultaneously
Temperature and cell voltage monitoring for each tank meter
Can automatically control up to 10 electric pumps
Automatic pump-off switching with water level and temperature
Water level threshold adjustment for pump off
Temperature threshold adjustment for pump off
Specifications
Number of tanks monitored: 10 maximum
Bargraph display: eight levels plus “e” for empty, corresponding to levels
of 0, 12, 25, 37, 50, 62, 75, 87 & 99%
Individual display: percentage display from 10-110% in 1% steps;
temperature from -99°C to +99°C.; cell voltage with 2-digit 10mV resolution
Pump Control: up to 10 pumps
Temperature threshold: pump switches off for temperatures below the
setting from -9°C to +99°C; adjustment can be made in 1°C steps.
Level threshold: pump switches off for level settings below 50%.
Alternatively, pump switches on for level settings above 50%. Adjustment is
available in 1% steps from 0-100%
Invalid data: displays shows a “?” if no valid data at power up and after
one hour without fresh data.
Power: 9-12V DC <at> 100mA
Encode: 16 selections to help prevent reception of a neighbouring signal
can mean that the Water Tank Level
Meter has a low cell voltage and has
ceased transmitting. The last measured
cell voltage before data was lost can
help solve the problem. Cell voltages
at or below 1.10V reveal that the cell
is discharged.
Alternatively, the Water Tank Level
Meter could have met with a much
more catastrophic disaster!
Enabling a tank
As noted above, a tank must be
enabled for the Base Station to display
its data. To do this, you first press the
Set switch so that the tank options
are displayed. If a tank is not enabled,
the display will show, for example,
<TANK1>OUT on the top line.
To select the required tank number,
you press the Up () switch to successively select numbers 3, 4, 5, 6, 7,
8, 9, 0, 1, 2, etc. That done, you enable
the selected tank by pressing the Down
() switch. This changes the display
82 Silicon Chip
so that it now shows the PUMP ON
or OFF indication and settings on the
second line of the LCD.
Once a tank has been enabled, you
can continue to enable more tanks by
pressing the Up switch to find the tank
number and then the Down switch to
enable the tank as required. That done,
it’s just a matter of pressing the View
switch to return to the main display
format.
Pump control
Once a tank has been enabled, the
menu for its pump control can be
displayed by pressing the Set switch.
The display then shows various options for controlling an electric pump
associated with that tank.
First, however, note that the pump
number for a particular tank is the
same as the tank number; ie, a pump
associated with tank 1 is pump 1, a
pump associated with tank 2 is pump
2 and so on.
Initially, when a tank is first enabled,
the pump is set to OFF. To turn the
pump on, first press the Set switch
to display <OFF> following the word
PUMP. The setting is then changed
from OFF to ON by pressing either the
Up () or Down () switch
When this is done, the pump
switches on and the word “ON” will be
displayed, provided the pump control
threshold values are OK.
The pump control threshold values
are shown on the second line of the
LCD. This line starts with “OFF <at>”
(off at), followed by a level setting in
percent (eg, 5%) and a temperature
setting in °C (eg, -2°C).
In practice, the pump will not
switch on if the temperature is below
the threshold value or if the water
level is beyond the threshold value.
Conversely, if a pump is on, it will
switch off if the values received from
the level meter are below the temperature threshold or beyond the water
level threshold setting.
The water level setting threshold
works in two ways. First, suppose
you are using a pump to extract water
from a tank, as is normal if the tank
is used to supply water for a house.
In this case, the unit would be set to
automatically switch off the pump
when the tank water drops below the
set threshold. This is done to prevent
the pump running continuously when
the tank water has been depleted.
Basically, the unit will switch off
the pump if the level threshold is set
to 50% or less. Typically, the threshold
would be set well below 50%, at say
15% or 10%.
Conversely, you might want to use
a pump to fill a tank from another
supply; eg, from a bore or from another tank. In this case, you want the
pump to switch off when the water
level reaches the preset value so the
tank does not overflow. For the Base
Station pump control, a level setting
that is over 50% will switch the pump
off when the water level reaches the
set threshold.
So the pump automatically switches
off for rising or falling levels, depending on whether the setting is above or
below the 50% threshold.
Note that the Base Station does not
directly control the pump (or pumps).
Instead, it transmits a UHF signal to
a UHF Remote Control Mains Switch
and this in turn switches the pump on
or off. The UHF Remote Control Mains
siliconchip.com.au
Fig.1: the Base Station uses a 433MHz receiver module to pick up data from the Water Tank Level Meter(s). This
data is then fed to PIC micro IC1 which in turn drives the LCD module. The 433MHz transmitter is only necessary
for pump control.
Switch will be described in SILICON
CHIP next month and you will need to
build one of these for each pump you
wish to control.
Temperature control
If the outside temperature is at or
below 0°C, the water in the pipes that
connect to the tank may freeze. If that
happens, then having a pump start up
could destroy both the pump itself and
the connecting hoses.
For this reason, the unit includes
temperature control. This automatically switches the pump off if the
temperature drops below a preset
value.
siliconchip.com.au
The actual threshold setting will
depend on the climate at your location and how well the pipes are protected from the environment. If your
pipes are underground, then they
may never freeze up. Conversely, if
the pipes are exposed, then they may
easily freeze.
Generally, you would set the temp
erature to around -2° C. That’s because
the water in the pipes is not likely to
freeze until the temperature drops
several degrees below zero for a reasonable period of time.
Remote Control Mains Switch
In operation, the UHF Remote Con-
trol Mains Switches receive the on or
off signals from the Base Station to
control the pumps. These switches
are each assigned a number from 0-9,
corresponding to the tank number
and its pump. This ensures that the
correct UHF Remote Control Mains
Switches respond to signals from the
Base Station.
Another important feature of each
UHF Remote Control Mains Switch
is brownout detection. A brownout
occurs when the mains voltage drops
well below its normal value, due to a
fault condition in the mains supply.
This not only affects the brightness
of lights but more seriously, can cause
January 2008 83
Fig.2: follow this parts
layout diagram to build
both the main board and
the switch board. Take
care with the orientations
of the 433MHz receiver
and transmitter modules
– their pin assignments
are clearly marked on
their PC boards. Note also
that switches S1-S4 must
be installed with their flat
sides as shown.
This view shows the completed main-board assembly, prior to installation
of the LCD and switch modules. Note the the PIC microcontroller is not
normally plugged into its socket until after the initial power supply checks
have been completed.
pumps and other electric motors to
burn out. That’s because, at low voltage, electric motors draw excessive
current (and thus overheat) when they
do not spin at their normal RPM.
To prevent this, the UHF Remote
Control Mains Switch switches off the
supply to the pump if a brownout is
detected (more on this next month).
Circuit details
The circuit for the Water Tank Level
Meter Base Station is really quite sim84 Silicon Chip
ple. As shown in Fig.1, it’s based on
a PIC16F88 microcontroller (IC1) and
a 2-line x 16 character LCD module.
Apart from that, there’s just a couple
of 433MHz receiver & transmitter modules, a BCD switch, four pushbutton
switches and a few sundry bits that are
mainly in the power supply.
Of course, some of the components
are quite complex in themselves, such
as the 433MHz receiver and transmitter modules, the LCD module and the
microcontroller. However, these can
be considered simply as “building
blocks”, since we don’t need to know
too much about their internal operation to make them work as intended.
IC1, the microcontroller, is at the
heart of the circuit. It monitors the
signal from the 433MHz receiver
and in turn drives the LCD and the
433MHz transmitter that provides
pump control. It also monitors pushbutton switches S1-S4 and the encode
switch (S5).
Note that while the 433MHz receiver
is vital to receive data from the level
meters, the 433MHz transmitter is
only necessary for pump control. If
you don’t intend to use this unit for
pump control, then the transmitter
can be omitted.
As shown in Fig.1, the data received
by the 433MHz Rx (receiver) module
is applied to the RA5 input of IC1 via
a 1kW current limiting resistor. This
resistor is included because IC1 can
latch up if excessive current flows
into or out of this pin if the input goes
above +5V or below 0V.
In operation, IC1 reads the data signal by clocking it in at a rate set by the
transmission locking pulse. This data
is then accepted by IC1 if the format is
correct and the encode value matches
the setting of BCD switch S5 (ie, the
encode switches in the level meters
and the Base Station must match each
other).
If the encode settings do not match,
then the data signal will be rejected.
siliconchip.com.au
S5 is connected to the RB4, RB5,
RB6 and RB7 inputs of IC1 and can
pull these inputs to ground when its
‘2’, ‘4’, ‘1’ & ‘8’ switches are closed
respectively. Basically, it is a rotary
switch with 16 settings ranging from
0-9 and A-F. For the 0 setting, all
switches are open and for the F setting
all switches are closed. Settings in
between 0 and F have different combinations of open and closed switches.
For example a ‘1’ position will tie
IC1’s RB6 input to ground. Conversely,
each RB4-RB7 input will be pulled
to the +5V supply rail when its corresponding switch is open. That’s
because each of these inputs has an
internal pull-up resistor of about
20kW.
In operation, each switch setting
can be checked by IC1 because a low
voltage on the input means that the
switch is closed, while a high voltage
means that the switch is open.
Switches S1-S4 (View, Set, Down &
Up) on the RB0-RB3 inputs are monitored in a similar way.
Ports RA0-RA3 & RA6-RA7 are used
to drive the LCD module. As shown,
RA0-RA3 drive the D4-D7 data lines,
while RA6 & RA7 drive the register
select (RS) and enable (EN) lines
respectively. Trimpot VR1 sets the
display contrast voltage.
Driving the transmitter
The pump control signal appears at
IC1’s RA4 (pin 3) output and is fed to
the 433MHz transmitter. In practice,
the Base Station can individually
control up to 10 UHF Remote Control
Main Switches, which in turn switch
the pumps on and off as required.
The data transmission protocol is as
follows: initially a 50ms transmission
is sent to set up the receiver so that it
is ready to accept data. That done, a
16ms locking signal is sent, followed
by a 4-bit encode number and a 4-bit
tank number.
An 8-bit pump-on or pump-off signal is then sent. This is either 162 for
pump-on or 150 for pump-off. Finally,
an 8-bit stop code with a value of 204
is sent. These stop bits indicate that the
Installing The 433MHz
Receiver & Transmitter
Modules
These larger-than-life-size photos
clearly show how the receiver (top)
and transmitter (right) modules are
installed on the main PC board. You
can leave the transmitter module
out if you don’t intend to use the
pump control feature.
signal is for pump control and differ
from those used for the transmissions
from the Water Tank Level Meters.
IC1, the LCD module and the 433MHz
transmitter and receiver modules.
Power supply
The Water Tank Level Meter Base
Station is built using two PC boards
– a main board coded 04101081 (115
x 65mm) and a switch board coded
04101082 (63 x 15mm). The latter
carries just four pushbutton switches
(S1-S4) and two 4-way SIL header
strips.
These boards are housed in a bulkhead style case fitted with a clear lid
and measuring just 120 x 70 x 30mm.
Note that if you intend including
Power for the circuit comes from an
external 9-12V DC plugpack supply.
Diode D1 provides reverse polarity
protection, while zener diode ZD1
clamps any voltage spikes to 16V. A
10W resistor in series with the supply
rail provides current limiting.
A 100mF capacitor decouples the
supply rail which is then fed to 3terminal regulator REG1. This produces a regulated +5V supply rail, with
further supply bypassing provided
by another 100mF capacitor directly
across REG1’s output.
Additional 100mF, 10mF and 100nF
bypass capacitors are also used to decouple the supply to microcontroller
Construction
Capacitor Code
Value mF Code IEC Code EIA Code
100nF 0.1mF
100n
104
Resistor Colour Codes (Receiver)
o
o
o
siliconchip.com.au
No.
1
1
Value
1kW
10W
4-Band Code (1%)
brown black red brown
brown black black brown
5-Band Code (1%)
brown black black brown brown
brown black black gold brown
January 2008 85
The LCD and switch modules
simply plug into their respective
socket strips on the main PC board.
pump control, then the 433MHz transmitter and its associated components
must be installed.
Begin construction by checking
the PC boards for any defects such as
shorted tracks or breaks in the copper areas. That done, check that the
hole sizes are correct. In particular,
the holes for the four corner mounting screws, the four LCD mounting
points and for REG1 should be 3mm
in diameter.
Check also that the main PC board
fits into the box. It should have a circular cut-out at each corner so that it
clears the corner pillars. If necessary,
cut these out and file the edges of the
board until it is a neat fit.
That done, you can now begin
installing the parts. Fig.2 shows the
parts layout diagram. Install the two
resistors first, taking care to use the
correct value at each location. It’s just
a matter of using a digital multimeter
to check their values, before soldering
This view shows how the 3-way &
4-way pin headers are installed on
the switch board – see text.
them in position.
The three wire links can go in next,
followed by PC stakes for the receiver
antenna connections. You should also
install additional PC stakes for the
transmitter antenna connections if
pump control is to be used.
Follow these with diode D1 and
zener diode ZD1, taking care with their
orientation. That done, install a socket
for IC1, making sure that the notched
end goes to the left; ie, towards the
100nF capacitor. Don’t install IC1 yet,
though – that step comes later, after
some initial power supply checks.
Next on the list are the 4-way and
3-way SIL (single in-line) sockets (used
later to mount the switch PC board).
These two sockets can be made by using a sharp knife to cut down an 8-pin
DIL (dual in-line) IC socket. Clean
up the edges with a small file before
mounting the sockets.
Similarly, you also need to install
two 7-way SIL socket strips to accept
the connections for the LCD module.
These can be made by cutting and filing a 14-pin DIL IC socket.
Now for the capacitors. Note that
three of these are electrolytic types
and must be oriented with their
polarity as shown. In addition,
the 100mF capacitor to the right
of IC1 must lie horizontally on
the PC board; ie, it’s installed
with its leads bent down by 90°
(see photo).
Note also that there are three
100nF capacitors on the board. The
two ceramic types go in adjacent to
the 433MHz receiver and transmitter modules, while the 100nF MKT
capacitor is positioned immediately
to the left of IC1.
Regulator REG1 is installed so that
its metal tab sits flat against the PC
board. The procedure here is to first
bend the regulator’s centre lead down
through 90° some 5mm from its body,
after which its two outer leads can be
bent down about 7mm from the body.
That done, the device is fitted to the
board and fastened using an M3 x
6mm screw and nut before soldering
its leads.
Don’t solder the leads before bolting
the device to the PC board. If you do,
you could stress and fracture the PC
tracks as the device is tightened down.
The DC socket, BCD switch S5 and
trimpot VR1 can now go in. Be sure
to orient the BCD switch exactly as
shown and set it to the same number
as the encode switches in the Water
Tank Level Meters.
433MHz modules
The main board assembly can now
be completed by installing the
433MHz receiver and transmitter
modules. As previously stated, the
latter is only necessary if pump control
is required, otherwise simply leave
it out. Make sure that these parts are
correctly oriented (see photos) – their
pins are clearly marked.
You will also need to install the
antennas for these modules. These
antennas are made using 170mm
lengths of hook-up wire, each running
from its module’s antenna PC stake
to a PC stake at the opposite corner
of the board.
Switch board
The switch board should only take
a few minutes to assemble.
Begin by installing the four push86 Silicon Chip
siliconchip.com.au
JOIN THE TECHNOLOGY
AGE NOW
with
PICAXE
This tab on the back of the LCD module
must be bent flat against the PC board,
in order to clear PIC micro IC1.
Fig.3: the LCD
module plugs
into the 14-way
DIL header and
is supported
on four M3 x
10mm tapped
Nylon spacers.
button switches, making sure that
each switch has its flat side oriented
as shown. That done, the 3-way and
4-way headers can be installed.
These headers are installed on the
track side of the PC board (see photo).
Install each one so that its pins protrude about 1mm above the board
surface, then solder the pins and slide
the plastic spacer towards the PC board
until it rests against the solder joints.
The assembled switch board can then
be plugged into the main board.
Mounting the LCD module
The LCD module is connected in
similar fashion to the switch board. In
this case, you have to carefully solder
a 14-pin DIL header to the module and
once again, this has to be installed from
the underside of the PC board.
Push the header in so that its pin
length below the PC board is exactly
8mm (an 8mm-wide cardboard strip
makes a handy alignment tool). That
done, carefully tack solder a couple of
pins, make any adjustments as necessary, then complete the soldering.
Note that you will need a soldering
iron with a very fine tip for this job,
to avoid butchering the fine tracks on
the top of the LCD module.
Applying power
Now for the smoke test. This is done
with IC1 out of its socket and the LCD
module unplugged.
siliconchip.com.au
First, apply power and check that
there is 5V between pins 14 & 5 of
IC1’s socket. If this is correct, switch
off and install IC1 with its notched
end towards the 100nF capacitor (see
Fig.2).
Next, install four M3 x 10mm tapped
Nylon spacers on the main board to
mount the LCD module. Secure these
using M3 x 6mm screws, then plug
the LCD module in and secure it to
the spacers using another four M3 x
6mm screws.
Note that there is a tab beneath the
LCD module which interferes with IC1
when you attempt to mount the module in place. This tab must be bent over
to lie flat against the LCD module’s PC
board to avoid this problem.
The completed assembly can now be
installed in its case. If you are building from a kit, the case will probably
be supplied with a screen-printed
label and with all the necessary holes
drilled. If not, then you will have to
drill the holes yourself.
You will need four 10mm holes in
the lid of the case to clear the switch
caps, plus a 6mm hole in the side of
the case to give access to the DC socket.
The latter is located 9mm down from
top of base and 12mm in from the side.
The switch holes in the lid can be
drilled using the front panel label
shown in Fig.4 as a template. These
can initially be drilled out to about
5mm using a small pilot hole to start
Developed as a teaching tool,
the PICAXE is a low-cost “brain”
for almost any project
Easy to use and understand,
professionals & hobbyists can
be productive within minutes.
Free software development
system and low-cost in-circuit
programming.
Variety of hardware, project
boards and kits to suit your
application.
Digital, analog, RS232,
1-Wire™, SPI and I2C.
PC connectivity.
Applications include:
Datalogging
Robotics
Measurement & instruments
Motor & lighting control
Farming & agriculture
Internet server
Wireless links
Colour sensing
Fun games
Distributed in Australia by
Microzed Computers
Pty Limited
Phone 1300 735 420
Fax 1300 735 421
www.microzed.com.au
January 2008 87
Parts List
1 PC board, code 04101081,
115 x 65mm
1 PC board, coded 04101082,
63 x 15mm
1 bulkhead case with clear top,
120 x 70 x 30mm (Jaycar HB6082 or equivalent)
1 9VDC 200mA plugpack
1 LCD module with backlight
(Jaycar QP-5516 or equivalent)
1 PC-mount 2.5mm DC socket
1 433MHz receiver module
(Jaycar ZW-3102 or equivalent)
1 433MHz transmitter module
(Jaycar ZW-3100 or equivalent)
(optional for pump control)
4 click-action PC-mount switches
(S1-S4)
1 0-F 16-position BCD switch
(S5)
1 14-pin DIL header (2.54mm
pin spacing)
1 4-way SIL header (2.54mm pin
spacing)
1 3-way SIL header (2.54mm pin
spacing)
1 14-pin DIL IC socket (cut to
suit the 14-pin DIL header)
1 8-pin DIL IC socket (cut to make
4-way & 3-way SIL sockets)
1 18-pin DIL IC socket
4 M3 x 9mm or M3 x 10mm
tapped Nylon spacers
9 M3 x 6mm screws
1 M3 nut
4 No.4 x 6mm self-tapping screws
1 80mm length of 0.7mm tinned
copper wire
1 170mm length of medium-duty
hookup wire
1 170mm length of mediumduty hookup wire (optional for
pump control)
2 PC stakes
2 PC stakes (optional for pump
control)
1 10kW horizontal trimpot (code
103) (VR1)
Semiconductors
1 PIC16F88-I/P microcontroller
programmed with water tank
level receiver.hex (IC1)
1 7805 5V regulator (REG1)
1 1N4004 1A diode (D1)
1 16V 1W zener diode (ZD1)
Capacitors
3 100mF 16V PC electrolytic
1 10mF 16V PC electrolytic
1 100nF MKT polyester
1 100nF ceramic
1 100nF ceramic (optional for
pump control)
Resistors (0.25W, 1%)
1 1kW
1 10W
Fig.4: this full-size front-panel artwork can be photostated and used
as a drilling template for the case lid. The panel artwork can also be
downloaded from our website, printed out and attached to the lid using
double-sided adhesive tape – see text.
88 Silicon Chip
with and then carefully reamed out
to 10mm.
That done, the front-panel artwork
can be downloaded from the SILICON
CHIP website, printed out on a colour
printer and attached using doublesided adhesive tape. It can then be
protected by using a single layer of
clear self-adhesive film (eg, wide
sticky tape) and the holes cut out with
a sharp utility knife.
Alternatively, you can trim the label
to fit inside the lid by making cutouts
for the four corner pillars. It can then
be attach
ed using a smear of clear
silicone sealant.
The board assembly simply sits on
integral standoffs on the bottom of
the case and is secured using No.4
self-tapping screws. That done, apply
power, and adjust trimpot VR1 for
optimum contrast on the LCD.
The assembly can now be completed
by attaching the lid and mounting
brackets using the four screws supplied with the case.
Setting up
At this stage, when power is applied, the display should show a
question mark (ie, “?”) for tank 1’s
level. You now need to enable the
tanks that are to be monitored using
the procedure described earlier. Once
that’s done, the correct level will be
displayed for each tank.
The Base Station needs to be positioned so that it can receive signals
from all the Water Tank Level Meters
that are to be monitored. In each case,
when a valid signal is received, the
display will show the signal level for
that tank instead of a question mark.
During our trials, we found that
there were places inside the house
where the reception was unreliable,
particularly when the Water Tank Level Meter was more than 100m away.
In practice, it’s a matter of finding the
best place to receive signals from all
the level meters.
In addition, it may be necessary to
position each level meter so that it is
on the side of the tank that faces the
Base Station. The antenna can also
play a role here and an antenna consisting of a length of 1mm wire that
extends straight out of the Water Tank
Level Meter (ie, from the transmitter)
can improve reception at the Base
Station. Some experimentation with
the antenna orientation may also be
SC
necessary.
siliconchip.com.au
|