dual axis solar tracker for mobile/portable installation of solar panels

ok, first off, yes i am completely new to this type of thing. i have verry little experience with programming languages and electrical engineering. so if something i say seems a little off, PLEASE dont hesitate to point it out &/or enlighten me with the correct terminology or information.

now that thats out of the way. my project...

what i want to do is create a dual axis solar tracker for mobile/portable installation of solar panels (eg. rv rooftop, trailer rooftop, or truck bed installations.

what im looking for:

a way to control a 360 deg. rotational x axis (stepper motor or servo) with 2 Photoelectric Sensors.
a way to control a 180 deg. pivot y axis (preferably a Linear actuator) with 2 Photoelectric Sensors.
a way to store a command for "standby" (essentially "return to home if {condition} is met" kind of thing.)

now i have been researching the forums, and i have found a lot of great ideas that have helped me "flesh out" my project on paper. im thinking of using an UNO board with a proto shield to start my project. the only thing is, during my research i noticed that the UNO board really only safely runs ~6V DC. And the equipment im using runs on ~13V DC.

i would be powering the stepper motor/servo & linear actuator with the power from the battery bank, with a 120V AC to 6V DC transformer, so "overnight" power requirements wont be an issue. what i cant seem to get my head around is how to control the equipment AND supply the correct voltage at the same time.

i had thought of possibly using some kind of relay system, however i don't know/understand enough about them to really put one in place.

2nd problem, the programming. i do have some experience with programming languages, Python & Adobe CSS, but not enough that im comfortable with trying to go it alone to try and programing this thing. my basic idea was something along the lines of

code(or how i think it should work in my head anyways):

"automatic operation"

read voltage of PE sensors 1&3 note: reads voltage of PE sensors for x axis /note
read voltage of PE sensors 2&4 note: reads voltage of PE sensors for y axis /note

compare voltages on sensors 1&3, 2&4 note: compares voltages for sensors on both x&y axis's

if voltage on sensors 1&3 don't match, then adjust x axis to balance voltage, else do nothing note: duh /note
if voltage on sensors 2&4 don't match, then adjust y axis to balance voltage, else do nothing note: duh /note

"automatic standby"

if total voltage on all PE sensors is less than "X", then return to "home position" note: sets panels back to a flat position in which the x axis points "north" or 0 Deg. (eg. front of the trailer/rv/truck) and y axis points "south" or 0 Deg. (eg. back of trailer/rv/truck) /note

"manual standby on"
when manual standby is activated ignore total voltage on all PE sensors & return to "home position" note: sets panels back to a flat position in which the x axis points "north" or 0 Deg. (eg. front of the trailer/rv/truck) and y axis points "south" or 0 Deg. (eg. back of trailer/rv/truck) /note

"manual standby off"
when manual standby is de-activated compare voltages on all PE sensors & activate automatic operations to adjust panel from "home position" note: sets panels from a flat position in which the x axis points "north" or 0 Deg. (eg. front of the trailer/rv/truck) to align with solar maximum exposure, and y axis points "south" or 0 Deg. (eg. back of trailer/rv/truck)to align with solar maximum exposure. /note

/code

and yes i realize that this "coding" ,if you could even call it that, is very simplistic and probably would not yield usable results.

so any helpful advice on how i would program this using the arduino language, or getting the motor/servo & linear actuator to run off the UNO board without frying it with overcurrent/overvoltage would be greatly appreciated.

I thank you for your time

Brent.

Before looking at the coding let's look at one of the basic premises

a way to control a 360 deg. rotational x axis

360 is ok but you can't keep going unless you use a slip ring to transfer the power from the panels. So having reached 360 if you want to go to 10 you have to back off 350, not keep going.

a way to control a 180 deg. pivot y axis

If you can rotate 360 why do you need 180 on this axis. Even if this is to be used from the poles to the equator you only need 90 max. Chances are anything around 45 will be OK.

As for powering the actuators, that's simply a matter of them having their own power supply, that can also be used to power the Arduino unless it's too high a voltage. Typically 12v is the recommended max for VIN on an Arudino, if you are running from 12v batteries you might be tempted to connect that to the Arduino but they can gp up to 15v under charge.

if voltage on sensors 2&4 don't match, then adjust y axis to balance voltage, else do nothing

Unless your are flying due north (or south) at supersonics speeds this axis will only change over a period of weeks or even months. I see no need to have this sort of control. You can dial in the latitude or maybe set this angle once on system start up.


Rob

You do raise good points,
for the 360 deg. X axis I had planned for rotational clearance for a full 2 revolutions.

For the 180 degree y axis, I chose 180 degs. For ease of use. (being parked on a slight incline may possibly give an angle grater than 90 degs. For maximum solar effectiveness . this also addresses the need for the PE Sensors 2&4) essentially I would be hinging the y axis at the bottom of the solar panels to the outside edge of my 360 degree rotational x axis. I would also be using the linear actuator to raise and lower the panels from/to their "home position" for easy transport. This would allow the user to fold them flat against the trailer/rv/truckbed, therefore reducing wind drag and providing better aerodynamics in high wind situations (E.g highway speed transport, and wind storms. (I hope that my literary description of this can paint a more accurate picture in your mind than I originally posted, I apologize for the lack of detail. If I had a way to post a picture I would.)

So as far as powering the actuator / motors with their own power supplies how would I do that and still be able to control them? I understand now that the stepper motor/servo can be controlled directly from the uno board. But my linear actuator has only a + and - connectors and is controlled by either providing the correct or reverse polarity.

I think you are looking for problems that aren't really there. I understand shield like this

goes straight onto an Arduino but has it's own 12v supply so that Arduino can control 12v motors.

You really ought to be able to get by with one axis, and it would certainly make things simpler if you can tell where north is. If you truly want an alt-azimuth device it merely doubles the mechanics and maybe triples the sensors required, but likely increases the programming tenfold. That said, it has surely been done by astronomers and I bet it has been done with Arduino, so you might check in Sky & Telescope. A suitable sensor array could be made with LDRs, all but one of which try to be in shadow. An on-board clock would probably be useful. All this might involve a lot of fidgetting in the morning but you should be able to get the stepper motors to help by laying a track record from yesterday, thereby enabling a prediction of sunrise. Once you have done this, you can take comfort in the fact that today's tracking and tomorrow's sunrise can be predicted.

6v is not a good supply for Arduino. You either feed it a kosher 5v directly, or feed it a minimum of 7v via its on-board regulators, thereby enabling them to do their job properly. Arduiino gets pretty hot with 9v. I think 12v will be uncomfortable, for you as well as Arduino.

@ nick,

I thank you for your input

I understand that there are other options, and I believe that there are many ways to put this type of product together. My overall goal is to build a prototype product that has as little human interaction as possible. A 1 (or 2) button operated, fully automated system that everyone (grandma and grandpa included) can operate. And as far as the primary reason for the 4 individual PE sensors, this is (i belive) the simplest way to get the information needed to actuate the the project. And the simpler the better. Fewer things to break means easier replacement. I'm also thinking of making this system expandable. From a single solar panel up to maybe 8. (depending on the weight restrictions of course) so the PE sensors would be modular and removable.

OK, it's an altaz. This is the sort of thing gandma can put out the door at night, and leave it to do its own thing. Expansion is irrelevant, it's just a case of having the mechanicals the right size and nothing to do with Arduino. Rather than my previous, it may simply be a case of five LDRs in a tube. If one gets shaded, you know which way to go.

Hi, I gather you need 360 in X axis because the entire array could initially be positioned in any direction?
So you will rotate a base of the array as X axis, the Y axis will ride on the base with an actuator to get Y (azimuth) alignment.
This way the Y axis will always, no matter how the RV/MobHom is parked will be aligned to North or South automatically when it is turned ON.
I see that this has to be done to make it simple to operate and dumb operator proof.
I hope to be able to help.

Tom... :slight_smile:

PS.I like you bit of psuedo code, wish a lot more people would do it to work out program layout, or do a flow chart before they hit the controller.

Essentially, yes. But more along the lines of having it installed on the roof of her rv. :wink: that way all she has to do is Park in the sun and push a button. Instant off the grid granny :smiley:

@tom

Thank you :-D. I'm glad you understand what I was getting at with the North south thing :slight_smile: i wasn't sure if anyone had caught on that the front of the rv/trailer /truck is "north" and the rear is south. The actual compass orientation of the vehicle is as you stated variable. and Thank you for your comment on my coding :smiley: I look forward to any help you can offer.

Hi, fine Brent, the power supply for your arduino uno can be through a LM7808 regulator, this is a linear device and would need some capacitors around it for bypassing, it will happily work with the 12V battery and the 8V would be just about ideal to keep the arduino running fine.
The rest of the motors etc can be then supplied directly off the battery.

Tom..... :slight_smile:

for the 360 deg. X axis I had planned for rotational clearance for a full 2 revolutions.

Just bear in mind that the wires have to do the same, so sorting them out will be the biggest issues here i think.

For the 180 degree y axis, I chose 180 degs. For ease of use. (being parked on a slight incline may possibly give an angle grater than 90 degs.

If this is to be used in Norway then I suppose an angle in the 90 area may be required, although I suspect there would be so little solar energy that it wouldn't help much. I'm just thinking of the mechanism, 90 is one thing, 180 can be a very different thing. I would think 100 would be the absolute max required, especially as most people take great pains to get their vehicle level.

how would I do that and still be able to control them?

If you switch the low side of a motor the voltage used to drive it has very little effect on anything, you can have 12v powering the motor and switch the other side of the motor to GND with a suitable transistor or relay.

From a single solar panel up to maybe 8.

This is a problem IMO, 8 solar panels is a huge area with a lot of mechanical advantage over the pivot point. The wind loading would be immense. I know someone who has done just this (on the ground, not a MH), he used a car rear axle and diff as the mechanism and that was braced a couple of feet up the axle. Possibly over kill but don't underestimate the force of the wind on these panels.

I know another person who has a tracking system on a motorhome, he does have 8 panels but has to put it down if there's any chance of high winds.

For a single panel I think there is already a product that does this, certainly the sat TV people have the same requirements and they solved it years ago, mostly using GPS I think.

Also you have to think of the loading on the MH roof when the wind blows, most MHs are made form cardboard and staples, they will not stand much force being applied to the roof materials. It's typical to add steel bracing for air conditioners, you may have to do the same.

I've been living off solar in a motorhome for 13 years, in all that time I've only ever seen a single tracking system (the bloke I mentioned above), the general school of thought is that it's better to just add 1-2 more panels because the tracking only gives you 10-20% improvement overall anyway (depending on latitude of course, huge gains at the poles, almost none on the equator). Of course if you don't have the roof space it's not possible to add panels and tracking becomes more appropriate.

So I see the mechanicals as being the hard part, the programming should be pretty simple and there are a 1000 examples on the web, probably half of them open source. I'm more a fan of the RTC/GPS approach because it doesn't care about bird shit on the sensor or overcast days when your LDRs can't pick the difference. Although I suppose you could argue that if the light is that diffuse it doesn't matter where you point the panels. Your code will have to handle the case of a sunny day with a few clouds, ie don't go hunting just because the light fades for a while.


Rob

visit cerebral meltdown

he has the software complete for a 2 axis unit .

I understand the whole 720 rotation, (not 360 twice)
for this google about worm gears and telescopes. a worm gear can rotate indefinably and in regard to rotation, the movement is linear to degrees. besides, you cannot use a crank arm for 360 rotation.

as others mentioned, you can deliver 12v for the motors and then drop it to what the board wants. steppers are much better for this sort of thing and you can power them from driver boards. the driver boards use logic signals and output whatever power you want.

Thanks tom. So if I'm supplying the power directly from the battery how do I control the motors, I believe that the stepper motor/servo (x axis) can be connected directly to the uno board. Giving me full control of the 360 degree x axis. But my linear actuator (y axis) is a single positive terminal and single negative terminal controlling it comes down to switching the voltage from positive to negative and vice-versa eg pos to pos and neg to neg. Makes it drive forward (clockwise) and switching it to pos - neg and neg - pos drives it back (counter clockwise). To control it i actually have to push 12v DC power to get it to turn one way or another. So how would I do this without burning up my board? If you have a diagram that would be helpful you can email it to me. I'm more of a visual learner :wink: if I can see how something works. It sticks in my mind better.

Makes it drive forward (clockwise) and switching it to pos - neg and neg - pos drives it back (counter clockwise). To control it i actually have to push 12v DC power to get it to turn one way or another. So how would I do this without burning up my board?

Look up "H bridge", that's a circuit you used to swap the + and - for this sort of motor control. The Arduino drives the gates/bases of transistors and they switch the 12v, so the Arduino never sees the high voltage.

A motor-control shield will do this for you.


Rob

Why do you want to do this?
Have you looked at the economics of how much extra power you would get from a tracked array
and the economics of simply having a fixed array with an extra solar panel added.
Its generally easier and cheaper to add extra panels than to make a tracking array for a smaller number.

I strongly support @mauried. The KISS principle is essential.

The sun doesn't do 360deg unless you are above the Artic circle.

If the device is to be deployed at a regular property, instead of a motorhome or boat, then it's utterly improbably that the property owner doesn't know the direction of the sun at midday, and can't find out within a day or two.

Tracking the sun was successfully figured out with great precision 5000 years ago.

The more moving parts the more opportunity there is for something to go wrong - especially something that is exposed to the weather 24/7. Would the "helpless" owner be better with something that has extra energy but breaks down and needs to be fixed by a specialist or something with less output that doesn't break down? Will the extra energy comfortably pay for the breakdown service and leave a significant "profit"?

You need to analyze carefully the extra energy you will get from tracked vs stationary panels. This website can help http://re.jrc.ec.europa.eu/pvgis/apps4/pvest.php

I have 3x 80w solar panels on my boat and they lie flat on the roof for two reasons. It would be grossly uneconomic to make a strong enough "machine" that could elevate and rotate them. And, while I could orient them manually (lift them with a piece of wood under one side) I would have to readjust them through the day and I would get less output if (as is likely) I forgot to readjust them. As it is they will have paid for themselves in three years by making a very nice contribution to my electricity needs - except, perhaps, in Winter.

...R

Thanks greynomad, mauried, and Robin.

@grey,
Thanks for that information. Do you happen to have a diagram of how to install the motor control shield with the H - bridge?

@ mauried,
The economics that I'm looking at, using this system to maximize efficiency, would be a net increase of about 20-30%. Also when using this system this would translate into an additional of about 150 amp hours on a bank of 12 marine deep cycle 12V batteries. Whereas adding an extra panel to a stationary array would only give an increase of around 15-20% and an additional 105 amp hours. (according to my research anyway, I'm pretty good with numbers but please let me know if you come up with something different as my calculations may be off.) also making it automatically adjustable means that you can park your rv/trailer/truck in any position relative to the sun. Press a button and it instantly finds the best position to maximize solar power.

@ Robin,

Simplicity is my aim for this project. I would have only 2 pivot points. X-axis is essentially a lazy Susan with a hole in the middle thru which my power & com wires will run (there's a reinforced conduit for increased stability and securing it to the rv there as well.) I chose this option for the ease of use. It gives you the finest range of motion. No matter your orientation to the sun. And the y-axis is pivoted off the edge to give it better directionality, as well as to allow for a fold flat storage option during transport or high wind storms.

Fauxfire27:
Also when using this system this would translate into an additional of about 150 amp hours on a bank of 12 marine deep cycle 12V batteries. Whereas adding an extra panel to a stationary array would only give an increase of around 15-20% and an additional 105 amp hours.

So all this complexity will get you an extra 50Ah or about 10% compared to the simple solution?

How much is an amp-hr worth to the project?

I'm guessing that 12 marine deep cycle batteries probably have a nominal capacity of 2400Ah - or a realistic capacity of 800 to 1200 Ah. What brand of battery? How many amp-hrs will you move in and out of them in a year?

You will need to look at the overall energy balance. How many Ah will be used each day and how many are supplied by the sun on the best and worst months. If your consumption is well within the capacity of the solar panels you may have too many batteries and if it is not then you need more solar panels (if the project can afford them). Treat the batteries as consumables rather than assets.

...R

Standard car battery is usually around 40 amp hours. So closer to 4800 amp hours on a bank of 12, (give or take considering battery health and age) I'll be using 12 marine deep cycle batteries. So you could expect that number to be closer to 5000Ah. If you were running all the appliances in the rv in 12v mode, and all at once, you could expect to see the batteries die within 5 hrs. (less if you want to use the inverter to run a few 120vAC appliances as well.) This is of course without using the solar power system to recharge the battery bank during use. Now if you use the solar system (without a tracker) you are adding an additional 105Amps per hour to your battery bank. Now let say that in perfect conditions you have a full 8 hours of daylight, and no clouds. That comes up to 840Ah per day add a traking system and that jumps to 1200Ah. Per day. Giving us a total of 6200Ah on our battery bank. Which would give you an additional 1-2 hours using All of the appliances at once. Now this is of course an extreme supposition of the use of power system. So if you were looking at average VS. peak usage you could expect the battery bank to last around 8 hours with average use but peak usage spikes throughout the day could reduce that to about 6 hours. Now the charging system is a dual stage intelligent 7vDC trickle/10vDC blast charger. It activity monitors the battery bank (charge and load) and applies the correct amount of charge to the battery bank. This also helps maintain the health of the batteries. The solar system would help maintain a "topped-off" charge level. During the day and allows for full usage of the battery bank at night..

Okay, I think that we've gotten well off track. The reasons why I need to build this are all, because I want to. What I need is help getting it put together. As I said I'm not an electronics engineer, nor a programmer. I need help understanding the basics of building the control board, so that it reads the inputs from the PE sensors and controls the motors. I also need some help programming it. i know what I want it to do, but I don't know how to make it do it. These are the points of my project in which I need guidance.

@greynomad And @tom

I want to take this opportunity to thank you for your time and patience with me :slight_smile: I know that dealing with noobs is difficult. You have been very helpful and I have a few more ideas on how to connect my motors to the uno board. Now all I really need is the electronic parts and figure out how to connect everything and then figure out how to program it. :slight_smile:

Any suggestions?