Solar tracker project
littlej040
Posts: 6
Hello all,
Im new to the forums, and had a few questions based on the parallax proto board. For my senior design project im working on a Solar Tracker, that is using 2 LDR's to sense the change in light dependant on the direction of the panel. We are using the LTC1298 A\D to feed digital data into the microcontroller. Right now our current concern is how to effectively use the change in resistance, and be able to distinguish which resistance equates to which direction the panel needs to move. We are using a Zex servo motor as our drive of the panel. Is a comparator circuit the way to go? Or is there a simpler solution to getting the change of the two resistances?
thanks,
jeff
Im new to the forums, and had a few questions based on the parallax proto board. For my senior design project im working on a Solar Tracker, that is using 2 LDR's to sense the change in light dependant on the direction of the panel. We are using the LTC1298 A\D to feed digital data into the microcontroller. Right now our current concern is how to effectively use the change in resistance, and be able to distinguish which resistance equates to which direction the panel needs to move. We are using a Zex servo motor as our drive of the panel. Is a comparator circuit the way to go? Or is there a simpler solution to getting the change of the two resistances?
thanks,
jeff
Comments
Personally, I think I would just calculate the solar angle based on longitude/latitude and time...
I assume you are designing the LDR's like this...
http://www.doctronics.co.uk/ldr_sensors.htm
From what you've said, this sounds pretty simple. Can't you just make an algorithm that goes like this:
Move panels left
Check Resistance from LDR
If Resistance increased(less light?)
Move Panel back to the right
If Resistance decreased
Move Right again and repeat resistance/movement checking
Bascially, the microcontroller makes the servo move in the direction that equates to more light, right? Motion control is fun, but doing Maximum Power Point Tracking is even more fun. I'm doing that right now. With MPPT, you are bascially matching the best load to your solar panel, dynamically. I'll post a link to a thread I did.
If you are getting a numerical input from the Linear ADC, you should be able to use the >/</= functions in "spin" to see which is larger. A simple register that sets the direction of the servo based on the result of the comparison's outcome would good (in case your motor or inputs are reversed). Based on the magnitude of the difference you can move your servo more (and faster).
The same applies for a dc motor or a stepper motor. Whichever LDR is getting more light you more the motor in the direction of that sensor, if there is a lot more light on one side than the other it should move faster (like for sunrise - when the array tracker was pointing in the direction of the last sunset). If you add a variable hysteresis amount to the routine - it can allow the servo/motor/stepper to "sleep" when it is not needed to adjust the position of the array. This would prevent the actuator from "hunting" and using valuable solar power in the process...
I do have to agree with Rayman's point though... Why not use a GPS or other time receiver to get the time? With GPS you get the lat/lon/Alt/Time - so you can calculate the angle/azimuth of the sun for a given calendar day and second, after a single calibration (array-base "heading", and the motor "transit" numbers) you could do an X/Y array tracker without the requirement for a clear day - as a light sesitive tracker may have trouble when the sky is over-cast (it creates a diffused light that can trick your LDR circuit...). If you accumulate the stationary GPS Lat/Long/Alt data over several weeks - the accuracy will go up a whole lot (accuracy down to a few centimeters/inches).
-Tim
Can any of you point me in the direction on how to create a comparator within the uC? I'd love to use SPIN to its potential, as more than likely I'm going into this type of work after I graduate, namely DSP for audio and what not.
This is my first crack at programming, and i already love the versatility this chip has
>>Jeff
Check this out :
http://www.srrb.noaa.gov/highlights/sunrise/azel.html
It would be even more impressive to know exactly where it its
in advance. Also, you could dither the tracker to pick up the
sweet spot (highest power point).
Spin will make this task pretty easy. You can build a table of
dates and times in a DAT section and feed them one by one
into the algorithm to cross check them against NOAA.
Scott
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.
Michael King
Application Engineer
R&D
Digital Technology Group
So we have decided to design our project still using the LDR's and just using a simple voltage divider to output a voltage to the A\D. We've made a few conditional measurements in full sunlight to get our max and min impedances so that we can design a linear SCC circuit to provide the 0-3.3V out to the A\D. My concern now is how to find the "sweet spot" and how to code the propeller to adjust the panels location to maintain this value consistently. We're still tinkering with the servo motor as well, which is taking time, because i am not completely up to snuff on PWM to control it.. any more insight would be great thanks!
For a finely tuned position like you require, continuous rotation will not work.
A standard servo (i.e. R/C control) for positioning is controlled by the PWM which will be centered with a positive pulse width of about 1.5ms. The "zero" portion of the cycle should be on the order of >= 2ms. As you change the positive pulse width length, the servo arm angle will change, so the angle becomes a simple ratio that can be easily adjusted to use degrees or radians. There are various objects you can use. The Servo4.spin being the simplest. I recommend not moving more servos simultaneously than necessary as you can cause a VCC voltage dip when too much current is drawn.
Have you tried any experiments with an IR detector instead of LDR? Not trying to throw you off course, but IR might be more effective on a cloudy day ... I'm just guessing and have not done the experiment myself.
I found an LDR I used on a project needs a very large resistor in the voltage divider. There are A/D circuits that can be made with Propeller and passive components; I've had little luck measuring small voltage changes with them though.
I'm sure there are other useful and more verbose opinions you will find here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