This is a Solar Tracker. A full size, cloud connected, smartphone accessible Solar Tracker built mainly from 2x4s and plywood, employing wooden peg gears, recycled curtain poles, nuts, bolts and threaded rod. The solar tracker uses a home built electronic controller incorporating WiFi, stepper motor drives, accelerometer and magnetometer. The tracker was designed to drive a full size 90W panel in azimuth and elevation. The gears driving the tracker are wooden peg gears commonly used in the 16th century. The gears were designed using modern 3D CAD (Solidworks). Connecting the wooden peg gears to the cloud just seemed like the right thing to do. This is not a waterproof design – you will need to consider modifications to waterproof your derivative design.

The project includes mechanical mechanisms, web application, free/green solar energy, firmware, basic electronics, a microcontroller, accelerometer/ magnetometer, the Internet of Things, WiFi, 3D Modeling, CNC machining, re-use and basic woodworking. The Internet Of Things was enabled by the innovative Electric Imp - http://www.electricimp.com

The need for solar tracking is well documented in the available internet literature and scientific journals so there is no need for me to repeat it here. There are many arguments for and against, but efficiency gains of up to 30% versus static installation make solar tracking attractive. You just need to make sure that your motive power needs are much less than the potential efficiency gain. The additional cost of a tracking solution is added to the overall cost of a solar system which increases the time to a positive ROI. But tracking does not need to be expensive – at least not for the home hobbyist with a small number of solar panels. The tracking accuracy requirements are not that high either. Using a micro-controller to control the tracking made it easy to control the tracking power losses by having the system operate in a low power mode for as long as possible, with only an occasional high power spurt to turn the motors a small amount. There are other ways to do solar tracking (optical sensors connected to simple circuits for example - "light followers"), but microcontrollers create opportunities for feature creep and you will learned a whole lot too. And learning is key.

Here's a short video to show the completed project in action:

Let's get started shall we?

Step 1: Overview

The major system components identified in the block diagram:

  • 90 Watt solar Panel
  • Two axis motion platform constructed from 2x4’s complete with wooden peg gears and re-used curtain rod/pole.
  • Custom electronics – Electric Imp connected to stepper drivers, IO Expander and 6 Axis MEMS accelerometer/magnetometer
  • Rechargeable battery – retired unit from my motorcycle as it is no longer capable of turning the engine over.
  • Solar Charge Controller – cheap unit from ebay to make sure the battery doesn’t overcharge.
  • Smartphone or web browser – monitoring status and remote control. This is a non-essential part of the system done purely for a learning experience to see what it takes to connect a phone to a remote device. (gotta remember to hide the URL so that I don’t have too many people trying to control the panel!)

The tracker circuit includes a tilt compensated compass - the math was coded from an application note. The chip has 3 axis magnetic output and 3 axis accelerometer output. The magnetic output tells the system the azimuth angle and the accelerometer tells the system the the inclination with respect to gravity. The GPS location is hardcoded in the firmware (future will have this set by smartphone via the web). The firmware determines, based on the time of day and geographic co-ordinates, what the sun angle is with a Sun Angle algorithm ported to the Electric Imp Squirrel language from C++ (discussed in later steps). Firmware drives the azimuth and elevation motors to the Sun Angles based on feedback from the mag/accel.

This whole thing could be done a lot more simply, but I was intrigued by the Internet Of Things made possible by the Electric Imp. Rather than just reading web articles to get at best a superficial understanding, I found a way to try out the technology with an overkill solution to a common problem. Most solutions on the market today are "light followers". They control motors in response to the intensity of light to maximize incident sunlight on the panel. These work well, are low cost and are really all you need. But if you go that route, you will miss a learning opportunity on the electronics/firmware/web/IoT development side of things. This is some of what you'll learn::

1. ASP.NET programming model for web based applications. This is the server side code that the smartphone connects to, to see the status of the system, or to drive inputs to the controller for manual control of azimuth and elevation for debugging purposes.

2. AJAX which allows a web page to update without server page reload. Allows a web page to dynamically query server data directly and update the regions of the page without page reload. This is how the monitoring data is updated.

3. SQL Server work on the back end. The data from the Electric Imp is logged in a SQL Server database.

4. JQUERY Mobile - great open source library that simplifies working with the Web page Document Object Model. Just scratching the surface of it for this application but it has taken the web by storm. It is a great way to develop Smartphone HTML5 "apps".

5. HTML5 capabilities and the relation to potential hardware independent phone apps. Bumped into a number of apps that will take the Web app and turn it into a traditional phone store application. Some are free until you reach 10000 downloads... yeah right!

6. The Internet Of Things model and what companies like Electric Imp and COSM are doing to make this a reality even for low budget hackers like me.

