Solar Array Controller

First, Hello all, I'm new here.. Hope I can live up to the newbie standards :)

The reason I'm here is simple, Arduino seems to be the answer to a lot of interesting problems from controlling robots to reading the temperature outside. As I was reading up on this little bad boy I noticed there are almost an unlimited supply of different sensors, libraries, and shields to do just about anything..

So, here is my first project. I want to track the sun using 2 BH1750 light sensor modules separated by a flat shield between them. When the shield shades one, the Arduino code will engage a relay to a 24v dc motor to change the angles of the solar panels so both sensors are gathering about the same level of light again.. When both sensors get below a certain level of light, it will cause the panels to return toward the east and simply wait for the sun to come up again to do it all over again..

Now, I have some coding experience, but mostly in php, ajax, javascript, and other web or browser based scripting languages. I have no doubt that I can learn to code in c+ and Arduino languages. My biggest downfall is understanding the electronics part of it, but I'll get there..

I downloaded the IDE and went through all the examples and they seem straight forward. Just like some of the programs I've worked on initiating the setup, defining variables, then start the loop. I've already ordered 2 Arduino mini's, 2 light sensors, breadboard, jumper wires, dc relays with 5v triggers, a temperature sensor, and a few other things just to play with.. Figured out by reading the forums today that I'll also need transistors..

So, I have to ask, Does the above sensors and "my thinking" sound about right? Is this feasible and as simple as it really seems??

another question I have is, if I do this project, how would be the best way to protect it from the elements and harsh sunlight??

Thank you for your time, Eric

Your concept of using the two sensors and moving towards the brighter one is exactly right. I don't know the sensor you refer to but I would just use a couple of light dependent resistors - very cheap and easy to use.

You may need to be careful about the light level that triggers a return to east at night in case it happens in the middle of a very dark day.

I would use a DC motor drive system that will stay in place when the motor is switched off - otherwise the motor will consume more power than the panel produces.

Make sure that the motor controller / relay can comfortably deal with the stall current for the motor.

...R

Thank you Robbin,

The sensors register light in lx. Here is some examples the sensor specs give

Here are some lx examples: Night: 0.001~0.02 Moonlight night: 0.02~0.3 Cloudy indoor: 5~50 Cloudy outdoor: 50~500 Sunny indoor: 100~1000

so I think anything below 1.0 would be safe to say the sun has set.

For the turning of the panels, I would read the light from each sensor say 5 times each, average the readings and compare them.. turn the panels if needed and "sleep" the 2 sensors for say 5-10 minutes and repeat.

For the panels, I plan on using 100 watt ones that weigh about 26 pounds each.. To turn them, I have a few choices of design but will probably use a worm gear or cork screw type system attached to an arm on each panel's frame.. It will simply tilt them from left to right as the sun comes over. When night fall comes, reverse the motor to return them to the east with a limit switch to stop them..

All the variables of the configuration could change after I get it built.. That's the good thing about software running things, simple, easy changes can be made on the fly..

Now I'm just waiting for the Arduino and sensors to get here so I can start testing :)

The project seems very possible for someone as their first project. I would not use relays for the motor, but would PWM them.

a note here is that you never need to reverse while tracking. if you overshoot, the Earth's rotation will soon have the sun in precedence and you will need to power it forward soon enough.

two sites to read about tracking. http://www.redrok.com/main.htm

Duane is a great guy he has put a lot information on his site. you will find the math that will let you know much of what you need.

his site has lots and lots of links. you should be able to get idea from there.

the other site is http://www.cerebralmeltdown.com/

he has some mechanics for tracking on his site.

kycountry: For the turning of the panels, I would read the light from each sensor say 5 times each, average the readings and compare them.. turn the panels if needed and "sleep" the 2 sensors for say 5-10 minutes and repeat.

I doubt if there will be a need to take several readings and average them - but you can quickly experiment with that when you have the parts.

I would be inclined to move a short way towards the sun and then take another reading and repeat.

I haven't done the calculations but I wonder if it is necessary to update the position as often as every 10 minutes. It might be wise to move forwards one step too many so the sun has a little catching up to do.

...R

Robin2: I haven't done the calculations but I wonder if it is necessary to update the position as often as every 10 minutes. It might be wise to move forwards one step too many so the sun has a little catching up to do.

Just thought I'd do the maths.

10minutes = 1/6th of an hour. therefore 1/144 of a day. 360/144 = 2.5 degrees of rotation of the earth.

Edit: Based on this I'd also suggest you limit your movements to say, 5 degrees in any 10 minute period. You don't want a pigeon landing on one of your sensors moving the whole thing out of whack.

KenF: 10minutes = 1/6th of an hour. therefore 1/144 of a day. 360/144 = 2.5 degrees of rotation of the earth.

Edit: Based on this I'd also suggest you limit your movements to say, 5 degrees in any 10 minute period. You don't want a pigeon landing on one of your sensors moving the whole thing out of whack.

That's useful.

The next question is how accurately the panel needs to be positioned. Does it matter if it is 10 degrees off either way? That would mean that it would be enough to move every 30 minutes - or even less often.

Pigeon risk is worth taking account of - also pigeon droppings !

...R

Robin2: Pigeon risk is worth taking account of - also pigeon droppings !

PIR springs to mind, and a solenoid activated air rifle. Could be a source of pie filling too :)

KenF: PIR springs to mind, and a solenoid activated air rifle. Could be a source of pie filling too :)

I object strongly to guns and other weapons.

...R

Guns & other weapons should just be considered a tool, and can be used properly, or improperly applied, just like any other tool can be. Their mis-use makes the news a lot more often than proper use tho, with too many innocents being the victims.

For the panels, I plan on using 100 watt ones that weigh about 26 pounds each.. To turn them, I have a few choices of design but will probably use a worm gear or cork screw type system attached to an arm on each panel's frame.. It will simply tilt them from left to right as the sun comes over. When night fall comes, reverse the motor to return them to the east with a limit switch to stop them..

I have an extensive background in passive and active solar collection. These are my general thoughts and recommendations.

The angle of incidence is not too critical, Plus or minus 15 degrees reduces output by approximately 5%. Efficiency varies by type of coating applied to the cells and the protective cover.

If you plan to follow the Sun, don't forget seasonal inclination changes. In North US between 22 in Winter and 70 degrees above the horizon in Summer. A fixed 46 degrees above the horizon is best. However moving it to 50 or so will favor the longer Summer days. You could also adjust inclination manually ever two months.

Since we know the Sun's apparent movement across the sky is 0.25 degrees per minute or 15 degrees per hour, it would be less complicated and less prone to failure to move the collector 5 degrees every 20 minutes rather than using the two light sensors as you suggest.

I recommend using UNIX time or a simple seconds counter to track time. There is no need to know the local time, DST or date. Those one chip clocks are not necessary. You really only need to set Solar Noon time in seconds. Based on that we know 60*60*24 = 86400 seconds until next Solar Noon. The absolute value in seconds of Solar Noon is unimportant. Alternatively it may be better to actually fetch the UNIX time and compute the modulo 86400 until the next solar Noon. In that way you can avoid recalibration of Solar Noon on power up. If that is your desire, a GPS shield will give you the time in seconds and does not require a Internet connection.

The collector can be calibrated by pointing due South and storing your seconds count or UNIX time. I recommend a Solar Noon, hall effect angle sensor and two limit switches for maximum travel in case you have faults in code or motor drivers.

At Equinox, the Sun rises minus 90 and sets at plus 90 degrees from Solar Noon. Calculate approximately 15 degrees per hour to move from Solar Noon to Sunrise. You could simply things even further my moving to that same sunrise angle year round. The collector would blindly track the Sun below the horizon until sunrise.

A simple worm gear or screw, as you suggested is best. A robust DC motor that can easily overcome the drive friction is recommended (gear lube is much more viscous in Winter). The motor start/stop times should produce repeatable movements. By this I mean the motor run time for the movement should not produce significant errors.

At Sunset you can drive the collector to the Solar Noon sensor, using that as your zero position, and then drive it the number of desired degrees toward you desired Sunrise position (which may be fixed year round)

Hope that helps.

References:

http://www.atmo.arizona.edu/students/courselinks/fall07/nats101s31/lecture_notes/sunpaths.html

http://suncalc.net

[quote author=George Matthews date=1414854777 link=msg=1944353]

The angle of incidence is not too critical, Plus or minus 15 degrees reduces output by approximately 5%. [/quote]

That is useful to know.

Since we know the Sun's apparent movement across the sky is 0.25 degrees per minute or 15 degrees per hour, it would be less complicated and less prone to failure to move the collector 5 degrees every 20 minutes rather than using the two light sensors as you suggest.

