mirror of
https://github.com/skot/bitaxe.git
synced 2025-03-18 13:51:42 +01:00
4.8 KiB
4.8 KiB
The bitaxeMax!
an early-stage experimental bitcoin mining machine. Uses a single Bitmain BM1397 ASIC (chip).
BM1397
- The BM1397 is a undocumented SHA256 mining ASIC from Bitmain. It's mostly used in the Antminer S17
- Bitmain claims the BM1397 has 0.03J/GH efficiency
- The BM1397 is available (new) for around $20 each in low quantities from Aliexpress
- I have seen some used BM1397 sellers; DYOR
- HYG SRong -- $4.66 @ QTY 10 w/ shipping (US)
- BTC Zone -- $6 @ QTY 10 w/ shipping (US)
- punuo-ic -- $6.16 @ QTY 1 w/ shipping (US)
- Lucky tool parts -- $12.31 @ QTY 1 w/o shiping (DE)
- I have seen some used BM1397 sellers; DYOR
- Choose your BM1397 version: Guide here
- The BM1397 has the same footprint as the BM1387, but a very different pinout.
- It also has two "Modes" that change some of the signal pins around to make chaining easy
Current Status
- Parts and PCBs have arrived and I have assembled two of these! Everything seems to fit. No smoke. Haven't tested mining yet.
Hardware
- BM1397 from random AliExpress seller. I got the "AG" variant. Not really sure what the difference is.
- 40x40mm heatsink and 5V fan from a random AliExpress seller. At least half of these arrived broken in some way. But they are cheap and the working ones do keep the BM1387's nice and cool when used with some thermal compound.
- The BM1397 serial port is 1.8V. These pins are broken out, but the main idea is to communicate with the BM1397 from the ESP32
- I added level shifters for the interface with the ESP32-C3 (Because it has 3.3V GPIOs)
- I added a NCT218 so that the BM1397 core temperature can be read out over I2C
- NCT218 are pretty hard to come by these days. Maybe a replacement is needed.
- KiCad 6 design files
- All of the parts on the board are listed in the KiCad BOM
Software
- still TBD
Connections
Board IO
Pin Name | Description |
---|---|
VIN | ASIC VIN - ASIC core voltage. Rumor has it this should be around 1.5V for the the BM1397. This needs more experimentation. |
+5V | 5V input gets regulated to 1.8V and 0.8V for the BM1397. Also 5V for Fan output. Not much current required. If the ESP32 is powered by USB, you don't need to power this. |
+5V (Fan) | 5V output for fan . |
SPD (Fan) | Speed input from fan. |
VIO | ESP32-C3 GPIO voltage (3.3V) |
RXI | 1.8V Serial input |
TXO | 1.8V Serial output |
RST | Inverted reset pin to the first BM1397. Unsure how necessary this is. |
GND | Common ground |
ESP32 IO
Signal | ESP32 Pin | Description |
---|---|---|
FAN_TACH | GPIO4 | Fan Speed output |
TEMP_ALRT | GPIO9 | NCT218 Alert output |
SCL | GPIO18 | I2C Clock (NCT218) |
SDA | GPIO19 | I2C Data (NCT218) |
RX | GPIO2 | BM1397 RO |
TX | GPIO3 | BM1397 CI |
RST | GPIO10 | BM1397 NRSTI |
Goals
- Develop some firmware for the ESP32 to connect to a stratum server/pool over WiFi and get work for the mining ASIC
- Firmware should monitor fan speed
- Firmware should monitor BM1397 core temperature (via NCT218)
- Firmware should tune each BM1397 by adjusting it's core voltage
- Put a high current, low voltage buck regulator on the board that the ESP32 can adjust the voltage of.
- This might be something like the TPS40305. I've made a separate prototype PCB of that power supply
- One way to adjust the output voltage of these power supplies is with a current-output DAC. The Maxim DS4432 seems purpose built for this kind of thing.
- Develop some software in Rust to getblocktemplate from a bitcoin node and communicate work to a fleet of bitaxes.
- This would be like mining pool software. Maybe Stratum V2 would work for this?
- add an onboard power sensor so we can set the hashrate (ASIC requency) and therefore current to extract maximum power from a solar panel.