Skip to content
 
 

Repository files navigation

NerdSoloMiner

The NerdSoloMiner v2

This is a free and open source project that let you try to reach a bitcoin block with a small piece of hardware.

The main aim of this project is to let you learn more about minery and to have a beautiful piece of hardware in your desktop.

Original project https://github.com/valerio-vaccaro/HAN

image

About this fork

This fork ports NerdMiner v2 to the LILYGO T-Display S3 AMOLED Plus (the "1.91 Plus" board).

This board is frequently confused with the classic 1.91" model, but it differs in several ways that matter for the firmware:

Feature Classic 1.91" AMOLED AMOLED Plus (this fork)
Display interface QSPI (D0-D3) 4-wire SPI (191_SPI profile)
Display pins 18 / 7 / 48 / 5 / 47 / 6 / 17 MOSI=18, DC=7, SCK=47, CS=6, RST=17 (TE=9)
Panel power internal DCDC (OVSS regs) GPIO38 enables the panel; ELVDD/ELVSS supplied by the AXPM65611 PMU
Touch CST816T on I2C (3,2) IRQ=21 same CST816T on I2C (3,2) IRQ=21
Extras - AXPM65611 + BQ25896 PMU, PCF85063ATL RTC, TF card slot, LoRa module, 2x STEMMA QT

The display uses the SPI variant of the rm67162 driver (LCD_USB_QSPI_DREVER 0) with an init sequence that mirrors the official LilyGO rm67162_spi_cmd — notably it does not program OVSS registers, because the OLED rails come from the board's PMU. The QSPI pins used by the classic board (D2=GPIO48, D3=GPIO5) are not connected on the Plus and are left unused.

Touch is handled by a dedicated CST816T driver (src/TouchHandlerCST816.*) that shares the classic board's I2C bus (SDA=3, SCL=2, IRQ=21) with the PMU and RTC. It reports tap/zone and swipe gestures (swipe left/right switches screens, tap/up/down toggles the screen), with ISR-based reading and 300 ms debounce.

Build

Two PlatformIO environments are provided under the NerdminerV2 project root:

Environment Macro Description
NerdminerV2-S3-AMOLED -DTOUCH=0 Display only
NerdminerV2-S3-AMOLED-TOUCH -DTOUCH=1 Display + CST816T touch
cd NerdMiner_v2-main
python3 -m platformio run -e NerdminerV2-S3-AMOLED-TOUCH

Optionally include a board profile so the lilygo-t-amoled board is resolved from any project:

cp -r boards/lilygo-t-amoled.json ~/.platformio/boards/

Flash

python3 -m platformio run -e NerdminerV2-S3-AMOLED-TOUCH -t upload --upload-port /dev/ttyACM0
python3 -m platformio device monitor --port /dev/ttyACM0 --baud 115200

Upload speed is set to 460800 (the default 921600 can be unstable on this board). On Linux, make sure your user is in the dialout group.

Note for Plus owners: if the app boots (the "NerdMiner" WiFi AP appears) but the screen stays blank, the board is being driven in QSPI mode — the Plus only works in the SPI profile above.

Requirements

  • TTGO T-Display S3 or any supported boards (check Build tutorial 👇)
  • 3D BOX here

Project description

ESP32 implementing Stratum protocol to mine on solo pool. Pool can be changed but originally works with public-pool.io (where Nerdminers are supported).

This project was initialy developed using ESP32-S3, but currently support other boards. It uses WifiManager to modify miner settings and save them to SPIFF. The microMiner comes with several screens to monitor it's working procedure and also to show you network mining stats. Currently includes:

  • NerdMiner Screen > Mining data of Nerdminer
  • ClockMiner Screen > Fashion style clock miner
  • GlobalStats Screen > Global minery stats and relevant data

This miner is multicore and multithreads, both cores are used to mine and several threads are used to implementing stratum work and wifi stuff. Every time an stratum job notification is received miner update its current work to not create stale shares.

IMPORTANT Miner is not seen by all standard pools due to its low share difficulty. You can check miner work remotely using specific pools specified down or seeing logs via UART.

Current project is still in developement and more features will be added

Build Tutorial

Hardware requirements

  • LILYGO T-Display S3 (original one) or any other supported boards
  • 3D BOX here

Current Supported Boards

*Affiliate links

Flash firmware

microMiners Flashtool [Recommended]

Easyiest way to flash firmware. Build your own miner using the folowing firwmare flash tool:

  1. Get a TTGO T-display S3 or any other supported board
  2. Go to NM2 flasher online: https://flasher.bitronics.store/ (recommend via Google Chrome incognito mode)

Standard tool

Create your own miner using the online firwmare flash tool ESPtool and one of the binary files that you will find in the bin folder. If you want you can compile the entire project using Arduino, PlatformIO or Expressif IDF.

  1. Get a TTGO T-display S3 or any supported board
  2. Download this repository
  3. Go to ESPtool online: https://espressif.github.io/esptool-js/
  4. Load the firmware with the binary from one of the sub-folders of bin corresponding to your board.
  5. Plug your board and select each file from the sub-folder (.bin files).

