Introduction: Dual Axis Solar Tracker With Online Energy Monitor
This project was one of my final projects I did on my exchange studies in Finland.
For this project I worked together with Fatbardh.
This is a much larger and more advanced version of one of my first projects ever.
Also a solar tracker: https://www.instructables.com/id/Arduino-Solar-Tracker/ .
The features of this solar tracker are:
- Solar tracking: making sure the solar panels are aligned to the sun as long as possible.
- Energy monitor: This measures the voltage and the current generated by the panels and calculates the generated Power and Energy.
- Data logging: this sends the data from the energy monitor into the cloud of ThingSpeak.
- Also there is an LCD to display the values of the energy monitor
In this instructable are technical drawings of the project included. And at step 10 there is a link to the complete project report and presentation.
Why:
To read more about the energy profit from this kind of system please read this chapter on wikipedia.
This is also my entry for the 3D printing contest:
I would love to have a 3D printer. It will help me a lot to do other projects. To make gears and enclosures. So if you found this Instructable interesting please vote for my Instructable in the 3D printing contest.
My excuses for my spelling mistakes, you may always let me know if you see some.
Step 1: Overview
In this step I’ll go over all the used components in this project.
Solar panels:
We used 2 solar panels of each 12V 150W which will bring the total to 300W.
Energy Monitor:
The energy monitor uses 2 current sensors, to measure the current.
And one voltage divider to get the voltage down to a voltage that the Arduino its analog-digital-converter or ADC can handle.
If you don't want to make it your self you can buy one as well: ebay link
Light direction sensor:
Light direction is detected by four Light dependent resistors or LDRs. Each of the LDRs is placed in a voltage divider and the signal is fed to the Arduino its ADC.
ebay link
The end stop Switch
The end stop makes sure the mechanical construction doesn’t collide in its self.
The motors
The motors are 12V linear actuators from internet.
And are controlled with a very simple H-bridge.
ESP8266
The ESP8266 is a cheap WIFI module which we use to send the data to a ThingSpeak datastream
The LCD
The display is used to display the energy monitor values
The microcontroller
The microcontroller we used was an Arduino ATMEGA 2560
Arduino MEGA 2560 R3 ~10$ - Ebay
The charger
For the charger you should search for a MPPT (max power point tracking) chager. And for sure not buy the one in the picture because this one overcharged our batteries and is not MPPT.
Step 2: Mechanical Construction.
We both didn't had a lot of experience with metal working. Because of this we got help from a local vocational school.
The construction exists of a strong steel beam, in which a second part is placed, by sliding in a rod in a hole. To this set-up are levers added to which we connect the linear actuators.
Have a look at the technical drawings (PDF) and the pictures to get a better idea of what it looks like.
The technical drawings and the renderings are made with Fusion 360
Step 3: The Light Sensor
This is the same principle as the previous version. 4 LDRs separated by a crossbeam. This time the crossbeam was 3d printed.
It works by comparing the average of LDR values of each side to determine which side to rotate to.
LDR holder 3d model: http://www.thingiverse.com/thing:1500571
Step 4: Motor Control Algorithm
The motor control algorithm is responsible for turning the motors on and off. This all depending on the data of the ligh sensor.
This also improved compared to my previous version. Now there is a hysteresis implemented. Comparable to a Schmitt trigger. So the motor turns only in if the light difference is larger than a certain threshold value, and it will only stop if the light difference is below a certain value.
Step 5: Energy Monitoring
The energy monitor works by measuring the voltage and current output of the panels.
By multiplying these two values you get the generated power.
P = U * I
P= Power in Watt; U = Voltage in Volt; I = Current in Ampere.
By integrating the Power over time you'll get the total generated Power.
Voltage measurement
The voltage measurement is done by a voltage divider over the panels output. To get the output range of the panels 0-22V down to a range of 0-5V to protect the analog-digital-converter.
Current measurement
The current measurement is done by two ACS712 hall effect current sensors.
Step 6: Data Logging
The data logging is done by sending all the data to a ThingSpeak channel.
This is done by an ESP8266 WIFI module.
Step 7: Microcontroller
Step 8: Software
If you want to use this code you should have a look at:
- EnergyMonConnections.h
- connections for the energy measurement
- solartrackerdefines.h
- settings and conenctions for the LDRs and solar tracker
- solarPanel.h
- to set the formulas right for the calculations of the ADC
- to set the formulas right for the calculations of the ADC
- internet.h
- set wifi name and password aswell as api key
Attachments
Step 9: Final Results!
Step 10: More Information
For much more information about this project.
I would like to recommend you my project report and presentation.
Step 11: Questions
If you have any questions, feel free to ask. If you can't find your answer in the comment section.
And I'll try to add more information to the Instructable depending where the most questions are about.
I hope you had fun reading my Instructable.

Runner Up in the
Outdoor Structures Contest

Second Prize in the
Automation Contest 2016

Runner Up in the
3D Printing Contest 2016

