Sunteți pe pagina 1din 20

Login(/tag/type-id/)

(/account/login) | Sign
Up (/account/gopro?sourcea=header&sourceaUrl=/id/Bitcoin-Mining-using-Raspberry-Pi/?ALLSTEPS)
Explore
Create
(/about/submit.jsp)
Contests
Community (/community/)
let's make (/contest/)
(/)
(/)

share what you make >


(/id/intel/)

(/editInstructable/)

Bitcoin Mining using Raspberry Pi

(/tag/type-id/category-workshop/channel-gardening/?sort=FEATURED)
(/tag/type-id/category-outside/channel-bikes/?sort=FEATURED
(/tag/type-id/category-technology/channe

Vote!
by ssarthak598 (/member/ssarthak598/)

Download (/id/Bitcoin-Mining-using-Raspberry-Pi/?download=pdf)

(/id/Bitcoin-Mining-using-Raspberry-Pi/)
Collection

8 Steps

I Made it!

Favorite

Share

About This Instructable


23,371 views

License:

381 favorites
ssarthak598
(/member/ssarthak598/)

Follow

125

(/member/ssarthak598/)
More by ssarthak598

(/id/Run-Windows-XP-onAndroid-Device)

(/id/Make-A-SimpleOperating-System)

(/id/Recycling-CPUsProcessor-Heat)
Tags:
raspberry pi bitcoin (/tag/type-id/category-

(http://cdn.instructables.com/F5E/PJAT/I8OBEQ6O/F5EPJATI8OBEQ6O.LARGE.jpg)

technology/keyw ord-raspberry+pi+bitcoin/)
mining (/tag/type-id/category-technology/keyw ordmining/)

Related
Lego Raspberry Pi case
(http://www.instructables.com/id/LegoRaspberry-Pi-case-1/?
utm_source=base&utm_medium=relatedinstructables&utm_campaign=related_test)
Streaming Media to your
Raspberry Pi
(http://www.instructables.com/id/Turningyour-Raspberry-PI-Into-aMedia-Center-Exte/?
Raspberry Pi Twitter
Candy Bot
(http://www.instructables.com/id/RaspberryPi-Twitter-Candy-Bot/?

Getting to know
Raspberry Pi
(http://www.instructables.com/id/Gettingto-know-Raspberry-Pi/?
utm_source=base&utm_medium=relatedBreadboard Adapter for
the Raspberry Pi
(http://www.instructables.com/id/Breadbaordadpater-for-theRaspberry-Pi/?
See More (/tag/type-id/?q=)

(http://cdn.instructables.com/FU9/5QU4/I8OBEN5S/FU95QU4I8OBEN5S.LARGE.jpg)

Want to mine some bitcoins? Want to earn for free? Have a pi not being used?
Then lets mine some bitcoins!

DIGITAL FILM MEDIA

Miss Call Movie


Tayang 30 April 2015 Suspense thriller pertama
Indonesia
Remove these ads by Signing Up (/account/gopro?

sourcea=removeads&nxtPgName=Bitcoin+Mining+using+Raspberry+Pi&nxtPg=/id/Bitcoin-Mining-using-Raspberry-Pi/?ALLSTEPS)

Step 1: What is BitCoin?

(http://cdn.instructables.com/FZ7/W9QZ/I8OBENF1/FZ7W9QZI8OBENF1.LARGE.jpg)

If you dont know already, Bitcoin is a virtual currency set up in 2009. Bitcoin has
grown in reputation over the past few years becoming a very popular as a method
to pay for services over the internet. The value has rocketed recently thanks to the
huge coverage in the media, for both positive and negative reasons.
There are two ways to get Bitcoin:
-Buying them from an exchange, which is the process of converting local currency
to Bitcoin.
-Mining them. Mining is the process of verifying transactions in the blockchain.
As the whole of the Bitcoin system is decentralised, every transaction is publically
viewable within what is called the blockchain. This blockchain contains every bitcoin
exchanged between users so, as there is no central server, it has to be self
governed. This is the job of the miners.

Step 2: Requirements

In order to mine Bitcoin, you will


A pool account
Bitcoin Wallet
Raspberry Pi
Raspbian image SD card
USB Bitcoin miner

Step 3: Creating an Account

(http://cdn.instructables.com/FO9/6T09/I8OBEPCO/FO96T09I8OBEPCO.LARGE.jpg)

(http://cdn.instructables.com/FAZ/UIZ6/I8OBEPAY/FAZUIZ6I8OBEPAY.LARGE.jpg)

There are two things you need to do:


Download a bitcoin wallet
Create a pool account
Set up paymentSet up workers
Download a Bitcoin Wallet

A wallet is a program that sits on your computer and gives you a wallet address,
this is a unique string of numbers and letters that you will use to receive bitcoins.
Download the client for your computer from https://bitcoin.org/en/download
(https://bitcoin.org/en/download)
After installation, you will have to save a file called wallet.dat, keep this file safe, as
this contains your unique wallet address within it, including all bitcoins that you will
gain. If you lose this file, you cannot recover any bitcoins it contained.
Create a Pool Account Once you have a wallet address, create a pool account. A
pool is a huge collection of other people working towards gaining bitcoins. Due to
the complexity of mining a bitcoin, it has become unrealistic to solo minethe act of
processing millions of numbers to solve the block problem. Working as a group, or
pool, lets everyone have a chance of earning some Bitcoin. There are many pools
around, in this tutorial Ill be using one called Slushs pool:
https://bitcoin.org/en/download (http://mining.bitcoin.cz/)
Set Up Payment
Once you have created a pool account, you'll need to enter your unique wallet
address into the Bitcoin payout address.
Create Worker Account
Next step is to create a worker login account. Within your pool account you have
the ability to create something called a worker for each of your bitcoin miners, so
you're able to monitor them all separately just in case one should fail.
Each worker has its own login name and password. Whilst you are on My
Accountclick Register New Worker and give it a name, for example; worker, and a
password. Now you're ready to set your Raspberry Pi mining for Bitcoin.

Step 4: Setting Up the Raspberry Pi

(http://cdn.instructables.com/FM3/YK1G/I8OBEPOV/FM3YK1GI8OBEPOV.LARGE.jpg)

Start with a fresh Raspbian install, if you dont know who to do this, read the tutorial
How to Install NOOBS on a Raspberry Pi With a Mac.
If you plan on running more than one Bitcoin miner at the same time, it is best to
use a powered USB hub. Take into account the power rating as mining will need a
lot of power, as much as one mp per miner.
With your USB miner attached to your Raspberry Pi, lets get everything installed.

Step 5: Installing Required libraries

The miner to be installed comes as source files, which means that the program
must be compiled into a binary before it can be run. To make a program, in this
case BFGMiner, many dependencies are required.
Dependencies are additional software, or libraries the program needs in order to
compile properly, as it has been developed using them to make the software more
efficient. Hopefully you will be seeing the Raspbian desktop, so double click on
LXTerminaland type in the following:
1) sudo apt-get update
2) sudo apt-get install autoconf autogen libtool uthash-dev libjansson-dev
libcurl4-openssl-dev libusb-dev libncurses-dev git-core y
This process will take a few minutes to complete.

Step 6: Installing BFGMiner

(http://cdn.instructables.com/F03/F3U4/I8OBEMGM/F03F3U4I8OBEMGM.LARGE.jpg)

Once all the dependencies have been installed, now it is time to download and
install BFGMiner, so type the following into LXTerminal. Its normal for these to take
a few minutes to complete so some patience is needed.
git clone https://github.com/luke-jr/bfgminer.git (https://github.com/lukejr/bfgminer.git)
cd bfgminer
./autogen.sh
./configure
make
You will be greeted with a screen that looks similar to the following:

Step 7: Start Mining Bitcoin

(http://cdn.instructables.com/FSD/L8PE/I8OBEMQ9/FSDL8PEI8OBEMQ9.LARGE.jpg)

(http://cdn.instructables.com/FET/SVL1/I8OBEMQA/FETSVL1I8OBEMQA.LARGE.jpg)

Now youre ready to start mining. To do this, providing you're using Slushs pool,
youll use the following command:
./bfgminer -o stratum.bitcoin.cz:3333 -O username.worker:password -S all
The username section is composed of two parts, the username that you use to
login to the pool, and worker which is the worker name you gave when you
registered the worker. Finally, the password that was set when you created the
worker.

Thats a lot of numbers, so Ill make some of them a bit clearer.


Current mining speed, typically calculated in megahashes or gigahashes. The
number of hashes a second that can be calculated the better. A hash is an
algorithm of converting numbers and letters into an undecryptable set of
characters. So a miner is used to process millions of numbers in an effort to match
the hash to guess the original number. The more hashes that can be processed the
faster it is able to solve the problem.
Number of accepted shares. A share on a pool is to show the miner has
successfully worked out a given problem, so the more shares you can process the
better your reward from the pool.
Detailed information on accepted shares and pool updates. This is a running
log of what is currently happening with the miners and basic pool information, such
as messages of updates and when new blocks are found.
More information can be found at the BFGminer github site.

Step 8: Conclusion

(http://cdn.instructables.com/F5E/PJAT/I8OBEQ6O/F5EPJATI8OBEQ6O.LARGE.jpg)

(http://cdn.instructables.com/FU9/5QU4/I8OBEN5S/FU95QU4I8OBEN5S.LARGE.jpg)

Following these steps will leave you with a very energy efficient bitcoin miner, as a
Raspberry Pi only uses four watts of power, and a miner is typically 2.5W. Mining
used to be done with computers consuming over 700W for the same process so to
make a jump in savings helps repay the cost of the hardware we are using.
All there is to do now is to sit back and watch the money slowly build up. Though it
is important that you understand that Bitcoin value fluctuates wildly, it is extremely
volatile, so invest at your own risk.
You can also put up LCDs. Connect more Pis for getting better speed :D

For more information there are a number of websites and forums available, such
ashttps://bitcointalk.org/,to help get you started.

We have a be nice comment policy.


Please be positive and constructive.

I Made it!

Add Images

Davak72 (/member/Davak72/)

Make Comment

4 hours ago

Reply

"as much as one mp per miner" I'm not quite sure what you mean here. mp is not
even of current. Perhaps you mean mA, but that's not much
power at 5 mW. The raspi can supply 100 mA of current to each USB port, so it
would probably be more than that.

(/member/Davak72/)
a unit of power, or

LiGhTMaGiCk (/member/LiGhTMaGiCk/)

Davak72

1 hour ago

Reply

The author probably meant to say "Amp" and the "A" got left off. it
happens.
(/member/LiGhTMaGiCk/)

gregjd5000 (/member/gregjd5000/)

LiGhTMaGiCk 10 minutes ago

Reply

Still, it probably uses more than 1mA. He asked a valid question


(/member/gregjd5000/)

fuzzyhypothesis (/member/fuzzyhypothesis/)

yesterday

Reply

Nice write up. I have to ask, is it work using a RPi for mining? Even with a cluster
if using graphics cards are a better solution.

(/member/fuzzyhypothesis/)
of RPis, I wonder

olliedog12000 (/member/olliedog12000/)

fuzzyhypothesis
20 hours ago

The Rpi is the controller and the data link between


the miners (asics) and the pool/blockchain. I run a
(/member/olliedog12000/)
Rpi with a bigger asic than what is in the picture but
for me in the UK there is no real chance of a profit
unless the bitcoin price rockets again.

fuzzyhypothesis (/member/fuzzyhypothesis/)

olliedog12000
5 hours ago

Reply

Reply

OK that makes a bit more sense. Do you have any


(/member/fuzzyhypothesis/)
information on the ASICS you use?

FKINGLAG (/member/FKINGLAG/)

fuzzyhypothesis

3 hours ago

Reply

Block Erupter ASIC usb miners and the ones like them will never pay for
in terms of the return on your investment because they have a
ridiculously-low hash-rate. A hashing rate is how powerful the device can
crunch numbers. Even a cluster of these things wouldn't be enough for a
return on investment because they are no longer efficient/powerful enough
to compete with the other ASIC mining devices that are exponentially
more efficient/powerful. Which, also means they are more expensive.
However, you may use a Pi as a controller for ASIC devices that are
supported. Most ASIC devices have their own embedded controller, nowa-days, though.

(/member/FKINGLAG/)
themselves

olliedog12000 (/member/olliedog12000/)

fuzzyhypothesis
4 hours ago

Reply

fuzzyhypothesis
4 hours ago

Reply

I use a new R-box 2 which when overclockwd runs at


140ghs which is good considering it's listed at 100(/member/olliedog12000/)
110ghs. If I'm lucky I might pull 2.50 out every 10-12
days. like I said no money in it now.

bobsmith652 (/member/bobsmith652/)

They are "USB Block Erupters" (that is how they spell


(/member/bobsmith652/)
it) if you want to google them.

bobsmith652 (/member/bobsmith652/)

fuzzyhypothesis
4 hours ago

Reply

3 hours ago

Reply

A graphics card producing the same 333MH/s as


(/member/bobsmith652/)
these modules will use around 150W. The USB
modules use 2.5W. You will also have an extra 100W
for the PC.

jbignell1 (/member/jbignell1/)

With such low power could you set up a solar bank for power production and cut
(/member/jbignell1/)
out that cost?

jbignell1 (/member/jbignell1/)

3 hours ago

Reply

3 hours ago

Reply

What a great project and a fun way to start mining.


(/member/jbignell1/)

jeff96 (/member/jeff96/)

Excellent write up and explanations. It's a cool project. What I don't understand is
that diy bitminers seem to be investing to contribute to the bitcoin
process but it won't ever break even. What's worse, as the system requires ever
increasing hash rates which makes this equipment obsolete.

(/member/jeff96/)
it appears

I'm not meaning to troll. Is it more of a " I can do this because it's kinda neat"
thing?

br0x (/member/br0x/)

4 hours ago

Reply

You must mention in your article that mining is not profitable anymore, unless you
free electricity (that is stealing it), but in that case stealing money should be
considered as more effective solution :)

(/member/br0x/)
have

dirty_valentine (/member/dirty_valentine/)

4 hours ago

Reply

Interesting project. What kind of rate are you seeing for your setup (Bitcoins / day)
do you expect it to take until you see a return on your investment at
the current Bitcoin valuation? If more people start doing the same thing will that

(/member/dirty_valentine/)
and how long

cut into your Bitcoin rate or are there plenty of jobs?

fred3655 (/member/fred3655/)

22 hours ago

Reply

4 hours ago

Reply

Any idea of kWh usage versus bitcoin production?


(/member/fred3655/)

bobsmith652 (/member/bobsmith652/)

fred3655

Each USB module is 2.5W, and gets 333MH/s, or $0.02 in bitcoin per
about 10-20W for the Pi, USB hubs and PSU losses and
work out your cost of electricity from that.

(/member/bobsmith652/)
month . Add

mhartnett (/member/mhartnett/)

23 hours ago

Reply

4 hours ago

Reply

What sort of money per day/week are you looking at so far?


(/member/mhartnett/)

bobsmith652 (/member/bobsmith652/)

mhartnett

$0.02 per month per USB device. Unless you get free electricity, you will
loss.

(/member/bobsmith652/)
be making a

diy_bloke (/member/diy_bloke/)

5 hours ago

Reply

interesting article.
(/member/diy_bloke/)
I was just wondering, with an average

usb miner costing say 50 USD and an Rpi


say 40 USD, did you already break even?
I really have no idea how long it would take to mine a bitcoin r wether that is even
a predictable time

asd123e (/member/asd123e/)

5 hours ago

Reply

Great project for hobby solo miner (not in pool tho). But as money maker - Sorry
way to 2012... Today ~400$ gives ~1,1Th, noone is talking about Gh
anymore... it will consume more electricity than make money... But if you are solo
miner you could hit a lottery and win few bitcoins by luck.

(/member/asd123e/)
but this is

About Us

Find Us

Who We Are (/about/)

Facebook (http://www.facebook.com/instructables)

Advertise (/advertise/)

Youtube (http://www.youtube.com/user/instructablestv)

Contact (/about/contact.jsp)

Twitter (http://www.twitter.com/instructables)

Jobs (/community/Positions-available-at-Instructables/)
Help (/id/how-to-write-a-great-instructable/)

Pinterest (http://www.pinterest.com/instructables)
Google+ (https://plus.google.com/+instructables)
Tumblr (http://instructables.tumblr.com)

Resources

Mobile

For Teachers (/teachers/)

Download our new apps for iOS,


Android and Windows 8!

Artists in ResidenceJoin
(http://www.autodesk.com/artist-in-residence/home)
Join!
our newsletter: enter email

English

Gift Pro Account (/account/give?sourcea=footer)


Forums (/community/)

Answers
(/tag/type-question/?sort=RECENT)
Terms
of Service
(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21959721) |
SitemapStatement
Privacy
(/sitemap/)
(http://usa.autodesk.com/adsk/servlet/item?siteID=123112&id=21292079) |

Android
(https://play.google.com/store/apps/details?
id=com.adsk.instructables)

Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site (http://m.instructables.com)


(http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)
2015 Autodesk, Inc.

Go Pro Today (/account/gopro?sourcea=footer)

We're Hiring! (/community/Positions-available-at-Instructables/)

iOS
(https://itunes.apple.com/app/instructables/id586765571)
Windows
(http://apps.microsoft.com/windows/enus/app/7afc8194-c771-441a-959054250d6a8300)

S-ar putea să vă placă și