Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Solar-Powered Automated Water Management System with Raspberry Pi and Arduino Control

Image of Solar-Powered Automated Water Management System with Raspberry Pi and Arduino Control

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, IN1 to IN8, 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, A0 to A5, SCL, SDA, AREF, D13 to D0, +, -

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 Controller Solar Cell +
  • - connected to Solar Charge Controller Solar Cell -

Solar Charge Controller

  • Battery + connected to 12V 200Ah Battery 12V, Power Inverter +, and Rocker Switch (SPST) 1
  • Battery - connected to 12V 200Ah Battery GND, Power Inverter -, and 12v to 5v Step Down Power Converter VIN-

12V 200Ah Battery

  • 12V connected to Power Inverter + and Rocker Switch (SPST) 1
  • GND connected to Power Inverter - and 12v to 5v Step Down Power Converter VIN-

ATS (Automatic Transfer Switch)

  • + connected to Power Inverter +, AC Source +, and Raspberry Pi 4 +
  • - connected to Power Inverter -, AC Source -, Raspberry Pi 4 -, and Socket earth

Socket

  • life connected to ATS +
  • earth connected to ATS -

12v to 5v Step Down Power Converter

  • VIN+ connected to Rocker Switch (SPST) 2
  • VIN- connected to 12V 200Ah Battery GND
  • 5v OUTPUT connected to 5V 8Channel Relay VCC
  • GND connected to 5V 8Channel Relay GND

Power Inverter

  • + connected to 12V 200Ah Battery 12V, Rocker Switch (SPST) 1, and ATS +
  • - connected to 12V 200Ah Battery GND and ATS -

7 inch DSI Display

  • 5V connected to Raspberry Pi 4 5V
  • GND connected to Raspberry Pi 4 GND

Raspberry Pi 4

  • 5V connected to 7 inch DSI Display 5V and Raspberry Pi 4 5V
  • GND connected to 7 inch DSI Display GND and Raspberry Pi 4 GND
  • GPIO 14 (TXD) connected to Arduino UNO D0 (Instance 1)
  • GPIO 15 (RXD) connected to Arduino UNO D1 (Instance 1)
  • GPIO 18 (PCM CLK) connected to Arduino UNO D0 (Instance 2)
  • GPIO 19 (PCM FS) connected to Arduino UNO D1 (Instance 2)
  • GPIO 20 (PCM DIN) connected to Arduino UNO D0 (Instance 3)
  • GPIO 21 (PCM DOUT) connected to Arduino UNO D1 (Instance 3)

Mini Diaphragm Water Pump

  • Negative (-) connected together for all instances

YF-S201 Water Flow Meter

  • SIG connected to Arduino UNO D2 (for each instance)
  • GND connected to Arduino UNO GND (for each instance)
  • VCC connected to Arduino UNO 5V (for each instance)

Plastic Solenoid Valve

  • pin1 connected together for all instances

Arduino UNO

  • D0 and D1 connected to Raspberry Pi 4 for serial communication (for each instance)
  • D2 connected to YF-S201 Water Flow Meter SIG (for each instance)
  • 5V connected to YF-S201 Water Flow Meter VCC (for each instance)
  • GND connected to YF-S201 Water Flow Meter GND (for each instance)

Rocker Switch (SPST)

  • 1 connected to 12V 200Ah Battery 12V and Power Inverter +
  • 2 connected to 12v to 5v Step Down Power Converter VIN+ 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()