Introduction: Robotic - Automatically - Wireless Azimuth-Altitude Dual Axis Solar Tracker

The azimuth-altitude dual axis tracker (AADAT). The solar tracking systems is active based, and the control circuit is based on an Arduino UNO microcontroller that is programmed to detect sunlight through LDR sensors that mounted at each side of solar panel to actuate the servo motors automatically to position the solar panel where it will receive the most sunlight.


Supplies

  • Arduino UNO
  • LDR -Photocell, Photoresistor X4
  • BLUETOOTH HC-06
  • GPCB
  • USB Type A to B Cable
  • Jumper Wires
  • Screw
  • 5V 2A Power bank
  • Resistor 1 Kilo ohms
  • Resistor 35 Kilo ohms
  • Red LED 5mm
  • Terminal Blocks 2 POS 3.5mm
  • Servo Motor MG90S
  • 14V 2W Solar panel
  • PLA Pro (3D Printed parts are used)

Step 1: Description

This project is developing an automatically dual axis solar tracker which rotates 360 degrees around the azimuth axis and 180 degrees around the altitude axis. It is using the simple technology and components such as LDR to detect the brighter spot, and the solar tracking system will then actuate the servo motors to position the solar panel to be perpendicular to the sun to maximize the power efficiency of solar panel. 

Achievement: This project has won the 1st award recently during final year project competition in my university. 

Step 2: Objectives

  1. To design and develop an automatically (active-based) azimuth-altitude dual axis solar tracking system
  2. To investigate the efficiency of azimuth-altitude axis solar tracker system.
  3. To develop a dual axis solar tracker that maximize the solar panel output power efficiency

Step 3: Problem Statements

The maximum efficiency of solar panels has been reduced due to limited movement where it can achieve only roughly less than 20%. One of the typical factors that diminishes the output power of solar cells is the solar panel that is not perpendicular to the sun all the time. Due to the sun path, the solar panel power efficiency has been limited, where it only received the maximum light intensity and energy at noon. Thus, the development of a robotic solar tracker is necessary to position the solar panel to be perpendicular to the sun to maximize the output power efficiency.

Step 4: Methodology

Master & Slave protocol

The solar tracking system is programmed using both C++ and Python programming languages. The relationship between the Arduino and the Python in PC is Master & slave protocol, and it has been done with HC-06 Bluetooth devices. With the help of Bluetooth devices, I able to collect the solar panel power wirelessly and the Python will help to print the data into Excel file. 

Real Time Simulation of virtual solar tracker and real solar tracker

I also using the Robodk software to implement the virtual solar tracker in the PC screen, such that I don't need to always go to outdoor for checking my solar tracker. And this software is able to simulate my solar tracker movement, such that I can check whether my robotic movement is correct or not. Also, the virtual solar tracker can move simultaneously with the solar tracker in real world.

PCB & 3D prototypes design

I also designed the PCB and 3D printed prototypes for my solar tracker. The 3D printed prototypes were designed using the ONSHAPE software. And the PCBs were designed using EasyEDA software.

LDR design in dual axis solar tracker

The LDR design used to verify the brighter spot's intensity is as shown in figure below:

Balanced verification using light intensity

The formulas used for balanced verification are:

  1. light1-light3 < -range
  2. light1-light3 > range
  3. light4-light2 < -range
  4. light4-light2 > range

Where the light 1 to light 4 is the representation of light intensity of LDR 1 to LDR 4. When the light intensity of 2 LDRs that oppose to each other are unbalanced, the system will knows and it will triggers the servo motors to position the solar panel, that making the solar panel always perpendicular to the brighter spot. The servo motors will not be trigger when it reaches its maximum angle or the light intensities are balanced. 

Step 5: Block Diagram

Complete Block Diagram or Working Algorithm


Step 6: Circuit Diagram

Circuit Diagram of the demo model of the solar tracker.



Step 7: Code