Update firmware

Update NerdMiner firmware following same flashing steps but only using the file 0x10000_firmware.bin.

Build troubleshooting

  1. Online ESP Tool works with chrome, chromium, brave
  2. ESPtool recommendations: use 115200bps
  3. Build errors > If during firmware download upload stops, it's recommended to enter the board in boot mode. Unplug cable, hold right bottom button and then plug cable. Try programming
  4. In extreme case you can "Erase all flash" on ESPtool to clean all current configuration before uploading firmware. There has been cases that experimented Wifi failures until this was made.
  5. In case of ESP32-WROOM Boards, could be necessary to put your board on boot mode. Hold boot button, press reset button and then program.

NerdMiner configuration

After programming, you will only need to setup your Wifi and BTC address.

Note: when BTC address of your selected wallet is not provided, mining will not be started.

Wifi Accesspoint

  1. Connect to NerdMinerAP

    • AP: NerdMinerAP
    • PASS: MineYourCoins
  2. Set up your Wifi Network

  3. Add your BTC address

  4. Change the password if needed

    • If you are using public-pool.io and you want to set a custom name to your worker you can append a string with format .yourworkername to the address

SD card (if available)

  1. Format a SD card using Fat32.
  2. Create a file named "config.json" in your card's root, containing the the following structure. Adjust the settings to your needs:
{
  "SSID": "myWifiSSID",
  "WifiPW": "myWifiPassword",
  "PoolUrl": "public-pool.io",
  "PoolPort": 3333,
  "PoolPassword": "x",
  "BtcWallet": "walletID",
  "Timezone": 2,
  "SaveStats": false
}
  1. Insert the SD card.
  2. Hold down the "reset configurations" button as described below to reset the configurations and/or boot without settings in your nvmemory.
  3. Power down to remove the SD card. It is not needed for mining.

Pool selection

Recommended low difficulty share pools:

Pool URL Port Web URL Status
public-pool.io 3333 https://web.public-pool.io Open Source Solo Bitcoin Mining Pool supporting open source miners
pool.nerdminers.org 3333 https://nerdminers.org The official Nerdminer pool site - Mantained by @golden-guy
pool.nerdminer.io 3333 https://nerdminer.io Mantained by CHMEX
pool.pyblock.xyz 3333 https://pool.pyblock.xyz/ Mantained by curly60e
pool.sethforprivacy.com 3333 https://pool.sethforprivacy.com/ Mantained by @sethforprivacy - public-pool fork
pool.stompi.de 3333 http://web.stompi.de Mantained by @odinstar - public-pool fork
pool.solomining.de 3333 https://pool.solomining.de/ Mantained by https://x.com/solo_mining

Other standard pools not compatible with low difficulty share:

Pool URL Port Web URL
solo.ckpool.org 3333 https://solo.ckpool.org/
btc.zsolo.bid 6057 https://zsolo.bid/en/btc-solo-mining-pool
eu.stratum.slushpool.com 3333 https://braiins.com/pool

Buttons

One button devices:

  • One click > change screen.
  • Double click > change screen orientation.
  • Tripple click > turn the screen off and on again.
  • Hold 5 seconds > reset the configurations and reboot your NerdMiner.

Two button devices:

With the USB-C port to the right:

TOP BUTTON

  • One click > change screen.
  • Hold 5 seconds > top right button to reset the configurations and reboot your NerdMiner.
  • Hold and power up > enter configuration mode and edit current config via Wifi. You could change your settings or verify them.

BOTTOM BUTTON

  • One Click > turn the screen off and on again
  • Double click > change orientation (default is USB-C to the right)

Build video

Ver video aquí

Developers

Project guidelines

  • Current project was adapted to work with PlatformIO
  • Current project works with ESP32-S3 and ESP32-wroom.
  • Partition squeme should be build as huge app
  • All libraries needed shown on platform.ini

Job done

  • Move project to platformIO
  • Bug rectangle on screen when 1milion shares
  • Bug memory leaks
  • Bug Reboots when received JSON contains some null values
  • Implement midstate sha256
  • Bug Wificlient DNS unresolved on Wifi.h
  • Code refactoring
  • Add blockHeight to screen
  • Add clock to show current time
  • Add new screen with global mining stats
  • Add pool support for low difficulty miners
  • Add best difficulty on miner screen
  • Add suport to standard ESP32 dev-kit / ESP32-WROOM
  • Code changes to support adding multiple boards
  • Add support to TTGO T-display 1.14
  • Add support to Amoled

In process

  • Create a daisy chain protocol via UART or I2C to support ESP32 hashboards
  • Create new screen like clockMiner but with BTC price
  • Add support to control BM1397
  • Add password field in web configuration form

Donations/Project contributions

If you would like to contribute and help dev team with this project you can send a donation to the following LN address ⚡teamnerdminer@getalby.com⚡ or using one of the affiliate links above.

If you want to order a fully assembled Nerdminer you can contribute to my job at 🛒bitronics.store🛒

Enjoy

About

NerdMiner v2 for the LILYGO T-Display S3 AMOLED Plus (SPI display + CST816T touch)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages