Arduino UNO Based Water Quality Monitoring and Control System with GSM and Bluetooth Connectivity
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit is designed to control various components including relays, motors, a water pump, and communication modules through an Arduino UNO microcontroller. It integrates sensors for turbidity and pH measurement, a charge controller for power management, and communication modules for Bluetooth and GSM connectivity. The circuit is powered by a 12V battery, which is charged by a solar panel. The Arduino UNO serves as the central processing unit, interfacing with the sensors, controlling the relays, and communicating with the external modules.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
12V Relay
- An electromechanical switch that allows the control of a high-current circuit by a low-current signal.
- It has normally open (NO), common (COM), and normally closed (NC) contacts, along with an input (IN) and a DC power supply input (+ and -).
12V Battery
- A power source for the circuit, providing a voltage of 12V.
2-Channel Relay (5V 10A)
- A dual relay module capable of controlling two separate circuits.
- It has two sets of NO, COM, and NC contacts, two control inputs (IN1 and IN2), and a power supply input (VCC and GND).
Charge Controller
- Manages the power coming from the solar panel and charges the battery.
- It has connections for solar input, battery connection, and load output.
Solar Panel
- Converts sunlight into electrical energy to charge the battery.
- It has a positive (VCC) and a negative (GND) terminal.
Turbidity Module
- Measures the turbidity of water, which is an indicator of water quality.
- It has analog output (AO), digital output (DO), and a power supply input (VCC and GND).
pH Sensor (ph4502c)
- Measures the pH level of a solution, indicating its acidity or alkalinity.
- It has a power supply input (VCC) and ground connections (G1 and G2), along with other sensor-specific pins.
Water Pump
- An electric pump for moving water.
- It has a power supply input (VCC) and a ground (GND) connection.
DC Motor
- An electric motor that runs on direct current (DC) electricity.
- It has two connections for power supply and control.
LCD Screen 16x2 I2C
- A liquid crystal display that can show 16 characters per line on 2 lines.
- It uses I2C communication (SCL and SDA) and has a power supply input (VCC and GND).
HC-05 Bluetooth Module
- A wireless communication module for Bluetooth connectivity.
- It has a power supply input (VCC and GND), a state pin, and RXD/TXD for serial communication.
SIM800L GSM Module
- A module for cellular communication, allowing SMS and data transmission over GSM networks.
- It has a power supply input (5V and GND), a reset pin (RST), and RXD/TXD for serial communication.
Wiring Details
Arduino UNO
- 5V and GND pins are used to power the 5V components in the circuit.
- Analog pins A0 and A1 are connected to the turbidity sensor and pH sensor respectively.
- I2C pins A4 (SDA) and A5 (SCL) are connected to the LCD screen.
- Digital pins D13 and D12 are used for serial communication with the SIM800L GSM module.
- Digital pins D7, D4, and D2 control the 12V relay and the 2-channel relay module.
- Digital pins D1 (TX) and D0 (RX) are connected to the HC-05 Bluetooth module for serial communication.
12V Relay
- Controlled by the Arduino's D7 pin.
- NO contact is connected to the water pump's VCC.
- COM contact is connected to the charge controller's load positive terminal.
2-Channel Relay (5V 10A)
- VCC and GND are connected to the 5V and GND power rails respectively.
- IN1 and IN2 are controlled by the Arduino's D2 and D4 pins.
- K1-On and K2-On are connected to the DC motors.
Charge Controller
- Solar Positive and Solar Negative are connected to the solar panel.
- Battery Positive and Battery Negative are connected to the 12V battery.
- Load Positive is connected to the 12V relay's COM contact.
- Load Negative is connected to the GND of the DC motors and the water pump.
Solar Panel
- VCC is connected to the charge controller's solar positive terminal.
- GND is connected to the charge controller's solar negative terminal.
Turbidity Module
- VCC and GND are connected to the 5V and GND power rails.
- AO is connected to the Arduino's A0 pin.
pH Sensor (ph4502c)
- VCC is connected to the 5V power rail.
- G1 and G2 are connected to the GND power rail.
- Po is connected to the Arduino's A1 pin.
Water Pump
- VCC is connected to the 12V relay's NO contact.
- GND is connected to the charge controller's load negative terminal.
DC Motors
- One motor's pin 1 is connected to the 2-channel relay's K2-On contact.
- The other motor's pin 2 is connected to the 2-channel relay's K1-On contact.
- Both motors' other pins are connected to the charge controller's load negative terminal.
LCD Screen 16x2 I2C
- VCC and GND are connected to the 5V and GND power rails.
- SDA and SCL are connected to the Arduino's A4 and A5 pins.
HC-05 Bluetooth Module
- VCC and GND are connected to the 5V and GND power rails.
- RXD and TXD are connected to the Arduino's D0 and D1 pins.
SIM800L GSM Module
- 5V and GND are connected to the 5V and GND power rails.
- SIM_RXD and SIM_TXD are connected to the Arduino's D13 and D12 pins.
Documented Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
The provided code is a template for the Arduino UNO microcontroller. The setup() function is called once when the microcontroller is powered on or reset. It is used to initialize the pins and set the initial state of the circuit. The loop() function is called repeatedly and contains the main logic of the program. This is where the microcontroller reads sensor data, controls the relays, and communicates with the external modules. The actual implementation details need to be filled in based on the specific requirements of the circuit's operation.