solar tracker using RTC

Dear all,

i just wanted to create algorithm to track the sun using Real time Clock. I need your help for develop code and run it successfully.

component i am going to use.

1)arduino uno board
2)DS1307
3)linear actuator

concept goes like this

usually sun track start from morning 8AM to 6PM.
1)
as per research made SPA algorithm code will not work on Arduino board.From where i calculated the sun elevation angle
2)using real time clock i can get accurate time . and how can impliment this to get position

IS it possible to calculate sun elevation using above component

You can do a two axis tracker using at most four LDRs, a couple of op-amps and a couple of H-bridges.
All the RTC needs to do is return the rig to "home" just before dawn.

It is totally possible to calculate the sun's position at any instant, as long as you know the time and your location.

I don't understand your claim that the calculation cannot be made on an arduino.

You can follow the sun this way, without any light sensor at all, if you really wanted to. The obstacle
would be in having an accurate and persistently calibrated position actuator, which is not straightforward
to achieve.

AMPS-N:
as per research made SPA algorithm code will not work on Arduino board.

What research? Link?

This mean to say i have spa algorithm it does work over arduino board, since it support double precision floating point.

please let me know how you calculate sun position depend on time and date.

michinyon:
It is totally possible to calculate the sun's position at any instant, as long as you know the time and your location.

I don't understand your claim that the calculation cannot be made on an arduino.

You can follow the sun this way, without any light sensor at all, if you really wanted to. The obstacle
would be in having an accurate and persistently calibrated position actuator, which is not straightforward
to achieve.

I assume you know where you are?

http://williams.best.vwh.net/sunrise_sunset_algorithm.htm

AMPS-N:
This mean to say i have spa algorithm it does work over arduino board, since it support double precision floating point.

AMPS-N:
as per research made SPA algorithm code will not work on Arduino board.

I don't know what an SPA algorithm is, and it's not clear whether it will work on an Arduino or not. What is even less clear is why you would need double precision anyway. If you really need to do this, rather than use LDRs, Jan Meeus or Peter Duffet-Smith will tell you all you need to know. You may also find a lookup table will suffice. Once you have settled on all that computing stuff, all you need to do is sort out how you handle the mechanical accuracy stuff.

Watching with interest.

I will be coding up tracking facilities onto my Arduino to move a solar array here at my home, and have a small scale mock up of the construction.
The hole is dug, the concrete is ready to be mixed up for the tower.
I have hot dipped galvanised 2 metre sections of triangle tower to mount the tracker on.
I'll be using a single 36VDC linear ram drive with a extension of 600mm, normally used for satellite dish position.

I intend to use my know location and knowing the time to point the solar array to the correct position, without the use of light sensors.
I already have the Arduino getting UTC from a network time server as part of my whole renewable energy system.

Here is a link to some information to generate some further interest, Sun path - Wikipedia
I guess SPA is Sun Path Algorithm, I see no problem that the Arduino can calculate exactly what the position needs to be.

My renewable system as it is at present is viewable on the web in my signature.

UKHeliBob wrote:
LMGTFY - Let Me Google That For You

Well, isn't that neat, I like that.

Paul

Single precision float should be adequate for these calculations. However as Nick_Pyner said, a simple table could well suffice. Consider holding data for 365 days (sunrise and sunset) at 4 bytes each, that would be:

365*4*2 = 2920 bytes

Stored in program memory, that is probably less than the library code that would be pulled in to do the sine/cosine/asin/acos calculations anyway.

There would be a slight discrepancy due to the "leap year" factor after a year, but hardly enough to really worry a solar array.

If you need more data (more than sunrise/sunset) you can probably still do it to reasonable accuracy with fairly simple code.

Google: arduino solar panel tracking

I got over 2 million hits.

http://www.nrel.gov/midc/spa/

I HAVE LINKED ATTACHED ABOVE .If you put latitude and longitude u will get elevation angle for particular date,time etc

Nick_Pyner:

AMPS-N:
This mean to say i have spa algorithm it does work over arduino board, since it support double precision floating point.

AMPS-N:
as per research made SPA algorithm code will not work on Arduino board.

I don't know what an SPA algorithm is, and it's not clear whether it will work on an Arduino or not. What is even less clear is why you would need double precision anyway. If you really need to do this, rather than use LDRs, Jan Meeus or Peter Duffet-Smith will tell you all you need to know. You may also find a lookup table will suffice. Once you have settled on all that computing stuff, all you need to do is sort out how you handle the mechanical accuracy stuff.

i wanna do simple single axis.
how should i calculate sun elevation angle??

AWOL:
You can do a two axis tracker using at most four LDRs, a couple of op-amps and a couple of H-bridges.
All the RTC needs to do is return the rig to "home" just before dawn.

It will take some work to get the constant tables into program memory, but without trying, it's a little trite to say "it won't work on an Arduino".
It would almost certainly work unmodified on a Due.

sp. "want to"

whole idea is i wanna do with cheaper solution , I wanna use only rtc, linear actuator and arduino board for the project.
If i am using above component is it possible to it??
if yes how can i do it??
how can calculate sun elevation angle??
i don't have any sensor to locate and control the position.

michinyon:
It is totally possible to calculate the sun's position at any instant, as long as you know the time and your location.

I don't understand your claim that the calculation cannot be made on an arduino.

You can follow the sun this way, without any light sensor at all, if you really wanted to. The obstacle
would be in having an accurate and persistently calibrated position actuator, which is not straightforward
to achieve.

Unless you really want to calc the sun's position, as suggested below, track the sun.
I would think that 4 LDRs would be cheaper than a RTC, the code smaller and as pointed out, accuracy is of no concern, it just tracks. Simpler still if you use a N/S mount as you only need 2 LDRs, and your single actuator. "darkness" is used to reset to the morning sun.

IDK, but tracking may also provide more power from reflected light in times of cloud cover as the sensor, being a heliotrope would point to the brightest part of the sky, not where it thinks the sun is.

[edit]in fact, at Nick Gammon pointed out, you don't need a constant sun location if using a simple N/S mount and single actuator! All you need is (usable) sunrise and day length (1 byte would do, since you will not get 15hrs of usable sun) You may also have mountain/hill/building shadow to contend with . You may also need to adjust for apparent sun speed. You then move your actuator, starting at the correct time, at the correct speed for any day. Personally LDRs would be my choice - simples![/edit]
LDR Sealed type
Tracker

, I wanna use only rtc, linear actuator and arduino board for the project.

See my reply about the Due.

sp. "want to"

For LDR it require periodic maintenance. If dust has been accumulated it might no work. But using RTC i can say that it will be fine for working but problem will be degrade in angle and we cant keep feed back for control the action .

0AlphaOmega:
Unless you really want to calc the sun's position, as suggested below, track the sun.
I would think that 4 LDRs would be cheaper than a RTC, the code smaller and as pointed out, accuracy is of no concern, it just tracks. Simpler still if you use a N/S mount as you only need 2 LDRs, and your single actuator. "darkness" is used to reset to the morning sun.

IDK, but tracking may also provide more power from reflected light in times of cloud cover as the sensor, being a heliotrope would point to the brightest part of the sky, not where it thinks the sun is.

[edit]in fact, at Nick Gammon pointed out, you don't need a constant sun location if using a simple N/S mount and single actuator! All you need is (usable) sunrise and day length (1 byte would do, since you will not get 15hrs of usable sun) You may also have mountain/hill/building shadow to contend with . You may also need to adjust for apparent sun speed. You then move your actuator, starting at the correct time, at the correct speed for any day. Personally LDRs would be my choice - simples![/edit]

LDRs can have very large surface areas, and it is going to take a severe accumulation of dust affecting only one of the LDRs (both equally affected by dust is not going to harm performance) to cause you problems.

For LDR it require periodic maintenance.

I thought I was lazy! If it's just dust, who cares? The performance would effect both devices! But you could build in an auto calibration routine.