|
Designed by Eng. João
Roberto Gabbardo, Ms.C, jrgabbardo@cpovo.net
This device has a circuit that monitors the water level in water
trays using two sensors one above other. When the water is below
the lower sensor, a pump is turned on filling the tray. When
the water reaches the second sensor the circuit turns the pump
off.
Don’t worry, it is very easy to assemble, and if you
have any troubles simply send your question and I will glad to
answer them!
The pump and the solenoid valves may be any ordinary draining
pumps and valves used in washing machines. They are sufficiently
strong for this application and all components of the circuit are
easily to find. You can buy these in an electronic parts store
(for example Radio Shack) or by mail (ex. Jameco).
For better security I have included an adjustable timer that automatically
turns off the pump it if the upper sensor fails. I think you would
not enjoy finding your greenhouse like a swamp if the pump doesn’t
go off.
It
features:
- Manual reset for additional safety.
- Manual control of the pump.
- Visual indication by LEDs.
The are two versions of the circuit: the one
described here and one with
inputs less likely to burn out.
Circuit fundamentals:
Perhaps you were thinking that the circuit is like a complicated
puzzle without solution. Well, let me assure you that after reading
the following descriptions, and with some imagination, you’ll
easily understand how it works.
As the circuit is based on electronic devices, some theory about
how it works is needed.
Let’s go!
The first component to analyze is the AND logic gate. The
designation “gate” comes from the fact that it can “leave
out” some specific state depending on the states on its inputs.
Gates compose a family of components.
The more important are: AND Logical gate, OR Logical
gate and NOT logical gate (or simply inverter). These names
arise from the fact that they can perform the Boolean arithmetic
functions with the same names.
In the Boolean arithmetic we assume the existence of only two
numbers (or logical states): 0 or 1.
The AND function is just a multiplication of two or more
states resulting on the logical state 1 if all the numbers are
1 like in ordinary arithmetic.
Example:
0
AND 0 means 0 * 0 resulting 0
0
AND 1 means 0 * 1 resulting 0
1
AND 0 means 1 * 0 resulting 0
1
AND 1 means 1 * 1 resulting 1
The last table is so called truth table of the AND gate
with two inputs. If we let the letters A and B to inputs we have:
Logical Symbol:
Truth table:
A |
B |
OUT |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
In electronics we can have two types of circuits: analogic and
digital. On the analogical circuits the voltage can assume several
values but in digital two possible levels of voltage are possible:
- 0 volts (logical 0)
- The power supply voltage (logical 1).
The AND gate may be represented as two series associated
keys:

As you can see, only if the two keys are closed we have a logical
1 in the output.
The OR function is the sum of the two or more states resulting
in logical 1 if one or more inputs are 1.
Example:
0
OR 0 means 0 + 0 resulting 0
0
OR 1 means 0 + 1 resulting 1
1
OR 0 means 1 + 0 resulting 1
1
OR 1 means 1 + 1 resulting 1
Logical Symbol:
Truth table:
A |
B |
OUT |
0 |
0 |
0 |
0 |
1 |
0 |
1 |
0 |
0 |
1 |
1 |
1 |
Represented
by keys:
Closing one key will result on a logical 1 at output.
The last is the NOT function and it simply invert the logical
state applied in its input.
Example:
NOT
0 results 1
NOT
1 results 0
Logical
symbol:

