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.

Food Quality, Foreign Object, Infrared Sensor Module, Non-destructive testing, PIC16F877A

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now

1. Introduction:

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.Further more 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.

2. Scheme

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 microcontroller
output 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 a
foreign 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

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.

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 i.e.by
setting OSCCONbits .IRCF0 = 1.

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.

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


1. Automatic Color
Sorting Machine Using TCS230 Color Sensor And PIC Microcontroller Kunhimohammed
C. K, Muhammed Saifudeen K. K, Sahna S, Gokul M. S and Shaeez Usman Abdulla
Dept. of Applied Electronics and Instrumentation M.E.S. College of Engineering,
Kuttipuram, Kerala, India.

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.

5.Non-invasive analytical technology for the detection of
contamination, adulteration, and authenticity of meat, poultry, and fish: A
review Mohammed Kamruzzamanab Yoshio Makinoa Seiichi Oshitaa, 1 January 2015










Post Author: admin


I'm Irvin!

Would you like to get a custom essay? How about receiving a customized one?

Check it out