7. Appreciation of cloud based services and the power of having services provided by the cloud. The electric imp is fully cloud based.... your firmware lives in the cloud and is downloaded when your device connects to the internet.

8. Algorithms for tilt compensating a compass. Ultimately I implemented an app note but it required a fair amount of research.

9. Algorithms for sun angle prediction. Ported an Open Source implementation to the Electric Imp. Had no idea that sun angle prediction was such a complex problem. I don't fully understand the algorithm but tip my hat to anyone who does! IJW!

There is plenty more to learn with this project but I had to cap the list somewhere!

I think the easiest way to tackle the documentation is to walk you through the building of the tracking base, then the electronics/firmware and finally the web app. The electronics and motion platform are independent components of the system. The tracker electronic module was designed to be a reusable component. The tracker base was designed to demonstrate peg gears and levers in another shameless attempt at stimulating my kids’ minds with engineering.

will you please contact me about fabricating a variation on this excellent design/build. Richard 480-862-9040
<p>The network has been (represented by) the &quot;cloud&quot; as in your drawing for the last three decades at least. So why &quot;internet cloud&quot;? Would that be a public cloud, as in a public network? My point is, internet and cloud are the same thing, just networks.</p>
<p>Point taken!</p>
<p>Wow. This is great!</p><p>We are trying to do something similar, but just with one-axis tracking since it's for a solar hot water heater. Here's our link to our Appropedia site...</p><p><a href="http://www.appropedia.org/Parabolic_Solar_Hot_Water_Heater" rel="nofollow">http://www.appropedia.org/Parabolic_Solar_Hot_Wate...</a></p><p>As you can see, we've stopped using the LED tracker in favor of some programming and a Raspberry Pi A, but since i'm not a coder, even though the code is Open Source from Jay Dosher, i'm having to step through his code in order to update it to Python 3.x and it's a bear - lol. i'm on step 250 or so and have some 250 more lines to go. Then we have to connect it to a IMU which will give us the orientation of the collector.</p><p> My question would be: Do you think any of the code you're using would be simpler to use? He's got his code connected to the Pysolar code which calculates the Sun position.</p><p> Again, congrats on such a beautiful project. Hope the kids stay interested in engineering! i had one of our grandchildren who is 5 - almost 6 - help solder some wires to connect the one-wire temperature sensor and connect it to the web...</p><p><a href="https://thingspeak.com/channels/72565" rel="nofollow">https://thingspeak.com/channels/72565</a></p><p> The other question is: i don't think we are using a stepper motor. Can a regular D.C. motor be used with these designs or are we going to have to find a stepper? The one we are presently using is 12V 1.2Amp which will turn up to 5 collectors.</p><p> Have a great morning! :)</p>
<p>Hi, I took a brief scan through your Wiki on the parabolic heater - looks great!</p><p>As far as code goes, the best solution for small projects is always to go with what you are more comfortable with. Since you are already halfway through the Python port and the solar positioning library is in Python, this appears to me to be the best way forward for you.</p><p>You can use a DC motor for this but the problem comes with mechanically holding position. Once you have positioned the collector to the correct angle, you want to remove power from the motor. If there is not enough gearage in the positioning system, any wind loading will cause the system to backdrive through the motor upsetting your position. This will cause your positioning algorithm to power the motor to return to position. This will waste a lot of power. Using a stepper motor you can lock the motor by shorting the coils which provides high resistance to unintentional movement from wind.</p><p>With a DC motor, you will be designing a feedback loop with the IMU as the sensing element. It will take some time to get this stable and power efficient. You will need to be able to control motor speed through PWM to avoid overshooting and hunting for position. This is all possible and will work nicely when tuned correctly. You can also set a error band within which no movement occurs to reduce the power waste through the motor. It is not necessary to track every minor change in sun position. You can, for example, set a simple timer and check position every 15-30 minutes, adjust angle and turn the motor off.</p><p>Good luck and thanks for the kind words!</p>
<p>Very nice. I am not a fan of the imps myself and this would need some weather proofing but it is very inspiring none the less.</p>
<p>My goodness... this blows my mind. Very well done and documented. Been working on a very similar project... but looking at this leaves me speechless. Good on you!</p>
<p>How did you connect the threaded nut for the vertical motion?</p>
<p>The idea of using an accelerometer plus a compass to sense the actual attitude of the panels seems interesting, is this idea of yours?, I'd like to know more about it. Have you formally published some work related with this idea?, do you have some reference to someone else who has worked with it?</p>
<p>The only published data is this instructable. I have not seen another example of compass-inclinometer tracking but that doesn't mean that it's not out there somewhere. This is an original implementation as far as I know. The algorithm for determining the sun's attitude based on geographic location and time of day is open source. </p>
<p>2 x Nema23 just to follow the sun? Any &quot;tweaked&quot; 360&ordm; high-torque servo would do! You're going to use more power than what you will generate, that's not very green -- but you're not green anyway if you're using solar panels :-D</p><p>Besides the feat of mixing old technologies and newer ones, what applications can you foresee for this toy?</p>
<p>But what do you expect me to do with the box full of nema 23 stepper motors I got for free! :)</p><p> You seem to be confusing what I do for fun with professional product development. No-one would take the time to make wooden gears for a real world product.... but it was a lot of fun making them work! Projects are simply a way to keep my hands busy, my mind active and an opportunity to do what I want, when I want and how I want.... which is actually a rare experience in today's culture. Thanks for reading and taking the time to comment</p>
You got the Nema23 for free? I'd love to have that kind of gifts :-D<br>I just said they're overkill if you have to pay for them when the Chinese servos (way smaller) or step motors (and linear gears, you should find that fun to design if you like to keep your mind busy).<br>I like the idea of the wooden gears, it's a change to all these 3D printed things, I just think an all-wood gimbal and a wooden gear but with smaller (and cheaper!) motors would make it reasonable to make for other makers to build it.
<p>Good day!<br>Sir, do you think this servo would do of this project? Here's the link of the servo<br> <a href="http://www.circuit-help.com.ph/product/df15rsmg-360-degree-motor-20kg/" rel="nofollow">http://www.circuit-help.com.ph/product/df15rsmg-36...</a></p>
Yeah, that's exactly what I meant, this is a 360&ordm; servo with 19kg.cm torque, more than enough for the base (it's rotation only, not lift), and it is enough for the tilt if your panel is properly balanced and sheltered from the wind (beware the sail effect, but that's valid for a Nema23 too...). But isn't 1000PHP (~17&euro;) a bit dear compared to China prices?
<p>Yeah I think it is imported from china and sold it here in Philippines with fair price. Thank you for the reply sir. :)</p>
<p>hi!.. after i downloaded your attached WebFiles.pdf, im wondering why i can't open it. here is the screen shot of the problem ... im hoping for your fast responce :)</p>
<p>Hi, the file is actually a zip file. Rename the file extension from .pdf to .zip and unzip it.</p><p>In the past, instructables didn't allow the uploading of zip files. They do now, so I guess I should go and fix all the old uploads :) </p>
<p>Thanks i opened it :) ... I have another question, it is possible to use an arduino uno or mega with ethernet shield instead of electric imp in this project? Because electric imp is not available in our country and if i will order it from the other country its shipment is very expensive. I am hoping for your responce :)</p>
<p>It's possibly much easier to redesign the whole thing with a Raspberry Pi / Galileo / Boogie Board (for the network and control part, install a webserver on the Raspberry Pi and connect directly to your home webserver with your phone) and an ATMega8/16 (or a home-made ATMega 328P/20 board) to control the servos. For the communication, you may prefer Serial (pin 2/3 of the ATMega, don't forget the Zener to protect the RPi!), I prefer I2C (don't forget the Zener either...) so I can add a lot of toys on the line (e.g. screen, joystick for manual override, etc.)</p>
hi,can you please give a link of stepmotor ,there are so many of it ,i afraid of geting a wrong one,thank you.
I used a Nema 23 Frame size bipolar stepper motor that has 256 oz.in of torque and 200 steps/revolution. Here are some links to motors that will work for this. THe exact motor was Vexta PK268-02A <br> <br>http://www.ebay.com/itm/VEXTA-PK268-02A-Stepper-Motor-2-Total-/271251265793?pt=LH_DefaultDomain_0&amp;hash=item3f27d5d901 <br> <br>http://www.ebay.com/itm/1-PC-NEMA-23-CNC-Step-Stepping-Stepper-Motor-76mm-3-0A-255oz-in-Bipolar-/121051254845 <br> <br>http://www.automationdirect.com/adc/Shopping/Catalog/Motion_Control/Stepper_Systems/Stepper_Motors_-z-_Cables/STP-MTR-23079 <br>
<p>i really like you project,it is so cool, and i tried to make one by myself,but i just lack tools and there are some problems i can not solve, so i want to ask is that possible to buy this from you,because i remember you said you might make a new one.</p>
<p>Hi siqinie, shipping something like this is very difficult, and expensive. You can PM me directly if you want to discuss this further</p>
thank you for your valuable advise,i am a chinese studying in manila,if in the future i can help ,maybe you can opt to contact me.
Where is the best source to reach you?
<p>Hi, I sent you my email address. Check your PM inbox under your instructables profile.</p>
How can I reach you?
Yeah your right. Electric imp looks smaller. I think I'll opt for the electric imp. I am currently for a circuit designer. Are you available to help or if you could please direct me to someone who can. <br><br>I am interested in making a smart device for home automation.
Sure, I can help. Send me a PM with what you have in mind.
I have found this device hopefully it is something to take into consideration. Let me know what you think. <br><br>https://www.kickstarter.com/projects/1085386850/my-n3rd-connect-and-control-anything-from-anywhere/description
<p>It looks like a good device. But, it is larger than the Electric Imp, and I thought you were looking for something smaller. </p>
Is there one that is a bit more compact. I notice that a lot of these small smart appliances are using something that is much smaller. Any suggestions?
<p>None that I know of. The two main competing products in this space are the Spark Core and the Electric Imp. They are similar in size. There is rumor that electric imp is working on a device that is 10% of the current size but the release timelines are not public as far as I can see. There are a lot of companies that make WiFi modules, but none of them provide a complete platform the way that Spark and Electric Imp are providing. The benefit you get is that you can run your code directly on the module - you don't need an additional microcontroller for most things. There are tiny USB WiFi modules available, but these will require drivers and an external microcontroller (raspberry pi) for example to be useful. If size is a gating factor for your solution, you are going to have difficulty finding something - let me know if you do as it will help me as well.</p>
Which component do you use to connect and let you control via app?
It's an electric imp. <br>www.electricimp.com<br>
I am sorry... but... Why internet? Only 4-photoresistors + cross-separator + AVR-controller :)
Solar tracker..ummm.. interesting stuff indeed. Being into a small sized organization, I had always had good guts for <a href="http://www.replicon.com/" rel="nofollow">time management software</a> and therefore had been using the one offered by Replicon Inc.Never had an idea about this stuff...really nice write up! Thanks.
Nice project, but does it need to be this complex? couldn't you just use one of the simple BEAM light-seeking head circuits, and get the same effect?
Thanks for your comment. I did mention this in step 2. <br>
You could have also placed it on an axis that points to the north star and then have a manual tilt adjustment off that axis that you change once every 2 or 3 weeks as the season changes. Then you rotate it with just one motor based simply on time, 15 degrees per hour. Or use a simple sun light tracker with 8 parts: 2 sets of 3 wide-angle LED's in series as a miniature &quot;solar cell&quot; (LEDs can generate electricity from light) and use the difference in voltage to turn on 1 of 2 mosfet transistors to turn a DC motor forwards or backwards. Or if you want 2 axis based on sun position, the math is a LOT simpler if you start with a polar axis. Just use the simple Wikipedia Sun declination equation for the tilt off the polar axis and 15 degrees per hour for the other axis. Eventually I'll do one of these instructables to show how I used $20 of aluminized mylar covering four $12 4x8 insulation boards to reflect sunlight into 2 north-side bay windows to heat 3,000 sq feet from 9 am until 9 pm (heat retention in the house, dropping from 77 F to 70 F by 9 pm). 10 kW of sun energy (20% loss from double pane windows) for about $200 total, 50 to 100 times cheaper than solar cells. Saved $500 last year with an oak tree blocking half the light. My support structure and axii were 4 door hinges on 2x4s. The LED's powering the mosfets are placed on the edges of the window. Reflecting sunlight into a window (&quot;heliostat&quot;) has math that is a lot more complicated than sun tracking because you track half way between the target window and the sun.
Thanks for your input. I look forward to instructable. I really wanted to see what it would take mash centuries old gear tech with modern iPhone control and monitoring, and achieve a practical result. Someone has suggested that I remove the steppers in favor of water wheels to turn the gears. Gen 2!!!!
I did an instructable on my heliostat ideas and I'm thinking about using your method of gearing. See my user page, or rather&nbsp; <a href="http://www.instructables.com/id/Heliostat-for-heating/" rel="nofollow">http://www.instructables.com/id/Heliostat-for-heating/</a>
Nice project zawy and a real cost benefit. Thanks for sharing
that would be really lovely +_+
Ah. Sorry. I missed that. Sometimes Overkill is good for a laugh.
And I learned plenty!
Ah. Sorry. I missed that. Sometimes Overkill is good for a laugh.
hi,i admire you project very much,and want to have one of my own. the problem is i lack of equipment to make the wooden part, can you sent me the whole wooden parts, i will pay you twice the price plus the shipment fee. thank you,i am looking forward to see you reply!by the way if in the future you want to visit asia ,maybe i can be your guide!hehe!
Thanks for the offer to be my tour guide! <br>Unfortunately I do not have the time to make the parts for you. It is very labor intensive!

About This Instructable


1,254 favorites


More by MidnightMaker: Cafe Racer Gas Tank Bluetooth Thermometer CNC Padded Jewelry Boxes
Add instructable to: