Plastic Optical Fiber Sensor Data Acquisition Using ADC0804 and PC Parallel Port
Imam Khambali*, Budhi Priyanto, M. Chasrun Hasani
Department of Electrical Engineering, University of Muhammadiyah Malang, Malang, Indonesia
*Corresponding Author
DOI: https://doi.org/10.51244/IJRSI.2025.12040034
Received: 22 March 2025; Accepted: 29 March 2025; Published: 03 May 2025
The design and manufacture of a solution turbidity tracking device with a plastic optical fiber (POF) sensor system has been carried out. The input of the optical fiber sensor is in the form of red LED light with an input voltage of 5 Volts. The sensor head is dipped in a solution with a certain turbidity so that some light leaks into the solution. The output voltage of the fiber is received by the phototransistor and amplified by the differential gain of the Op-Amp LM 324 of 88.5 times, then converted to digital with the ADC0804 and interfaced to the computer for reading via the LPT port. The test of the equality error between the digital reading results (PC) and analog (Voltmeter) is 0.8%. Sensor testing on aquades solution gives an output voltage value of 3,176 volts. There is a change in the external voltage value when amylum is added to the solution with a concentration of 1g/50ml, which is 3.372 volts.
Keywords: solution turbidity, fiber optic sensor (POF), analog to digital
The measurement of solution turbidity is increasingly important due to increasing pollution and increasing public awareness of the importance of health. This covers many aspects of life such as drinking water problems, environmental monitoring, and industrial waste management. This problem has many health and socio-economic impacts, so we need the right, reliable and high-precision to continuously track and monitor the turbidity level of solutions such as drinking water.
The optical fiber sensor for water salinity detection that employs the principles of absorption spectroscopy. The sensor uses a broadband light source and spectrometer to detect changes in the optical spectrum of the sensor in the presence of varying concentrations of sodium chloride ions (Nor et al., 2023). A multimode plastic optical fiber coated with carbon nanotubes (CNTs) for detecting different ethanol concentrations in deionized water was developed with a probe integrated with CNTs as the sensing layer (Khalaf et al., 2017).
Optical fiber sensor had been used to detect heavy metals ion because it possess several properties like minute size, remote sensing monitoring, real-time investigation, chemical inertness, non-reactiveness (Kumar Shakya & Singh, 2022). Fiber optic sensor based on evanescent wave absorption was applied to detect heavy metal ions in water environments (Bhavsar et al., 2017). Plastic optical fiber (POF) is used to track heavy metal ions with a ProLamp halogen laser light source and the output spectrum is analyzed with a spectroradiometer (Shaban, 2014), (Ho et al., 2012). The sensor is impractical and expensive because it uses a halogen light source (ProLamp) and the ASD FieldSpec 3 Hi-Res Spectroradiometer is used as a receiver. POF have also been used to track alcohol concentrations in alcoholic beverages using an LED as a light source and a photodiode as a receiver (Morisawa & Muto, 2012a), (Morisawa & Muto, 2012b).
In this paper the author proposes a sensor based on but we use an LED as a light source and a phototransistor as a receiver. As a development the author uses a differential amplifier at the phototransistor output using the IC Op-Amp LM324. The amplification results which are still in the form of analog signals are converted into digital with ADC0804. The digitization results are entered into a PC computer via the LPT parallel port.
System design
In this article, the author has created a design for a data acquisition system used to track the turbidity of a liquid. The design consists of four sequential parts, namely: a POF sensor system, an analog amplifier circuit, an A/D converter circuit ADC0804, and is connected to a PC computer via the LPT port. The block diagram is shown in Figure 1.
Figure 1. Block diagram of the data acquisition system design
POF sensor used in this design is made by Autonics, type FTP-320-10 with a diameter of 1 mm and a core diameter of 0.97 mm (FTP-320-10 – Fiber Optic Units | Autonics (US), n.d.). The selection of this plastic fiber optic is based on reasons of its flexibility and durability. The fiber optic jacket is peeled off with a length of 50 mm using the product’s built-in equipment. The exposed part of this fiber is called the “sensor head”. This part is used to track the turbidity of the solution. Then the POF is arranged by placing the sensor head straight in a black plastic chamber with one end directed to the light source (LED) while the other end is directed to the receiver (phototransistor) as shown in Figure 2.
Figure 2. Schematic diagram of the arrangement of fiber optic sensor equipment used in the experiment
The phototransistor light output because it is weak is amplified by an operational amplifier circuit using a differential amplifier circuit type. This circuit is designed using the IC Op-Amp LM324 which is a type of amplifier with a working voltage of 0-5 volts. The circuit is shown in Figure 3, it can be seen that there is a combination of R1 and R2 to regulate the amplification level. In the amplifier design, the value of R1 is 100 kΩ and R2 is 1 kΩ. By using a mathematical formula such as equation (1), the resulting amplification level is 100 times. The mathematical formulation is as follows
In the design, there are two voltage inputs, namely Vin+ and Vin-, each of which is input from the fiber optic sensor output. The Vin+ pin is for the output voltage from the potentiometer. The potentiometer here is used to determine the threshold voltage that comes out of the optical fiber.
Figure 3. Differential amplifier circuit using LM324
The output voltage after being amplified is still in analog form and then converted to digital using an analog to digital converter circuit. The circuit consists of ADC0804 and multiplexer (74LS157). ADC0804 is an A/D form that has one input channel for analog data conversion with a working voltage of 5 volts. The resolution of ADC0804 has 8 bits, so it can count from 0 to 255. The circuit uses a 5 volt reference voltage, so it will produce a resolution of around 0.019 volts/bit. The output data of ADC0804 is 8 channels from bit-0 to bit-7, so a multiplexer is used to connect to the printer’s LPT Port. The multiplexer in the circuit is used to regulate data that will be processed using a computer. The computer in the designed system functions as a monitoring system for ADC0804 output data. Data is passed to the printer’s LPT channel/Port by utilizing the input address ($379). The LPT port has 4 input data from ADC processing results and a multiplexer for the interface process.
Measurement arrangement
The circuit test is carried out by starting by testing the circuit system for a solution in the form of distilled water, then continuing with a solution that has turbidity. This solution will then function as a fiber optic cladding. Red LED light with a voltage of 5 V is used as the input voltage to the fiber optic sensor. Some of this light will leak through the sensor head and some will be forwarded until it is detected by the photodiode. The voltage entering the photodiode is amplified by an analog amplifier, then the output voltage is converted from analog to digital with an A/D converter. The digitization results are passed through an LPT cable to a PC computer.
The measured accuracy of the system design that has been made shows the level of truth between the readings of the standard tool and the system that has been designed. The results of the accuracy error as shown in Table 1 obtained an accuracy error value of 0.8%, with the calculation of the accuracy error as in the mathematical equation (2).
Table 1. Measurement accuracy results of the measuring instrument and the acquisition system
| Measuring instrument | Measured voltage (volt) | 
| Computer | 1.956 | 
| Avometer (Agilen tipe U1233A) | 1.948 | 
| Accuracy error | 0.8% | 
The measurement of the differential amplifier level of the OP-AMP can be known by looking at the ratio between the voltage difference between the non-inverting and inverting input pins to the output voltage is formulated in equation (3). The measured gain results are shown in Table 2, with a gain value of 88.5 times.
Table 2. Measurement results of the LM324 OP-AMP amplifier system
| Leg/pin | Measured value parameter | 
| Vin+ | 2.585 volt | 
| Vin– | 2.550 volt | 
| Circuit model gain | 100 times | 
| Voltage difference | 0.035 volt | 
| Vout | 3.098 volt | 
| Measurement result gain | 88.5 kali | 
The phototransistor used to sense changes in intensity when physical treatment occurs on the optical fiber provides an output voltage value. The sensor’s output voltage is then amplified using a differential amplifier system so that it can be read by the ADC0804 resolution. Table 3 is the result of data recording using the ADC0804 interface system. In the table, there is an increase in voltage when there is a level of turbidity by the organic compound amylum.
Table 3. Results of sensor system measurements versus changes in solution concentration
| Solution | Output voltage value (volts) | |
| Computer | Voltmeter Agilent U1233A | |
| Water (aquades) | 3.176 | 3.098 | 
| Amylum (1g/50ml) | 3.372 | 3.285 | 
The ADC0804 data acquisition method using LPT Port Printer is nibble, namely gradual data acquisition from 8-bit data. The data is divided into two parts by the 74LS147 multiplexer so that it can be recorded by the LPT input pin ($379). The data is then recombined to form complete data on the computer using utility software. The process of taking data on the computer is shown in Figure 4, the complete data recorded is binary data between 0-255bits. For the data conversion process from binary to voltage using equation (4).
Figure 4. Display of the interface software design
The design of the fiber optic sensor data acquisition system consists of a sensor system, amplifier, A/D ADC0804 and a computer. The results of testing the differential amplifier system using LM324 produced a gain value of 88.5 times. The accuracy error of the ADC0804 interface system and the LPT printer port is 0.8%. There is a change in the voltage value read by the acquisition system when there is a change in the turbidity level in the solution from 3,176 volts (aquades) and 3,372 volts (amylum with 1g/50ml).