Petrogasoline purity tester
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Active In SP

Posts: 53
Joined: Nov 2010
16-11-2010, 10:08 PM


1. INTRODUCTION……………..……………………………………………………. 2
2. BLOCK DIAGRAM………………………………………………………………… 4
3. BLOCK DESCRIPTION…….……………………………………………………...5
4. THEORY & PRINCIPLE OF OPERATION…. ………………………………….6
5. CIRCUIT DIAGRAM………..……………………………………………………. 8
6. CIRCUIT DESCRIPTION………………………………………………………... 9
7. HARDWARE DETAILS…….…………………………………………………….11
8. MICROCONTROLLER PROGRAM……………………………………………..19
9. CONCLUSION…………………………………………………………………..
10. REFERENCES………………………………………………………………….


Recent years have witnessed dramatic progress in the design and development of fiber optic sensors as detection of chemical species is important in many industrial and chemical processes in addition to environmental control. Fiber optic sensors offer several advantages over conventional chemical sensing systems, specifically immunity to electromagnetic interference, possibility of distributed sensing over long lengths of fiber and their capability for safe operation in hazardous environments. Fiber optic chemical sensors include refractometric` sensors and evanescent wave absorption sensors, more recently indicator mediated, in which the evanescent field of guided light is absorbed by the chemical of interest.
Adulteration of petroleum products especially petrol and diesel has become a serious problem. Kerosene is the most important domestic fuel for economically weaker sections of society and hence is heavily subsidized. The large differences in the prices of petrol, diesel and kerosene, the easy availability of kerosene and the fact that it is miscible in petrol and diesel, make the unhealthy and unethical practice of adulteration of petrol and diesel. This not only results in less availability of kerosene to the poor, but results in severely damaging automotive engines and increased motor vehicle emissions which are a cause of major concern to environmental pollution.
There have been a number of methods proposed for checking adulteration of petrol and diesel by kerosene such as the filter test, American Standards for Testing Materials (ASTM) distillation, checking properties like density, flash point and viscosity, microprocessor based electronic method using principle of cooling on evaporation, odor based method, ultrasonic techniques, titration techniques, optical techniques, dyeing kerosene and adding chemical markers for kerosene etc. All the above methods suffer from limitations in terms of accuracy and sensitivity in determining adulteration levels.
In this project and implimentation, we propose an intrinsic intensity modulated fiber optic sensor based on the principle of change in refractive index and evanescent wave absorption for detecting adulteration in petrol by kerosene, and trying to demonstrate its suitability. The proposed configuration is simple, safe and versatile and can be employed for on-site road measurements.


Source: LED is used as the fiber optic source since it requires less complex drive circuitry than laser diodes.

Optical fiber: Optical fiber consists of core & cladding in which refractive index of core is greater than that of cladding. Here we used a fiber in which the cladding is removed. This forms the sensor head. As the length of the fiber increases the sensitivity of the instrument also increases.

Photo detector: Converts the optical power from the channel into electrical form. Here phototransistor is used for this purpose.

Amplifier: Amplifies the photo detector output in order to drive the ADC.

ADC: Analog to digital converters are the most widely used devices for data acquisition. We need an analog to digital converter to translate the analog signals into digital data so that the microcontroller can read them. A widely used ADC chip is ADC0804.

Microcontroller: A single chip microcomputer is called a microcontroller. It contains the CPU, ROM/EPROM, RAM, I/O Ports, timer, counters, decoder, interrupts etc. Examples of single chip microcomputers are Intel 8048, 8051 and 8096 series, Motorola’s M6801 series, Texas instrument TMS 1000, Atmel 89C51, 89C52 and Zilog Z-80.

LCD Display: LCD module is used for displaying the percentage of adulterant in petrol. The liquid crystals are one of the most fascinating materials in nature, having properties of liquid as well as solid crystal. LCD’s do not emit or generate light, but rather alter externally generated illumination.


Light is guided inside an optical fiber through the principle of total internal reflection. If the cladding of an optical fiber is removed over a small length of the fiber and is surrounded by a medium whose refractive index changes with some physical or chemical parameter, it results in variation of the output power. The output power varies due to variation in the numerical aperture (NA) of the sensing region. Thus, one can measure the refractive index of the surrounding medium and hence, the physical or chemical parameter affecting it, by monitoring the output power. This principle forms the basis of fiber optic refractometry.
When light is reflected at the boundary of a denser and a rarer optical medium, the field associated with the wave extends beyond the interface in the cladding region. This field has an amplitude which decreases exponentially with increasing distance from the boundary and is referred to as an evanescent field. When this field interacts with an absorbing cladding, it results in attenuation of the power of the propagating wave. If Po is the power transmitted by the fiber in the absence of an absorbing species, then the power transmitted in the presence of an absorbing medium is given by
P(z) = Po exp(-γz) (1)
where z is the distance along the unclad length and γ is the evanescent absorption coefficient of the medium. The evanescent absorbance A of an unclad fiber of length L surrounded by a fluid of evanescent absorption coefficient γ is given by
A = log10 [Po/P(z)] = γL / 2.303 (2)
For a fluid obeying the Lambert–Beer law of absorption
(where the bulk absorption coefficient is directly proportional to concentration), Eq. (2) predicts that evanescent absorbance depends linearly on both exposed fiber length L and fluid concentration.
Hence, the sensitivity of a sensor based on the above principle can be increased by increasing the length of the exposed region of the core which forms the sensor head and by increasing the depth of penetration of the evanescent field inside the absorbing medium.
Variation of refractive index of petrol with percentage concentration of kerosene.

The variation in the refractive index of petrol with

The variation in refractive index of petrol with the increase in the percentage of adulteration by kerosene is as shown. From the figure it is evident that the refractive index increases with increase in adulteration by kerosene. The refractive index of the solution with 50% concentration of kerosene was measured to be 1.433, which is less than that of the core of the fiber.
The refractive index of petrol at different levels of adulteration will make a drastic decrease in output power as the condition of total internal reflection gets violated.



The system consists of an input section, phototransistor, amplifier section, ADC, microcontroller, LCD module and a power supply unit.
Input section: This section comprises of an LED source and an optical fiber in which the cladding is removed. This acts as the sensor head. When the Petrol which contains kerosene as the adulterant is in contact with the clad less fiber, the adulterated fuel acts as the cladding and the intensity of light which propagates through the fiber varies with the percentage of kerosene concentration.
Phototransistor: An NPN phototransistor together with a 220K resistor is used for photo detection. The variation of light intensity is converted into electrical current by the phototransistor. The phototransistor is shunted with a 220K resistor and the output current through the resistor develops a voltage which is proportional to the phototransistor output and thus to the light intensity variation.
Amplifier: The voltage developed across the resistor is amplified in order to drive the ADC section. For this an LM358 op-amp is used. It works in the non-inverting mode and works with +5 V.
ADC: The amplified voltage is given as the ADC input. ADC converts the analog variation into digital data so that the microcontroller can read them. Here ADC 0804 chip is used. The ADC 0804 IC is an analog to digital converter in the family of ADC 800 series from National Semiconductor. It works with +5 V and has a resolution of 8 bits.
Microcontroller: The digital output from ADC is given to the input ports of the microcontroller. The digital output is converted to its corresponding ASCII by using the program in the flash programmable memory of the microcontroller and the LCD display module connected to the output ports of the controller displays the corresponding output. Atmel 89C51 microcontroller is used here.
Power Supply unit: All components in the circuit require a +5 V dc. For that a 12-0-12V/1 Amp transformer is connected to the main supply. The secondary side of the transformer is connected to a centre tap full wave rectifier section to convert the 12 V ac into 12 V dc. A capacitor of 1000 mF/25 V is used for filtering purpose and is fed to the input of the 7805 regulator IC for getting a constant output voltage of +5 V dc. A capacitor of 470 mF/25 V.


7.1. Microcontroller : - IC ATMEL 89C51

The microcontroller used here is Atmel’s 89C51. The AT89C51 is a low power, high-performance CMOS 8-bit microcomputer with 4 Kbytes of Flash Electrically Programmable and Erasable Read Only Memory (EEPROM). The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry standard MCS-51Ô instruction set and pin out. The on-chip flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. The Atmel AT89C51 is a powerful microcomputer which provides a highly flexible and cost effective solution to many embedded control applications. (The AT89C51 provides the following standard features: 4 Kbytes of Flash, 128 bytes of RAM, 32 I/O lines, two 16-bit timer/counters, five vector two-level interrupt architecture, a full duplex serial port, ON-chip oscillator and clock circuitry.

Figure. Pin diagram of AT 89C51

Pin Descriptions :-

VCC: Supply voltage.
GND: Ground.
Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1’s are written to port 0 pins, the pins can be used this mode P0 has internal pull-ups. Port 0 also receives the code bytes during Flash as high-impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In programming, and outputs the code bytes during program verification. External pull-ups are required during program verification.
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during Flash programming and program verification.
Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can sink/source four TTL inputs. When 1’s are written to Port 2 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data, memory that uses 16-bit addresses (MOVX@ DPTR). In this application, it uses strong internal pull-ups when emitting 1’s. During accesses to external data, memory that uses 8-bit addresses (MOVX @ RI); Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the high-order address bits and some control signals during Flash programming and verification.
Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1’s are written to Port 3 pins they are pulled high by the internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull-ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

Port Pin
Alternate Functions
RXD (serial input port)
TXD (serial output port)
INT0 (external interrupt 0)
INT1 (external interrupt 1)
T0 (timer 0 external input)
T1 (timer 1 external input)
WR (external data memory write strobe)
RD (external data memory read strobe)
Table. Port description
Port 3 also receives some control signals for Flash programming and programming verification.
RST: Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device.
ALE/PROG: Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse Input (PROG) during flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external execution mode.
PSEN: Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.
EA/VPP: External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2: Output from the inverting oscillator amplifier.
CRYSTAL: The crystal l (XTL1) used here is of 11.059MHz. Here the crystal is used for internal clock timing. The two terminals of the crystals are connected across pin 19(X1) and pin 18(X2) Crystal oscillator must be designed to provide a load Capacitance on the crystal as specified by the manufacturer. This requirement is necessary to obtain oscillation at the specified frequency. It is also important that the power fed to the crystal be held to the specified maximum. Typical maximum drive levels for plated crystals range from 2mW to10mW.

7.2. Analog to Digital Converter :- IC ADC 0804

Figure. Pin diagram of ADC0804

Pin Descriptions :-

CS: Chip select is an active low input used to activate the ADC 0804 chip. To access the ADC 0804, this pin must be low.
RD: Read is an active low input signal. It is used to get the converted data out of the ADC 0804 chip. The RD pin is also referred to as output enable.
WR: Write is an active low input signal. It is used to inform the ADC to start the conversion process. It is also referred to as SOC (Start of Conversion).
CLK IN and CLK R: CLK IN is an input pin connected to an external clock source when an external clock is used for timing. To use the internal clock generator the CLK IN and CLK R pins are connected to a capacitor and a resistor. In that case the clock frequency is determined by the equation:
f = 1 / 1.1RC.
INTR: Interrupt is an active low output pin. It is normally a high pin and when the conversion is finished, it goes low to signal the CPU that the converted data is ready to be picked up. It is also referred to as EOC (End of Conversion).
Vin(+) and Vin(-): These are the differential analog inputs where Vin = Vin(+)-Vin(-). Often the Vin (-) pin is connected to ground and the Vin (+) pin is used to connect the analog input.
Vref/2: This is an input voltage used for the reference voltage. If this pin is open, the analog input for ADC is in the range of 0-5 V. Vref/2 is used to implement the analog input voltage other than 0-5 V.
D0-D7: These are the digital data output pins, where D7 is the MSB and D0 is the LSB. These are tristate buffered and the converted data is accessed only when CS = 0 and RD is forced low.
AGND and DGND: Analog ground and digital ground are the input pins providing the ground for both the analog and digital signal. Analog ground is connected to the ground of analog Vin while digital ground is connected to the ground of Vcc pin. The two ground pins is used to isolate the analog Vin signal from transient voltages caused by digital switching of the output. Such isolation increases the accuracy of the digital output.

7.3. Operational Amplifier :- IC LM 358

Figure. Pin diagram of LM358

General Description :-
These devices consist of two independent, high-gain, frequency-compensated operational amplifiers designed to operate from a single supply over a wide range of voltages. Operation from split supplies also is possible if the difference between the two supplies is 3 V to 32 V (3 V to 26 V for the LM2904), and VCC is at least 1.5 V more positive than the input common-mode voltage. The low supply-current drain is independent of the magnitude of the supply voltage.
Applications include transducer amplifiers, dc amplification blocks, and all the conventional operational amplifier circuits that now can be implemented more easily in single-supply-voltage systems. For example, these devices can be operated directly from the standard 5-V supply used in digital systems and easily can provide the required interface electronics without additional ±5V supplies.

7.4. LCD Module
LCD module is used for displaying message that send from remote location. The liquid crystals are one of the most fascinating materials systems in nature, having properties of liquid as well as solid crystal. LCD’s do not emit or generate light, but rather alter externally generated illumination. Their ability to modulate light when electrical signal is applied has made them very useful in flat panel display technology. The crystal is made up of organic molecules, which are rod like In shape with a length of ~ 20 A – 100 A., the different arrangements of this rod like molecules led to three main categories of liquid crystals.
 Smectic
 Nematic
 Cholestric
There are two types of LCD’s according to the theory operation
 Dynamic scattering
 Field effect
• Less power consumption
• Low cost
• Uniform brightness with good contrast
• Low operating voltage and current
• Poor reliability
• Limited temperature range
• Slow speed
LCD panel used here has 15 pins (8-data line, 3-control line and a contrast line). Data line and control line are connected to microcontroller. Contrast line is connected to a voltage divider using preset (R9). Contrast can vary by this preset.


We proposed an intrinsic intensity modulated fibre optic sensor based on the principle of evanescent wave absorption and change in refractive index for detecting adulteration in petrol by kerosene. The proposed sensor would be useful in automotive and petrochemical industries due to its simple design, safety with inflammable fuels, sensitivity and the fact that it can be made into a portable device for on-road measurements.


3. Optical Fiber Communications: Gerd Keiser
4. Kenneth J Ayala,” 8051 Programming and application”

.doc   Petrogasoline Purity Tester….doc (Size: 131 KB / Downloads: 67)

Important Note..!

If you are not satisfied with above reply ,..Please


So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Tagged Pages: petrol purity electronic tester, fuel purity tester, petrogasoline purity tester, ppt on petrogasoline purity tester, contact purety co jp loc es, petrol purity and refractive index, how reflective index changes in petrol when kerosene added,
Popular Searches: advantages of ic tester, how to check purity of engine oil, negative refractive index materials, g s f c baroda ammonia purity, seminar information of ic tester, oil purity checking in automobile, pnz 154 phototransistor,

Quick Reply
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  ELECTRONICS COMPONENTS TESTER study tips 0 372 17-04-2013, 04:14 PM
Last Post: study tips
  ELECTRIC STEEL SHEET TESTER MODEL DAC-BHW-5 project girl 0 325 04-02-2013, 10:19 AM
Last Post: project girl
  DIGITAL BASIC IC TESTER REPORT project girl 0 362 23-01-2013, 04:42 PM
Last Post: project girl
  Crystal Tester With BC547 seminar tips 0 329 12-01-2013, 04:28 PM
Last Post: seminar tips
  BIPOLAR transistor TESTER seminar flower 0 503 22-05-2012, 12:41 PM
Last Post: seminar flower
  DIGITAL IC TESTER seminar ideas 0 815 10-05-2012, 01:01 PM
Last Post: seminar ideas