loading

Follow the sun with Arduino! In this tutorial, we'll be building an Arduino based Solar Tracking Turret. Most commonly, these are used in Photovoltaic systems to maximize the surface area of sun exposure on solar panels. This is an easy build, so let's get started!

Step 1: Project Parts List

You can use any variety of light sensor, potentiometer, or hobby servo, but for this guide, we recommend the following parts for ease of use.

Step 2: Assemble the Turret

Follow the Desktop RoboTurret Assembly Guide. Once your turret is built, there are many ways to build the top portion of the tracker. General advice for building the top portion: Attach your sensors to the top plates as close to center as possible. Shown in the first picture is the simplest way to get all of your sensors near center. Notice the wiring through the plate, kept loose so that there aren't any snags as the turret aims itself. The fins are 8 inches tall, which should be plenty to cast shadow on the sensors. I've used scrap cardboard for the fins, but you can use whatever material suits you best, so long as it is opaque and can throw a shadow. At the back of the turret base, there is plenty of room to mount your two potentiometers. one controls speed, the other controls the sensitivity threshold for the light sensors. Mounting them to the base allows you to fiddle with them to easily dial in your settings once you have it running.

Step 3: Wiring

Follow the Wiring Diagram carefully to hook up your electronics. Mind the position of your Light Sensors, as putting them in the wrong spot will cause strange behavior. Also mind that your jumper for the servo pins 9, 10, and 11 is set to VIN, so that your servos function properly. (note: a 6V power supply will work just fine, and is included in the RoboTurret Kit)

Device Sensor Shield Port
Top Left Light Sensor RobotGeek Light SensorAnalog 0
Top Right Light Sensor RobotGeek Light SensorAnalog 1
Bottom Left Light Sensor RobotGeek Light SensorAnalog 2
Bottom Right Light Sensor RobotGeek Light SensorAnalog 3
Turret Speed RobotGeek Rotation KnobAnalog 4
Light Sensor Sensitivity RobotGeek Rotation KnobAnalog 5
Pan RobotGeek 180 Degree ServoDigital 9
Tilt RobotGeek 180 Degree ServoDigital 10

Step 4: Programming

Download the desktopRoboTurretV3 sketches from Github if you haven't already, and extract it to your arduino folder. Open up:

File → Sketchbook → desktopRoboTurretV3 → roboTurret3_solarTracker

and upload it to your arduino.

Power up your turret, get a lamp ready, and start fiddling with the knobs! You'll notice as you adjust one of the knobs, the turret will turn faster or slower. As you adjust the other, the light sensitivity will rise and fall, giving you different behavior. Adjust these knobs until your turret tracks the light smoothly, and you're ready to get some sunburn!

Step 5: Let There Be Light!

You've made a robot that just can't help but stare directly at the sun! What will you do now? We'd suggest looking into making your own solar panel to throw on it so you can reclaim the energy lost by the servos and maybe charge a cell phone while you're at it? What would happen if you swapped out the Light Sensors for something like a Flame Sensor or UV Sensor? Let us know what you come up with, we'd love to see it!

