The goal of this project is to generate energy from sunlight. To accomplish so, we'll build a two-axis solar tracker system with several light sensors. The device will track the source of light and harvest the energy using its solar panel. The technology will then be able to store clean solar energy for later use.
There are a few phases to completing the project. First, we'll construct the platform that will allow the system to rotate on its axis. After that, we'll look at electrical component layout and connections. Finally, we'll publish a piece of embedded software that was created just for the solar tracker project.
Do not forget to visit Robotistan's Blog for more : Solar Tracking System Using Arduino
Step 1 : Getting Required HardwareYou'll need all of the required components to create a solar tracker system, including a solar panel, a microcontroller, and servo motors. You may purchase a "Solar Project Kit" that has all of the required components in one convenient box. The project will be straightforward to implement after that.
You can get the Solar Tracker Kit from : DIY Educational Sun Tracker Kit
Step 2: Check Numbers of PartsIn this diagram, the numbers of the wooden components are shown. In the next steps, we'll go through which piece to utilize and how to use it.
Step 3: Base Body Mounting - 1First of all, we will install the servo motor in the number 1 part. Mount it using the two long screws that come out of the servo motor package.
Step 4: Base Body Mounting - 2Mount 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.
Step 5: Base Body Mounting - 3To raise the part number 1 from the bottom plate, mount 4 20 MM spacers using 4 nuts.
Step 6: Base Body Mounting - 4The next step is to put component number 1 on top of part number 2. Using 4 6 MM bolts, attach the part number 1 to the 20 mm spacers on the part number 2. The construction of the solarx lower body will be completed after this phase.
Step 7: Remainder Body Mounting - 1There are two portions to the upper body. The first portion is the one that adjusts the solar panel left and right. The component that rises and lowers the solar panel may be thought of as the second portion. I'll teach you how to put the first part together in this step.
The construction of the first section requires the pieces numbered 3, 4, 5, 6, and 4 10MM bolts, respectively.
Step 8: Remainder Body Mounting - 2To begin, we must join the pieces 3, 5, and 6 as depicted in the figure. It's typical for the pieces to have a difficult time fitting together. You have the ability to exert some force. Then, using 10 MM bolts and nuts, join the finished pieces to part number 4.
Step 9: Remainder Body Mounting - 3After the assembly of the first part is finished. 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.
Step 10: Remainder Body Mounting - 4Then fix it to the part number 5, with the gear part of the servo motor upwards, with the screws that come next.
Step 11: Remainder Body Mounting - 5The first part of the upper part. Screw the servo motor, which you screwed into the part number 1, with the small screw that comes out of the servo package as shown in the picture.
Step 12: Remainder Body Mounting - 6You can proceed to the second half of the top part's assembly if you've completed all of the preceding steps. Use numbers 7, 8, 9, and 10 to assemble the second segment. An M2 bolt from the set is required to screw the numbered parts, servo cap, and servo cap together.
Step 13: Remainder Body Mounting - 7In the first step, fix the pieces 7 and 8 by passing them through the holes on the unshaped side of the piece 9. The pieces can cross each other a little hard, so don’t worry.
Step 14: Remainder Body Mounting - 8After you've completed parts 7 and 8, you're ready to go on to part 9. As illustrated in the figure, attach the servo head to component number 8 using the M2 bolt included in the package.
Step 15: Remainder Body Mounting - 9As indicated in the figure, attach the 15 mm bolt that allows the part number 9 to move up and down to the part number 7 with one nut. The assembly of the second half will be completed after this step.
Step 16: Remainder Body Mounting - 10In this step, the first and second sections will be joined. As illustrated in the figure, we feed the 15 mm bolt we fastened to part number 7 through the hole on part number 6 and secure it with a nut. Please don't tighten this nut too much.
Because if you squeeze it too hard, it won't be able to move up and down easily. Then we use the small screw that comes with the kit to attach the servo head in part 8 to the servo motor in number 5.
Step 17: Remainder Body Mounting - 11Fix 2 6 mm bolts with 2 nuts to component number 2 as the final phase of the mechanical installation, as indicated in the photo. We do this because solarx does not wobble when it is placed on level surfaces. The mechanical parts assembly will be completed after this phase.
Step 18: Electronics Connection - 1You may connect LDR and servo motors to Arduino Shield using the schematic and connection table below. As you connect the LDR modules, pay attention to the instructions. Otherwise, your solar panel will rotate in the other direction.
Step 19: Electronics Connection - 2With the guidance of the graphic below, adhere the LDR modules to the 10 numbered pieces using the double-sided tape supplied in the package.
Step 20: Electronics Connection - 3You may start utilizing the energy from the solar panel to power items after you've connected the LDR and servo motors. It's up to you to find out how to make the most of the solar panel's electricity. You'll need it whether you're planning to store it, charge the battery, or power your Arduino. As an example, I created a circuit design utilizing the buzzer and LED that included with the kit. You may use the electricity generated by the solar panel by following the circuit schematic below.
Step 21: Electronics Connection - 4We've included another project idea as an example in case you want to do more with the energy you get from the sun. You'll need a battery charging circuit to finish this project. Because the solar panel's energy output is not always constant. To charge the battery, you'll need a steady supply of energy. The battery compartment will also be required for simple battery removal and installation. The items I'm referring about aren't included in the package. The set's content has been designed in such a manner that the buzzer and LED can be activated.
Step 22: Uploading Project Codes – 20The platform's construction is complete. However, our project still need code to function. This code should be uploaded to 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);
}
Step 23: ResultYou have successfully completed the Solar Tracker Project!
Comments