 # Dual axis tracker design

Dear all,
I am trying to design dual axis tracker using arduino due/mega. Here i am attaching output table got from arduino mega for
http://www.pveducation.org/pvcdrom/properties-of-sunlight/elevation-angle
http://www.pveducation.org/pvcdrom/properties-of-sunlight/declination-angle
http://www.pveducation.org/pvcdrom/properties-of-sunlight/solar-time

above formula i used to get Mc zenith and Mc azimuth on arduino megA controller.

The zenith and azimuth i got from below calculator
http://www.nrel.gov/midc/solpos/spa.html

For dual axis tracker i am using
2 linear actuator(24v,3A,400~600mm stroke length & 10000N load capacity) for N-S & E-W angle tracking.
Inclinometer1 (0~90deg,0~5v analog) for N-S direction
Inclinometer2 (0~360deg,0~5v analog) for E-W direction
2 limit switches /reed switches for stopping motor when desired position reached.

Now my question here

1. how to use zenith and azimuth angle in dual axis tracker??
2. if i use zenith and azimuth angle as for example in table attached around 12:30 it goes to 330 degree is it right or wrong.
3)Any change in the equation to be made to determine sun position.
3. if any help me with pseudo code like how can make it work will be appreciable.
``````Move_azimuth()
{
if((Azimuth_calc-Azimuth_inc)>=1.0 ))
{
Motor_action=REV;
}else
{
Motor_Action=FW;
}

if(Limit_Switch==1&& Azimuth_calc==360)
{
Motor_action=Stop;
}

}

Move_zenith()
{
if((zenith_calc-zenith_inc)>=1.0 ))
{
Motor_action=REV;
}else
{
Motor_Action=FW;
}

if(Limit_Switch==1&& zenith_calc==360)
{
Motor_action=Stop;
}

}
``````

AMPS-N: Now my question here 1) how to use zenith and azimuth angle in dual axis tracker?? 2) if i use zenith and azimuth angle as for example in table attached around 12:30 it goes to 330 degree is it right or wrong. 3)Any change in the equation to be made to determine sun position. 4) if any help me with pseudo code like how can make it work will be appreciable.

1) I assume you mean a dual axis [u]solar[/u] tracker, since this is what you keep asking about. If you don't know what zenith and azimuth angles are, Google them. Then it should be obvious how they apply to a solar tracker.

2) Since nobody but you knows what angle you are referring to or whether that is the correct value for the time and location of the test, only you can answer that question. Fundamentally, you need to know what the desired behaviour is before you can test it, and if you don't understand what behaviour you want then stop and work that out before you go any further.

3) If the equation produces the correct answer, then it is good enough. If it doesn't, it isn't.

4) At the moment I don't understand whether the code you have is complete and whether it works correctly. If you are asking for advice about solving a problem with your project you need to be clear what problem you're asking for advice about. If you just want somebody to work along with you and help you design and implement your solution you should be asking for help in the Gigs and Collaborations section of the forum. Note that most people would expect to be paid for working for you.

Now currently i came to stage where i found zenith and azimuth angle. I calculated those angle and compare with calculated upto 50 years from now, based on above links. i got offset 0.1 degree~0.5 degree some time.

My problem is i dont know how to use this angle to determine sun position. check this animation http://astro.unl.edu/classaction/animations/coordsmotion/altazimuth.html I am confused with how this angle being taken in calculation. because various people different angle for calculation.

SO my question is how could i take these angle adjust my tracker position???

AMPS-N: Now currently i came to stage where i found zenith and azimuth angle. I calculated those angle and compare with calculated upto 50 years from now, based on above links. i got offset 0.1 degree~0.5 degree some time.

My problem is i dont know how to use this angle to determine sun position.

I suspect you have misunderstood what azimuth and zenith angles are. They give you a direction relative to your location. If you calculate them for the position of the sun, they give you the direction to the sun. Having calculated them for the sun's position you don't "determine sun position" from them - they [u]are[/u] the answer, expressed as an azimuth and zenith angle.

