Arduino Solar Tracking

Hello all,

Before I dive into my questions and comments on my current project... a little background: I'm a senior mechanical engineering student currently working on a solar tracking system as a capstone design project. Being a mechanical engineer with limited programming/EE experience, I'm quickly realizing I'm in over my head when it comes to the required electronics.

The tracking system my team and I are working on is a single-axis azimuth tracker. In essence, we are attempting to make a pole-mounted unit similar to this which is capable of adjusting to the changing azimuth angle throughout the day.

After considering our options and the many systems currently in use, my team and I are hoping to use a microprocessor running a location and time based program which calculates the azimuth angle and adjusts a stepper motor accordingly. I was originally brought to this forum after finding this discussion on solar tracking. While I am not a programmer and have not worked with Arduino before, I'm confident that I can adapt Mowcius' code from that discussion (with appropriate attribution if I can get a real name :)).

My biggest concern at this point would be the required electronics/hardware. As this is supposed to be a utility scale unit, we ultimately need to invert the DC signal and output AC power. Aside from that, between the panel and the inverter, I'm a bit lost as to what is necessary. Is it possible to power the microprocessor/motor controller/motor directly from the solar panel output? Is it possible to do something like this without a charger + battery? Any suggestions for resetting the unit in an eastward direction the next day?

Let me know if anyone needs additional details/clarification. I look forward to hearing your suggestions.

Thanks,
Scott

Stebes:
Hello all,

Before I dive into my questions and comments on my current project... a little background: I'm a senior mechanical engineering student currently working on a solar tracking system as a capstone design project. Being a mechanical engineer with limited programming/EE experience, I'm quickly realizing I'm in over my head when it comes to the required electronics.

The tracking system my team and I are working on is a single-axis azimuth tracker. In essence, we are attempting to make a pole-mounted unit similar to this which is capable of adjusting to the changing azimuth angle throughout the day.

After considering our options and the many systems currently in use, my team and I are hoping to use a microprocessor running a location and time based program which calculates the azimuth angle and adjusts a stepper motor accordingly. I was originally brought to this forum after finding this discussion on solar tracking. While I am not a programmer and have not worked with Arduino before, I'm confident that I can adapt Mowcius' code from that discussion (with appropriate attribution if I can get a real name :)).

My biggest concern at this point would be the required electronics/hardware. As this is supposed to be a utility scale unit, we ultimately need to invert the DC signal and output AC power. Aside from that, between the panel and the inverter, I'm a bit lost as to what is necessary. Is it possible to power the microprocessor/motor controller/motor directly from the solar panel output? Is it possible to do something like this without a charger + battery? Any suggestions for resetting the unit in an eastward direction the next day?

Let me know if anyone needs additional details/clarification. I look forward to hearing your suggestions.

Thanks,
Scott

I see no reason why you couldnt power the arduino direct from the solar output, but I would use a battery/charger setup to keep it running at night or if the out put gets too low(and it would be hard to set up). Is the motor going to be AC or DC.
As for returning to eastwardly direction, perhaps using end-of-travel switches so when it reaches the end of the west travel it automatically returns to east ready for the next day.

My concern is that the output from the solar panel is going to vary considerably depending on time of year, time of day, weather etc etc. Will this still work for powering the motor+microprocessor? I was planning on using a dc motor -- preferably a stepper motor if I can figure that out. Obviously, without a battery I'm going to have to get creative for resetting the system for the next day since it won't be able to run at night.

If I want to power the dc electronics AND then invert the remaining power as AC output, how would I configure that? Split the output from the solar panel... one connection to the inverter and another to the dc electronics?

Sorry for the very basic questions, it's been a few years since I took my one and only class on electric circuits. I really appreciate the help.

What is the DC output of the panels? If greater than 12v, I would set up a switch mode based reg such as the LM2576 to regulate the 12v to a clean 5v.

Optimum operating voltage 29.6V
Open circuit voltage 36.7V

Definitely need to step that down. I'll looking into voltage regulators.

If I wanted to generate the time + location data automatically (instead of inputing the data as variables within the program) what additional modules would I need for the microprocessor? GPS and some sort of timing circuit?

Thanks for the help so far.

You may want to go to the old forum below and search for solar as there has been much discussion on the subject in the past.

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl

My concern is that the output from the solar panel is going to vary considerably depending on time of year, time of day, weather etc etc. Will this still work for powering the motor+microprocessor?

That's why you have a battery, this is no different to a standard solar power system.

