Smart DIY Solar Tracker

by robotistan in Circuits > Arduino

1837 Views, 10 Favorites, 0 Comments

Smart DIY Solar Tracker

11.jpg

This project aims to get energy from the Sunlight. To do that, we’ll make a solar tracker system which has two-axis and lots of light sensors. The system will follow the light source and catch the energy with its solar panel. Then the system will be able to store the clean solar energy to use later.

Project has a few building steps. First of all we will build the platform to make the system able to move on its axis. After that, we will consider the placements and connections of electrical components. Then we finally will upload an embedded software which has been written specially for the solar tracker project.

If you don't just want to make this smart diy solar tracker and also want to get more info about solar system you can visit the our blog.

Getting Required Hardware

DSC00055x.jpg
DSC00049x.jpg

To build a solar tracker system, you'll need all of the necessary components, such as a solar panel, a microprocessor, and servo motors. You can buy a "Solar Project Kit" that includes all of the necessary components in one package. The project will then be simple to implement.


You can get the Required Hardware via : Review Portable DIY Solar Tracker on Amazon

Numbers of Parts

image.jpg

The numbers of the wooden sections are displayed in this figure. In the next stages, we will describe which portion to use and how to use it in this manner.

Lower Body Assembly - 1

1.jpg

First of all, we will assemble the servo motor in the number 1 part. Mount it using the two long screws that come out of the servo motor package.

Lower Body Assembly - 2

2.jpg

After that, you can mount the servo motor with "4 10 MM" spacers and 4 nuts to the part number 1 where we mount it. These spacers will help the upper body to rotate more stable.

Lower Body Assembly - 3

3.jpg

To raise the part number 1 from the bottom plate, you should mount 4 20 MM spacers using 4 nuts.

Lower Body Assembly - 4

4.jpg

And the next step is to assemble part number 1 on part number 2. Mount the part number 1 to the "20 mm" spacers on the part number 2 by using "4 6 MM" bolts. After this step, the assembly of the Solar Tracker's lower body will be finished.


After all these process, we are going to assemble the upper body.

Upper Body Assembly - 1

5.jpg

The upper body can be divided into two sections; The part that moves the solar panel left and right is the first part.

The second section can be thought of as the component that raises and lowers the solar panel. In this stage, we will see how to put the first section together..

The parts numbered 3, 4, 5, 6, and "4 10MM" bolts, respectively, are necessary for the assembly of the first portion.

Upper Body Assembly - 2

6.jpg

First of all, we brought together the parts 3, 5 and 6 together as shown in the picture. It is normal for the parts to fit together hard. You can apply some force in here. Of course, be careful to not brake them :)

Then, assemble the assembled parts to the part number 4 using "10 MM" bolts and nuts.

Upper Body Assembly - 3

7.jpg

First section that I mentioned before is now finished. Yet, there are a lot of works to do :

Now you can mount the servo head that comes out of the servo motor package to the part number 4 with the "M2" bolt in the set as shown in the picture.

Upper Body Assembly - 4

8.jpg

Then fix it to the part number 5, with the gear part of the servo motor upwards, with the screws that come next.

Upper Body Assembly - 5

9.jpg

Try to complete the servo assemblies as you can see in the picture above. You can use the screws from the servo package in the appropriate holes to fix the servos.

Upper Body Assembly - 6

10.jpg

If you've finished all of the previous procedures, you can move on to the second half of the upper part's assembly.

For the second section's assembly, use numbers 7, 8, 9, and 10. To screw the numbered pieces, servo cap, and M2 bolt from the set is required.

Upper Body Assembly - 7

11 (1).jpg

In the first step, fix the parts numbered 7 and 8 by passing them through the holes on the unshaped side of the part 9. The pieces can cross each other a little hard, so don’t worry. Just push the part in, not too much :)

Upper Body Assembly - 8

12.jpg

After fixing parts 7 and 8, you can mount the servo head to the part number 8 with the "M2" bolt in the set as shown in the picture.

Upper Body Assembly - 9

13.jpg

And now, you should fix the 15 mm bolt, which helps the part number 9 to move up and down, to the part number 7 with 1 nut as shown in the picture. After this step, the assembly of the second part will be finished..

Upper Body Assembly - 10

14.jpg

The first and second parts will be combined in this stage.

We pass the "15 mm" bolt to part number 7 through the hole on part number 6 and mount them with a nut, as shown in the picture. Please do not overtighten this nut.

