Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Position of The Sun
Goto page 1, 2  Next
 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here
View previous topic :: View next topic  
Author Message
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Tue Feb 02, 2010 8:35 pm    Post subject: Position of The Sun Reply with quote

Input:
- Your location coordinates, latitude/longitude.
- Time of interest.

Output:
- The actual position of The Sun, azimuth/altitude.
Back to top
View user's profile
Ross_ValuSoft

Bascom Member



Joined: 20 Nov 2005
Posts: 275
Location: Melbourne, Australia

australia.gif
PostPosted: Wed Feb 03, 2010 10:33 am    Post subject: Reply with quote

Hello Benny (proves I opened your file Laughing )

Thanks for this contribution.

You have in the code ...

Quote:

$regfile "M16def.dat" ' Atmel ATMEGA644V, 10PU used.


So ... was it the Mega644 or the Mega16 ?

There are some people talking about solar "tracking" over on AVRFreaks. Do you mind if I quote you over there?

Hoping to try your code very soon on my tiny 10Watt panel. I have a 1000 watt fixed system on my house.

Cheers,

Ross
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Wed Feb 03, 2010 11:58 am    Post subject: Follow the sun.... Reply with quote

Very nice work, lots of calculations. Will give it a try.

Combine this with the QTH-locator and you know always were the sun is.

A QTH-locator can be found on my homepage (check the LCD_ARP-link)

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
enniom

Bascom Member



Joined: 20 Oct 2009
Posts: 537

PostPosted: Wed Feb 03, 2010 1:48 pm    Post subject: Reply with quote

Thank-you for posting your excellent code.

Do you think it would be difficult to extend the calculations to include sunrise and sunset times - given a set of coordinates?

(Note: I believe sunrise/set is defined as when the sun is 0.75 degrees below the horizon.)

Ennio
Back to top
View user's profile
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Wed Feb 03, 2010 9:24 pm    Post subject: Reply with quote

Ross_ValuSoft wrote:
You have in the code ...
$regfile "M16def.dat" ' Atmel ATMEGA644V, 10PU used.
So ... was it the Mega644 or the Mega16 ?

There are some people talking about solar "tracking" over on AVRFreaks. Do you mind if I quote you over there?



-I did try both M16 and M644
-Yes You can pass it over.
Back to top
View user's profile
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Wed Feb 03, 2010 9:34 pm    Post subject: Reply with quote

enniom wrote:
Thank-you for posting your excellent code.
Do you think it would be difficult to extend the calculations to include sunrise and sunset times - given a set of coordinates?
(Note: I believe sunrise/set is defined as when the sun is 0.75 degrees below the horizon.)
Ennio


I did run this code as a part in a program for controlling water heating solar panel. I did run a realtime clock (RTC) with battery backup and used the time and date from RTC as input in the calculations for The Sun.
In the published DEMO i replaced the RTC with a fixed time/date set.
It would be possible to use a GPS to get both time/date AND position.
If You put in a small peace of code at the end, You can set a variable with Your own conditions (Altitude, time, humidity, Your moms birthday...Smile )
Back to top
View user's profile
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Wed Feb 03, 2010 9:44 pm    Post subject: Re: Follow the sun.... Reply with quote

bzijlstra wrote:
Very nice work, lots of calculations. Will give it a try.
Combine this with the QTH-locator and you know always were the sun is.
A QTH-locator can be found on my homepage (check the LCD_ARP-link)
Have fun
Ben Zijlstra


Hi. Sorry but i did'nt find the QTH-locator.
Can You post a direct link?
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Wed Feb 03, 2010 10:34 pm    Post subject: QTH-locator Reply with quote

http://members.home.nl/bzijlstra/hardware/Display/display.htm

almost at the bottom....

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
Ross_ValuSoft

Bascom Member



Joined: 20 Nov 2005
Posts: 275
Location: Melbourne, Australia

australia.gif
PostPosted: Thu Feb 04, 2010 12:06 am    Post subject: Reply with quote

Thanks Benny.

Best wishes,

Ross
Back to top
View user's profile
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Thu Feb 04, 2010 12:46 am    Post subject: Re: QTH-locator Reply with quote

bzijlstra wrote:
http://members.home.nl/bzijlstra/hardware/Display/display.htm
almost at the bottom....
Have fun
Ben Zijlstra


OK. I found it!
Yes it could probably work nice.

Hint: In estimating the precision needed there is some simple calculations you could use. In one day, 24 h, the sun appears moving 360 degrees around the horizon. Then 360 / 24 = 15. That is 15 deg in one hour. 15/60 = 0.25 deg/min.

Thumb rule: The sun moves approximately 1 degree along your horizontal plane in 4 minute's .
Back to top
View user's profile
Thansen

Bascom Member



Joined: 12 Nov 2006
Posts: 9
Location: Silkeborg

denmark.gif
PostPosted: Thu Feb 04, 2010 4:59 pm    Post subject: Reply with quote

Hi Benny

Thank you very much for your code Smile

Is there any chance you can post some more info about your solar project, i am thinking about making a project myself.

What kind of motors do you use?

/Thansen

_________________
/Thomas Hansen
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Fri Feb 05, 2010 9:21 pm    Post subject: Great project!! Reply with quote

Check this

http://www.youtube.com/watch?v=ATnnMFO60y8&NR=1
Back to top
View user's profile Visit poster's website
snipacarina

Bascom Member



Joined: 28 Jun 2007
Posts: 62
Location: Åland

blank.gif
PostPosted: Sat Feb 06, 2010 1:17 pm    Post subject: Re: Great project!! Reply with quote

bzijlstra wrote:
Check this
http://www.youtube.com/watch?v=ATnnMFO60y8&NR=1


In my are it is falling snow, leaf's blowing around and so on. I did not want to use a sensor sensible to those items. Therefore i prefferred to use a RTC protected in its box.
Back to top
View user's profile
symphony

Bascom Member



Joined: 08 Nov 2005
Posts: 49
Location: Sao Paulo - Brazil

brazil.gif
PostPosted: Wed Feb 10, 2010 12:04 am    Post subject: Re: Great project!! Reply with quote

bzijlstra wrote:
Check this

http://www.youtube.com/watch?v=ATnnMFO60y8&NR=1


Nice job ben´s.
Can you share the code?

_________________
Symphony Robotica Educacional
www.symphony.com.br
Back to top
View user's profile Visit poster's website MSN Messenger
glena

Bascom Member



Joined: 25 Jul 2007
Posts: 284
Location: PA near Philly

usa.gif
PostPosted: Wed Feb 10, 2010 2:15 pm    Post subject: Reply with quote

snipacarina,

Excellent work. Thanks for the contribution!

-Glen

_________________
http://bahbots.com
Back to top
View user's profile AIM Address
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> Share your working BASCOM-AVR code here All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum