Arduino Solar Tracker by geo bruce
Contest WinnerFeatured

Step 1: How it works

a1.jpg
a boven.jpg
DSC01611.JPG
DSC01614.JPG
How it works:
I'd made a sensor of 4 LDRs with sheets between them

The withe stips are the LDRs 
 
When the stick on top is righted to the sun or the brightest point 
the four LDRs get the same amount of light on them.

Example1 when the light is left on top:
right-top, right-down, left-down are in the shadow
and left-top get the most light

Example2 when the light is on top
left and right down are in the shadow and top is in the light


 

1-40 of 78Next »
ahsim says: Apr 23, 2013. 11:25 AM
ah23,
It depends what kind of stepper motor driver and stepper motor you are using. This instructable was inspired that idea with me too.

This is really helpful: http://bildr.org/2011/06/easydriver/
I'll post my progress soon
ah23 says: Apr 17, 2013. 12:53 AM
Hi, geo bruce
I really liked your project! I want to replicate your sun tracker. I have an Arduino uno and would like to use 2 stepper motors instead. How would this change the code and wiring? Any help will be much appreciated.
gsettimo says: Apr 2, 2013. 4:40 AM
1K or 10K ? In part list you write 10K and I think it's the correct value. Isn't it?
geo bruce (author) says: Apr 3, 2013. 8:30 AM
10K should do it
mokhtamu says: Mar 30, 2013. 8:00 PM
do you have a photo of your breadboard? I am unsure about the potentiometer.
thank you.
geo bruce (author) says: Mar 31, 2013. 5:00 AM
https://plus.google.com/photos/113999145529424799628/albums/5624348007316315313
econjack says: Mar 26, 2013. 7:37 AM
Great article! I hope to modify it a little for a piece I'm working on for a solar charger for portable ham radio use. There's a slight hiccup in the code 8 lines from the bottom where it reads:

else if (avl = avr)

where the expression within the parentheses is an assignment statement. I think George wants a relational expression. It should be:

else if (avl == avr) // Note the double equal sign...

However, this is a no-harm-no-foul bug, since nothing is done with the values until after they've been reassigned.
geo bruce (author) says: Mar 26, 2013. 10:53 AM
thnx
I fixed it
spykar61 says: Mar 17, 2013. 10:17 PM
@geo bruce
I am using a 10 inch solar panel.so i guess,servo motor is not enough to rotate the panel in the desired direction.
Which Motor should we go for..DC,Servo,Stepper.
And what are the changes need to be done in the program?
Reply ASAP
jtmdie says: Jan 28, 2013. 4:43 PM
like how do you know which LDR is on the top and the bottom
geo bruce (author) says: Jan 29, 2013. 7:58 AM
? just follow the wire to your arduino
amp625 says: Jan 24, 2013. 11:45 AM
Want to congratulate you on some nice programming. It's all about simplicity, there are a thousand ways to do it, but this one is up there in efficiency. All the others I've seen are supper long. Nice man.
jtmdie says: Jan 24, 2013. 3:44 AM
Hi there, may I know how do you differentiate the positions for the respective LDRs?
geo bruce (author) says: Jan 24, 2013. 8:25 AM
what do you mean?
Yasesu says: Dec 14, 2012. 9:11 AM
Could you add a parts list to the instructions?

Thanks
geo bruce (author) says: Dec 14, 2012. 9:22 AM
done ;)
Yasesu says: Dec 14, 2012. 11:59 AM
Thank you. That is great. I have a 3 panel 45W solar panel from Harbor Freight. I've been looking at ideas to keep the panels facing the sun. Now I just need to take your idea, and make it bigger. I need to find some large servo motors.
geo bruce (author) says: Dec 14, 2012. 1:30 PM
if you want to go big you can better go for stepper motors
and change the code a little bit
tolstoyan says: Jan 24, 2013. 2:56 AM
hello geo bruce im a beginner here at the arduino so im not really a code jockey, can you please tell me which part of the code do i have to modified and what exactly to replace if any, thanks because im planning to build this its just that i bought stepper motor instead of servo
crimsonbow92 says: Jan 21, 2013. 9:54 PM
Please send it again, there is nothing in my inbox
geo bruce (author) says: Jan 22, 2013. 8:22 AM
in your instructables indox
crimsonbow92 says: Jan 21, 2013. 11:04 AM
Can I have ur mail in an inbox for easier communication?
geo bruce (author) says: Jan 21, 2013. 11:16 AM
check your inbox ;)
crimsonbow92 says: Jan 21, 2013. 10:56 AM

I still don't know what do they refer to ?
What is the use of the Speed and Tolerance? Which speed do you control, and which tolerance? Why are potentiometers connected like that?

