Go Down

Topic: solar tracker using RTC (Read 5451 times) previous topic - next topic

AWOL

Quote
but would be ridiculously over the top if we're just trying to point a solar panel in the right general direction.
Couldn't agree more.
See earlier discussions regarding H-bridges, heliotropes and CdS LDRs.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

AMPS-N

Can some one guideline how can i calculate the sun elevation angle.
please share me link if possible.

if someone has already achieved using RTC share code.
AMPS

PeterH

How accurately are you trying to calculate it?
I only provide help via the forum - please do not contact me for private consultancy.

Nick_Pyner


Can some one guideline how can i calculate the sun elevation angle.
please share me link if possible.

if someone has already achieved using RTC share code.


You will probably get all you want from the Cerebral Meltdown forum. It seems to specialise in this sort of thing.

dc42

#34
Feb 16, 2013, 04:49 pm Last Edit: Feb 17, 2013, 07:52 pm by dc42 Reason: 1
Have you tried copying the code you linked to at http://www.nrel.gov/midc/spa/ and changing all instances of 'double' to 'float'?

[EDIT: as AWOL says, you don't need to change 'double' to float, however on the Arduino I believe they are both the same i.e. 32 bits.]
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

AWOL

You don't need to change doubles to floats. I only did it because I used a platform where doubles are 64 bit, and I wanted to compare performance.
It works fine on a Due, but as-is, uses too much RAM for a Mega.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

solar123

Hello All,
I am relatively new to the arduino.. I am currently pursuing a solar tracker as a project for my final year of engineering...
It is a single axis system..
We am planning on having 2 systems for tracking
1) this is based on the solar position algorithm(SPA) released by NREL
2) A system based on 2 LDR's
As it is single axis all i need is the sun's elevation angle.
I plan on using the arduino DUE and i wanted to know if the DUE would be able to handle SPA code by NREL ??
Also as ours is a concentrator based system the dish is large and what sort of drive should i use for the DC motor ??
Any help would be much appreciated.
Thank you.

AWOL

#37
Feb 26, 2013, 10:37 am Last Edit: Feb 26, 2013, 10:39 am by AWOL Reason: 1
Quote
i wanted to know if the DUE would be able to handle SPA code by NREL ??

Have you read this thread?
(give your keyboard a shake - your question-mark key looks like it is sticky)

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

dc42

That code has a number of large arrays of constants, but only uses small arrays of variables. I think even a standard Arduino could handle it if you move the tables of constants to PROGMEM.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

AWOL

Not so sure about that - there are also some large variable arrays, too much even for a Mega.
The advantage of the Due is that it maintains 64 bit doubles.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

dc42


Not so sure about that - there are also some large variable arrays, too much even for a Mega.


Can you point out where in the code those arrays are? I'm sure you're right, but I only found variable arrays with ~6 elements.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

AWOL

I'm sorry - I think you're right, it may well be possible.
I did start to look at moving them to ROM on a Mega, then remembered Massimo had kindly given me a Due, which also made verification easier.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

solar123

thank you.
the DUE has an ARM core and the controller it uses is the AT91SAM3X8E.
As per the data sheet the above controller has a real time clock so i wanted to use this on board rtc with the SPA program.
I will fix the latitude and longitude the program must be able to get the date and time from the rtc on a regular basis for tracking purposes.
How can i do this ?

AWOL

Is the RTC supported yet?
You could start there, if it isn't.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

solar123

this is what i found for the rtc on the due.
https://github.com/MarkusLange/Arduino-Due-RTC-Library
could you tell me if the above is working ?
Also how to use this with the SPA ?

Go Up