#include <Servo.h>
#include <math.h>
int light_1;
int light_2;
int light_3;
int light_4;
static int pos1=90;
static int pos2=90;
const int range=20;
Servo Servo_1;
Servo Servo_2;
int Vo_AADAT;
int Vo_Fixed;
double Vin_AADAT;
double Vin_Fixed;
double real_Vo_AADAT;
double real_Vo_Fixed;
double C_AADAT;
double C_Fixed;
double P_AADAT;
double P_Fixed;

////////////////////////////////////////////////////////////////////////////////////////////////////////
int horizontal_right (int pos2){
Servo_2.attach(10);
while( pos2 < 180) { // goes from 180 degrees to 0 degrees

int light_2=analogRead(A1);
int light_4=analogRead(A3);

if( ((light_4-light_2)<range) && ((light_4-light_2)>-range)){ //-range< x <range, means balance
break;}
else if(pos1>90){
if((light_4-light_2)<-range){
break;} }
else{ //pos1<=90
if((light_4-light_2)>range){
break;} }

pos2+= 1;
Servo_2.write(pos2); // tell servo 2 to go to position in variable 'pos'
delay(15); // waits 15 ms for the servo to reach the position

}//end while
Servo_2.detach();
return pos2;
}//end void

////////////////////////////////////////////////////////////////////////////////////////////////////////
int horizontal_left (int pos2){
Servo_2.attach(10);
while( pos2 > 0) { // goes from 180 degrees to 0 degrees

int light_2=analogRead(A1);
int light_4=analogRead(A3);

if( ((light_4-light_2)<range) && ((light_4-light_2)>-range)){ //-range< x <range, means balance
break;}
else if(pos1>90){
if((light_4-light_2)>range){
break;} }
else{ //pos1<=90
if((light_4-light_2)<-range){
break;} }

pos2-= 1;
Servo_2.write(pos2); // tell servo 2 to go to position in variable 'pos'
delay(15); // waits 15 ms for the servo to reach the position

}//end while
Servo_2.detach();
return pos2;
}//end void
////////////////////////////////////////////////////////////////////////////////////////////////////////
int vertical_up (int pos1){
Servo_1.attach(9);
while(pos1 < 145){ // goes from 0 degrees to 180 degrees

light_1=analogRead(A0);
light_3=analogRead(A2);

if( ((light_1-light_3)<range) && ((light_1-light_3)>-range)){ //-range< x <range, means balance
break;}
else if((light_1-light_3)<-range){
break;}
else{pos1 += 1;
Servo_1.write(pos1); // tell servo 1 to go to position in variable 'pos'
delay(15); } // waits 15 ms for the servo to reach the position

}//end while
Servo_1.detach();
return pos1;
}//end function

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
int vertical_down (int pos1){
Servo_1.attach(9);
while(pos1 > 35){ // goes from 0 degrees to 180 degrees

light_1=analogRead(A0);
light_3=analogRead(A2);

if( ((light_1-light_3)<range) && ((light_1-light_3)>-range)){ //-range< x <range, means balance
break;}
else if((light_1-light_3)>range){
break;}
else{pos1 -= 1;
Servo_1.write(pos1); // tell servo 1 to go to position in variable 'pos'
delay(15); } // waits 15 ms for the servo to reach the position

}//end while
Servo_1.detach();
return pos1;
}//end function

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
void setup() {

Servo_1.attach(9);
Servo_2.attach(10);
Servo_1.write(pos1); //Reset Servo1 to original location
Servo_2.write(pos2); //Reset Servo1 to original location
delay(15);
Servo_1.detach();
Servo_1.attach(9);

Serial.begin(9600); //to trigger serial monitor
Serial.println("CLEARDATA"); //clears up any data left from previous projects
Serial.println("LABEL,Time,Timer,Date,ini_pos1,ini_pos2,Fin_LDR1,Fin_LDR3,Fin_LDR2,Fin_LDR4,VIn_AADAT,VIn_fixed,realV_AADAT(mV),realV_fixed(mV),C_AADAT(mA),C_fixed(mA),P_AADAT,P_fixed");
//always write LABEL, so excel knows the next things will be the names of the columns (instead of Acolumn you could write Time for instance)
Serial.println("RESETTIMER"); //resets timer to 0
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} //end void setup
///////////////////////////////////////////

