Table of Contents

Play Video

INSANE INSCIENCE

This project aims to create a simple and effective system to detect food adulteration using Arduino and the pH sensor.

Project Description

INSANE INSCIENCE Project aims to create a simple system to detect food adulteration using Arduino and sensors. By using sensors like a pH meter to find the pH value of the food, or chemical sensors and color sensor modules, this system can identify if food has been adulterated or not, this ensures the safety and quality of the food we eat. In this project, we are using a pH sensor connected to an Arduino to measure the pH value of food. In the future, we can add more sensors to make the system more accurate.

Components Required:

  1. Arduino Uno with Cable x 1
  2. pH Sensor SEN0161 x 1
  3. LCD I2C Display x 1
  4. Breadboard small x 1
  5. jumper wires – Male to Male x 2
    – Male to Female x 7

Features:

  1. pH Measurement: Detects the acidity or alkalinity of liquid food items. A deviation from the normal pH range indicates possible adulteration.

Working Principle:

  1. pH Sensor: Connect the pH sensor to the Arduino. When dipped into a liquid food sample, it measures the pH level, which is then displayed on the LCD. Abnormal pH levels suggest adulteration.

Connections:

Connection of Arduino with LCD I2C:

  • Arduino pin 5v to VCC through a breadboard
  • Arduino pin GND to GND through a breadboard
  • Arduino pin A4 to SDA
  • Arduino pin A5 to SCL

Connection of Arduino to pH sensor

  • Arduino pin A0 to signal of pH sensor
  • Arduino pin VCC to GND through a breadboard
  • Arduino pin GND to GND through a breadboard

Conclusion:

This project displays a practical approach to detecting food adulteration using Arduino and a pH sensor. By monitoring the pH level and comparing it to already defined threshold values, the system provides an analysis of food quality which ensures consumer safety. The use of an LCD I2C display makes the system more efficient and easy to read and also makes it easier to implement.

Circuit Diagram:

NOTE: Before uploading and running the code IN ARDUINO IDE:
Go to > Sketch > Include Library > Manage Libraries… > Type the library name
OR Go to > Sketch > Include Library > Add .ZIP Library… download the zip library from the link given below.

LiquidCrystal_I2C – https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library

CODE:

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


LiquidCrystal_I2C lcd(0x27, 16, 2);

const int pH_Sensor_Pin = A0;

const float pH_Threshold_Min = 6.0;
const float pH_Threshold_Max = 8.0;

void setup() {
  Serial.begin(9600);
  lcd.init();
  lcd.backlight();
  lcd.print("Food Testing");
  delay(2000);
  lcd.clear();
}

void loop() {
  float pH_Value = analogRead(pH_Sensor_Pin) * (5.0 / 1023.0); 

  lcd.setCursor(0, 0);
  lcd.print("pH: ");
  lcd.print(pH_Value);
  lcd.setCursor(0, 1);
  if (pH_Value < pH_Threshold_Min || pH_Value > pH_Threshold_Max) {
    lcd.print("Adulterated");
  } else {
    lcd.print("Normal");
  }
  delay(2000);
  lcd.clear();
}
Scroll to Top