<p>Is there a cheaper alternative to the Roboturret because I do not really want to spend 99 dollars?</p>
<p>If you already have an arduino, the RobotGeek Pan and Tilt is half the price with the same servos: <a href="https://www.robotgeek.com/robotgeek-pantilt.aspx">https://www.robotgeek.com/robotgeek-pantilt.aspx</a><br><br>If you don't care about the power of the servos, you could go with something more like the Mini Pan-Tilt Kit: <a href="https://www.adafruit.com/product/1967">https://www.adafruit.com/product/1967</a></p>
<p>Thank you very much. This is a great help.</p>
<p>Hi</p><p>Great</p><p>try <a href="https://baghli.blogspot.com/2016/07/position-du-soleil-et-salattime-pour.html" rel="nofollow">https://baghli.blogspot.com/2016/07/position-du-so...</a></p><p>you will get the exact sun position in fonction of your lat/long and time</p><p>you can add an RTC, check the next post on the blog</p><p>Best regards</p>
<p>Thank for all the ieda.</p>
<p>would be cool to mount a camera. For a time lasp.</p>
<p>That'd be neat, but I wonder if the sun would damage the camera's sensor. We'll look into it!</p>
<p>&gt; We'd suggest looking into <a href="https://www.instructables.com/id/Building-a-Solar-Panel-From-Cells/" rel="nofollow">making your own solar panel</a> to throw on it so you can reclaim the energy lost by the servos.</p><p>:D</p>
This is perfect for mounting on a movable base such as a vehicle. The suggested astronomical / mathematical positioning approach is fine for a known and fixed base but anything more interesting and it wouldn't know what to do or where to point.
<p>We hadn't thought of this, but that's an absolutely amazing idea! Maybe we'll throw this on one of our rovers and see how it turns out! :D</p>
<p>I would like to give you some food for thought, why do you need to &quot;track&quot; the sun with such a system?</p><p>The sun is at the same horizontal angle to any particular spot on the earth, every day of the year, at the same time, if you ignore summer and winter time.......That is say at midday (forgetting slight differences due to countrywide time), the sun will be at its highest, but at the same horizontal angle, each and every day!</p><p>The only difference is the height (elevation) of the sun, higher in summer and lower in winter generally, with slight differences for the equator.....</p><p>Converting a 24 hour clock time to an angle of 360&deg; , will always find the sun's direction, even when its thick cloud and even at night!!! (Think about it!) 12 midday, will usually be 180&deg; for those living in the northern or southern hemisphere, if 360&deg; is taken as being midnight!</p><p>Even adjusting the elevation about 4 times a year by hand, will still achieve a similar efficiency to a complicated sun tracker's elevation.......as it will still point at the sun, even with cloud!</p><p>Sun trackers often have problems when there is cloud, or an eclipse or even someone standing in the way!!!</p><p>I hope that I have explained it enough for you to understand fully, that tracking the sun is really a series of &quot;knowns&quot;......therefore &quot;K.I.S.S!</p><p>Sorry to be so boring...... :-) </p><p>You did a good job, but I feel too complicated! But do have a great day.</p><p>Best regards</p><p>Andy</p>
<p>Hey Andy! That is a wonderful suggestion. With a bit of maths and a few less sensors, the whole thing would run quite a bit more efficiently! We have all these robot parts laying around here that we're always itching to use, so it turns out we don't always land on the simplest solution to any given problem. Sure was fun though!</p>
I am glad that you took my suggestions on board in such a Friendly manner, many thanks.<br>You obviously understand my &quot;direction&quot; completely, well done!<br>The time you spent getting your version made and running, will stand you in good stead for some other project and I am sure, nothing will get wasted!!<br>I have been guilty of over thinking a fix myself from time to time.<br>Have a great day.<br><br>Andy
<p>This is a very brilliant application of exsisting technology! Many solar energy reclamation projects come to mind. Could you tell me roughly what the cost is for these parts?</p>
<p>Regarding the end of the video it seems to be lost when the sun moves too fast. How do you persuade the system to move from west-looking to east-looking each and every morning?</p>
<p>DrummerD23 has a more efficient solution to the problem than I was going to suggest! It wouldn't take much code to move this to a set position in low light. I was going to suggest adding an RTC so you could keep track of the time and reset the position at dawn.</p>
<p>Perhaps it can default to a few degrees above the eastern horizon if very very low light.</p>
<p>this can be done easily by simply adding in sunset/sunrise time checking. At worst, it can simply reset to east after midnight.</p>

About This Instructable

31,537views

398favorites

License:

Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
More by robotgeek_official:Voice Control Chip-E With Google Home Rock'em Sock'em Literal Robots 3D Printed Automatic Small Fish Feeder (Single Servo and Arduino) 
Add instructable to: