This blog post will cover many of the engineering and design decisions I made over the last 18 months. If you’d like to see more about a certain topic, let me know in the comments or on social media and I’d be happy to answer.
As a quick introduction, this is a project to build an open-source 2-axis solar tracker, named the Solar Outdoor Lightweight Adjustable Robot, or SOLARbot. The goal is to maximize the efficiency and portability of a single large solar panel to make it portable for use in emergencies, developing countries, or even camping. I’ve listed out several different aspects of the build below.
Key Design Decisions
Panning Motor – A key aspect to the robot was the motor that would spin the panel to the left and right- also called the panning motor. This motor needed to be high-torque and capable of supporting a very heavy panel (30+ lbs.) and should resist spinning in place. This generally ruled out servos and stepper motors, because of cost and power. Instead, I went with a 12V gear reduction motor from ServoCity.
Tilt Motor - One of the critical design requirements to overcome was tilting a heavy panel and using as little power as possible. Additionally, this motor had to hold the position without using any power. A constantly powered motor like a stepper motor would simply use too much electricity. Research here led me from worm-drive motors to linear actuators. The specific one I ended up using from Pololu has a position sensor built in, which was an important feature that allows me to track the tilt of the panel. This allowed be to avoid using an IMU, which was part of the earliest builds.
Digital Compass – Early on I selected the HMC6532 breakout from Sparkfun. This was a reliable, fast digital compass. I gave the Adafruit LMS303 a try, but found it needed calibration and wasn’t quite fast enough for my project. For the HMC6532, the Bildr example got me going quickly and was a huge help!
GPS – At the heart of this project was the Adafruit Ultimate GPS breakout. The great library, forum support and flexibility of the unit allowed me to use this GPS on multiple hardware platforms over the 18 months I developed the project. This GPS allows me to parse out time, latitude and longitude; the key elements in calculating the position of the sun.
Motor Controller – I tried out many different motor controllers, but many of the traditional Arduino choices couldn’t handle the potentially high-Amp loads of my motors when turning a heavy solar panel in the wind. I ended up going with the Pololu Dual VNH5019 shield, with an excellent library and shield compatibility with the Arduino UNO. This shield doesn’t work with the Arduino Yun- watch out.
Throughout the 18 month process, I experimented with several different computing platforms- but ultimately ended up going with the tried and true Arduino UNO. Here are some of the others, including why I did or did not select the platform:
BeagleBone – The original BeagleBone was my start- I wanted to write the solar calculation scripts in Linux and control the motors- but I quickly found out that heavy motor control from the BeagleBone was not really supported at the time, and is still a bit of an issue today. I had tried some USB-based Pololu motor controllers, but found their Linux documentation lacking, and they needed to be calibrated using Windows apps- which would be breaking my goal of “easy to use” if someone had to do a lot of calibration prior to use.
Arduino UNO – The Arduino UNO had the most hardware support but also the weakest computing power. While it was an early favorite, porting the solar calculation code to the Arduino was one of the hardest things I had to tackle. The code ended up being accomplished thanks to sample GPS code from Adafruit, Pololu Arduino libraries and some help from the various Arduino forums.
Arduino Yun – The Arduino Yun was released late in the product lifecycle, and I took a liking to it- even porting the solar calculations to bash scripts to run from Linux. Unfortunately, the limited number of available pins made it incompatible with my motor shield, GPS unit and compass. While I am excited for future possible projects with the Yun, I have found that it uses many of the pins you’d want for complex projects.
The base configuration went through more iterations than just about anything else, and is a great history of my learning process of dealing with wood, stock metal and custom metal parts. Here’s some examples:
Wood Base Frame:
Wood Stand Frame:
Custom Bent Metal:
Waterjet Parts Bent with a Press Brake:
Github is where you will find all of my plans and wiring schematics, etc. Code optimization and fixes are always welcome!
Adafruit Forums – These forums have been an excellent source of support- if you are experimenting with the Adafruit GPS module, I encourage you to check out their learning page and the support forums for that device. They have many different subforums for all their products.
If you’d like to see the early build photos, you can check them out the early prototypes here- there’s lots of random photos taken throughout the last 18 months! The more recent build photos are here.
Jigsaw – The jigsaw was a key tool used in early prototyping- I would draw or stencil on the plywood and cut to shape- letting me do crazy shapes with just some wood and glue. While some of these would prove difficult or impractical later, it did lead to some crazy shapes!
Drill Press – I quickly found out that a handheld drill just doesn’t cut it when you’re doing semi-precise work like drill holes for pivot points and hinges. It’s just too hard to do precise holes with a hand-held drill. I ended up purchasing this Ryobi drill press from Home Depot and although it’s a tad under-powered, it is great for small jobs. This model has a laser setup that makes it a little easier to drill with precision too.
It may sound silly, but starting with a Visio sketch printed to scale on paper works wonders. I can use paper cutouts to test basic fits of parts, then use the same paper printouts to trace them onto wood parts later. Easily the best feature of a paper printout is being able to reliably place drill holes on wood. Simply print out the center for the hole, then align it to the wood and use an awl to mark where the hole needs to be drilled. I used this method on many wood parts, some of which you can see in this gallery.
Small ¼” sheets of plywood were an easy way for me to start testing the overall design of the project- although it can be expensive to buy lots of these smaller sheets, they are certainly cheaper than buying custom waterjet parts. Wood parts ended up being strong enough to support its own weight, but I never really trusted using wood for real-world use- but it probably could be done with a different design.
If you’re going to look into waterjet parts, make sure you find a local shop that is willing to do small batch runs. You’ll usually find out they have a minimum order (my shop has around $120 minimum order), so if you have multiple projects that need parts from the same metal, get them done in one batch or simply have multiple copies of your parts made. This is where wood prototyping can save you money- each trip to the fabricator cost me $120!
Metal Parts Bent with a Press Brake
Ask your shop where you get parts cut for a recommendation to get them bent. My waterjet vendor couldn’t do complex bends, and referred me to a shop. Secondly, get multiple quotes! By having my parts in both DXF and PDF formats, I could shop around for the best quotes- there were sometimes several hundred dollar’s difference between one shop and another.
Bolts and other Hardware
If you’re doing unusual builds, you may have to buy unusual hardware items like nuts and bolts- while the local hardware store may seem expensive, the ability to buy just one or two and try them out may save you time and money- once you get more comfortable you can by hardware from mcmaster.com, but watch out- stuff gets pricey fast when buying from them. One cool thing about their website is the ability to see pictures an mechanical drawings of the parts- which is great if you know what the part should look like, but you don’t know the name!
Project Cost - Be prepared to deal with some expensive parts- some individual components were over $100 each, and I often found after a day or even hours that a part would be impractical for use. The upside is that I have a good library of parts, the downside is that it took a long time to find the right combination. My suggestion is to set a hardware budget and stick to it- sometimes my project had to sit on the back burner when other more pressing needs came up.
Breadboarding - When possible, avoid soldering parts together. It may sound obvious, but breadboard the items first whenever possible. I saved a ton of money by using shield headers as sockets for my compass and GPS unit- allowing me to try different hardware platforms at the expense of a shield and some wire, rather than having to desolder old components or buy new ones.
Weatherproof Enclosures - One key lesson I learned was not to use weatherproof enclosures during the early prototyping phases- that is to say, I used lots of them, and they cost a pretty penny. I’d highly recommend doing all the hardware development before selecting a case, because component design and frame design will change over time- leaving you with a project case or Pelican case that now has a bunch of holes in it!
Make your project accessible! One key thing I learned was to leave footprints for others to follow. I often encountered forum threads where someone had the exact same problem as me, but finished a thread with “I fixed it, I am ok now” with no info on how it was resolved. I also found lots of code that didn’t include wiring instructions and promises for plans with no follow-up information. I did my best not to fall into any of those pitfalls, so if there is something I forgot to share, please let me know!