Solar tracker using Navy Sun data

CAI_Support

Senior Member
US NAVY provides Sun and Moon location in the sky during any time of the day from anywhere on the world.
http://aa.usno.navy.mil/data/docs/AltAz.php
I wonder if this information can be used for solar tracker orientation controlled by WebControl.  NASA also provide similar data. Weather.com and http://www.weather.gov/ both provide weather forecasting data.
 
Since 3.02.17 firmware WEBSET feature allows reading back a 32bit number from web server, user could create 3 WEBSET calls, on the server CGI code, each returns back the attitude, azimuth, and wind prediction, so that WebControl PLC code can control the solar array to position itself to proper orientation.  For example, if gusty wind is projected, park the panel flat in parallel to the ground.
 
If there is enough interest, we could create a competition here, no purchase necessary, anyone can participate with his own WebControl board, he does not need to actually install solar panel or solar tracker hardware, however, develop WebControl PLC code and server CGI code and post them here or on our web server. We will test all the code by loading them on apache web server and WebControl board, or if there are enough participants, have a judge panel on this forum to decide the winner.  Top three winners will each get a WebControl 32 beta board as award.
 
I think RossW will be a ringer here since he's already created a solar tracker, so it's probably best if you go ahead and just send him a web32 and let him be a judge for the entries! :)

Terry
 
CAI_Support said:
Roussell,
 
That is a great idea, if RossW like to be the judge on this :-)
 
Absolutely interested.
 
I've sent away several WebControl8 boards to people (and several others bought their boards themselves) that are running as tracker controllers.
(Thats why I was asking for some basic TRIG, to help with the sun-position calculations)
 
My latest project is a series of semi-autonomous controllers, one mounted one each tracker, with a single webcontrol as the central command unit.
I'm only working on it in my spare time, but this is my version-1 prototype board:
tracker-bus-pcb-incl.jpg

 
So far, all the angle-measuring code and serial data-over-power two-way communications are written, tested and working, command and individual-or-farm select code works. Next is the "relatively" simple task of adjusting the actuator until the array is facing the specified angle.

Then, its back to the webcontrol to either retrieve, or calculate, the current sun position to send downrange!
 
CAI_Support said:
Ross,
 
Do you want to make some kind of rule? How do we know how many people will participate in this? 
 
Sorry, I'm not with you on this?  Rule??
 
Contest rules. You know, like RossW is disqualified from entering the sun tracking competition since he wrote the book. :)
 
NOW I get it... I mis-read the original post (or read it before it was edited), and was missing the competition part of it!
 
I can think few contest rules, like:
1) any participant must register with this forum and sign in this thread with his forum user id;
2) CAI will have right to publish the PLC program, and server software if any;
3) if less than 3 participants, then all participants are winners. If more than 3, judge Ross will determine the top three winners based on PLC program, server program, and other design consideration, for example, incorporate light sensors, etc.
4) No purchase necessary. No one here wants to ask anyone to buy anything.  We do provide free support for anyone.
 
Anybody would suggest any additional contest rule? like how much time would allow this contest to complete?  We do need to speed up our 32 bit beta board preparation for the winners.  I don't know if forum owners would object this contest.
 
I think there should be some explanatory notes to go with it. Like, a schematic of how it would connect (so we don't have to guess what goes where), a description of what features it has, an overview of "how it works". There are so many ways to construct such a device, trying to reverse-engineer it to judge might be unfair to a contestant if the "trickery" goes un-noticed.
 
Also, it's been discussed here from time to time, about commented source. It makes SUCH a difference maintaining it later, or trying to understand someone elses logic, if code has comments. That would be (in my mind anyway) an important consideration in judging one offering over another.
 
Start with a list of standard hardware required for the tracking motors, etc. Each participant has to choose from the same list of hardware. All have the opportunity to learn the specs and work with it. If I did it and piped calculations using pid loops, advanced math etc from my AB plc or Keyence PLC, that would not be fair. The idea in my limited view is to spark greater interest in the W/C and create more WebControl code samples for others to adapt and learn from.
It makes SUCH a difference maintaining it later, or trying to understand someone elses logic
Well that knocks me out. I sometimes can't even understand the program I wrote. 5 days later its like Where the heck did I come up with that? Then I have to go through 15 different hard drives trying to figure out where I put the notes I took. 3 weeks later my wife will ask what the weird file on her laptop is for. Doh!
I have a photographic memory, there's just fewer and fewer 1 hour photo centers to process it.
 
Documentation is something we love to hate.
(But we sure love it when it's there and we need it!)
 
You may have seen my (horrible, but functional) code I distribute for people who want to assemble their own, or test my webamp/terminal boards:
 
http://webcontrol.rossw.net/WebAmpV2/testcode.txt
 
There is a blurb at the start to tell people what to connect where, but the rest of the code has the comments stripped out because its difficult to load into the WC with them.
(CAI: would it be easy for your compiler to silently DROP comments, so they could be pasted into the plc code window but not actually go to the PLC engine??)
 
Here's a section of the same code, as I actually keep it here in my system:
 

Code:
START
                # lights off
        set op7 0       # Green. (OK)
        set op8 0       # Blue.  (Too low)
        set op6 0       # Red.   (Too high)

                        # Set AD1 gain to 2.0
                        # Assumes input of 1.0V
        set op1 1
        set op2 0
        set var1 0      # counter

ad1:
        inc var1
        tstgt aip1 209 op6      # red if too high
        set var1 0
        tstlt aip1 200 op8      # blue if too low
        set var1 0

        and var1 1 op7          # "OK" light on if within spec
        tstlt var1 250
        goto ad1
 
I don't know what everyone else does but when I do use comments, I've found for me that excel is best. Code in one column, comments in the next. You can copy the column of code and paste it into the wc.
 
todster said:
I don't know what everyone else does but when I do use comments, I've found for me that excel is best. Code in one column, comments in the next. You can copy the column of code and paste it into the wc.
 
I hate excel.
Call me hardcore, but I write/edit code in vi, and    sed 's/#.*//' < wc.whatever      and just paste the output.
 
Back
Top