Introduction: Solar Tracker With Dual Axis Controlled by Arduino - Simple Materials
This solar tracker model construction is so simple that there is no need for a fully equipped laboratory in order to create it. I actually did it in my kitchen! On the other hand the main idea and software are such, that I would dare to use them in a much more sophisticated construction. I'm going to pinpoint a couple of changes in the code that would improve the function...and would be proud if somebody employ these...
Step 1: Materials Used
- arduino UNO
- adafruit motor shield V1
- one DGServo S05NF STD for changing the inclination
- one MG995 servo for changing the horizontal orientation
- three photocells CdS
- three 10K resistors
- one blue bright LED and a 220Ohms resistor
- one pringles box (I preferred paprika :) )
- foam carton, I think 50X50cm is more than enough
- three pins
- hot glue
- solar cells (mine are only for showoff!!)
- a big straw (for juice, say 0.5cm diameter)
- enough cables
- breadboard, although I used one is really optional
- screws as many as the carton tires (I used three which is the minimum possible)
- six AAA batteries and the right holder for them
Step 2: Base Construction
- The base size, especially the rectangle in the center as you can see in the plan I uploaded depends on the dimensions of the solar cells. For my small cells this was a rectangle 10X10cm of a foam carton.
- However the height of that base should have at least the dimension of the servo that you are going to use, as shown in my plan.
- After making that, you simply put the servo in the hole you've made in the center of the rectangle(see plan)
Step 3: Upper Part That Turns Horizontally
The cylinder I used was a part of a pringles box. It shouldn't be too high just for better balance purposes. The cylinder makes possible the use of three tires (made of carton) at 120 degrees from one another. If somebody uses a cube, he has to use a tire for each side (that makes four of them, more stable but more ..to move!)
The bottom of the cylinder should be covered so that the lever of the servo has something to be stuck on. The upper part can be uncovered.
Step 4: Solar Cells Holder
The solar cells holder is made in accordance to their size, as seen in the pictures. The important detail is that the pins are so located that the servo turns around the axis that goes through the center of mass of the solar cells + holding carton (see pdf). In this way the torque needed to change the inclination of the panel is minimum! (that means that you do not need a very powerful servo).
Step 5: Light Sensor Number, Position and Orientation
As for light sensors I used three photocells. The two of them are placed at the lower part of the solar cells so that there could be a comparison between the light they sense and the system decides to turn left or right. The third one is placed at the upper end of the solar cells so that there could be a comparison between the light it senses and the average light that sense the lower two.
The information about the circuitry of the photocells are in the pdf included from the masters of adafruit, so I can't say much more! Although I used 10K resistors and not 1K as suggested for sunlight, it works very well!
At last but not least the orientation should be carefully made. The photocells should be located in straw tubes (I covered them -inside- with aluminum foil for better light collection) so that the photocells avoid the ambient light. With simple geometrical optics can someone easily calculate that for an angle φ=30deg (see the orientation.pdf) the left photocell gets the double amount of light from the right one. The sun beams are parallel as they come from a very distant source. If the photocell tubes were parallel to one another they would take the same amount of light no matter the inclination!!
You can the see the inclined LDR tubes in the photos. The down two have inclinations apart from the upper and apart from one to another.(I hope the photos correct my english:) )
Step 6: Initialization of Light Sensors
This process is necessary for maximum accuracy while at least my LDR have different resistance for the same light!
So I exposed them to the same light source far more powerful than the ambient light. The difference at their resistance creates a correction factor in the code so that to correct every input as the system searches for the direction of the most powerful light source.
The user's part is shown on the video and goes as follows: after powering on the system, the blue LED blinks and then stays lighten for 5s. At this point I target the upper LDR. It takes the value the moment the LED turns off. Then is the turn of the down left LDR which is signaled from the next 5s that the LED is on. After the third 5s LED-on period comes the turn of the down right LDR measurement.
Step 7: The Code
From the upoloaded pdf the code could simply copied and pasted in arduino IDE.
The more than enough maybe serial.printing is only for checking the values!