Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #30 on: February 15, 2013, 06:18:36 pm » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
DELHI
Offline
Full Member
Karma: 0
Posts: 135
|
 |
« Reply #31 on: February 16, 2013, 12:33:16 am » |
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.
|
|
|
|
|
Logged
|
AMPS
|
|
|
|
UK
Offline
Tesla Member
Karma: 89
Posts: 6396
-
|
 |
« Reply #32 on: February 16, 2013, 08:24:54 am » |
How accurately are you trying to calculate it?
|
|
|
|
|
Logged
|
|
|
|
|
Dee Why NSW
Offline
God Member
Karma: 11
Posts: 523
|
 |
« Reply #33 on: February 16, 2013, 10:41:37 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4687
|
 |
« Reply #34 on: February 16, 2013, 10:49:39 am » |
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.]
|
|
|
|
« Last Edit: February 17, 2013, 01:52:36 pm by dc42 »
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #35 on: February 16, 2013, 11:55:28 am » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #36 on: February 26, 2013, 04:20:15 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #37 on: February 26, 2013, 04:37:19 am » |
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)
|
|
|
|
« Last Edit: February 26, 2013, 04:39:52 am by AWOL »
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4687
|
 |
« Reply #38 on: February 26, 2013, 04:40:04 am » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #39 on: February 26, 2013, 04:45:59 am » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
United Kingdom
Offline
Faraday Member
Karma: 131
Posts: 4687
|
 |
« Reply #40 on: February 26, 2013, 05:00:45 am » |
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.
|
|
|
|
|
Logged
|
Formal verification of safety-critical software, software development, and electronic design and prototyping. http://www.eschertech.com
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #41 on: February 26, 2013, 05:10:51 am » |
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.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 4
|
 |
« Reply #42 on: February 26, 2013, 09:09:41 am » |
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 ?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
UK
Offline
Brattain Member
Karma: 138
Posts: 19067
I don't think you connected the grounds, Dave.
|
 |
« Reply #43 on: February 26, 2013, 09:23:48 am » |
Is the RTC supported yet? You could start there, if it isn't.
|
|
|
|
|
Logged
|
Pete, it's a fool looks for logic in the chambers of the human heart.
|
|
|
|
|
|
|