Because if you squeeze it too tightly, it will be unable to move freely up and down. Then we screw the servo head in part 8 to the servo motor in number 5 with the little screw that came with the kit.

Upper Body Assembly - 11

15 (1).jpg

As the last step of the mechanical installation, fix 2 "6 mm" bolts with 2 nuts to the part number 2 as shown in the picture. The reason we do this is because solarx stays still on flat surfaces without wobbling. After this step, the assembly of the mechanical parts will be finished.

Electronics Assembly - 1

16.png

Using the following schematic and connection table, you can link LDR and servo motors to Arduino Shield. Pay carefully to the LDR modules' directions as you make your connections. Your solar panel will otherwise spin in the other way.

Electronics Assembly - 2

17.png

Stick the LDR modules to the 10 numbered pieces with the double-sided tape included in the set, with the help of the visual below.

Electronics Assembly - 3

18.png

After you've connected the LDR and servo motors, you can start using the energy from the solar panel to power things. It's up to you to figure out how to put the solar panel's energy to good use. Whether you're going to store it, charge the battery, or power your Arduino, you'll need it. I made a circuit schematic using the buzzer and LED that included with the package as an example. With the aid of the circuit diagram below, you may utilise the energy generated by the solar panel.

Electronics Assembly - 4

19.png

We added another project scheme as an example in case you wish to create additional projects using the energy you obtain from the sun. To complete this project, you'll need a battery charging circuit. Because the energy generated by the solar panel is not always consistent. You'll need consistent electricity to charge the battery. Additionally, the battery compartment will be required for easy battery removal and installation. The goods I'm referring about will not be included in the bundle. The content of the set is created in such a way that the buzzer and LED may be operated.

Uploading Arduino Code – 20

22.jpg

The construction of the platform is finished. But still our project needs coding to work. Upload this code into Arduino :

#include <Servo.h>
//defining Servoss


#define TOLERANCE       10
#define STEP_DELAY      7
Servo servohori;
int servoh = 0;
int servohLimitHigh = 160;
int servohLimitLow = 20;


Servo servoverti;
int servov = 0;
int servovLimitHigh = 160;
int servovLimitLow = 20;
//Assigning LDRs
int ldrtopl = A0; //top left LDR green
int ldrtopr = A3; //top right LDR yellow
int ldrbotl = A1; // bottom left LDR blue
int ldrbotr = A2; // bottom right LDR orange


void setup ()
{
  servohori.attach(10);
  servohori.write(45);
  servoverti.attach(9);
  servoverti.write(45);
  Serial.begin(9600);
  delay(500);
}


void loop()
{
  servoh = servohori.read();
  servov = servoverti.read();
  //capturing analog values of each LDR
  int topl = analogRead(ldrtopl);
  int topr = analogRead(ldrtopr);
  int botl = analogRead(ldrbotl);
  int botr = analogRead(ldrbotr);
  // calculating average
  int avgtop = (topl + topr) / 2; //average of top LDRs
  int avgbot = (botl + botr) / 2; //average of bottom LDRs
  int avgleft = (topl + botl) / 2; //average of left LDRs
  int avgright = (topr + botr) / 2; //average of right LDRs
  Serial.println(avgtop);


  if (TOLERANCE < avgbot - avgtop)
  {
    servoverti.write(servov + 1);
    if (servov > servovLimitHigh)
    {
      servov = servovLimitHigh;
    }
    delay(STEP_DELAY);
  }


  else if (TOLERANCE < avgtop - avgbot)
  {
    servoverti.write(servov - 1);
    if (servov < servovLimitLow)
    {
      servov = servovLimitLow;
    }
    delay(STEP_DELAY);
  }


  else
  {
    servoverti.write(servov);
  }


  if (avgleft - avgright > TOLERANCE)
  {
    servohori.write(servoh + 1);


    if (servoh > servohLimitHigh)
    {
      servoh = servohLimitHigh;
    }
    delay(STEP_DELAY);
  }


  else if (avgright - avgleft > TOLERANCE)
  {
    servohori.write(servoh - 1);


    if (servoh < servohLimitLow)
    {
      servoh = servohLimitLow;
    }
    delay(STEP_DELAY);
  }


  else
  {
    servohori.write(servoh);
  }
  delay(STEP_DELAY);
}



Our project is now ready!

Downloads

Conclusion

cover.jpg

You have successfully completed the Solar Tracker Project!