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 – http://www.electricimp.com
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 http://www.instructables.com/id/Recycle-Pallet-Rain-Barrel-Stand/. 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.
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 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 was a major journey of “discovery” for
me.
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!
10. I2C hardware communication and associated peripherals – as long as I have been messing with electronics, never controlled an I2C peripheral before.
There is plenty more to learn with this project but I capped the list at 10!
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. A future weatherproof design using more 21st century motion mechanism is in the design phase and will be built over the course of the next year or so. I would like to offer that as complete package to interested consumers.
BTW – I have entered this Instructable into the Green Design Contest, Battery Powered Contest and Epilog Challenge contests. Your votes will help get more awesome stuff into my garage, which will enable me to make more contributions to this site 🙂
Step 2: Stuff you’ll need for the base
I was fortunate to have 2×4 lumber and plywood available from previous home projects so my cost to build the tracker base was very low. I made extensive use of roller bearings to keep friction low to reduce the motive power losses. The main azimuth shaft was a recycled curtain pole that I had the foresight not to throw out many years ago during a remodeling project.
Supplies you will need to make the base
- Bearings 3/8″– you will need seven 3/8 ID by 7/8 OD roller bearings. Sealed bearings are better at keeping moisture and dust out. Ultimate bearing for all-weather operation is a plastic sleeve bearing or roller bearing. I used cheap steel bearings that may not stand up to extended outdoor use without water proofing but I already had them in my box of stuff from an old CNC machine build so I used what I had. I used 7 of them. VXB, Electronic Goldmine and Use-Enco.com are good sources for low cost bearings. Electronic Goldmine has 3/8” ID bearings for under $1 each. VXB has plastic and ceramic bearings as well.
- Bearings 3/4″ – You will need two ¾” ID by 1 ¼” OD bearing for stabilizing the azimuth pole (curtain pole OD must be 3/4″ for this project)
- 2×4 Pine Studs – Two of them will be plenty. Construction lumber is a sustainable and renewable resource.
- ¾” Plywood – I used birch from a furniture project I completed a long time ago. You will need enough to cut out two x 10” gears, two x 2.5” gears and some collar clamps. A 2ft by 2ft sheet will be plenty
- Pocket Hole screws – 2 ½ screws for joining 2x4s and 1 ¼” for joining thinner wood
- Piece of plastic – Acetyl/Acetyl/Nylon at least ¾” thick. A 2”x2”x1” piece will work nicely. This will be used to make the nut that controls the elevation.
- Strips of 1.5” by 0.75” wood – plywood or anything else you have handy. Sustainable hardwood such as Poplar is good. This is used to stabilize the lead screw (fancy name for precision threaded rod) that will carry the elevation panel load.
- More strips of the same to make the support frame for the solar panel itself.
- Elmer Max wood glue
For more detail: Solar Tracker in the Internet Cloud