Building a Solar Powered Web Server (Part 1)

Summer is here (not technically, but effectively so in Atlanta). It’s a season with no coursework, more outdoor activities, and more time to spend on geeky projects. My friend Amrita and I were chatting over coffee this week about what we could work on this summer. Our prior projects have included building a family tree data vis app, working together on coding challenges, and of course trying to do normal things like go hiking.

This year, we want to see if we can build a simple web server that’s completely green. Since we’re in “Hotlanta”, there’s no better way to try it out than using solar power. Over the next few weeks, we’ll do a series of blog posts describing what we’re doing to build and test this server and, while it will likely never be used for anything mission critical, if it is feasible for certain web projects.

Selecting a low-powered device

The first thing of importance is to find a computer that can host a simple web server, and also run at very low wattage. Things have definitely gotten more power friendly in the past few years, with even mainstream desktop processors now able to run with thermal dissipation of < 20W. For this project, the choice seemed simple – a Raspberry Pi 3 Model B. Based on preliminary research, this small system is capable of running a modified Ubuntu server, and a couple websites have suggested that it runs at only ~300mA current draw at idle and < 1A at peak usage. Assuming a web server isn’t using that much power, and that it would be running headless (no graphical output, keyboard, or mouse), we can hopefully assume an average current draw of 400mA. Given that the Pi requires 5V to run properly, this would yield an average wattage of 2W (with potential peaks of up to 5W).

Can it be run off of a solar panel?

The short answer is: hopefully. Solar panel technology has improved a lot in recent years, and also come down in price. There are dozens of small solar panels on Amazon.com geared towards providing juice to small electronics like cell phones. The one we chose is the baseline model from KingSolar which claims power generation of 14W at peak times. While this gives plenty of overhead compared to the needed 2-5W, a couple other things need to be considered. One, is that it is likely that, wherever we place this server and solar panel, it will probably not hit peak generation most of the time. Any location like a balcony will likely only have partial sunlight for most of the day. It’s also Atlanta – while we have lots of sunlight, we also do get many cloudy and rainy days during the summer time. But this panel should be sufficient even under non-optimal conditions.

A backup power source

But wait – there’s more! Lots of people have shown that the Raspberry Pi could be run off of a battery. I had a Lepow Moonstone (6000mAH capacity) at home that I had used as a portable battery pack. It supports an output of 2A at 5V, which is plenty to power the system. Furthermore, it offers pass-through charging, meaning it can simultaneously be charging charge a device. The input specifications (according to the Lepow website) state that it can draw 2.1A at 5V as an input charger, for a total of 10.2W. This number is still within the range of non-optimal performance of the solar panel.

So here’s the plan. The solar panel will be connected to the Moonstone battery pack, to charge it whenever sufficient sunlight is available. Even if less than 10W is available at a given time, the Moonstone should still charge slowly (based on anecdotal evidence, I’ve been able to charge the Moonstone slowly from a 1A port before). Plus, assuming conditions are fairly good (i.e. the Pi is drawing < 5W and the solar panel is generating >10W), then we could theoretically be charging up the Moonstone while powering the Raspberry Pi. This would enable a couple things. One, during the brief spells of cloudiness or rain, the Pi will not suddenly shutdown and have to reboot. Second, if the Moonstone has enough capacity, it could keep the Pi powered even while the sun is gone – i.e., at night. How great would it be if you could generate enough power during daylight to run the Pi continuously 24/7!

Next Step

We purchased the necessary parts this week, and all of them arrived as of yesterday. We’ll be testing out several of the aforementioned assumptions and seeing if this solar-powered server could actually become a reality. Stay tuned!