Skip to content

Low-Cost Milk (Liquid Food) Quality Checker

presentation

My Final Project

The purpose of this project is to create a pH-meter and temperature with specifications similar to marketed products but low cost and less material usage.

The goals of the project were chosen at it’s genesis, and nearly no compromise has been taken during development and design.

An handheld shape has been chosen for the instrument. While 3d printing product is preferred, I used PLA filament to make device casing and biobased material composite for its padding and cushion.

Introduction

We start from the shelf-life of milk as perishable material. Due to the nutritive value of milk, its testing and quality control is an essential component of any milk processing industry whether small, medium or large scale. Milk is made up of 87% of water hence making it prone to adulteration by unscrupulous middlemen and unfaithful farmworkers.

Moreover, its high nutritive value makes it an ideal medium for the rapid multiplication of bacteria, particularly under unhygienic production and storage at ambient temperatures. For any processor to make good dairy products, good quality raw materials are essential.

ppo

A milk processor or handler will only be assured of the quality of raw milk if certain basic quality tests are carried out at various stages of transportation of milk from the producer to the processor and finally to the consumer. Measuring and controlling pH value and temperature in each stage then document them for tracing process play important role to ensure the product (milk) from potential hazards.

pps

To support Community empowerment, mandatory program for every faculty member in our institution; by working and living in harmony to help society with differences of customs, culture, and life are really challenging.

Our stakeholders, farmer/goat milk producers, asked for help in productivity and quality improvement. It is obligated to enhance structure, conduct, and performance for community development to produce good quality food for better life.

p23

The project that I proposed at Fab Academy is a low-cost, adaptable, and ergonomic design of milk quality checker, so that it can be easily utilized by our students (they have to improve continuously) and group of farmers (goat milk producers) who are still unfamiliar with using quality rapid-detection technology.

Herewith my timeline of my project...

pic

We start our work from the farm/farmer/fields....

pic

We were conducted focus group discussion to collect more information also some problems related to our case and proposal design.

pic1

After discussed and created more ideas, we proposed this design and started our project.

pic

These activities are in line with the implementation of the Sustainable Development Goals, in particular number 9 on the strategy for building durable infrastructure, supporting inclusive and sustainable industrialization, and fostering (open) innovation.

p22

scheme

To overcome the observed drift of level sensors, we will use established and standard laboratory devices for re-calibration approach, which significantly improved its accuracy.

pp.

Research

peres

The objective of the proposed method is to identify quality and certain adulterants present in goat milk and its intermediate products using low-cost and portable sensors.

pp1

pH meter

A pH probe (technically called a glass electrode) is a type of ion-sensitive electrode made with doped glass. The most common is sensitive to H+ ions (the pH probe) but version for Na+ and Ag+ are available. In the figure on the side the following element are highlighted:

  1. Doped glass bulb

  2. Internal electrode, coated in silver chloride

  3. Internal solution, generally of 0.1mol/l of KCL. The pH of this solution determines the offset of the probe, so it must be as close to pH 7 as possible

  4. AgCl precipitated from the electrode

  5. External electrode

  6. Reference solution, not present in cheap probes

  7. Junction made from ceramics or quartz fiber, not present in cheap probes

  8. Non conductive glass insulation

pH

pH meter Specification

  • Module Power : 5.00V
  • Module Size : 43mm×32mm
  • Measuring Range:0-14PH –> (for milk range 6.5 - 6.8)
  • Measuring Temperature :0-60 ℃
  • Accuracy : ± 0.1 pH (25-27 ℃)
  • Response Time : ≤ 1min
  • pH Sensor with BNC Connector
  • PH2.0 Interface ( 3 foot patch )
  • Gain Adjustment Potentiometer
  • Power Indicator LED
  • Cable Length from sensor to BNC connector:660mm

pH Electrode Characteristics

The output of pH electrode is Millivolts,and the pH value of the relationship is shown as follows (25 ℃):

ph2

The pH value and temperature play an important role, particularly in food production. Working process become more efficient when we control both parameters in one measurement process.

