Circuit Documentation
Summary
This circuit is designed to monitor and control a water quality management system. It includes sensors for measuring pH, dissolved oxygen, and electrical conductivity, along with a WiFi module for remote communication and two water pumps for water regulation. An Arduino UNO microcontroller serves as the central processing unit, interfacing with the sensors and controlling the water pumps via a relay module.
Component List
pH Degree Sensor Module
- Pins: pH Negative, pH Positive, pH A
- Description: This module is used to measure the pH level of the water.
DFRobot Dissolved Oxygen Sensor
- Pins: -, +, A
- Description: This sensor measures the amount of dissolved oxygen in the water.
Modulo Sensor Conductividad Electrica / Electrical Conductivity
- Pins: A, +, -, SEN
- Description: This sensor measures the electrical conductivity of the water, which is an indicator of the water's total ion concentration.
ESP8266 ESP-01 WiFi Module
- Pins: TXD, CH_PD, RST, VCC, GND, GPIO_2, GPIO_0, RXD
- Description: This WiFi module enables remote communication for the system.
Water Pump
- Pins: positive, negative
- Description: These pumps are used to regulate the water flow within the system.
Arduino UNO
- 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
- Description: The Arduino UNO is the main microcontroller used to process sensor data and control the water pumps.
Relay Module 2 Channel
- Pins: GND, IN1, IN2, VCC, NC1, COM, NO1, NC2, NO2
- Description: This module is used to control high power devices like the water pumps, providing electrical isolation between the Arduino and the pumps.
Wiring Details
pH Degree Sensor Module
- pH Negative: Connected to the common ground.
- pH Positive: Connected to the 3.3V power supply from the Arduino UNO.
- pH A: Connected to the A1 analog input on the Arduino UNO.
DFRobot Dissolved Oxygen Sensor
- -: Connected to the common ground.
- +: Connected to the A5 analog input on the Arduino UNO.
- A: Connected to the 3.3V power supply from the Arduino UNO.
Modulo Sensor Conductividad Electrica / Electrical Conductivity
- A: Connected to the A4 analog input on the Arduino UNO.
- +: Connected to the 3.3V power supply from the Arduino UNO.
- -: Connected to the common ground.
- SEN: Not connected in the provided net list.
ESP8266 ESP-01 WiFi Module
- TXD: Connected to the D2 digital pin on the Arduino UNO.
- CH_PD: Connected to the VCC for chip enable.
- RST: Connected to the VCC for resetting the module.
- VCC: Connected to the VCC from the Relay Module 2 Channel.
- GND: Connected to the common ground.
- GPIO_2: Not connected in the provided net list.
- GPIO_0: Not connected in the provided net list.
- RXD: Connected to the D3 digital pin on the Arduino UNO.
Water Pump
- positive: Connected to the common (COM) terminal of the Relay Module 2 Channel.
- negative: Connected to the common ground.
Relay Module 2 Channel
- GND: Connected to the common ground.
- IN1: Connected to the D9 digital pin on the Arduino UNO.
- IN2: Connected to the D10 digital pin on the Arduino UNO.
- VCC: Connected to the 5V power supply from the Arduino UNO.
- NC1, NO1, NC2, NO2: Not connected in the provided net list.
- COM: Connected to the positive terminal of the water pumps.
Documented Code
Arduino UNO Code
void setup() {
Serial.begin(9600);
pinMode(9, OUTPUT);
pinMode(A0, INPUT);
pinMode(A1, INPUT);
pinMode(A2, INPUT);
}
void loop() {
int pHValue = analogRead(A0);
int oxygenValue = analogRead(A1);
int conductivityValue = analogRead(A2);
Serial.print("pH Value: ");
Serial.println(pHValue);
Serial.print("Oxygen Value: ");
Serial.println(oxygenValue);
Serial.print("Conductivity Value: ");
Serial.println(conductivityValue);
digitalWrite(9, HIGH);
delay(1000);
digitalWrite(9, LOW);
delay(1000);
}
Note: The code for the other microcontrollers is not provided or is empty. The Arduino UNO code provided above is responsible for reading sensor data and controlling the water pumps. It also includes serial communication for debugging purposes.