Thanks again
geo bruce (author) says: Jan 21, 2013. 11:09 AM
speed is the update speed of the tracker don't set it to fast
tolerance is how much difference is needed before he updates
and how accurate it need to be

see voltage devider on wikipedia
for why the potentiometers are connected like that
rtsubasa says: Jan 11, 2013. 10:00 PM
Sorry for posting a separate comment.
The captcha doesn't appear for my reply so I couldn't post a direct reply.
anyway, I added a paragraph of codes;
while(time<=5000)
{
servov = 60;
servoh = 60;
delay(1);
time++;
You can see it from the first screen shot from my previous comment and also changed the turning angle of the motors.
geo bruce (author) says: Jan 21, 2013. 9:22 AM
while(time<=5000)
{
servov = 60;
servoh = 60;
delay(1);
time++;


why would you dot that?
crimsonbow92 says: Jan 20, 2013. 1:08 PM
What is the "Tolerance" and "Speed" refer to ?
Why is Speed/20 and Tolerance/4 ?
What is the use of these if conditions
if (-1*tol > dhoriz || dhoriz > tol)
if (-1*tol > dvert || dvert > tol)

Thanks alot
geo bruce (author) says: Jan 21, 2013. 9:19 AM
Why is Speed/20 and Tolerance/4
to make speed a value between 51.2 and 0
and tolerance a value between 256 and 0

if (-1*tol > dhoriz || dhoriz > tol) //= if the light difference between left and greater then the allowed tolerance

if (-1*tol > dvert || dvert > tol) //= same but for top and bottom instead of left and right
rtsubasa says: Jan 7, 2013. 5:55 PM
Hi there
I've slightly modified your program and I've attached two screen shots of the program
My program seems to have a little problem as the servo does not move towards the brightest point
Could you please help me out by checking the program?

This is the link to the servos I am using : http://www.robot-r-us.com/motor-rc-servos/src-s4303b-standard-analog-servo.html
lkj.pnglkjh.png
geo bruce (author) says: Jan 8, 2013. 8:45 AM
what exactly did you change?
cipot87 says: Nov 16, 2012. 6:24 AM
dude..why my vertical motor not respon well..
cipot87 says: Oct 22, 2012. 8:12 AM
hye dude..i'm really need you..i'm use standard motor,10kohm and variable resistor 5kohm..but,the servo motor doesn't responce to LDR..i'm already use provided code..
geo bruce (author) says: Oct 22, 2012. 8:12 AM
are you using a servo motor or just a normal dc motor?
cipot87 says: Oct 23, 2012. 2:08 AM
servo motor.. i mean hitec hs-311 model..
ftello barahona says: Jul 29, 2012. 10:23 AM
Good Tutorial


I make your project but I have problems with the tracker.... It dont follow the sun correctly. I am using Tower pro sg5010 servos and 10 k resistors... Do the code change in something???

and i cant understand the positions of the LDR's is it correctrly??::


pin 0; //LDR top left
pin 1; //LDR top rigt
pin 2; //LDR down left
pin 3; //ldr down rigt

and what is left and right??? top view of above view


Sorry for my english


ashrafzulkifli says: May 8, 2012. 2:12 AM
dear Geo Bruce ,
yes i am using arduino duemilanova.
but when i uploading the code, its shows problem to uploading to board .
what is my problems actually ?
need some help here !!!!
pleasee..

Binary sketch size: 3794 bytes (of a 30720 byte maximum)
avrdude: stk500_getsync(): not in sync: resp=0x30
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51
geo bruce (author) says: May 8, 2012. 8:10 AM
maybe this can help?
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230381702/all
Ellen the Generous says: Mar 7, 2012. 4:39 PM
Hey Bruce,

I have a continuous rotation Servo Motor Springrc SM-S4303R, and a Servo - Medium Full Rotation (SM-S3317S) (I think springRC) that I'm trying to get working for this same project (a friend is using the S4303R for a different project). I've done a bit of research and it looks like I'll have to add a PWM Input change like you did with Poesis. Would you know exactly what sort of change I'd have to add to the PWM Input to make them move properly? The specs for the S4303R say that 1.5uS is the neutral value for the PWM, so I tried (I'm experimenting with the S4303R while my S3317S comes in the mail) using this same PWM values you suggested to Poesis, but to no avail, and I can't seem to find the PWM values for the S3317S. Help! It's urgent!

geo bruce (author) says: Mar 8, 2012. 8:54 AM
maybe the comments of:
- AHiggins
- RobertC.
- Member #148301: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1278145608
might help
http://www.sparkfun.com/products/10189
8-03-2012 17-51-28.jpg8-03-2012 17-51-16.jpg8-03-2012 17-50-34.jpg
1-40 of 78Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!