New sun tracker idea?

Hi again.

I'm in the process of designing a sun tracker to keep my solar panels pointing at the sun at all times. I was originally going to try a light sensor but realised that may be too inaccurate and require extra hardware. I wanted to go down the route of using an arduino to use position co-ords and date/time to extrapolate the suns position but this seems to use very complex formulas which I have limited understanding of.

So, the method I came up with is to have a database on a flash drive which has a years worth of sun position data at 15min increments during daylight hours. All the arduino would need to do is look up the Azimuth and Altitude angles which correspond to the current date and time, then move the servos accordingly.

I know this isn't as elegant as the formula based tracker but it does seem simpler.

Is this feasible on a standard arduino and how would I go about starting the code for this as I'm an Arduino n00b. Has anyone made a sun tracker using this method before?

Seems perfectly reasonable to me.

You can break the problem down into smaller steps:
Read from SD card.
Parse the data.
Move the servos.
Wait for 15 minutes.

The steps get progressively easier as you go down the list.

This should work, provided you have the sun's position data for the general latitude you are at. I don't know if anyone has ever done it, but I wouldn't be surprised if it has.

Something to keep in mind is that while it may be cheaper than the more hardware-based route (you can make a solar tracker without using -any- electronics or other electrical devices, btw), your time and "money" will be spent in the coding. It would seem to be a good learning experience no matter what, though.

Good luck with it!

:slight_smile:

You can do it with light sensors, Solar Tracking, Without Overkill | Hackaday
Its been done before, just three sensors and basically the motor turns to the left/right based on the left/right sensors, until the sensor in the middle reads higher.

Its been done before, just three sensors and basically the motor turns to the left/right based on the left/right sensors, until the sensor in the middle reads higher.

I've seen a similar thing done with only two. One on each side of the board. The thing rotates until the sensors' values are within a certain threshold of each other.

The biggest issue with the simple electronics circuit tends to be "how to get it facing east again" for the morning rising of the sun. But yeah, such circuits can be made simply, and not require much in the way of electronics. As I noted, you can build a sun tracker without any electrical work at all; I have seen designs that use heat expansion of a working fluid to drive hydraulic-style actuators (so basically a mechanical form of the simple shaded sensor circuits).

For facing east why not just add a Solid state compass to the mix, similar to the compass' you get in mobile phones/gps etc
You'd need three sensors to know when to stop, otherwise you'll be alternating left and right without knowing when to stop.

Couldn't you just let it sense that more light is coming from east, and it'll turn to it? I suppose it'd be more efficient to have it reset itself at night, but why not make it easy?

Couldn't you just let it sense that more light is coming from east, and it'll turn to it? I suppose it'd be more efficient to have it reset itself at night, but why not make it easy?

For facing east why not just add a Solid state compass to the mix, similar to the compass' you get in mobile phones/gps etc
You'd need three sensors to know when to stop, otherwise you'll be alternating left and right without knowing when to stop.

The way this king of thing is typically set up (just for east-west tracking) is two sensors separated by a shield (or two sensors, each within a tube). They are oriented so that they are at the correct angle for the sun at the lattitude of the tracker.

The tube/sheild is a "shadow" - you tell the tracker to go left or right until both receive near-equal amount of light (essentially a dead-band, like in a servo). You have to add controls (hardware or software) to deal with clouds and such. You also have other knowledge about the fact that the sun only moves in one direction, plus that in daytime, you are either seeing info from the sensors that is one shaded/one in light - but never both shaded, unless a cloud. If both are under a certain value (ie, in the dark for many cycles/time) - then it is nightime, move back to the east, etc.

All of these functions can be easily done in discreet hardware, as well as program code. If you wanted to change elevation as well, you would use four sensors with independent tubes or a "cross-shaped" shadow shield arranges in a diamond configuration, so you could track "up/down" elevation movement...

What I always find most curious about this discussion, is why it is discussed here at all (outside of the interfacing on the Arduino and possibly code) - the actual hardware, how it works, how you can set things up, etc (including microcontroller-based, discreet electronic hardware based, electro-mechanical, and mechanical based trackers) - can all be found on a ton of web sites out there dealing with solar and other alternative energy subjects.

Solar/Sun trackers have been studied, revised, implemented, experimented with - you name it - in a myriad of forms (including clockwork!) - since at least the late-1700's, if not earlier!

:slight_smile:

[edit]While that was kinda ranty, I am not upset or angry with anyone, and I don't mean the above as some kind of personal assault on anyone's curiousity; I just find it funny that in an age where you literally have information of an unimaginable amount and magnitude at hand, just a search away, people are still asking others how something is done or how it works. Back in my day, my dad would point at the bookshelf with the Brittanica, and say "look it up!"[/edit]

Better answering the question then him thinking he's being ignored, causing him to bump/spam this issue?

Also, the actual position of the sun, doesn't always equate to the highest amount of solar activity, cloud cover etc sensing where it is brightest would be better, otherwise you're defeating its purpose.

Tubs and shields are not needed in the hackaday project I linked, I think such things would over-complicate the problem.

Thinking about it, you probably would only need two sensors if you can accurately place them at the front of the device, minus one value from the other, a positive number move to the left, and a negative number move to the right, zero don't move.

