Professional Documents
Culture Documents
net/publication/339170604
CITATIONS READS
0 5,125
4 authors:
1 PUBLICATION 0 CITATIONS
MEA Engineering College
1 PUBLICATION 0 CITATIONS
SEE PROFILE
SEE PROFILE
All content following this page was uploaded by Raji C.G on 22 April 2020.
Abstract— Cryptocurrency, a form of digital currency is the implementation of a Cryptocurrency miner using Raspberry Pi
redistributed and open system that uses cryptography to reinforce combined with USB hash miners and with CG-Miner
security for the management of standard financial transactions. software. Not all Raspberry Pi has an inbuilt Wi-Fi to get
Administration of cryptocurrency mining demands significant hash access to the network. For the raspberry that has no inbuilt
functions which in turn necessitates a powerful rig. Here, we Wi-Fi module, ESP8266 module is used as the Wi-Fi module.
demonstrate the implementation of Cryptocurrency miner using
Raspberry Pi system integrated with USB hash miners and with a
With this compact device, one could mine Cryptocurrency
CG-Miner software, installed in the operating system. Provision of a with low power consumption and low cost. The mining
System on Single chips platform by Raspberry pi yields high practice is used to confirm and secure the transactions. The
compatibility, and the portable nature of the system assists the computational power that has been used are the power of CPU
convoluted process of mining to achieve new horizons. The in raspberry pi and a USB hash miner. A pool mining strategy
exponential rise of the cryptocurrency miners lead to the demand for is used in order to enhance the hashing output. The values that
an economical methodology for the mining process can be gratified are receive from the CG-Miner are hash rate, the
by the Raspberry pi mining technique which help to quench the cost cryptocurrency mined, these values are transferred to cloud
of the available systems providing a new cost effective and energy storage by accessing the internet. After transferring the data,
efficient technology.
mobile device can use a mobile view application for remote
monitoring. Unlike a traditional money exchange system,
Keywords— cryptocurrency; bitcoin; Raspberry Pi; CG Miner;
hashing
Bitcoin is a platform where there is no central administrator
and also no trust between the participants is required. [5]. All
I. INTRODUCTION the transaction details of Bitcoin exchange carried out by the
participants are stored in the database of the Blockchain
In the world of Cryptocurrency, Bitcoin bides as the most technology. It is an underlying technology that overcomes all
prominent one [1]. The man or group of people who invented the issues of traditional banking. The Blockchain technology
the Bitcoin in 2008 uses the name of Satoshi Nakamoto, and can described as a decentralized and unsettled data storage
in 2009 its source code released and was implemented as an were all the bitcoin transaction details are stored, and these
open source code [2]. The Bitcoin uses an end-to-end data are logically structured as a sequence of small blocks or
transaction scheme for transferring the electronic cash from chunks [6].
one system to another without using a centralized system.
Cryptocurrencies have developed as a huge economical In this work, we proposed the usage of Raspberry Pi as
computer-based system. These software systems are present the heart of the cryptocurrency mining procedure by the
on protected record like registers that contain data [3]. As incorporation of USB hash miners as the source of
other databases, mining the relevant data from database is computational power in the system and by using CG-Miner
important [4]. Through mining, we can enhance the past software for harnessing the computational algorithm from the
transactions to the distributed structure called as Blockchain hash miners. Here the result solely aims in the integration of
which enable the customers to obtain a safe and valid consent the concept of compact nature of Raspberry Pi and the
or every transaction [3]. This work proposes the principle of cryptocurrency mining.
II. SURVEY OF EXISTING SOLUTIONS methods even if the network is connected to a Tor network.
It was all started on January 2009; many were interested The authors stated that "the cost of the deanonymization attack
on the full Bitcoin network is under 1500 EUR" [14].
in the idea of the decentralization of a currency, as well as an
The Bitcoin mining is said to be the base of Bitcoin
economic model that is independent of government regulation
framework and it is said to be a computation intensive process
[7]. As such, in those early days, Bitcoin enthusiasts decided
which verifies the Bitcoin transactions [5]. We exploited the
to mine the currency and take part in securing the currency inherent tolerance to inaccuracy by proposing approximate
network by creating nodes. In 2010, up to 50 bitcoins could be mining circuits that trade off reliability with area and delay
mined per day with a PC which has an i7 Intel processor. But [5]. The result that was generated in the approximation mining
at that time, it was almost useless, as bitcoin's price around has the ability to increase its profits to 30%. In our study, with
$0.08. Miners had to pay more for the electricity than it took the help of a Raspberry Pi integrated with USB hash miners
to mine bitcoin. Mining with PCs gradually became inefficient and with the help of cg-miner software, we could implement a
because of the growth in the popularity of bitcoin and the rise Cryptocurrency miner in less cost and power consumption. In
in network difficulty [5]. Bitcoin enthusiasts began to realize the above existing systems, it is shown that the price of the
that high end graphics cards could process Bitcoin 's base system (Desktop/Laptop) that is required for mining is
cryptographic hashes at much higher speeds than CPU's [5]. above Rs 10,000. Whereas the base system (Raspberry Pi)
An inexpensive AMD motherboard has the capacity to proposed in this work costs only below Rs 4,000, this makes
suspend five GPUs via five PCI Express extender cables to the proposed system cheaper and compactable as Raspberry Pi
minimize the cost of motherboard, and also uses a large high- is much smaller than a PC or laptop. The electricity power that
efficiency power supply to power-up the GPUs [5]. a laptop consumes is about 20W TO 60W, whereas PC-
By June 2011, mining via Field Programmable Gate Desktop system consumes about 60W to 200W of electricity
Arrays (FPGAs) were preferred over GPU mining rigs, as depending upon the monitor that has been used. While in our
their electricity consumption was comparably lower [8]. proposed system, the total power consumed will be about 3W.
Mining bitcoin via FPGAs lasted no more than a year, as Out of this, only 2.5W of electricity is consumed by the
application specific integrated circuit miners were first offered Raspberry Pi. The remaining balance is consumed by USB
for sale on June 2012 by Butterfly Labs [8]. In 2017, Taylor et Hash Miner. This makes the whole system energy efficient.
al. found out that ASIC miners became the most powerful III. MATERIALS AND METHODS
cryptocurrency mining device on the market by the year 2013
For the setting of a Cryptocurrency miner, we need
[8]. Now, ASIC miners were used to mine both bitcoin and
altcoins, including Name coin, Grid coin, Ripple, Next, Raspberry Pi, ESP8266, USB Bitcoin Miner, CG-MINER,
Primecoin, Feather coin, Peercoin, and Swift coin [8]. In 2004, RASPBIAN operating system, LCD Touch Display.
Bentov et al. proposed a new problem of the existing protocol A. Raspberry Pi
in the work "Tragedy of the Commons", the cost of mining
The Raspberry Pi is a mini-sized computer that runs Linux
cannot be covered by the fees of the transactions of bitcoins
and it costs only somewhat little compared to other computers.
[9]. So, another activity protocol was developed for the
The Raspberry Pi also provides a set of GPIO pins which can
solution of this issue and to overachieve the power that is
be used to connect the Internet of Things (IoT) and control
needed to sync the transactions in a non-fashionable manner electronic components for physical computing [15]. There are
[9]. In 2014, a new Bitcoin protocol enhancement was two types of model in raspberry pi, model A and model B.
developed by Kumaresan and Bentov, which is used to Universal Serial Bus (USB) port is the main difference
captures the amount of computational power that is needed to between model A and model B. Model A board does not
authenticate the Bitcoin transactions [10]. include an Ethernet port and consumes less power. But the
model B board includes an Ethernet port and consumes less
In 2013, there was a study on Zero coins which is power.
another type of cryptocurrency for anonymous decentralized
transactions that was conducted by Sasson et al. [11]. Modern B. ESP8266
methodologies on the basis of quadratic arithmetic programs ESP8266 is a low-cost Wi-Fi microchip. The main use of
were applied as the protocol which resulted in prompt the ESP8266 is to connect the Raspberry pi to a Wi-Fi
verification and smaller proofs [11]. In 2011, Reid and network in order to set up an internet connection. Once the
Harrigan has conducted a research on cryptocurrencies and connection is established, we can send the data from the
analysed the anonymities in the Bitcoin network. The authors Raspberry pi to cloud, android application or any other
also stated that Bitcoin is one of the secured and one of the network as of our needs. Not every Raspberry Pi board needs
anonymous currencies [12]. By using the parallel computing the ESP8266 module to connect to the internet, the most
strategy Li et al. proposed the method to analyse transaction advanced models of the Raspberry Pi boards have inbuilt Wi-
and searching of transactions quicker and simple in a Bitcoin Fi module that can be used to connect to a network. The
network [13]. In 2014, Biryukov et al. proposed a method to ESP8266 module has the ability can be controlled even from a
remove the anonymity of user using network topology local Wi-Fi network or from the internet.
C. USB Bitcon Miner IV. IMPLEMENTATION
A USB Bitcoin Miner is a USB device that looks like a A. Steps for setting up the PIMiner
pen drive, which is specially built for mining purposes only.
Initially, to set up raspberry Pi, download the ZIP file of
When we connect our USB Bitcoin Miner to a system with the
Raspbian operating system. Then, copy that zip file into a
help of a suitable software, it can start mining at a certain hash
microSD card. Then we need to insert the microSD card into
rate [8]. We can use more than only a single USB Bitcoin
the microSD card holder that has been placed behind of
Miner to enhance the hashing output produced by the miners.
Raspberry Pi board. Plug the USB keyboard into one of the
Generally, if a system has only 2 to 4 USB ports, to connect
USB ports of Raspberry Pi. Then next step is to plug the
more than 2 to 4 USB Bitcoin Miners, we have to use USB
mouse and the keyboard into one of the USB ports of the
hub and that hub has to be connected to the system. The
Raspberry Pi. For checking whether the connection setup is
software that is compatible with the USB Bitcoin Miner is
correct or not, we should connect the raspberry pi to a monitor
CG-Miner MacMiner, Asteroid, MinePeon, and BFGMiner
or TV set and ensure it is set to the proper input. We used
[8].
GPIO pins to connect the touch display to the Raspberry Pi.
D. CG-Miner We must use certain codes in the command prompt to get full
CG-Miner is a software that has been written in C language access to the touch display. Then we have to connect an
and it is also an open source software that means the software Ethernet cable to our board for establishing the internet
is freely available on the internet. It run in both Windows and connection. Power-up the Raspberry Pi using a power supply.
Linux so it works as a cross platform software. The main So, by doing this, the Raspberry Pi will turn on and boot up
reason that the CG-Miner is so popular is because it is based Raspbian OS. If the whole connection is correct, a power
on the original CPU miner code. This software is developed indicating light will begin to blink, that means our initial setup
using SHA-256 and script algorithms, this software also have is complete. After the OS installation and plugging the
inbuild drivers for different mining hardware. This software peripherals, we need to install the CG-miner software for
has some inbuilt features such as live monitoring, fan speed starting the mining procedure. For installing the mining
control, overclocking the miner. It also has the capabilities to software on Raspberry Pi, we use the ethernet cable or Wi-Fi
support multiple miners or GPUs. The CG-Miner has the module to connect to our Raspberry Pi to internet. Once we
ability to detect new blocks with the help of mini-database that have been logged in, we have to ensure that all inbuilt
comes with the software itself. software and the operating system is up-to-date by entering the
following command in the SSH terminal:
E. RASPBIAN Operating System ―sudo apt-get update‖
Raspbian OS is an open-source software which is specially Installation of CG-miner's software dependencies is done
built for Raspberry Pi. The Raspbian OS comes with more using the command: "sudo apt-get install libusb-1.0-0-dev
than 35,000 package and also so many precompiled software libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-
in a format that is easy to install on Raspberry Pi hardware. dev" following completion of the update. After this command,
Raspbian OS is a Debian optimized operating system which the CG-Miner will be automatically installed in the raspberry
provides the best performance on the Raspberry Pi board. pi. After installing, the CG-Miner, we must plug the USB
Creation of the Raspbian OS was finished in June 2012, but it bitcoin miner to the USB port of the raspberry pi. This USB
is still undergoing development in order to improve the bitcoin miner is used to enhance the power of the mining hash
stability and its performance. rate. Bitcoin imposes throughput limits with its 10-min
average block time and fixed 1-megabyte block size. Were as
F. Raspberry Pi Touch Display in other cryptocurrencies the is no any fixed block size [17].
It is an LCD display that we connect to our Raspberry Pi So, for starting mining we should open the CG-miner software
using a display Serial Interface connector also known as DSI using SSH command and input the user id and password of the
connector, or by using the General-Purpose Input/output pins. mining pool. Then, the software will automatically start the
There is also an alternate option to connect our LCD display, mining. By using the help of the IoT device (ESP8266) to
by using the HDMI cables. The DSI displays are specially collect the mining data from the raspberry pi that is the mining
designed for the Raspberry Pi models that have inbuilt hash rates, and the amount of cryptocurrency mined in
mounting holes in HAT footprint on the board. The Raspberry Satoshi. These data's will be directly transformed in to the
Pi comes in different models, not all model supports the touch cloud storage. And those data's will be kept as a table. The
display. This is because different models come in different data stored in the cloud storage can be directly accessed by the
designs. The LCD display have the best viewing angle while user using an android application in the mobile phone. The
considering other displays and depending how the LCD screen cloud data is directly transferred to the mobile application. By
has been mounted, and sometimes we need to change the using this application, the user can monitor the Pi-miner from
orientation of the LCD display for getting the best output anywhere with the help of the internet.
result [16].
B. Circuit Diagram
The Fig. 1. shows the circuit connection of the
Raspberry Pi miner. The male GPIO pins of the raspberry pi
(from 1 to 20) is directly connected to the female pins of the The initial step to start the mining procedure is to
LCD display. It includes 3v3 pin, 5v pin, ground pin and all connect all required components to Raspberry Pi which is
other Input/output pins. Since our system only uses a single represented in Fig.2. Next step is to open the terminal menu
USB Miner, we don’t have a reason to use the USB hub. So, and start the CGH-Miner software. The home screen of the
we connect the USH hash miner to one of the USB ports of software shows the area to login our pool account. Then CG-
Raspberry Pi. In order to start our mining procedure, we need Miner itself starts to harness the computational power of USB
a network connection for that we use an Ethernet cable (RJ45) miner to start the mining. The USB Hash miner has its own
or we use the Wi-Fi module to connect to Internet. The Wi-Fi wallet to keep the balance hash value that hasn’t been fully
using in this circuit is ES08266. The ESP8266 module mined from a block. These values help the software to find
consists of 4 pins that is VCC, Ground, Rx, Tx. The VCC pin and finish mining the unfinished block. The values that we get
is connected to the 3.3V of Raspberry Pi, Ground pin of Wi-Fi from mining are sent to the cloud storage of our pool using a
to the Ground pin of Raspberry Pi, Rx pin of Wi-Fi module to Wi-Fi module or an ethernet cable. And those values can be
the Tx of Raspberry Pi and Tx pin of Wi-Fi module to the Rx monitored using a mobile view application.
of Raspberry Pi. The data that is collected from mining that is
hash rates produced and the mined values of cryptocurrency V. RESULTS AND DISCUSSIONS
are send to the cloud storage of the Slush Pool account. The A. Performance of Bitcoin Mining with respect to hash rate
Mining System that has been developed uses pool mining and power consumption
technique. The pool account that has been used is the Slush
After the exponential growth of cryptocurrency trading
Pool.
especially Bitcoin trading, the price of every cryptocurrency is
increasing and decreasing without a proper standard. In 2013,
the price of the cryptocurrency is only 124 USD (Rs 7000),
but after then, the trading increases and value also increases.
In 2017, the price was increased to 17000 USD (Rs 12 lakh).
And right now, to the price has decreased to 5700 USD (Rs
3.8 lakh), this huge variation in the price of the cryptocurrency
is because it is in still development phase and nascent stage.
When there is a massive trade in cryptocurrency for the
commodity the price of the cryptocurrency increases and vice
versa.
Fig. 3. Graph between hash rate produced and number of USB miners Fig.4. Graph between power consumption and number of USB miners