For 24v you need two batteries of course, the inverter runs of both and the other DC stuff can be tapped of one of them (OK that's not best practice but it works), otherwise use a switcher to regulate down from the 24.

without a battery I'm going to have to get creative for resetting the system for the next day since it won't be able to run at night.

No battery will complicate matter a lot I think. You'll have to know when it's end of day and return the panel while you still have the power etc. Or return it when you get power next morning. Also, when happens if the sun goes in for an hour?

Another think about not using a battery, the power will rise very slowly as the sun lands on the panel, this will not reliably reset the processor, so you will need some form of comparator hardware to wait for the voltage to be good then switch the Arduino on.

Personally I'd just buy an off the shelf solar regulator and add two small SLA batteries, then all these issues go away.

If I want to power the dc electronics AND then invert the remaining power as AC output, how would I configure that? Split the output from the solar panel... one connection to the inverter and another to the dc electronics?

Nope, run both DC and invertor from the battery. Easy.

If I wanted to generate the time + location data automatically (instead of inputing the data as variables within the program) what additional modules would I need for the microprocessor? GPS and some sort of timing circuit?

Just GPS I think, you can get the real time from that.

Another thing to think of is positional feedback from the panel (or non-volatile storage of the position), I know that with a stepper you should know where it is but if the power fails you will never recover and probably try to turn the panels facing into the ground. An alternative is end of travel switches so you can reset the system.


Rob

Just GPS I think, you can get the real time from that.

Yeah just the GPS.

Thanks for everything so far.

I've been reading about other people's solar projects (arduino + nonarduino based...) and I'm still a bit confused about the battery situation. It seems like what we're trying to make is basically a cross between typical grid tied systems and an off the grid system.

I need the batteries JUST for the sake of powering the DC electronics and completing the tracking motion, but I ultimately want to invert the majority of the power and output it (potentially) into the grid. I don't need to store large amounts of power in a battery bank for the sake of powering my home at night, for example. While I don't have the power requirements for the motor + arduino electronics in front of me, it really shouldn't be much compared to the potential output of the panel (the full scale model is based on a 230W unit). Do I still need a large bank of lead acid batteries if all the energy I need to store is a day's worth of power consumption for the system? Weight is a serious concern due to the mounting conditions (bolted to utility poles).

I know that in off grid systems the inverter is typically connected to the battery bank. Would that still be the case in this situation? Can I connect something like the following, splitting the panel output:

Solar Panel Output > Inverter > Grid Tie
Solar Panel Output > Voltage Regulator > Charge Controller > (Relatively Small) Battery > Arduino/GPS > Motor (possibly w/ motor controller)

Thanks,
Scott

We didn't know about the grid connection so that makes a difference.

I've not seen it done this way but the scheme you suggest may be OK. The only thing I would be worried about is the performance of the inverter with dodgy input voltages as the panel voltage increases/decreases at end and start of day. I'd get the specs and look into that.

If that's a problem you can use the Arduino to measure the panel voltage and control the power to the inverter.


Rob

The inverter we intend to use actually utilizes max power point tracking... maintaining the proper load to achieve correct voltage/current for max power. I'm assuming if I start trying to draw current off of the panel in a parallel circuit, I'm going to screw this up.

After considering the options, I'm starting to think that my best bet is to allow the panel to connect directly to the inverter, which is designed to tie into the grid. I'm thinking there must be some way to wire a DC power supply into this inverter output/grid tie. Assuming the sun is out, and the inverter is running, I would be drawing electricity from the inverted electricity output. If the sun is down, that same connection should draw electricity from the grid, correct?

If you are happy that the inverter is happy with sometimes dodgy DC input then yes I'd say just hang your Arduino of a wall wort on the AC.


Rob

Thanks for the feedback.

Another issue I've been struggling with is the design of the drive system. I originally planned on using a stepper motor... but I'm starting to doubt whether that's the most robust option.

Telling the motor to step at a given interval to keep up with a corresponding change in solar azimuth angle will probably only work if you set the system in a specific orientation at a specific start time/date and never lose power.

An alternative I'm considering is using the Parallax HM55B compass module. If I mount the compass onto the rotating structure along with the solar panel, the arduino should be able to read the panel's own azimuth angle. I'm guessing I could write the program to calculate the sun's azimuth at given intervals and rotate a normal DC motor accordingly to try and match the panel's azimuth with that of the sun (within a certain error range).

So if I don't use a stepper motor, the electronics should look something like this:

DC power supply, Arduino, Parallax GPS, Parallax HM55b Compass, Undecided motor controller + CIM DC motor

Would I be maxing out the capabilities of the Arduino Uno trying to read and parse GPS data, calculate the sun's azimuth angle, read the panel's current azimuth angle, and running a motor/ motor controller?

To use the stepper motor all you will need are limit switches on the panel. (previous suggestion)

Every night/morning you can just tell the panel to go as far as it can, and when the switch triggers you will know exactly where it is.

You will require a huge gear-down ratio from the motor to the panel though, otherwise strong wind could throw off the panel's position during the day. It's also worth considering a "LOCK" on the panels so at night you don't need power to keep the stepper motor from rotating.

One thing you will have to watch is the GPS gives you time and position but not direction the whole unit is pointing. The parallax compass should solve that.

The Arduino will have no problem with doing everything you need. I don't see any functions here that are particularly time sensitive, given the relatively slow moving nature of the sun. I can't imagine the panels position needs to be updated more than once or twice a minute.

As for powering all of this, I would very seriously consider using something like a PC power supply inside the house, run off the 120v AC grid. It will require an additional set of wires out to the panel, but will save you a ton of hassle making sure everything works when the solar output is not optimal. Depending on the size of your panel, if you only need a small stepper motor, you may even be able to get away with a large wall wart as suggested before.

hello,
i am making my final year project on solar tracking,in which i included ATMEGA644p microcontroller to control motor as ldr signals 1 or 0 to microcontroller.Main problem is i dont know programming language. so i kindly request to help me on programming codes for "2 ldrs signals outputs are fed to controller,1 of those gives output 1 and another gives output o to mc...now i need program which runs motor untill both ldrs signals are 1(on),after that motor should rest till any of the output goes to 0 of ldrs....

thanks,
mechatronicsboy

mechatronicsboy, we're not here to code for you. If it's your final year project then you should be doing it rather than getting others to do it for you.

The code is simple enough - I wrote something very similar in about 5 mins a few months back.