Project tutorial
Sun Tracking Solar System

Sun Tracking Solar System © LGPL

This system is to get 100% sun energy. In this system solar panel will move in the direction of sun from sun rise to sun set.

  • 1,521 views
  • 0 comments
  • 15 respects

Components and supplies

Apps and online services

About this project

It seems you can'twalk down the street these days without coming across a solar panel. You canfind them for mobile charging in rural areas, as well as simple little sidewalkpath lights. Solar is easy to use, readily available, and inexpensive.

Every panel you seein your day to day life is in a fixed position. While this approach isextremely simple and meets the needs of most small applications, it isn'tproducing as much energy as it could be.

Our tracker isa dual axis tracker, meaningit tracks in both X and Y. To put it into even more simple terms, it goes left, right, up, and down. This means once you have your tracker set up you willnever need to change or adjust anything, since anywhere the sun moves yourtracker will follow.

Code

Sun tracking solar systemArduino
This is code for suntracking solar system.
/*
 * Author: Mayur Rabadiya
 * Email:  mayurrabadiya994@gmail.com
 * Code: Sun tracking solar system
 */


#include<Servo.h>     // library for servo motor 

Servo s; // define Vertival servo
Servo sh; // define horizontal servo           
int start1 = 90; // initially starting from 90 degree
int start2 = 90; 
int L1 = A0;  //for read data from LDR1         
int L2 = A1;  //for read data from LDR2
int L3 = A2;  //for read data from LDR3        
int L4 = A3;  //for read data from LDR4        
int a = 15;          

void setup() 
{ 
  s.attach(9); //connect vertical servo to pin 9 of arduino  
  sh.attach(10);  //connect horizontal servo to pin 10 of arduino 
  pinMode(L1, INPUT);  //define LDR as input
  pinMode(L2, INPUT);
  pinMode(L3, INPUT);  
  pinMode(L4, INPUT);
  s.write(start1); //it will start servo from 90 when we reset system
  sh.write(start2);  
  delay(2000);          
} 
void loop() 
{ 
  int LDR1 = analogRead(L1); //read value from LDR
  int LDR2 = analogRead(L2); 
  int LDR3 = analogRead(L3);
  int LDR4 = analogRead(L4);
  int plus14 =(LDR1+LDR4);  //average of two corner LDR
  int plus23 =(LDR2+LDR3);
  int plus12 =(LDR1+LDR2);
  int plus34 =(LDR3+LDR4);
  int diff1= abs(plus14 - plus23);  // difference to take proper value
  int diff2= abs(plus23 - plus14);
  int diff3= abs(plus12 - plus34);  
  int diff4= abs(plus34 - plus12);
  
  if((diff1 <= a) || (diff2 <= a))
 {
   //difference is less then 15 so do nothing
  } 
else 
{    
    if(plus14 > plus23) //move vertical servo in lessthen 90 degree
    {
     start2= --start2;   
    }
 if(plus14 < plus23) 
    {
      start2 = ++start2;  //move vertical servo in greaterthen 90 degree
    }
  }
       if(plus12 > plus34 )
  {
    start1= --start1;   // move horizontal servo in lessthen 90 degree
  }
  if(plus12 < plus34)
  {
   start1= ++start1;  //move horizontal servo in greaterthen 90 degree
   }
   s.write(start1);
  sh.write(start2);
   delay(100);
}

Schematics

Sun tracking solar system
Circuit diagram 2wmsr3408b

Comments

Similar projects you might like

Solar Panel Sun Tracker - Phone Charger

Project tutorial by FIELDING

  • 30,426 views
  • 12 comments
  • 133 respects

Advance Automatic Railway Crossing System

Project showcase by Pawan singh and Akansh Saxena

  • 1,839 views
  • 1 comment
  • 13 respects

Herb Box Eco System

Project tutorial by Walter Heger

  • 40,042 views
  • 35 comments
  • 261 respects

Smart Garbage Monitoring System Using Arduino 101

Project tutorial by Technovation

  • 21,412 views
  • 7 comments
  • 32 respects

Integrated Solar ChargeController, Inverter, PowerBank, Lamp

Project tutorial by Shahariar

  • 8,716 views
  • 25 comments
  • 36 respects
Add projectSign up / Login