Solar Tracker in the Internet Cloud

This is a Solar Tracker. A full size, internet 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 internet 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 –

The project started with a need to automate the irrigation of our raised vegetable garden. The purpose of the vegetable garden is to reclaim some semblance of self reliance on the veggi front. Adding a solar panel allows the vegetable garden to water itself in a self-reliant way. Adding a rain barrel collection system as a water source ramps the self-reliance up further and is an environmentally sound thing to do. 90W is certainly way more power than we need, but I’m sure over time I will find more things to connect. The rain collection system is documented in another Instructable A future instructable will document the irrigation system as time permits.

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.

Solar Tracker in the Internet Cloud

Step 1: Overview

  • 90 Watt solar Panel
  • Two axis motion platform constructed from 2×4’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.


For more detail: Solar Tracker in the Internet Cloud

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top