If that case , how can determine the sun position. In below code http://kokoraskostas.blogspot.gr/p/include-timer.html why he adjusting tracker position to zenith and azimuth angle. Can you elobrate so i can understand proper manner .

is there any relation that gives sun postion depend on zenith and azimuth,

If i am wrong, Once we know Direction of sun how can we find sun position.

I suspect you have misunderstood what azimuth and zenith angles are. They give you a direction relative to your location. If you calculate them for the position of the sun, they give you the direction to the sun. Having calculated them for the sun's position you don't "determine sun position" from them - they are the answer, expressed as an azimuth and zenith angle.

Why do you need zenith and azimuth to track the sun? Four light dependent resistors (LDRs) and 20 or so lines of code should do it without any complicated maths.

...R

AMPS-N: Once we know Direction of sun how can we find sun position.

You still don't seem to understand what azimuth and zenith angles are. If you calculate the position of the sun in terms of azimuth and zenith angles, that tells you where the sun is relative to you i.e. which direction, and how far above the horizon. You don't "find" the position of the sun from that - it [u]is[/u] the position of the sun, expressed as azimuth and zenith angles. It is the answer to the question of which direction do you need to point your solar collector, or whatever it is that you want to track the sun.

Your remaining problem then is to convert from azimuth/zenith coordinates to actuator positions. How you do that depends on the design of the actuators and whatever mechanism you use to read their position, but it would be straight forward trigonometry.

The "zenith position" of the sun is where it is in the sky at the high point, at about local noon, so that doesn't do you any good for a solar tracker.

What you want are the altitude and azimuth coordinates (in the local horizontal coordinate system) of the sun at any time during the day. They are described here: https://en.wikipedia.org/wiki/Horizontal_coordinate_system

Given those coordinates, it is a matter of very simple geometry to set up a device that points a panel in the proper direction.

Edit: sometimes the altitude angle is referred to as the elevation, as done by the NOAA solar position calculator.

jremington: The "zenith position" of the sun is where it is in the sky at the high point, at about local noon, so that doesn't do you any good for a solar tracker.

The term 'zenith [u]angle[/u]' is also used to refer to the angle between the zenith (i.e. local vertical) and the position of interest. In other words it is the complement of the altitude angle aka elevation.

My location is INDIA , 12.9667° N, 77.5667° E

``````You don't "find" the position of the sun from that - it is the position of the sun, expressed as azimuth and zenith angles. It is the answer to the question of which direction do you need to point your solar collector, or whatever it is that you want to track the sun.
``````

I cant understand this statement Below link gives elevation angle. http://en.wikipedia.org/wiki/Solar_zenith_angle http://www.pveducation.org/pvcdrom/properties-of-sunlight/elevation-angle http://www.susdesign.com/popups/sunangle/altitude.php

Actually i am getting output from Nrel C code.

Julian Day: 2452930.312847 //L: 2.401826e+01 earth heliocentric longitude [degrees] //B: -1.011219e-04 degrees earth heliocentric latitude [degrees] //R: 0.996542 AU earth radius vector [Astronomical Units, AU] //H: 11.105902 degrees observer hour angle //Delta Psi: -3.998404e-03 degrees //Delta Epsilon: 1.666568e-03 degrees //Epsilon: 23.440465 degrees //Zenith: 50.111622 degrees //Azimuth: 194.340241 degrees //Incidence: 25.187000 degrees //Sunrise: 06:12:43 Local Time //Sunset: 17:20:19 Local Time

after all.

http://www.susdesign.com/popups/sunangle/altitude.php

I understood that altitude/ elevation gives exact position of the sun. Which i converted to my inclinometer angle
The altitude angle is calculated as follows:

Altitude =asin( [cos (L) * cos (D) * cos (H)] + [sin (L) * sin (D)])
Converted angle is

sun_pos=90-altitude; in degree.

where:

Al = Solar altitude angle

L = Latitude (negative for Southern Hemisphere)

D = Declination (negative for Southern Hemisphere)

H = Hour angle

If i am correct these relation works. let me know if i am wrong here,

1. Now we know zenith, azimuth which represent direction of sun & altitude represent sun position .

