DIY Portable Single Axis Solar Tracker
by Progressive Automations in Workshop > Solar
20126 Views, 125 Favorites, 0 Comments
DIY Portable Single Axis Solar Tracker
Solar power is one of the most accessible types of renewable energy and is rapidly increasing in efficiency and affordability. For this project, we will show you how we used our PA-14 Mini Linear Actuator to follow the sun through a single axis of motion using a custom built solar tracker. This increases the power yield of the solar panel by up to 25% more than one in a fixed position. In this Instructable we will show you how we put together our very own Portable Single-Axis Solar Tracker!
Control System Overview Part 1
Control System Components
1. 1 x PA-14 mini-linear actuator – 6 inch – 150 lbs force
2. 1 x Sungold SGM-90W-18 90 Watt Solar Panel
3. 1 x Genasun GV-10 12VDC Solar Panel Charge Controller
4. 1 x Arduino Micro PLC
5. 1 x Wasp Motor Controller
6. 2 x 10k Ohm Photoresistor and 2x 7k Ohm Resistor
7. 1 x 12VDC Lithium Rechargeable Battery
8. 1 x Cigarette lighter connector for 12V accessories (optional)
Control System Overview Part 2
Our mini linear actuator is controlled by an Arduino Micro microcontroller using a Wasp motor controller. It takes the reading from photoresistors to determine which side of the panel is receiving the most light and adjusts the position of the solar panel until the photoresistor readings are almost equal. This will ensure that the solar panel is pointed directly at the sun and produces maximum power.
Solar Panel Power
There are three simple steps in converting solar energy to electrical energy and each step is performed by an individual component.
1. Sungold Solar Panel SGM-90W-18V: Absorbs photons from sunlight, and converts it to electricity which is outputted as a varying DC voltage
2. Solar Charge Controller Genasun GV-10: Regulates the DC voltage from the solar panel to charge the battery
3. 12VDC Lithium Ion Battery: Stores the electricity for use immediately or at a later time.
For our system we attached a car cigarette lighter connector to the battery. This allowed us to easily connect 12V automotive accessories to the solar panel. In our case we connected an oscillating fan, a high power LED spotlight and even a phone charger.
Control System Overview Part 3
Motor Controller
The Wasp Motor Controller is controlled by the Arduino Micro using Pulse Width Modulation (PWM). The Wasp then takes power from the 12V battery to make our mini linear actuator extend and retract. We chose our model with 150 lbs of force since it draws less current compared to our 35 lbs force version for the load we have in this project.
Control System Overview Part 4
Light Sensor
To detect the light intensity from the sun, we utilized a 10k Ohm photoresistor. A photoresistor behaves like a variable resistor controlled by light. The resistance will decrease as the light intensity increases. We will need two sensors to determine the position of the sun, one on the east side of the panel, and the other on the west.
Connect the 10k Ohm photoresistor and 7k Ohm resistor in series, and supply a 5V signal from the Arduino Micro. Take the voltage reading across the 7k Ohm resistor using an analog input on the Arduino Micro. Since the circuit behaves exactly like a voltage divider, the analog reading from the 7k Ohm resistor will increase as the light intensity increases.
Please note that the photoresistor is very sensitive and you may need to limit the light received from the sun. For our application, we found that pointing it to the side of the panel and covering it with translucent tape worked best.
Programming
The complete program can be found on the next step under ‘Source Code’. This section of the Instructable will explain the individual components of the program.
Servo Library
The Servo.h library enables the Arduino Micro to control RC servo motors through single line commands as follows:
myservo.writeMicroseconds(1000); // Actuator full speed backwards (1000)
myservo.writeMicroseconds(1520); // Actuator stop (1520)
myservo.writeMicroseconds(2000); // Actuator full speed forwards (2000)
Pin Assignments
Pin 10 and 11 on the Arduino Micro are set to power and ground to drive the WASP controller. Pin 6 and 8 on the Arduino Micro are assigned to analog 7 & 8, which is set to take readings from the east and west sides of the light sensor.
Variable Declaration
In this section variables are declared and initialized. They will be used in the functions to store readings from the light sensors. The sample time and adjustment interval are also declared here. Their value can be changed to set the interval time between each readings as well as the time between each angle adjustment made to the solar panel. The initial value is set to take a reading every 10 seconds and adjust the solar panel position every 10 minutes.
Set Input & Output
Set WASP_Power and WASP_Ground to output in order to drive the WASP controller, sensor_west_pin1 and sensor_east_pin2 to input to take readings from the photoresistors light sensors.
Sensor Readings
To determine which direction the solar panel should be facing, the two photoresistors act as light sensors to read the light intensity of each side of the solar panel. The program we used will take a sample reading every 10 seconds for 10 samples, and then take the average readings from the two photoresistors to compare.
Solar Panel Movement
With the Arduino Micro we are using PWM control to drive the actuator. It is a simple and reliable control method for the linear actuator. Depending on the value we set for PWM, we can extend, retract or stop the actuator for any period of time as long as it does not exceed the actuators duty cycle.
From our sensor readings, we have two averaged light intensity values from both sensors on the west and east sides. It will then execute the movement command to extend, retract or remain stationary depending on the difference between the two sensors’ readings. This set of commands will run every 10 minutes to ensure the solar panel is always getting the most amount of sunlight.
Overnight Position Reset
One more feature we can implement with the solar tracker is a reset function. Basically if the solar tracker was left to run over a few days’ period, we want to ensure that it will reset to its initial position by the next morning. For this we will use a simple counter function that will reset the position of the solar tracker if it has not moved for the past 10 hours. That will indicate it is nighttime which will make the solar tracker reset to its initial position and wait for the following days daylight.
Source Code
Please see the code we used below for this iteration of our solar tracker. Keep in mind that the values can always be changed to accommodate different regions and seasons throughout the year.
<p>/*<br> This program will allow the solar panel to track the sun, and drive the actuator using
pwm. Readings from two photoresistors will be taking from each side of the solar panel.
A number of samples will be taken, and a average reading will be calculated in order
to determine which side has a higher sunlight intensity. The linear acutor will then
either extend or retract to angle the solar panel so it is facing the sun.
A reset function is implemented so it will move the solar panel to its defult position.
This allow the solar panel ready to charge in the morning after remain stationary during
night time. </p><p> Hardware used:
1 x Arduino Micro
1 x WASP Motor Controller
1 x PA-14-6-150 Linear Actuator
2 x Photoresistors
2 x 7k ohm Resistors
*/
/*
SERVO LIBRARY
Include the Servo library and create the servo object.
*/</p><p>#include
Servo myservo; // Create servo object to control a servo</p><p>/*
PIN ASSIGNMENTS
Assign pins from WASP Controller and Arduino Micro to appropriate variable.
*/</p><p>const int WASP_Power = 10; // Assign pin 10 to Power for the WASP controller
const int WASP_Ground = 11; // Assign pin 11 to Ground for the WASP controller
const int sensor_west_pin1 = 7; // A7 pin 6 sensor input 1 west
const int sensor_east_pin2 = 8; // A8 pin 8 sensor input 2 east</p><p>/*
VARIABLE DECLARATION
Delcare variable that will be used in the functions later and initilize them.
*/</p><p>int sensor_west[10]; // 10 sample readings from sensor on the west side
int sensor_east[10]; // 10 sample readings from sensor on the east side
int reset_counter = 0; // Time counter for resetting the solar panel position
const int sample_time_interval = 10000; // Change this value to set the interval between each sample is taken (ms)
const long solar_panel_adjustment_interval = 600000; // Change this value to set the interval between each adjustment from the solar panel (ms)</p><p>void setup()
{</p><p>/*
SET INPUT & OUTPUT
Set the input and output to the variables and pins.
*/</p><p> myservo.attach(9); // Attaches the servo on pin 9 to the servo object
pinMode(WASP_Power, OUTPUT); // Set Power to output
pinMode(WASP_Ground, OUTPUT); // Set Ground to output
digitalWrite(WASP_Power, HIGH); // Set 5V to pin 10
digitalWrite(WASP_Ground, LOW); // Set GND to pin 11
pinMode(sensor_west_pin1, INPUT); // Set sensor west pin to input
pinMode(sensor_east_pin2, INPUT); // Set sensor east pin to input
}</p><p>void loop()
{
/*
SENSOR READINGS
Take 10 sample readings from both sensors, and take the average of the inputs.
*/</p><p> int solar_input_west = 0; // Sun light intensity readings from sensor west
int solar_input_east = 0; // Sun light intensity readings from sensor east</p><p> for( int i=0; i<10; i++)
{
sensor_west[i] = analogRead(sensor_west_pin1); // Taking the analog readings from sensor west
sensor_east[i] = analogRead(sensor_east_pin2); // Taking the analog readings from sensor east
solar_input_west = sensor_west[i] + solar_input_west; // Sum all the inputs from sensor west
solar_input_east = sensor_east[i] + solar_input_east; // Sum all the inputs from sensor east
delay(sample_time_interval);
}</p><p> solar_input_west = (solar_input_west) / 10; // The the average of input signals from sensor west
solar_input_east = (solar_input_east) / 10; // The the average of input signals from sensor east</p><p> /*
SOLAR PANEL MOVEMENT
The solar panel will tilt toward west if the sunlight intensity detected on the west side of the panel is greater than the
one detected on the east side. The solar panel will tilt toward east if the sunlight intensity detected on the east side
is greater than the one detected on the west side. However, if the readings from both side are similar, the solar panel
will remain stationary.
*/</p><p> if( solar_input_west - solar_input_east > 20) // If the sunlight intensity is higher on the west side of the panel
{
myservo.writeMicroseconds(2000); // Full speed forwards (2000) signal pushing the solar panel to the left(west)
delay(500); //0.5 seconds
reset_counter = 0;
}
else if( solar_input_east - solar_input_east > 20) // If the sunlight intensity is higher on the east side of the panel
{
myservo.writeMicroseconds(1000); // Full speed backwards (1000) signal pulling the solar panel to the right(east)
delay(500); //0.5 seconds
reset_counter = 0;
} </p><p> else // If ther sunlight intensity is similar from both side of the panel
{
myservo.writeMicroseconds(1520); // Stationary (1520) signal stop the solar panel from moving
reset_counter++;
}
delay(solar_panel_adjustment_interval); // Delay before another adjustment will be made</p><p>/*
OVERNIGHT POSITION RESET</p><p> If the solar panel will be used overnight, the controller will detect the panel remained stationary for more than 10 hours,
It will then reset the solar panel to its default position facing east.
*/
if( reset_counter > 60) // After the solar panel remained stationary for more than 10 hours, it will move to its default position
{
myservo.writeMicroseconds(1000); // Full speed backwards (1000) signal pulling the solar panel to the right(east)
delay(12000); //12 seconds
myservo.writeMicroseconds(1520); // Stationary (1520) signal stop the solar panel from moving
delay(500); //0.5 seconds
myservo.writeMicroseconds(2000); // Full speed forwards (2000) signal pushing the solar panel to the left(west)
delay(1000); //1 seconds
reset_counter = 0;
}
}</p>
Single-Axis Tracker Hardware
There are many different ways to create a single-axis solar tracker. The easiest method would be to construct the frame using PVC pipes and PVC angled joints. The most important part is the ability to track the sun and this can be done using a one of our PA-14 mini-linear actuators and a BRK-14 mounting bracket.
For our build, we chose a tripod frame and 3D printed some parts to create the joints and mounts. This allowed us to create an easily portable solar tracker frame with the ideal amount of tilt and tracking ability.
Components
1. 3/4" Copper pipe
2. 1 x 3/4" Copper pipe end cap
3. 3 x 3/4" Gear clamp
4. 3/4" PVC pipe
5. 1 x 1” Gear clamp
6. 5 x M6 bolt, nut and washer
7. Various 3D printed brackets
8. 2 x Actuator mounting pin (can be found in the set BRK-14)
9. 1 x PA-14 mini-linear actuator
Optimum Tilt
Aside from adding the ability to track the sun, another way to increase the efficiency of the solar panel is to adjust the fixed tilt based on your location. The optimum tilt is determined by your location’s latitude. For more information on this, check out this link: Solar Panel Tilt.
Take a look at our dimensional drawing from the side perspective to show how we calculated our tracker’s tilt.
You can calculate Length B using the following equation: Length B = tangent Angle ÷ Length A
Fabrication and Assembly
Here are the step took in the build process of our custom Portable Single-Axis Solar Tracker.
1. Calculate the lengths needed for optimum tilt
2. Gather all components needed
3. Attach brackets to solar panel by drilling holes and fastening with appropriate bolts
4. Cut copper and PVC pipes to length
5. Paint and sand copper and PVC pipes
6. Attach brackets to the pipes and secure with gear clamps
7. Mount the PA-14 mini-linear actuator and secure using BRK-14 actuator mounting brackets and pins
Conclusion
We hope you enjoyed our Instructable on creating a Portable Solar Tracker. Be sure to check out our video to see our build process and view the finished Solar Tracker in action.
Subscribe to our channel and follow us on social media so you can be the first to see all of our latest automation projects and videos. Let us know in the comments what kind of project you would like to see next! Make sure to visit our site for all your automation needs.
http://www.progressiveautomations.com/
Follow, Like and Subscribe!
Twitter - twitter.com/ProgAutoInc
Facebook - www.facebook.com/ProgressiveAutomations
Youtube - https://www.youtube.com/user/MrActuators