Project tutorial
Solar Tracker Arduino

Solar Tracker Arduino

PV panel simulation for tracking solar movement.

  • 3,409 views
  • 0 comments
  • 15 respects

Components and supplies

Ard nano
Arduino Nano R3
×1
photo diode or LDR
×1
mg995 or equal Servo Motor
×1
Generic Plastic, screw, nuts, glue
×1

Necessary tools and machines

knife, cutter, twizzer, solder, hot air

Apps and online services

About this project

Solar panels are green energy source such as wind tribunes. I want to make a demo of solar tracker PV panels. So on this project is born.

Arduino nano and shield is easy way to connect Servo Motors and photodiodes ( I used photodiodes but now I think I should have used LDR instead of photodiodes. Because photodiodes has a narrow window to view light. LDR has a large surface for light. I have lots of LDR but they are not twins. They might show different values under the same light level. Photodiodes were twins. So I used them. I will use "LDR" for rest of the article ).

Arduino nano reads analog values of LDRs. LDRs are named by directions north, south, east, west. East- West and Nort-South are pairs. The seperator between LDRs, makes shadow one of the LDR pair, if panel doesn't look towards to sun. If one LDR has shadow, measured analog level should be different from the pair.

If analog levels are bigger then 5 points, Arduino nano gives command to Servo motor to rotate 1 degree to E-W or N-S direction which LDR has lower level. It rotates until panel looks towards to sun.

System finds two value of degrees. One is north-south degree, other is east-west degree. If pv panels are rotated by servo motor using these E-W and N-S degrees, pv panel rotates syncronized with solar tracker.

After installation it looks like this.

Here is the video.

Solar Tracker Video

I have some ideas for developing project.

1- If it is night (all LDR levels are equal and bigger than 1 thousand) Panel can look up. So system will be ready for sun rise all the directions.

2- Trigger level is constant and value is 5, If Analog LDR levels different 5 point from pair, Servo motor rotates 1 degree to the sun. It works fine under sun light. But near the sun set time (while light level goes lower) 5 points is not a good trigger level. The smallest change of light make panel wobbly. A trigger value can be defined by changing light level.

if LDR Analog level between 0 and 200, trigger is 5,

LDR Analog level between 200 and 500, trigger is 15,

LDR Analog level above 500, trigger can be defined as 25. It will make panel more stable at all light levels. You might add this to your project. I will add this if i can find time to be busy with this project again.

Code

Solar Tracker Arduino Nano CodesArduino
#include <Servo.h>

//Servo Tanımları
Servo myServoEW;
Servo myServoNS;

//Değişken Tanımları
int farkNS;
int farkEW;

//Servo Motor Derece Değişkenleri
int degNS;
int degEW;

//LDRlerin ışık değerleri
int ldrN;
int ldrW;
int ldrS;
int ldrE;

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  //Servo motorları bağla
  myServoNS.attach(5);
  myServoEW.attach(4);
  delay(500);
	
//Başlangıç pozisyonu al	
  degNS=90;
  degEW=90;
  myServoNS.write(degNS);
  myServoEW.write(degEW);
  
}

void loop() {
  //LDR leri oku
  ldrN=analogRead(A0);
  ldrW=analogRead(A1);
  ldrS=analogRead(A2);
  ldrE=analogRead(A3);
  
  //Bildirim yap
  Serial.print("ldrN:");
  Serial.print(ldrN);
  Serial.print("    ldrW:");
  Serial.print(ldrW);
  Serial.print("    ldrS:");
  Serial.print(ldrS);
  Serial.print("    ldrE:");
  Serial.print(ldrE);
  //Bulunan açı değerlerini yazdır
  Serial.print("    degEW");
  Serial.print(degEW);
  Serial.print("    degNS");
  Serial.println(degNS);
  
  delay(100);
	
	/* Ldrlerin ışık değerlerini karşılaştırarak 
	yeniden pozisyon almak için karşılaştırma yap*/
	
  if (ldrN>ldrS)  //ldrN değeri ldrS değerinden büyükse
  {
   farkNS=ldrN-ldrS;
   if (farkNS>5)
   {
      degNS++;
      myServoNS.write(degNS);
      
    }
   }
  if (ldrS>ldrN)  //ldrN değeri ldrS değerinden büyükse
  {
   farkNS=ldrS-ldrN;
   if (farkNS>5)
   {
      degNS--;
      myServoNS.write(degNS);
      
    }
   }
   
  /* Ldrlerin ışık değerlerini karşılaştırarak 
	yeniden pozisyon almak için karşılaştırma yap*/
	
  if (ldrW>ldrE)  //ldrW değeri ldrE değerinden büyükse
  {
   farkEW=ldrW-ldrE;
   if (farkEW>5)
   {
      degEW++;
      myServoEW.write(degEW);
      
    }
   }
  if (ldrE>ldrW)  //ldrE değeri ldrW değerinden büyükse
  {
   farkEW=ldrE-ldrW;
   if (farkEW>5)
   {
      degEW--;
      myServoEW.write(degEW);
      
    }
   }
}

Schematics

Solar Tracker Schematic
Solar track sema ygkj2bg3gr

Comments

Similar projects you might like

Solar Panel Sun Tracker - Phone Charger

Project tutorial by FIELDING

  • 33,388 views
  • 15 comments
  • 146 respects

Solar Tracker V2.0

Project tutorial by Brown Dog Gadgets

  • 10,462 views
  • 3 comments
  • 70 respects

Dual Axis Solar Tracker Panel with Auto and Manual Mode

Project tutorial by Giannis Arvanitakis

  • 10,566 views
  • 8 comments
  • 50 respects

Solar Tracker with Live Data Feed - Windows IoT

Project tutorial by Jed Hodson

  • 11,322 views
  • 1 comment
  • 23 respects

Non Optical Solar Tracker (East Tower 2.4KW)

Project in progress by Team Trouble

  • 6,405 views
  • 17 comments
  • 41 respects

Mega Solar Tracker

Project in progress by Team Trouble

  • 5,361 views
  • 9 comments
  • 37 respects
Add projectSign up / Login