I'd imagine you'd be using move power to run it than you'd be generating from the panels, not sure.

Better answering the question then him thinking he's being ignored, causing him to bump/spam this issue?

I suppose, but its kinda like walking into a library and asking the librarian where the books on how to read are. This is the 21st century; google exists. -boggle-

Also, the actual position of the sun, doesn't always equate to the highest amount of solar activity, cloud cover etc sensing where it is brightest would be better, otherwise you're defeating its purpose.

Very true. Which is why tracking using data of sun position probably wouldn't be optimum.

Tubs and shields are not needed in the hackaday project I linked, I think such things would over-complicate the problem.

In the hack-a-day project, they are using three sensors - one perpendicular to the plane of the solar panels, and one each, left and right, -angled- away from the central sensor. The angles essentially form the "shadow sheild" - but their system is the one that is overly complex.

You can do it with two sensors - both of which point perpendicular to the plane of the solar panels - with either a shadow sheild between, or a couple of small tubes (a couple of chopped pieces of a ball-point pen would work fine). They need to be long enough so that when tilted, one sensor would receive more light and the other less, and you would move in the direction of the one with less light, until both are "equal" (that whole dead-band thing).

Thinking about it, you probably would only need two sensors if you can accurately place them at the front of the device, minus one value from the other, a positive number move to the left, and a negative number move to the right, zero don't move.

Yes, this is what I am saying, but since light from the sun (which, for all intents and purposes, is a point source of light, but is somewhat diffused through the atmosphere - plus there are reflections and such) is "everywhere", you can't just mount the sensors perpendicular and hope that they would work (I suppose you could angle them outward, like the project did - but there would still be the reflections issue) - you need the tubes or a sheild, and place them close together (right next to each other) - for this to work right.

Believe me, this is how it is done; look up how solar trackers are built and have been built in the past by experimentors and such - there is a huge wealth of information on the internet about them. Here you can find several, for instance:

One of them uses nothing more complex than relays and CdS cells (LDRs)!

:slight_smile:

I'd imagine you'd be using move power to run it than you'd be generating from the panels, not sure.

Depends on the panels and the power system being charged.

@breaks
I like your idea about using a table to get sun position, but have you exhausted the possibility that it can be calculated?

I've searched for this several times (casually) but have not seen a straightforward calc that I thought I could convert to run on the Arduino.

However, I'm wondering if you or others might have found something.

One thing you haven't mentioned is do you want the device to just track left and right? Or up and down as well? If you are going for optimum tracking and thus want to adjust the height of your tracking arc depending on what day it is then that would be a fair few data points. Thus if imagined you had 12 hours of usable sun per day then you would have 12 hours * 4 (15min interval) *365 day = 17520 potentially different data points and obviously if you are representing these by X,Y coordinates then you'd have double that. That sounds like a lot of work inputting all of those and it would still only be relevant for that particular site. However if you are only heating water etc do you really need that level of accuracy? If you only track left to right then you only need two data points per day i.e. where is the sun going to rise and where is it going to set then use a simple algorithm to calculate the step size between the two and increment it by that step every 15 mins. This could be made even easier by using the fact that at true midday (i.e. neglecting time zone bending) the sun should be in the same place (in a left to right manner) for me in the UK it will be directly south any day of the year. So by setting the end points to the rise and set on the longest day of the year and even though in winter the thing will be still moving in the dark it will still track the sun with two data points which I'm sure for most solar panels will give you near enough the same result as the X,Y one.

Take a look at this:
http://aa.usno.navy.mil/data/docs/AltAz.php

I emailed them and they said it's OK to access the form programatically. This would allow you to download each day's Sun position data as needed and save yourself the memory footprint of storing years of data or having to calculate it on-chip.

From the email I received from USNO:
"I don't know if it suits your purposes, but you have the option of making your own web form and using it to access our Perl script (http://aa.usno.navy.mil/cgi-bin/aa_altazw.pl). See the code on our legacy page (http://aa.usno.navy.mil/data/docs/AltAz.php) using "view source" and you will see how to set up the form.

We cannot guarantee that our script won't change or move locations, so keep that in mind if you choose to link to it."

If you just want to track the position left/right, then use 3 LDRs and then use the three values from that to decide where the sun is...

Or more LDRs if you want :slight_smile: I think 5 would work great. I am thinking of sticking 4 on my UGV so I can tell roughly where the sun is, then compare that to the time to work out the rough direction of travel.
I will have a GPS and probably a compass as well but it will be an extra bit of fun if I have enough analog pins left over.

Mowcius

LDR's would need assistance to ensure they dont end up facing the wrong way if some plonker stood infront of it. :slight_smile:

LDR's would need assistance to ensure they dont end up facing the wrong way if some plonker stood infront of it.

Yeah, it was just a simple idea.

You could easily have 12 months or maybe 52 weeks programmed instead of every day as it does not change that much over a week.

Mowcius

Good afternoon:

We write in this forum to share our experience technological developments automatic solar tracking systems in Spain.

The solar tracking system is operating in more than 600 sun trackers along 30 large solar power plants.

If you are developing a prototype sun tracker, or have problems with the tracking control system may present SunTracking will solve the problem.

Inquiries at our website:

http://www.suntracking.es

And please contact us with any questions.

Yours sincerely

SunTracking

spamming shit