The Just-For-Fun Sun-tracker

             using the Arduino and two servos.

        This device, along the lines of the most useless toy, is not so much for function as it is for fun. But as with many things, you can't spell function without fun! This could easily be modified to rotate solar panels into the right position for the best solar power absorption.


  • An Imperial short ton of cardboard!
  • Arduino
    • I used the awesome Freeduino (ATmega 328)
  • A breadboard
  • 2 Servos - The kind/company doesn't matter terribly, you’ll just have to change the code a little if it’s too different
  • A lot of wire, almost as much as the cardboard
  • Some sheets of paper, any kind will do 
  • A knife, preferably a box-cutter - you’ll be cutting a lot of cardboard!
    • I used: This One
    • Also, be careful! Don't cut yourself as I have done
  • Circular drawing tool – Either a compass, Tupperware, or a ball and cup
  • Hot glue gun – Though you can use nuts/bolts, glue is much easier
  • Silly putty, presstick, or sticky tack 
  • Some nuts, bolts and washers. Depending on how much glue you want to use.

Step 1: The Sensor Array

For this part you will need:
  • 5 Sheets of paper
  • 5 Photo-Resisitors
  • 5 Pieces of putty / presstick / sticky tack
  • Compass / Protractor
  • Scissors / Knife
  • Wire / Strippers / Cutters

   - The sensors are positioned to form a cross to allow sensing in the x and y axis. It is possible to do this with as few as 3, but photoristors are so cheap that an extra 2 won't bust the bank. These sensors will sit inside cones to reduce the light that isn't shining directly at the resistors, thus making the sensing a lot more accurate.

   - To make a cone, you must take your trusty compass or any other circle transfer tool and make a perfect circle on one of the sheets of paper. The size of the circle will adjust the accuracy and contrast of the photo-resistors; bigger circles will result in bigger cones, stopping indirect light more.
   - Next, take your scissors/knife and cut out the circle you drew. Once you have the circle cut out, cut a line straight from the outside edge of the circle to its exact centre.

   - At this point you may either opt to cut a small circle out of the middle (to leave a hole at the bottom of the cone) or you can leave it uncut, in which case you will be poking holes in the paper for the leads of the photoristors. (as i have done)
   - Now you need to take the circles and turn them into cones!  All you do is take the ends of the circle (where you cut the straight line) and move them into each other. Rotate further to tighten the cone, I find a 30 degree opening to be best.

   - After you have your cones. Take some of the putty/sticky tack and roll it into a tiny cone shapes, this will sit at the bottom of your cones and hold your photorestors in place and they should be smaller than the length of the leads on the photorestors. Once you have all your sticky tack cones, take your photorestors and get the leads through the putty/sticky tack. The leads should poke out of the bottom about half a finger's width or more.

   - All that's left is to get your putty & resistor combo into your cone. Poke holes for the leads if you need to; though they tend to be soft, so use a sharp tool, like the one end of your compass.
   - You can now opt to stick the cones together like I have, or simply leave them loose if you plan on cutting individual mounting holes for the cones.

   - All that need to be done now is to wire the suckers. Remember to use long enough wires for this part, you can always cut them shorter, but you can never grow them back!
   - Take one lead from each of the pins and either solder them straight to wires, in which case you will have to remove them from the cones or risk losing an eyebrow, or do what I did, and solder wires to some female to male pins and then you can just plug the leads into them!
   - It helps at this point to think about where the other wires will be going on the breadboard. They need to be lined up on the breadboard from left to right C.R.L.U.D. (Centre Right Left Up Down). As with the other leads, solder them directly on to the wire or make the plugs.
<p>Is there a way to do this with three cones instead of five such that the &quot;center&quot; cone stays fixed on the light source?</p>
This is a great instructable.
<p>What a delightful Instructable - I wonder, would I need to change the code if I paint the cardboard boxes? If so, does colour matter?</p>
<p>hi, can i use arduino uno?</p>
can yo send me the .txt file whit the code please?
the code is available on the last step
all right, I can make the program run on my arduino uno, but when I switch the board to ATtiny13V, that's when the code stops there.
thanks again but I just cant get it to work lol .
cool thanks, but im a noob to all this stuff lol. so I don't have a clue as to where I would add those codes.
setting your DDR# register is exactly what pinMode does. <br>Setting your PORT# register is the same as assigning a value. So all you need to do is figure out what pin on which port &quot;10&quot; hooks up to and you're golden
for some reason when I run your code on arduino it says that the output was not declared.
doing it bit by bit<br>DDRD = B11111110; // sets Arduino pins 1 to 7 as outputs, pin 0 as input
Your Arduino version may have changed the way inputs and outputs are handled. <br>You may want to look at an example program of the version you are in, or go straight to the direction registers and set them (1: Output, 0: Input) <br> <br>eg. <br>DDRD |= 0x01 // This would set pin 0 of port D as an output <br>DDRB = 0x00 // This would set port B to all inputs <br>etc.
i got question here . why my circuit doesn't work ? what is my problem actually ? needs an urgent help hereeee !!!
I have a question. How do you power up this tracker?
I used the USB power from a computer, but you could easily just use a 9V battery or two 3V. You would just need to use a regulator to bring the voltage down to 5V <br> <br>You could also just get a 5V wallwart and power the arduino that way
Hey what's up!!! COOL PROJECT!!!!! I'm building a similar project with four photocells and different servo but can't get it to work. Maybe you can help me with the project since you clearly know what your doing =D thanks.
hmm, I can try, do you know roughly what is wrong?
Incred-a-cool! I want to see if I can torture a house plant with this idea! I picture a more ugly 'flower' for my sensors and something franken-steam-stein-punk skeletal structure swinging around in the window... <br> <br>Nice foundation for lots of exploration, great instructable, man.
thanks! I had a lot of fun making it. Hopefully I'll start seeing some cool ideas popping up using my design :)
Just 1 question. Why do you buy the freeduino or other arduino clones for like 2 dollars less. If it is much cheaper where did you get yours?
I'm busy attending an electronics engineering course, it was cheaper because it was bought in bulk (i guess)
Adds to the ghettoness ;)
I've sometimes wondered if you could combine the angle-sensing control circuitry of a servo motor with the mechanics of <a href="http://www.google.com/images?q=usb+missile+launcher">one of those USB missile launchers</a> to make a two-axis tracker with a bit more power.. solar trackers are cool but they are at their best when bearing a slightly heavier load than a cardboard box.<br> <br> Still, it's a nice learning/experimenting build.<br>
The card board is Surprisingly strong, it can easily hold two small solar panels (about a forearm's length) and function properly... even better in some cases<br><br>The usb rocket launcher gives me a cool idea... whenever a shadow passes by, it can track it and then fire once it has a steady motion for that shadow in memory (and then can theoretically fire in front of the moving shadow) :p
Lol Digikey brand solar tracker.<br><br>Well use what you got.
Cool! I see lots of applications. Still need to learn the Arduino stuff first though...!!

About This Instructable




More by veedo:Arduino Seismic Activity Monitor - Ethernet Shield Fun Sun-tracking Arduino 
Add instructable to: