Non-destructive Method of Foreign Object Detection in Food Products

About this sample

About this sample


3 pages /

1416 words

Downloads: 147

3 pages /

1416 words

Downloads: 147

downloadDownload printPrint

Table of contents

  1. Abstract
  2. Introduction
  3. Scheme
  4. Prototype Design Parameters
    Infrared Sensing Circuit
  5. Penetration Depth and Penetration Power
  6. Interfacing PIC16F18877 to the Infrared Sensing Circuit
  7. Identification
  8. Circuit Description
  9. Simulation of the PIC Interfacing With IR Module
  10. Software simulation
  11. Results and Conclusion
  12. Future Work
  13. References


Millions of tons of food are processed and packaged by individuals and machines. As such, the possibility exists that food manufacturers and the suppliers will not catch every object that does not belong in the product. When a person consumes a food that has a foreign object in it, he or she may suffer a physical or emotional injury. This paper describes a working prototype that non-destructively identifies the presence of foreign object in food products. The infrared sensor module consists of a source and detector which will detect the presence of foreign object and thereby sends the signal to the PIC16F877A microcontroller which thereby indicates the defective edible and non-defective and edible food products using LED indications.

'Why Violent Video Games Shouldn't Be Banned'?


The production of safe foods for consumption is not very easy nowadays due to the ever increasing food demands and is greatly prone to the contamination from the external environment. So, there are chances for presence of one or more foreign objects in food. These foreign objects may be hazardous to the consumers or even fatal; hence food quality control is essential. In earlier days, mechanical separation methods were used to separate foreign objects from food. However, there is still no proper technology for food quality control.

This paper thereby introduces a non-destructive detecting module to overcome the difficulties being faced in the food quality processing using infrared principle. A review says that, when nearly eight lakhs food products were scanned, more than three thousand products has metallic contaminations in them either in the form of strips or wires and metal balls and hairclips of varying sizes usually in the range of millimeter [1].Furthermore presence of living organisms which may be undesirable in the food, detroit the quality of food. Thus, to assure food quality a cost effective method is necessary.

Most commonly used technique for detecting foreign bodies in food is by generation of ultrasonic waves. These waves get partially reflected on the surface of foreign body. But the major drawback of this technique is that it works well only in acoustic medium mainly water. Hence, this technique is largely suitable for fruits and vegetables only, due to the moisture content present on their surface [2].

However, ultrasound works well for sponge and wood. But it needs a correlation with infrared for cardboard and paper like substance [3]. Moreover, environmental factors create a hindrance to ultrasonic waves by changing its velocity adapting to the surroundings [4]. Hence, foreign object detection using infrared radiations proves to be more efficient and economical.


Prototype Design Parameters

The proposed system is designed for non-destructive foreign object detection in food products. The prototype consists of a PIC microcontroller and an infrared sensing circuit which is a combination of photodiode and LED. Following the interfacing of the sensor with the PIC microcontroller, some more additional functions can be performed by enhancing the microcontroller operation for its effective functioning in determination of the defective and non-defective food products. This prototype design can be used in the industries for quality assessment of their end products.

Infrared Sensing Circuit

An infrared sensing circuit consists of an infrared source and an infrared detector. The source is basically a LED which provides the required infrared radiations. These radiations then reflect and fall on the detector, which is basically a photodiode. Depending upon the amount the radiations it provides a threshold value to the microcontroller circuit. This threshold value differs for defective and non-defective products, which is due to the presence of foreign object in the defective food products.

Penetration Depth and Penetration Power

The IR sensors are placed at regular intervals on either sides of the sample to avoid missing any part of the sample during analysis. The penetration depth of IR was found to be 1 to 4mm and is suitable for foreign object detection. To achieve deeper penetration, we use a near-infrared light ranging from 750-800nm which results in a higher penetration power.

Interfacing PIC16F18877 to the Infrared Sensing Circuit

The output from the IR sensor module is connected to (pin number 2) RA0 of the PIC16F877A which allows PORTB to be configured as input with TRISB registers, and the output which will be displayed on LED is connected to RD7, RD6, RD5 (pin number 30,29,28) (PORTD) respectively and RB0(pin number 33) and RB1(pin number 34) (PORTB) which are defined as output pins.


The microcontrolleroutput is displayed in the following manner. When no foreign object is detected within the given food sample, the LED glows green. When there is presence of aforeign object within the sample, the LED changes color from green to red. A buzzer is also included within this unit and the buzzer goes on when the LED glows red.

Circuit Description

The three pins from the infrared sensing module are connected to the rest of the circuit. Of the two pins one is connected to the input supply of the module and the other to the GND. The third pin from the infrared module is output from the module which acts as the control pin. This output from the module is connected via the control pin as the sensor input to the PIC16F877A microcontroller.

The control output from the infrared sensing circuit is connected to RA0 (pin number 2) of a PIC16F877A microcontroller and the microcontroller will regard it as digital input to read either 1 or 0.The microcontroller can read only voltages as input (either High or low) by configuring input pins as digital to read 1 or 0 from the sensor. Since the output from the module is digital we can disregard the use of ADC within the microcontroller by configuring ADCON0bits to 0.ADON = 0. This output from the IR sensing module, will make the PIC16F877A to respond by a glowing led. Unstable results may be obtained at the default, 1 MHZ oscillator hence the microcontroller is tuned to 8MHZ and thus solving the problem, In PIC16F877A the 8MHz frequency is obtained by configuring the OSCCON bit settings setting OSCCONbits. IRCF0 = 1.

Simulation of the PIC Interfacing With IR Module

The non-defective product will be prestored as 1 in the microcontroller. So, this prestored value will be compared to the input obtained at the microcontroller and accordingly the LED will glow indicating the product quality. If the input at the microcontroller is 1 then the green LED will glow or else the red LED will glow and also a buzzer will sound indicating the defective product.

Software simulation

Proteus is the software is used for circuit and PCB designing. A simple software simulation of the hardware circuit was made. It’s a very simple circuit which uses comparator and giving indications in the form of LED. When the potential on the LDR was LOW then the LED was observed to be in the OFF state and on increase in the potential then the LED turned ON. Interfacing this IR module with PIC microcontroller and programming the controller and the port configuration was configured in the MPLAB IDE in Embedded C.

Results and Conclusion

The non-destructive module for foreign object detection taking into account ten food products was tested. The penetrating depth and power for these products were determined; accordingly the initial threshold values were being set in the microcontroller. And thus the defective products were being identified with LED indications due to the difference in the potential values obtained.

Get a custom paper now from our expert writers.

Future Work

This project can be extended with a conveyor belt system operated by a stepper motor. The belt system carries the food products and to this system the infrared sensing circuitry with the microcontroller can be attached. After the detection of foreign object presence the food products can be collected separately to be discarded.


  1. The Risk Analysis of Metallic Foreign Bodies in Food Products by Joanna Trafialek, Slywia Kaczmarek, Wojciech Kolanowski.
  2. Existing automated foreign body-detection systems in the food industry, De Montfort University, Mechanical and manufacturing engineering, The Gateway Leicester, le1 9bh, United Kingdom.
  3. Performance comparison of Infrared and Ultrasonic sensors for obstacles of different materials in vehicle/ robot navigation applications Adarsh S1, Mohamed Kaleemuddin S1, Dinesh Bose1, K I Ramachandran21Department of Electronics and Communications Engineering 2Centre for Computational Engineering and Networking (CEN) Amrita School of Engineering, Coimbatore Amrita Vishwa Vidyapeetham, Amrita University, India.
  4. Ultrasonic and Infrared Sensors Performance in a Wireless Obstacle Detection System Baharuddin Mustapha1, Aladin Zayegh1, Rezaul K. Begg21College of Engineering & Science, Victoria University, Australia. 2Institute of Sport, Exercise and Active Living (ISEAL) and College of Sport and Exercise Science (SES), Victoria University, Australia.
Image of Alex Wood
This essay was reviewed by
Alex Wood

Cite this Essay

Non-destructive Method of Foreign Object Detection in Food Products. (2018, July 06). GradesFixer. Retrieved September 28, 2023, from
“Non-destructive Method of Foreign Object Detection in Food Products.” GradesFixer, 06 Jul. 2018,
Non-destructive Method of Foreign Object Detection in Food Products. [online]. Available at: <> [Accessed 28 Sept. 2023].
Non-destructive Method of Foreign Object Detection in Food Products [Internet]. GradesFixer. 2018 Jul 06 [cited 2023 Sept 28]. Available from:
Keep in mind: This sample was shared by another student.
  • 450+ experts on 30 subjects ready to help
  • Custom essay delivered in as few as 3 hours
Write my essay

Still can’t find what you need?

Browse our vast selection of original essay samples, each expertly formatted and styled


Where do you want us to send this sample?

    By clicking “Continue”, you agree to our terms of service and privacy policy.


    Be careful. This essay is not unique

    This essay was donated by a student and is likely to have been used and submitted before

    Download this Sample

    Free samples may contain mistakes and not unique parts


    Sorry, we could not paraphrase this essay. Our professional writers can rewrite it and get you a unique paper.



    Please check your inbox.

    We can write you a custom essay that will follow your exact instructions and meet the deadlines. Let's fix your grades together!


    Get Your
    Personalized Essay in 3 Hours or Less!


    We can help you get a better grade and deliver your task on time!

    • Instructions Followed To The Letter
    • Deadlines Met At Every Stage
    • Unique And Plagiarism Free
    Order your paper now