Project Topics

Engineering Projects

Analysis and Classification of Milk Quality Using Electronic Sensory Organs

Published on Nov 30, 2023


The milk is the dietary fluid secreted by the mammary gland of mammals. The high quality milk should have better density and is free from the adulterants. Milk is most commercially sold commodity both by local vendor’s as well super markets. However in local areas to increase the yield certain adulterants are added which may affect the nutritional quality of milk. Milk adulteration is a social problem. It exists both in the backward and advanced countries. Consumption of adulterated milk causes serious health problems and a great concern to the food industry. The Country milk producers and consumers facing problem to find the quality of milk, accept the fair of price and consumption. So it is necessary to ensure the quality of milk by measuring type and amount of adulterants that are added to the milk. This is performed by using combined electronic sensory instrumental system such as electronic nose (enose), electronic tongue (e-tongue) and PH electrodes.

Complex data sets from the e-nose, e-tongue and pH electrode signals are combined with multivariate statics represents rapid and efficient tools for classification, discrimination, recognition and identification of adulterants as well as the concentration of different compound leads to analyze and ensure the quality of milk. This project is implemented using PIC18F4520 microcontroller. All the sensors are combined to form compact and flexible system which analyze and classify the quality of milk into different grades and finally output displayed on LCD screen. Problem faced in small diaries and by the individuals can be prevented by detecting the quality of milk, and also prevent from causing the hazardous diseases by detecting the adulteration of milk.


Milk is a pale liquid produced by the mammary glands of mammals. It is the primary source of nutrition for infant mammals before they are able to digest other types of food. Earlylactation milk contains colostrums, which carries the mother's antibodies to its young and can reduce the risk of many diseases. The principal constituents of milk constitutes of carbohydrate, fat, protein, vitamins and minerals, enzymes etc. The composition of milk varies considerably with the breed of cow, stage of lactation, feed, season of the year, and many other factors. However, some relationships between constituents are very stable and can be used to indicate whether any tampering with the milk composition has occurred. Milk is an emulsion or colloid of butterfat globules within a water-based fluid that contains dissolved carbohydrates and protein aggregates with minerals. Because it is produced as a food source for the young, all of its contents provide benefits for growth.

The principal requirements are energy (lipids, lactose, and protein), biosynthesis of non-essential amino acids supplied by proteins (essential amino acids and amino groups), essential fatty acids, vitamins and inorganic elements and water. The pH of milk ranges from 6.5 to 6.8 and it changes over time. Milk from other bovines and non-bovine mammals varies in composition, but has a similar pH. Initially milk fat is secreted in the form of a fat globule surrounded by a membrane. Each fat globule is composed almost entirely of triacylglycerols and is surrounded by a membrane consisting of complex lipids such as phospholipids, along with proteins. These act as emulsifiers which keep the individual globules from coalescing and protect the contents of these globules from various enzymes in the fluid portion of the milk.

Although 97–98% of lipids are triacylglycrols, small amounts of di- and monoacylglycerols, free cholesterol and cholesterol esters, free fatty acids, and phospholipids are also present. Unlike protein and carbohydrates, fat composition in milk varies widely in the composition due to genetic, lactation, and nutritional factor difference between different species. Like composition, fat globules vary in size from less than 0.2 to about 15 micrometers in diameter between different species. Diameter may also vary between animals within a species and at different times within a milking of a single animal. In unhomogenized cow's milk, the fat globules have an average diameter of two to four micrometers and with homogenization, average around 0.4 micrometers.

The fat-soluble vitamins A, D, E, and K along with essential fatty acids such as linoleic and linolenic acid are found within the milk fat portion of the milk. Normal bovine milk contains 30–35 grams of protein per liter of which about 80% is arranged in casein micelles. Total proteins in milk represent 3.2% of its composition. The largest structures in the fluid portion of the milk are casein micelles aggregates of several thousand protein molecules with superficial resemblance to a surfactant micelle, bonded with the help of nanometer-scale particles of calcium phosphate. Each casein micelle is roughly spherical and about a tenth of a micrometer across. There are four different types of casein proteins such as αs1-, αs2-, β-, and κ-caseins.

Collectively, they make up around 76–86% of the protein in milk, by weight. Most of the casein proteins are bound into the micelles. There are several competing theories regarding the precise structure of the micelles, but they share one important feature: the outermost layer consists of strands of one type of protein, k-casein, reaching out from the body of the micelle into the surrounding fluid. These kappa-casein molecules all have a negative electrical charge and therefore repel each other, keeping the micelles separated under normal conditions and in a stable colloidal suspension in the waterbased surrounding fluid


The presence of adulterants is determined by the use of electronic devices such as electronic nose (e-nose), electronic tongue (e-tongue) and ph sensor.

 The quality of milk sample is tested by checking the ph level by using the ph sensor. As the milk ph changes during spoilage, the voltage across the electrode varies, shifting the resonant frequency of the sensor.

 Electronic nose is a device intended to detect odors or flavors. It is composed of an array of nonselective sensors which transforms chemical information into an electrical or optical one;

such information then gets to be transformed into digital form suitable for computer processing.

 An electronic tongue is a sensor which measures and compares taste of liquid or solid samples, and it can also be used to identify and recognize specific components in a solution. In this approach, experiments are conducted using an electronic tongue (conductivity) to virtually monitor the quality of milk.

 Temperature sensor is used to measure the temperature of the milk, if the temperature is above or below certain limit it results in bacterial formation and is not fit for consumption.


This project is mainly directed towards monitoring the quality of milk. The monitoring system mainly has four different modules. Using these modules the quality of milk is determined on the standard survey basis. The modules are listed as follows:

1] pH

2] Temperature

3] Odor

4] Taste

1] pH:

As we know, every liquid has its own pH value according to temperature and other dependent parameters. So the milk has pH of range 6.5-6.7, above and below this range it is totally considered as abnormalities in its quality. Here it monitors the pH and provides a visual alert via LCD, which displays the pH level and indicates if it is normal or abnormal, in simple words good quality or bad quality.

2] Temperature:

Milk has its own temperature criteria which should be maintained during storage, even if the milk is mixed with water or with any toxic materials the temperature of the milk will not be in the normal range. Generally milk will be safe at the temperature range of 35-400C above or below which the formation of bacteria occurs and thus not fit for consumption. The survey will be carried out on safe temperature zone according to which the LCD will display the quality of milk.

3] Odor:

The concentration of odor will vary from fresh milk to toxic milk. When the toxicity in milk is high it tends to release toxic gases which come out as bad odor from the milk, when milk is preserved for a very long time or due to external contamination. So it’s necessary to detect the gases releasing out from sample which are nothing but bad odor in general. After any such detection of gases the quality of milk will be displayed on LCD.

4] Taste:

Taste is something which is dependent on the pH of particular substance. Initially, take a fresh milk sample which will have the normal pH value. The taste depends on chemical substances involved in milk and those chemical substances will have its own pH value, but in overall including all the chemical substances which forms fresh milk will have its pH in the range 6.5-6.7. So any toxic material or milk preserved for very long time will literally have additional chemical substances in it, which are not consumable and those toxic contamination formed are developed by addition of toxic materials externally or by long preservation process and will develop different taste or bad taste, so this will be indicated on LCD that how far it is consumable.


The working model consists of following Hardware components,

 PIC18F4520 Microcontroller.

 BNC SL-31 pH sensor.

 pH sensor board.

 DS18B20 Liquid Temperature sensor.

 MQ135 Air Quality Sensor.

 Conductivity Sensor.

 20*4 LCD Display.

 4*4Hex Keypad.

 7805 Voltage Regulator.


The microcontroller used here is PIC18F4520. Programming is done using embedded C. Tool used to write code into PIC microcontroller is MP LAB X IDE. Tool used to flash hex file into PIC microcontroller is PIC KIT 2. For testing PROTUES DESIGN SUIT is used.

Block diagram:

The Fig.1 represents the block diagram of the system; it consists of following parameters to be measured such as temperature, odor, taste, pH. The milk sample is used as source; liquid temperature sensor (DS18B20) is used to measure temperature, air quality sensor is used to sense the odor and pH sensor is used for pH measurements. Microcontroller pic18f4520 is used as embedded processor. Output of the embedded processor is analyzed and classified into corresponding classes and is finally displayed on LCD screen.

Milk Quality


The concepts discussed above were successfully implemented and developed into a working model. The fig.2 shows the final working model of the project. The values obtained from various sensors in the model is analyzed, calibrated, configured and classified into different grades. These grades determine the quality of the milk based on the various parameters. The system indicates the presence of adulterants such as sugar, soap, salt, and H2O2 in the milk. The operation of the system is controlled by hex keypad. The final result is displayed on the LCD screen.

Once the system is set up by placing all the sensors in the glass, following tests are performed for each of the milk samples:

1. Fresh Milk Test In this test it determines the freshness of the milk and indicates whether the sample has to undergo further two tests.