Participated in the
Outside Contest 2016
68 Comments
5 years ago
HI, can you please send me all drawings and how to connect everything?
runlud@gmail.com
Reply 6 months ago
hey have you got this project coding and connection?
Question 2 years ago
Hi, I was wondering if you had some kinds of bearings for the rotation of the pannel?(not the tilt) thanks
3 years ago
I build This as a hobby project. It's great and fun!
just a question:
Can some one help to write a routine to return the unit back to the east after sunset?
e.g. if PAN limit is "west", TILT limit is at the horizon and Average-LDR is <100 (dark-at-night)
I am using one Proximity sensor detecting East and West bounderies.
Also for TILT one proximity sensor for max flat pos. and max Horizontal.
Thnx in advance
Question 3 years ago
Hi, I'm working on a project like this for school. This project-page is verry useful for me but I still have any questions. I see an electrical protection in your electrical control cabinet. What kind of security is that and is this only to protect the input current from the solar panel?
Is that the only electrical protection that you use or are there others, if so, what kind of?
My second question. What is the capacity of your batteries and where do you use the enery for. In my project i have to charge a batterij with a chargecontroller and afterwards it have to charge smartphone via usb ports.
I realy hope you see this post!
Greetings
Niels Cleerbout
Question 3 years ago
Instead of servos to connect the H-bridge for two motors and 4 outgoing pins to your sketch, the new sketch is connected to your library... it's very difficult for me. How to combine it into one text sketch
int input1 = 3;
int input2 = 4;
int input3 = 5;
int input4 = 6; .
void setup() {
// Serial.begin (9600);
//Motors have been set up to drive the input to the output pins.
pinMode(input1,OUTPUT);
pinMode(input2,OUTPUT);
pinMode(input3,OUTPUT);
pinMode(input4,OUTPUT);
}
void loop() {
digitalWrite(input1,HIGH);
digitalWrite(input2,LOW);
digitalWrite(input3,HIGH);
digitalWrite(input4,LOW);
digitalWrite(input1,LOW);
digitalWrite(input2,LOW);
digitalWrite(input3,LOW);
digitalWrite(input4,LOW);
digitalWrite(input1,LOW);
digitalWrite(input2,HIGH);
digitalWrite(input3,LOW);
digitalWrite(input4,HIGH);
}
Question 4 years ago
Hello Geo Bruce!
Great job!
I really want to try your project for my home, but I doubt if I have enough knowledge... I am new with Arduino.
I cannot understand how to connect everything?
Can you send me a drawings diagram, please?
Thanks a lot,
Daniel,
4danielse@gmail.com
Question 4 years ago
how long should linear actuators be
4 years ago
An excellent project for a well earned degree.
I have bought two of George's 3D printed LDR array shields and have experimented with LDRs of high and low dark resistance. I have found that it is best to buy a number of LDRs and hand select LDRs with the same dark resistance to use in the LDR array.
I actually built George's earlier tracker that used an Arduino Uno R3 to work with different LDRs. George used pots to adjust the delay time and the tolerance values in his original code. However a delay time value of around 10 is a good arbitrary value, but you must experiment with the tolerance value to prevent hunting if you do not include the pots from the original Arduino code. I found that LDRs with high dark resistance required a tolerance value of around 25 while LDRs with a low dark resistance required a tolerance value of around 5 to provide accurate tracking and prevent gimbal hunting.
I live in Central Florida, USA and plan to build a solar tracker system similar to George's to provide emergency power when we lose power during a hurricane.
Regards,
TCIII AVD
5 years ago on Step 11
Hi Geo! Great job!!!! I have two questions: 1) Can I work with this idea for my home? 2) Where was instaled and connected the stop switch?
Thank you!
Question 5 years ago
It is possible to have the schematic diagram, of the completed project. Or at least how have you connected the linear actuator ? Please
Question 5 years ago
Is it possible to gett more dravings?
And information?
i want to make a 5 kw system , panels ca 37 volt
runlud@gmail.vom
Question 5 years ago on Step 7
I'm curious to know if this Arduino has the same capability as the Uno when it comes to control systems. Do you need to have the Uno hooked up to a laptop?
5 years ago
Hello,
First of all, GREAT project.
Kindly tell me what stroke length motors you have used?
Question 5 years ago on Step 8
great. project. i would need like to make a smelter for bee wax with duak axis solar tracker system. i am a beginner with program arduin and i would need help at code. i just need code for solar tracking system with end switch.
bestregards janko
5 years ago
See this image.. Oooh :)
5 years ago
Meh.. 2x 5v 200mah panels (east/west or north/south) placed flat on the edge of the pv panel . 2x 5v relays with flyback diodes & 5v PV blocking diode to both east or west relay. Connect battery positive to n.c. of both relays & battery negative to n.o. of both relays. Connect common of one relay to actuator positive , connect common of remaining relay to negative of actuator.
No micro, No mosfet, No worries.
Absolutely foolproof & cheap. Please find a simpler & more elegant way ?
5 years ago
Why add other sensors when the solar panel itself knows when it's squared up with the sun. Have the program measure panel output voltage each step until the voltage starts dropping then reverse to where the highest voltage was measured.
5 years ago
Hi Guys,
How did you calculate the rotational angle possible by the fixed arms and selected actuators. Really stuck on this.
Regards,
Adam
5 years ago
What azimuth angle can you achieve ? I have a 300mm (12 inch ) stroke actuator and am trying to reconcile the two pivot arm dimentions. As I read the plans, you have 330mm on the fixed pivot and about 715mm for the moving pivot. What is the stroke length you used ?