Go Down

### Topic: Yun Solar Tracker without LDRs  (Read 2112 times)previous topic - next topic

#### fatihturhan

##### Mar 20, 2015, 06:23 pm
Hey Guys, I want to make a solar tracker out of yun most likely with DC motors, I've been doing a

research on arduino solar tracking algorithms and codes without the LDRs but there is only a few ones I

could find most prominent being http://wiki.happylab.at/w/Solar_Arduino_tracker but it uses a timer chip

and we won't be needing that ofcourse. I wanted ask if anyone has attempted something similar or has

recommendations?

#### sonnyyu

#1
##### Mar 20, 2015, 07:18 pm
Astronomical Equations:

GPS and Yun

http://forum.arduino.cc/index.php?topic=208117.msg1533957#msg1533957

U. S. Naval Observatory, Sun Rise and Set time.

http://forum.arduino.cc/index.php?topic=288769.msg2024203#msg2024203

Declination Angle:

Code: [Select]
`δ(n) = 57.296{0.006918− 0.399912cos(ω)+ 0.070257 sin(ω)− 0.006758cos(2ω) + 0.000907sin(2ω) − 0.002697 cos(3ω) +0.001480 sin(3ω)}(6)`

Where ω is the day angle in radian, (ω = 2π (n−1) /365)

#### sonnyyu

#2
##### Mar 20, 2015, 08:18 pmLast Edit: Mar 20, 2015, 08:18 pm by sonnyyu
Plan B:

Get accurate time

http://forum.arduino.cc/index.php?topic=302361.msg2108238#msg2108238

Using long wave time signal/synchronize with atomic clock is my favor.

#### Robin2

#3
##### Mar 20, 2015, 09:34 pm
I've been doing a research on arduino solar tracking algorithms and codes without the LDRs but there is only a few ones
Perhaps because it is easier (and consequently more sensible?) to use LDRs?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

#### sonnyyu

#4
##### Mar 20, 2015, 11:51 pm
I can't image how LDR's behave during solar eclipse.

#### Robin2

#5
##### Mar 21, 2015, 09:43 am
I can't image how LDR's behave during solar eclipse.
I can't imagine them having a problem.
And it only lasts a short time and is very infrequent.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

#### _pepe_

#6
##### Mar 21, 2015, 10:38 amLast Edit: Mar 21, 2015, 11:32 am by _pepe_
Hi,

Actually, there is a clock on the linux side of the Arduino Yun card. The Arduino program can read or set its date and time by running the linux "date" command thru the Bridge interface library (see the Process Class).

Unfortunately, this clock is not that accurate, and it is reset when the card is off. So you will have to set it from time to time :

• This could be done manually by connecting a PC to the Yun's web interface.

• You may also make the Wifi or wired Ethernet interface connect to Internet or to a local network. Then, the current time could be retreived automatically from a NTP server.

#### fatihturhan

#7
##### Mar 21, 2015, 03:15 pmLast Edit: Mar 21, 2015, 03:15 pm by fatihturhan
Thanks guys and pepe I was thinking there must be a way

#### jverive

#8
##### Mar 22, 2015, 03:21 pm
For maintaining time in the event of a power outage or other reset, you can use a real-time clock module with battery back-up. These are pretty inexpensive, and I have one running on a networked temperature monitoring Arduino Uno.

#### _pepe_

#9
##### Mar 22, 2015, 04:10 pm
For maintaining time in the event of a power outage or other reset, you can use a real-time clock module with battery back-up.
This is the kind of solution fatihturhan was talking about in his subject, just expecting something else.

#### fatihturhan

#10
##### Apr 01, 2015, 01:33 pm
thanks pepe, it all worked fine, now I can read time and date which are crucial for solar calculations.

#### LeoTimmermans

#11
##### Apr 01, 2015, 03:37 pm
Hey,

Have a look at http://rhodesmill.org/pyephem/

Excerpt of the website :

Welcome!

PyEphem provides basic astronomical computations for the Python programming language. Given a date and location on the Earth's surface, it can compute the positions of the Sun and Moon, of the planets and their moons,

Best Wishes
Leo

Go Up