2. Grade Test Depending on the experimental values obtained the samples are analyzed and classified into five grades. It also specifies the quality, taste, and odor of the sample.

3. Adulteration Test This test determines the type of adulterants added to the milk sample i.e. whether the milk consist of sugar, salt, soap, or H2O2.

Milk Quality

Adulterated milk

Based on the pH range for each sample, it is classified as good, normal, abnormal, average and bad; it also indicates whether the sample is acidic, basic and slight basic. The odor is classified as good, average, and bad. Taste is classified as edible and non-edible. The traces of adulterant present in the milk are displayed during the Adulterant test. Considering all the obtained experimental values and their classification, the milk is classified as grade A, B, C, D and E as shown in fig.3.


 In smaller industries available space will be limited, so this digital device for the estimation of the constituents of milk can be used.

 The common sugar present in milk is lactose, table sugar like sucrose is added to the milk to increase the carbohydrate content and thus the density can be increased. So the milk can be adulterated with water which cannot be detected using lactometer. In such case this device can be used to detect the presence and type of adulterants.

 Similarly the soap or salt added with the water in exact proportions the lactometer test fails, even in such situations this model can be used.

 Ease of handling.

 Low initial investment and maintenance cost.

 Since price is minimum it can be easily produced to be used by any small diaries in rural areas.

 Output will be obtained within less response time.

 The power supply unit consumes less power.


 It is not universal that is, it can be used only for the detection of milk quality.

 Calibration is required for at least every 50 tests.

 Depends on requirements of accuracy cost of the sensors will be varied.


 The project proposed is beneficial to the society by giving measure to reduce the adulteration practice in milk.

 This device is used in small diaries for the quality analysis of milk.

 It provides quality assurance for farmers and consumers.

 It can also be used by the normal people, where an individual should know about the quality of milk that he consumes in his daily life.

 It can be used by Milk Traders for Computerized Milk Analysis.

Scope for future work:

 The project proposed is beneficial to the society by giving measure to reduce the adulteration practice in milk.

 This device is used in small diaries for the quality analysis of milk.

 It provides quality assurance for farmers and consumers.

 It can also be used by the normal people, where an individual should know about the quality of milk that he consumes in his daily life.

 It can be used by milk traders for computerized milk analysis.

In future this project can be made more accurate by using pH sensor that is highly sensitive for small variation in pH and by using conductivity sensor that have high precision. The project can also be improved by using odor sensor that is sensitive to particular gases.


Analysis and Classification of Milk Quality Using Electronic Sensory Organs is an automation system and it is recompense over the present fair price shops. Fingerprint authentication uses Minutiae extraction based algorithm, which makes the system more secure and accurate. It eliminates fake ration card holders and protects the interest of the common people ensuring the country's food security. By means of its performance one can reduce the corruption level. Selecting the commodity and quantity through the android app will make the system more smart and robust. It will help the country's economy to reach new heights. The automated PDS is easy to implement and requires much less hard work when compared to the other system. Using this system one can avoid the malpractices because there is no manual operation and also all information is stored in a database. So this system will be really helpful to the people.


[1].Y. G. Lee, H. Y. Wu, C. L. Hsu, C. J. Liang, H. D. Yuan.“A Rapid And Selective Method For Monitoring The Growth Of Coliforms In Milk Using The Combination Of Amperometric Sensor And Reducing Of Methylene Blue,” Sensors And Actuators B: Chemical, Vol. 141, no. 2, 2009, pp. 575-580.

[2].S. Huang, S. Ge, L. He, Q. Cai and C. A. Grimes, “A Remote-Query Sensor For Predictive Indication Of Milk Spoilage,” biosensors and bioelectronics, Vol. 23, no. 11, 2008, pp. 1745- 1748.

[3].H. M. Al-Qadiri, M. Lin, M. A. Al-Holy, A. G. Cavinato and B. A. Rasco, “Monitoring Quality Loss Of Pasteurized Skim Milk Using Visible And Short Wavelength Near-Infrared Spectroscopy And Multivariate Analysis,” Journal of Dairy science, Vol. 91, no. 3, 2008, pp. 950- 958.

[4].N. Nicolaou, Y. Xu and R. Goodacre, “Fourier Transform Infrared Spectroscopy And Multivariate Analysis For The Detection And Quantification Of Different Milk Species,” Journal Of Dairy Science, Vol. 93, NO. 12, 2010, pp. 5651-5660

Project Done By Ms. Akshatha K.B, Ms. Ashika M.S, Ms. Ashwini M.S, Ms. Kritika M.S.