Truth Table:
The NOT function
may be represented by a small circle at inputs or output of another
logical function.
In
the scheme you can see AND gates with small circles at the output
meaning that the logical level at output was inverted. The
truth table of this gate is the same as that for ordinary AND but
whit the output inverted. In fact just an inverter was placed at
its output so we have an INVERTER AND or NAND gate.
Looking the scheme you can see that each NAND gates has one symbol
inside. This is the hysteresis symbol meaning that they
are SCHMITT TRIGGER NAND types.
Hysteresis is the propriety that some circuits have to
do not change your output state if the voltage applied doesn’t
reach determined level. In case of the gates employed, this level
varies with the power supply voltage and temperature. The following
table shows some typical hysteresis values to the Motorola CD 4093
four logical NAND gates.
The typical values for 25°C are:
Characteristic |
Symbol |
VDD
Vdc |
Typ.# |
Threshold
Voltage Positive Going |
VT+ |
5.0 |
2.9 |
10 |
5.9 |
15 |
8.8 |
Threshold
Voltage Negative Going |
VT- |
5.0 |
1.9 |
10 |
3.9 |
15 |
5.8 |
Suppose that power supply is 15 Volts. Looking the table, only
when voltage applied to inputs rises to 8.8 Volts does the output
go low (zero state) and only when the voltage falls to 5.8 Volts
does the output go high. Remember: this is an INVERTER AND!
This behavior assures high noise immunity to circuit, so false
triggering by noise will be more difficult.
The next circuit is more interesting yet. Its name is Flip-flop;
it can get a logical state applied on input and hold it at output
memorizing this state.
In fact the cache memory of your computer is formed by
thousands of these circuits encapsulated on one single chip (one
per bit). Surprised?
The flip-flops used on the circuit are D type flip-flop.
The “D” is for data meaning that data applied
at input goes to output when a pulse is applied to the clock pin.
A pulse is when voltage changes fast from one level to another
and returning to initial level again after an elapsed time.
Example:

The graphic shows a pulse rising from 0 Volts to 12 Volts, stays
on this level for “t” seconds and falls again to 0
Volts.
The rising edge of the pulse is called positive going edge and
the fall edge called negative going edge. Flip-flops are
classified according to the way that they memorize the states after
the application of clock pulse. It can be Positive Logic Edge
Clocked (on the rising edge of the pulse), Negative Edge
Clocked (on the falling edge of the pulse) or Pulse Clocked (after
pulse application).
The D type flip-flop used on the circuit is positive logic edge
clocked.
Its logical symbol is:

- The D pin is the Data input of the flip-flop.
- The pin with a small triangle is clock input.
- The pin with a Q letter is the data output.
- The pin with a /Q letter is the data output passed trough
an inverter (or complemented).
- The pin whit an S letter is the set pin. A “1” logical
state applied at this pin forces the Q output to go high, and
the Q’ output goes low, ignoring clock pulses during
application.
- The pin with an R letter is the reset pin. A “1” logical
state applied at this pin forces the Q output to go low and the
Q’ output go high ignoring clock pulses during application.
The next component to analyze is the DIODE. The symbol,
which you can see on the scheme, is an arrow pointing to a bar.
These symbols indicate the behavior of the device: it only accepts
current flow on the direction of the arrow (on the conventional
sense). The arrow terminal is called ANODE represented by
the letter A, and the bar is the CATHODE, represented
by the letter K.
When a voltage source is applied in the cathode (more than the
voltage drop of the device) the diode presents a very low resistance,
and electrical current can flow through the diode going to the
load. But if we put the source in anode, it looks like a very high
resistance like an open circuit and the current can’t flow
to load. In the first case, the diode is called DIRECTLY POLARIZED,
and in the second case REVERSE POLARIZED.
Directly Polarized

Equivalent
Circuit |
Reverse Polarized

Equivalent
Circuit |
The source applied on the anode must be higher than 0,3
Volts (germanium type) or 0,7 Volts (silicon type) to overcome
the potential barrier of the diode.
On the circuit some diodes are used to make OR logical gates with
several inputs.
Description of circuit:
The modularity concept was thought out when the circuit was designed
enabling the user assemble independent units as needed. With the
ICs used (the 4013 and the 4093) two independent circuits can be
assembled on the same board.
The scheme presents two equal circuits one above the other using
the four NAND Schmitt trigger gates of the 4093 (U1A to U1D) and
the two D positive edge triggered flip-flops of the 4013 IC (U2A
and U2B) so only the upper circuit will be described here.
The circuit has two sensors named SENSOR 1-A and SENSOR 2-A.SENSOR
1-A is the low level sensor and SENSOR 2-B is the high level sensor.
The circuit verifies if water level is below the SENSOR - 2A and
if so turns on the pump and the solenoid valve 1. When the water
reaches SENSOR 2-A the pump and the valve 1 are turned off.
The ICs used are one 4093 and one 4013. The 4013 have two type
D positive edge triggered flip-flops and the 4093 four NAND Schmitt
trigger gates.
If the tray was empty or water level was below both sensors when
the circuit is turned on, U1C and U1D NAND gate outputs will be
at High level. This high state at U1C output is applied in a resistor-capacitor-diode
network (R5, C1 and D1) which generates a negative going edge pulse
to U2A flip-flop Set pin. As described in the above text, with
this applied pulse the U2B Q output goes to High level. This high
level is applied by means of D7, R12 network to transistor Q2 base
closing RL2 contacts turning the pump ON, and by D6, R9 network
to transistor Q1 base closing RL1 contacts turning the valve 1
on.
Also U2B Q output is connected to a resistor-capacitor-diode (TP2,
C4 and D4) network. This network is the adjustable timer.
When a voltage is applied to series resistor-capacitor network
the capacitor charge exponentially; it means that the voltage at
its terminals increase exponentially with the time. The resistor
value (in Ohms), times the capacitance value (in Farads), equals
the RC time constant (in seconds).
The time required to the voltage at the capacitor terminals reach
the applied voltage is 5 RC time constants. For example, suppose
that the adjustable resistor TP2 was set at the middle value: 160kΩ.
The capacitor C4 value is 220μF meaning that the RC time constant
will be: 160 000 Ω * 0.00022 F = 35.2 seconds, so the
needed time for the capacitor voltage reach the applied voltage
will be 5 * 35.2 = 176 seconds (2 min. and 56 sec.).
Looking the scheme, the capacitor voltage is applied to U2B RESET
pin by D3.
When the voltage at its terminal reaches 12 Volts (the voltage
from U2B Q output) the U2B Q output will go to low level turning
the pump and valve 1 off. The D4 diode connected in parallel with
TP2 serve to quickly discharge C4.
By the time water reaches the second sensor, U1D output goes Low
and the network composed by R6, C2 and D2 generates a clock pulse
to U2B flip-flop. Because the D input is connected to ground (Low
level) this level is transferred to Q output turning the off the
pump, valve 1 and discharging C4.
If sensor 2 is damaged this clock pulse cannot be generated. In
this case when the voltage on the timer capacitor reaches the power
source voltage the U2B the flip flop will be restarted: the Q output
will go low turning off the pump, valve 1 and discharging C4.
As described later, the circuit features manual reset and manual
control of the pump and valves. It was made by using two pushbuttons
type keys:
- S2 switch is the manual reset: when pushed a High level is
applied to U2B reset pin restarting the flip-flop: Q output goes
low turning off the pump, the valve 1 and discharging the capacitor
timer.
- S4 switch is the pump manual control: when pushed a High level
is applied by means of D7, R11 to transistor Q2 base turning
on the pump and by R8 to the transistor Q1 base turning on the
solenoid valve 1.
As can be seen on the scheme the diodes D15, D5 from U2A, U2B
and diodes D10, D7 from S5, S4 are connected to a point named EXPANSION
POINT. If the user wants assemble more units controlling the same
pump all the circuits must be connected on this point as
described below:
- A diode (anode terminal) should be connected on the flip-flop
Q output to the EXPANSION POINT (cathode terminal).
- A diode (anode terminal) should de connected on the PUMP AND
VALVE MANUAL CONTROL to the EXPANSION POINT (cathode terminal).
The scheme show the two circuits connected as described.
Assembling:
This circuit can be assembled on a universal prototyping circuit
board, with a wire-wrap technique, or in a PCB designed for it.
For beginners, the first manner is the most easily done because
the components can be arranged as desired. Suggestion: Simply distribute
the components on universal board in similar manner that showed
on scheme.

