Cleaning Solar Panels

Yes

I wanted the same wiring, but I use Arduino Uno, push button, L298N, two limit sensor

You posted the same question in the French speaking forum


➜ since this one has more answers I’m closing the other one.

Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum. It will help you get the best out of the forum in the future.

Thank you.

The mechanics of doing this need to be sorted first before jumping into wiring diagrams and code .
Making this work reliably , outdoors for extended periods is not an easy task - look at this aspect first !!

1 Like

Can you please post a copy of your circuit a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

Agree....cannot see this ever getting off the ground so-to-speak.
Creates more problems than it solves.
Sometimes there simply is no "electronic" solution for a bucket of soapy water and a bit of elbow grease.

Hi, @apolos

Have yo Googled;

arduino solar panel cleaner

Tom... :grinning: :+1: :coffee: :australia:

Your wiring diagram could be someting similar to the following one (Fig-1). If you have any other item to add, please let me know; I will connect it and will post the revised diagram. Hope, it will be helpful for you and now you can proceed to write some codes.


Figure-1:

If a Motor does not turn in the direction you want, then swap the connection at the Motor terminals.

:open_mouth: :open_mouth: :open_mouth: :open_mouth: :open_mouth:

Tom.. :grinning: :+1: :coffee: :australia:

OP has asked a wiring diagram for four times. He has come up with a wiring diagram in post #18, which is simply a copy/paste one. As he has tried, I have offered him a workable one in post #28 so that he can proceed with some codings.

Excuse me I am not understood

If you blow air over the panel it will cause air on the panel to lift up into it, by Bernoulli pressure laws.

Look into DC-DC Boost Converters to raise V and Buck Converters to lower V.

Hello Sir how are you? excuse me I would like to ask you for help for my Arduino code, in reality I designed the code and it does not work, it is a semi automatic cleaning, the cleaning will be done from a push button and automatically and the automatic cleaning will be done every month from 6am

int BoutonHaut = 2;
int BoutonBas = 3;
int BoutonONOFF = 7;

int MonteeMoteur = 4;
int DescenteMoteur = 5;

int BoutonHautState =0;
int BoutonBasState =0;
int BoutonONOFFSate = 0;
bool etat = false;

int pompe = 13;

unsigned long previousMillis = 0;
const long interval = 604800;

const int valve = 13;

#include <Stepper.h>

const int stepsPerRevolution = 200;  // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

int stepCount = 0;         // number of steps the motor has taken
int dirStep = 1;


void setup()
{
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(13, OUTPUT);
  
  pinMode(2, INPUT);
  pinMode(3, INPUT);
  pinMode(7, INPUT);

  pinMode(valve,OUTPUT);
}

 // initialize the serial port:
Serial.begin(9600);
}

void loop()
{
BoutonHautState = digitalRead(BoutonHaut);
BoutonBasState = digitalRead(BoutonBas); 
BoutonONOFFSate = digitalRead(BoutonONOFF);
digitalWrite(pompe,LOW);  
  if(BoutonONOFF == HIGH){
    etat =!etat; //changer l'etat de la boolean etat
}
  
  while(etat == true){ //debut de while
    if(BoutonONOFF == HIGH){// pour que l'appui puisse ĂȘtre detectĂ©
    etat =!etat;
    }
     digitalWrite(pompe,HIGH);
    
      digitalWrite(MonteeMoteur,HIGH); //faire monter la barre en actionant le moteur
      BoutonHautState = digitalRead(BoutonHaut);
  if(BoutonHautState == HIGH){
    digitalWrite(MonteeMoteur,LOW);// arreter la montéé de la barre en desactivant le moteur
    delay(500);// attendre 1/2 seconde
    digitalWrite(DescenteMoteur,HIGH);// changer le sens de rotation du moteur, en activant le pin 5 pour que la barre descende
  }
  BoutonBasState = digitalRead(BoutonBas);
  if(BoutonBasState ==HIGH){
     digitalWrite(DescenteMoteur,LOW);// arreter le moteur
    delay(500);
    digitalWrite(MonteeMoteur,HIGH);// on monte
  }  
    
  }//fin de while
  
  
  unsigned long currentMillis = millis();

  if (currentMillis - previousMillis >= interval) {
    // save the last time you blinked the LED
    previousMillis = currentMillis;
    
    for(int i =0;i>3;i++){
    //*************************
     digitalWrite(pompe,HIGH);
      digitalWrite(MonteeMoteur,HIGH); //faire monter la barre en actionant le moteur
      BoutonHautState = digitalRead(BoutonHaut);
  if(BoutonHautState == HIGH){
    digitalWrite(MonteeMoteur,LOW);// arreter la montéé de la barre en desactivant le moteur
    delay(500);// attendre 1/2 seconde
    digitalWrite(DescenteMoteur,HIGH);// changer le sens de rotation du moteur, en activant le pin 5 pour que la barre descende
  }
  BoutonBasState = digitalRead(BoutonBas);
  if(BoutonBasState ==HIGH){
     digitalWrite(DescenteMoteur,LOW);// arreter le moteur
    delay(500);
    digitalWrite(MonteeMoteur,HIGH);// on monte
  }      
  //*************************
    }
    
  }
  
}

  // put your main code here, to run repeatedly:
digitalWrite(valve,HIGH);
delay(2000);
digitalWrite(valve,LOW);
delay(5000);
}

  // step one step:
  myStepper.step(dirStep);
  Serial.print("steps:");
  Serial.println(stepCount);
  stepCount++;

  if( stepCount > 500){
      stepCount = 0;
      if( dirStep == 1) dirStep = -1;
      else dirStep = 1;
  }


  delayMicroseconds(50);
}

moderator edit: code tags

@apolos, stop hijacking. Stop cross-posting. Final warning.

Hi, @apolos
Your code in post #34 does not compile.

You have missed some { and } brackets.
For example your Serial.begin is not inside the void setup() part of your code.

In the IDE press [ CTRL] [ T ], this will auto format your code and show you by denting your { and } where your errors are.

Have you got code that JUST runs each motor, not your full code but JUST code to move ONE of your motors back ad forth?

Is this your first project?
Can you please tell us your electronics, programming, arduino, hardware experience?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

Yes sir this is my first project, I am a beginner

Hi, @apolos

This is not a very easy beginners project.

Q1. HAVE YOU GOT SOME CODE THAT JUST CONTROLS THE MOTORS?

Q2. HAVE YOU GOT SOME CODE THAT JUST READS THE RTC?

Q3. HAVE YOU GOT SOME CODE THAT JUST READS THE LIMIT SWITCHES?

Forget your existing code and start to develop code, trying to copy and paste someone elses only leads to problems, as you have no idea how it works.

Tom.. :grinning: :+1: :coffee: :australia:

1 Like

Hi family how are you? please, from a diagram, you can help me design an Arduino Uno code?I am available to explain the functionality

The job can be done using delays inside of functions. No parts have to run at the same time. Blocking code can enforce synchronization. One thing at a time, what are the steps? And the parts you have or plan to get? Motor? Pump? Is that final?

This is a work-around for blocking code: put the limit contacts on springs that allow push L+1 and then while ( not sense limit ) { move L }. You only want to move a spray head back and forth?