Solar Panel Movement Project Using Arduino
Solar Panel Movement Project Using Arduino
Well from when I was kid to till now I always kept on wondering is it possible to make something that allows us to make
the most e cient use of solar light using solar panels as solar panels had a xed shape and when sun was on another
side from which it faced they produced very little electricity
Supplies:
The project is based on LDR sensor, I made the rotatable Solar system which has the home position during night time but
when the light is available in day time the solar system automatically waking up through sensing the light presence and
all the solar panels rotate counter clockwise and open like a sun ower and follow the sun rotation, after the sun fallen
down all the solar panels are automatically rotate clockwise and go to the home position for next day sun light
Light depending resistor is a photo-resistor, which decrease the resistance when the light increases.
An LDR or photo-resistor is made any semiconductor material with a high resistance. It has a high resistance because
there are very few electrons that are free and able to move – the vast majority of the electrons are locked into the crystal
lattice and unable to move. Therefore in this state there is a high LDR resistance.
As light falls on the semiconductor, the light photons are absorbed by the semiconductor lattice and some of their
energy is transferred to the electrons. This gives some of them su cient energy to break free from the crystal lattice so
that they can then conduct electricity. This results in a lowering of the resistance of the semiconductor and hence the
overall LDR resistance.
The process is progressive, and as more light shines on the LDR semiconductor, so more electrons are released to
conduct electricity and the resistance falls further.
As you can see in the above gure that I have placed a sensor in the middle this is why
When the light is minimum, the micro controller Arduino read the resistance value and the the threshold value is sated in
the coding section, when the light is available and the threshold level breaks, the Arduino rotate the n20 gear motor
anticlockwise through the L293D Driver till the limit switch level high, when anticlockwise limit switch pressed the panel
stop rotating and panel is fully opened position when the button is pressed, now the main work is going to progress,
according the sun rotation other 4 LDRs sense the light and send data to the Arduino, and Arduino process the data then
rotate the servo motors according the sun rotation, the rotation position of the servo is max 170 degrees,when the sun
goes down the fth LDR sense data again and this time the process is reverse condition, the LDR data goes down blow
the threshold level and Arduino Rotate the N20 motor clockwise till the 2nd limit switch press and run the servo in home
position, when light is available in next day the same process goes on again.
#include <Servo.h>
int pos = 0;
int pos2 = 0;
int oldvalue;
int oldvalue2;
horizontal.attach(5);
vertical.attach(6);
horizontal.write(180);
vertical.write(0);
pinMode(motorA, OUTPUT);
pinMode(motorB, OUTPUT);
pinMode(button1, INPUT);
pinMode(button1, INPUT);
delay(2500);
}
void loop() {
int ldrStatus = analogRead(ldrmt);
if (ldrStatus >30) {
buttonStateA = digitalRead(button1);
if (buttonStateA == LOW) {
//if(lt>90){
//if(Switch_a==LOW){
// digitalWrite(9==HIGH);
// digitalWrite(10==LOW);
// delay(1000);
//}}
delay(dtime);
else{
oldvalue = horizontal.read();
oldvalue2 = vertical.read();
for (pos = oldvalue; pos <= 180; pos += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree
horizontal.write(pos);
delay(15);
}
for (pos2 = oldvalue2; pos2 <= 0; pos2 += 1) { // goes from 0 degrees to 180 degrees
// in steps of 1 degree