I recommend using UNIX time or a simple seconds counter to track time. There is no need to know the local time, DST or date. Those one chip clocks are not necessary. You really only need to set Solar Noon time in seconds. Based on that we know 60*60*24 = 86400 seconds until next Solar Noon.

Using a pair of light detectors avoids the need to measure both degrees and time.

Identifying solar noon with an Arduino would require a Real Time Clock module as the internal 16MHz clock is not sufficiently accurate.

...R

another question I have is, if I do this project, how would be the best way to protect it from the elements and harsh sunlight??

most sensors can be exposed directly. if you want to put a cover over you could mount your parts inside a lid to a jar and then seal the jar.

Identifying solar noon with an Arduino would require a Real Time Clock module as the internal 16MHz clock is not sufficiently accurate.

Using the interrupt driven Timer Library I consistently get less than one second per hour deviation.

Over the course of a year, if drift was 1 second /hr, we could expect a 30 degree or more error.

I do however issue a correction every hour based on UNIX time from my computer to GPS module for all of my projects.

Thanks for all the replies and information!!! I have my homework for the next few weeks!

For my first project, I figured I'd use the K.I.S.S. (keep it simple stupid) method. The more math that I have to do, the more likely I am to make mistakes.. With the light sensors, it's a simple compare the two and turn towards the west...

I plan on this being an add on project as I go along with a learning experience. I see potential for Arduino to control the whole solar charging system. When the bank is full, instead of discharging the extra, why not try to use it. Solar hot water systems struggle to keep up, so why not use the excess to heat water or other needs?

Truthfully, I see where a couple Arduinos, a couple RF transmitters and receivers, a few sensors, and some out of the box thinking could run a completely "off grid" system with high efficiency for less than $100 and a few hours of testing and coding along the way.. I'm not ready for this yet, but I have to start somewhere......

Again, Thanks for your time, replies, and vast wealth of the information that has already been shared.. I look forward to other.

Eric

Hi, I'm not going to get on my soapbox, but using time as the only reference as to where to point the panel assumes that the maximum radiation will always come from the direction of the sun, even when its partly or fully cloudy. I have seen panel systems pointing up to 30 or 45 degrees away from the sun when it is cloudy because cloud density is only allowing the maximum radiation in through the least dense part of the sky. [soapbox]Also using the maximum radiation method, it is universal as to where on the earth it can be used, and it will always point to the highest level of radiation.[/soapbox]

A worm and gear drive would be ideal as it will not require a braking system, the wormdrive preventing drive back from wind blowing on panels, it also is a neat low parts count gearbox, KISS.

http://en.wikipedia.org/wiki/KISS_principle

Tom...... :)

Greensprings: ideally a 3 or 4 panel array

in

A B C D

A and D are compaired for elevation control and B and C for direction control

or

B C A

B and C for direction, A to B/C for elevation or even A to B/C for both

Yea, I've also thought about rotating the sensors 90 deg for vertical tracking

Greensprings: use rc servos, not 24 v dc motors, you will probably burn more energy in one hour than you will collect in one month, but hey, got nothing better to do!

I can't figure from this if you are in favour of servos or against them.

Servos would be utterly useless as they need power all the time to hold position and you would need enormous servos to hold a solar panel against the wind.

DC motors driving though a screw or worm gear system will hold position without any power.

...R

Greensprings: use rc servos, not 24 v dc motors, you will probably burn more energy in one hour than you will collect in one month, but hey, got nothing better to do!

A servo isn't strong enough to handle the weight of the solar panels.. they weigh 26 pounds each...

Full tracking of solar panels have proven to boost their output by 20%.. with (5) 100 watt panels, that is like having a 6th panel for production...

A screw jack is easily fabricated with all thread, a few nuts, and a little aluminum angle and flat bar.. and there is no energy used to hold them in place..

I'm waiting on the Arduino to get here, but I'll post some of my code and design images in a little while..

Here's a little frivolous idea.

How about having a wind driven impeller that through a system of gearing raises a heavy weight by turning a shaft. When the solar array needs to move, the appropriate gears are engaged by against this shaft (by means of small servos) and then the weight is allowed to descend. This will then drive the solar array into the correct position.

You could perhaps have a battery driven motor to raise the weight on those days when the wind is just not enough.