Crypto-Mining With the DUCO-Miners

by makervinod in Circuits > Microcontrollers

11805 Views, 19 Favorites, 0 Comments

Crypto-Mining With the DUCO-Miners

The DUCO-Miners - Mining the simplest Crypto-currency - Duino Coin

Have you ever heard about Crypto-Currency Mining using Arduino, ESP8266, ESP32, or Raspberry Pi? Yes, that's true. Now you can mine crypto-currency using such devices !! Indeed amazing !!

Introducing DUCO (Duino-Coin), a fully original, transparent, centralized, eco-friendly crypto coin project that focuses on energy-efficient mining using low-powered embedded devices. It uses a reward system named 'Kolka System' in which low-power devices benefit the most.

This enables us to mine Duino Coin without any high investments !! Seriously !! You won't become a millionaire by mining Duino Coin, that's for sure. But it's a great starting point for those who want to start their crypto-mining journey without any heavy investments in mining devices such as ASIC Miners or expensive graphic cards. It's a fun project to get started on the crypto-mining journey and who knows someday, Duino Coin may make you a billionaire...!!! So, let's get started immediately !!


About Duino-Coin: (Official Website)

The Duino-Coin algorithm (DUCO-S1) is based on the SHA1 hash chain. Each miner device is rewarded for each mined share based on the previous one. The miner asks for the job from one of the nodes and receives an expected hash, hash of the last block & difficulty. The miner needs to find a valid nonce that gets appended to the previous block hash so that after hashing it again it produces the expected hash. When a valid hash gets found, the miner submits the nonce result to the node. The server then takes care of the results and rewards by calculating them with the Kolka system.

If you want to know more about the origin & concept of Duino Coin, refer to the project whitepaper: Link


About the Duco-Miners:

In this project, we use a Master-Slave approach, wherein, the Master communicates with the Slave devices via I2C & controls the Mining Jobs provided by the Duino Coin Server. All of these sit on a Baseboard or a rack which provides a stackable configuration for multiple parallel baseboards. A single baseboard or a rack can hold up to 11 devices in combinations of:

  1. 1 Master(ESP32) + 10 Slaves(AVR)
  2. 11 independent Miners (ESP32)

The DUCO-Miner Rack can be stacked in multiple quantities to increase the throughput (But beware of the Kolka system). Multiple independent ESP32-Miners in one single Rack can give a large throughput in terms of hash rate. The preferred configuration is to use 1 x ESP32 Miner + 10 x AVR Miners on one Miner Baseboard. We will be exploring this configuration throughout this Instructable.

So, let's get started on this amazing project without wasting any more time !!


Supplies

IMG_20220508_194228.jpg
IMG_20220508_201051.jpg
IMG_20220508_195045_1.jpg
IMG_20220508_200845.jpg
  • Miner Rack Setup:
  • AVR Miner Boards x 10
  • ESP32 Miner Board x 1
  • Common Miner Baseboard x 1
  • 5V 1A DC power supply
  • Connecting wires
  • A PC or Laptop to upload the code to the devices
  • USB to Serial Converter (CH340 or CP2102, etc based)
  • USBasp programmer or Arduino Uno/Nano Board as ISP Programmer


You can purchase any components that you require through the following links (and support me as well):

Buying Links (Affiliate links):


I have mentioned the self-assembly method to build these Miner PCBs right from scratch in the following steps.

Update: You can get all the PCBs fabricated + assembled from PCBWay: https://www.pcbway.com/project/shareproject/DUCO_Miners_a67cdb4b.html

Pre-Requisites

ESP32 MINER PCB.jpg
ATMEGA MINER PCB.jpg
CMD PCB.jpg
IMG_20220407_200349_1.jpg
IMG_20220407_200627.jpg

This step provides instructions about the assembly of the Miner Boards from scratch on your own. Before you get started with this step, you need to ensure that you have:

  1. Good SMD Soldering Skills
  2. A Hot-Air Soldering Machine or Soldering Hotplate or Reflow Oven
  3. Solder-Paste for SMD Soldering
  4. All the required PCBs & Components


PCB Design Files: All the required PCB design files (KiCAD Project Files) for every board can be found here:

  1. ESP32 Miner Board: https://github.com/Duco-Miner/ESP32-Miner
  2. AVR Miner Board: https://github.com/Duco-Miner/AVR-Miner
  3. Common Miner Baseboard: https://github.com/Duco-Miner/Common-Miner-Baseboard

Feel free to modify the PCB designs as per your needs !!


PCBs: You would be required to fabricate the PCBs from your preferred PCB fabrication vendor.

Components: You can find the list of required components in the KiCAD project's schematic file & also in the README.md file of every project.


Note: The AVR Miner Board supports Atmega328 as well as Atmega8 as the main controller. You can choose either of them. The Mining rate of the Atmega8 is a little less than the Atmega328 due to the low memory size of the Atmega8 but is less expensive than the Atmega328.


Once you are good with the pre-requisites, let's move on to the next step.

Assembling the Miners !

The AVR Miner Board - PCB Assembly & Soldering
The ESP32 Miner Board - PCB Assembly & Soldering
The Miner Baseboard - PCB Assembly & Soldering

I had soldered the components for all the PCBs using my new Soldering Hotplate.

Check out the assembly & soldering videos for the Duco Miner PCBs above.

LED Status Indicator Configurations

ATMEGA MINER BACK PCB.jpg
ESP32 MINER BACK PCB.jpg

All the Miner boards have an onboard LED for status indication. Also, the Common Miner Baseboard has onboard LEDs for a convenient status indication of the MIners.

