This is only a preview of the September 1989 issue of Silicon Chip. You can view 46 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. Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
Articles in this series:
|
Low-cost circuit has many applications
High or lo-w level
fluid detector
This simple circuit can detect high or low
fluid levels in a tank and trigger a relay
output accordingly. It's very easy to build
and uses just two low-cost ICs, a relay and
a handful of other parts.
Design By PETER GRAY
There are many applications for
a fluid level detector such as the
circuit presented here. Some of
these applications include monitoring fluid levels in fish tanks, sumps,
radiators and washing machines,
controlling irrigation systems and
pumps, and monitoring soil conductivity in greenhouses.
Despite its overall simplicity, this
circuit is very reliable. It's based on
the LM1830 Fluid Detector IC from
National Semiconductor and this
feeds an AC signal through a pair of
external probes. The circuit can
easily be adjusted to detect a wide
range of fluids and there's a
changeover switch so that you can
monitor for either high or low fluid
level.
The circuit for the fluid level detector is built on a small PC board that should
only take a few minutes to assemble. The external switch allows either high or
low fluid levels to be monitored.
52
SILICON CHIP
Want to detect when the fluid in
a tank rises above a preset level?
Simple - just set the changeover
switch to the HIGH position. If the
switch is set to LOW, the circuit will
detect when the fluid drops below
the preset level.
Because the circuit has a relay
output, you can easily adapt it to
suit your particular application.
For example, you might use · the
relay to activate an alarm if the
fluid level in a tank falls below a
certain level. Alternatively, you
could use the relay contacts to
automatically switch on a pump to
top the tank up again.
One obvious application is controlling a bilge pump in a boat. In
this case, the unit is set so that it
switches on the bilge pump when
the water reaches a preset level. A
small amount of hysteresis is provided by the circuit to prevent
"hunting" at the critical level.
On the automotive front, this
device is suitable for monitoring
fluid levels in radiator overflow
tanks and in washer bottles. In outback regions particularly, it could
save you from the traumas of a
blown engine due to coolant loss.
An option here is to delete the relay
and substitute a piezo buzzer or
LED to provide the low fluid level
warning.
A number of units could also be
built to control mist sprays in a
greenhouse or plant nursery. By using the probes to monitor soil conductivity, you could automatically
switch on the mist sprays when the
conductivity dropped below a certain level. An on-board trimpot lets
you set the moisture level at which
the circuit triggers.
is able to turn on the output
transistor.
In Fig.l, the output transistor
drives a small LED but it could also
be used to drive a loudspeaker or a
low-current relay.
OK, that's basically how the chip
works but there are one or two
more wrinkles.
One problem that can arise with
the circuit of Fig.1 is that the impedance of the fluid we wish to
detect is of a different order of
magnitude to the internal reference
resistor, RREF· This problem can be
solved by coupling the oscillator
output to the probe via an external
reference resistor, instead of via
the internal reference. Fig.2 shows
the details.
By selecting the value of this external reference resistor, the circuit can be made to work with
fluids of virtually any conductivity.
A filter capacitor can also be added to pin 9 of the LM1830 to filter
the detector output. If this is done,
the output transistor will switch on
and remain on when the fluid level
drops, instead of being pulsed on
and off by the oscillator.
Fig.3 shows the final circuit of
the Fluid Level Sensor. In addition
to the LM1830 (ICl), it also uses an
LM393 comparator (IC2) and a
BC547 transistor (Ql) to drive the
relay.
The circuitry around ICl is virtually identical to that shown in
Fig.2. The .001µ,F capacitor bet-
TABLE 1
Conductive Fluids
lo1-COnductl11 Aulds
City water
Sea water
All salt solutions
All acids
All alkaline solutions
Household ammonia
Water & glycol mixture
Wet soil
Coffee
Distilled water
Hydrocarbon fuels and solvents
All mineral and vegetable oils
Brake fluid
Ethyl alcohol
Methylated spirits
Ethylene glycol
Paraffin
Dry soil
DC blocking capacitor. An AC
signal is applied to the probe to prevent plating and corrosion problems, as would occur with a DC
source.
Note that in Fig.1 we are assuming a metallic container (eg, a metal
water tank). This container is simply shown connected to the circuit
earth and forms the other probe
input.
What the circuit does is compare
the resistance between the probe
and the container with the internal
reference RREF· If fluid is present,
the probe resistance will be less
than RREF and insufficient signal
will be fed to the detector to turn on
the output transistor.
On the other hand, if the probe
resistance increases above RREF
(ie, if the fluid level drops below the
probe level), a strong AC signal is
coupled via the detector which then
Table 1 lists some of the common
conductive fluids which can be
detected by the circuit. The nonconductive fluids listed in the table
cannot be detected.
How it works
To understand how the circuit
works, we first have to take a look
at what goes on inside the LM1830
Fluid Detector.
Fig.1 shows the internal workings of this chip. It contains an
oscillator (to generate an AC signal
for the probes), an internal
reference resistor (RREF = 13k0), a
detector, a driver stage and an
open-collector output transistor.
An external capacitor between
pins 1 & 7 sets the oscillator frequency. As shown, the oscillator
output is made directly available at
pin 5 and is also applied to the probe via RREF and an external .05µF
•cc
•cc
'10
O.IOf;,f
TIMING
CAP
~m
"
8.IHl1 1,1 F
~
12
•cc
"
LEO
12
•cc
TfMIIB
CAI'.
OSCILLATOR
DETECTOR
13
10
FILTER
9
GROUND
11
':"
Fig.1: basic circuit tor detecting low
fluid levels. The oscillator generates
an AC signal which is applied to the
active probe.
Fig.2: in this circuit, the oscillator output is coupled
to the probe via an external reference resistor
(RREF) instead of via the internal reference. By
selecting this resistor, the circuit can be made to
work with fluids of virtually any conductivity.
SEPTEMBER 1989
53
1M'
.001
I
1M
RL 1
V •
c:: :
14
12
PROBE
INPUTS
100k
TO
CONTROLLED
CIRCUIT
B
11
.,.
.i
+12V
ELJc
1M
VIEWED FROM
BELOW
.,..
FLUID LEVEL SENSOR
Fig.3: the final circuit of the fluid level sensor. The output signal from the LM1830 (IC1) is fed to IC2 where it is
compared with a ½ Vee reference voltage. IC2 in turn drives Qt and the relay.
ween pins 1 & 7 sets the oscillator
frequency to about 7kHz, while the
22µF capacitor on pin 9 filters the
detector output. Pin 5 is the
oscillator output and this is coupled
to one of the sensor probes via VRl
and a .047µF capacitor.
VRl functions as the external
reference resistor (ie, the internal
reference is not used). A trimpot
has been used here so that the circuit can be adjusted to detect virtually any conductive fluid.
When fluid is detected by the
probes, the oscillator output is
shunted to ground and ICla's output (pin 12) is high. Conversely, if
the fluid level drops below the probes, the oscillator signal on pin 10
increases and this switches pin 12
low.
The output signal on pin 12 is
now coupled by DPDT switch S2 to
the comparator stage (IC2). S2
simply reverses the voltages on, the
comparator inputs to provide the
high or low level warning functions.
In the low warning mode, pin 12
of ICl is coupled to the inverting input of IC2 via a 100k0 resistor and
Sla. At the same time, Slb switches
IC2 's non-inverting input (pin 3) to
½ Vee (ie, half supply), as set by a
voltage divider consisting of two
lMO resistors.
PARTS LIST
1 PC board, 82 x 44mm
(available from Novocastrian
Electronics)
1 DPDT miniature toggle switch
1 1 2V SPOT PC-mounting relay
Semiconductors
1 LM1830N fluid sensor (IC1)
1 GL393 or LM393 voltage
comparator (IC2)
1 BC54 7 NPN transistor (01)
1 1 N4002 diode (01)
Capacitors
1 22µF 16VW PC electrolytic
1 .04 7 µF polyester
1 .001 µF polyester
Resistors
3 1MO
1 1 OOkO
1 1 OkO
1 4 .7k0
1 1 OOkO trimpot
Where to buy the parts
A complete kit of parts for this project is available tram Novocastrian
Electronic Supplies Pty Ltd, 24 Broadmeadow Rd (PO Box 87),
Broadmeadow, NSW 2292. Telephone (049) 62 1358 or toll free on
(008) 02 5942.
The kit includes the PC board plus all on-board components but does not
include the probes or power supply. The price is $19 .95 plus $3 .00 for
postage and packing.
Note: copyright of the PCB artwork associated with this project is owned
by Novocastrian Electronics Pty Ltd.
54
SILICON CHIP
This means that when pin 12 of
ICl goes low (ie, the fluid level
drops below the probes), pin 2 of
IC2 is also pulled low via the 100k0
resistor. Thus, the comparator output is pulled high by the 4.7k0
pullup resistor on pin 1 and Ql
turns on to activate the relay.
Conversely, in the high warning
mode, IC2's inverting input sits at
½ Vee and the non-inverting input
now monitors pin 12 of ICl. Normally, the fluid level will be low and so
pin 12 of ICl will hold pin 3 of IC2
below the voltage on the inverting
input at pin 2. Thus, pin 1 of IC2
will be low and Ql and the relay
will be off.
Now, when the fluid level rises
above the probes, the output transistor inside ICl turns off. Pin 3 of
IC2 is now pulled high by the remaining lMO resistor which means
that the voltage on the noninverting input is now greater than
the voltage on the inverting input.
Thus, IC2's output is again pulled
high by the 4.7k0 pullup resistor
and Ql and the relay turn on as
before.
Power for the circuit can be
derived from any suitable + 12V
source; eg, a plugpack supply.
Although we have specified a
nominal + 12V rail, this can be
varied over the range 5-15V with no
changes to component values except to the relay coil rating.
Construction
Fig.4 shows how all the parts are
mounted on the PC board. There's
nothing tricky here; you can mount
the parts in any order you wish
Vee
OSCILLATOR
OUTPUT
OSCILLATOR
OUTPUT
(RREf)
OPTIONAL
DETECTOR
FILTER
INPUT
CAPACITOR
OUTPUT
12
Cl
Fig.4: parts layout for the PC board. We
used tinned copper wire for our probes but
serious applications will require stainless
steel probes to minimise corrosion problems.
GNO
Cl
Fig.5: inside the LM1830 fluid detector. The two
transistors at left form the oscillator. When the fluid
level drops, the oscillator signal is fed to the base of
the detector transistor which then pulses the driver
and output transistors.
RESISTORS
No.
□
□
□
□
3
Value
1MO
1
1
1
100k0
10k0
4.7k0
although we suggest that you leave
the relay until last.
Be sure to install the two ICs and
the diode the right way around. Pin
1 of each IC is adjacent to a small
dot or notch at one end of the
moulded plastic body of the device.
The probes for the prototype
were nothing fancier than a couple
of short lengths of tinned copper
wire. These were connected to the
PC board using light-duty figure-8
flex. For most applications though,
stainless steel probes will be required to minimise corrosion.
If you are monitoring the fluid
level in a metallic container, the
earthed probe input can simply be
connected directly to the container
as shown in Fig.2. The active probe
is then set to the trigger level.
Testing
To test the unit, set VRl to about
mid-range, connect the power supply and introduce the probes to a
glass of water. If S1 is set to HIGH,
the relay should turn on the moment
the probes touch the water and
release as soon as they are
removed.
4-Band Code
brown
brown
brown
yellow
black
black
black
violet
5-Band Code
green gold
yellow gold
orange gold
red gold
brown
brown
brown
yellow
Now switch S1 to low - the relay
should initially be on with the probes out of the water and then
switch off when they contact the
water.
If the unit fails to work correctly,
try adjusting VRl. If VRl is set too
low, pin 12 will remain low
regardless of the probe resistance,
and the relay will remain either on
or off (depending on the setting of
S1}.
Troubleshooting
What if it doesn't work? There's
not much to go wrong so troubleshooting is easy.
First, go over your work carefully
and check the parts placement and
all the values. Check that the ICs
are the right way around, that the
resistor values are all correct and
that the switch wiring is correct.
If this doesn't reveal anything,
switch your multimeter to the 20V
range and use it to monitor the
voltage on pin 12 of ICl. You should
get a reading of close to OV with the
probes out of the water and a
reading of about + 11V with the
probes immersed in water. Check
black
black
black
violet
black
black
black
black
yellow brown
orange brown
red brown
brown brown
POLYESTER CAPACITORS
No.
□
1
□
1
Value
IEC
EIA
.047µF
.001µF
47n
1n
473K
102K
the circuitry around ICl if you don't
get the correct results here.
If ICl checks out, remove the probes from the water and check the
voltages on pin 2 of IC2. You should
get a reading of a bout + 1V for one
position of S1 and + 6V (halfsupply) for the other position of S1. ·
The same voltages should appear
on pin 3 but with the switch positions reversed.
If you don't get the correct
readings here, the wiring to S 1 is
probably incorrect.
IC2 can be checked by monitoring
its pin 1 output. This should give a
reading close to OV for one position
of S1 and about + 8.5V for the
other.
Finally, you can check the operation of Ql by measuring its baseemitter voltage. This should be OV
when pin 1 of IC2 is low and about
0.65V when pin 1 switches high. ~
SEPTEMBER1989
55
|