Solar-Powered Automated Water Management System with Raspberry Pi and Arduino Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
The circuit in question is a solar-powered system with energy storage and conversion capabilities. It includes a solar panel connected to a solar charge controller, which in turn is connected to a 12V 200Ah battery. The system also features an Automatic Transfer Switch (ATS) for switching between solar power and an AC source. A power inverter is used to convert the stored DC power to AC, and a step-down converter is included to provide 5V power from the 12V source. The circuit integrates a Raspberry Pi 4 and multiple Arduino UNO microcontrollers for control and monitoring purposes. Additionally, the system includes water flow meters, solenoid valves, and diaphragm water pumps for fluid control, as well as a 7-inch DSI display for user interface. A rocker switch is used for manual power control.
Component List
Solar Panel
- Description: A photovoltaic panel for converting sunlight into electrical energy.
- Pins:
+,-
Solar Charge Controller
- Description: Regulates the voltage and current coming from the solar panels going to the battery.
- Pins:
Solar Cell +,Solar Cell -,Battery +,Battery -,Load +,Load -
12V 200Ah Battery
- Description: Stores electrical energy for later use.
- Pins:
GND,12V
ATS (Automatic Transfer Switch)
- Description: Automatically switches between solar power and AC source.
- Pins:
+,-
Socket
- Description: An interface for connecting electrical devices.
- Pins:
earth,life,neutral
12v to 5v Step Down Power Converter
- Description: Converts 12V DC to 5V DC power.
- Pins:
VIN 9v-36v,VIN+,VIN-,USB OUTPUT 5V,5v OUTPUT,GND
Plastic Solenoid Valve
- Description: Electrically-controlled valve for controlling the flow of a liquid.
- Pins:
pin1,pin2
Power Inverter
- Description: Converts DC power from the battery to AC power.
- Pins:
-,+
7 inch DSI Display
- Description: A display screen for visual output.
- Pins:
5V,GND
Raspberry Pi 4
- Description: A small computer used for processing and control.
- Pins:
5V,3V3,GND,GPIO 2 (SDA),GPIO 3 (SCL),GPIO 4 (GPCLK0),GPIO 17,GPIO 14 (TXD),GPIO 18 (PCM CLK),GPIO 15 (RXD),GPIO 27,GPIO 23,GPIO 22,GPIO 24,GPIO 25,GPIO 8 (CE0),GPIO 9 (MISO),GPIO 7(CE1),GPIO 10 (MOSI),GPIO 11 (SCLK),GPIO 0 (ID SD),GPIO 5,GPIO 6,GPIO 19 (PCM FS),GPIO 1 (ID SC),GPIO 12 (PWM0),GPIO 13 (PWM 1),GPIO 16,GPIO 21 (PCM DOUT),GPIO 20 (PCM DIN),+,-
Mini Diaphragm Water Pump
- Description: A pump for moving water through the system.
- Pins:
Positive (+),Negative (-)
YF-S201 Water Flow Meter
- Description: Measures the flow rate of water in the system.
- Pins:
SIG,GND,VCC
5V 8Channel Relay
- Description: Allows for control of high-power devices using low-power signals.
- Pins:
GND,IN1toIN8,VCC,NC,C,NO
Arduino UNO
- Description: A microcontroller board for controlling various parts of the circuit.
- Pins:
UNUSED,IOREF,Reset,3.3V,5V,GND,Vin,A0toA5,SCL,SDA,AREF,D13toD0,+,-
Rocker Switch (SPST)
- Description: A manual on/off switch.
- Pins:
1,2
AC Source
- Description: Provides an alternative AC power source.
- Pins:
+,-
Wiring Details
Solar Panel
+connected to Solar Charge ControllerSolar Cell +-connected to Solar Charge ControllerSolar Cell -
Solar Charge Controller
Battery +connected to 12V 200Ah Battery12V, Power Inverter+, and Rocker Switch (SPST)1Battery -connected to 12V 200Ah BatteryGND, Power Inverter-, and 12v to 5v Step Down Power ConverterVIN-
12V 200Ah Battery
12Vconnected to Power Inverter+and Rocker Switch (SPST)1GNDconnected to Power Inverter-and 12v to 5v Step Down Power ConverterVIN-
ATS (Automatic Transfer Switch)
+connected to Power Inverter+, AC Source+, and Raspberry Pi 4+-connected to Power Inverter-, AC Source-, Raspberry Pi 4-, and Socketearth
Socket
lifeconnected to ATS+earthconnected to ATS-
12v to 5v Step Down Power Converter
VIN+connected to Rocker Switch (SPST)2VIN-connected to 12V 200Ah BatteryGND5v OUTPUTconnected to 5V 8Channel RelayVCCGNDconnected to 5V 8Channel RelayGND
Power Inverter
+connected to 12V 200Ah Battery12V, Rocker Switch (SPST)1, and ATS+-connected to 12V 200Ah BatteryGNDand ATS-
7 inch DSI Display
5Vconnected to Raspberry Pi 45VGNDconnected to Raspberry Pi 4GND
Raspberry Pi 4
5Vconnected to 7 inch DSI Display5Vand Raspberry Pi 45VGNDconnected to 7 inch DSI DisplayGNDand Raspberry Pi 4GNDGPIO 14 (TXD)connected to Arduino UNOD0(Instance 1)GPIO 15 (RXD)connected to Arduino UNOD1(Instance 1)GPIO 18 (PCM CLK)connected to Arduino UNOD0(Instance 2)GPIO 19 (PCM FS)connected to Arduino UNOD1(Instance 2)GPIO 20 (PCM DIN)connected to Arduino UNOD0(Instance 3)GPIO 21 (PCM DOUT)connected to Arduino UNOD1(Instance 3)
Mini Diaphragm Water Pump
Negative (-)connected together for all instances
YF-S201 Water Flow Meter
SIGconnected to Arduino UNOD2(for each instance)GNDconnected to Arduino UNOGND(for each instance)VCCconnected to Arduino UNO5V(for each instance)
Plastic Solenoid Valve
pin1connected together for all instances
Arduino UNO
D0andD1connected to Raspberry Pi 4 for serial communication (for each instance)D2connected to YF-S201 Water Flow MeterSIG(for each instance)5Vconnected to YF-S201 Water Flow MeterVCC(for each instance)GNDconnected to YF-S201 Water Flow MeterGND(for each instance)
Rocker Switch (SPST)
1connected to 12V 200Ah Battery12Vand Power Inverter+2connected to 12v to 5v Step Down Power ConverterVIN+and Arduino UNO+(for each instance)
AC Source
+connected to ATS+-connected to ATS-
Documented Code
Arduino UNO (Instance 1)
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
Arduino UNO (Instance 2)
void setup() {
// put your setup code here, to run once:
}
void loop()