You can choose between the onboard LED or baseboard LEDs to use for status output. The AVR-Miner Board & the ESP32-Miner Board have jumper pads at the back which can be shorted/connected to achieve the desired status LED configuration.

By default all the jumpers are open, so you won't be able to see any output via the status LEDs.


Following are the Jumper configurations:

1) AVR-Miner Board

LED Configuration Jumper: JP1

  • Short Pads 1 & 2 for onboard LED
  • Short Pads 2 & 3 for baseboard LED
  • Short all pads for both onboard & baseboard LEDs


2) ESP32-Miner Board

LED Configuration Jumper: JP1

  • Short Pads 1 & 2 for onboard LED
  • Short Pads 2 & 3 for baseboard LED
  • Short all pads for both onboard & baseboard LEDs

Some More Configurations

FQ6PX90L3K65PQ6.jpg
CMD BACK PCB.jpg

The ESP32 Miner Board & the Common Miner Baseboard have more additional configuration options.


1) ESP32-Miner Board

  • When using the ESP32-Miner Board as a Master for the AVR-Miner Slaves, short/connect the Pads for R3 & R4
  • When using the ESP32-MIner Board as a standalone miner, disconnect the Pads for R3 & R4.


2) Common Miner Baseboard

  • Short the Pads for R12 & R13, in order to communicate with the other expansion boards via I2C.
  • Disconnect the Pads for R12 & R13, in order to have the Baseboard as an independent one in the stack of multiple Baseboards.

Important One !

DuinoCoinWallet.jpg

Before we upload the code to the boards, you need to create an account/wallet on the official Duino Coin website: https://wallet.duinocoin.com/register

You can follow the instructions mentioned here: https://duinocoin.com/getting-started#register


Once, everything is done, make a note of your username for the Duino Coin wallet. We will need this in the next step while uploading the code.

Uploading the Code !

ESP32 Upload.jpg
10pin to 6pin.jpg
IMG_20220509_140807.jpg
AVR Upload.jpg
CODE1.jpg

The ESP32-Miner & all the AVR-Miners are required to be programmed before we go anything further. The required program codes are uploaded to the respective GitHub Repositories as follows:

1) ESP32 - MIner Code: https://github.com/Duco-Miner/ESP32-Miner-Code

2) AVR - Miner Code: https://github.com/Duco-Miner/AVR-Miner-Code

Contributions are always appreciated !!!


Uploading the code to the ESP32-Miner:

Don't forget to change the WiFi Network Details & your Duino Coin wallet username in the ESP32 Miner code or else you won't earn anything!

Once done, upload the code to the ESP32. You will need to connect the ESP32-Miner Board using a CP2102 USB to the Serial Converter (I used this converter) for uploading the code. The converter can be directly inserted in the programming header connector holes. You might need to hold it under light force, to maintain the contacts between the ESP32-Miner & the CP2102 USB to Serial Converter while uploading is in progress Also, make sure you put the ESP32-Miner in Boot Mode before you start uploading, by pressing the BOOT Button & RESET Button simultaneously on the ESP32-Miner & then releasing the RESET Button first & then the BOOT Button.

Hit the Upload Button on Arduino IDE & you are done !!!


Uploading the code to the AVR-Miner:

To upload the code to the AVR-Miner Board, I used a USBasp Programmer to program the microcontroller via ISP programming pins. You can also use an Arduino UNO or Nano board as a programmer. Check out this tutorial for reference: (https://www.instructables.com/Turn-Your-Arduino-Into-an-ISP)

I also built a 10-pin to 6-pin ISP connector for connecting the USBasp to the AVR Miner Board.

Make sure you connect the ISP pins correctly. Refer to the KiCAD project files for understanding the pin notations.

1) The first step is to burn the bootloader to the controller for setting the clock configuration. If you are using a controller with a pre-loaded bootloader you may skip uploading the bootloader to it. Select the appropriate Board Name from the Tools menu as per the microcontroller used on AVR-Miner Board. For example: If the AVR-Miner has Atmega328 on to it, so you may select the Board as Arduino Nano. If it is Atmega8, then you may select Arduino NG (Atmega8).

2) Select the Upload Using Programmer option from the Sketch menu to upload the respective code to the AVR-Miner. Make sure you change the I2C address in the code for every different AVR-Miner Board.



Note: Currently the ESP32 supports a maximum of 10 salves/client connections. So, there's a limit on the maximum number of devices that can be attached to one single ESP32.

Assemble Them All !!!

The DUCO Miners - Assembly on the Miner Baseboard
  • The Common Miner Baseboard has got 11 female headers which can handle a maximum of 11 Miner Boards.
  • You can have a combination of 1 ESP32-Miner + 10 AVR-Miners or 11 ESP32 Miners on one Common Miner Baseboard.
  • We'll go with the first combination, viz., 1 ESP32-Miner + 10 AVR-Miners

1) Insert all the programmed 10 AVR Miners into the headers of the Common Miner Baseboard one by one.

2) Finally, insert the ESP32-Miner into the Common Miner Baseboard.

3) Connect the 5V DC SMPS/Power Supply Connections to the Common Miner Baseboard via the screw terminals.

4) That's all !!

Powering It Up !

The DUCO Miners - Powering Up !!!

Time for Action !!!

Turn on the power & watch the boards start mining Duino Coin!

It might take some while to establish the connection, but you could see the LEDs flashing on the board once connected.

Open up your Duino Coin wallet account to see your Miners online. The status of the Miners on the Duino Coin interface keeps auto-updating.


Happy Mining !!!


Congratulations !!! You made it into the Crypto-currency Mining Journey !!!

Thanks for checking out this Instructable !!!

I hope you liked it !!!