void loop() {
/*
if( (light_1 || light_3)<=300){
pos1=180-pos1;
};
*/

Serial.print("DATA,TIME,TIMER,DATE,"); //writes the time in the first column A and the time since the measurements started in column B
Serial.print(pos1);
Serial.print(",");
Serial.print(pos2);
Serial.print(",");
////////////////////////////////////////////////////////////////////
//vertical first,then horizontal
//condition 3
light_1=analogRead(A0);
light_3=analogRead(A2);
if( (light_1 - light_3)>range ){
pos1 = vertical_up(pos1); };//end condtion 3
/////////////////////////////////////
// conditon 4
light_1=analogRead(A0);
light_3=analogRead(A2);
if( (light_1 - light_3)<-range ){
pos1 = vertical_down(pos1); };//end condtion 4
/////////////////////////////////////
light_2=analogRead(A1);
light_4=analogRead(A3);
if( (light_4-light_2)>range ){
if(pos1>90){
pos2 = horizontal_right(pos2);}else{
pos2 = horizontal_left(pos2);}
};//end condtion 1
///////////////////////////////////////
light_2=analogRead(A1);
light_4=analogRead(A3);
if( (light_4-light_2)<-range ){
if(pos1>90){
pos2 = horizontal_left(pos2);}else{
pos2 = horizontal_right(pos2);}
};//end condtion 2
///////////////////////////////////////
Vo_AADAT = analogRead(A5);
Vo_Fixed = analogRead(A4);
real_Vo_AADAT = (Vo_AADAT * 5) /1023;
real_Vo_Fixed = (Vo_Fixed * 5) /1023;
C_AADAT = real_Vo_AADAT/ 12250;
C_Fixed = real_Vo_Fixed/ 12250;
Vin_AADAT = (( C_AADAT * 22750 ) + real_Vo_AADAT);
Vin_Fixed = (( C_Fixed * 22750 ) + real_Vo_Fixed);
P_AADAT = pow(Vin_AADAT,2)/35000;
P_Fixed = pow(Vin_Fixed,2)/35000;

Serial.print(light_1);
Serial.print(",");
Serial.print(light_3);
Serial.print(",");
Serial.print(light_2);
Serial.print(",");
Serial.print(light_4);
Serial.print(",");
Serial.print(Vo_AADAT);
Serial.print(",");
Serial.print(Vo_Fixed);
Serial.print(",");
Serial.print(real_Vo_AADAT);
Serial.print(",");
Serial.print(real_Vo_Fixed);
Serial.print(",");
Serial.print(C_AADAT);
Serial.print(",");
Serial.print(C_Fixed);
Serial.print(",");
Serial.print(P_AADAT);
Serial.print(",");
Serial.print(P_Fixed);
Serial.print(",");
Serial.println(); //extra spaces to make debugging data easier to read
Serial.println();

delay(1000);
//////////////////////////////////////////////////////////////////////////////////////////////////
}//end void loop

Step 8: Experiments

I have ran though several experiments to investigate the power efficiency of my dual axis solar tracker. From the result obtained from experiments, it is proving that the performance of the dual axis solar tracker system is able to be enhanced with the incorporation of robotic technology. 

Step 9: Conclusion

A solar system with higher power generation could further faster the time for Return for Investment (ROI) and increase the public motivation to install the solar panel. Furthermore, it could further fulfil the Nation Goal which is to achieve 31% Renewable Energy (RE) share in the national capacity mix by 2025 and attain decarbonization of the electricity sector by 2035, which published by Ministry of Energy and Natural Resources and Sustainable Energy Development Authority (SEDA) Malaysia launched the Malaysia Renewable Energy Roadmap (MyRER).

Step 10: Video

Anything Goes Contest

Participated in the
Anything Goes Contest