Introduction: Bitcoin Mining on Raspberry Pi2

Gather The Parts.

You will need a Raspberry Pi 2

A powered USB hub ( Please do not cheap out on this)

Antminer U1/U2/U3

USB Fan

Raspberry pi heatsink with fan

Step 1: Credit

http://bitcoin.stackexchange.com/questions/38225/o...

Credit goes to jfoo

I really built this though

Step 2: Setup USB and Heatsink

Setup with the USB bitcoin miner to the USB powered hub with fan.

USB hub must be at lest 1.5 - 2.0 amps.

Also the Rpi heatsink and fan. You need this heatsink and cooling fan if you are overclocking the Rpi for maximum mining capability and planning to keep the raspberry pi up 24/7 without burning the core processor.

Step 3: SD Card Setup and Putty

Install fresh Raspian on your SD card with a minimum of 8gb.

Install Putty software and get into the terminal.

As for all Linux machines, update and upgrade.

Step 4: Installation

sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev screen libtool automake pkg-config libjansson-dev screen

Use this code to use to install independencies.

git clone https://github.com/bitmaintech/cgminer

cd cgminer
sudo ./autogen.sh export LIBCURL_CFLAGS=’-I/usr/include/curl’ sudo ./configure --enable-bmsc sudo make

sudo ./cgminer --bmsc-options 115200:0.57 -o POOL -u USERNAME -p PASSWORD --bmsc-voltage 0800 --bmsc-freq 1286

Paste this code in every time you need to reboot the raspberry pi.

Step 5: Pools

You can solo mine or pool mine. I made 20 bucks in 3 days. I recommend Bitminter because of its easy gui.

Comments

author
JacoB29 (author)2017-06-13

Hey guys, I am new to bitmining and want to do it kinda on the sideline for an extra buck here and there.

I was wondering could you use this same technique for a raspberry pi 3 and use 4 usb hubs full of antminers?

Also, would the code still the same?

author
DennisY10 (author)2017-05-05

Hi, can you provide some guidance.

After inputting the following command................

pi@RaspPi01 ~/cgminer $ sudo ./autogen.sh export LIBCURL_CFLAGS=.-I/usr/include/curl. sudo ./configure --enable-bmsc sudo make


................ into my RPi B, I get the following errors towards the end of the output......................

ccan/Makefile.am: installing `./depcomp'
Configuring...
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: ./configure
configure: WARNING: you should use --build, --host, --target
configure: WARNING: you should use --build, --host, --target
checking build system type... Invalid configuration `export': machine `export' not recognized
configure: error: /bin/bash ./config.sub export failed

Am I missing some input parameters or doing something wrong?

Thanks,

author
maskofdarkness22 (author)2017-03-31

does this have to be made with antminer u1, u2, u3, or can any miner USB be used I have the latest raspberry PI 3 model b

author
mike2016consult (author)2017-02-24

