Raspberry Pi

I should take my second post of the new year to mention that I love raspberries.  I’m not sure if they’re my favorite, but they’re damn close.  I’m not sure what else to say, other than try some in champagne, or other drinks.  Try them with cakes.  Candy bars containing raspberry are good as well.

This post, however, is not about the berry, but the Raspberry Pi, a tiny embedded Linux system that boasts enough power to be a full-featured desktop.  (If you came upon this post, you’re probably already somewhat familiar.)  There are two models, at $25 and $35.  The more expensive one has two USB ports as well as an Ethernet port.  (The lesser, I believe, only has one USB and no Ethernet.  But, you could get a hub.)  Both have a 700 MHz ARM-based CPU, and 256 MB of RAM.  They are surprisingly capable graphics-wise (check out the link for more details), and they are also low power.  This is what interests me.

I posted before about possibly configuring my Web server to run at least partly on solar power.  On that post, someone commented on the possibility of using the Pi for this.  And so, I have a model B on order – this board uses about 3.5 watts, so that’s a start.  I would use an external USB drive for much of the filesystem, which would bring this up some, but it should still be less than my current setup which consists of a Mini-ITX board (about 1 GHz, with 256 MB RAM and a 120 GB hard drive).

I have a model B on order (should come in May), and my plan is to throw Debian on there and test this out.  My current server does a decent amount, but it doesn’t seem to get overtaxed.  I’d be looking to run Web (Apache; yes I know there are smaller servers that might work, but I’d like to try this), PHP, MySQL, Email (Postfix/Courier), and LDAP (Email backend).  This should be interesting, and if I make careful use of the onboard SD card I think there’s a shot that this could turn out well.

As for power, part of the inefficiencies of my current setup (roughly 30-4o watts at the plug) are due to the power supply.  With a much smaller supply I should be able to bring this down.  As I also mentioned in the other post, I would like to come up with some sort of power sharing solution, where the primary power source for the Pi is solar, with the mains as a fallback and a battery backup in case of a power failure.  The idea would be to keep a normal system battery charged, rather than taxing it by cycling it each night to keep the server running.  Maybe someday I’ll end up with so much solar that the ~10 watts the whole setup should draw will be a drop in the bucket 24 hours a day (10 * 24 = 240 watt-hours/day), but for now I would take this approach.  (Also, a backup battery is good for other things, and I probably won’t care much about my Web server compared to, say, charging the cell phone or pumping out the basement.)

If the Pi isn’t up to this, I’ll probably try it with a media center-type application, and maybe look into a Sheevaplug for the server.  (It has USB also, so I could literally almost drop it in place.)  My server does get its fair share of hits, between this site, the Fever Dreams mirror, and when I host images on message boards like Fark.  But, I think that a small machine should be fine.

Solar Powered Web Server

As you have probably noted from past entries I like to run my own servers.  I’m not running a big enterprise here, so they don’t have to be extremely reliable (though they have been very reliable).  Mostly, I like the control that I have, and the flexibility.

But I find myself running into a few brick walls here.  Mainly, electricity.  Now, it’s relatively cheap, particularly if I run a server at school where I don’t pay for electricity.  But, there’s also the wastefulness factor.  Global climate change or not, I’m not a fan of the idea of wasting energy.  Or at least grid produced energy that could result in carbon emissions.

Alright, if I really wanted to reduce my footprint I suppose I could walk a lot more instead of drive, maybe get a more efficient car, you get the idea.  But there are a lot of servers running out there, and someday it would be nice to be able to keep them all going with an alternative source of power.  Or maybe keep them going out in a remote location, or during a prolonged blackout.

Hence, my idea for a solar powered Web server project.  I have some of the parts for this project already, so but I’d still need to make a few more purchases.  The big thing is design, and here are my thoughts: If I can get some kind of embedded, single-board computer that draws say 3 watts at most and runs 24/7, that is 72 watt-hours per day.  (Just in case anyone is unsure, to get watt-hours you multiply watts by hours.  So 3 watts for 24 hours is 72 watt-hours.)  I will bump that figure up to say 90 watt-hours a day, just to compensate for losses in the battery.  After all, we do want to be able to serve Web pages at night, right?  So 90 watt-hours per day is not too bad.  Supposing that, in sunny Buffalo, NY we get an average of 3.5 sun hours per day, you would need about 25 watts of solar.

My solar arsenal right now consists of one 32 watt panel mounted on the side of my house, plus another 32 watt I have not yet installed, as well as a 21 watt flexible panel and a couple smaller ones.  (There’s also a big 100 watt panel in the garage, but that’s a different story for another day.)  So I have more than enough to make this work in terms of producing power; in theory one 32 watt panel should be enough, but having a second one in case of shade or low light from clouds would be good.

Now, we want some battery backup as well, as I mentioned before.  To do this we probably want to be able to run the server for say two days without sun.  (This isn’t mission critical.)  So, 90 watt-hours at 12 volts is 7 amp hours (90/12), so for two days that’s 14 amp hours.  Not too unreasonable; I have a 18 amp hour gel cell battery that should be able to handle that, without drawing it all the way down (which is bad for the battery).  Although I may consider getting a bigger battery.

Now, this will be a simple server, probably not something I’d install the standard LAMP stack on.  My main thought for this would be that it would also log data from the system via shunts and some analog-to-digital converters, and then present the data in a nice looking Web page.  Maybe if I felt like it some day I could even add some AJAX stuff to it, but whatever.

So this would really be proof of concept.  It would also be great for backup power; if there was a bad power failure I could of course turn the server off and use the power for other things, like charging cell phones and running lights and a ham radio.  So it would be a good thing to have.  I will soon be looking around for a nice single board computer to use as the server, and then maybe a better battery and solar panel location.  With a little luck I will be able to pull something together.  Stay tuned.