You are on page 1of 6

Cairo University Engineering Measurement MDP3610

Faculty of Engineering Year 2023 – 2024


Mechanical Design and Production Department 1st Semester

Water Level Control Lab

Objectives
Recognize water level sensors and switch relays.
Build-up simple industrial control circuit using digital signals.
Develop control code using different software.

1- Control Circuit Components

a) Relays (Contactors)
A relay is a switching device as it works to isolate or change the state of an electric circuit from
one state to another. There is no electrical connection inside the relay between the two circuits.
The link is magnetic and mechanical only. A relay allows switching on and off devices using
control signals.
A relay consists of an electromagnet coil, an armature, a spring and a series of electrical contacts.
The electromagnet coil gets power through a switch or a relay driver and causes the armature to
get connected in order that the load gets the power supply. The armature movement is caused using
a spring. Thus, the relay consists of two separate electrical circuits that are connected to each other
only through a magnetic connection, and the relay is controlled by controlling the switching of the
electromagnet.
The contacts are usually common (COM) – normally open (NO) and normally closed (NC). The
normally closed (NC) contact is connected to the common contact if power is not applied to the
coil. The normally open (NO) contact is opened if power is not applied to the coil. When the coil
is energized, the common contact is connected to the normally open contact, and the normally
closed contact is left floating.

1/6
Typical applications of relays (contactors) include automotive electrical systems, home appliances,
lighting control systems, electric motor controllers, tools and machines, air-conditioning and
heating systems, ...

b) Solenoid valves
A solenoid valve is employed to control the flow of liquid or gas which as a result, eliminates the
need for an engineer to manually control the valve. Solenoid valves are used to automatically
control the flow of media.
A solenoid valve consists of two basic units: an assembly of the solenoid (the electromagnet), a
plunger (the core), and a valve containing an orifice (opening) in which a disc or plug is positioned
to control the flow of fluid.
The valve is opened or closed by the movement of the magnetic plunger. When the coil is
energized, the plunger is drawn into the solenoid (electromagnet), and flow through the orifice is
allowed. The valve returns automatically to its original position when the current ceases due to the
pressure of spring and flow through the orifice is restricted. The fluid pressure ensures the orifice
tight close.

2/6
c) Water level Sensor Wiring
Capacitive sensors can detect solid or liquid targets without physical contact. The advantage of
capacitive sensors is that they have no moving parts like the sensors based on floats. They are
reliable as they are not sensitive to corrosion like conductive sensors. There is no direct contact
with water. However, Capacitance measurement is more difficult than resistance measurement.
The sensor is made of capacitor plates that are connected to a conditioning circuit which measures
the capacitance. When there is no liquid to approach the sensor, sensor will generate certain static
capacitance because of the capacitor distribution.
When the liquid rises to approach the sensor, the liquid capacitor coupled to the initial static
capacitance so that the terminal capacitance of sensor will increase. The changing capacitance
signal will be input to the integrated circuit that transforms the changing capacitance value into
variation of electric signal. The integrated circuit consists of the signal oscillator, signal
conditioning and amplifier circuits.
XKC Y25 T12V water level sensor is used. The used sensor wiring is shown.

2- System Control Loop


The control loop is illustrated in the given diagram. The minimum and maximum levels of water
in a tank are detected using two capacitive sensors. Their feedback signals are fed to the controller.
Based on the water detected level and programmed logic, two digital control signals are used to
switch two relays that are energized using 12 V DC power supply.

The first relay opens and closes a solenoid valve that drains out water from the tank controls. While
the second relay controls the water feed pump responsible for supplying water to the tank.

3/6
LabView or Arduino codes are programmed to control the tank level and to switch the pump and
valve according to the set conditions. The codes are uploaded to the Arduino controller board.
For the given LabView and Arduino codes, four digital channels are used. Two channels are used
as digital inputs DI (channels 2 and 4) which receive the signals from the low-level and high-level
water sensors respectively. In addition, 2 digital channels are defined as digital outputs DO
(channels 6 and 8) which send the signals to the relays which control the valve and pump
respectively.

4/6
5/6
3- Experiment Procedure
1- Build the water level system experiment setup.
2- Wire all the power and control signals.
3- Upload the code to the Arduino board.
4- Run the system and observe its function.
5- Change the code logic and introduce disturbance to the water level. Check the system behavior.
6- Determine the specifications of the pump, valve, relays power supply, and controller that have
been used to build the setup.
7- Submit a group technical report for the experiment. [objective, experiment setup picture and
explanation, results plots, data analysis, discussion]

6/6

You might also like