Instructables

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 4: The circuitry

Picture of The circuitry
1-40 of 126Next »
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
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.
Hassanul_15 days ago

Are those continuous or 180 degree servos?

mahsgoob20 days ago
I want thank you for this project its very nice and i did one and its working proparly
juanjomf3 months ago

You can give me the code to do only with 2 LDR, which is what brought my arduino kit?

in my city and I find ldr. It should work similarly with 2 right?

You can spend as would be the code?

amatj4 months ago

Nice and useful project, thanks for share.

I've make the tracker but it doesn't works fine, may be you could help me. When I connect it, the horizontal servo starts to go from one side to another and the vertical servo doesn't work. I try to atract de tracker with a flashlight, but it don't react to light.

I just copied the code, but I don't know if it needs some adaptation.

Any help would be usefull... any idea.

Thanks in advance

gle keur10 months ago
hi geo

i just want some insight if i were to remove the potentiometer can you hard code a tolerance?
geo bruce (author)  gle keur5 months ago

sure you can!

owi026 months ago

wooow !! this is amazing ... i have just made solar tracker.. i was trying to program it ... it works fine ... but sometimes it moves randomly.. probably because of the tolerance....what tolerance did you used for this ?

thx! was really helpful!

danielebosco7 months ago
Hi Bruce, I am trying to have your project working, I am new whit this, I am using an ARDUINO atmega328 I connect al the components and load the code but I figured out that I bought a different motors stepper 360g and I believe need to change some value on code motors are https://www.sparkfun.com/products/9347, tks for help
as958 months ago
could you please tell what is the material used in the white sheet and what are its dimensions ,ill be grateful if you could do that
as958 months ago
could you please tell what exactly is the material used in the white sheet? and also what are the dimensions.. ill be really grateful if you could help
luksusowa8 months ago
This is a great script and is really helping with my project. I have a similar thing, except a drum (with a face) rotates to the brightest of three LDR/Sensors. I can’t seem to get the servo to respond to the LDRs though can anyone help – I’m pretty new at this:

if (ldrOneVal > ldrTwoVal)
{
servoR = ++servoR;
if (servoR > 180)
{
servoR = 149 + ldrOneLoc; }
}
else if (ldrOneVal < ldrTwoVal)
{
servoR= --servoR;
if (servoR < 0)
{
servoR = 149 + ldrTwoLoc; }
} myservo.write(servoR);
}

Can I just copy this three times and change the vars? Or do I have to do something else? Can anyone help?
Pute79528 months ago
lightdepending resistors valor?
aleza848 months ago
Are the sheets in between each ldr necesary? I was planning to attach plain one into each corner of a solar pannel.

Thanks
vilacikovski8 months ago
hi bruce. firstly, thank you for your design, it is really very useful to me. but im having some trouble. though my robot moves top or bottom successfully, when it comes to left or right movement, it cannot move without going top or bottom. im using sg90 servo, and arduino mega2560. Can you please help me ?
kasiya8 months ago
Is this board is ATMEGA 328 ??? or can we use any board
Pute79528 months ago
sketch arduino pleaseeeee
itnas198 months ago
Thank you very much, Bruce from Madrid. I've made a model with your information and it works!!
Congratulations for enjoy making these thing and share with us.
itnas19 itnas198 months ago
This is a vídeo about my tracker

 
geo bruce (author)  itnas198 months ago
haha nice!!! and the video has a special effect with that music
geo bruce (author)  itnas198 months ago
It's nice to hear you've used my instructable.
Could you please post a video and or pictures of your build?
thnx in advance!
djgriff000110 months ago
nicely done. I was just thinking about this the other day, and how to make it.
ems201410 months ago
Hi! I am interested in building this but I was wondering if you could give a slightly more specific parts list. I just don't know what type of Arduino, potentiometers, etc... to buy? Any help would be greatly appreciated!!!
pidot11 months ago
geo bruce..I confuse with the code at:
}
else if (avl == avr)
{
// nothing
}
horizontal.write(servoh);
}
delay(dtime);
} ...
why there is not have }else if (avt==avd){ at vertical???
pidot11 months ago
geo bruce...I have problem with my solar tracker...It's not effectively detect with light..I think its have some problem with the code??can u help me??This is the code:#include // include Servo library

Servo horizontal; // horizontal servo
int servoh = 90; // stand horizontal servo

Servo vertical; // vertical servo
int servov = 90; // stand vertical servo

// LDR pin connections
// name = analogpin;
int ldrlt = 0; //LDR top left
int ldrrt = 1; //LDR top rigt
int ldrld = 2; //LDR down left
int ldrrd = 3; //ldr down rigt

void setup()
{
Serial.begin(9600);
// servo connections
// name.attacht(pin);
horizontal.attach(9);
vertical.attach(10);
}

void loop()
{
int lt = analogRead(ldrlt); // top left
int rt = analogRead(ldrrt); // top right
int ld = analogRead(ldrld); // down left
int rd = analogRead(ldrrd); // down rigt

int dtime = analogRead(4)/20; // read potentiometers
int tol = analogRead(5)/4;

int avt = (lt + rt) / 2; // average value top
int avd = (ld + rd) / 2; // average value down
int avl = (lt + ld) / 2; // average value left
int avr = (rt + rd) / 2; // average value right

int dvert = avt - avd; // check the diffirence of up and down
int dhoriz = avl - avr;// check the diffirence og left and rigt

if (-1*tol > dvert || dvert > tol) // check if the diffirence is in the tolerance else change vertical angle
{
if (avt > avd)
{
servov = ++servov;
if (servov > 180)
{
servov = 180;
}
}
else if (avt < avd)
{
servov= --servov;
if (servov < 0)
{
servov = 0;
}
}
vertical.write(servov);
}

if (-1*tol > dhoriz || dhoriz > tol) // check if the diffirence is in the tolerance else change horizontal angle
{
if (avl > avr)
{
servoh = --servoh;
if (servoh < 0)
{
servoh = 0;
}
}
else if (avl < avr)
{
servoh = ++servoh;
if (servoh > 180)
{
servoh = 180;
}
}
else if (avl == avr)
{
// nothing
}
horizontal.write(servoh);
}
delay(dtime);
}
Thanks for the instructable. It was a fun build! My only problem was realizing that the pins for the eyes had to be adjusted because my servos were not in the same orientation. http://imgur.com/xfFc7O3
geo bruce (author)  dave spencer1 year ago
nice do you have a video of that?
Yasesu1 year ago
Could you add a parts list to the instructions?

Thanks
geo bruce (author)  Yasesu1 year ago
done ;)
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)  Yasesu1 year ago
if you want to go big you can better go for stepper motors
and change the code a little bit
1-40 of 126Next »