Author Topic: Pseudo polar solar tracker  (Read 2249 times)

Urko

  • New Member
  • *
  • Posts: 3
    • View Profile
Pseudo polar solar tracker
« on: June 07, 2015, 09:26:24 AM »
Hi there!

I  have reach a difficult teorical point to resolve in my project.  :(

I designed a pseudo-equatorial solar tracking system. The system runs in a Arduino Mega.

It moves south/north and west/east using DC actuators, which I control using  4 relays. To know where the solar panel is I use an Inclinometer (+-90║ in both axes)  (Murata Scat100d2)
 



I have written the code using Hannes Hassler`s SolarTrack4Arduino which gives all the solar information I need (Solar elevation, azimuth and solar hour angle)

All these works good.

But I do not really know how to integrate that information  so I can get the correct angles to position the solar panel. I know how to move the solar panel to a known angle, but I do not know how to calculate the angle so the panel faces the sun.


At my first trial I made:

To calculate correct North/South axis:  90║-Sun elevation.
To calculate correct West/east axis: Same as the hour angle, but in the other direction. For example at the morning when solar hour angle is -30║ tilt the sun panel 30║ east.

As I could prove, it does not work. I think my approach is not correct, and I would need to get vectors involved. Is that correct? Do you know where I could get more information? (I have search in google but I coundn┤t find any usefull information)



Thank you very much for your help! All ideas are welcome and sory for my broke english!





Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 648
    • View Profile
Re: Pseudo polar solar tracker
« Reply #1 on: June 09, 2015, 06:14:33 AM »
Hi Urko,

I remember a year or two ago I was experimenting with what I called a "pitch and roll" heliostat". Here is a link to it. http://cerebralmeltdown.com/forum/index.php?topic=357.msg1493#msg1493
It looks like your machine is similar to this.

I never actually built the machine, but I did figure out the math for it and tested it in a computer simulation. The post for the math is at this link. http://cerebralmeltdown.com/forum/index.php?topic=357.msg1503#msg1503

Anyway, I think the code can be modified to work with your machine.
Give this a shot and see how it does.
Code: [Select]
  z = sin(to_rad(SunsAltitude));
  hyp = cos(to_rad(SunsAltitude));
  x = hyp*cos(to_rad(SunsAzimuth*-1));
  y = hyp*sin(to_rad(SunsAzimuth*-1));

  dist=sqrt(x*x+y*y+z*z);

  x=x/dist;
  y=y/dist;
  z=z/dist;
 
  float tempx=x;
  x=y*-1;
  y=tempx;
 
  machinepitch =  90 + (-atan2(y,z)*(180/pi));//actual pitch
  machineroll = asin(x)*(180/pi);//actual roll

You'll notice that you will need to first calculate the altitude and azimuth angles of the sun. The code for these values is part of the Arduino Sun Harvester Program on this site if you need it.

Let me know how it works out. Thanks!


Urko

  • New Member
  • *
  • Posts: 3
    • View Profile
Re: Pseudo polar solar tracker
« Reply #2 on: June 10, 2015, 03:15:27 PM »
THANK YOU GABRIEL  :D :D :D!

I couldn┤t figure out that formulas in my own! That you very much!
Already implementing in my code, my only doubts where are the "zero" values, from where I should start measuring that angles, are the Pitch and roll zero values set when that panel is horizontal? (parallel to the ground) Is the pitch positive when the panel "travels" to the north? And the roll negative wen facing the east?






Something like that?
I have been looking for that information in the reference/set up page but I did not find it  :P
« Last Edit: June 10, 2015, 03:19:34 PM by Urko »

Urko

  • New Member
  • *
  • Posts: 3
    • View Profile
Re: Pseudo polar solar tracker
« Reply #3 on: June 12, 2015, 07:39:07 AM »
I have been thinking about that and I think I have overcomplicated my ideas :P :-[
Looking in some research papers, It looks that the formula is easier than it looks.


For the North/South they simply deduct declination value from the latitude.
And the East/West they follow the hour angle of the sun.
If my solar tracker is aligned to the true polar axis I could see this working! May I be wrong?
Will post results!

Gabriel

  • Administrator
  • Hero Member
  • *****
  • Posts: 648
    • View Profile
Re: Pseudo polar solar tracker
« Reply #4 on: June 12, 2015, 06:18:43 PM »
Yeah I think that would work too. Actually that was my first thought, but I wasn't sure if it would work since I've never actually tried it or read about it that I can remember.

I guess the way I posted works well if you already have the altitude and azimuth calculated, but if you already have the declination and hour angle values then you can just use them as is more or less.
The way you posted is probably a bit more accurate when calculated on the Arduino. I have noticed that some accuracy is lost when converting the hour angle and declination into altitude and azimuth. I think this is in part because the Arduino uses look up tables for the trig functions.

You might actually try both ways to double check them against each other.

Oh, and I think (if I remember) that the zero values are when the surface normal points due south. You can try plugging value for the altitude and azimuth to double check this I guess.

Let me know how it goes. Thanks!