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

Arduino UNO Solar Panel Cleaning System with Water Pump and Servo Motor

View and Edit Project In Cirkit DesignerImage of Arduino UNO Solar Panel Cleaning System with Water Pump and Servo Motor

Solar Panel Cleaning System Documentation

Summary

This document provides a detailed overview of a solar panel cleaning system. The system uses an Arduino UNO microcontroller to control a water pump and a servo motor. The water pump is activated via a relay, and the servo motor is used to clean the solar panel. The system is powered by a 9V battery and a 3.7V battery.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • 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
  2. Water Pump

    • Description: A small water pump used to spray water on the solar panel.
    • Pins: VCC, GND
  3. 3.7V Battery

    • Description: A battery providing 3.7V power.
    • Pins: +, -
  4. 12V Relay

    • Description: A relay module used to control the water pump.
    • Pins: NO, COM, NC, IN, DC-, DC+
  5. Micro Servo 9G

    • Description: A small servo motor used to clean the solar panel.
    • Pins: GND, +5V, PWM
  6. 9V Battery

    • Description: A battery providing 9V power.
    • Pins: -, +

Wiring Details

Arduino UNO

Water Pump

3.7V Battery

12V Relay

Micro Servo 9G

9V Battery

Code Documentation

/*
 * Solar Panel Cleaning System
 * This code controls a water pump and a servo motor to clean a solar panel.
 * The water pump is controlled via a relay connected to pin D2.
 * The servo motor is connected to pin D7.
 */

#include <Servo.h>

#define RELAY_PIN 2
#define SERVO_PIN 7

Servo cleaningServo;

void setup() {
  // Initialize relay pin as output
  pinMode(RELAY_PIN, OUTPUT);
  // Initialize servo motor
  cleaningServo.attach(SERVO_PIN);
  // Start with the relay off
  digitalWrite(RELAY_PIN, LOW);
}

void loop() {
  // Turn on the water pump
  digitalWrite(RELAY_PIN, HIGH);
  delay(5000); // Pump water for 5 seconds
  // Turn off the water pump
  digitalWrite(RELAY_PIN, LOW);
  // Move the servo to clean the panel
  cleaningServo.write(0); // Move to 0 degrees
  delay(2000); // Wait for 2 seconds
  cleaningServo.write(180); // Move to 180 degrees
  delay(2000); // Wait for 2 seconds
  // Repeat the cleaning process
  cleaningServo.write(0); // Move back to 0 degrees
  delay(2000); // Wait for 2 seconds
  // Wait before the next cleaning cycle
  delay(60000); // Wait for 1 minute
}

This code initializes the relay and servo motor in the setup function. In the loop function, it turns on the water pump for 5 seconds, then moves the servo motor to clean the solar panel by rotating it from 0 to 180 degrees and back to 0 degrees. This process repeats every minute.