Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based Water Contaminant Detection System with TDS, pH, and Turbidity Sensors

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based Water Contaminant Detection System with TDS, pH, and Turbidity Sensors

Water Contaminant Detection System Documentation

Summary

This document provides a detailed overview of a Water Contaminant Detection System. The system uses an Arduino UNO microcontroller to read data from TDS, pH, and Turbidity sensors. The data is then displayed on an LCD screen. The system is powered by a 9V battery.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. TDS Sensor

    • Description: Measures the Total Dissolved Solids (TDS) in water.
    • Pins: AI, GND, 5V
  3. Turbidity Sensor

    • Description: Measures the turbidity (cloudiness) of water.
    • Pins: OUT, VCC, GND
  4. LCD Screen

    • Description: Displays data from the sensors.
    • Pins: Backlight (GND), VSS, VDD, Contrast, RS, E, R/W, D0, D1, D2, D3, D4, D5, D6, D7, Backlight_PWR
  5. pH Meter

    • Description: Measures the pH level of water.
    • Pins: Signal, VCC, GND
  6. 9V Battery

    • Description: Powers the entire system.
    • Pins: -, +

Wiring Details

Arduino UNO

TDS Sensor

Turbidity Sensor

LCD Screen

pH Meter

9V Battery

Code Documentation

/*
 * Water Contaminant Detection System
 * This Arduino sketch reads data from TDS, pH, and Turbidity sensors
 * and prints the values to the Serial Monitor.
 */

// Pin definitions
const int tdsPin = A0;
const int phPin = A1;
const int turbidityPin = A2;

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  // Configure sensor pins as input
  pinMode(tdsPin, INPUT);
  pinMode(phPin, INPUT);
  pinMode(turbidityPin, INPUT);
}

void loop() {
  // Read sensor values
  int tdsValue = analogRead(tdsPin);
  int phValue = analogRead(phPin);
  int turbidityValue = analogRead(turbidityPin);

  // Print sensor values to Serial Monitor
  Serial.print("TDS Value: ");
  Serial.println(tdsValue);
  Serial.print("pH Value: ");
  Serial.println(phValue);
  Serial.print("Turbidity Value: ");
  Serial.println(turbidityValue);

  // Wait for a second before next reading
  delay(1000);
}

This code initializes the Arduino UNO to read analog values from the TDS, pH, and Turbidity sensors and prints these values to the Serial Monitor every second.