DIY Solar Tracker

About: STEMpedia is a one-stop STEM education solution that blends theory with experiential learning, thus helping develop curiosity, creativity, and innovation and problem-solving skills - the must haves in the 21...

Intro: DIY Solar Tracker

A light tracker tracks the direction of the incoming light. It can be used along with solar panels which are programmed to move in the direction of the sun to receive the maximum amount of incident light. Solar trackers are built on the same principle to capture maximum sunlight.

In this project, we will be building a light tracker using light dependent resistors to detect the direction of incoming light from the torch of your Smartphone and two servo motors to align in that direction.

Ready. Set. Go!

Step 1: Things You'll Need:

You can also buy the evive Starter Kit, as there is the number of projects from it. As there are lots of projects listed on Instructables which are made with the help of it.

Step 2: Making of the Base

  • Attach 30 mm standoffs to the chassis at the positions shown. Fasten using M3 bolts of 8mm length.
  • Insert a servo motor in the base servo holder and fasten it to the holder using M2 bolts of 12mm length and M2 nuts.
  • Fasten the motor holder at the top of standoffs using M3 bolts of 8mm length.

Step 3: Fixing the Servo Horn

Our light tracker requires two servos, one for rotation about each axis. This is one of the two. Also, to produce combined rotation, both the motors should be connected. Insert the second motor in the servo motor holder. The same assembly shall carry the micro horn which fits into the first motor. Fasten the horn to the servo motor holder using self-threading M2 screws, as shown in the corresponding image.

Step 4: Fixing the Second Motor

  • Fix the motor holder to the base through the rectangular slots available.
  • Insert the second servo in the slot on the holder and fasten using M2 bolts and nuts.

Step 5: Arranging the Light Tracker Plates

We have assembled the individual motors. Now, we will assemble our 4 LDR sensors which will detect incoming light from the four directions.

  • Arrange the light tracker plates 1 and 2 provided with the kit as shown in the image below.
  • You can see how the surface has been divided into 4 sections. One LDR will be inserted in each hole. This, along with the LDRs will be attached to the servo. Through the combined rotations of the 2 servos, this assembly will be able to receive light from all possible directions. Fasten a servo horn to it using M2 screws.

Step 6: The Sunflower Cutout

Make a sunflower-shaped cutout using a hard paper as shown and paint it with your favorite color. You need to make a + shaped cut at the center and four small holes in each section of the cutout. Then place it on the top of the light tracker plate assembly by matching the slots.

Here, we have 3D printed the shape.

Want to make more 3D printed stuff? Now, whatever you design can come to life. Own a 3D printer now!

Step 7: Inserting LDRs

Insert LDRs (light dependent resistors) into the holes made.

Step 8: Connecting the Servo to Sunflower Assembly

There is a free horn on our sunflower like assembly. We will lock our second servo motor to the horn through the screw provided with servo accessories. Using evive controls menu, set the servo angle to about 90°

Step 9: Completing the Assembly

There is a free horn at the bottom of this assembly which we will connect to the remaining servo. Now you can see how each servo’s individual rotation will provide an all-around rotation of the sunflower-like structure on top hence ensuring that it is able to detect the light falling on different sections.

Step 10: Add-On: Solar Panel

Here, the most popular use of the Sun Tracker is when we attach Solar Panel. In Solar Panel, if the Photoresistors are, then the solar panel will then check which part of it is receiving more light. Thus, adjusting the position accordingly. Which results in increased efficiency.

We have then placed this Sun Tracker in our home.

Step 11: Circuitry

Connect the LDRs and 10 kOhm resistors directly to the breadboard. Make the remaining connections using jumperwires. Refer to the circuit diagram for ensuring proper connections.

Step 12: Logic

From the assembly, you can observe that the four LDRs are separated by the wall. Each LDR will detect light falling on its section. We will number each LDR for reference. If both the servos are at the 90-degree position, then the sunflower will be facing upward. The top left LDR will be named LDR1. Similarly, we will name LDR2 (top-right), LDR3 (bottom-left) and LDR3 (bottom-right).

  • Upper Region – LDR 1 and LDR 2
  • Lower Region – LDR 3 and LDR 4
  • Left Region – LDR 1 and LDR 4
  • Right Region – LDR 2 and LDR 3

We will also name the two servos – Vertical (servo on the base) and Horizontal (servo on the top).

Using the horizontal servo, we will reduce the difference in the light falling on the upper region and lower region to zero. If the light is coming from the upper region, then the upper region LDRs will have higher reading as compared to the lower region. Hence we have to rotate the horizontal servo motor forward incrementally.

If the lower region has higher value, then we will move the sunflower backward incrementally.

To move the sunflower sideways, we will use the vertical servo. Whenever there is a difference in the values of the left region and the right region, it will move to reduce it to zero. If the light is more on the left region as compared to the right region, we will decrease the servo angle by 5° each time until the difference is zero. If the light is more on the right region as compared to the left region, we will increase the servo angle by 5° each time until the difference is zero.

To decide the direction in which the servos should move, we will consider the total amount of light received on a region, i.e. the sum of readings at LDR analog pins.

Step 13: Scratch Script

The code is written in two halves, one for each motor.

Initially, both are set at an angular position of 90 degrees as shown in the main script. CalibrateVerticalServo and CalibrateHorizontalServo are two blocks defined to track light.

Create variables LDR1_Value, LDR2_ Value, LDR3_Value and LDR4_Value to store the analog value of the LDR connected to analog pin A0, A1, A2, and A3 respectively.

Create variables, HorizontalServo, and VerticalServo to store servo angle.

Also, create variables Average1 and Average2 to store the average LDR value of the upper region and lower region.

For CalibrateHorizontalServo block, Average1 represents the average light falling on the upper region while Average2 represents the average light falling on the lower region.

We only check the magnitude of difference in the variables using the abs block.

The physical angle will only change when we use the set servo pin angle block to set the angle equal to the variable HorizontalServo.

To know more about Scratch visit here

https://thestempedia.com/tutorials/getting-started-scratch/

Step 14: Conclusion

With this, your very own solar tracker is ready! Now watch as it follows you and your Smartphone’s light wherever you go!

To explore more projects,

visit: http://thestempedia.com/projects

Share

    Recommendations

    • Audio Contest 2018

      Audio Contest 2018
    • Optics Contest

      Optics Contest
    • Electronics Tips & Tricks Challenge

      Electronics Tips & Tricks Challenge

    Discussions