Solar powering a Raspberry Pi for Bitcoin mining

Introduction:

As a simple one-GPU bitcoin miner, the recent growth in ASIC (Application specific integrated circuit) bitcoin mining hardware has been a real gamechanger. In my case, there are some disadvantages to the change, namely having to spend the few bitcoins I have mined on new hardware (and having to wait a long time for it to arrive). That said, it does provide a number of opportunities to me, which is why this page even exists.

Opportunities:

The biggest opportunity presented is the chance to retire my GPU from mining. When the widescale adoption of ASIC miners has taken place they will simply not be worth running for the power costs to amount of bitcoin mined. Retiring my GPU will mean less wear and tear on my desktop PC, and a much lower power bill as I will be able to shut the machine down when I'm not using it (typically I leave it on 24/7 for weeks at a time).

The next opportunity is to adopt an ultra low power device to host the ASIC units. These are typically connected by USB to a host machine, even in fully integrated units such as the Avalon (which consists of a set of USB devices hooked to a little TP-Link router board). The result is even the cheapest, lowest end SoC (System on Chip) device with a USB host controller can probably handle running the mining software. In my case, I've opted to use the Raspberry Pi due to its availability, cost and flexibility

The third opportunity is to completely eliminate my ongoing or running costs. As I had some leftover hardware from a previous experiment with solar power, this was a real no-brainer. My previous experiment had involved some other electronics projects which never went ahead, however I had already purchased an 80w 12v polycrystaline solar panel, necessary wires, a good quality solar charge controller for lead-acid batteries and a set of deep cycle sealed lead-acid batteries. The batteries were acquired used, but seemed to still be in good working order too. My aim was to connect all of these to the Raspberry Pi and whatever ASIC hardware would suit my purpose, creating a fully self-contained bitcoin mining platform that I could leave unattended for weeks or even months.

Solar powering a Raspberry Pi for Bitcoin mining

Disadvantages:

High setup cost is the first and most obvious disadvantage of such a setup. Sure, you can scrounge parts from various sources but eventually you may end up with significant costs for panels, batteries and circuitry for charge controllers. As mentioned above, I already had these leftover from previous projects so I have not counted the cost. If you have a mobile home or RV with a solar panel and battery you may be able to use it to run a similar setup when it isn't in use.

Without ASIC bitcoin mining equipment, you will be doing nothing but converting sunlight into heat. Due to the ever increasing difficulty levels, along with the low powered relatively weak CPU of the Raspberry Pi, you will never successfully mine anything unless you are incredibly lucky. You might be able to operate FPGA based mining equipment to some level of success, however these consume significantly more power per MHash so this may not be practical without larger solar panels.

Putting it all together:

I had kept the batteries hooked up to the charge controller and solar panel on my roof for some years, however they appeared to have held their charge and condition well. I decided to use my model boat battery charger to deliberately drain and recharge each battery to confirm capacity and performance was still up to scratch, and by the end of it had a stack of batteries capable of providing 12v, with a capacity of 152Ah. More than enough!

The Raspberry Pi itself is a somewhat unprotected device, it does not come with a case in order to keep costs down. As my solar panel and batteries are now living in and on a garage, it seemed wise to come up with a suitable housing or at the very least a mounting plate to keep it safe. Below is a simple OpenSCAD script for creating a mounting plate for a Raspberry Pi using a 3d printer. Eventually I plan to add walls, a lid and extra case features, once I'm happy with cooling and ASIC performance.

OpenSCAD script:

Raspberry Pi Mounting Plate (rev B) version 1

Software:

So far I have opted to stick with the default Raspian distribution I first started with when I got the Raspberry Pi. To that end I have installed extra packages to allow me to compile code, and downloaded BFGMiner to use as my bitcoin mining software. Installation of such software is pretty simple and documentation exists on many other sites on how to do this. 

Update – April 2013:

Well, as anyone who ordered from Butterfly Labs has found, there have been some delays in development and production of the various ASIC units. I certainly don't consider this to be a major issue, dealbreaker or reason to run around like a headless chicken. BFL will eventually ship units (and some early reports suggest they already have begun!), and I would much prefer a well engineered device to something that has been rushed out the door half complete (See Windows ME, Vista, etc) That said, I haven't been just sitting waiting for something to happen, and have been experimenting with the system I currently have a bit.

So far, the Raspberry Pi has been operational for a continuous 72 days, in which I have had it attempting to CPU mine for bitcoin. This is a pretty useless activity, even on a high end modern CPU, let alone the ARM CPU on the Raspberry Pi, however it has allowed me to test for any heat related issues, and so far so good. The Pi hasn't run much hotter than 30-40 degrees C, even during the warmer months of the year. BFGMiner has been running intermittently, although occasionally I have had to restart it for one reason or another (dropped connections, weird and wonderful statistic errors, not submitting shares correctly, etc). The longest I have had it run without fault so far is just above two weeks, and I'm hoping the newer versions will be as stable as 2.10.5 has been. The Wi-Fi bridge has also been incredibly stable, despite needing to pass though three brick walls and an entire house. The worst that has happened with it was loss of connection for a while due to an issue on the access point itself. I'm considering building a suitable daughterboard for the Raspberry Pi along with some code that can trigger hard resets of the bridge if it is unable to reach the access point for an extended period of time. Otherwise, I might consider switching to a USB Wi-Fi dongle instead.

Solar powering a Raspberry Pi for Bitcoin mining Schematic

I have also been working on the power side of things, in line with the changes Butterfly Labs has been making to its ASIC line. As I ordered two Jalapenos, which I expected to be USB port powered, I had been worrying about what to use to provide power to these. Most 12v to 5v switchmode regulators don't give out more than an amp or two per socket, which would be more than enough for the Raspberry Pi, but probably not enough for the original spec Jalapeno units without some creative soldering. Fortunately and unfortunately, the Jalapeno, now apparently known as the 5GH/s Bitcoin Miner will be 12v powered, similar to the Little Single and Big Single series. This means I can do away with creative soldering and switchmode regulators and simply hook the units directly to the 12v lines (with an appropriate fuse) from my solar power supply.

This also raises a rather worrying issue. As the two Jalapeno units I will be getting will now be pulling considerably more than 4.5 watts each, I'll need to check and monitor the power draw of the revised units. Current estimates for the power consumption are about 27w, although that is expected to fall a bit. If they get it down to 20 watts, I will still be pulling half the maximum output my panel is capable of, which means (particularly in winter) that I will be drawing more than I can feasibly generate on any given day. Result? The batteries, no matter how large, will eventually go flat. Chances are I will need to figure out some more exotic methods for improving my energy harvesting (solar tracking being one of the first steps), as well as potentially scavenging some more panels if I can find them to improve generation capacity. Last but not least, I might have to work with just one Jalapeno unit initially (and run the other on a traditional powered machine elsewhere) until I have enough bitcoin to afford some new panels, which seem to be a lot cheaper now than they were a few years ago! If you would like to help me out in getting another panel (80 or 100w), please throw me a few satoshis to the donation address below…

 

For more detail: Solar powering a Raspberry Pi for Bitcoin mining


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:
LinkedinTwitter

Leave a Comment

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

Scroll to Top