Hello i make everything but my raspberry pi don`t find my asci miner I use differend model miner What can I do Thank you.

author
RockeyDA (author)2015-08-29

could you please make a totorial on how to do this on a pc? preferably somthing windows 64-bit? i got 2 xeon x5690's and 2 l5506's just folding at home for heat, i would rather get money out of it.

author
robertlee0707 (author)RockeyDA2015-08-31

Cpu mining is inificient and gpu mining is power consuming so you wouldnt make any money. Only in the kilahash range. Asics are at the gigahash and power eficient

author
RockeyDA (author)robertlee07072015-08-31

oh and 1 gpu 250 watts... 2 cpu's 260wats(130wx2) so cpu is a bit harder on power than gpu. i got enough cpu power to smoothly play the amd ping pong demo running the physics on my cpu. sierusly, my posting pic of what i see in taskmgr and what i see on my desk. 4.2GHZ that is going to be maxed 24/7 for 6 months no mater what!

mgr.pngrig.jpg
author
robertlee0707 (author)RockeyDA2015-09-01

If you would like to cpu mine or gpu mine, I recommend litecoin, ziftercoin, doggiecoin, or anty coin that accepts script. It will be perfect since ordinary asic hardware cant handle it. By the way, use mineral oild and a colling system for the mineral oil. It is about efficiant as water cooling but cooler as in awesome. Nice setup, don't burn the wires

author
JamesM323 (author)robertlee07072016-09-09

also water will oxidize ur computer.

author

You should have titanX or gtx gforce 980ti graphics card and intel core i7 5960X with an evga titanium 1600W. That will satisfy the hungry graphics card

author
RockeyDA (author)robertlee07072015-09-01

oh, and if i had a core i7 i could not have 2 prossesors, and i think i could not have more than 8mb l3 cache, plus server hardwere has higher quality chips that last longer than desktop hardware. My x5690's lanch price was 1600$ a piece. i waited 2 years for the price to fall under 200$ a piece on ebay. story of my rig... ballen on a budget gathering parts over years.

author

Also get them from micocenter since they gave me awesome prices. Just shoutingout. I have a custom built PC and instead of $7,000 awesome cad machine for $4,500

author
RockeyDA (author)robertlee07072015-09-01

oh, and the coolers were 50$ together cuz i got them on sale.

author
RockeyDA (author)robertlee07072015-09-01

over the years i have only sunk aobut 1200$ or so in my rig. my dad likes to spend most of my paycheck before i even know it came. so money is still tight after i got a legit job. i dropped 200$ on my gpu in 2012. 450$ on my mobo in 2013, 400$ total on my cpu's, 150$ on ram. 1300w psu was a gift from a firend. if i can find a titan x for under 200$ then its do-able.

author
RockeyDA (author)robertlee07072015-08-31

dont you understand? flat rate power bill. no heat in the house. every winter i use folding@home for heat, so i can keep it from being 35F inside to 45-55F depending on how cold it is. if i could make mony and heat my house at same time it would be retarted to say no. you miners are all the same, you figured it out and you dont want any one else to.

author

If you were at the begining of bitcoin, you would make a ton. And i will make a tutorial later on

author
PO3 (author)RockeyDA2015-08-31

You can do it fairly easily on Windows or Linux or Mac. For best results you do NOT want to use your CPU - you want a Radeon graphics card. Doesn't even need to be top-end but mid-range and fairly recent Radeons are far and away better at bitcoin mining than even the best Nvidias. Has nothing to do with how good at game graphics, etc, they are, it is the architecture/design of the GPU that matters and the Radeon GPUs are a better match to the work of bitcoin mining.

Also - it really isn't very economical to do it on a PC. You have to run the PC itself and that uses LOTS more power than a Raspberry Pi or a dedicated ASIC plugin. You CAN use ASICs (basically a form of USB dongle) dedicated to bitcoin mining (the U2s or U3s mentioned above are ASICs) on a PC but, again, it is power hungry because you have to run the PC with its 400W or higher power supply just to operate the low power USB dongles. Raspberry Pis use very little power and so that is why they are favored over using PCs generally. Add it all together on a Pi and you use minimal power so your overhead is much lower.

author
RockeyDA (author)PO32015-08-31

1. i have a flat rate power bill.
2. i have a 1300w psu
3. i have 12 cores and 24 threads with total 24mb of l3 cache @ 4.2 Ghz.
3.5. my possessors out do my cuda on every thing including folding at home.
4. my computer is how i heat my house in the winter, would like to make money off of it.

you say its easy but i have been trying to get this working for 6 years. restoring badly damaged radio from the 1930's to working order only took me 2.

author
RockeyDA (author)RockeyDA2015-08-29

oh, also i have been trying to figure this out for 5 or 6 years and never got it to work.... (2 main OS's are Windows Server 2008 and Mint 17)

author
yottalogical (author)2016-09-02

If this is too complicated, there's another tutorial that's simpler to follow on instructables (Not Mine)

author
The End of A Heartache (author)2015-08-23

I am wondering what bitcoin mining does and why would you need to do this? I am up for anything

author

Bitcoin mining contributes your CPU cycles to the Bitcoin algorithm calculation. Basically you get "paid" to calculate (aka mine) the next coin. At the beginning of the whole bitcoin thing, the calculation was really quick and coins were mined all the time. Now the calculation has become so complex that the amount of CPU time (read electricity to power PC and cool them) often outweighs the value of the coins you can earn. This example pools together lots of resources to make a more powerful mining syndicate that shares the gains amongst all the contributing members of the pool.

author

Your not really calculating the next, Bitcoin. You're more of solving the next block on the blockchain. Bitcoins themselves don't exist, just verifiable transactions, and a network of computers (miners) keeping track of who has what and verifing transactions by solving blocks. If you do solve a block, everyone agrees you should have some Bitcoins, first 50, then 25, then, 12.5, etc.

author
BRAINDISIS (author)simonfishley2015-08-25

In reality you don't exactly calculate "the next coin" (25 coins are mined with each block at the moment) but you mine the next BLOCK.
And with the syncronization of each block the Bitcoin network can keep up and running and be "certified" by the creation of that block.

At the moment you ALSO get paid in Bitcoins, but mining BTC is not the objective of the mining.

Bitcoin rewards will end when the last BTC will be mined (21 millions is the cap), but probably mining will become less remunerative already from next year, when each block will only pay 12.5 BTC.

It's going to halve again and again in the years, and miners will get rewards with the fee that each payment brings.

author

Bitcoin is a very easy way to make lots of money, literally.

https://en.wikipedia.org/wiki/Mt._Gox

Just not YOU.

author
JamesM323 (author)2016-08-30

i have aurduino...is this transferrable?
can u help?

author
Daniel9868 (author)2016-08-28

What would it take (you can list anything) too really make a juicy profit and actually earn bitcoins not pennies.

author
KeithM9 (author)2016-08-07

Just FYI for all, I installed the latest Raspbian Jessie and some of my Antminers are not even recognized by my Pi. To follow along here, I have to revert back to Raspbian Wheezy.

author
gnewton (author)2015-12-28

There is a lot of information missing on the programming side, How did you get bitminter for on raspberry pi2? what was the rest of the coding so you can mine?

author
tzq33tdq (author)gnewton2016-06-22

bitminter has a stratum server that you can connect to without using the bitminter client, if that's what you're asking?

author
kartrikp (author)2016-06-18

how much does this overall cost you ?

author
د.محمدع (author)2016-05-10

http://techyhints.com/bitcoin/detailed-review-about-hashocean-com-for-bitcoin-mining/

author
dombengi (author)2015-10-01

how does this compute the massive calculations needed for bitcoin exactly? This is just a massive memory block with little computing power, no?

author
robertlee0707 (author)dombengi2016-03-23

It could work, didn't try it myself, but perhaps if you put a heatsink. But most likely it would and not. The program was meant for quad core processors. Tell me if it did work please.

author
Nitr0 (author)dombengi2015-12-31

That's why It has 5 USB bitcoin miners, which are pretty darn cheap by themselves, so the Raspberry Pi acts like a "hub" to control them.

author
carrotman42 (author)Nitr02016-03-14

If it's just used as a hub, would the RPi0 work just as well for this?

author
gluvit (author)2015-10-24

Oh yea

author
christopher.leblanc.98 (author)2015-08-25

sounds like leeching ,like in banking when one sets up a algorithm to to commit fraud by leeching penny's from every ones accounts going unnoticed until caught,this has cost clients millions over the years , just seems schetchy

author

No, you are allowing Bitcoin to use your hardware to run the algorithms they need. You get paid a fraction of a penny for your inconvenience. It is like they are renting your hardware.

author

It's not illegal in any way, basically these bit coins and other crypto currencies only have value because people want them. They aren't backed by anything

author

centeral banking is now cool so stick with bitcoin because it is decenterized. Get a bitcoin at $253 now and sell for predictable in 2024 $40,000.

author

Go and learn about bitcoin before opinionating.

author

ever wonder how visa makes their money

author

Quite the opposite https://en.bitcoin.it/wiki/Mining

author

Like in "Office Space". Love that movie...

author
philip.williams.7505 (author)2015-09-11

I have been reading through the comments here and I have to say that I am a little bit surprised. First of all, I think that the project is an excellent project. As far as making millions with Bitcoin, probably not, but...crypto currencies are here and probably here to stay for now or at least as long as there are computers and electricity to run those computers. Even though Bitcoin may be more and more difficult to mine, you can still invest into them and possibly see a higher return in the future. One thing for sure...FIAT currency is on the way out and maybe sooner than later. So, if anything, this is an excellent way to get your feet wet and start learning what may be the future of handling transactions, if you have the means of course to get started...

author
Ctraceur (author)2015-09-09

@ robertlee if you think you can turn $253 into $40,000 in 9 years (2015-2024), 8 if you consider it's almost 2016, you must be crazy. Currently the cost of setting up a mining system and running it for that period of time would far exceed your day to day gain. Furthermore, current bit coin predictions state it would take 10 years to make back your initial $1000 investment. This also doesn't consider operating costs, so in 10 years, mining bitcoins you COULD mine enough to exchange for the $1000 you initially spent on hardware. However unless you have free electricity, and free hardware upgrade/repair, you will be at a huge net loss.

author
KennethO5 (author)2015-09-08

Is there a Windows version of this part?

author
reusufzai (author)2015-09-01

And how many Antminer did you use to fetch those 20 bitcoins in 3 days ?

author
robertlee0707 (author)reusufzai2015-09-01

8 of them. In my other room, I have a 3 antminer s5, but they do nothing since I am waiting for their power supplies. Now for MONEY!!!