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

Arduino-Based Water Quality Monitoring System with Wi-Fi Connectivity

View and Edit Project In Cirkit DesignerImage of Arduino-Based Water Quality Monitoring System with Wi-Fi Connectivity

Circuit Documentation

Summary

This circuit is designed to interface with a pH meter, a turbidity sensor, and a DS18B20 temperature sensor, and display their readings through the Arduino UNO+WiFi R3 ATmega328P+Node MCU ESP8266 CH340G microcontroller. The circuit is powered by a 12V power supply, which is stepped down to 5V using an XL4015 5A DC Buck Step-down converter to power the microcontroller and sensors. The LED indicates the operational status, and resistors are used for current limiting and signal conditioning.

Component List

PH Meter

Turbidity Sensor

LED: Two Pin (red)

DS18B20 1-Wire Temperature Sensor Probe Cable

Resistor (47k Ohms)

Resistor (4.7k Ohms)

XL4015 5A DC Buck Step-down

Arduino UNO+WiFi R3 ATmega328P+Node MCU ESP8266 CH340G

12v Power Supply

Wiring Details

PH Meter

Turbidity Sensor

LED: Two Pin (red)

DS18B20 1-Wire Temperature Sensor Probe Cable

Resistor (47k Ohms)

Resistor (4.7k Ohms)

XL4015 5A DC Buck Step-down

12v Power Supply

Documented Code

/*
 * This Arduino Sketch reads data from a turbidity sensor, a DS18B20 temperature
 * sensor, and a pH meter. The readings are printed to the Serial Monitor.
 */

#include <OneWire.h>
#include <DallasTemperature.h>

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

// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(oneWireBus);

// Pass our oneWire reference to Dallas Temperature sensor
DallasTemperature sensors(&oneWire);

void setup() {
  // Start serial communication
  Serial.begin(9600);

  // Start up the temperature sensor library
  sensors.begin();
}

void loop() {
  // Read turbidity sensor
  int turbidityValue = analogRead(turbidityPin);
  float turbidityVoltage = turbidityValue * (5.0 / 1023.0);

  // Read pH sensor
  int phValue = analogRead(phPin);
  float phVoltage = phValue * (5.0 / 1023.0);

  // Request temperature readings
  sensors.requestTemperatures();
  float temperatureC = sensors.getTempCByIndex(0);

  // Print sensor values to Serial Monitor
  Serial.print("Turbidity Voltage: ");
  Serial.print(turbidityVoltage);
  Serial.println(" V");

  Serial.print("pH Voltage: ");
  Serial.print(phVoltage);
  Serial.println(" V");

  Serial.print("Temperature: ");
  Serial.print(temperatureC);
  Serial.println(" °C");

  // Wait 1 second before next loop
  delay(1000);
}

This code is designed to be uploaded to the Arduino UNO+WiFi R3 ATmega328P+Node MCU ESP8266 CH340G. It initializes the sensors in the setup() function and continuously reads the sensor values in the loop() function, outputting the results to the Serial Monitor.