Instructables
loading
loading
Picture of Arduino Solar Tracker
What is does:
It searches for the brightest light source like the sun.


 
Remove these adsRemove these ads by Signing Up

Step 1: How it works

Picture of How it works
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


 

Step 2: Parts List

  • 2 x servo's
  • 4 x lightdepending resistors (ldr)
  • 4 x resistors 10K
  • 1 x Arduino
  • 2 x potentiometers 10k (value doesn't matter)

Step 3: The set-up

Picture of The set-up
DSC01630.JPG
DSC01631.JPG
DSC01632.JPG
DSC01633.JPG
DSC01634.JPG
DSC01635.JPG
DSC01636.JPG
Just hot glue it together!!! 

Step 4: The circuitry

Picture of The circuitry
DSC01625.JPG
DSC01626.JPG
1-40 of 220Next »
Spellmal made it!4 months ago

Just finished up my take on this tracker. I used continuous rotation servos, so i had to modify the code a bit. Super fun project, thanks geo Bruce!

IMG_0525.JPG
AlberA Spellmal3 months ago

Hi could you send me the schematic for the build and the codes... because i think im going to go with the continuous rotation servos too.... ty

Spellmal AlberA3 months ago

My wiring and build was pretty much the same as GeoBruces, except for an LCD I added.

For your individual motors, the servohstop and servovstop values might need adjusting. If it doesnt work as is, try setting both of these values to 90 and go from there.

#include <LiquidCrystal.h> //include LCD Library

#include <Servo.h> // include Servo library

LiquidCrystal lcd (2, 3, 4, 5, 6, 7); //

Servo horizontal;

int servohStop = 95;

int servohLeft = 105; //move horizontal

int servohRight = 85;

Servo vertical; // vertical servo

int servovStop = 95;

int servovUp = 105 ;

int servovDown =87;// move vertical servo

// LDR pin connections

// name = analogpin;

int ldrLeftTop = 1; //LDR top left

int ldrRightTop = 0; //LDR top right

int ldrLeftBottom = 2; //LDR down left

int ldrRightBottom = 3; //ldr down right

int dtime = 25; //delay time in milliseconds

int tolerance = 100; //difference tolerance between ldr readings

int count = 0; //millis(); //start millisecond count

void setup()

{

lcd.begin(16, 2); //begin 16x2 LCD

Serial.begin(9600);

// servo connections

// name.attach(pin);

horizontal.attach(9);

vertical.attach(10);

}

void loop()

{

//int count = millis(); //start millisecond count

int leftTop = analogRead(ldrLeftTop); // top left

int rightTop = analogRead(ldrRightTop); // top right

int leftBottom = analogRead(ldrLeftBottom); // down left

int rightBottom = analogRead(ldrRightBottom); // down right

//print resistance values to serial monitor for debugging

Serial.println(leftTop );

Serial.println(rightTop );

Serial.println(leftBottom );

Serial.println(rightBottom );

Serial.println();

count++;

int avt = (leftTop + rightTop) / 2; // average value top

int avd = (leftBottom + rightBottom) / 2; // average value down

int avl = (leftTop + leftBottom) / 2; // average value left

int avr = (rightTop + rightBottom) / 2; // average value right

int avgTot = (rightTop+rightBottom+leftTop+leftBottom) / 4;

int dvert = avt - avd; // check the diffirence of up and down

int dhoriz = avl - avr;// check the diffirence og left and right

if (count%10 == 1) //mod the millis count so the lcd screen updates every 10 millis

{

lcd.clear(); //clear the screen and position cursor at top left

lcd.print("dvert: "); //difference in vertical resistances read from the LDRs

lcd.print(dvert);

lcd.setCursor(0,1); //set lcd cursor to bottom left

lcd.print("dhoriz: "); //difference in horizontal resistance read from the LDRs

lcd.print(dhoriz);

}

if (-1*tolerance > dvert || dvert > tolerance) // check if the difference is in the tolerance else change vertical angle

{

if (avt > avd) //if average resistance on top is greater than on bottom

{

vertical.write(servovUp);

}

else //avg resistance on bottom is greater than on top

{

vertical.write(servovDown);

}

}

else if (-1*tolerance < dvert || dvert < tolerance) //if difference is smaller than tolerance, stop vertical servo

{

vertical.write(servovStop);

}

if (-1*tolerance > dhoriz || dhoriz > tolerance) // check if the difference is in the tolerance else change horizontal angle

{

if (avl > avr)

{

horizontal.write(servohLeft);

}

else

{

horizontal.write(servohRight);

}

}

else if (-1*tolerance < dhoriz || dhoriz < tolerance) //if difference in horizontal

{

horizontal.write(servohStop);

}

delay(dtime);

}

WiringDiagramUPDATED_bb.jpg

can i know what is the function of the LCD?and can i get the full image of your model solat tracker?

I followed your schematic and used your code but I can't get info to display on LCD.. lcd back light lights up and white squares are there when I turn potentiometer... do the 4 resistors have to be a certain ohm to work correctly...
this is all I get :-(
temp_1521861806.jpgtemp_-2061293483.jpg
AlberA Spellmal3 months ago

Thank you for the answers... so i wounder if your servos are modifyed to make a full spinn... if i do that to my servos would the code you sent me work?

Hi could you send me the schematic for the build and the codes... because i think im going to go with the continuous rotation servos toceers

AlberA Spellmal3 months ago

Hi could you send me the schematic for the build and the codes... because i think im going to go with the continuous rotation servos too.... ty

Hello is there any chance you could send me the schematic for the build and the codes... because i think im going to go with the continuous rotation servos too.... thank you

sali58 AlberA2 months ago

hi can you please send me same stuff (he schematic for the build and the codes for display ..)to build a solar tracker

Thank you

TomDunlap1 year ago
Just finished it and got it debugged. Really cool. Now I'm going to try to use it to build a Solar Forge and or a Solar Sand Sinter 3D Printer. Should be a snap. ;-)
geo bruce (author)  TomDunlap1 year ago
cool! :p
can you show us some video's or pictures?

thnx

*videos *thanks

Another development, I used a Makerbot Replicator to print a replacement for the foam core sensor holder. Here is the Sketchup pic of it. The two pieces glue together. The center top hole is for a fifth sensor to shut the system down if clouds block the sun so it doesn't try to point at the brightest cloud.
Pyramid 3.png
geo bruce (author)  TomDunlap1 year ago
nice upload your design to http://www.thingiverse.com/
geo bruce (author)  TomDunlap1 year ago
thnx!!
Sure, here is the link to the YouTube clip I made: http://youtu.be/6GTVWdeKvzY
geo bruce (author)  TomDunlap1 year ago
Nice!!!

It's cool to see your instructable finished by someone else :D
it means i've helped someone ^^ or someone liked my project! :D
It's really helpful to get me started toward my other goals.
Next I want to modify the code to operate some 12V drill motors with a MotorShield or the like if I can find one that will handle the 3-4A current.
wic16 hours ago

Any idea how to use the same stuff on larger motor (to hold up home antena)?

Other thing is... how to do it so it will not wrap the cables around. Would be nice if it would go bac 'after the tracks' to the start after whole day round .

EVANNOH3 days ago

I'm using 60 degree's motor instead of 90 degree's motor what you used in. so how to change the coding?

Help needed

My tracker is not working.

ldr's always giving a value of 1023 as i checked through serial monitor

and the pot is giving 256 and 52 as the values always.

What should i do.

i have done everything as mentioned in ur circuit diagram but it is still and not responding to any light.

rroji16 days ago
I have done all the process as mentioned above but the head is not tracking the path of light.
Need help
lad_deep made it!14 days ago

just i finished...its work very accurate...love it..tanks

20150406_172517.jpg20150406_172523.jpg20150406_172849.jpg20150408_150307.jpg20150408_150314.jpg20150408_150327.jpg
torrio14 days ago

Hello friend, is just what I was looking for.

you can send me the code and circuit please my email is tonygt@outlook.com

MarceloS31 month ago

Just finished my solar tracker. Thanks geo bruce for your share ,it helped me a lot in my school project, blecaute of your help i could get 19. Thanks very much. In my project i needed to change some things blecause in the place where i was is very Lightning and i adjust the program to the "arm " escape from the shadow thank very much one more time!!!

hey can u please help me in this project ..i have done everything but still it rotates anywer even if no torch light is directed on it

nshaikh23 days ago
Hey! Please help me...I followed all of your instructions but my ldr is not tracking sun..it is juz rotating in any direction ..please reply soon
Irfan-9328 days ago

Hi there. This guide have been really useful for my project. But I have several questions that I hope you can answer about this project. How did you power the servos?? using your arduino uno usually wouldn't be enough right?

i want to know what kind of project to i have to create to paste the code can you help me

swordsatu1 month ago

what type arduino will used to make arduino solar tracker??

DPont swordsatu1 month ago

Uno. Thanks for the reply.

Did you have any problems with the LDRs giving differnt resistance values for the same amount of light? And if so how did you correct for it
iko.lola1 month ago

Very nice :)
Is the value of resistors that you used is necessarily be 10kohms ?
Thanks

DPont1 month ago

Hello GeoBruce:

First time Arduino user and it's been 29 years since I've breadboarded!!! I got this error message. Any help is appreciated.

avrdude: stk500_getsync(): not in sync: resp=0x00

DavidW271 month ago

A lovely little project to get our S.T.E.M. club thinking - well done.

Huuunksam1 month ago

you are freakin' awesome

JoshuaZimmerman made it!1 month ago

This is my solution. Even added on a little volt meter. I removed the potentiometers and just set the sensitivity via the software. I used a sensor shield in order to remove a bunch of power wires for the servos. I used two terminal blocks to wire everything up, making it non soldering. I'll eventually make up an Arduino shield and a sensor PCB with ribbon cable, which will make the entire thing just plug together.

glamshots10.jpgglamshots09.jpgglamshots08.jpgglamshots04.jpgglamshots06.jpg
1-40 of 220Next »