Project by

Ratio controller is a mechanism used where a continuous process is going on and an additive is being put into the flow (e.g., chlorination of water). Ratio control is used to ensure that two or more process variables such as material flow are kept at the same ratio even if they are changing in value. Here a new application for ratio control mechanism was introduced. The proposed system has a reference tank and control tank whose level is to be controlled in such a way that, the ratio between both levels would always remain a constant. It uses a mechanism which multiplies the level of the reference tank with the given ratio to give the setpoint and compares it with the level of the second tank (control tank), which is to be maintained at a constant level. Here pulse width modulation technique was used for maintaining the level in the control tank according to the setpoint. Normally ratio controller uses flow as the measured variable. Here, the measured variable is the level of the liquid in the tank. The platform used here is LabVIEW and interfacing was done using Arduino. The control mechanism used was PID control.


The main techniques used here are:

  • Ratio controller
  • PID control algorithm
  • Pulse Width Modulation (PWM) technique

The main hardware components used in this project are:

  • Ultrasonic sensor (HC-SR04)
  • L293D Motor Driver Circuit
  • Arduino Uno (ATMEGA 328)
  • Submersible DC pump
  • Tank (15x15x25)
  • 12V power supply

The software used is LabVIEW 2014.



It is used for collecting the solutions which are pumped by the DC motor which is fixed inside the solution containing tanks. Two tanks are used in this project which has same dimensions. And one tank is kept has a reference tank and other is kept as control tank.


It uses a PID controller for the controlling action of the system. It uses proportional, integral and derivative action for controlling.

Level sensors

Ultrasonic sensors (HC-SR04) are used for the measurement of level. This has continuous output during measurement time. It has good sensitivity and accuracy which detects even small variations. 


Two DC submersible pumps which has pressure head up to 2m height which is able to pumps water to a good distance, are used. Here pulse width modulation technique is used for controlling the motor speeds.


            A 12v supply is given to DC motor through a motor drive circuit. The motor attached to reference tank start pumping the water to reference tank. Thus the ultrasonic sensors start the sensing when it reaches the set point value the motor will turn OFF automatically. Thus motor attached to control tank start pumping and sensors attached to it will start sensing the levels. The liquid will fill up to predefined ratio values which can be given by the user. LabVIEW is platform used here for monitoring the process and PID controllers is obtained from this platform. The motor speed and level sensing can be viewed and can be controlled from here. 

            For the implementation of the project, it requires two tanks, one reference tank and a control tank. Two source tanks are also placed near to it for pumping the fluid. Two DC submersible pumps are placed inside each source. The system is implemented in such a way that the reference tank level and the ratio can be changed online.  Firstly, the reference tank level is set at a required value and the desired ratio is given. The system needs to control the level in the control tank according to the setpoint, i.e., setpoint is equal to reference level multiplied by the ratio.

            The LINX firmware (used for interfacing Arduino with LabVIEW) is loaded in to the Arduino. Specify the serial port used by the Arduino for loading LINX firmware. Then evoke the process and enter the setpoint values for both reference level and ratio. Now the reference tank gets filled according to the reference level given. When the reference level reaches (sensed by ultrasonic sensors), the pump1, that controls the flow of fluid to the reference tank gets off and switches to the second pump2. Here PID output is used for the pulse width modulation. This PWM is then used to drive the pump2. The pump runs to fill the control tank. An outlet is taken from the control tank to act as a disturbance. When it turns on the fluid in the tank flows out but still the level in control tank can be maintained at the setpoint using PID control.

    • No tags