Prototype Circuit Board |
Begin by putting the ICs sockets in the board and soldering them.
After that, put the diodes and transistors. When you are soldering
diodes and transistors do this quickly or the excessive heat can
damage them!
At last, add the resistors and capacitors. Cut the excessive leads after soldering
components. They help to dissipate excessive heat. The next step
is making the connections with wire. The best wire is the wire
designed for wire wrapping assemblies.
Removing the wire isolation cap of this wire type is very easy:
just rest the solder iron to melt it. Wrap few turns in the leads
before soldering assure a best contact and, prevents that the wires
from coming loose when soldering. Verify if the appearances of
all solders are brilliant. If some are opaque or rough, it indicates
a cold soldering, and may cause bad contact. Remove this whit a
dessoldering pump and solder again. Make the wires to the sensors
the more short possible. This prevents false triggering by electrical
noise.
Brushes of electrical motors, wall interrupters and relays contacts
generate electrical noise. If your greenhouse is near of industries
with electrical engines, you must enclose the circuit on a metal
box.

Pump |

Valve |
Assembling the sensors
The sensors are simply to make: Two screws (per sensor) disposed
horizontally side by side and separated 5 mm or less compose them.
The screws may be rust-less type, but it will not be possible to
solder the wire on them, so wire terminals should be used. Solder
the wire on the terminal and fix it on the screw sensor between
two nuts. The sensors can be fixed directly on the tray or in a
small rectangular piece of an insulating material like Plexiglas.
It allows adjusting the water levels at your choice by only moving
the sensors height. If you decide put it directly on the tray,
use silicon rubber glue covering the nuts on the outer side of
sensors to avoid water leakage. If your trays are metal or made
of other conductive material, you must insulate this material between
the screws and the tray.
You can assemble the power source in the same PCB or in other
PCB. It is not critical.
Calibration and use:
When
you turn on the circuit with the water level below both sensors,
the pump automatically goes on, but if no you can press the manual
start button or fill manually by pressing the manual control button.
If the required time to reach the second sensor was greater than
the adjusted on the timer, the pump and valve will go off before
water reaches the second sensor. In this case adjust the timer
for a slightly long time.
Some trials will be need made before to adjust the correct time.
It is desirable adjust the time a bit long more that the time needed
to fill the tray allowing the water turn off first
the pump and valve.
Bill of materials:
Resistors
R1, R3, R10, R11, R14, R16, R23 – 1k Ω
R9, R12, R22 – 2,2k Ω
R8, R13, R21 – 10k Ω
R2, R4, R14, R16 – 27k Ω
R5, R6, R7, R18 – 100k Ω
R7, R19 – 2,2M Ω
TP1, TP2 – 470k Ω Trim-pot
Capacitors
C1, C2, C5, C6 – 100nF
C3, C8 - 100μF/16V electrolytic
C4, C7 - 220μF/16V electrolytic
Diodes
D1 a D17 – 1N4148
LED 1, LED2, LED3 – Red Light Emitter Diodes
Transistors
Q1, Q2, Q3 – 2N2222
Integrated Circuits
U1 – 4093
U2 - 4013
Relays and keys
RL1, RL2, RL3 – Relay single pole, one inverter contact
type, 12 A/125 V (FRS10C-S12 or other)
S1 –1 pole 2 positions switch
S2, S3, S4, S5, S6, S7 – Pushbutton normally open
Power supply:
Integrated circuit
U1 – LM7812 Voltage regulator
Semiconductors
D1, D2 – 1N4004
Capacitors
C1 – 100nF
C2 –2200uF/25V electrolytic
F1 – 300mA Fuse
T1 – 8+8V/500 mA (with center tap) Transformer
- The capacitors may be ceramic disc type. The polarized are
electrolytic type.
- All resistors are 1/8W, 5%, unless otherwise noted on scheme.
Miscellaneous:
An metal or plastic box to accommodate the circuit, solder iron,
solder pump, rust-less screws and nuts for sensors, silicon rubber
glue, IC sockets, led supports, fuse support, wire (wire-wrap type),
wire terminals, prototype board (Radio Shack 276-150 or equivalent).
THE CIRCUIT HAS PARTS CONNECTED TO AC POWER
LINE.
BE CAREFULL WHEN HANDLING THE AC POWER LINE.
IT CAN BE HAZARDOUS TO
YOUR HEALTH!!
|