It makes sense to use a measuring instrument here which enables to measure the pH value and temperature at the same time. I proposed pH meters with either permanently integrated or connectable temperature probes specially for fresh milk producer and goat milk processing.

A flow chart is a diagram showing movements and actions in a complicated system.

flow

Because the principle of measuring pH value is relatively simple, sensors for measuring pH value are commercially available for a number of years. Basically there are two types of systems available:

  1. Systems that measure the conductivity of the whole milk, located for instance in the electronic milk meter and

  2. Systems measuring the conductivity per udder quarter, located in the claw of the milking cluster (traditional milking systems) or in the long milk tube (automatic milking systems.

Since mastitis is an event which occurs on udder quarter, EC measurements on quarter level give the possibility to compare udder quarters, thus increasing the test characteristics.

2D and 3D Modeling

flow

flow

After receiving comments, evaluations, and feedback from Kamakura’s instructors, Jans, and Setyawan; some of the changes made to follow up are as follows:

my new board design using ATtiny3216

flow

flow

then I used https://mods.cba.mit.edu/ to continue milling process using Roland SRM20.

pp

Dimensions:

L 190 mm
W 70 mm
H 85 mm

Print Settings

Printer brand: Prusa
Printer: MK3S
Supports: No
Resolution: 0,2
Infill: 15%
Filament brand: Prusa;
Filament color: Oranye; Grey
Filament material: PLA
Composite biobased material

Add here your modeling and design.

p1

After we cut the lid, you will saw out a kind of recessed grip on one side. To draw in the rounding we took the lid from a tin can.

The diameter of the lid around 70 and 75 mm. We will out for rounding carefully to avoid the break all the edges of the lid.

We will test whether the sliding lid fits and can be pushed without any problems.

Some of the activities that I have done as a series of initial preparations are trying to use my new board (with ATtiny3216) to run the pH and temperature sensors with Arduino programming.

Herewith the connection among the devices and my boards (ATtiny 3216)

No Description Pin Assignment Pin
1 electrical conductivity Digital Input 6
2 pH sensor Analog Input 7
3 DSB1820 One wire 3
4 LCD display 2x20 I2C 10,11

pp

pp

pp

pp

Some other section

Using Composite Material

I use the concept from waste to more valuable product to lead to sustainability achievement. In this section, I used my student final experiment (Anik, Arum, and Lestari Lumbangaol) on biobased material. The fabrication and characterization of padding and separators for placing electronic components in the casing is carried out by combining food waste (from rice) and palm sugar as main materials.

I made padding from these materials by considering mechanical properties such as strength, resistance to pressure, resistance to drop test are influenced by the concentration of those materials. The parameters to be tested are flexural firmness, moisture content, water absorption and biodegradability of the padding and separator for the resulting electronic components which I mentioned in Week 15 (Wild Card).

Assembling and Testing Process

flow

flow

The output of the sensor is analog voltage and digital will be processed by microcontroller, then display on screen.

The system can function and work well, the system needs synchronization between hardware and software.

Just turn ON the device and users can use it easily.

We hope the advantage of a real time monitoring system via smartphone can bring success for fresh milk producer. Milk quality parameter data record and save in the memory card so can be reference and feedback for milk producer, distributor, industrial customer, and consumer to determine appropriate milk quality.

Materials

Qty Description Price (USD) Link Notes
1 Resistor 4.7K ohm 0.067 https://www.tokopedia.com/makmurabadiyk/100pcs-0603-smd-18w-chip-resistor-resistors-0-ohm-10m-0r-1k-4-7k?extParam=ivf%3Dfalse%26src%3Dsearch 100%
1 Resistor 1K ohm 0.067 https://www.tokopedia.com/makmurabadiyk/100pcs-0603-smd-18w-chip-resistor-resistors-0-ohm-10m-0r-1k-4-7k?extParam=ivf%3Dfalse%26src%3Dsearch 100%
1 Resistor 470 ohm 0.067 https://www.tokopedia.com/makmurabadiyk/100pcs-0603-smd-18w-chip-resistor-resistors-0-ohm-10m-0r-1k-4-7k?extParam=ivf%3Dfalse%26src%3Dsearch 100%
4 Resistor 0 ohm 0.067 https://www.tokopedia.com/makmurabadiyk/100pcs-0603-smd-18w-chip-resistor-resistors-0-ohm-10m-0r-1k-4-7k?extParam=ivf%3Dfalse%26src%3Dsearch 100%
2 Capacitor 1 uF 0.069 https://www.tokopedia.com/abiyasa/100pcs-1206-uf-105-v-250-k-10-x7r-1-smd-capacitor-de-cer-mica?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
2 Capacitor 0.1 uF 0.069 https://www.tokopedia.com/abiyasa/100pcs-1206-uf-105-v-250-k-10-x7r-1-smd-capacitor-de-cer-mica?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
1 Regulator 3.3 L0a 6A0 0.11 https://shopee.co.id/Regulator-3-3V-0-5A-XC6206-P332MR-662K-XC6206-3-3V-0-5A-i.31923387.5614760722?gclid=Cj0KCQjwvLOTBhCJARIsACVldV2qHL06QN3xcyO0a1fCD2ipp9IH8CaVfhVEzIIwnPKPJiaCF9nQDJUaAqbPEALw_wcB 100%
1 pH sensor 18.93 https://www.tokopedia.com/kim-yong/ph-detection-sensor-module-for-arduino-probe-board-hitam?extParam=ivf%3Dfalse%26src%3Dsearch 100%
1 nuts and bolts 0.14 https://www.tokopedia.com/bahagiatools/bmk-baut-mur-kuning-ukuran-m6-x-10?src=topads
4 LED 0.039 https://www.tokopedia.com/i2c-parts/0805-led-smd-smt-pilihan-warna-hijau?src=topads 0
2 Pinheader connector 1x12 0.28 https://www.tokopedia.com/alanaoutlet/pinheader-pin-header-female-1x40-lurus?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
2 Pinheader connector 1x6 0.069 https://www.tokopedia.com/solarperfect/pin-header-2-54mm-color-male-40-pin-single-row-strip-warna-connector?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
2 Pinheader connector 1x3 0.034 https://www.tokopedia.com/solarperfect/pin-header-2-54mm-color-male-40-pin-single-row-strip-warna-connector?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
1 Temperature sensor DSB1820 0.86 https://www.tokopedia.com/cncstorebandung/cnc-ds18b20-waterproof-temperature-suhu-sensor-probe-arduino-uno?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true&src=topads 100%
1 SAMD11C mcu 1.57 https://www.arrow.com/en/products/atsamd11c14a-ssnt/microchip-technology?gclid=Cj0KCQjwvLOTBhCJARIsACVldV0mrkjUzQNet_wbnzwZWOoavNt_ozh_r9-SiEiZmP3BV2qtASrittUaAmEQEALw_wcB&gclsrc=aw.ds 100%
3 pH standards 3.10 https://www.tokopedia.com/rekomendasi/2978560801?ref=googleshopping&c=16946523240&m=486191687&p=2978560801&gclid=Cj0KCQjwvLOTBhCJARIsACVldV3wLKKMTR8LX5CgJNucS53Ob2NacTmPvbonLqAW28SbH2KXN0vUdpIaAseoEALw_wcB&gclsrc=aw.ds 100%
1 I2C LCD Display 3.90 https://www.tokopedia.com/tugustoreyk/papan-ule-display-lcd-tft-2-2-240x320-untuk-ili9341-51-avr-stm32-arm?extParam=ivf%3Dfalse 100%
1 NodeMCU ESP32 WiFi module 8.21 https://www.tokopedia.com/digitst0rer/nodemcu-lua-wireless-wifi-module-connector-esp8266-development-board?extParam=ivf%3Dfalse%26src%3Dsearch 100%
1 DC power supply 5V wbc https://www.google.com/shopping/product/1?q=DC+power+supply+5V&prds=epd:14101282937068515819,eto:14101282937068515819_0,pid:14101282937068515819&sa=X&ved=0ahUKEwj11c-hjLz3AhWvRmwGHVIfCeQQ9pwGCAo 100%
1 Electronic con. & PCB 1.03 online / conventional store 100%
1 PE/PLA filament 34.42 https://www.tokopedia.com/hartashu/prusament-filament-by-prusa-research-galaxy-silver?extParam=ivf%3Dfalse%26src%3Dsearch&refined=true 100%
1 Soldering wire and flux 3.11 https://www.tokopedia.com/awallaptop/tenol-timah-solder-10m-10-meter-paragon-0-8mm-tenol?extParam=ivf%3Dfalse%26src%3Dsearch 100%
1 Wire and connector 2.07 https://www.tokopedia.com/cncstorebandung/cnc-40pcs-jumper-cable-kabel-10cm-male-to-male-dupont-male-male?extParam=ivf%3Dfalse%26src%3Dsearch 100%

Total Cost (purchasing cost, in USD) = 98.138 Total Cost (without IoT, in USD) = 71.568

The sensor will be installed on the mainboard (with ATtiny 3216) using a ‘shield’ to replace the cable/minimize wiring, design neatness, and strengthen the physical connection between components. A buzzer will be used as a marker when the pH measurement result exceeds the specified threshold (6.5 - 6.8). I’m learning how to adjust the sensitivity of the measurement results.

pH value and Temperature Sensor Code

//#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,4);  // set the LCD address to 0x27 for a 16 chars and 2 line display


// initialize the library by associating any needed LCD interface pin
// with the arduino pin number it is connected to

//float calibration_value = 21.34;
float calibration_value = 28.62;
int phval = 0; 
unsigned long int avgval; 
int buffer_arr[10],temp;

int t_sens = 1; // analog pin 1
int val_t ;
float temper;


void setup() 
{
  lcd.init();                      // initialize the lcd 
  lcd.backlight();
 Serial.begin(9600);

  lcd.begin(20, 4);
    pinMode(t_sens,INPUT);

}
void loop() {
 for(int i=0;i<10;i++) 
 { 
 buffer_arr[i]=analogRead(0);
 delay(30);
 }
 for(int i=0;i<9;i++)
 {
 for(int j=i+1;j<10;j++)
 {
 if(buffer_arr[i]>buffer_arr[j])
 {
 temp=buffer_arr[i];
 buffer_arr[i]=buffer_arr[j];
 buffer_arr[j]=temp;
 }
 }
 }
 avgval=0;
 for(int i=2;i<8;i++)
 avgval+=buffer_arr[i];
  float volt=(float)avgval*5.0/1024/6;
  float ph_act = -5.70 * volt + calibration_value;

//temperature sensor
  val_t=analogRead(t_sens);
  temper = val_t * 5.0/1024*49;
//  Serial.print("volt value :");
//  Serial.print(val);
  Serial.print("Temperature :");
  Serial.print(temper);
  Serial.print("       PH :");
  Serial.println(ph_act);
//  Serial.println(volt);

 lcd.setCursor(0, 0);
 lcd.print("pH Val :");
 lcd.setCursor(8, 0);
 lcd.print(ph_act);

 lcd.setCursor(0, 1);
 lcd.print("Temp(C):");
 lcd.setCursor(8, 1);
 lcd.print(temper);

 lcd.setCursor(6, 3);
 lcd.print("Iwan-FA2022");
 delay(1000);
}

Useful links

License

This project is shared under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license

Acknowledgement

Special thanks to:

  • Prof. Neil Gershenfeld, Director, The Center for Bits and Atoms, MIT
  • Fablab Kamakura (Youka Watanabe, Director)
  • Our Beloved Instructors : Phanuwit “Rico” Kanthatham, Jun Kawahara, Toshiki Tsuchiyama, Yosuke Tsuchiya, Masato Takemura

  • Assistant Instructor : Georg Tremmel

  • Students 2022 : Setyawan Bekti Wibowo, Jans Hendry, Atsufumi Suzuki, Kurumi Shiowaki

  • TCP JICA-UGM Team, PIU UGM, PUI UGM

  • Our UGM teams : Muhammad Dzaim, Arga Prasetya

Documentation Files


Last update: July 19, 2022