Turbidity/Coloury meter

Introduction

What is turbidity?

Turbidity is an optical characteristic or property of a liquid, which in general terms describes the clarity, or haziness of the liquid.Turbidity is the measure of the amount of un-dissolved suspended particles that present in liquid, which are generally invisible to naked eye.The turbidity meter is used to measure amount of un- dissolved particles suspended in liquid.

Mini project turbidity meter is also a PIC micro controller project. Two RGB LEDs are lighted with a certain time delay given by the PIC micro controller. ADC of a PIC micro controller is used to obtain the function. Two RGB LEDs are used as the light source and photo diode is used as the detector.One RGB LED is direct with the photo diode and other in 90 degree angle with photo diode.

Concept

UntitledDue to the un-dissolved particles suspended in water, the light is shine through the sample, not all of the light will pass straight through the sample.The light will reflected off of the suspended particle and some of the light will exit at a right angle to the direction of entry into the sample.
Photo diode detect the intensities of transmitted and reflected light.

eqnd

Design

Block diagram of circuit

Block diagram of circuit

First I designed the hard ware part. When designing hardware first I draw the schematic diagram and then draw layout using Orcad. Mainly there was four parts in the circuit.

  • Power supply unit
  • Light source
  • Detecting part
  • Serial data transmission part

Power supply unit

Here it needed five voltages +15 V, -15 V, +10 V, +5 V and ground line. Why all these voltages are needed is , the photo diode used is operating at its revers voltage is in 10 v and TL084 IC needed +15 V and -15 V as it’s +vcc and -vcc. To produce 5 V and 10 V I used LM7805 and LM7810 regulators respectively.

Light source

Two RGB LED s are used as light source.They are common anode type and to light red colour it needs 50 mA and for green and blue it needs 30 mA. Here I used current drivers “LM 317” to drive these two currents.

Detecting part

I used photo diode as detector which produce a very small voltage when it detect a photons. Photo diode is connected to TL084 IC with reverse bias and negative feedback. Then the output become negative. Therefore he output must be connected to Pic through another inverting type amplifier. The gain of the amplifier must nearly 20. I set it by using 1 Kilo ohms and variable resistor. The varying resistance is consisted of 15 Kilo ohm fixed resistance and 10 Kilo ohms variable resistance.

Serial data transmission part

Serial port of the computer is connected to the PIC micro controller through MAX 232 IC. Here pin number 12 and 11 in MAX 232 IC are connected with PIC micro controllers RX (for receive data) and TX (for transmit data) respectively. The detected values of the photo diode are transmitted to the computer using serial port. The detected values are read using the terminal programmer. Finally these data can be import to MATLAB software and can be analyze how turbidity of a liquid varying with different colours.

Used Methods

ADC

Analogue to digital conversion is used to get the intensities of transmitted and reflected light using a photo diode. The photo diode is got an analogue output. When it is transmit to the PIC, this output value must be converted in to digital value. It is done by connecting the output of photo detector with one of the analogue to digital converter (ADC) pin. There are eight analogue to digital converter pins in PIC 16F877A.Five pins are in portA (A0, A1, A2, A3, A4) and three pins are in portE (E0, E1, E2). Only one ADC pin is needed here. Therefore pin A0 in portA is used to process ADC.

References

Appendix

Program listing

The c code for the turbidity/ coloury meter can be download by attachments.

Schematic diagram

The schematic diagrams for power supply and main circuit can be downloaded by attachments.

Component list

 Component  Quantity
 Pic 16F877A  1
 RGB LED  2
 Photo diode  1
 LM 317  2
 LM 7805  2
 LM 7810  1
 2N 7000  2
 330 ohm resistors  8
 24 ohm resistors  1
 40 ohm resistors  1
 560 Kilo ohm resistor  1
 1 kilo ohm resistors  1
 10 Kilo ohm variable resistor  1
 MAX 232  1
 TL 084  1
 D 400 transistors  6
 Serial port connector  1
 Crystal oscillator 4 MHz  1
 20 pF capacitors  2
 1 uF  capacitors  4
 10 uF capacitors  1

Photos

Final circuit

Final circuit

Power supply unit

Power supply unit