Close

Talking about the design

A project log for STM32Miner

Mining cryptocurrency with a lot of STM32F030

ho-tuan-kietHo Tuan Kiet 07/02/2018 at 18:250 Comments

While waiting for the replacement chips to come, I guess I should write about the design and structure of this project. The main reason is that I've though of that for a while, and writing it down makes sure that I know what to do next.

What we're doing right now is to build a cluster of uC for the purpose of mining cryptocurrencies. To achieve that aim, the cluster shall consist of two main parts:

The controller board acts as a job scheduler. Basically, it receives work from the pool (via Ethernet port), then splits it up into multiple jobs, then distributes them to the hashing boards (explained below). When a nonce is found, the controller shall collect the result and send it back to the pool. Also, it shall monitor the health status of the hashing boards and display them onto an LCD screen. In case the hashing algorithm needs to change, the controller shall be able to reflash the entire hashing boards.

The controller board will receive +12V from an external power supply. This power source is then used to power the controller board and all hashing boards attached to it. On the controller board, there shall be up to 16 4-pin connectors which is used to attach the hashing boards, consisted of +12V, GND, SDA, SCL (for I2C communication). Do notice that the hashing boards shall consume a lot of power (say 1A).

Each hashing board is consisted of a manager MCU (any 48 pins STM32), and up to 64 worker MCUs (STM32F030F4P6/GD32F330F4P6). The manager receives jobs from the controller board, then divides it even further, and pushed them to the workers. The manager also handles the job of monitoring the status of the workers, and to provide the controller with that information. Even further, the manager shall be able to reflash all worker MCUs (using a firmware supplied from the controller) This allows for the cluster to change the hashing algorithm depending on the coins being mined. The reflash shall be done by using the UART bootloader on the worker uC. Communication is done using I2C. 

A complete cluster shall be consisted of one controller board, and up to 16 hashing boards, stacked on top of each other.

Discussions