My question

1. which are angle need to be consider for the sun position for dual axis tracker
2. When to actuate the motor/actuator???
3)@ which situation limit switch are triggered for dual axis tracker.

Here i have also attached output file.

If you are looking to control your mirror for a heliostat or solar tracker, you can use this site

http://www.cerebralmeltdown.com/arduino-sun-tracking-heliostat-program-documentation/

if you are looking for something else, then this site walks you thorough the steps and offers some answers about why it was done a certain way.

My question Here is Which are the angle need to consider & why. How could track sun based on These angle.

As links attached above says i.e zenith & azimuth angle use to measure direction of sun & altitude to postion.Which are angle need to consider & why???

In all arduino based tracker they used LDR and moving along zenith and azimuth . Since i am using inclinometer , how considered angle

AMPS-N: My question Here is Which are the angle need to consider & why. How could track sun based on These angle.

You need to know your current position and the current time. You need to calculate the direction of the sun at that position and time, for example as an azimuth angle and zenith/elevation angle. You need to position your actuators to point your device in that direction. You need to repeat this periodically so that the device tracks the sun as it moves. I'm sorry if it sounds patronising to explain something so basic after you've spent this much time working on a solar tracker, but from the way you keep asking about it I'm not at all sure you have grasped the concept.

if i am not wrong . I cant also express what i have understood due improper sentence

These points are expected or not

1. zenith and azimuth gives sun direction right ya wrong??
2. altitude give sun elevation angle right ya wrong??
3)for dual axis tracker i need to consider azimuth along x dir that circular and altitude angle y direction for vertical motion.
The respective angle for day is attached in below . it relevant to one day. ?? Please let me know whether i calculated right or wrong.
formula taken from herehttp://www.susdesign.com/popups/sunangle/altitude.php

You need to know your current position and the current time. You need to calculate the direction of the sun at that position and time, for example as an azimuth angle and zenith/elevation angle. You need to position your actuators to point your device in that direction. You need to repeat this periodically so that the device tracks the sun as it moves. I’m sorry if it sounds patronising to explain something so basic after you’ve spent this much time working on a solar tracker, but from the way you keep asking about it I’m not at all sure you have grasped the concept.

current time : is calculate from RTC
current position?: still not confirmed
i considered azimuth and altitude angles to determine position.
since actuator as no feedback , i am using inclinometer to adjust angle from reference 0~360 degree and 0~90 degree.

1) Yes. The azimuth angle conceptually gives you an arrow along the ground which points towards the sun. The zenith/altitude angle tells you how far the sun is above the horizon. Together, the azimuth and zenith/altitude angles give you the information needed to point towards the sun in three dimensions. 2) Yes, but you need to understand that the zenith angle and altitude angle are two different ways to express the same thing - zenith angle is the angle down from vertical, and altitude angle is the angle up from horizontal. 3) Your English is a bit mangled but if I understand you correctly then yes, this is correct.

If you want to validate your calculated azimuth and zenith/altitude angle then do the calculation for the current time and position, and see whether the result correctly points to the sun.

Now all points are cleared. How to check Whether postion i calculated is pointing toward the sun.Here iam attaching output xls i got from nrel .

If i am wrong let me know.

data out.xls (1.98 MB)

AMPS-N: How to check Whether postion i calculated is pointing toward the sun.Here iam attaching output xls i got from nrel .

If i am wrong let me know.

The zenith and azimuth columns for the rows you highlighted look credible for a position in the southern hemisphere that was within about eight degrees of the equator, with dawn slightly before 06:00 and dusk slightly before 19:00. You could verify them yourself just by checking whether each pair of figures accurately reflects the position of the sun at that time.

``````The zenith and azimuth columns for the rows you highlighted look credible for a position in the southern hemisphere that was within about eight degrees of the equator, with dawn slightly before 06:00 and dusk slightly before 19:00. You could verify them yourself just by checking whether each pair of figures accurately reflects the position of the sun at that time.
``````

is there any software to check it so i can verify answer.

If the sun is shining, check whether the angles point toward it.