solar tracker problem

Hi, my arduino uno is acting strange.. I'm doing a solar tracker with 5 photoresisters and 2 servos..I have a shceme and a good program and everything was running good until I took it apart and assembled it again.. My servos dont act good now and so I made a smaller cirquit with only 2 ldrs.Tthe servo tends to move from the right way but stops imidiately.. Did I burn something?? I disconected it several times and connected it agin but nothing.. Other programs like "sweep" or with a pontetiometer and the led at pin 13 work fine.. Whats the problem?? :frowning:

You haven't really given us ANY information that might enable us to help you.

My first guess is that you have not put it back together the way it was originally. But since it appears you don't have a record of that (and we certainly don't) there is a problem.

...R

The shceme that I found and done is this one http://duino4projects.com/wp-content/uploads/2013/04/Sun-tracking-Arduino-circuit.jpg and the code is this one Arduino Simple Solar Tracker - Pastebin.com and I just change the analog inputs and digital to the correct ones.. My servos now act strange.. I've done another example with only 2 ldrs and the servo moved from the right direction but only for 0.1 inch and stop.

The location of the sun in the sky as a function of time and location on the earth has been well known for a very long time. Instead of "searching" for the sun Google the equations for location of the sun and apply those to your system.

To do this accurately you will need to know the location of the system, a GPS is more than adequate for that and you will have to go through some trigonometry to do the translation. Keep in mind all trig functions I have ever seen on a computer use radians as the unit for input and output, you will need to convert degrees to radians and back. Once again use Google if you do not know the conversions.

Hope this helps.

Well thanks for the reply but my project is a solar tracker with ldrs and it was working but after I made the cirquit again from the beggining the servos dont act correctly..

I like the idea of LDRs for tracking the sun. It is wonderfully simple.

@alehandro, you have posted links that (presumably) show how your project should be connected, and perhaps / probably how it was connected. You have also posted a link to code that is, I assume, completely unchanged from the code that worked before.

With that information I have no means to give you any advice about why your project is not working now.

If the code is unchanged it seems likely that the wiring now is different from what it was. Of course some part might have become damaged but I have no way of knowing that.

The best I can think of is for you to draw a clear diagram of how it is actually wired now and post a photo of that. Keep the photo to 640x480 if possible.

It is also probably a good idea to write a few short sketches to test each of the pieces of your hardware on its own.

...R

Robin2:
I like the idea of LDRs for tracking the sun. It is wonderfully simple.

I find calculating the positions of the sun easier and less prone to error, the math is not that scary.

wwbrown:
I find calculating the positions of the sun easier and less prone to error, the math is not that scary.

To use the calculations you must orient the device accurately at least once. With LDRs you just need to point it in the rough direction of the sun.

...R

Hi

I find calculating the positions of the sun easier and less prone to error, the math is not that scary.

[soapbox] I agree with Robin2, anywhere on the earth and the LDR's will work without any calculating, also the LDRs will track to the brightest part of the sky, which is not the sun behind a cloud.

Also the sun as it approaches the horizon is diffracted so its apparent position does not follow an algorithm.[/soapbox]

Can you post picture of your project, also if you are using protoboard as in the fitzing diag, check that you have continuity down the two power supply rows on the outer edge, some have a break halfway down.
Also powering the servos off the 5V of the arduino is not recommended due to current needed to drive servos.

Tom..... :slight_smile: