Pages

Design of Microcontroller Based Water Level and Temperature Controller

 Introduction of the Project

In this project we will learnt how to design a Microcontroller Based Water Level and Temperature Controller for the use in various application. The designed controller will first of all monitor two parameters which are water level & Temperature and then controls these two parameters in comparison to set point given to controller. The WLC (Water Level Control) is a controller based on some electronics components which is used to measure water levels in a reservoir by using some sort of sensor or water level detector and then actuate the motor & valves or water pump to achieve the desired level. The use of WLC is very common in industry and also in everyday life because it simple and easy to maintain. The equipment for control system or controller is the instrument used for controlling the quantities like variables or parameters a certain range. In the industry we can say that the effect of various control devices together in any production process is terms as process control system.

The equipment which forms the control system to achieve certain goal is termed as process control instrumentation. This controller will have local display in field and the measured results will be transferred/ communicated to a remote personal computer located in other laboratory or workplace.  The project work will be consisting of hardware and software design, designing the PCB, soldering of components, testing of project and data acquisition. The Controller will be configured in such a way that it will be using two sensors, which are ultrasonic sensor to detect water level and the second sensor is a thermocouple sensor which will detect the temperature of water. In this control system we will use a water pump which will be required to flow water from water reservoir to our tank under consideration and a heater which will be used to heat the water in tank. There will some switches included in the project for the input purposes like to feed the desire set points for level and temperature of the tank.

 

Microcontroller:

 

The Microcontrollers are equipment belongs to computer system family have to perform some functions as a chip i.e. IC (Integrated Circuit). The function means some useful work like receive input signals, process the information and give appropriate output signal as per program loaded into it. Therefore we can say that a microcontroller is a digital device having input , output and control through a program burned in it. However the speed of data processing on the microcontroller is lower as compared to a PC. In PC the speed of microprocessors is in the order of GHz, while the speed operations of microcontroller in order of a few MHz.

 

PID Controller:

 

The PID (proportional integral derivative) control algorithm is used in this project. The PID controller output value depends on the errors which is the difference of reference value and the actual value. If negative error means that the actual value is greater than the reference value. The error will be zero when both actual value and reference value are equal. The PID controller’s duty is adjust the output signal so that the error is almost zero. The use of Proportional control of PID will be used for convergence of the output signal by seeking the error. The proportional part cannot do this job alone; therefore other two parts integral and derivative also help the whole control to achieve the goal. The function of integral control is to reduce the steady state error. The Derivative part of PID controller works for rate of changes of the error to reduce the effect of overshoot or over response.

 

Water Pump:

 

In this project the Pump is used to adjust the water level, the speed of the pump is control using PID controller in the microcontroller. The level of the water is measured and pump is turned ON with suitable speed.

 

Ultrasonic Level Transducer:

 

Sensor or transducer is equipment used to convert one physical quantity into an electrical signal which is then read and analyzed for some purposes. In this project we have used the Ultrasonic sensor which operates generates sound wave. The reflection of sound waves is used to detect any object in the path of sound waves. The working frequency of sound waves can be 40 kHz to 400 kHz. The ultrasonic sensors are composed of two parts the transmitter and the receiver. A piezoelectric crystal is mechanically connected to a vibrating diaphragm to produce sounds.

 

One wired Temperature Sensor:

 

To measure the temperature of water in tank, we have used a digital temperature sensor “DS1820” which has built-in an ADC (Analog to Digital Converter) having 12 bit resolution. It means that the analog temperature will be measured by this sensor and it will be converted in it the digital output will be available in form of serial bytes to read by microcontroller. The output format of DS18b20 is 2 bytes or 16 bits along with a sign bits (S) to indicate the sign of the temperature. The output of DS18b20 sensor is digital data to communicate with the microcontroller.  The DS18b20 sensor gives its output on a single lead i.e. 1-wire communication interface.

 

Heater:

 

To heat the water in the tanks we proposed to use a 220V 1kW heater along with SCR to control the power of heater. The phase angle of or firing angle of the SCR will be controller by microcontroller through use of PWM and phase detection circuitry. The detection of phase of AC 220V is necessary to properly control the power of heater otherwise heater will be operating non-consistently. At zero-crossing the pulses will be fired to SCR depending upon the error the duty cycle of the pulse will be changed in microcontroller by PID controller algorithm.

The working algorithm of Controller is described in the figure below.


Block Diagram of Water Temperature Controller
Block Diagram of Water Level and Temperature Controller based on Microcontroller

The Water Level and Temperature Controller based on Microcontroller is consisting of following parts:


1.     Measurement of Input signals, Level and Temperature of the water.

2.     Conversion of signals in proper format

3.     PID controller tuning to achieve the set point

4.     Adjustment of output

5.     Display of measurement results on local LCD

6.     Transmission of result to remote areas using RS485 serial communication protocols.


Keywords: Arduino Microcontroller, One wire sensor, Temperature sensor, Digital Sensor, Ultrasonic Sensor, Thermocouple Sensor, ADC, Built-in ADC Sensor, Water Pump, Control Valve, PID Controller, PID Implementation in Microcontroller, Heater

No comments:

Post a Comment

Please ask if you have any question regarding the programming of MCU, or have any problem in development of your electronics project. microcontroller51.blogspot.com