developeralgo
Member
Offline
Activity: 63
Merit: 72
|
|
January 15, 2023, 07:40:06 PM |
|
And of course I picked GPIO46 for I2C SDA, so it's pulled high. https://github.com/skot/bitaxe/issues/18After removing the SDA I2C pull-up resistor I can program the ESP32 with ESP-Prog, so that's good news! Skot, did you manage when testing and sniffing the communication between BM1397 and ESP32-S3 Module to send a test mining job/work using the ESP32-S3 Pins ? Which pins did you use on ESP32-S3 module to communicate/Send and receive to BM1397 Chips? Trying to quickly perform just a quick test to see what BM1397 chip responds as per your sniffing notes https://github.com/skot/ESP-Miner/blob/master/bm1397_protocol.md
|
|
|
|
developeralgo
Member
Offline
Activity: 63
Merit: 72
|
|
January 15, 2023, 09:08:27 PM |
|
After removing the SDA I2C pull-up resistor I can program the ESP32 with ESP-Prog, so that's good news!
FYI, i did test and try to flash it , 1. When i connect ESP32-S3 Pin-15 to SDA I2C pull-resistor as you described ? i tested one of my 1-chip Bitaxe_V2 board and it has the same behaviour as before where i could not flash it. 2. When i disconnected the airwire from R19 over to pin 15 on the ESP32 (pink line). i was able to flash the ESP32-S3 without actually pressing the reset button. i know that ESP32-S3 with ESP-PROG it can automatically pull-down when flashing , so you don't have to press the boot and reset buttons manually. is this a strange behaviour ?
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 15, 2023, 09:39:06 PM |
|
But passive cooling reducing power draw is actually wrong. A fan uses almost no energy at all, meanwhile passively cooled, the chip would run hotter, causing it to again draw more power. These chips like being as cool as possible. You can even get into thermal runaway because of this: too hot > more power draw > gets hotter > even more power draw > even hotter...
It would be underwhelming hash wise, but I suppose you could use the internal temperature sensor on the BM1397 and adjust the hash frequency and core voltage until the miner is stable with whatever passive cooling..
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 16, 2023, 05:10:17 AM |
|
After removing the SDA I2C pull-up resistor I can program the ESP32 with ESP-Prog, so that's good news!
FYI, i did test and try to flash it , 1. When i connect ESP32-S3 Pin-15 to SDA I2C pull-resistor as you described ? i tested one of my 1-chip Bitaxe_V2 board and it has the same behaviour as before where i could not flash it. 2. When i disconnected the airwire from R19 over to pin 15 on the ESP32 (pink line). i was able to flash the ESP32-S3 without actually pressing the reset button. i know that ESP32-S3 with ESP-PROG it can automatically pull-down when flashing , so you don't have to press the boot and reset buttons manually. is this a strange behaviour ? Did you cut the trace connecting SDA to ESP32 Pin-16/GPIO46? I am able to flash my ESP32 with SDA connected to ESP32 Pin-15/GPIO3 (and disconnected from ESP32 Pin-16/GPIO46). Using ESP-Prog I don't have to press the boot or reset button to program. I suppose using Pin-15/GPIO3 is not the best idea, because like you said it is one of the strapping pins. GPIO3 strapping changes the JTAG source. Not sure yet what effect this has. On the next rev I'll make sure not to use a strapping pin for I2C!
|
|
|
|
developeralgo
Member
Offline
Activity: 63
Merit: 72
|
|
January 16, 2023, 02:14:15 PM Last edit: January 16, 2023, 02:28:21 PM by developeralgo |
|
Did you cut the trace connecting SDA to ESP32 Pin-16/GPIO46? I am able to flash my ESP32 with SDA connected to ESP32 Pin-15/GPIO3 (and disconnected from ESP32 Pin-16/GPIO46). Using ESP-Prog I don't have to press the boot or reset button to program.
I suppose using Pin-15/GPIO3 is not the best idea, because like you said it is one of the strapping pins. GPIO3 strapping changes the JTAG source. Not sure yet what effect this has. On the next rev I'll make sure not to use a strapping pin for I2C!
Yea, i did cut the trace connecting SDA to ESP32-S3 Pin-16/GPIO46 and was able to flash it without pressing any buttons. But when i connected the pull-up resistor R19 to ESP32-S3 Pin-15/GPIO3 , i could not flash it. Using ESP32-S3 Pins 4 (GPIO 4) , Pins 5 (GPIO 5) , Pins 6 (GPIO 6) or Pins 7 (GPIO 7) might work to connect to SDA.
|
|
|
|
NebulaMiner
Newbie
Offline
Activity: 22
Merit: 27
|
|
January 16, 2023, 02:27:21 PM |
|
Hey ! I can send you a lot of old S9 / S9k hashboard if needed ! For free, I juste don't want to pay the shipping but I don't care about the boards Hey there, thanks for the offer! I believe NebulaMiner wants to / started reverse engineering ASIC communication / protocol of Bitmain S17. The S9 have older chips, but since protocols may stay the same between miner generations, it could be interesting for him to look at the S9 boards. S9 have BM1387 chips, S9k is BM1393, and S17/Bitaxe are BM1397. I did started a reverse engineering job on the differents protocols in order to better understand BM1397 for Bitaxe driver in FW. S9 board (BM1387) have older and different commands from BM1397. But S9k (BM1393) are somehow similar. I did brough a broken S9k on ebay, but HashBoards are faulty so it would be nice to have good ones to see how Control Board is handling HB errors... I will contact you @iwantmyhomepaidwithbtc2 to see what can be done thanks for the help.
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 16, 2023, 06:31:08 PM |
|
Yea, i did cut the trace connecting SDA to ESP32-S3 Pin-16/GPIO46 and was able to flash it without pressing any buttons. But when i connected the pull-up resistor R19 to ESP32-S3 Pin-15/GPIO3 , i could not flash it. Using ESP32-S3 Pins 4 (GPIO 4) , Pins 5 (GPIO 5) , Pins 6 (GPIO 6) or Pins 7 (GPIO 7) might work to connect to SDA.
Actually... The ESP32 has configurable internal pullup resistors that can be used for the I2C pins. I think this means we don't need the external I2C pull-up resistors R18 and R19 at all. This means Pin-16/GPIO46 can be used for SDA after all.
|
|
|
|
developeralgo
Member
Offline
Activity: 63
Merit: 72
|
|
January 16, 2023, 08:45:59 PM Last edit: January 16, 2023, 09:07:25 PM by developeralgo |
|
Actually... The ESP32 has configurable internal pullup resistors that can be used for the I2C pins. I think this means we don't need the external I2C pull-up resistors R18 and R19 at all. This means Pin-16/GPIO46 can be used for SDA after all.
that's sounds great, i think the ESP32-S3 internal pull-up/pull-down resistors are usually 45k Ohms. How are you testing the BM1397 chip on the Bitaxe_V2 board ?
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
that's sounds great, i think the ESP32-S3 internal pull-up/pull-down resistors are usually 45k Ohms. How are you testing the BM1397 chip on the board ?
my bringup plan; 1. make sure I2C is working (done) 2. Make sure the DS4432U+ is alive (done) 3. Adjust the BM1397 core voltage to 1.5V with the DS4432U+ over I2C from the ESP32 4. Test the BM1397 with cgminer using the level shifted J6 debug header and a USB Serial cable 5. make some ESP32 FW to test the BM1397 from the ESP32 then.. 6. Make proper drivers for the DS4432U+, EMC2102, INA260, and LEDs 7. Make sure the ESP32 can connect over WiFi (done) 8. Get stratum work from ckpool 9. Format work for the BM1397, and send it to the BM1397 10. send stratum responses 11. Mine BTC!
|
|
|
|
n0nce
|
|
January 16, 2023, 09:48:53 PM |
|
8. Get stratum work from ckpool 10. send stratum responses
I think I'll setup my own Stratum server (more abilities to monitor what's arriving, log stuff etc.) and do these 2 soon-ish. It will be C or C++ through ESP-IDF, though. I'm quite comfortable with that.
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 16, 2023, 10:07:30 PM |
|
I think I'll setup my own Stratum server (more abilities to monitor what's arriving, log stuff etc.) and do these 2 soon-ish.
It will be C or C++ through ESP-IDF, though. I'm quite comfortable with that.
Do you have a solid solution for running your own Stratum proxy? The only way I have been able to do it with my node is to run ckpool (modified for recent bitcoin core versions here; https://github.com/skot/ckpool)
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
got the ESP32 LED Controller running with the bitaxe RGB LEDs -- bright orange, of course! Ordered a 40x40x10mm 5V 4-pin Noctua fan so I can try out changing the fan speed with the EMC2101
|
|
|
|
developeralgo
Member
Offline
Activity: 63
Merit: 72
|
|
January 16, 2023, 10:42:58 PM |
|
that's sounds great, i think the ESP32-S3 internal pull-up/pull-down resistors are usually 45k Ohms. How are you testing the BM1397 chip on the board ?
my bringup plan; 1. make sure I2C is working (done) 2. Make sure the DS4432U+ is alive (done) 3. Adjust the BM1397 core voltage to 1.5V with the DS4432U+ over I2C from the ESP32 4. Test the BM1397 with cgminer using the level shifted J6 debug header and a USB Serial cable 5. make some ESP32 FW to test the BM1397 from the ESP32 then.. 6. Make proper drivers for the DS4432U+, EMC2102, INA260, and LEDs 7. Make sure the ESP32 can connect over WiFi (done) 8. Get stratum work from ckpool 9. Format work for the BM1397, and send it to the BM1397 10. send stratum responses 11. Mine BTC! Can you upload that small testing code that you have or use to the github repo for testing . i have managed to have the wifi connection done. Just started working on I2C
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 16, 2023, 10:56:31 PM |
|
Can you upload that small testing code that you have or use to the github repo for testing . i have managed to have the wifi connection done. Just started working on I2C
I dropped what I have so far here; https://github.com/skot/ESP-Miner/tree/i2c_test -- very WIP
|
|
|
|
n0nce
|
|
January 16, 2023, 11:16:47 PM Merited by vapourminer (2) |
|
I think I'll setup my own Stratum server (more abilities to monitor what's arriving, log stuff etc.) and do these 2 soon-ish.
It will be C or C++ through ESP-IDF, though. I'm quite comfortable with that.
Do you have a solid solution for running your own Stratum proxy? The only way I have been able to do it with my node is to run ckpool (modified for recent bitcoin core versions here; https://github.com/skot/ckpool) I would probably try to do use bfgminer as proxy as described here: So what I ended up doing is running my bfgminer as a stratum proxy and then run my cgminer with stratum+tcp and point it to the bfgminer. Bingo works!
I had also read somewhere on Bitcointalk about a Stratum server (actively developed on GitHub), that would allow me to connect to my own bitcoind, which would be good too. But I'm not sure which one it was and can't find the topic anymore. I'm sure that our local pool operators here would be willing to help, though! got the ESP32 LED Controller running with the bitaxe RGB LEDs -- bright orange, of course! Ordered a 40x40x10mm 5V 4-pin Noctua fan so I can try out changing the fan speed with the EMC2101 Exciting to see things starting to work! By the way, PCBWay sells rulers in PCB material to check out different solder masks. In case you order PCBs there and want to check out their orange, here it is: https://www.pcbway.com/project/gifts_detail/PCBWay_Ruler_Orange.html
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
The TPS40305 voltage regulator feedback resistors R14 and R15 are not the right values in the max_v2 BOM. Good news is it isn't going to blow up. details here; https://github.com/skot/bitaxe/issues/20
|
|
|
|
pwakham
Newbie
Offline
Activity: 5
Merit: 14
|
|
January 17, 2023, 02:40:18 AM |
|
Hello My name is Peyton and after coming across your project on github it inspired me to work on my own product which I didnt realize until today that it was discussed on the forum page about the bitaxe 1387 version. but anyway my project is a 12 asic BM1397 hashboard that is the same formfactor as a matx motherboard so you can put it in a slim matx case. my plan is to power it with an apw 3. I will link some 3d renders of it. But the plan is to cool it with standard LGA1151 heatsinks and its 4 asics per heatsinks and 3 heatsinks. My idea which im not sure if it will work is to basically have 6 domains where there are 6 sets of two chips in series. the power will come from 12 volt of the apw3 and get stepped down to 5v then 3.3v which then powers the 2 asic domain splitting the power into 2 coming to that 1.6 vdd line it needs. It also will be controlled by a rpi cm4. That will run the linux which runs kano theoretically. What I think I need your help on is the actual communication portion. my plan is to make a built in ttl connector which is hardwired into the cm4 as a usb port with a dip switch to power it off if necessary. I think I can figure out how to wire that ttl connector up no problem, what I dont know how to do is connect the asics to said "ttl adapter" or how to actually make the chips do any work. any guidance you can give me of how to connect and communicate with the asics would be much appreciated and lmk what you think! https://gyazo.com/24625a4510e0393d42d2ae27f94f5ebc - overall https://gyazo.com/438c1e7d3284387ee43fe1a1162a8a45 - overall back https://gyazo.com/ae867ddc0d43c6b0dc4fe1b36e88fbf1 - asic layout, 8 pin ic 5v 5 pin 3.3v, not fully put together but should work in theory? https://gyazo.com/91955ccfa9e6b9f295086913b4efdbb6 - serial ttl adapter, 12v power, cm4, gpio pin set, startings of power circuitry to power the cm4 I am designing it through easy eda as thats the software I like best and could send you the files if youd like. again any help would be appreciated!
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 17, 2023, 03:31:24 AM Merited by vapourminer (1) |
|
Hello My name is Peyton and after coming across your project on github it inspired me to work on my own product which I didnt realize until today that it was discussed on the forum page about the bitaxe 1387 version. but anyway my project is a 12 asic BM1397 hashboard that is the same formfactor as a matx motherboard so you can put it in a slim matx case. my plan is to power it with an apw 3. I will link some 3d renders of it. But the plan is to cool it with standard LGA1151 heatsinks and its 4 asics per heatsinks and 3 heatsinks. My idea which im not sure if it will work is to basically have 6 domains where there are 6 sets of two chips in series. the power will come from 12 volt of the apw3 and get stepped down to 5v then 3.3v which then powers the 2 asic domain splitting the power into 2 coming to that 1.6 vdd line it needs. It also will be controlled by a rpi cm4. That will run the linux which runs kano theoretically. What I think I need your help on is the actual communication portion. my plan is to make a built in ttl connector which is hardwired into the cm4 as a usb port with a dip switch to power it off if necessary. I think I can figure out how to wire that ttl connector up no problem, what I dont know how to do is connect the asics to said "ttl adapter" or how to actually make the chips do any work. any guidance you can give me of how to connect and communicate with the asics would be much appreciated and lmk what you think! https://gyazo.com/24625a4510e0393d42d2ae27f94f5ebc - overall https://gyazo.com/438c1e7d3284387ee43fe1a1162a8a45 - overall back https://gyazo.com/ae867ddc0d43c6b0dc4fe1b36e88fbf1 - asic layout, 8 pin ic 5v 5 pin 3.3v, not fully put together but should work in theory? https://gyazo.com/91955ccfa9e6b9f295086913b4efdbb6 - serial ttl adapter, 12v power, cm4, gpio pin set, startings of power circuitry to power the cm4 I am designing it through easy eda as thats the software I like best and could send you the files if youd like. again any help would be appreciated! Dude, that's rad! fitting it in the micro atx case is a great idea. I wonder if you could make it work with normal PC power supplies that also fit in the matx case? Don't they have some beefy 3.3V rails? A couple things you might watch out for; - BM1397 core voltage is nominally 1.5V. The 1.65V you have would probably work but be inefficient unless you're running a high hash frequency. - Careful of the BM1397 copper tops, they are connected to GND, which won't be at the same potential if you have the chips in series. ie, a common heatsink between two BM1397's in series is going to short them. - What voltage regulators are you using for 5V and 3.3V? They need to handle a lot of current, and/or have a lot of them. You should be able to get a design for a FTDI or similar usbserial chip connected to the CM4. I think the official RPi CM4 IO board has one. https://www.raspberrypi.com/products/compute-module-4-io-board/ (They have the design files available for KiCad ) As far as the connections between BM1397's I bet @developeralgo could help you here. I haven't looked into this yet. There is also the S17 Repair guide Once you've got linux running and the BM1397's attached to a usbserial chip, you can just look at cgminer kano edition for how to communicate with them. https://github.com/kanoi/cgminer The recent changes for the Gekkoscience Terminus R909 should get you pretty close. That miner has 6 BM1397's https://bitcointalk.org/index.php?topic=5423227.0Maybe put your design files up on GitHub and post the link here? Also, You should really check out KiCad! It's free, open source, cross platform and great for sharing files on the internet. It's a bit quirky to learn at first, but if you can get past that you'll love it. No advertisements either
|
|
|
|
pwakham
Newbie
Offline
Activity: 5
Merit: 14
|
|
January 17, 2023, 04:26:12 AM |
|
Hello My name is Peyton and after coming across your project on github it inspired me to work on my own product which I didnt realize until today that it was discussed on the forum page about the bitaxe 1387 version. but anyway my project is a 12 asic BM1397 hashboard that is the same formfactor as a matx motherboard so you can put it in a slim matx case. my plan is to power it with an apw 3. I will link some 3d renders of it. But the plan is to cool it with standard LGA1151 heatsinks and its 4 asics per heatsinks and 3 heatsinks. My idea which im not sure if it will work is to basically have 6 domains where there are 6 sets of two chips in series. the power will come from 12 volt of the apw3 and get stepped down to 5v then 3.3v which then powers the 2 asic domain splitting the power into 2 coming to that 1.6 vdd line it needs. It also will be controlled by a rpi cm4. That will run the linux which runs kano theoretically. What I think I need your help on is the actual communication portion. my plan is to make a built in ttl connector which is hardwired into the cm4 as a usb port with a dip switch to power it off if necessary. I think I can figure out how to wire that ttl connector up no problem, what I dont know how to do is connect the asics to said "ttl adapter" or how to actually make the chips do any work. any guidance you can give me of how to connect and communicate with the asics would be much appreciated and lmk what you think! https://gyazo.com/24625a4510e0393d42d2ae27f94f5ebc - overall https://gyazo.com/438c1e7d3284387ee43fe1a1162a8a45 - overall back https://gyazo.com/ae867ddc0d43c6b0dc4fe1b36e88fbf1 - asic layout, 8 pin ic 5v 5 pin 3.3v, not fully put together but should work in theory? https://gyazo.com/91955ccfa9e6b9f295086913b4efdbb6 - serial ttl adapter, 12v power, cm4, gpio pin set, startings of power circuitry to power the cm4 I am designing it through easy eda as thats the software I like best and could send you the files if youd like. again any help would be appreciated! Dude, that's rad! fitting it in the micro atx case is a great idea. I wonder if you could make it work with normal PC power supplies that also fit in the matx case? Don't they have some beefy 3.3V rails? A couple things you might watch out for; - BM1397 core voltage is nominally 1.5V. The 1.65V you have would probably work but be inefficient unless you're running a high hash frequency. - Careful of the BM1397 copper tops, they are connected to GND, which won't be at the same potential if you have the chips in series. ie, a common heatsink between two BM1397's in series is going to short them. - What voltage regulators are you using for 5V and 3.3V? They need to handle a lot of current, and/or have a lot of them. You should be able to get a design for a FTDI or similar usbserial chip connected to the CM4. I think the official RPi CM4 IO board has one. https://www.raspberrypi.com/products/compute-module-4-io-board/ (They have the design files available for KiCad ) As far as the connections between BM1397's I bet @developeralgo could help you here. I haven't looked into this yet. There is also the S17 Repair guide Once you've got linux running and the BM1397's attached to a usbserial chip, you can just look at cgminer kano edition for how to communicate with them. https://github.com/kanoi/cgminer The recent changes for the Gekkoscience Terminus R909 should get you pretty close. That miner has 6 BM1397's https://bitcointalk.org/index.php?topic=5423227.0Maybe put your design files up on GitHub and post the link here? Also, You should really check out KiCad! It's free, open source, cross platform and great for sharing files on the internet. It's a bit quirky to learn at first, but if you can get past that you'll love it. No advertisements either You would think someone who works for Bitdeer repairing miners all day would remember that the 1397s tops are connected to ground. Silly me. I’ll have to think of something other than thermal pads because the goal is to be super quiet. (APW3 doesn’t qualify as super quiet i know, the 3.3 rail Isn’t a bad idea. I’ve used kicad before just more familiar with easyeda. What should the current be for two chips? The one i have is a 3.3v 1amp
|
|
|
|
Skot
Full Member
Offline
Activity: 226
Merit: 246
bitaxe.org
|
|
January 17, 2023, 05:26:36 AM |
|
You would think someone who works for Bitdeer repairing miners all day would remember that the 1397s tops are connected to ground. Silly me. I’ll have to think of something other than thermal pads because the goal is to be super quiet. (APW3 doesn’t qualify as super quiet i know, the 3.3 rail Isn’t a bad idea. I’ve used kicad before just more familiar with easyeda. What should the current be for two chips? The one i have is a 3.3v 1amp
Hey, Bitdeer is a Bitmain offshoot, right?? The APW3 sounds a lot better if you put a Noctua fan in there. Current for two chips in series is the same as one. Rumor has it a single BM1397 can hit 25W if you really go for it. So, that's like 15A for two chips at 3.3V
|
|
|
|
|