T
he fluid-level controller circuit pre-sented here allows you to set the lower and upper fluid levels at the desired specific positions between two extreme levels. The total fluid level is di-vided into ten equal parts. Any two of these ten positions may be defined as ‘low’and ‘high’ level, respectively. The system shows the preset levels on the two 7-seg-ment displays and the current fluid level at any instant on a 10-LED bar graph indicator. The same circuit could also be used for controlling temperature in a simi-lar fashion.
The circuit
The main part of the circuit as shown in Fig. 1 is dot/bar graph driver LM3914 (IC1). This IC is linearly scaled and is intended for use in LED voltmeter appli-cation where the number of illuminated LEDs indicates the value of input volt-age. It contains a floating 1.2V reference source between pins 7 and 8 that may be used as the reference input for the IC.
The voltage from the sensor is fed to the input of IC1 at pin 5.
The output of the sensor may vary
Fig. 1: Schematic diagram of fluid-level controller with indicator
BHASKAR BANERJEE
from ground level (0V) to supply voltage.
Thus the reference voltage source should be externally preset, which is feasible with the help of IC1. This IC can also display the input voltage on a linear scale using ten LEDs in the bar graph or the dot mode. Here we have used the bar graph mode.
The outputs of IC1 are active-‘low’ and hence they sink current to illuminate LEDs. Inverters are used between the out-puts of IC1 and the inout-puts of IC3 and IC4 to invert the active-‘low’ outputs of IC1.
There are ten outputs available from IC1, of which only five are used here. One may use up to eight outputs of IC1 since IC3 and IC4 (4051) are 1-of-8 data selectors.
(Note. If 4067 were used in place of 4051, all the ten outputs could be used. It is also possible to get more than ten out-puts by cascading LM3941 ICs.)
Using this circuit, the maximum fluid level can be divided into four equal parts giving five different level readings from
‘0’ (empty/ level, while all levels including the inter-mediate levels are constantly displayed on LED bar graph.
The lower level can be set anywhere between 0 and 3 in steps of 1 and high level can be set be-tween 1 and 4. The fluid level can be maintained between any two levels by us-ing IC3 and IC4. IC3 selects the high level and gets inputs of levels 1, 2, 3, and 4, while IC4 selects the low level and gets inputs of levels 0, 1, 2, and 3. All other unused input pins of IC3 and IC4 are Fig. 2: Optical sensor
Fig. 3: Sensor using float operated potmeter
Fig. 4: Actual-size, single-sided PCB layout for fluid-level controller with indicator PARTS LIST
Semiconductors:
IC1 - LM3914 bar/dot display driver
IC2 - 4069 hex inverter IC3, IC4, IC5 - 4051 8-channel analogue
multiplexer
IC6 - 4520 dual binary counter
IC7 - 555 timer
IC8 - 4081 quad 2-input AND gate
IC9, IC10 - 4511 BCD-to-7-segment latch/decoder/driver LED1, 3, 5, 7, 9 - Green LED LED2, 4, 6, 8,
10, 11 - Red LED
Resistors (all ¼-watt, ±5% carbon unless stated otherwise):
R1-R10,
R16-R31 - 470-ohm R11-R15 - 10-kilo-ohm R32-R33 - 47-kilo-ohm
R34 - 1-kilo-ohm
VR1 - 10-kilo-ohm preset Capacitors:
C1, C2 - 22µF, 25V electrolytic C3, C4 - 10µF, 25V electrolytic C5 - 1µF ceramic disk Miscellaneous:
DIS1, DIS2 - Common-cathode 7-segment display S1, S2 - Push-to-on switch
grounded.
The selection takes place according to the binary word preset at the select input pins (pin 9, 10, and 11) of IC3 and IC4.
The required binary word is generated by a dual divide-by-16 counter IC6 (4520).
(IC6 can be replaced by a divide-by-10 counter 4518, if desired.) Half of IC6 is used for high level and the other half for low level. IC6 gets its counting pulse from a 555 timer (IC7) used for generation of approximately 1Hz pulse train.
The high level is set by pressing switch S1, while the low level is set by pressing switch S2. IC6 is reset when the power is switched on. This power-on-re-set function is realised using capacitors C1 and C2, and resistors R12 and R13.
The part of IC6 connected to high-level selector also gets reset when the count is 5 (101 binary). This reset pulse is gener-ated using AND gates of IC CD4081.
The selected minimum and maximum
levels are displayed by two 7-segment dis-plays DIS1 and DIS2 that are controlled by two BCD-to-7-segment decoders 4511 (IC9 and IC10, respectively).
The outputs of IC3 and IC4 are fed to the select input pins of IC5 (4051). The output of IC5 is fed back to one of its select inputs through an inverter. IC5 de-termines the control logic. The pump (or the heater in temperature controller) should be ‘on’ when the fluid (or tempera-ture) level is below the minimum level and should remain ‘on’ until the maxi-mum level is reached. It must not start if the fluid level falls below the maximum level but remains above the minimum level. This function is realised by IC5 that can operate a pump (or an alarm, or a flow valve, or a heater, as required) ac-cording to this control logic. For this, the input lines of IC5 are set to appropriate logic levels, which must not be disturbed.
Sensor. To control the fluid level (say,
water level in a tank), an optical sensor as shown in Fig. 2 may be used. This optical sensor consists of a small filament lamp (generally used in torch or an IR LED as light source) and an LDR or a photodiode as the sensor. The filament lamp may be powered using the same step-down transformer that is used to power the circuit. Alternatively, a sepa-rate step-down transformer may be used for the purpose, but taking into account the voltage and current ratings of the lamp.
One may also use the sensor described in ‘Digital Water Level Meter’ in Circuit Ideas section of the February 2000 issue of EFY. Use that sensor (VR4) as part of a voltage divider network as shown in Fig. 3. If the circuit is used as a tempera-ture controller, a temperatempera-ture sensor us-ing the popular LM35 IC may be built (refer Circuit Ideas published in March 1993 issue of EFY).
Operation. The lower or the mini-mum level is set by pressing switch S2 and the upper or the maximum level by pressing switch S1. The two switches should be kept pressed until the required level is displayed. For example, if the lower level is selected 1 and the upper level 3, the pump (or heater or a flow valve) will start when the fluid falls be-low level 1 and will stop when the fluid reaches level 3.
Assembly and testing. The circuit may be built on a veroboard. However, an actual-size, single-sided PCB and its component layout are shown in Figs 4 and 5, respectively. Switches used, should be of good quality. After assembling, the circuit may be tested using a voltage di-vider (potentiometer) that could be
var-Fig. 5: Component layout of PCB ied between ground and positive supply.
While testing, set preset VR1 to in-crease or dein-crease the reference voltage taking into account the maximum output available from the actual sensor. In case
of power failure, there should be proper battery back-up. Otherwise, the system will not behave as desired. Red and green LEDs are arranged in alternate fashion to make the bar display look attractive.❏