Bitcoin Mining with a Raspberry Pi and an Antminer USB

Have a spare Raspberry Pi and want to do some bitcoin mining? This guide will show you how to get started mining Bitcoins.

By Tim TrottRaspberry Pi Projects • January 14, 2018
Bitcoin Mining with a Raspberry Pi and an Antminer USB

Raspberry Pi, in combination with a USB ASIC miner chip, makes a good Bitcoin miner (PiMiner) due to its low power usage and ease of configuration. ASIC devices are specialised computing processors specific to the SHA256 algorithm used in Bitcoin hashes. They are much more efficient than pure CPU computations. The Raspberry Pi is a very cheap and efficient way to control and monitor devices that are better suited to mining Bitcoins.

Raspberry Pi Bitcoin Mining with AntMiner U2
Raspberry Pi Bitcoin Mining with AntMiner U2

Since this guide was written, the difficulty involved in mining Bitcoin has increased significantly. The techniques presented here are no longer profitable, and you will spend more on electricity than you would ever have hoped to gain through mining. When I fired up my miner to update this, the estimated payout was 108 years for 0.0001 Bitcoin. This is for information purposes only.

To get started mining Bitcoins with a Raspberry Pi and an Antminer U2 USB ASIC device, you will also need the following:

  1. A Pool Account (Recommended: SlushPool.com)
  2. A BitCoin Wallet
  3. Powered USB Hub (Optional for Pi3, Required for

Firstly, you need to get a pool account. For SlushPool, head to the website and register for a free account. Once logged in, you will find your worker details under the dashboard. We'll use these later.

Next, you need to download the latest and Flash Raspberry Pi Raspbian OS onto an SD card.

Once booted up, you must install a few development packages and the mining software.

sudo apt-get install build-essential libtool libcurl4-openssl-dev libjansson-dev libudev-dev libncurses5-dev autoconf automake

Next, we install the Bitcoin mining software:

sudo apt-get install bfgminer

Finally, we can launch the mining software and start mining some Bitcoins.

bfgminer -S all -o stratum+tcp://eu.stratum.slushpool.com:3333 -u <username.workernumber> -p x

Where is the details from the Slushpool worker configuration.

If everything is plugged in correctly, bfgminer should automatically recognise the miners and start mining. Depending on which version of Antminer you have, you will see the speed and hash rates shown on the screen. Antminer U2 should be around 1.6Gh/s.

The three-speed numbers indicate the last 5s average speed, the All-Time Average (for this program run) and the Effective Average (actual performance taking into account failures, etc).

Is Bitcoin Mining with a Raspberry Pi Worth It?

While you won't get rich running a single Raspberry Pi Bitcoin Rig, you can learn about cryptocurrency, mining and, of course, the Raspberry Pi. As a tool for education, this can help you decide if you wish to invest in more appropriate equipment to mine cryptocurrency.

The difficulty involved in mining Bitcoin has increased significantly, so you need specialist ASIC Bitcoin Miner hardware running 24/7. It just isn't practical to use a Raspberry Pi Anymore.

Idea: Why not try Bitcoin mining on a Raspberry Pi cluster and learn cluster computing?

Related ArticlesThese articles may also be of interest to you

CommentsShare your thoughts in the comments below

My website and its content are free to use without the clutter of adverts, popups, marketing messages or anything else like that. If you enjoyed reading this article, or it helped you in some way, all I ask in return is you leave a comment below or share this page with your friends. Thank you.

This post has 2 comments. Why not join the discussion!

New comments for this post are currently closed.