Bitcoin Forum

Bitcoin => Hardware => Topic started by: nullama on May 31, 2022, 10:35:36 AM



Title: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on May 31, 2022, 10:35:36 AM
I found an interesting project about creating your own ASIC using two BM1387 chips. The cool thing about it is that it's all open source: KiCad design files, BoM, software, etc. Basically an Open Hardware project.

https://i.imgur.com/At4hou9.jpg

Github with sources here: https://github.com/skot/bitaxe

Here's a reddit discussion about it: https://www.reddit.com/r/BitcoinMining/comments/uymwj3/experimental_bm1387_bitcoin_mining_machine

It's not finished yet, but it's something interesting to have a look if you're planning to make your own ASIC miner, or you want to help create an Open Source one.

Also, the person who created this is now looking to make it work with cgminer:

I’ll see if I can get the cgminer modified for the newpac to talk to the bitaxe

This would be great to tinker with, specially with cgminer.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotATether on May 31, 2022, 11:04:34 AM
It's DIY so I'm not expecting it to be particularly fast, but do you have any hashrate figures on these self-built stuff?

I'd be content if it can pump a few hundred GHash/s. It's ASIC tech after all, even USB miners with small chips can output such speeds.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on May 31, 2022, 12:09:02 PM
It's DIY so I'm not expecting it to be particularly fast, but do you have any hashrate figures on these self-built stuff?

I'd be content if it can pump a few hundred GHash/s. It's ASIC tech after all, even USB miners with small chips can output such speeds.


Note that it's still not working properly, but based on the design, it should be able to hash around 130GH/s, which would make it similar to the NewPac USB miners, which also used a dual BM1387 setup for the hashing chips.

I wonder if it's rather simple to update this design to use newer ASICs like the BM1397 like the ones used in the Compac F, or if that would require a completely new design of the board.

Also the new ASICs from Intel should arrive later this year, that could potentially be a winner for DIY ASICs.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 11, 2022, 06:29:11 AM
hi nullama!

I saw your reply over on reddit. I'm not sure why r/BitcoinMining is deleting legit posts -- that's pretty annoying.

I was banging my head the last few days as to why the bitaxe was only working erratically. I finally got it under the microscope and discovered that the pin pitch on the PCB footprint I had made was 0.03mm off from the actual chip. Doesn't sound like much, but it really looks like a few of the BM1387 pins were not making contact. I have fixed this, updated the GitHub repo and ordered some new PCBs to give it a try.

I think it would be amazing to make this work with the BM1397! It looks like the BM1387 and the BM1397 have the same chip package size and pin configuration.

Does anyone know if the BM1387 and the BM1397 pinout is the same?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on June 11, 2022, 03:05:58 PM
Yeah that ~0.475mm pin pitch instead of the 0.5mm is a bit of a killer. Also no, while the footprint between BM1387 and BM1397 are the same, the pinouts are drastically different. BM1391 (S15), 1396 (*17e series) and 1397 (*17 proper) are pretty similar, and then changes were made again for 1398 (S19) to reflect a change in internal architecture but keeping most of the handy features.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 11, 2022, 10:24:21 PM
Yeah that ~0.475mm pin pitch instead of the 0.5mm is a bit of a killer. Also no, while the footprint between BM1387 and BM1397 are the same, the pinouts are drastically different. BM1391 (S15), 1396 (*17e series) and 1397 (*17 proper) are pretty similar, and then changes were made again for 1398 (S19) to reflect a change in internal architecture but keeping most of the handy features.

That's so crazy. I carefully measured it, and then just assumed I was off and it was really 0.45mm. oops! I've ordered a v2 PCB with the footprint changed to 0.48mm -- hopefully that works. It's also a tricky DFN package because the pins don't extend all the way to the side, so you can't see if it's soldered correctly.

I don't suppose you have a pinout for the BM1397? Has anyone made one of those poorly translated "repair guides" for the S17?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on June 11, 2022, 11:10:28 PM
Yeah that slight pitch difference messed up early testing before we rolled out the NewPac too. Everything about that footprint makes soldering difficult. Went through three stencil aperture variants before we landed on something that would reliably deposit enough solder on the ridiculously tiny pads without putting so much on the belly pads that it would lift slightly and cause disconnects.

I do have quite a bit of data on the BM1397, and you're gonna hate me for this but I'm not gonna post it, seeing as several people are currently relying on GekkoScience miner sales for income and that's the chip we're working with right now. An S17 repair guide is a good place to start though.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 12, 2022, 04:28:46 AM
I do have quite a bit of data on the BM1397, and you're gonna hate me for this but I'm not gonna post it, seeing as several people are currently relying on GekkoScience miner sales for income and that's the chip we're working with right now. An S17 repair guide is a good place to start though.

No worries! Thanks for your help so far.

The Compac F looks really sweet, BTW. I can't help but notice there are a lot of them for sale on eBay for $300+ in essentially unopened packaging... That's the same price a 13.5TH Antminer S9 goes for. People are craving this home bitcoin mining experience.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: norfolkenchants on June 15, 2022, 01:51:40 PM
There are some bargains on ebay! Somebody just got 2 x R606 pods, 13 x Newpacs 3 x GS Hubs 3 x PI4 a server PSU and a shed load of quality cooling for under £1000


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 16, 2022, 05:03:26 PM
There are some bargains on ebay! Somebody just got 2 x R606 pods, 13 x Newpacs 3 x GS Hubs 3 x PI4 a server PSU and a shed load of quality cooling for under £1000

I’m glad to see the miner pricing falling a bit! Hopefully that will get this scalping that has been happening under control..


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 16, 2022, 08:11:40 PM
The bitaxe v2 PCBs with the (hopefully) correct footprint for the BM1387 are supposed to arrive next week. I'm really excited to try this!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 27, 2022, 11:31:00 PM
I found the S17 repair guide that sidehack mentioned. I've put together a BM1397 version of the bitaxe -- the bitaxeMAX?? naming things is hard. Check it out and let me know what you think; https://github.com/skot/bitaxe/tree/pro

I haven't gotten PCBs back to test yet, so be careful!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on June 28, 2022, 01:21:50 AM
I found the S17 repair guide that sidehack mentioned. I've put together a BM1397 version of the bitaxe -- the bitaxeMAX?? naming things is hard. Check it out and let me know what you think; https://github.com/skot/bitaxe/tree/pro

I haven't gotten PCBs back to test yet, so be careful!

That looks very interesting, thanks for updating!

Why are you using a single BM1397 instead of two like the previous BM1387?

It would be great to have a dual BM1397 miner.

Did you manage to make it work?

I added a NCT218 so that the BM1397 core temperature can be read out over I2C

Having temperature readings is a game changer with these little miners. Great job!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 28, 2022, 04:28:28 AM
I think a double, or even a triple BM1397 miner would be sweet! I’ll give it a try once I verify that the single works.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on June 28, 2022, 02:40:48 PM
I think a double, or even a triple BM1397 miner would be sweet! I’ll give it a try once I verify that the single works.
If you still are only using the USB connection for supplying power yer gonna have problems as the connectors simply cannot handle enough current to power the chips. The absolute max current rating for USB-A connectors is 3.1A and even that is intended to only be for a short time - not 24x7.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on June 28, 2022, 05:07:35 PM
I think a double, or even a triple BM1397 miner would be sweet! I’ll give it a try once I verify that the single works.
If you still are only using the USB connection for supplying power yer gonna have problems as the connectors simply cannot handle enough current to power the chips. The absolute max current rating for USB-A connectors is 3.1A and even that is intended to only be for a short time - not 24x7.

I've mentioned this in another thread here some time ago, but given this is a new hardware project from scratch it might be worthwhile repeating it here.

It would be interesting to use a USB-C connector for the miner. This would allow a lot more power to be delivered, using the standards, and not relying on non-standard power delivery like the current generation of USB miners.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on June 28, 2022, 07:10:48 PM
And I'll follow up with that just using a USB-C connector won't do anything without USB-PD logic and additional DC-DC hardware; "using the standards" is much easier said than done.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on June 29, 2022, 01:20:19 AM
And I'll follow up with that just using a USB-C connector won't do anything without USB-PD logic and additional DC-DC hardware; "using the standards" is much easier said than done.

There are some chipsets that might make this a bit easier.

For example from Texas Instrument: https://www.ti.com/interface/usb/type-c-and-power-delivery/overview.html

https://i.imgur.com/ad7B5uu.png

You could get 3A@5V (15W) without dealing with power delivery.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on June 29, 2022, 02:32:15 PM
Might look into that. But 3A@5V isn't enough to make more than one BM1397 worth it. Those chips will absolutely eat power.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 29, 2022, 07:43:18 PM
The bitaxe v2 PCBs with the (hopefully) correct footprint for the BM1387 are supposed to arrive next week. I'm really excited to try this!

I finally got the PCBs back from the fab and got a chance to build them up yesterday. It looks like the new footprint is good! The BM1387's are mining nicely..


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on June 29, 2022, 07:52:12 PM
If you still are only using the USB connection for supplying power yer gonna have problems as the connectors simply cannot handle enough current to power the chips. The absolute max current rating for USB-A connectors is 3.1A and even that is intended to only be for a short time - not 24x7.

I don't think USB is suitable for power in this case. Data perhaps, but we need something much beefier for power. The spade connectors I've got on the bitaxe v2 now seem to be working pretty well.

My goal is to eventually have this powered by solar panels directly.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: o_solo_miner on June 30, 2022, 03:53:36 PM
Hi Skot,
thank you for sharing this with us.
I liked your 5x5 design of the pic pcb, so nice to see it now with an asic.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Cyl0nius on July 02, 2022, 10:47:21 AM
Hi Skot,
thank you for sharing this with us.

I hope for a stand-alone-solo-miner with Esp32 as front-end.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on July 06, 2022, 09:45:50 PM
Hi Skot,
thank you for sharing this with us.
I liked your 5x5 design of the pic pcb, so nice to see it now with an asic.

Wow! That 5x5 PIC design is from 11 years ago. I'm much better at designing PCBs now, I promise! :)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on July 06, 2022, 09:55:20 PM
I hope for a stand-alone-solo-miner with Esp32 as front-end.

That is the plan! Hopefully soon I can get something working.

Although I'm tempted to use the new Raspberry Pi Pico W (https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-platform/) instead of the ESP32


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: marshall3416 on July 28, 2022, 01:53:48 PM
good for you


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: yxt on July 30, 2022, 12:01:18 PM
nice to see something as
opensource hardware project :)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on August 29, 2022, 11:43:30 PM
I hope for a stand-alone-solo-miner with Esp32 as front-end.

That is the plan! Hopefully soon I can get something working.

Although I'm tempted to use the new Raspberry Pi Pico W (https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-platform/) instead of the ESP32
Hey Skot! I came up with a similar idea at the start of the year and had PCBs manufactured, but only recently got around to putting them together.
Compared to your design, it's a complete breakout board that provides access to all pins in 0.1" format, as I thought better having too many broken out pins than too few.

Anyhow; you beat me to uploading the whole thing and testing it out. Good job; I read that it's already working quite well, so far.
However I'm wondering what you use to supply the 0.8V at probably around 10A that those 2 chips should be pulling. My next step would have been to design a buck converter circuit. Do you just use a lab bench power supply?

I'm definitely interested in collaborating to maybe make this into a compact USB miner with integrated FTDI chip and buck converter (I have a lot of unused slots in my GekkoScience USB hub.. ;)).
Otherwise, I can see a pod miner with more than 2 chips being interesting, too, maybe targeting 95W so a standard quiet CPU heatsink could be used.

Disclaimer: I'm a big fan of sidehack's work / GekkoScience and don't think such an open source project is going to compete with them. For one, their flagship Compac F is much more efficient and much faster, and also it's a ready-to-go product. These are PCB files that users have to get produced themselves and get to work soldering them, too.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: MinerMEDIC on August 30, 2022, 10:30:40 AM
I really wanna make an ASC tester out of these does anybody have a lead on a zif socket that will work(Maybe I need to go to Reddit do this)?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on August 30, 2022, 11:14:23 PM
I really wanna make an ASC tester out of these does anybody have a lead on a zif socket that will work(Maybe I need to go to Reddit do this)?
You mean ASIC tester? Like, for testing malfunctioning S9 hashboards or something like that?
How do you envision putting an SMD component into a ZIF socket?

For testing ASIC chips from an S9, I would recommend just getting some of these PCBs manufactured and soldering the ASICS to them, temporarily. There are no 'clip in' type sockets for these chips as they have a custom pin spacing and power requirements (huge non-standard power pads underneath themselves).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on August 30, 2022, 11:51:18 PM
You can find sockets on aliexpress for around $300 but they won't handle heat very well without modification.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: MinerMEDIC on August 31, 2022, 04:23:13 PM
You can find sockets on aliexpress for around $300 but they won't handle heat very well without modification.
Maybe you can but while I’m no idiot I certainly have had zero luck. Can I bother you for something a little more concrete?
I really wanna make an ASC tester out of these does anybody have a lead on a zif socket that will work(Maybe I need to go to Reddit do this)?
You mean ASIC tester? Like, for testing malfunctioning S9 hashboards or something like that?
How do you envision putting an SMD component into a ZIF socket?

For testing ASIC chips from an S9, I would recommend just getting some of these PCBs manufactured and soldering the ASICS to them, temporarily. There are no 'clip in' type sockets for these chips as they have a custom pin spacing and power requirements (huge non-standard power pads underneath themselves).
ASICs are what we call Bottom terminated components (BTC lol), Bitmain’s chips are also a bastardized version or cross between a DFN and an LGA. in fact Intel may already have an LGA socket with the pins just right(angles &pitch), you just have to figure out which ones will be connecting to something and which ones aren’t, haven’t had time to go down that rabbit hole very far. But to answer your question, basically it will look like an LGA CPU socket. Just a lot less pins. Some factors which make you our suggestion problematic: the time it takes to Properly prep chip(and lands) for placement make testing more than a few an hour impractical, also The number of times a chip can be reworked as a finite number, you don’t want to place your Nice just-tested asic only to discover later it’s last useful reflow was used up in the tester(The IPC guideline is twice).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: paid2 on August 31, 2022, 09:00:56 PM


That is the plan! Hopefully soon I can get something working.

Although I'm tempted to use the new Raspberry Pi Pico W (https://www.raspberrypi.com/news/raspberry-pi-pico-w-your-6-iot-platform/) instead of the ESP32

Hey Skot

I have a lot of used S9k boards, with a lot of components in my basement. If you need some, send me a DM and will sent it for you for free if you need some parts for testing


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on September 07, 2022, 08:32:32 PM
Hey Skot! I came up with a similar idea at the start of the year and had PCBs manufactured, but only recently got around to putting them together.
Compared to your design, it's a complete breakout board that provides access to all pins in 0.1" format, as I thought better having too many broken out pins than too few.

https://i.postimg.cc/vBFv3NTf/image.jpg

Anyhow; you beat me to uploading the whole thing and testing it out. Good job; I read that it's already working quite well, so far.
However I'm wondering what you use to supply the 0.8V at probably around 10A that those 2 chips should be pulling. My next step would have been to design a buck converter circuit. Do you just use a lab bench power supply?

I'm definitely interested in collaborating to maybe make this into a compact USB miner with integrated FTDI chip and buck converter (I have a lot of unused slots in my GekkoScience USB hub.. ;)).
Otherwise, I can see a pod miner with more than 2 chips being interesting, too, maybe targeting 95W so a standard quiet CPU heatsink could be used.

Disclaimer: I'm a big fan of sidehack's work / GekkoScience and don't think such an open source project is going to compete with them. For one, their flagship Compac F is much more efficient and much faster, and also it's a ready-to-go product. These are PCB files that users have to get produced themselves and get to work soldering them, too.

Hey n0nce!

that PCB looks good! it's cool to see more people doing this. Were you able to get the BM1387 pin pitch right?

For now I have just been using a cheapo adjustable power supply from Amazon. You're right, an onboard buck converter is the way to go. Unfortunately they're a little hard to come by these days with the chip shortage. I did a test with the MAX20499 (https://github.com/skot/MAX20499_breakout) but then I realized Maxim won't give the full datasheet to plebs. Still looking for a better part. the TPS51219 on the Newpac is completely out of stock.

I want to experiment with offloading everything that cgminer does (fetching work via stratum and rolling the extranonce) to an onboard microcontroller in a pod miner setup. I've started with an ESP32 so I can connect over WiFi too. (https://github.com/skot/bitaxe/tree/max). Pair that all with a power supply suitable for solar and you could just litter your roof with these things :)

Is there a "standard" CPU heatsink with fan? I looked around at these but couldn't really come up with anything. It seems like the economies of scale with the whole PC water-cooling scene could be useful here.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on September 07, 2022, 08:34:10 PM
You can find sockets on aliexpress for around $300 but they won't handle heat very well without modification.

https://www.aliexpress.com/item/3256803866230304.html


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on September 07, 2022, 08:47:23 PM
Hey Skot

I have a lot of used S9k boards, with a lot of components in my basement. If you need some, send me a DM and will sent it for you for free if you need some parts for testing

Apparently I can't DM you. Anyways, thanks for the super kind offer! I don't need any HW at the moment, but I'll hit you up if that changes.

thanks again,
Skot


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on September 07, 2022, 10:18:00 PM
Hey Skot! I came up with a similar idea at the start of the year and had PCBs manufactured, but only recently got around to putting them together.
Compared to your design, it's a complete breakout board that provides access to all pins in 0.1" format, as I thought better having too many broken out pins than too few.

https://i.postimg.cc/vBFv3NTf/image.jpg

Anyhow; you beat me to uploading the whole thing and testing it out. Good job; I read that it's already working quite well, so far.
However I'm wondering what you use to supply the 0.8V at probably around 10A that those 2 chips should be pulling. My next step would have been to design a buck converter circuit. Do you just use a lab bench power supply?

I'm definitely interested in collaborating to maybe make this into a compact USB miner with integrated FTDI chip and buck converter (I have a lot of unused slots in my GekkoScience USB hub.. ;)).
Otherwise, I can see a pod miner with more than 2 chips being interesting, too, maybe targeting 95W so a standard quiet CPU heatsink could be used.

Disclaimer: I'm a big fan of sidehack's work / GekkoScience and don't think such an open source project is going to compete with them. For one, their flagship Compac F is much more efficient and much faster, and also it's a ready-to-go product. These are PCB files that users have to get produced themselves and get to work soldering them, too.
Hey n0nce!

that PCB looks good! it's cool to see more people doing this. Were you able to get the BM1387 pin pitch right?
Thanks; it should also allow to mount a heatsink with thermal cement or adhesive thermal pads, if the pin headers are soldered on the bottom (or the heatsink fits in between them). I just thought for early tests like figuring out the pinout and which passive components to connect where, even a piece of copper clamped to it should suffice.
I did consider adding holes for a northbridge heatsink like you, though!

Regarding the pitch; I actually found a BM1387 footprint / component in https://easyeda.com/editor and crossed my fingers that it's correct (it is).

For now I have just been using a cheapo adjustable power supply from Amazon. You're right, an onboard buck converter is the way to go. Unfortunately they're a little hard to come by these days with the chip shortage. I did a test with the MAX20499 (https://github.com/skot/MAX20499_breakout) but then I realized Maxim won't give the full datasheet to plebs. Still looking for a better part. the TPS51219 on the Newpac is completely out of stock.
You mean a lab bench power supply or a random prebuilt buck converter? And just to clarify: you do have 1.8V regulators on-board, too, right?
As for the main step-down regulator, I actually envisioned building my own synchronous buck converter using a buck controller and two MOSFETS, just like GekkoScience.

As you noticed, GekkoScience / sidehack, uses a https://www.ti.com/product/TPS51219, which is a buck controller. It just controls two MOSFETS in a synchronous buck converter configuration, like this. The MOSFETS are in place of the switches and the controller is not shown here; it controls the timing to achieve the right output voltage.
Yup, he uses a synchronous buck controller IC together with 2 mosfets.
Looks something like this. They are switched on and off by the controller, which creates accurate timings to achieve the required duty cycle and thus output voltage.
https://i.postimg.cc/05w6Hy7n/image.png

I don't think that integrated (single chip) buck converters exist with the types of power we need to push and the efficiency required. For instance, a linear regulator going from 5V, 3A to 0.5V, 30A would go up in smoke immediately.

I want to experiment with offloading everything that cgminer does (fetching work via stratum and rolling the extranonce) to an onboard microcontroller in a pod miner setup. I've started with an ESP32 so I can connect over WiFi too. (https://github.com/skot/bitaxe/tree/pro). Pair that all with a power supply suitable for solar and you could just litter your roof with these things :)
That sounds like a cool idea, hadn't thought of that! Making a more standalone, pod-format device sounds great to me. I'd just personally focus more on the power supply first and getting my breakout running; feel free to work on the ESP stuff - then we can merge everything. ;)

Is there a "standard" CPU heatsink with fan? I looked around at these but couldn't really come up with anything. It seems like the economies of scale with the whole PC water-cooling scene could be useful here.
Well I meant standard in the sense of 'Intel LGA 1151' or 'AMD AM4' - if we replicate their hole spacing and copper area, it would be possible to just take a box-standard thing like this:
https://www.newegg.com/rosewill-rocc-16003/p/N82E16835200114

They can easily cool 100W, only downside is pretty small copper area. So the ASICs will need to be very close and amount of chips per cooler would be space-limited.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on September 08, 2022, 12:04:10 AM
...
For now I have just been using a cheapo adjustable power supply from Amazon. You're right, an onboard buck converter is the way to go. Unfortunately they're a little hard to come by these days with the chip shortage. I did a test with the MAX20499 (https://github.com/skot/MAX20499_breakout) but then I realized Maxim won't give the full datasheet to plebs. Still looking for a better part. the TPS51219 on the Newpac is completely out of stock.

I want to experiment with offloading everything that cgminer does (fetching work via stratum and rolling the extranonce) to an onboard microcontroller in a pod miner setup. I've started with an ESP32 so I can connect over WiFi too. (https://github.com/skot/bitaxe/tree/pro). Pair that all with a power supply suitable for solar and you could just litter your roof with these things :)

Is there a "standard" CPU heatsink with fan? I looked around at these but couldn't really come up with anything. It seems like the economies of scale with the whole PC water-cooling scene could be useful here.
Ja as I pointed out in the thread in Development & Technical Discussion thread (https://bitcointalk.org/index.php?topic=5411548.msg60856435#msg60856435) using on-board Vcore regulator is a must. At the low voltage and high currents involved only a properly bypassed bolted cable connection with remote sensing would work when using an external low voltage PSU. Any other kind of connector will simply have too much voltage drop unless it's huge and - be way too expensive.
TI has several good links regarding proper Vcore regulator design that I posted in that above link along with Those TI links also giving parts sourcing and availability links.

As for finding parts & sourcing them - use Octopart (https://octopart.com/) They link to every reputable component mfgr on the planet to show current and historical parts availability, full data sheets, Factory Approved distributors, 3D component models, etc.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 11, 2022, 02:43:26 PM
Since my electronics soldering capabilities are limited. Is it possible to order for the manufacture BitAXE Max/Pro PCB + Assembly of all the parts using JLCPCB or PCBWay ? if yes please can you provide some details how to do go about accomplishing that. I am able to order the PCB manufactured without much hassle. I can source  almost all the parts from JCLPCB plus others but the BM1397 chips from AliExpress.

I would like to have the PCB + Assembly of all parts done by JCLPCB or PCBWay is that possible ? so that i just receive the complete unit that i can plug and test 


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on October 11, 2022, 11:23:35 PM
Since my electronics soldering capabilities are limited. Is it possible to order for the manufacture BitAXE Max/Pro PCB + Assembly of all the parts using JLCPCB or PCBWay ? if yes please can you provide some details how to do go about accomplishing that. I am able to order the PCB manufactured without much hassle. I can source  almost all the parts from JCLPCB plus others but the BM1397 chips from AliExpress.

I would like to have the PCB + Assembly of all parts done by JCLPCB or PCBWay is that possible ? so that i just receive the complete unit that i can plug and test 
For the PCB and passive components you can have that done by those services by just uploading the Gerber files and clicking the box for the 'SMT service / assembly'. It only works for parts they stock, though - which doesn't include ASIC chips.
As far as I know, we both soldered our BM1397's ourselves with some hot air; not too hard.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 12, 2022, 01:39:18 AM
that's great , i will give it a shot. Has anyone made a crack at the power delivery system ? to be coupled with it . Currently just checking JCLPCB Assembly , Does anyone or Skot or nonce know if the asembly needs to be on both sides or just the top side ?

Looked at the BOM csv in the bitaxePro  source files and there is a reference to a column " DK" . is that in reference to the parts/part numbers are being sourced from DigiKey?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 12, 2022, 07:50:09 PM
that's great , i will give it a shot. Has anyone made a crack at the power delivery system ? to be coupled with it . Currently just checking JCLPCB Assembly , Does anyone or Skot or nonce know if the asembly needs to be on both sides or just the top side ?

The bitaxePro and Max are the same thing, a single BM1397 miner with a ESP32-C3 on board. Confusing naming, I apologize. It works for Apple though! Warning; I haven't assembled a bitaxeMax yet, so there could be problems. My PCBs are supposed to arrive the end of this week, so I should be able to test soon!

That's a good idea to have JCLPCB or PCBWay do the PCBA. The only part on the PCB bottom is the BM1397, so you could have your PCBA fab assemble just the top and then you can put your own bitcoin ASIC on the bottom. You probably want to order a stencil from JCLPCB for that bottom layer (bitaxePro-B_Paste.gbr) so you can get your solder paste on evenly. You'll also need a XY / Centroid file for the PCBA fab -- I'll generate that and add it to the repo today.

Both nonce and I have been working on power delivery. We have been looking at the TI TPS40305 buck regulator as a candidate. I put together a (one sided) PCB based on the TI reference design; https://github.com/skot/TPS40305_Supply but I have not yet tested this -- I should have parts and boards by the end of the week.

Looked at the BOM csv in the bitaxePro  source files and there is a reference to a column " DK" . is that in reference to the parts/part numbers are being sourced from DigiKey?

yup! I do that to streamline my ordering process. If you look at the part attributes in KiCad you can find the MPN too.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 13, 2022, 04:30:43 PM
Thanks for the great explanation and help .

Looked at ESP32-C3-Devkit-02 but it does not look as if it would be able to run an OS like Linux distro for a self-cointained mini miner. Even with a scaled down or minimal linux distro. Do you have a linux distro in mind that can be used on ESP32-C3-Devkit-02 ?

How about just using a single Raspberry Pi 4 with 8GB and WiFi to drive a fleet of about 15 BitaxeMax if each has its own power supply? if ESP32-C3-Devkit-02 can work per bitaxeMax that would fantastic



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 13, 2022, 05:18:14 PM
Thanks for the great explanation and help .

Looked at ESP32-C3-Devkit-02 but it does not look as if it would be able to run an OS like Linux distro for a self-cointained mini miner. Even with a scaled down or minimal linux distro. Do you have a linux distro in mind that can be used on ESP32-C3-Devkit-02 ?

How about just using a single Raspberry Pi 4 with 8GB and WiFi to drive a fleet of about 15 BitaxeMax if each has its own power supply? if ESP32-C3-Devkit-02 can work per bitaxeMax that would fantastic

I don't think linux is necessary for a small miner like this. The plan is to make essentially a simplified version of cgminer that will run on the ESP32 in FreeRTOS, but I haven't made a ton of progress on that yet.

The bitaxe and the bitaxeMax both have serial ports that you could use with a (1.8V) USB-Serial adapter if you want to connect to a RPi. It should work with a slightly modified version of the Gekkoscience cgminer.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Mcpepe on October 13, 2022, 06:02:49 PM
I found an interesting project about creating your own ASIC using two BM1387 chips. The cool thing about it is that it's all open source: KiCad design files, BoM, software, etc. Basically an Open Hardware project.

https://i.imgur.com/At4hou9.jpg

Github with sources here: https://github.com/skot/bitaxe

Here's a reddit discussion about it: https://www.reddit.com/r/BitcoinMining/comments/uymwj3/experimental_bm1387_bitcoin_mining_machine

It's not finished yet, but it's something interesting to have a look if you're planning to make your own ASIC miner, or you want to help create an Open Source one.

Also, the person who created this is now looking to make it work with cgminer:

I’ll see if I can get the cgminer modified for the newpac to talk to the bitaxe

This would be great to tinker with, specially with cgminer.


Cool! what a great project. I'm going to study to make some breadboard.

As a controller before an esp32 is not a Raspberry Pi Zero better?

you thought of increasing the sequence of chips per plate, copying the original chaining

a greeting


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 14, 2022, 02:04:39 PM
Cool! what a great project. I'm going to study to make some breadboard.

As a controller before an esp32 is not a Raspberry Pi Zero better

The Raspberry Pi have a Cortex-A processor which is mostly for running Linux. I'm currently of the impression that's overkill for this miner. I'd like to try and have the miner software run in a RTOS for faster boot and lower power consumption. Of course, I haven't gotten anywhere with the firmware yet, so it might turn out too difficult.

I think the Raspberry Pi Pico W / RP2040 with it's dual core Cortex-M0 and wifi could work, but those were still hard to get when I started down this road. I'm also very intrigued about the open source RISCV core on the ESP32-C3. Seems like a good match for this open source hardware project.

you thought of increasing the sequence of chips per plate, copying the original chaining

Yes! All the time. There is a sweet spot somewhere with price and power consumption. I want to the bitaxe to overcome some of the barriers to entry on the Antminers, but still do some decent hashing.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 14, 2022, 03:23:18 PM
ESP32-C3-DevKitC-02 is an entry-level development board based on ESP32-C3-WROOM-02, a general-purpose module with 4 MB SPI flash. This board integrates complete Wi-Fi and Bluetooth LE functions. I think according to specification It's a little powerful than Raspberry Pi Pico W with RP2040 ( single RISC-V @160 MHz vs 2 x Cortex-M0 @133 MHz ). For what we are trying to do , i think ESP32-C3-DevkitC-02 should work but i am not sure how to run FreeRTOS on the ESP32-C3-DevkitC-02 with cgminer. Anyone with experience please chime in

https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitc-02.html (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitc-02.html)



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 14, 2022, 06:27:28 PM

you thought of increasing the sequence of chips per plate, copying the original chaining

Yes! All the time. There is a sweet spot somewhere with price and power consumption. I want to the bitaxe to overcome some of the barriers to entry on the Antminers, but still do some decent hashing.

Skot or nonce, do you have a draft schematic for dual BM1397 or BM1398 or BM1398BB chips for bitaxeMAX as a reference? . I just started working on Dual BM1398BB schematic to see it would work with ESP32-C3-DevkitC-02 using your work as a reference.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 14, 2022, 07:39:53 PM
Skot or nonce, do you have a draft schematic for dual BM1397 or BM1398 or BM1398BB chips for bitaxeMAX as a reference? . I just started working on Dual BM1398BB schematic to see it would work with ESP32-C3-DevkitC-02 using your work as a reference.

I have just started working on a quad BM1397, but I haven't finished the schematic much less tested it; https://github.com/skot/bitaxe/tree/max4 If you have any thoughts on this lemme know!

All we really have are these repair guides.
BM1397; https://www.zeusbtc.com/manuals/Antminer-S17-Hash-Board-Repair-Guide.asp
BM1398; https://www.zeusbtc.com/manuals/Antminer-S19-Pro-Hash-Board-Repair-Guide.asp

I am a bit hesitant to work with the BM1398, because it's like $10 more per IC, but only a tiny tiny bit more efficient than the BM1397.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on October 14, 2022, 07:59:20 PM
Quote
I am a bit hesitant to work with the BM1398, because it's like $10 more per IC, but only a tiny tiny bit more efficient than the BM1397.
A bigger problem is that you need the driver for the BM1398 to use it with miner software. Cgminer only supports up to the s17 chip and that is because Kano wrote the driver and put it into his latest update of cgminer (https://github.com/kanoi/cgminer) for Sidehack to use with his Compac-F.

Btw: bfgminer as well as -ck's much older version (and last he personally had a hand in) of cgminer do NOT have a driver for the BM1397 chip much less one for the BM1398.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 14, 2022, 09:31:36 PM
Quote
I am a bit hesitant to work with the BM1398, because it's like $10 more per IC, but only a tiny tiny bit more efficient than the BM1397.
A bigger problem is that you need the driver for the BM1398 to use it with miner software. Cgminer only supports up to the s17 chip and that is because Kano wrote the driver and put it into cgminer for Sidehack to use with his Compac-F.

Btw: bfgminer as well as -ck's much older version of cgminer do NOT have a driver for the BM1397 chip much less one for the BM1398.

Thanks . i was actually taking a look at the efficiency and power consumption graph for Bitmain chips

https://minerdaily.com/wp-content/uploads/2021/12/TH-and-W-per-chip-on-Antminer-per-model-Miner-Daily.jpg

S17 Pro chips (144 Chips(BM1397) / Miner ) --- 270 - 350 GH/s per chip  @ 18W @ 7nm

S19 Pro chips (342 Chips(BM1398) / Miner ) --- 190 GH/s per chip @ 9W @ 7 nm

I think i will stick with BM1397 the efficiency is not that bad compared to that of BM1398.

As Skot mentioned if we can get  2 or 3 Chips per board coupled with a small power delivery system . if we can at least keep it below 65W for 3-chip(BM1397) board that would be nice.



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 14, 2022, 09:57:45 PM
Skot or nonce, do you have a draft schematic for dual BM1397 or BM1398 or BM1398BB chips for bitaxeMAX as a reference? . I just started working on Dual BM1398BB schematic to see it would work with ESP32-C3-DevkitC-02 using your work as a reference.

I have just started working on a quad BM1397, but I haven't finished the schematic much less tested it; https://github.com/skot/bitaxe/tree/max4 If you have any thoughts on this lemme know!

All we really have are these repair guides.
BM1397; https://www.zeusbtc.com/manuals/Antminer-S17-Hash-Board-Repair-Guide.asp
BM1398; https://www.zeusbtc.com/manuals/Antminer-S19-Pro-Hash-Board-Repair-Guide.asp

I am a bit hesitant to work with the BM1398, because it's like $10 more per IC, but only a tiny tiny bit more efficient than the BM1397.

After taking a deeper look at BM1398 i think we are better off with BM1397 in terms of price , efficiency and availability


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 15, 2022, 12:58:54 PM
Looking on Aliexpress for  ESP32-C3-DevkitC-02. There are a ton of ESP32 Devkit variants some are 30-Pins and others are 38-pins. The schematic for board says we need 30-pins  ESP32-C3-DevkitC-02. i see

ESP32 30Pin, ESP32-WROOM-32D(38pins), ESP32-WROOM-32D(38Pins)

Can say which will work with our design ? if you can provide the aliexpress link for ESP32-C3-DevkitC-02 that you got.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 15, 2022, 02:50:44 PM
Looking on Aliexpress for  ESP32-C3-DevkitC-02. There are a ton of ESP32 Devkit variants some are 30-Pins and others are 38-pins. The schematic for board says we need 30-pins  ESP32-C3-DevkitC-02. i see

ESP32 30Pin, ESP32-WROOM-32D(38pins), ESP32-WROOM-32D(38Pins)

Can say which will work with our design ? if you can provide the aliexpress link for ESP32-C3-DevkitC-02 that you got.

Yeah, you’re right there are a ton of ESP32 devkits. For this first version I used the Espressif ESP32-C3 dev kit, ESP32-C3-DevkitC-02U. I got it from Digikey https://www.digikey.com/en/products/detail/espressif-systems/ESP32-C3-DEVKITC-02U/15199039 I’m sure you can find it on AliExpress, but you’ll have to sort through a lot of clones of varying compatibility.

I think in the future it makes more sense to just use the ESP32-C3-WROOM-02U module directly. It’s a SMD part and will be a bit more trouble to experiment with.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 16, 2022, 01:48:38 PM
Looking on Aliexpress for  ESP32-C3-DevkitC-02. There are a ton of ESP32 Devkit variants some are 30-Pins and others are 38-pins. The schematic for board says we need 30-pins  ESP32-C3-DevkitC-02. i see

ESP32 30Pin, ESP32-WROOM-32D(38pins), ESP32-WROOM-32U(38Pins)

Can say which will work with our design ? if you can provide the aliexpress link for ESP32-C3-DevkitC-02 that you got.

Yeah, you’re right there are a ton of ESP32 devkits. For this first version I used the Espressif ESP32-C3 dev kit, ESP32-C3-DevkitC-02U. I got it from Digikey https://www.digikey.com/en/products/detail/espressif-systems/ESP32-C3-DEVKITC-02U/15199039 I’m sure you can find it on AliExpress, but you’ll have to sort through a lot of clones of varying compatibility.

I think in the future it makes more sense to just use the ESP32-C3-WROOM-02U module directly. It’s a SMD part and will be a bit more trouble to experiment with.

May be later down the road we should also look at the ESP32-WROOM-32D(38pins) Devkit, ESP32-WROOM-32U(38Pins) Devkit  which are cheaply available and are upgrades .

Later once we have ironed out everything, if we can source every part cheaply i have a long-term PCB manufacuring relationship with a few PCB Fab houses in China, HK & Taiwan , i can offer to manufacture everything at volume for an affordable cost for the community or each member can have it done themselves. Or if you have a different option , chime in , that would be great.

For those looking for ESP32-C3-DevkitC-02 here is the Aliexpress official Expressif store  and also from Digikey has been posted above by skot. Note the difference between 02 with integrated antenna and 02U with external antenna variants is only the maximum ambient operating temp (-40C to 85C  and -40C to 105C ) , everything else is the same
https://www.aliexpress.com/store/1100220184?spm=a2g0o.store_pc_home.pcShopHead_2001819947281.0 (https://www.aliexpress.com/store/1100220184?spm=a2g0o.store_pc_home.pcShopHead_2001819947281.0)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 16, 2022, 05:03:32 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on October 16, 2022, 11:36:32 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?
Very nice! Excited to hear about your results.
I'll take out some time to get back on these projects very soon, as well; right now I still got to order my ('external') 0.8V power supply for powering 2 BM1387 hashboards.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 17, 2022, 04:02:33 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?
Very nice! Excited to hear about your results.
I'll take out some time to get back on these projects very soon, as well; right now I still got to order my ('external') 0.8V power supply for powering 2 BM1387 hashboards.


Nonce or Skot ,  For the assembly of the top of bitaxeMax  that includes ESP32-C3-Devkit and BM1397AG chips  do you guys personally solder them by hand or you use an assembly service to do it. I am looking for a way to streamline the Complete parts order (Except the BM1397) at JLCPCB or PCBWAY or etc

1. Order all parts on JCLPCB or PCBWAY or any other fab house ( both JLCPCB/PCBWAY inventory and external globally sourced) --Note: Globally sourced parts are ordered by the Fab house and shipped to them for your assembly work.
2. Wait for all globally sourced parts required for the bitaxeMax board assembly to arrive at the Assembly factory (JLCPCB / PCBWAY  / others)
3. Place an order for PCB Fabrication with Assembly Service and choose or use the global pre-ordered parts that are now available for this  assembly work
4. Have the completed assembled boards shipped  for the final assembly of BM1397 chips on it ( Skot or Nonce -- do you know any assembly service that can do BM1397 chips & ESP32-C3-DevKitC-02 assembly in North America ? )
5. Test all the boards


i am trying to see if its possible to streamline every process to lower the costs as much as possible so that its affordable even at lower volume e.g 5 , 10 or even 50 fully assembled boards. if we can get the each complete production board cost below let's say below $50 or $60 or $70 or $80 not including taxes, duty and shipping that would fantastic. The lower the price & power consumption the better


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 17, 2022, 08:32:17 PM
May be later down the road we should also look at the ESP32-WROOM-32D(38pins) Devkit, ESP32-WROOM-32U(38Pins) Devkit  which are cheaply available and are upgrades .

I ended up with the ESP32-C3-WROOM-02 based devkit because I'm fascinated with the open source RISC-V core. I've been looking for a project to try it out on, and it looks capable enough for the bitaxe. I'm sure the other ESP32s (with the Tensilica Xtensa cores) could work fine too. And they seem to be cheaper?

Quote
Later once we have ironed out everything, if we can source every part cheaply i have a long-term PCB manufacuring relationship with a few PCB Fab houses in China, HK & Taiwan , i can offer to manufacture everything at volume for an affordable cost for the community or each member can have it done themselves. Or if you have a different option , chime in , that would be great.

Absolutely! That sounds like a great idea. What kind of quantity does it make sense to start at with your fab?

Quote
For those looking for ESP32-C3-DevkitC-02 here is the Aliexpress official Expressif store  and also from Digikey has been posted above by skot. Note the difference between 02 with integrated antenna and 02U with external antenna variants is only the maximum ambient operating temp (-40C to 85C  and -40C to 105C ) , everything else is the same
https://www.aliexpress.com/store/1100220184?spm=a2g0o.store_pc_home.pcShopHead_2001819947281.0 (https://www.aliexpress.com/store/1100220184?spm=a2g0o.store_pc_home.pcShopHead_2001819947281.0)

Wow, yeah I definitely didn't notice the 02/02U distinction! I guess once these arrive I'll have a few of both.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 17, 2022, 08:35:00 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?

That's awesome, I'm excited to have you working on this as well!

I just got the first TPS40305_supply board put together today, and It seems to be working! I haven't tried it out under load yet, and I haven't put together a BitaxeMax yet. Hopefully that will happen this week, I'll keep you posted.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 17, 2022, 08:58:23 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?

That's awesome, I'm excited to have you working on this as well!

I just got the first TPS40305_supply board put together today, and It seems to be working! I haven't tried it out under load yet, and I haven't put together a BitaxeMax yet. Hopefully that will happen this week, I'll keep you posted.

Fantastic , that's good news about TPS40305_supply board . Let's us know after load test. i was in the process of ordering a few to test with bitaxeMax




Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 17, 2022, 09:03:58 PM
Nonce or Skot ,  For the assembly of the top of bitaxeMax  that includes ESP32-C3-Devkit and BM1397AG chips  do you guys personally solder them by hand or you use an assembly service to do it. I am looking for a way to streamline the Complete parts order (Except the BM1397) at JLCPCB or PCBWAY or etc

1. Order all parts on JCLPCB or PCBWAY or any other fab house ( both JLCPCB/PCBWAY inventory and external globally sourced) --Note: Globally sourced parts are ordered by the Fab house and shipped to them for your assembly work.
2. Wait for all globally sourced parts required for the bitaxeMax board assembly to arrive at the Assembly factory (JLCPCB / PCBWAY  / others)
3. Place an order for PCB Fabrication with Assembly Service and choose or use the global pre-ordered parts that are now available for this  assembly work
4. Have the completed assembled boards shipped  for the final assembly of BM1397 chips on it ( Skot or Nonce -- do you know any assembly service that can do BM1397 chips & ESP32-C3-DevKitC-02 assembly in North America ? )
5. Test all the boards


i am trying to see if its possible to streamline every process to lower the costs as much as possible so that its affordable even at lower volume e.g 5 , 10 or even 50 fully assembled boards. if we can get the each complete production board cost below let's say below $50 or $60 or $70 or $80 not including taxes, duty and shipping that would fantastic. The lower the price & power consumption the better

For prototypes in ~QTY5 or less I assemble them myself. I order the PCBs and stencils for each side from China via Seeed, PCBWay, or JLCPCB. I use the stencil to put leaded solder paste on the PCB, then populate the parts with tweezers. Then I reflow the PCBs in a (dedicated) convection toaster oven with a thermocouple temperature probe. It actually works really well once you get the hang of it. There are plenty of Youtube videos covering these techniques if you want to give it a try.

If there are more than 5 boards, or the board is more complex I usually get them assembled by a short run fab. I've used a couple in Silicon Valley, CircuitHub in MA and PCBWay in China.

I'm sure any PCB assembly fab can physically solder the BM1397. If they can't figure out how to source them, we can consign the parts. We don't need to assemble the ESP32-C3-DevKitC-02. The dev kits are just for prototyping. Once things are locked down we can switch to using the ESP32-C3-WROOM-02 modules directly. The fab will be able to source those.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 17, 2022, 09:10:51 PM
Finally ordered the PCB fab plus Assembly plus Stencil , ESP32-C3_devkitC-02U and BM1397AG chip. i will wait for everything to be delivered in 3 weeks before starting to test the hell out of it.

For Skot, Have you tested the TPS40305 power delivery  with BitaxeMax single chip yet? will it be part of a single complete board or  an Add-on daughter board ?

That's awesome, I'm excited to have you working on this as well!

I just got the first TPS40305_supply board put together today, and It seems to be working! I haven't tried it out under load yet, and I haven't put together a BitaxeMax yet. Hopefully that will happen this week, I'll keep you posted.

Fantastic , that's good news about TPS40305_supply board . Let's us know after load test. i was in the process of ordering a few to test with bitaxeMax


I definitely imagine the power supply being incorporated on the bitaxe PCB. Assuming the TPS40305 works, I'm going to move it onboard and make it adjustable from the ESP32 using something like the Maxim DS4432. Adjusting the ASIC core voltage and clock frequency while monitoring the temperature, hashrate and power consumption is how you "tune" the miner for best performance.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on October 17, 2022, 09:44:40 PM
Quote
I definitely imagine the power supply being incorporated on the bitaxe PCB.
Um for god's sake yes!!!
I think I had posted a few links about feeding the chips earlier in the thread... How power is fed to an ASIC, FPGA, CPU, or any other high-power high-speed switching device is a critical design point that is easily overlooked. In short the PDN (Power Delivery Network) is NOT just a simple DC bus - it must be treated as a RF stripline due to the sub-microsecond high current spikes that happen with every clock cycle...

edit: It was in your thread in the Development & Technical area:
A good place to start for resources is TI.
https://www.ti.com/design-resources/design-tools-simulation/processor-fpga-power/overview.html
https://www.ti.com/design-resources/design-tools-simulation/power-stage-designer.html

New goodies:
A good paper on it available through ResearchGate (https://www.researchgate.net/profile/Woojoo-Lee/publication/276300589_Optimizing_a_Reconfigurable_Power_Distribution_Network_in_a_Multicore_Platform/links/59fc1d37458515d070628518/Optimizing-a-Reconfigurable-Power-Distribution-Network-in-a-Multicore-Platform.pdf)

From the EDN archives: https://www.edn.com/debugging-approach-for-resolving-noise-issues-in-a-pdn/
 and very good presentation about it with a very simple test circuit https://www.edn.com/pdn-issues-occur-in-the-simplest-of-circuits/  In that article figures 3 & 4 along with accompanying text clearly shows the problem and that's using a 5v device. ASICs with their <1v Vcore, well...
Results from search of the EDN archives re: PDN's (https://www.edn.com/?s=PDN+design)  
All are highly recommended reading.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 17, 2022, 10:35:31 PM

Quote
Later once we have ironed out everything, if we can source every part cheaply i have a long-term PCB manufacuring relationship with a few PCB Fab houses in China, HK & Taiwan , i can offer to manufacture everything at volume for an affordable cost for the community or each member can have it done themselves. Or if you have a different option , chime in , that would be great.

Absolutely! That sounds like a great idea. What kind of quantity does it make sense to start at with your fab?


In order to lower the 2 major costs associated with fabrication and assembly to an affordable and acceptable entry level for the community on

1. Material / parts
2. Assembly

we need to order the parts in bulk and fabricate for the community in batches . Let's say we start with 50 or 100 complete units and then slowly increase to 200 or 500 or 1000 complete units per batch depending on demand from the community. Normally ordering small/tiny parts on a Reel is much cheaper than a Tape cut. A reel contains usually 1000 or 10000 for very tiny pieces , 100 or 1000 for medium but still slightly small pieces.

Once you add test TPS40305 power delivery to the board PCB, schematic, Gerber files, i will order the next prototype batch of 5 so that we can test it quickly. if you DM me i can send you a few pieces of that batch for testing.
 


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 18, 2022, 03:48:56 PM
I think I had posted a few links about feeding the chips earlier in the thread... How power is fed to an ASIC, FPGA, CPU, or any other high-power high-speed switching device  is a critical design point that is easily overlooked. In short the PDN (Power Delivery Network) is NOT just a simple DC bus - it must be treated as an RF stripline due to the sub-microsecond high current spikes that happen with every clock cycle...

edit: It was in your thread in the Development & Technical area:
A good place to start for resources is TI.
https://www.ti.com/design-resources/design-tools-simulation/processor-fpga-power/overview.html
https://www.ti.com/design-resources/design-tools-simulation/power-stage-designer.html

New goodies:
A good paper on it available through ResearchGate (https://www.researchgate.net/profile/Woojoo-Lee/publication/276300589_Optimizing_a_Reconfigurable_Power_Distribution_Network_in_a_Multicore_Platform/links/59fc1d37458515d070628518/Optimizing-a-Reconfigurable-Power-Distribution-Network-in-a-Multicore-Platform.pdf)

From the EDN archives: https://www.edn.com/debugging-approach-for-resolving-noise-issues-in-a-pdn/
 and very good presentation about it with a very simple test circuit https://www.edn.com/pdn-issues-occur-in-the-simplest-of-circuits/  In that article figures 3 & 4 along with accompanying text clearly shows the problem and that's using a 5v device. ASICs with their <1v Vcore, well...
Results from search of the EDN archives re: PDN's (https://www.edn.com/?s=PDN+design)  
All are highly recommended reading.


This is amazing, thanks NotFuzzyWarm! I’ll definitely check this out. Gotta watch those radiated emissions.
How close do you think an Antminer is to passing a Part 15 EMC test?!  :P


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on October 18, 2022, 08:01:19 PM
Quote
How close do you think an Antminer is to passing a Part 15 EMC test?
I'd be surprised if it does not pass as a Class-B device.

The main point about the RF design aspects of feeding these chips is not so much about cutting down EMI as it is about making sure that the Vcore at the IC pads stays within very tight limits as the clock cycles the gazillions of logic gates in the chip on/off all at the same time.

Remember, unlike a CPU or GPU chip whose various circuits are 'doing their own thing' which includes waiting for data to be passed to/from other areas, in a mining ASIC all of the logic gates in the chip operate in lock-step with every clock cycle. 1 cycle to load data into logic array (cores) from coms buffer (and present result from previous data to coms buffer), 1 cycle to push data through array, rinse & repeat with several thousand logic cores running at several hundred MHz. As a result, the PDN needs to be 'tuned' so to speak to smooth out the resulting current spikes and corresponding voltage dips. That said, since a mining ASIC has very predictable operations going on with no buffering or wait-states involved (aside from in the coms) on vs a CPU/GPU it is much simpler/easier to address the issue.

As pointed out in that 'simple circuit' article (https://www.edn.com/pdn-issues-occur-in-the-simplest-of-circuits/), even with the bypass cap located very close to the chip there is still a sizeable difference in ripple voltage seen at the cap vs at the chip's power pads. That test circuit gave them 89mv ripple at the cap but 1V ripple at the chip located just a few mm away from the cap. Even for a 5v device that is pushing things - 1v is 20% of 5v. Apply that potential 20% ripple to a circuit running at <1v will definitely cause problems because the switching thresholds are far tighter.

Edit: When I started in this Forum in early 2014 I did a fair bit of forensics on the CoinCraft miner from the Swiss company Bitmine.ch (now out of business) that used the A1 chip which Innosilicon designed for them, more precisely their "Made in USA" miner that they 'partnered' with AMT to make & sell here in the USA. Exact-same miner, just with parts sourced, PCB's (using Bitmine's gerber files & BOM's) made by and the miners assembled by the US company IMET. A very large part of their problem was due to absolutely clueless design of the PDN on their hash boards. 2nd issue was Bitmine having absolutely no idea about the proper thermal design that the chips required, 3rd was IMET's lack of experience in dealing with high power chips & the needed *very* thick power planes & thermal vias to move heat leading to innumerable issues...

Even Inno repeatedly pointed out the errors but the Powers-That-Be ignored their advice with disastrous consequences. OTOH, the company that did the famous DragonMiner (not to be confused with the far later DragonMint) that used the exact same A1 ASIC knew how to do things right and produced 1 damn fine miner.

A good start about the Bitmine.ch/AMT kerfuffle starts here (https://bitcointalk.org/index.php?topic=304605.msg5756994#msg5756994) and here  (https://bitcointalk.org/index.php?topic=304605.msg5754814#msg5754814)I'll try to dig up more of those threads that in summary are Poster Child example of how to totally screw a miner design.

Last edit: I guess to summarize this, ja, you *can* use a separate Vcore PSU along with heavy bus cable to feed the hash board like the large miners do with bus bars but remember they are pushing much much higher voltages through long strings of chips. Pushing just a few hundred mv at up to 20A through the cables is not so forgiving. That said, just as the large miners do, the most important bit is to properly address the quality of power presented to each chip and not just to what is fed to the power input planes of the board.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 19, 2022, 01:01:14 PM
Quote
How close do you think an Antminer is to passing a Part 15 EMC test?
I'd be surprised if it does not pass as a Class-B device.

The main point about the RF design aspects of feeding these chips is not so much about cutting down EMI as it is about making sure that the Vcore at the IC pads stays within very tight limits as the clock cycles the gazillions of logic gates in the chip on/off all at the same time.


Edit: When I started in this Forum in early 2014 I did a fair bit of forensics on the CoinCraft miner from the Swiss company Bitmine.ch (now out of business) that used the A1 chip which Innosilicon designed for them, more precisely their "Made in USA" miner that they 'partnered' with AMT to make & sell here in the USA. Exact-same miner, just with parts sourced, PCB's (using Bitmine's gerber files & BOM's) made by and the miners assembled by the US company IMET. A very large part of their problem was due to absolutely clueless design of the PDN on their hash boards. 2nd issue was Bitmine having absolutely no idea about the proper thermal design that the chips required, 3rd was IMET's lack of experience in dealing with high power chips & the needed *very* thick power planes & thermal vias to move heat leading to innumerable issues...

Even Inno repeatedly pointed out the errors but the Powers-That-Be ignored their advice with disastrous consequences. OTOH, the company that did the famous DragonMiner (not to be confused with the far later DragonMint) that used the exact same A1 ASIC knew how to do things right and produced 1 damn fine miner.

wow!! that's a great advice in power delivery design for mining chips

Since you have experience with Mining chip power delivery systems , can you help skot and community with power delivery system so that all of us can benefit from your long-term experience.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on October 19, 2022, 10:31:21 PM
Quote
Since you have experience with Mining chip power delivery systems , can you help skot and community with power delivery system so that all of us can benefit from your long-term experience.
Nope.
8 years ago when I 1st got into mining and joined here I might have but not these days. Going on 67 years old, just don't have the energy to do side projects anymore. After getting home from work (R&D Engineer at LaserMech (https://www.lasermech.com/)) it's just eat dinner, go online for a couple hours and then bed time...
http://www.sherv.net/cm/emoticons/seniors/old-man-taking-off-teeth-smiley-emoticon.gif (http://www.sherv.net/)
That said, those links to EDN articles about PDN design considerations pretty much cover everything giving valuable pointers about what to keep in mind when laying out the power traces to the chip(s), how to calculate the inductance of said traces, and calculate good ball-park values for the bypass caps (located as close as possible to the chips power pads) to minimize the Vcore bounce.

If anything, just take care with the layout and have a variety of bypass caps with different values you can tack onto the board and experiment with to produce the lowest amount of ripple seen at the chip power pads. Again it must be emphasized to not only place the 'scope probe on the Vcore pad but also attach the 'scope return lead to the chip power return pad. Um, I should add that the 'scope MUST have an ungrounded probe return! These days most do along with the multi-trace 'scopes having each channel return isolated from each other as well as from chassis ground. Connecting the return anywhere else introduces artifacts caused by the high frequency currents flowing through the power planes.

It's not difficult to get right or even 'good enough', it's just that it's too easy for folks to not give the matter a 2nd thought and just use a good ol' 0.1mfd cap stuck nearby the chip, leave it at that, then wonder why the circuit is glitchy. As a bonus it would be a good lab experiment for you to see the effects of looking at the voltages not only at the chip but also at various random points on the power planes. Tip: Use the 'scope set to AC input mode, it will let you turn up the gain to have a good view of the ripple voltages. Most newcomers to the high-speed power circuit design world are astonished at how different things look when probing at various locations on a solid power plane - as I've said elsewhere, this is not a simple DC bus feeding a static load or even one using devices with (in comparison) slow switching times. It acts like a DC-biased RF power circuit.

Edit: For a good in-depth look into the 'joys' of miner design, I highly recommend the Bitmine CoinCraft A1 28nm chip distribution / DIY support thread (https://bitcointalk.org/index.php?topic=294235.msg3153659#msg3153659) thread. It is about doing the exact same thing you are doing - a community -designed, open source miner - but using the A1 chip. That thread also drifts into a couple other community-miner design projects that were going on in the early days. That thread was of immense help when I did the forensics for AMT on the (Bitmine.ch) miner they were trying to produce. In short it covered everything that killed the Swiss design so I had a good idea what to look at. The lead designer in the thread even let Bitmine know what to do and the company ignored them. Oops...

Last edit: About the bypass caps. Note the plural. Best practice is to use several different value caps in parallel to get the final total capacitance needed. Usually 2 is fine with a small one 1/10th the size of a big one. 3 caps is even better. That allows each cap to target different parts of the wide range of harmonics the spike produce.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 20, 2022, 04:14:04 AM
Edit: For a good in-depth look into the 'joys' of miner design, I highly recommend the Bitmine CoinCraft A1 28nm chip distribution / DIY support thread (https://bitcointalk.org/index.php?topic=294235.msg3153659#msg3153659) thread. It is about doing the exact same thing you are doing - a community -designed, open source miner - but using the A1 chip. That thread also drifts into a couple other community-miner design projects that were going on in the early days. That thread was of immense help when I did the forensics for AMT on the (Bitmine.ch) miner they were trying to produce. In short it covered everything that killed the Swiss design so I had a good idea what to look at. The lead designer in the thread even let Bitmine know what to do and the company ignored them. Oops...

Wow, that's a trip to see that old development thread.

Quote
0.85BTC per chip (25GH). At $150/BTC, that's $127.50 per 25 GH, or $5.1/GH

Those ASICs were expensive!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 20, 2022, 04:09:38 PM

Wow, that's a trip to see that old development thread.

Quote

0.85BTC per chip (25GH). At $150/BTC, that's $127.50 per 25 GH, or $5.1/GH


Those ASICs were expensive!

Agree !!!!! that was extremely expensive for that to survive. Currently  New BM1397 @$20/chip @ 300GH/s  @ 20W = approx  $0.067/GH @ 15GH/W


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 20, 2022, 04:29:05 PM
skot, have you managed to test the load on the TPS40305 Power delivery board that you got ? if yes, have you by any chance managed to update the schematic / pcb for a combined single board with 2 or 4 chips considering what the Notfuzzywarm mentioned about high ripple across the power plane.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 21, 2022, 02:05:46 AM
skot, have you managed to test the load on the TPS40305 Power delivery board that you got ? if yes, have you by any chance managed to update the schematic / pcb for a combined single board with 2 or 4 chips considering what the Notfuzzywarm mentioned about high ripple across the power plane.

Just got the bitaxeMax (single BM1397) setup today and started testing with the TPS40305_supply board.. It works!

here is an exciting line from cgminer:
0: GSF 3NNU10x0: BM1397:01+ 445.00MHz T:600 P:311 (28:14) | 66.1% WU: 65% | 174.6G / 151.9Gh/s WU:2122.0/m

I was playing around with the core voltage a bit and the TPS40305 seemed to be able to handle 17 Watts. The mosfets and inductor definitely got warm, but not hot.

I forgot to pull the enable line on the bitaxe 25MHz oscillator high. once I air wired that, everything came alive. https://github.com/skot/bitaxe/issues/9

I'm in between oscilloscopes at the moment, so it will be a bit before I can try NotFuzzyWarm's tip to measure the core voltage ripple at the ASIC.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 21, 2022, 06:54:29 PM
skot, have you managed to test the load on the TPS40305 Power delivery board that you got ? if yes, have you by any chance managed to update the schematic / pcb for a combined single board with 2 or 4 chips considering what the Notfuzzywarm mentioned about high ripple across the power plane.

Just got the bitaxeMax (single BM1397) setup today and started testing with the TPS40305_supply board.. It works!

here is an exciting line from cgminer:
0: GSF 3NNU10x0: BM1397:01+ 445.00MHz T:600 P:311 (28:14) | 66.1% WU: 65% | 174.6G / 151.9Gh/s WU:2122.0/m

I was playing around with the core voltage a bit and the TPS40305 seemed to be able to handle 17 Watts. The mosfets and inductor definitely got warm, but not hot.

I forgot to pull the enable line on the bitaxe 25MHz oscillator high. once I air wired that, everything came alive. https://github.com/skot/bitaxe/issues/9

I'm in between oscilloscopes at the moment, so it will be a bit before I can try NotFuzzyWarm's tip to measure the core voltage ripple at the ASIC.

Sweet line and great progress. I checked the TPS40305 reference design on TI website with WEBENCH Designer  even with an EMI filter added and lowest Ripple on the power plane , i could only simulate it pulling out  total power of 18W. So at 17W then you must be almost at Max for that buck converter.

Did you get it anywhere above 300 GH/s in your test? Can Maxim Voltage adjuster  be used to push it above 300 GH/s ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on October 22, 2022, 12:26:14 AM
~
Fuzzy! You legend! Thanks for all this information again.. :D It makes total sense.

Due to limited time I may just quickly order some BitaxeMAX boards and probe around those with my scope; I feel like getting my breakout board to run is pointless after the insane progress lately, made by Skot.
Hopefully I can contribute more by analyzing his latest boards and checking what can be improved.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on October 22, 2022, 12:41:12 AM
~
Fuzzy! You legend! Thanks for all this information again.. :D It makes total sense.

Due to limited time I may just quickly order some BitaxeMAX boards and probe around those with my scope; I feel like getting my breakout board to run is pointless after the insane progress lately, made by Skot.
Hopefully I can contribute more by analyzing his latest boards and checking what can be improved.
Just passing on the Ancient Wisdom accumulated over the many many decades of doing the Voodoo that I do so well...
http://www.sherv.net/cm/emoticons/jobs/teacher-smiley-emoticon.gif (http://www.sherv.net/) They just do not teach that stuff in schools any more und unless one interns under the right mentors well...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on October 22, 2022, 02:16:30 PM
I'm not sure how much worse it is now but when I finished my EE/CpE over a decade ago, half my senior design class had never used a soldering iron, and that's at one of the best engineering schools in the midwest (usually ranked #1 when comparing quality versus price). It's definitely disappointing how much hands-on stuff isn't being taught.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 24, 2022, 10:34:24 PM
~
Fuzzy! You legend! Thanks for all this information again.. :D It makes total sense.

Due to limited time I may just quickly order some BitaxeMAX boards and probe around those with my scope; I feel like getting my breakout board to run is pointless after the insane progress lately, made by Skot.
Hopefully I can contribute more by analyzing his latest boards and checking what can be improved.

i finally got the initial BM1397 bitaxeMax boards that i ordered and started assembly. Hope to test it this coming week. Also working from the BitaxeMax4 schematic that skot has updated to see if i can add power delivery system with an EMI filter or  Maxim DS4432 on the board


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 25, 2022, 01:51:58 AM
i finally got the initial BM1397 bitaxeMax boards that i ordered and started assembly. Hope to test it this coming week. Also working from the BitaxeMax4 schematic that skot has updated to see if i can add power delivery system with an EMI filter or  Maxim DS4432 on the board

Thats awesome! There is one goof (that I've found so far) on the R1 PCBs. Should be an easy bodge wire fix; I put details in the GitHub issue; https://github.com/skot/bitaxe/issues/9

lemme know if you have questions..


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 25, 2022, 01:32:02 PM
i finally got the initial BM1397 bitaxeMax boards that i ordered and started assembly. Hope to test it this coming week. Also working from the BitaxeMax4 schematic that skot has updated to see if i can add power delivery system with an EMI filter or  Maxim DS4432 on the board

Thats awesome! There is one goof (that I've found so far) on the R1 PCBs. Should be an easy bodge wire fix; I put details in the GitHub issue; https://github.com/skot/bitaxe/issues/9

lemme know if you have questions..

i checked out the R1 PCB which is what i have. Did you update that wire from TP10 to TP1  in the Kicad PCB on github yet ? probably rename the PCB to R2 after update

Skot,What kicad plugin do you use for Auto routing and placement on the PCB from bitaxeMax4 schematic ? Is there an easier way than updating and doing placement and routing manually ? i usually use Freerouting plugin in Kicad. Maybe there is a better way ? i know Altium and other CAD software do have such plugins.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on October 28, 2022, 12:53:51 AM
i checked out the R1 PCB which is what i have. Did you update that wire from TP10 to TP1  in the Kicad PCB on github yet ? probably rename the PCB to R2 after update
Yes, I have updated the schematic and PCB. That’s a good idea to update the revision. I’ll do that soon.

Quote
Skot,What kicad plugin do you use for Auto routing and placement on the PCB from bitaxeMax4 schematic ? Is there an easier way than updating and doing placement and routing manually ? i usually use Freerouting plugin in Kicad. Maybe there is a better way ? i know Altium and other CAD software do have such plugins.
I route everything manually. This isn’t a very complicated board, and getting the high current tracks right is super important.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on October 28, 2022, 02:01:28 PM
Skot, i wanted to send you bitaxeMax4 schematic that i was working on so that you can check it out, its still WIP schematic. If you can create DEV branch on the bitmax4 github repo and add me as a contributor so that i can upload the dev bitaxeMax4 schematic that would be great. i have a forked repo of bitaxeMax4 that i am using for now to try out various schematic designs  

Skot, Any progress with cgminer software (Kanoi version) running on FreeRTOS on the ESP32-C3-Devkit ?  any instructions so as to test the complete setup.  


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: srloin on November 07, 2022, 09:26:39 PM
Hi guys, long-time lurker, and my old account was shut down apparently.

Anyway, I just want to say awesome work and I would love to help out, even if it is just ordering PCBs and testing/contributing to the open-source software for them.

I plan to purchase a slew of the different ASICs. I know this project is targeting specific ones, but I believe it could be adjusted to also test out other ones. There is a lot of closed-source software that was built on the open-source code of others. I think this is a great way to be able to document these chips both in hardware and from a software perspective.

Nice work!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: nullama on November 07, 2022, 09:39:10 PM
I don't know if it's possible, but it would be amazing if there's manual or automatic fan control based on the temperature, as well as having control of the power consumed somehow.

It would be great to be able to run these silently at lower specs.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 07, 2022, 09:46:06 PM
...
I plan to purchase a slew of the different ASICs. I know this project is targeting specific ones, but I believe it could be adjusted to also test out other ones. ...
To use any ASIC mining chip you need the Secret Sauce for it -- in other words, the driver for it. In most cases said driver(s) is closed source and without it your mining software is useless. That said, if you can write the needed drivers then ja, not a bad idea though it's certainly not a new one.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 08, 2022, 11:36:29 PM
Skot, i wanted to send you bitaxeMax4 schematic that i was working on so that you can check it out, its still WIP schematic. If you can create DEV branch on the bitmax4 github repo and add me as a contributor so that i can upload the dev bitaxeMax4 schematic that would be great. i have a forked repo of bitaxeMax4 that i am using for now to try out various schematic designs  

Skot, Any progress with cgminer software (Kanoi version) running on FreeRTOS on the ESP32-C3-Devkit ?  any instructions so as to test the complete setup.  

Hey, sorry for the delay! gotta make sure I get the work stuff done.... so I can buy more parts haha.

I _think_ the thing to do is fork the repo on GitHub, do your experiments there. Then you can send me a pull request and I can merge it back into my bitaxeMax repo (if you want). I could take a look too at what you have if you send me your git repo url.

I have played around with the cJSON library a bit for parsing Stratum messages on the ESP32. nothing solid to report yet. Any firmware people out there want to help?!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 08, 2022, 11:41:30 PM
Hi guys, long-time lurker, and my old account was shut down apparently.

Anyway, I just want to say awesome work and I would love to help out, even if it is just ordering PCBs and testing/contributing to the open-source software for them.

I plan to purchase a slew of the different ASICs. I know this project is targeting specific ones, but I believe it could be adjusted to also test out other ones. There is a lot of closed-source software that was built on the open-source code of others. I think this is a great way to be able to document these chips both in hardware and from a software perspective.

Nice work!

Cool!! great to have you. I hear you about the "closed-source software that was built on the open-source code" problem. We wouldn't be here if Satoshi hadn't open sourced this whole bitcoin thing. Just because there is hardware involved doesn't mean we have to get all uptight and proprietary.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 08, 2022, 11:44:27 PM
I don't know if it's possible, but it would be amazing if there's manual or automatic fan control based on the temperature, as well as having control of the power consumed somehow.

It would be great to be able to run these silently at lower specs.

That seems pretty doable. I think 4pin fans have PWM speed control, and the ESP32 would make short work of that.

Controlling the power is as "easy" as changing the ASIC core voltage and the hashing frequency. The hardware will definitely support it, just gotta make some headway on the ESP32 firmware.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 08, 2022, 11:53:35 PM
...
I plan to purchase a slew of the different ASICs. I know this project is targeting specific ones, but I believe it could be adjusted to also test out other ones. ...
To use any ASIC mining chip you need the Secret Sauce for it -- in other words, the driver for it. In most cases said driver(s) is closed source and without it your mining software is useless. That said, if you can write the needed drivers then ja, not a bad idea though it's certainly not a new one.

We've heard rumors of Block making an open source ASIC, although I haven't heard any news on that front in a long while. Maybe now that they had a solid earnings report we'll hear more? BitFury also has well-documented mining ASICs (https://bitfury.com/hardware/asic), but the efficiency there leaves something to be desired.

It's also pretty hard to stop a motivated reverse engineer with a mining machine and a logic analyzer. How did cgminer get the drivers for the BM1384, BM1389 and BM1397?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 09, 2022, 01:10:54 AM
...
I plan to purchase a slew of the different ASICs. I know this project is targeting specific ones, but I believe it could be adjusted to also test out other ones. ...
To use any ASIC mining chip you need the Secret Sauce for it -- in other words, the driver for it. In most cases said driver(s) is closed source and without it your mining software is useless. That said, if you can write the needed drivers then ja, not a bad idea though it's certainly not a new one.
We've heard rumors of Block making an open source ASIC, although I haven't heard any news on that front in a long while. Maybe now that they had a solid earnings report we'll hear more? BitFury also has well-documented mining ASICs (https://bitfury.com/hardware/asic), but the efficiency there leaves something to be desired.

It's also pretty hard to stop a motivated reverse engineer with a mining machine and a logic analyzer. How did cgminer get the drivers for the BM1384, BM1389 and BM1397?
By Sidehack and -vh then Kano doing exactly that. Sidehack mapped out the IO and -vh did the `84 & `89 drivers. It helped a lot that that Bitmain eventually did release the code for their s9 and their subsequent chips largely use the same data structures and signaling. Kano did the 1397 (s17 chip) driver for Sidehack's Compac-F as well as cleaned up the older code from -vh and other niggling bits which became the latest cgminer (https://github.com/kanoi/cgminer).

As for Bitfury... per Kano and Sidehack they are a bitch to work with. For 1 you pretty much must use *their* driver with no changes allowed - and it sux...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 09, 2022, 03:14:22 AM
By Sidehack and -vh then Kano doing exactly that. Sidehack mapped out the IO and -vh did the `84 & `89 drivers. It helped a lot that that Bitmain eventually did release the code for their s9 and their subsequent chips largely use the same data structures and signaling. Kano did the 1397 (s17 chip) driver for Sidehack's Compac-F as well as cleaned up the older code from -vh and other niggling bits which became the latest cgminer (https://github.com/kanoi/cgminer).
I am definitely grateful for that, and putting it under GPL! Thanks Sidehack and -vh then Kano!
Quote
As for Bitfury... per Kano and Sidehack they are a bitch to work with. For 1 you pretty much must use *their* driver with no changes allowed - and it sux...
The datasheet for the Bitfury Clarke (https://bitfury.com/content/downloads/bitfury-clarke-datasheet-3.pdf) at least has all of the registers laid out, and it seems somewhat organized. Certainly better than the last Bitmain documentation we got, which was for the BM1385?? (https://bits.media/images/asic-miner-antminer-s7/BM1385_Datasheet_v2.0.pdf).

Either way, I think I'm going to stick with the BM1397 for now. I picked up some used BM1397AG from China for 1/3rd the price of new. I'm very curious how those work out.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 09, 2022, 03:33:43 AM
I have played around with the cJSON library a bit for parsing Stratum messages on the ESP32. nothing solid to report yet. Any firmware people out there want to help?!
I can can definitely give you a hand for the firmware. Just strapped for time for a few more weeks, but I can sneak some extra free time in here and there.
Can you elaborate what's the issue? :) Do you have some base / boilerplate code for the ESP32 already? If so, just push it to a new GitHub repo and I'll have a look.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: SIRBTC on November 11, 2022, 07:26:46 PM
Skot, i wanted to send you bitaxeMax4 schematic that i was working on so that you can check it out, its still WIP schematic. If you can create DEV branch on the bitmax4 github repo and add me as a contributor so that i can upload the dev bitaxeMax4 schematic that would be great. i have a forked repo of bitaxeMax4 that i am using for now to try out various schematic designs  

Skot, Any progress with cgminer software (Kanoi version) running on FreeRTOS on the ESP32-C3-Devkit ?  any instructions so as to test the complete setup.  

Hey, sorry for the delay! gotta make sure I get the work stuff done.... so I can buy more parts haha.

I _think_ the thing to do is fork the repo on GitHub, do your experiments there. Then you can send me a pull request and I can merge it back into my bitaxeMax repo (if you want). I could take a look too at what you have if you send me your git repo url.

I have played around with the cJSON library a bit for parsing Stratum messages on the ESP32. nothing solid to report yet. Any firmware people out there want to help?!

Hi, I speak spanish but I will try to write In English. If you need a code for to create a Miner BTC with ESP32 there are a code for Arduino.
The Code generate a Miner and conect with BFGMiner. ¿Do you need this?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on November 12, 2022, 08:46:15 AM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 12, 2022, 11:02:27 AM
Skot, i wanted to send you bitaxeMax4 schematic that i was working on so that you can check it out, its still WIP schematic. If you can create DEV branch on the bitmax4 github repo and add me as a contributor so that i can upload the dev bitaxeMax4 schematic that would be great. i have a forked repo of bitaxeMax4 that i am using for now to try out various schematic designs  

Skot, Any progress with cgminer software (Kanoi version) running on FreeRTOS on the ESP32-C3-Devkit ?  any instructions so as to test the complete setup.  

Hey, sorry for the delay! gotta make sure I get the work stuff done.... so I can buy more parts haha.

I _think_ the thing to do is fork the repo on GitHub, do your experiments there. Then you can send me a pull request and I can merge it back into my bitaxeMax repo (if you want). I could take a look too at what you have if you send me your git repo url.

I have played around with the cJSON library a bit for parsing Stratum messages on the ESP32. nothing solid to report yet. Any firmware people out there want to help?!

Hi, I speak spanish but I will try to write In English. If you need a code for to create a Miner BTC with ESP32 there are a code for Arduino.
The Code generate a Miner and conect with BFGMiner. ¿Do you need this?

i have come across some info from a paper and some project work by Kinshuk Dua on ESP32 which can be used as a starting point. It is basically a simple BTC stratum miner running on ESP32-C3_DevKitC-02. You would need to port Kanoi's version of Cgminer 4.12 to run on ESP32 or extract and port the Drivers used by gekko Compac-F for BM1387 and BM1397. The issue is that the gekko driver does utlize the standard Linux distro libraries and i am not sure if ESP32 with FreeRTOS will have what is needed to do that

https://anonymous.4open.science/r/cryptominer (https://anonymous.4open.science/r/cryptominer)
https://arxiv.org/pdf/2205.01646v1.pdf (https://arxiv.org/pdf/2205.01646v1.pdf)
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4047844 (https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4047844)

If anyone can help with this,  it would be great. ESP32-C3 does not have much memory  just 4 MB SPI flash



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: SIRBTC on November 12, 2022, 03:24:43 PM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 13, 2022, 03:27:49 AM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

i think Skot has 2 working development versions with
1. with 2 x BM1387 (bitaxe) and
2. with 1 x BM1397(bitaxeMax)

and i am just finishing the PCB assembly of  bitaxeMax (1 x BM1397) version for dev testing. Also started working on a schematic with 4 chips in series but have not done much on that it will be interesting to see and discover. 


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 13, 2022, 08:40:53 PM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




i have looked at running bare-metal Linux 5.0 kernel and cgminer 4.12 on ESP32-C3-DevkitC-02 but can't seem to find a better clean way to do it. Everything seems so complex with tons of bugs to accomplish. The best way is always the simplest way.

Just to run bare-metal Linux 5.0 kernel on ESP32-C3 you need to add external memory using the SPI at least  8 MB (preferably 16 MB )  PSRAM plus 2 or 4 MB Flash and then connect a MicroSD for storage (32 or 64 GB ). Should we rethink using ESP32-C3-DevKitC-02 ? and try something else ? Not sure what it might be.

How about using  -- The Raspberry Pi Zero 2 W  for US $15-- it has everything we need with 40-pin breakout with all the pins we need and might act as drop in replacement for ESP32-C3-DevkitC-02. it can run 32bit & 64Bit ubuntu 20.04, 21.04 and so on. All we need is to add cgminer 4.12 (Kanoi version ) . Any ideas or experience about this ? i think Nonce did something similar .


Porting Cgminer 4.12 drivers for Gekko Compac-F to ESP32 is something we really need !!! .


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: SIRBTC on November 14, 2022, 09:36:32 AM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




i have looked at running bare-metal Linux 5.0 kernel and cgminer 4.12 on ESP32-C3-DevkitC-02 but can't seem to find a better clean way to do it. Everything seems so complex with tons of bugs to accomplish. The best way is always the simplest way.

Just to run bare-metal Linux 5.0 kernel on ESP32-C3 you need to add external memory using the SPI at least  8 MB (preferably 16 MB )  PSRAM plus 2 or 4 MB Flash and then connect a MicroSD for storage (32 or 64 GB ). Should we rethink using ESP32-C3-DevKitC-02 ? and try something else ? Not sure what it might be.

How about using  -- The Raspberry Pi Zero 2 W  for US $15-- it has everything we need with 40-pin breakout with all the pins we need and might act as drop in replacement for ESP32-C3-DevkitC-02. it can run 32bit & 64Bit ubuntu 20.04, 21.04 and so on. All we need is to add cgminer 4.12 (Kanoi version ) . Any ideas or experience about this ? i think Nonce did something similar .


Porting Cgminer 4.12 drivers for Gekko Compac-F to ESP32 is something we really need !!! .



Hi, ¿This can help tou? Linux 5 in ESP32 and link for ubuntu 9 in ESP32

https://www.cnx-software.es/2021/07/19/linux-5-0-arranca-en-el-procesador-esp32/

Tell me something for try help you........is yuo have telegram or Discord and need speak tell me too.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 14, 2022, 01:35:24 PM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




i have looked at running bare-metal Linux 5.0 kernel and cgminer 4.12 on ESP32-C3-DevkitC-02 but can't seem to find a better clean way to do it. Everything seems so complex with tons of bugs to accomplish. The best way is always the simplest way.

Just to run bare-metal Linux 5.0 kernel on ESP32-C3 you need to add external memory using the SPI at least  8 MB (preferably 16 MB )  PSRAM plus 2 or 4 MB Flash and then connect a MicroSD for storage (32 or 64 GB ). Should we rethink using ESP32-C3-DevKitC-02 ? and try something else ? Not sure what it might be.

How about using  -- The Raspberry Pi Zero 2 W  for US $15-- it has everything we need with 40-pin breakout with all the pins we need and might act as drop in replacement for ESP32-C3-DevkitC-02. it can run 32bit & 64Bit ubuntu 20.04, 21.04 and so on. All we need is to add cgminer 4.12 (Kanoi version ) . Any ideas or experience about this ? i think Nonce did something similar .


Porting Cgminer 4.12 drivers for Gekko Compac-F to ESP32 is something we really need !!! .



Hi, ¿This can help tou? Linux 5 in ESP32 and link for ubuntu 9 in ESP32

https://www.cnx-software.es/2021/07/19/linux-5-0-arranca-en-el-procesador-esp32/

Tell me something for try help you........is yuo have telegram or Discord and need speak tell me too.

i think that's just running JuiceVM emulation with ubuntu 9.  i think we don't need a vm if the native CPU supports standard Linux Distro . Instead i am thinking of Ubuntu 20.04 , 21.04 etc  with Cgminer 4.12 and that's supported on Raspberry Pi Zero 2 W and no need to do a lot of messing around .  


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: SIRBTC on November 14, 2022, 04:09:08 PM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




i have looked at running bare-metal Linux 5.0 kernel and cgminer 4.12 on ESP32-C3-DevkitC-02 but can't seem to find a better clean way to do it. Everything seems so complex with tons of bugs to accomplish. The best way is always the simplest way.

Just to run bare-metal Linux 5.0 kernel on ESP32-C3 you need to add external memory using the SPI at least  8 MB (preferably 16 MB )  PSRAM plus 2 or 4 MB Flash and then connect a MicroSD for storage (32 or 64 GB ). Should we rethink using ESP32-C3-DevKitC-02 ? and try something else ? Not sure what it might be.

How about using  -- The Raspberry Pi Zero 2 W  for US $15-- it has everything we need with 40-pin breakout with all the pins we need and might act as drop in replacement for ESP32-C3-DevkitC-02. it can run 32bit & 64Bit ubuntu 20.04, 21.04 and so on. All we need is to add cgminer 4.12 (Kanoi version ) . Any ideas or experience about this ? i think Nonce did something similar .


Porting Cgminer 4.12 drivers for Gekko Compac-F to ESP32 is something we really need !!! .



Hi, ¿This can help tou? Linux 5 in ESP32 and link for ubuntu 9 in ESP32

https://www.cnx-software.es/2021/07/19/linux-5-0-arranca-en-el-procesador-esp32/

Tell me something for try help you........is yuo have telegram or Discord and need speak tell me too.

i think that's just running JuiceVM emulation with ubuntu 9.  i think we don't need a vm if the native CPU supports standard Linux Distro . Instead i am thinking of Ubuntu 20.04 , 21.04 etc  with Cgminer 4.12 and that's supported on Raspberry Pi Zero 2 W and no need to do a lot of messing around .  


Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 14, 2022, 04:22:03 PM
Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue.
Frankly, using the Pi Zero or Pico is your best bet. Cgminer itself only takes a few hundred MB when running so it seems a very bad choice to use an emulator/whatnot to be able to run in on a non-native platform that would require far more memory.

Oh, and please notice that one does not have to constantly quote entire msg chains...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: SIRBTC on November 15, 2022, 09:31:52 AM
Ok, I understand, just one more thing, there is a version of ESP32 with 16MB Flash and 8MB PSRAM, you can't avoid using the microUSD but at least it would cover the memory issue.
Frankly, using the Pi Zero or Pico is your best bet. Cgminer itself only takes a few hundred MB when running so it seems a very bad choice to use an emulator/whatnot to be able to run in on a non-native platform that would require far more memory.

Oh, and please notice that one does not have to constantly quote entire msg chains...

Hello, you are right, the simplest thing to install Linux is to do it on the Pi Zero, the difference is that the ESP32 has a double core prepared to mine Crypto and gives you a higher performance x2.

Ups!! excuseme for reply entire msg.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on November 15, 2022, 12:59:50 PM
So has somebody here actually done it and built this miner and can tell what is the efficiency in comparison to simply using a complete S9? I would be interested in pulling apart an S9 to do the project, but so far I’m not shure if it is really worth it.

¿Can help you with this? Code Miner for ESP32 (arduino)

https://github.com/joric/arduino-bitcoin-miner

I have a few knowledge with this and other Arduinos Codes for ESP32, only a few but I was figthing with this same weeks. (excume for my English)




Sadly I don’t give such coding skills, but I would gladly try to set up a device like this if I get the right software for it. Because from a technical kind of view I can for shure assemble such a miner.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 15, 2022, 03:50:24 PM
Hello, you are right, the simplest thing to install Linux is to do it on the Pi Zero, the difference is that the ESP32 has a double core prepared to mine Crypto and gives you a higher performance x2.
If anything, the Pi Zero has heaps more processing power. In fact, it has a quad-core 64-bit ARM Cortex-A53 SoC running at 1GHz and also has 512MB of RAM.
The main reason for Skot to choose ESP32 is that it's cheaper and doesn't run a full OS. Microcontrollers like this also recover easier / more reliably from sudden power cuts, which makes them better suited to control smaller numbers of ASIC chips.
It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis.
You also can't usually order Raspberry Pi in large quantities.

Looking at RP2040 would be interesting, though. Can be bought relatively cheap, in bulk, not affected by chip shortage..


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 16, 2022, 06:24:36 PM


It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis.
You also can't usually order Raspberry Pi in large quantities.

Looking at RP2040 would be interesting, though. Can be bought relatively cheap, in bulk, not affected by chip shortage..

i agree that Raspberry Pi Zero 2 W is hard to get right now therefore very expensive and ESP32 is ideal but its lacking in necessary software support and resources. we don't want to reinvent the wheel every time we need to accomplish something.

There is big shortage of Pi Zero sized SBC units around the world . Normal prices are around USD$20 or less but due to chip shortages and high inflation around the world , they have shot up to US$ 45 to US$200 depending the specifications
 
I have been looking at Raspberry Pi Zero 2 W Clones  ( with 4GB RAM and 16GB Storage  with inbuilt WiFi) which support running standard Linux Distro like Ubuntu 20.04+ with or without a desktop :

The following come to mind (but also be careful about standard Linux Distro software support for the clones):

1.  Radxa Zero ( or upcoming Radxa Zero 2 ) ---- 64bit 4G RAM, 16GB eMMC, built-in WiFi ( around  US$50 ) --- Can run ubuntu 20.04 Server out-of-box with cgminer 4.12 --- You can order this in bulk
2.  Banana Pi M2 Zero BPI-M2 with H3 Allwinner -- 512 MB RAM, with Micro SD and built-in WiFi
3.  MangoPi MQ-Pro Allwinner D1  --- 1 GB RAM , with Micro SD and built-in WiFi
4.  Raspberry Pi Pico RP2040 -- will need to go through same issues as ESP32-C3-DevkitC-02


Radxa Zero also have variants with 512 MB, 1 GB, 2GB that are cheaper at around $39 or less.   With Chip shortages its hard to get lower cheap prices for anything that can do the job.

Check this or aliexpress
https://shop.allnetchina.cn/collections/frontpage/products/copy-of-radxa-zero?variant=39440872276070 (https://shop.allnetchina.cn/collections/frontpage/products/copy-of-radxa-zero?variant=39440872276070)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 17, 2022, 10:49:01 PM
If anything, the Pi Zero has heaps more processing power. In fact, it has a quad-core 64-bit ARM Cortex-A53 SoC running at 1GHz and also has 512MB of RAM.
The main reason for Skot to choose ESP32 is that it's cheaper and doesn't run a full OS. Microcontrollers like this also recover easier / more reliably from sudden power cuts, which makes them better suited to control smaller numbers of ASIC chips.
It would be both a waste in money and computing power to use a Pi Zero 2 W to control 2 BM1397 chips, as well as being a hassle to troubleshoot a larger deployment of e.g. 20 Bitaxes with 20 Raspberry Pis.
You also can't usually order Raspberry Pi in large quantities.

yes, exactly! :)

I don't think you guys are going to get Linux running on a ESP32. Not well at least. When I was talking about running cgminer on a ESP32, what I meant was: Porting some of the functionality of cgminer to the ESP32.

The things that cgminer Kano edition can do that need to run on the ESP32 (as ESP-Miner) are:
- Turning on and configuring the BM1397 over serial
      - Setting the baud rate, hashing frequency, and filling in some other mystery registers
- Connecting to a pool or stratum server and getting the latest work over the stratum JSON-RPC protocol.
      - we need a place to configure this URL too.. maybe on a simple webpage hosted on the ESP32?
- Parsing that work into the format that the BM1397 wants
      - it's really pretty similar. the only tricky thing is the midstates, but Kano seems to have figured this out.
- Sending the work to the BM1397 over serial. 115200 baud is prolly fine.
- Listening for replies from the BM1397 (decent hashes)
      - based on the hashing frequency, know when the BM1397 has been at it for too long and send it some new work.
- Packaging up those replies into the format that the stratum server wants and sending it off.

- All of the administrative stuff of running a miner like;
     - Set the BM1397 core voltage and current.
     - check the fan speed
     - check the BM1397 temperature
     - optimize the hashing frequency and core voltage for max efficiency

I put this together with a (hastily made) block diagram on GitHub; https://github.com/skot/ESP-Miner
alas, I have not coded any of this yet. I tried out some of the ESP-IDF WiFi sample projects and they worked great. I messed around with cJSON and it seems very capable of parsing JSON-RPC. https://github.com/DaveGamble/cJSON


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 18, 2022, 06:21:28 PM
I put this together with a (hastily made) block diagram on GitHub; https://github.com/skot/ESP-Miner
alas, I have not coded any of this yet. I tried out some of the ESP-IDF WiFi sample projects and they worked great. I messed around with cJSON and it seems very capable of parsing JSON-RPC. https://github.com/DaveGamble/cJSON
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained).
This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_Supply
I have my GekkoScience hub kicking around that I'd regulate down to the core voltage required by BitaxeMAX, using this step-down circuit.

Are you running your BitaxeMAX off that PSU or still off of your lab power supply?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 20, 2022, 02:10:21 AM
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained).
This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_Supply

Yup, exactly! Running low voltage-high current from the TPS40305 to the bitaxeMax over those connectors is not ideal. (Like NotFuzzyWarm said earlier). It should really all be on the same board. I was waiting to make some progress on the ESP32 firmware side of things before making another PCB, but maybe I should just do this.

Quote
I have my GekkoScience hub kicking around that I'd regulate down to the core voltage required by BitaxeMAX, using this step-down circuit.

Are you running your BitaxeMAX off that PSU or still off of your lab power supply?

I am running my BitaxeMax off the TPS40305 board. I power the TPS board with 5V from the lab power supply.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 20, 2022, 02:06:00 PM
I am running my BitaxeMax off the TPS40305 board. I power the TPS board with 5V from the lab power supply.

Skot, What is the highest Hashrates you have been able to push the bitaxeMax so far  in your tests ?

Have you been able to run it above 545 MHz Frequency or above 350 GH++ ? Some say they can be pushed to above 500 GH but i have no confirmation apart from one dude who is using liquid cooling and gets about 500 GHashes/s @ 3A per chip or around 1.8V @ high current per chip with GekkoScience Compac-F USB Miner. That will be really hot on those BM1397 chips. I think a tiny or mini Liquid cooling  kit would help on that but it's overkill


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on November 20, 2022, 03:18:02 PM
As a test of a redesigned regulator, I set up a Compac F on our regular tester (air cooled) at 600MHz and ran it 12 hours no problem. I've talked to a guy that runs a few at 750MHz I'm pretty sure with air cooling, pulls about 25 watts per stick. Between the huge die and copper plating, the package cools very efficiently.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 20, 2022, 06:15:00 PM
As a test of a redesigned regulator, I set up a Compac F on our regular tester (air cooled) at 600MHz and ran it 12 hours no problem. I've talked to a guy that runs a few at 750MHz I'm pretty sure with air cooling, pulls about 25 watts per stick. Between the huge die and copper plating, the package cools very efficiently.

Wow that’s impressive! I definitely have not gotten that high. What core voltage were you running at?

I need to get my low voltage regulator on board before I can get there.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 20, 2022, 08:45:09 PM
Sidehack, That's really impressive. Any chance of sharing the redesigned regulator schematic ? Well you are legend , and we thank you for the wisdom nuggets. What type of step-down regulators or controllers are you using in the redesign ? is it TPS40305 controller or a different ?

I think with TPS40305  controller from Ti  it's a 3-V to 20-V, 25-A, 1.2-MHz synchronous buck controller with FSS and if coupled with a Maxim DS4322 voltage adjuster as Skot did mention earlier that should get us close to achieving maximum performance without a lot of pain in power delivery system

What is the Maximum frequency of BM1397AG/AI that you have tested or have been tested by another user if you know ? is it 750 MHz or around 800 MHz  and is it stable with good cooling


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 20, 2022, 10:09:48 PM
The diagram looks good to me! I'll order a BitaxeMAX PCB and see what I can do (mostly time-constrained).
This would work for powering it off a high-power 5V source, right? https://github.com/skot/TPS40305_Supply
Yup, exactly! Running low voltage-high current from the TPS40305 to the bitaxeMax over those connectors is not ideal. (Like NotFuzzyWarm said earlier). It should really all be on the same board. I was waiting to make some progress on the ESP32 firmware side of things before making another PCB, but maybe I should just do this.
If it suits you time-wise to combine the 2 circuits / PCBs soon, I'd wait for that before ordering; PSU circuit seems to work fine, right!
I should just do it myself, I know, but I still need to get into KiCAD. ;) If I manage to do it before you, I'll PR on GitHub.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 22, 2022, 08:56:22 AM
Gratz guys for the job already done, I came upon your project last night and couldn't sleep since then...

I am very exited by your project, for a good reason, I started a similair one back in november 2013, here of course (but my thread has been deleted since then, just my account profile can attest the period). Let me present it for reference only (nothing is to keep from it, old time, old chips, old tools, old design...) : Nebula Miner.

The concept was to promote a decentralized mining (Satoshi spirit) without taking into account ROI and other profitability stuff. Nebula Miner was a small miner you could buy for less than 50$ (idealy), plug it at home, consume less than 10W electricity and let it run knowing you are participating to the global BTC mining (network securing) effort.

Back in the time, the ASIC industry just started, Nebula Miner was based on Avalon 1 chip and Bitmain was not a thing yet. I was living in China and add access to many electronics parts and suppliers. I was working as freelance designing various PCB and embedded SW for them.

Nebula Miner had a modular design with a Main Board for ethernet (wifi) communication with pool, and 1 or up to 8 Hash Board with 1 ASIC chip on each can be plug in a chain as show on the photo : https://i.ibb.co/WnrNWqW/IMG-20131225-105859-edited.jpg

Unfortunately I stopped the project because it was almost impossible to buy ASIC chip on the brand new market (without repair spare parts as of today), and alone against the big mining company like Bitmain....

But today, looking at your current project, I am thinking about joining force to revive my old dream. I have advanced skills in PCB design and embedded SW development.



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 22, 2022, 04:21:50 PM
Gratz guys for the job already done, I came upon your project last night and couldn't sleep since then...

Isn't that a good feeling?? At least until you have to go to work the next day. Sorry / Not Sorry!

Quote
I am very exited by your project, for a good reason, I started a similair one back in november 2013, here of course (but my thread has been deleted since then, just my account profile can attest the period). Let me present it for reference only (nothing is to keep from it, old time, old chips, old tools, old design...) : Nebula Miner.

The concept was to promote a decentralized mining (Satoshi spirit) without taking into account ROI and other profitability stuff. Nebula Miner was a small miner you could buy for less than 50$ (idealy), plug it at home, consume less than 10W electricity and let it run knowing you are participating to the global BTC mining (network securing) effort.

That's awesome to hear! I feel the same way as you about this. I'm convinced there are non-trivial amounts of people out there who want to play around with bitcoin mining and be involved. They aren't too worried about ROI, and they aren't going to run any of the big noisy industrial miners out there.

I've never heard of "Satoshi spirit" before, but I think I like the idea. Satoshi open sourced this whole Bitcoin thing and look where we are now. The least we can do is open source projects that are building on Bitcoin.

Quote
Back in the time, the ASIC industry just started, Nebula Miner was based on Avalon 1 chip and Bitmain was not a thing yet. I was living in China and add access to many electronics parts and suppliers. I was working as freelance designing various PCB and embedded SW for them.

Nebula Miner had a modular design with a Main Board for ethernet (wifi) communication with pool, and 1 or up to 8 Hash Board with 1 ASIC chip on each can be plug in a chain as show on the photo https://i.ibb.co/WnrNWqW/IMG-20131225-105859-edited.jpg

Unfortunately I stopped the project because it was almost impossible to buy ASIC chip on the brand new market (without repair spare parts as of today), and alone against the big mining company like Bitmain....

The electronics field has come a long way since 2013! Now we've got amazing, open source firmware SDKs, IDEs, compilers and CAD tools. PCBs and PCBA are dirt cheap now and amazing quality. WiFi SoCs are commonplace and relatively cheap. There are all kinds of cool low-power wireless standards with reference designs mere mortals can understand. Mining ASICs and all sorts of other hardware are reasonably easy to come by on AliExpress. If it weren't for the !@#$ chip shortage I'd say we're in heaven.

Quote
But today, looking at your current project, I am thinking about joining force to revive my old dream. I have advanced skills in PCB design and embedded SW development.

Yess! let's do it!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 22, 2022, 04:48:26 PM
~
Hey Skot; I've had a look at the updated schematics of bitaxe max_v2. I believe some components need footprint assignments, but other than that the PSU circuit looks to be connected to the ASIC chip already, right? If I understand correctly, that's why not all components transfer over to the PCB layout when refreshing it.
There are a few small DRC violations, but that can be fixed quickly.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 22, 2022, 05:00:16 PM
Hey Skot; I've had a look at the updated schematics of bitaxe max_v2. I believe some components need footprint assignments, but other than that the PSU circuit looks to be connected to the ASIC chip already, right? If I understand correctly, that's why not all components transfer over to the PCB layout when refreshing it.
There are a few small DRC violations, but that can be fixed quickly.

The max_v2 branch is still WIP. I just pushed a commit with some TODO notes included in the schematic.

I may have gotten a little carried away with changes on this rev!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 22, 2022, 06:01:20 PM
Looking at the current state, I think I can be helpfull on the Firmware code, specially the BM1397 driver.

I don't have BM1397 chip nor a S17 on hand, only a S9k (BM1393 chip) and some defective S9 Hashboard (BM1387), maybe you can do some Logic Analyzer (Saleae Logic 2?) log of the Serial communication from cgminer and even better from a real S17. A good way to log the Serial comm is to use female HE10 connector directly pressed on the flat cable between control board and hash board : https://i.ibb.co/yyTyRV5/PXL-20221122-173823822-Copie.jpg (https://ibb.co/swSwPtQ).

I am starting a Saleae Logic 2 High Level Analyzer https://support.saleae.com/extensions/high-level-analyzer-extensions (https://support.saleae.com/extensions/high-level-analyzer-extensions) based on the BM1385 datasheet, the BM1393 log I have, and cgminer source code for BM1397.

Another great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk...


Also, about the I2C temperature sensor NCT218, do you think we will keep this ref, and I can start working on a driver, or will you change the source ?

About the Firmware source, I am working in Rust because :
- the embedded abstraction is very well supported for ESP32-C3, and in the future, we can change the MCU easily
- stratum v1 and v2 are already coded in Rust by Braiins https://github.com/braiins/braiins-open/tree/master/protocols/stratum (https://github.com/braiins/braiins-open/tree/master/protocols/stratum) and because v2 use Noise Protocol, it is better to not have to code it ourself
- the cgminer source code is not very clean (many type mixing) and not very adapted to embedded system
- will be booting/running very fast and very reliable



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 22, 2022, 06:55:23 PM
Looking at the current state, I think I can be helpfull on the Firmware code, specially the BM1397 driver.

Ok, great! I think we can use a lot of help there. The way I see it there are 3 main components to the firmware (and one minor);
- Stratum task (connecting over WiFi and getting work over stratum. also sending results)
- Miner task (translating the work from stratum, computing midstates and rolling extranonce. Which, BTW Kano had a good post today about; https://bitcointalk.org/index.php?topic=5419549.0)
- ASIC task (care and feeding of the BM1397 ASIC chip)

- Admin task (setup and config the miner)

I've tried to summarize this a bit here; https://github.com/skot/ESP-Miner

Quote
I don't have BM1397 chip nor a S17 on hand, only a S9k (BM1393 chip) and some defective S9 Hashboard (BM1387), maybe you can do some Logic Analyzer (Saleae Logic 2?) log of the Serial communication from cgminer and even better from a real S17. A good way to log the Serial comm is to use female HE10 connector directly pressed on the flat cable between control board and hash board : https://i.ibb.co/yyTyRV5/PXL-20221122-173823822-Copie.jpg.

I am starting a Saleae Logic 2 High Level Analyzer https://support.saleae.com/extensions/high-level-analyzer-extensions (https://support.saleae.com/extensions/high-level-analyzer-extensions) based on the BM1385 datasheet, the BM1393 log I have, and cgminer source code for BM1397.

Probably the easiest way to get a BM1397 to start playing around with is to get one of the Gekkoscience Compac F. https://bitcoinmerch.com/products/gekkoscience-compac-f-fan-upgrade-combo-up-to-270gh-s The Compac F is super cool, and now it's available again thanks to sidehack's continued efforts.

Saleae Logic Analyzers are also amazing. I get a ton of use out of mine. From a data standpoint, the Compac F is a FTDI usbserial chip directly attached to a BM1397. You can connect with a serial terminal and prod registers to your heart's content.

I put some of my notes/logs with the BM1397 here: https://github.com/skot/ESP-Miner/blob/master/bm1397_protocol.md

Quote
Another great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk...

oooo that would be amazing to see.

Quote
Also, about the I2C temperature sensor NCT218, do you think we will keep this ref, and I can start working on a driver, or will you change the source ?

the NCT218 went out of stock. I just switched to the EMC2101. It does fan control too! Hooray integrated products from the PC motherboard world. Adafruit has some driver examples to work from; https://learn.adafruit.com/emc2101-fan-controller-and-temperature-sensor

Quote
About the Firmware source, I am working in Rust because :
- the embedded abstraction is very well supported for ESP32-C3, and in the future, we can change the MCU easily
- stratum v1 and v2 are already coded in Rust by Braiins https://github.com/braiins/braiins-open/tree/master/protocols/stratum (https://github.com/braiins/braiins-open/tree/master/protocols/stratum) and because v2 use Noise Protocol, it is better to not have to code it ourself
- the cgminer source code is not very clean (many type mixing) and not very adapted to embedded system
- will be booting/running very fast and very reliable

From what I hear, embedded Rust is the new hotness. Are you pretty good at it? I'd love to learn.
It seems like the ESP32-C3 modules are all lacking in RAM. We're going to need a lot to deal with the big stratum ASCII JSON messages. I was thinking about switching to the ESP32-S3 for the time being. I assume that's still decently supported in Rust?

I hear you on the cgminer source. I feel like I'm going cross-eyed. In their defense, I think it's had a ton of authors over the years.

stoked to have you on board!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 23, 2022, 06:51:19 AM
Quote
Quote
I don't have BM1397 chip nor a S17 on hand, only a S9k (BM1393 chip) and some defective S9 Hashboard (BM1387), maybe you can do some Logic Analyzer (Saleae Logic 2?) log of the Serial communication from cgminer and even better from a real S17. A good way to log the Serial comm is to use female HE10 connector directly pressed on the flat cable between control board and hash board : https://i.ibb.co/yyTyRV5/PXL-20221122-173823822-Copie.jpg.

I am starting a Saleae Logic 2 High Level Analyzer https://support.saleae.com/extensions/high-level-analyzer-extensions (https://support.saleae.com/extensions/high-level-analyzer-extensions) based on the BM1385 datasheet, the BM1393 log I have, and cgminer source code for BM1397.

Probably the easiest way to get a BM1397 to start playing around with is to get one of the Gekkoscience Compac F. https://bitcoinmerch.com/products/gekkoscience-compac-f-fan-upgrade-combo-up-to-270gh-s The Compac F is super cool, and now it's available again thanks to sidehack's continued efforts.

Saleae Logic Analyzers are also amazing. I get a ton of use out of mine. From a data standpoint, the Compac F is a FTDI usbserial chip directly attached to a BM1397. You can connect with a serial terminal and prod registers to your heart's content.

I put some of my notes/logs with the BM1397 here: https://github.com/skot/ESP-Miner/blob/master/bm1397_protocol.md

I will buy a Compac F at some point, but seeing my drawers full of stuff "I will use somedays", I tend to first work on a project and then buy the hardware...
So you also have a Saleae, great ! Can you provide me .logic files (Logic 2) of some serial communication ?

Quote
Quote
Another great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk...

oooo that would be amazing to see.

Found it, Github never forget ! https://github.com/xertSuns1/braiins/blob/bos-devel/open/hw/zynq-io-am1-s9/design/src/ip_cores/axi_bm13xx/hdl/bm13xx_S_AXI.vhd

Quote
Quote
Also, about the I2C temperature sensor NCT218, do you think we will keep this ref, and I can start working on a driver, or will you change the source ?

the NCT218 went out of stock. I just switched to the EMC2101. It does fan control too! Hooray integrated products from the PC motherboard world. Adafruit has some driver examples to work from; https://learn.adafruit.com/emc2101-fan-controller-and-temperature-sensor

OK, let's go with EMC2101 then.

Quote
Quote
About the Firmware source, I am working in Rust because :
- the embedded abstraction is very well supported for ESP32-C3, and in the future, we can change the MCU easily
- stratum v1 and v2 are already coded in Rust by Braiins https://github.com/braiins/braiins-open/tree/master/protocols/stratum (https://github.com/braiins/braiins-open/tree/master/protocols/stratum) and because v2 use Noise Protocol, it is better to not have to code it ourself
- the cgminer source code is not very clean (many type mixing) and not very adapted to embedded system
- will be booting/running very fast and very reliable

From what I hear, embedded Rust is the new hotness. Are you pretty good at it? I'd love to learn.
It seems like the ESP32-C3 modules are all lacking in RAM. We're going to need a lot to deal with the big stratum ASCII JSON messages. I was thinking about switching to the ESP32-S3 for the time being. I assume that's still decently supported in Rust?

I hear you on the cgminer source. I feel like I'm going cross-eyed. In their defense, I think it's had a ton of authors over the years.

All ESP32 are pretty well supported by Rust HAL https://github.com/esp-rs/esp-hal
The good point is by using embedded-hal traits, we will be able to change HW easily. It will be possible for example to change for a Cortex-M + W5500 for Ethernet instead of Wifi (more reliable, quicker comm and easier to setup (no SSID connection, only DHCP needed)), or even better the W7500 (all in one chip for Ethernet).
I am intermediary level at Rust, but I learn it every day, it is fascinating.

My cgminer remark was not intended to be disrepectfull, but as you said, so many developer contributed over the year, it lost a bit of homogeneity...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 23, 2022, 05:14:39 PM
I will buy a Compac F at some point, but seeing my drawers full of stuff "I will use somedays", I tend to first work on a project and then buy the hardware...
So you also have a Saleae, great ! Can you provide me .logic files (Logic 2) of some serial communication ?

I will check it out, but I'm not sure it's going to be very interesting. The serial is just 1.8V TTL. The BM1397 seems to default to 3Mbaud and then can be set to whatever you like with the baudrate register. Parsing can easily be done in C. (Or Python or Rust or whatever can connect to your serial port). There is also a reset line. that works like you might expect.

here are some of my experiments in Python with the BM1387: https://github.com/skot/bm1387_scripts

Quote
Found it, Github never forget ! https://github.com/xertSuns1/braiins/blob/bos-devel/open/hw/zynq-io-am1-s9/design/src/ip_cores/axi_bm13xx/hdl/bm13xx_S_AXI.vhd

Ooo very cool. It's been a while since I've looked at VHDL. Are you able to pick out what the BM1397 registers are?

Quote
All ESP32 are pretty well supported by Rust HAL https://github.com/esp-rs/esp-hal
The good point is by using embedded-hal traits, we will be able to change HW easily. It will be possible for example to change for a Cortex-M + W5500 for Ethernet instead of Wifi (more reliable, quicker comm and easier to setup (no SSID connection, only DHCP needed)), or even better the W7500 (all in one chip for Ethernet).
I am intermediary level at Rust, but I learn it every day, it is fascinating.

Ok, that's great! Ethernet would be cool. The ESP32-S3 doesn't have a builtin ethernet MAC, but some of the other ESP32 varieties do. I like the idea of trying to make WiFi work though. It's not too hard to setup if you have a proper provisioning tool. I also have an extended goal of mounting this thing to a solar panel and putting it on my roof for true wireless (day) mining.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 23, 2022, 05:33:28 PM
Hey Skot; I've had a look at the updated schematics of bitaxe max_v2. I believe some components need footprint assignments, but other than that the PSU circuit looks to be connected to the ASIC chip already, right? If I understand correctly, that's why not all components transfer over to the PCB layout when refreshing it.
There are a few small DRC violations, but that can be fixed quickly.

The max_v2 branch is still WIP. I just pushed a commit with some TODO notes included in the schematic.

I may have gotten a little carried away with changes on this rev!
I've ordered the PCBs and components for power supply and bitaxe! Excited to receive them soon and start looking at the firmware. I may experiment with the code already; the whole Stratum stuff is completely independent from the hashboard anyway. We'll use ESP32-S3 right? Not sure whether it's pin-compatible with the bitaxe I ordered, but worst-case I'll jumper it up.

Quote
Another great source of information was the Braiins OS that supported S17 miner, it was open source and written in Rust, but it look like Braiins did remove it from Github... I may have cloned it somewhere on my harddisk...
oooo that would be amazing to see.
Maybe it's all archived? https://web.archive.org/web/20210123084147/https://github.com/braiins/braiins
Or do you have something else in mind @NebulaMiner

I will buy a Compac F at some point, but seeing my drawers full of stuff "I will use somedays", I tend to first work on a project and then buy the hardware...
So you also have a Saleae, great ! Can you provide me .logic files (Logic 2) of some serial communication ?
Just some traces of the Compac F's serial comms? I can try; not so easy without broken out test pads.. ^^

Found it, Github never forget ! https://github.com/xertSuns1/braiins/blob/bos-devel/open/hw/zynq-io-am1-s9/design/src/ip_cores/axi_bm13xx/hdl/bm13xx_S_AXI.vhd
HDL sources, that's neat!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 23, 2022, 06:12:08 PM
I've ordered the PCBs and components for power supply and bitaxe! Excited to receive them soon and start looking at the firmware. I may experiment with the code already; the whole Stratum stuff is completely independent from the hashboard anyway. We'll use ESP32-S3 right? Not sure whether it's pin-compatible with the bitaxe I ordered, but worst-case I'll jumper it up.

Yes, let's go with the ESP32-S3 for now. specifically the ESP32-S3-WROOM-1 module. I think the extra RAM and second core will be handy. Espressif's dev board with this module is called the ESP32-S3-DevKitC-1 (https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html). It's not pin compatible with the pinout for the ESP32-C3-DevKitC on the bitaxeMax that you've ordered. Hopefully it won't be to hard to jumper up.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 23, 2022, 06:26:28 PM
I've ordered the PCBs and components for power supply and bitaxe! Excited to receive them soon and start looking at the firmware. I may experiment with the code already; the whole Stratum stuff is completely independent from the hashboard anyway. We'll use ESP32-S3 right? Not sure whether it's pin-compatible with the bitaxe I ordered, but worst-case I'll jumper it up.

Yes, let's go with the ESP32-S3 for now. specifically the ESP32-S3-WROOM-1 module. I think the extra RAM and second core will be handy. Espressif's dev board with this module is called the ESP32-S3-DevKitC-1 (https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/user-guide-devkitc-1.html). It's not pin compatible with the pinout for the ESP32-C3-DevKitC on the bitaxeMax that you've ordered. Hopefully it won't be to hard to jumper up.
No worries, I'll get one of those ESP32-S3-WROOM-1 dev kits and use jumpers!
The C3 is a cool module, but it's kind of an ESP8266 (https://hackaday.com/2021/02/08/hands-on-the-risc-v-esp32-c3-will-be-your-new-esp8266/) successor, as it has less 'horsepower' than even the old ESP32's. S3 should be the current 'flagship'.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: dj789 on November 24, 2022, 02:18:10 PM
Thanks to everyone who's been helping with this project - it's great to see so many people interested in this.

I just got some Bitaxe v2 (2xBM1387) boards (which took much longer than i was expecting).  They will keep me busy for a little while, but i'm looking forward to testing the next BM1397 boards.

BTW the SN74LVC1T45QDCKRQ1 is now out-of-stock on digikey.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 24, 2022, 02:34:18 PM
EMC2101 done in Rust https://github.com/Georges760/emc2101-rs (https://github.com/Georges760/emc2101-rs), I need to get some HW and test/debug it now...

BM13xx driver is ongoing, but I really need more log sample from Saleae Logic 2 to revert engineer the protocol (specially from a real S17).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 24, 2022, 07:09:27 PM
Thanks to everyone who's been helping with this project - it's great to see so many people interested in this.

I just got some Bitaxe v2 (2xBM1387) boards (which took much longer than i was expecting).  They will keep me busy for a little while, but i'm looking forward to testing the next BM1397 boards.
That's cool! I believe you should be able to test ESP32 code with the bitaxe v2, as well; a big part of the code should be going to work across chips. The whole Stratum connection and serial set-up; not sure whether the message format changed. @Skot has looked more into that so far, as far as I know.

BTW the SN74LVC1T45QDCKRQ1 is now out-of-stock on digikey.
It's on LCSC though; had to order from 2 places myself, too - that's the current supply chain struggle, I guess... :/


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 24, 2022, 11:47:33 PM
Thanks to everyone who's been helping with this project - it's great to see so many people interested in this.

I just got some Bitaxe v2 (2xBM1387) boards (which took much longer than i was expecting).  They will keep me busy for a little while, but i'm looking forward to testing the next BM1397 boards.

BTW the SN74LVC1T45QDCKRQ1 is now out-of-stock on digikey.

That’s so cool you ordered some bitaxe boards! Open source HW for the win! Let me know if you have any issues building them up.

This parts shortage thing is a pain. There are a zillion level shifters out there, but all in different packages.





Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 24, 2022, 11:50:36 PM
EMC2101 done in Rust https://github.com/Georges760/emc2101-rs (https://github.com/Georges760/emc2101-rs), I need to get some HW and test/debug it now...

BM13xx driver is ongoing, but I really need more log sample from Saleae Logic 2 to revert engineer the protocol (specially from a real S17).

Wow, Looking good! A friend was telling me that you don’t really need a RTOS with Rust because the async libraries are so good.. does that seem right to you?

I wish I had a S17 to poke around on. I’ve been watching them on eBay, but they seem so expensive still.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 24, 2022, 11:59:46 PM
Regarding that level shifter, octopart shows that 10's of thousands are available (https://octopart.com/search?q=SN74LVC1T45QDCKRQ1&currency=USD&specs=0) though not from the usual suspects  ;)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 25, 2022, 06:51:42 AM
EMC2101 done in Rust https://github.com/Georges760/emc2101-rs (https://github.com/Georges760/emc2101-rs), I need to get some HW and test/debug it now...

BM13xx driver is ongoing, but I really need more log sample from Saleae Logic 2 to revert engineer the protocol (specially from a real S17).

Wow, Looking good! A friend was telling me that you don’t really need a RTOS with Rust because the async libraries are so good.. does that seem right to you?

I wish I had a S17 to poke around on. I’ve been watching them on eBay, but they seem so expensive still.

Exactly, I plan to play around with RTIC (Real Time Interrupt-driven Concurrency) which should fit very well with our needs here : each "tasks" can be triggered by a hardware interrupt (the Alert signal from EMC2101 to trigger the shutdown for Temperature Critial reached, the Serial RX IRQ from BM1397 for a work result, etc...)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 25, 2022, 02:05:52 PM
Exactly, I plan to play around with RTIC (Real Time Interrupt-driven Concurrency) which should fit very well with our needs here : each "tasks" can be triggered by a hardware interrupt (the Alert signal from EMC2101 to trigger the shutdown for Temperature Critial reached, the Serial RX IRQ from BM1397 for a work result, etc...)

Wow! That sounds amazing. I’m getting really excited for this — it sounds like embedded Rust is the way to go.

Do you think you could put together a ESP32-S3 Rust project? Maybe with a little guidance for others on how to setup the toolchain, IDE, etc?

I’ve made some progress on bitaxeMax v2; https://github.com/skot/bitaxe/tree/max_v2 the schematic is pretty much done. I’ll keep working on this and hopefully we can get you some real HW soon!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 25, 2022, 02:43:30 PM
Do you think you could put together a ESP32-S3 Rust project? Maybe with a little guidance for others on how to setup the toolchain, IDE, etc?

I’ve made some progress on bitaxeMax v2; https://github.com/skot/bitaxe/tree/max_v2 the schematic is pretty much done. I’ll keep working on this and hopefully we can get you some real HW soon!

Yes of course, I just ordered a ESP32-S3 module to try a prototype of a project on it. Setup will be very easy, coding on Rust will need a little bit of adaptation (learning curve). I propose other people in this project to start a standard C project, and I will work on a Rust one in parrallel. I will teach anyone who want to try embedded Rust with me.

Can you please push a PDF of the schematic so I can do a review.

About the BM1393 voltage regulation, do you plan a voltage tuning from the MCU ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 25, 2022, 03:31:36 PM
Do you think you could put together a ESP32-S3 Rust project? Maybe with a little guidance for others on how to setup the toolchain, IDE, etc?

I’ve made some progress on bitaxeMax v2; https://github.com/skot/bitaxe/tree/max_v2 the schematic is pretty much done. I’ll keep working on this and hopefully we can get you some real HW soon!

Yes of course, I just ordered a ESP32-S3 module to try a prototype of a project on it. Setup will be very easy, coding on Rust will need a little bit of adaptation (learning curve). I propose other people in this project to start a standard C project, and I will work on a Rust one in parrallel. I will teach anyone who want to try embedded Rust with me.

okay, perfect. I have started poking around with the standard C / ESP-IDF / FreeRTOS route, but I am definitely onboard for doing it in Rust!

Quote
Can you please push a PDF of the schematic so I can do a review.

yes, here you go; https://github.com/skot/bitaxe/blob/max_v2/bitaxeMax.pdf

Quote
About the BM1393 voltage regulation, do you plan a voltage tuning from the MCU ?

Yes, that will be new for bitaxeMax v2. I'm using the Maxim DS4432U+ current DAC with the TPS40305 -> BM1397 core voltage adjustment will be over I2C. note on the current schematic there are a couple feedback resistor values TBD.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on November 25, 2022, 04:30:30 PM
Dang, I might have to hire one of you guys for some embedded dev on a new project for Gekko.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 25, 2022, 05:00:35 PM
Quote
Can you please push a PDF of the schematic so I can do a review.

yes, here you go; https://github.com/skot/bitaxe/blob/max_v2/bitaxeMax.pdf

Quote
About the BM1393 voltage regulation, do you plan a voltage tuning from the MCU ?

Yes, that will be new for bitaxeMax v2. I'm using the Maxim DS4432U+ current DAC with the TPS40305 -> BM1397 core voltage adjustment will be over I2C. note on the current schematic there are a couple feedback resistor values TBD.

Here is my Schematic review :
- I see DS4432U+ OUT0 being used for TPS40305 control, but does the OUT1 being used somewhere ? (if not use, better not creating a signal out of the package to give ambiguity...)
- where the 5V is generated ? I see +3V3 (U11), 1V8 (U5) and 0V8 (U6) being generated from 5V, and BM1397 VDD (alias of TPS40305 VOUT) being generated from VIN_M (the monitored VIN), but nowhere the 5V beoing generated...
- on the ESP, I think you inverted TX/RX, please double check it
- can you add pin header and TP for debug purpose on the 3V3 RX/TX/RST, (additionnaly to J3), and add also I2C SDA/SCL signal on this debug pin header ?
- can you use an optional (with a serial 0R resistor) signal from a CLK_OUT of the ESP (pin 13/14/34/33/32 up to you) going to the BM1397 CLKI instead of the U1 one. I may want to try later if MCU can generate this clock by SW so we have control on the hashrate of the BM1397...
- on the BM1397 you pulled down BI (with R4) are you sure it will not being used ? on BM1385 datasheet it is noted as a Busy Input (internal schmit trugger and pull down). Maybe you can link it to a GPIO of the MCU, we will see later if needed. (and add the 3V3 signal to the debug pin header too).
- for the voltage level translators (U2/U3/U4), I used to use TSX0104 in my previous design, it is easy to use because bidirectionnal. Did you consider them ?
- for EMC2101, the ALTER#/TACH pin can be configured as input (TACH monitor to mesure Fan RPM) or output (ALERT# signal to trigger an IRQ on MCU when special temp/tach conditons are met). I see more value having an ALERT# signal from it to the MCU to trigger an interrupt for Temperature Critical exceeded (with hysteresis to deassert the signal). The FAN RPM is not very usefull for us. Also EMC2101 porpose a Look-up Table of 8 stages so we can control by hardware FAN speed accoding to BM1397 internal temperature. Maybe what you can do, is link the EMC2101 ALERT#/TACH pin to a MCU GPIO, and the FAN TACH to another MCU GPIO (be careful of voltage level here), and SW will be able to configure EMC2101 in TACH reading for some seconds, by propagating the FAN signal, then switch back to ALERT interrupt for a longer period (1h ?). So most of the time we use Interrupt monitor, and only once in a while do a fAN RPM measurement for UI needs...
- it would be usedfull to have the BM1397 VDD on a ESP ADC input to measure the BM voltage
- it would be usefull to have the TPS40305 PGOOD linked to a ESP GPIO to know if Power is Good


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: DaCryptoRaccoon on November 25, 2022, 06:01:37 PM
Just spotted this topic fantastic project looking forward to seeing the final product on this.

Also fantastic to see open source project like this!

Keep up the good work!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 25, 2022, 06:40:48 PM
Wow, thank you for this excellent review! this helps a lot. I've added my thoughts inline below.

Here is my Schematic review :
- I see DS4432U+ OUT0 being used for TPS40305 control, but does the OUT1 being used somewhere ? (if not use, better not creating a signal out of the package to give ambiguity...)

The DS4432 is a dual channel part. We only need one channel. I didn't see a cheaper/better stocked current DAC alternative. The DS4432 datasheet doesn't have much to say about unused outputs. my guess is that you leave the unused channel floating and make sure not to enable it in software. (They default to off on startup)

Quote
- where the 5V is generated ? I see +3V3 (U11), 1V8 (U5) and 0V8 (U6) being generated from 5V, and BM1397 VDD (alias of TPS40305 VOUT) being generated from VIN_M (the monitored VIN), but nowhere the 5V beoing generated...

The input to the bitaxeMax is 5V. that happens at J1 and J2. There isn't any protection happening yet. Maybe that's a good idea? Any suggestions on how you would do that? I created a github issue for this. https://github.com/skot/bitaxe/issues/12

Quote
- on the ESP, I think you inverted TX/RX, please double check it

wow, oops! nice catch.

Quote
- can you add pin header and TP for debug purpose on the 3V3 RX/TX/RST, (additionnaly to J3), and add also I2C SDA/SCL signal on this debug pin header ?

sure

Quote
- can you use an optional (with a serial 0R resistor) signal from a CLK_OUT of the ESP (pin 13/14/34/33/32 up to you) going to the BM1397 CLKI instead of the U1 one. I may want to try later if MCU can generate this clock by SW so we have control on the hashrate of the BM1397...

The BM1397 has a decent PLL hashrate clock that is configurable through a couple registers. I think this is the traditional way to change the hashrate (with the corresponding core voltage change). But I agree it would be interesting to play around with this.. I'll add it.

Quote
- on the BM1397 you pulled down BI (with R4) are you sure it will not being used ? on BM1385 datasheet it is noted as a Busy Input (internal schmit trugger and pull down). Maybe you can link it to a GPIO of the MCU, we will see later if needed. (and add the 3V3 signal to the debug pin header too).

I'm pretty sure it's not needed, at least on a single ASIC chain. But if we switch to the TSX0104 level shifter, there is a spare channel, so I can hook this up.

Quote
- for the voltage level translators (U2/U3/U4), I used to use TSX0104 in my previous design, it is easy to use because bidirectionnal. Did you consider them ?

I initially avoided it because I remember it being kinda slow. But now that I'm looking at the datasheet I see that's for open-drain mode (like for I2C). In push-pull mode it's 24Mbps, which should be fine for us. I see it's in stock too -- I'll switch to it. thanks for the reccomendation

Quote
- for EMC2101, the ALTER#/TACH pin can be configured as input (TACH monitor to mesure Fan RPM) or output (ALERT# signal to trigger an IRQ on MCU when special temp/tach conditons are met). I see more value having an ALERT# signal from it to the MCU to trigger an interrupt for Temperature Critical exceeded (with hysteresis to deassert the signal). The FAN RPM is not very usefull for us. Also EMC2101 porpose a Look-up Table of 8 stages so we can control by hardware FAN speed accoding to BM1397 internal temperature. Maybe what you can do, is link the EMC2101 ALERT#/TACH pin to a MCU GPIO, and the FAN TACH to another MCU GPIO (be careful of voltage level here), and SW will be able to configure EMC2101 in TACH reading for some seconds, by propagating the FAN signal, then switch back to ALERT interrupt for a longer period (1h ?). So most of the time we use Interrupt monitor, and only once in a while do a fAN RPM measurement for UI needs...

I feel like knowing the fan RPM is important, at the very least for feedback -- is the fan going the speed we set? And for doing a sanity check on the fan -- is it connected and working? I see what you are saying about the ALERT function though. I'll hook it up to a MCU GPIO with a voltage divider.

Quote
- it would be usedfull to have the BM1397 VDD on a ESP ADC input to measure the BM voltage

good idea, i'll add that

Quote
- it would be usefull to have the TPS40305 PGOOD linked to a ESP GPIO to know if Power is Good

good idea, i'll add that


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 25, 2022, 07:23:33 PM
I wish I had a S17 to poke around on. I’ve been watching them on eBay, but they seem so expensive still.
What about getting one with a few broken hashboards (or just 1 working one)? That should suffice, right. Might be a lot cheaper.

Do you think you could put together a ESP32-S3 Rust project? Maybe with a little guidance for others on how to setup the toolchain, IDE, etc?

I’ve made some progress on bitaxeMax v2; https://github.com/skot/bitaxe/tree/max_v2 the schematic is pretty much done. I’ll keep working on this and hopefully we can get you some real HW soon!
Yes of course, I just ordered a ESP32-S3 module to try a prototype of a project on it. Setup will be very easy, coding on Rust will need a little bit of adaptation (learning curve). I propose other people in this project to start a standard C project, and I will work on a Rust one in parrallel. I will teach anyone who want to try embedded Rust with me.
I'd follow the Rust branch; my experience is limited, but existent, though just plain Rust and not embedded.

Quote
- on the ESP, I think you inverted TX/RX, please double check it
wow, oops! nice catch.
Such a classic! TX / RX are relative to the component you're looking at.. :D


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 26, 2022, 05:10:40 PM
Hey @Skot, have a look; GekkoScience just released a BM1397-based pod miner!
https://bitcointalk.org/index.php?topic=5423227.0

I'm trying to get my hands on one as soon as they're available to buy. I'd like to mine a bit on it, but would probably also be able to get some serial traces off it for our open-source project.
I'd much rather buy this than an old, used S17 which may even arrive broken.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 26, 2022, 09:12:24 PM
Hey @Skot, have a look; GekkoScience just released a BM1397-based pod miner!
https://bitcointalk.org/index.php?topic=5423227.0

I'm trying to get my hands on one as soon as they're available to buy. I'd like to mine a bit on it, but would probably also be able to get some serial traces off it for our open-source project.
I'd much rather buy this than an old, used S17 which may even arrive broken.

Wow, that's a sweet looking machine! I'd love to try one out too. I wonder how much they'll go for.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 26, 2022, 09:16:29 PM
Quote
Can you please push a PDF of the schematic so I can do a review.

yes, here you go; https://github.com/skot/bitaxe/blob/max_v2/bitaxeMax.pdf

Quote
About the BM1393 voltage regulation, do you plan a voltage tuning from the MCU ?

Yes, that will be new for bitaxeMax v2. I'm using the Maxim DS4432U+ current DAC with the TPS40305 -> BM1397 core voltage adjustment will be over I2C. note on the current schematic there are a couple feedback resistor values TBD.

Here is my Schematic review :
- I see DS4432U+ OUT0 being used for TPS40305 control, but does the OUT1 being used somewhere ? (if not use, better not creating a signal out of the package to give ambiguity...)
- where the 5V is generated ? I see +3V3 (U11), 1V8 (U5) and 0V8 (U6) being generated from 5V, and BM1397 VDD (alias of TPS40305 VOUT) being generated from VIN_M (the monitored VIN), but nowhere the 5V beoing generated...
- on the ESP, I think you inverted TX/RX, please double check it
- can you add pin header and TP for debug purpose on the 3V3 RX/TX/RST, (additionnaly to J3), and add also I2C SDA/SCL signal on this debug pin header ?
- can you use an optional (with a serial 0R resistor) signal from a CLK_OUT of the ESP (pin 13/14/34/33/32 up to you) going to the BM1397 CLKI instead of the U1 one. I may want to try later if MCU can generate this clock by SW so we have control on the hashrate of the BM1397...
- on the BM1397 you pulled down BI (with R4) are you sure it will not being used ? on BM1385 datasheet it is noted as a Busy Input (internal schmit trugger and pull down). Maybe you can link it to a GPIO of the MCU, we will see later if needed. (and add the 3V3 signal to the debug pin header too).
- for the voltage level translators (U2/U3/U4), I used to use TSX0104 in my previous design, it is easy to use because bidirectionnal. Did you consider them ?
- for EMC2101, the ALTER#/TACH pin can be configured as input (TACH monitor to mesure Fan RPM) or output (ALERT# signal to trigger an IRQ on MCU when special temp/tach conditons are met). I see more value having an ALERT# signal from it to the MCU to trigger an interrupt for Temperature Critical exceeded (with hysteresis to deassert the signal). The FAN RPM is not very usefull for us. Also EMC2101 porpose a Look-up Table of 8 stages so we can control by hardware FAN speed accoding to BM1397 internal temperature. Maybe what you can do, is link the EMC2101 ALERT#/TACH pin to a MCU GPIO, and the FAN TACH to another MCU GPIO (be careful of voltage level here), and SW will be able to configure EMC2101 in TACH reading for some seconds, by propagating the FAN signal, then switch back to ALERT interrupt for a longer period (1h ?). So most of the time we use Interrupt monitor, and only once in a while do a fAN RPM measurement for UI needs...
- it would be usedfull to have the BM1397 VDD on a ESP ADC input to measure the BM voltage
- it would be usefull to have the TPS40305 PGOOD linked to a ESP GPIO to know if Power is Good

I checked in an update to the schematic on the max_v2 branch with all of these changes. I'm still a little iffy on the level shifting for the interface to CLKI and the fan ALERT.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 27, 2022, 01:31:00 AM
Hey @Skot, have a look; GekkoScience just released a BM1397-based pod miner!
https://bitcointalk.org/index.php?topic=5423227.0

I'm trying to get my hands on one as soon as they're available to buy. I'd like to mine a bit on it, but would probably also be able to get some serial traces off it for our open-source project.
I'd much rather buy this than an old, used S17 which may even arrive broken.
Wow, that's a sweet looking machine! I'd love to try one out too. I wonder how much they'll go for.
When comparing 'pod miners', right now there are 2 options; Futurebit Apollo and R909.
The Futurebit Apollo with 2-3TH/s costs around 700 bucks incl. VAT, while the R606 from GekkoScience (R909 predecessor) cost only 400 (incl. VAT). But the 909 will also 'only' put out 1.5-2TH/s. So 400-ish would give you a similar hash/€ value, although at much higher efficiency. Roughly 100W instead of ~200W+ (should be much quieter, too, because of this). So therefore it might be sold for a bit more than the R606.
I'm wondering what number of chips it has; should be just 4-6 chips, probably on the higher side, though, as they need some pretty fine tuning to achieve 500GH/s on Compac F sticks.

I'm also excited to see these changes to cgminer by kano. We will have to look into individual chip tuning as well, once the single-chip device works and we try out the first multi-chip boards.
Quote
[Kano] has been working on adding tuning features which include setting individual chip frequencies. Core voltage is adjustable in the range of 1.4V-1.6V per chip.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 27, 2022, 03:31:33 AM
I'm wondering what number of chips it has; should be just 4-6 chips, probably on the higher side, though, as they need some pretty fine tuning to achieve 500GH/s on Compac F sticks.

I'm also excited to see these changes to cgminer by kano. We will have to look into individual chip tuning as well, once the single-chip device works and we try out the first multi-chip boards.

I’m pretty sure the cgminer screenshot in that thread shows it’s 6 chips. The decent BM1397 (suffix AI and AG, I believe) are like $15 each new. Hopefully cheaper in quantity. I guess we’ll find out soon!

I assume individual chip tuning means changing the hash frequency separately for each chip and then seeing how it performs. AFAIK cgminer currently only lets you change the frequency of the whole chain.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 27, 2022, 08:50:14 AM
Here is my Schematic review :
- I see DS4432U+ OUT0 being used for TPS40305 control, but does the OUT1 being used somewhere ? (if not use, better not creating a signal out of the package to give ambiguity...)
- where the 5V is generated ? I see +3V3 (U11), 1V8 (U5) and 0V8 (U6) being generated from 5V, and BM1397 VDD (alias of TPS40305 VOUT) being generated from VIN_M (the monitored VIN), but nowhere the 5V beoing generated...
- on the ESP, I think you inverted TX/RX, please double check it
- can you add pin header and TP for debug purpose on the 3V3 RX/TX/RST, (additionnaly to J3), and add also I2C SDA/SCL signal on this debug pin header ?
- can you use an optional (with a serial 0R resistor) signal from a CLK_OUT of the ESP (pin 13/14/34/33/32 up to you) going to the BM1397 CLKI instead of the U1 one. I may want to try later if MCU can generate this clock by SW so we have control on the hashrate of the BM1397...
- on the BM1397 you pulled down BI (with R4) are you sure it will not being used ? on BM1385 datasheet it is noted as a Busy Input (internal schmit trugger and pull down). Maybe you can link it to a GPIO of the MCU, we will see later if needed. (and add the 3V3 signal to the debug pin header too).
- for the voltage level translators (U2/U3/U4), I used to use TSX0104 in my previous design, it is easy to use because bidirectionnal. Did you consider them ?
- for EMC2101, the ALTER#/TACH pin can be configured as input (TACH monitor to mesure Fan RPM) or output (ALERT# signal to trigger an IRQ on MCU when special temp/tach conditons are met). I see more value having an ALERT# signal from it to the MCU to trigger an interrupt for Temperature Critical exceeded (with hysteresis to deassert the signal). The FAN RPM is not very usefull for us. Also EMC2101 porpose a Look-up Table of 8 stages so we can control by hardware FAN speed accoding to BM1397 internal temperature. Maybe what you can do, is link the EMC2101 ALERT#/TACH pin to a MCU GPIO, and the FAN TACH to another MCU GPIO (be careful of voltage level here), and SW will be able to configure EMC2101 in TACH reading for some seconds, by propagating the FAN signal, then switch back to ALERT interrupt for a longer period (1h ?). So most of the time we use Interrupt monitor, and only once in a while do a fAN RPM measurement for UI needs...
- it would be usedfull to have the BM1397 VDD on a ESP ADC input to measure the BM voltage
- it would be usefull to have the TPS40305 PGOOD linked to a ESP GPIO to know if Power is Good

I checked in an update to the schematic on the max_v2 branch with all of these changes. I'm still a little iffy on the level shifting for the interface to CLKI and the fan ALERT.

Great, did another check :
- for the CLKI signal directly on the ESP, please add a 0R (or a 33R as it is a clock) serial resistor to disconnect this signal by HW.
- on J3, maybe better to put 1V8 on this debug connector because all signals are on 1,8V level (and now the 3V3 is available on J6)
- maybe better using the 4th TSX0104 line for the CLKI signal instead of BI, and put BI on the voltage divider ? BI is low freq signal. Waht do you think about this ? I have the feeling high freq signal are better ont the TSX0104 (otherwise we should better use voltage divider for all signal from ESP to BM).
- on the Fan design, I understad you plan to use a 5V FAN directly powered by our input VIN,
    * Firstly, Fan usually generate lot of noise, we should consider filtering this noise.
    * Secondly, we will control this fan with a 3V3 level PWM, and the 5V TACH signal is directly on the EMC2101 pin. Maybe better using a TSX0102 for level converting 3V3/5V these 2 signals.
    * Finnaly, as for this dual signal we are not sure yet of the final usage, I would do a more modular (optioal) HW design using 0R resistors. For exemple:
         a/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to a dedicated ESP GPIO (with the 0R resistor so we can unconnect it)
         b/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to the EMC2101 ALERT#/TACH pin (with another 0R resistor so we can unconnect it)
         c/ 1 signal from the EMC2101 ALERT#/TACH pin connected to a dedicated ESP GPIO (diffeent from a/) (also with a 0R resistor so we can unconnect it)
      this way we can choose by HW (some 0R resistor) the logic we want to try during the development phase.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 27, 2022, 08:58:40 AM
Hey @Skot, have a look; GekkoScience just released a BM1397-based pod miner!
https://bitcointalk.org/index.php?topic=5423227.0

I'm trying to get my hands on one as soon as they're available to buy. I'd like to mine a bit on it, but would probably also be able to get some serial traces off it for our open-source project.
I'd much rather buy this than an old, used S17 which may even arrive broken.

I would also love to have Serial trace from your pod, when possible !

The offical S17 trace is also important as there may reveal some Antminer secret on the BM1397 (Antminer FPGA control board with secret Firmware, controling Antminer ASIC using Antminer undocumented protocol). The Gekko/Kano trace will not reveal more that the Kano cgminer sourcecode is already exposing. Thats why the Braiins OS+ trace is also interesting, Braiins may use some reverted secret on the control protocol, and not published the source code (except for the Braiins OS (without +) with less feature).

I'm also excited to see these changes to cgminer by kano. We will have to look into individual chip tuning as well, once the single-chip device works and we try out the first multi-chip boards.
Quote
[Kano] has been working on adding tuning features which include setting individual chip frequencies. Core voltage is adjustable in the range of 1.4V-1.6V per chip.

This will be very instructive indeed !


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 27, 2022, 08:53:13 PM
Great, did another check :
- for the CLKI signal directly on the ESP, please add a 0R (or a 33R as it is a clock) serial resistor to disconnect this signal by HW.

there is one already, it's on the BM1397 sheet.

Quote
- on J3, maybe better to put 1V8 on this debug connector because all signals are on 1,8V level (and now the 3V3 is available on J6)

good idea. added.

Quote
- maybe better using the 4th TSX0104 line for the CLKI signal instead of BI, and put BI on the voltage divider ? BI is low freq signal. Waht do you think about this ? I have the feeling high freq signal are better ont the TSX0104 (otherwise we should better use voltage divider for all signal from ESP to BM).

I added a SN74AXC1T45 for level shifting the BM1397 clock. If we're going to try this we should prolly do it right. the SN74AXC1T45 has a max freq of 500 Mbps (and is in stock!)

Quote
- on the Fan design, I understad you plan to use a 5V FAN directly powered by our input VIN,
    * Firstly, Fan usually generate lot of noise, we should consider filtering this noise.

I looked around for some thoughts on this and didn't find more more than "it's complicated". I think we might have to try this out and see where the noise is coming from. Then we can add some bypass caps, filters, etc.

Quote
    * Secondly, we will control this fan with a 3V3 level PWM, and the 5V TACH signal is directly on the EMC2101 pin. Maybe better using a TSX0102 for level converting 3V3/5V these 2 signals.
    * Finnaly, as for this dual signal we are not sure yet of the final usage, I would do a more modular (optioal) HW design using 0R resistors. For exemple:
         a/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to a dedicated ESP GPIO (with the 0R resistor so we can unconnect it)
         b/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to the EMC2101 ALERT#/TACH pin (with another 0R resistor so we can unconnect it)
         c/ 1 signal from the EMC2101 ALERT#/TACH pin connected to a dedicated ESP GPIO (diffeent from a/) (also with a 0R resistor so we can unconnect it)
      this way we can choose by HW (some 0R resistor) the logic we want to try during the development phase.

These kinds of level conversions are exactly what the EMC2101 is supposed to solve. My hope in using it is that the ESP32 can control the fan and read the BM1397 temperature easily over I2C, without having to generate any specific timing signals.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 27, 2022, 11:02:21 PM
I'm wondering what number of chips it has; should be just 4-6 chips, probably on the higher side, though, as they need some pretty fine tuning to achieve 500GH/s on Compac F sticks.

I'm also excited to see these changes to cgminer by kano. We will have to look into individual chip tuning as well, once the single-chip device works and we try out the first multi-chip boards.
I’m pretty sure the cgminer screenshot in that thread shows it’s 6 chips. The decent BM1397 (suffix AI and AG, I believe) are like $15 each new. Hopefully cheaper in quantity. I guess we’ll find out soon!
I must be blind. :D When connecting multiple Compac F's, they show up as 1 per line.
Price-wise; sure, one ASIC is $15, but the Compac F sells for $250 with a single such chip. ;) Yeah! Hopefully not too much.

I assume individual chip tuning means changing the hash frequency separately for each chip and then seeing how it performs. AFAIK cgminer currently only lets you change the frequency of the whole chain.
Exactly. If one chip performs bad, the other ones are usually 'restricted' by the one bad chip. With a small number of chips, it is worth tuning them individually, so it's nice that such a feature is coming to R909.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 28, 2022, 08:00:04 AM
Great, did another check :
- for the CLKI signal directly on the ESP, please add a 0R (or a 33R as it is a clock) serial resistor to disconnect this signal by HW.

there is one already, it's on the BM1397 sheet.

Quote
- on J3, maybe better to put 1V8 on this debug connector because all signals are on 1,8V level (and now the 3V3 is available on J6)

good idea. added.

Quote
- maybe better using the 4th TSX0104 line for the CLKI signal instead of BI, and put BI on the voltage divider ? BI is low freq signal. Waht do you think about this ? I have the feeling high freq signal are better ont the TSX0104 (otherwise we should better use voltage divider for all signal from ESP to BM).

I added a SN74AXC1T45 for level shifting the BM1397 clock. If we're going to try this we should prolly do it right. the SN74AXC1T45 has a max freq of 500 Mbps (and is in stock!)

Quote
- on the Fan design, I understad you plan to use a 5V FAN directly powered by our input VIN,
    * Firstly, Fan usually generate lot of noise, we should consider filtering this noise.

I looked around for some thoughts on this and didn't find more more than "it's complicated". I think we might have to try this out and see where the noise is coming from. Then we can add some bypass caps, filters, etc.

Quote
   * Secondly, we will control this fan with a 3V3 level PWM, and the 5V TACH signal is directly on the EMC2101 pin. Maybe better using a TSX0102 for level converting 3V3/5V these 2 signals.
    * Finnaly, as for this dual signal we are not sure yet of the final usage, I would do a more modular (optioal) HW design using 0R resistors. For exemple:
         a/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to a dedicated ESP GPIO (with the 0R resistor so we can unconnect it)
         b/ 1 signal from the FAN TACH_3V3 (from J4 after going through TSX0102) connected to the EMC2101 ALERT#/TACH pin (with another 0R resistor so we can unconnect it)
         c/ 1 signal from the EMC2101 ALERT#/TACH pin connected to a dedicated ESP GPIO (diffeent from a/) (also with a 0R resistor so we can unconnect it)
      this way we can choose by HW (some 0R resistor) the logic we want to try during the development phase.

These kinds of level conversions are exactly what the EMC2101 is supposed to solve. My hope in using it is that the ESP32 can control the fan and read the BM1397 temperature easily over I2C, without having to generate any specific timing signals.

OK with current Schematic and your justifications.

Another idea : can you add a couple of ESP GPIO with a pullup and a dual pin header to ground, so we can use jumper to switch SW into specific mode (for exemple, mining on a pool or with a local node RPC connection,... we will discuss these mode later when designing the SW), and a couple of LED on ESP to have status from SW also.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 28, 2022, 09:07:18 AM
OK, I just brought a T17 with only 1 hashboard fonctionnal on ebay... BM1397 serious reversing incoming...

I also received an ESP32-S3 module and the EMC2101 adafruit board, will start working on it....

By the way, Skot, can you update this thread title, it not about 2x BM1387 (Antminer S9) anymore ;) It is misleading for new people discovering the project.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 28, 2022, 02:08:28 PM
Just FYI , both ESP32-­S3-­WROOM-­1 and ESP-C3 versions with onboard antenna do tend to have disconnects WiFi issues, The range isn't that great but will work. Just watchout for that. I like ESP32-­S3-­WROOM-­1 than C3 since its slightly better , cheaper and available


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 28, 2022, 02:26:38 PM
Another idea : can you add a couple of ESP GPIO with a pullup and a dual pin header to ground, so we can use jumper to switch SW into specific mode (for exemple, mining on a pool or with a local node RPC connection,... we will discuss these mode later when designing the SW), and a couple of LED on ESP to have status from SW also.

Ooo, yes. blinkylights are always good.

I had imagined all of the configuration to happen through a webpage hosted on the ESP32, or via bluetooth. That's what the "Admin Task" is all about. But, I agree especially during this R&D phase having some buttons/jumpers UI will be useful. I'll add a couple.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 28, 2022, 02:31:03 PM
Just FYI , both ESP32-­S3-­WROOM-­1 and ESP-C3 versions with onboard antenna do tend to have disconnects WiFi issues, The range isn't that great but will work. Just watchout for that. I like ESP32-­S3-­WROOM-­1 than C3 since its slightly better , cheaper and available

Okay, that's good to know. It will be important to have good network error handling in the firmware, in addition to a decent antenna.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 28, 2022, 02:34:38 PM
OK, I just brought a T17 with only 1 hashboard fonctionnal on ebay... BM1397 serious reversing incoming...

I also received an ESP32-S3 module and the EMC2101 adafruit board, will start working on it....

By the way, Skot, can you update this thread title, it not about 2x BM1387 (Antminer S9) anymore ;) It is misleading for new people discovering the project.

Niiiice!!! I'm looking forward to hearing about what you learn. This is going to be cool!

I didn't start this thread, so I don't think I can change the title.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 28, 2022, 03:22:08 PM
Skot,  i got a few hours to continue working on the 4 x BM1397 chip design schematic , Do you know, if  using IO Level Shifter TXB0104RGYR and the SN74AXC1T45 (Single-Bit Dual-Supply Bus Transceiver With Configurable Voltage translation) can we just use one of each (1 x TXB0104RGYR and the 1 x SN74AXC1T45) to work with multiple 4 x BM1397 chips ? or each BM1397 chip will need a pair of this parts ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 28, 2022, 03:47:35 PM
Skot,  i got a few hours to continue working on the 4 x BM1397 chip design schematic , Do you know, if  using IO Level Shifter TXB0104RGYR and the SN74AXC1T45 (Single-Bit Dual-Supply Bus Transceiver With Configurable Voltage translation) can we just use one of each (1 x TXB0104RGYR and the 1 x SN74AXC1T45) to work with multiple 4 x BM1397 chips ? or each BM1397 chip will need a pair of this parts ?

just one set of level shifters for the whole chain.

The BM1397 has the ability to cascade the data from one chip to the next. ie you can connect the "CO" or "Command Output" pin of one chip to the "CI" or "Command Input" of the next. This works for all of the data pins and the clock. The BM1397 even has 2 different modes so you can change the function of the pins to make routing easier. With this in mind we don't need to level shift between BM1397s. Just when they interface with the ESP32 (which is 3.3V only)

On the Antminers they power several BM1397s in series so they don't have to deal with the low voltages as much. I'm not so sure this is the best way to go for a relatively low chip count miner. You run into problems with the exposed copper top of the BM1397 then being at different voltages (and a heatsink shorting them out). It also makes it more difficult to change the core voltage of individual chips.

In true Bitmain fashion there is almost no documentation. Just what we can figure out from the various repair guides and poking around Antminer PCBs. I've slowly been trying to gather up everything I've found and figured out here; https://github.com/skot/BM1397


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 28, 2022, 08:25:50 PM
Quote
On the Antminers they power several BM1397s in series so they don't have to deal with the low voltages as much. I'm not so sure this is the best way to go for a relatively low chip count miner. You run into problems with the exposed copper top of the BM1397 then being at different voltages (and a heatsink shorting them out). It also makes it more difficult to change the core voltage of individual chips.
It was either FriedCat with his ASIC Tube miner or Bitfury that 1st used the string topology. The obvious reason is that it eliminated the need for multiple Vcore regulators giving higher efficiency but that came at the price of needing more level shifters and not being able to fine-tune the voltage for each chip in a string - the chip needing the highest Vcore is what sets the voltage for the entire string.

So ja, for just a few chips, either run them all in parallel from 1 regulator or use multiple regulators with 1 per pair of chips as done in Bitmains' S1-S4 miners.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 28, 2022, 09:34:02 PM

So ja, for just a few chips, either run them all in parallel from 1 regulator or use multiple regulators with 1 per pair of chips as done in Bitmains' S1-S4 miners.

Only working with 4 x BM1397 in Series and i think 1 regulator should be able to do the job. The BM1397AG are ok depending on Binning but should be close enough in performance to use 1 regulator. If its a mix of BM1397xx Chips then use of multiple regulators would be ideal


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 28, 2022, 09:39:32 PM
Quote
Only working with 4 x BM1397 in Series
This is where being clear on terminology used is crucial: When you say 'series' I assume you are talking about daisy-chaining the data chain and the Vcore is feeding power to the 4x chips in parallel right? I recall seeing that the s17 chip can pull up to 15A(?) so x4 in parallel that means the regulator will be supplying up to 60 amps. Those better be some pretty hefty power planes...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 28, 2022, 11:04:15 PM
Quote
Only working with 4 x BM1397 in Series
This is where being clear on terminology used is crucial: When you say 'series' I assume you are talking about daisy-chaining the data chain and the Vcore is feeding power to the 4x chips in parallel right? I recall seeing that the s17 chip can pull up to 15A(?) so x4 in parallel that means the regulator will be supplying up to 60 amps. Those better be some pretty hefty power planes...

The supposed efficiency of the BM1397 is 0.03 J/GH. If you're pulling 15A at 1.5V that's 22.5W. At the rated efficiency of 0.03 J/GH, 22.5W should be 750 GH/s. I don't think the BM1397 can go that high. I think the highest practical hashrate is more like 350 GH/s, which would be 7A @ 1.5V

Of course they don't say what hashrate gets you the stated efficiency.

Anyways, I agree with NotFuzzyWarm, we should parallel the power and connect the data lines in series


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on November 28, 2022, 11:31:59 PM

The supposed efficiency of the BM1397 is 0.03 J/GH. If you're pulling 15A at 1.5V that's 22.5W. At the rated efficiency of 0.03 J/GH, 22.5W should be 750 GH/s. I don't think the BM1397 can go that high. I think the highest practical hashrate is more like 350 GH/s, which would be 7A @ 1.5V


I might be mixing my Terminology. From the little info floating around, here is what one of the repair S17 manual  says

Voltage domain: The whole S17 Hash board has 15 voltage domains, and each voltage has 9 chips. The total voltage domain voltage is 18V. The voltage of each voltage domain is 1.2V. The 9 chips in the same voltage domain are powered in parallel, and then connected in series with other voltage domains after being connected in parallel.

and each voltage domain has only 1A 1.8V and 0.8V LDO powers 9 chips in a voltage domain.

I agree i don't think it would suck that much power for 4 x BM1397 chips in a single voltage domain connected in Parallel , if that's the case then i am getting a frying pan and some eggs, its going to get hot.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on November 29, 2022, 01:21:51 AM
Going by the Compac-F which can pull >15w (overclocked) with Vcore of say 1.5v that gives the one chip pulling 10A. If Vcore is 1.4v then it's 10.7A per chip. at 1.2v, 12.5A. Using 9 chips in parallel for each block (domain) in the string that means each block is pulling between 90 to 112.5a which fits well with the s17 PSU can put out per-board. Even using 10w power @1.2v it's still 8.333A/chip or 75A per block of 9.

Those currents explain why there is extensive use of bus bars soldered on top of the power planes in miners like the s17. Canaan does the same in their Avalons.

Somewhere on Bitfury's github they have the full open source schematics and PCB gerbers/BOMs for their older model miners that used either 24 or 48 vdc per-string so those could be used as a reference to using strings.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on November 29, 2022, 01:35:36 AM
The supposed efficiency of the BM1397 is 0.03 J/GH. If you're pulling 15A at 1.5V that's 22.5W. At the rated efficiency of 0.03 J/GH, 22.5W should be 750 GH/s. I don't think the BM1397 can go that high. I think the highest practical hashrate is more like 350 GH/s, which would be 7A @ 1.5V
In my experience, you can run one BM1397 (Compac F) at 500+GH/s, pulling around 15W at the USB port. That would result in exactly 0.03J/GH if I'm not wrong, however I don't know about giving it more than 15W. That's 10A @ 1.5V through the core for 0.5TH/s per chip.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sidehack on November 29, 2022, 01:47:23 AM
The BM1397 will go to 750MHz. The Compac F will go to 750MHz, know of a guy that has a few running on that setting for multiple months. You're more likely around 1.6V core, and closer to 40W/TH efficiency than 30. Stock setting on S17 models is around 35W/TH at the chip, T17 around 45W/TH. 15W into a Compac F will get you about 350GH.

I've yet to see an S17 with 9 chips in parallel. Remember the total chip count is spread across three boards. What I'm most familiar with are the 195-chip version, with 65 chips per board in 13 sets of 5 and a domain around 1.5V

Bitfury's last couple generations of chip used a very different level shifting and data multiplexing setup than the daisy-chain of their original chips and what most other vendors use now (including Bitmain).

Fuzzy, the ASICMiner Tube used TPS53355 regulators for every I think three ASICs. The Prisma, using the same heatsink profile, took in unregulated 12V into a series string. I believe Bitfury was already capable of series but I don't know much about early generation BF gear, since it was expensive (boasting 2W/GH at a time when most gear was 6+W/GH). Bitmain's second gen S7 (45 chip models, not the 54 chip models) used a regulated string. Novak and I were experimenting with the idea of a regulated string about 9 months before Bitmain brought it to market, which was fun.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Mcpepe on November 29, 2022, 03:16:56 PM
Hello, I am fascinated by the project. It's amazing how much progress has been made in such a short time. I would like to help by doing some beta testing. since I do not have the necessary knowledge for the design.

I have some chips from old equipment
BM1397 BM1387

so I could test both the new bitaxe max version and the first bitaxe v2

You have a list of components to purchase. any recommendations to request pcb?



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 29, 2022, 03:43:54 PM
Just spotted this topic fantastic project looking forward to seeing the final product on this.

Also fantastic to see open source project like this!

Keep up the good work!

Hello, I am fascinated by the project. It's amazing how much progress has been made in such a short time. I would like to help by doing some beta testing. since I do not have the necessary knowledge for the design.

I have some chips from old equipment
BM1397 BM1387

so I could test both the new bitaxe max version and the first bitaxe v2

You have a list of components to purchase. any recommendations to request pcb?

Once the design settles down a bit, we'll do an at cost group buy of assembled PCBs so people can start hacking on them. Stay tuned!

Finding a reliable (and affordable) supplier of BM1397AG for this is on the to-do list!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Mcpepe on November 29, 2022, 04:26:02 PM
Just spotted this topic fantastic project looking forward to seeing the final product on this.

Also fantastic to see open source project like this!

Keep up the good work!

Hello, I am fascinated by the project. It's amazing how much progress has been made in such a short time. I would like to help by doing some beta testing. since I do not have the necessary knowledge for the design.

I have some chips from old equipment
BM1397 BM1387

so I could test both the new bitaxe max version and the first bitaxe v2

You have a list of components to purchase. any recommendations to request pcb?

Once the design settles down a bit, we'll do an at cost group buy of assembled PCBs so people can start hacking on them. Stay tuned!

Finding a reliable (and affordable) supplier of BM1397AG for this is on the to-do list!


I have some chips from old equipment for test
BM1397 BM1387


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on November 29, 2022, 04:48:43 PM
I did some progress on the BM13xx serial protocol understanding.

I just published the Saleae Logic2 High Level Analyzer extension : https://github.com/GPTechinno/bm13xx-hla (https://github.com/GPTechinno/bm13xx-hla).
It should be also available in the Saleae Marketplace ;)

More need to be done....


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on November 30, 2022, 08:51:20 PM
RE:
"Once the design settles down a bit, we'll do an at cost group buy of assembled PCBs so people can start hacking on them. Stay tuned!
Finding a reliable (and affordable) supplier of BM1397AG for this is on the to-do list!"

hi,

regarding recycling BM1397 chips, there is a "lot" for sale of "need repair" s17+ (65 chips per hashboard * 3 hashboards per machine) in Dallas.

If somebody is local and can inspect corrosion of the hashboards maybe we could do a group buy . i can take 10 machines myself (600 in lot).

when sourcing BM1397 AD AG AH AI now they are on offer for 15-27$ each as new and around 6.5$ each as used, need ship from China.

the chips are sorted in production into bin numbers, a hashboard has a label of version(AG AH AI) and bin of chip + a Line number of hashboard, bin numbers are allocated on errors in frequency testing and Line number after assembly testing of hashboard.

so it is best have matching "bin" of chips in a assembled Bitaxe, (bin is not labeled on chip but after in sorting, but can in case of recycle from hashboards be deducted from label.)

i am thinking bid 20USD per machine for all with pickup on site in Dallas, today's price for a s17+ would be around 150-250usd depending connection for a working machine, these are in need of repair and for them its scrap and if somebody take all We could probably bid at 20 ok say 21.

guesstimate 33% of chips not working, would leave about 130 chips to be saved per machine.

if we can not buy the lot of 600 maybe we could give an offer of x machines at price y, count me in for 10.

but first need understand if dampness in farm has corroded the machines so we need a inspection, and after sort out logistics.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 30, 2022, 09:00:10 PM
hi,

regarding recycling BM1397 chips, there is a "lot" for sale of "need repair" s17+ (65 chips per hashboard * 3 hashboards per machine) in Dallas.

If somebody is local and can inspect corrosion of the hashboards maybe we could do a group buy . i can take 10 machines myself (600 in lot).

when sourcing BM1397 AD AG AH AI now they are on offer for 15-27$ each as new and around 6.5$ each as used, need ship from China.

the chips are sorted in production into bin numbers, a hashboard has a label of version(AG AH AI) and bin of chip + a Line number of hashboard, bin numbers are allocated on errors in frequency testing and Line number after assembly testing of hashboard.

so it is best have matching "bin" of chips in a assembled Bitaxe, (bin is not labeled on chip but after in sorting, but can in case of recycle from hashboards be deducted from label.)

i am thinking bid 20USD per machine for all with pickup on site in Dallas, today's price for a s17+ would be around 150-250usd depending connection for a working machine, these are in need of repair and for them its scrap and if somebody take all We could probably bid at 20 ok say 21.

guesstimate 33% of chips not working, would leave about 130 chips to be saved per machine.

if we can not buy the lot of 600 maybe we could give an offer of x machines at price y, count me in for 10.

but first need understand if dampness in farm has corroded the machines so we need a inspection, and after sort out logistics.


Wow, $20 for a S17+ is a great deal considering a single BM1397 is almost $20.
$12k is pretty reasonable if they're not totally trashed. So, anyone live near Dallas want to go check this out?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on November 30, 2022, 09:16:39 PM
also if somebody here is handy with 3d-printing ? well even answer if it could be done with a 3d-print.

i am looking at a BM1397 PCB breakout
https://www.pcbway.com/project/shareproject/Socket_BM1397.html

and if a pressure mount 3d-printed holder for the bm1397-pcb could be made for testing chips without soldering.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on November 30, 2022, 09:25:47 PM
also if somebody here is handy with 3d-printing ? well even answer if it could be done with a 3d-print.

i am looking at a BM1397 PCB breakout
https://www.pcbway.com/project/shareproject/Socket_BM1397.html

and if a pressure mount 3d-printed holder for the bm1397-pcb could be made for testing chips without soldering.

They're expensive, but BM1397 ZIF sockets exist; https://www.aliexpress.us/item/3256804282575324.html

there is also a mysterious "tester" https://www.aliexpress.us/item/3256804725472466.html
We could make something like that though.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 01, 2022, 12:22:37 AM
The bitaxeMAX v2 PCB is coming along! I think I've got most of the placement and routing done.

https://raw.githubusercontent.com/skot/bitaxe/max_v2/doc/front.png
https://raw.githubusercontent.com/skot/bitaxe/max_v2/doc/back.png


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 01, 2022, 12:33:42 AM
also if somebody here is handy with 3d-printing ? well even answer if it could be done with a 3d-print.
I do; could give that thing a try.. :) However only looks like a breakout board like mine (https://bitcointalk.org/index.php?topic=5411548); I don't understand where to get STL files for printing?
There should be some kind of 3D printed piece holding the chip on through pressure. Would be pretty sweet. If someone has a working model, I would print them for free for the sake of Bitaxe development (or other open-source miner evolving from this).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on December 01, 2022, 04:09:14 AM
also if somebody here is handy with 3d-printing ? well even answer if it could be done with a 3d-print.
I do; could give that thing a try.. :) However only looks like a breakout board like mine (https://bitcointalk.org/index.php?topic=5411548); I don't understand where to get STL files for printing?
There should be some kind of 3D printed piece holding the chip on through pressure. Would be pretty sweet. If someone has a working model, I would print them for free for the sake of Bitaxe development (or other open-source miner evolving from this).

We would need make a design or 3 -and draw it / test print

-i see a bottom base plate with a 0.8 * 0.8 * depth(?) indentation.

-and a lid where PCB-breakout is mounted, the lid could have a overhang with sides when placed over base, the overhang-sides could have m3 machine screw adjustments ? if the 3d-print could not be made exact, the threads for the adjustment-screws would be made after print.

-no hinges for lid ? , but weight of lid could maybe be sufficient make contact ? or the overhang sides of lid could almost meet the base where magnets could pull.

well any design that works will float my boat ...

then maybe a esp32 with display to drive some test confirming chip is operational




Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 01, 2022, 11:37:04 AM
well any design that works will float my boat ...
If you come up with some 3D / CAD model, feel free to share it! I can definitely do test prints and check tolerances & fitment of the chip; BM1397 should arrive in a couple weeks so I can try all dimensions. Once the lid works, a PCB can be made 'around' the lid design.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: dj789 on December 02, 2022, 11:59:45 AM
That’s so cool you ordered some bitaxe boards! Open source HW for the win! Let me know if you have any issues building them up.

Thank you again for making this possible!  I have all the parts now, but i seem to be getting slightly too much paste with the stencil.  It's probably just my poor technique.  I'll get some practice this weekend, and if it doesn't work out, i have one of those BM1387/97 tin tools on the way.

That's cool! I believe you should be able to test ESP32 code with the bitaxe v2, as well; a big part of the code should be going to work across chips. The whole Stratum connection and serial set-up; not sure whether the message format changed. Skot has looked more into that so far, as far as I know.

I have some ESP32-S3's ordered, so i'm keen to help with the software side.

It's on LCSC though; had to order from 2 places myself, too - that's the current supply chain struggle, I guess... :/

Thanks, i forgot about that site.  I'll wait for a future max/pro board revision before ordering more parts.  The bitaxe v2 will probably keep me busy for a while.  :)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 02, 2022, 01:00:29 PM
Thank you again for making this possible!  I have all the parts now, but i seem to be getting slightly too much paste with the stencil.  It's probably just my poor technique.  I'll get some practice this weekend, and if it doesn't work out, i have one of those BM1387/97 tin tools on the way.

It definitely takes some practice. Don’t be afraid to wipe the paste off with some 99% isopropyl alcohol and start again. Clean the stencil too. I use an old toothbrush (and IPA) to clean out the openings.

Are you using a desktop stencil? Use extra PCBs to get the stencil at the right height so it lays flat on the board you are pasting. Tape everything down with masking tape. Make sure your paste is cool. Try and spread it with one pass of your thin metal squeegee at about 45°. I’m sure there are a bunch of YouTube videos too. Check out Greg Davill on twitter for some inspiration. It’s worth taking your time to get the paste right to avoid bridges during reflow. You can fix a lot of problems with a soldering iron and a lot of flux.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on December 06, 2022, 03:33:37 PM
is anyone having issues getting INA260AIPWR modules from distributors ?  i have a couple of modified BitaxeMax_v2 boards from skot design and a work in progress xBit (Call it BitaxeMax4 with some routing attitude) but getting those modules is hard due to chip shortages. There are some unknown distributors that have them seem shady to me.

https://i.imgur.com/piVIueY.png (https://imgur.com/piVIueY)

https://i.imgur.com/0Pswg5s.png (https://imgur.com/0Pswg5s)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 06, 2022, 03:54:14 PM
is anyone having issues getting INA260AIPWR modules from distributors ?  i have a couple of modified BitaxeMax_v2 boards from skot design and a work in progress xBit (Call it BitaxeMax4 with some routing attitude) but getting those modules is hard due to chip shortages. The some unknown distributors that have them seem shady to me.

Oof, yeah the INA260 is out of stock everywhere. I meant to leave a note about this. The INA260 is an easy power monitor IC. I have a handful in my parts stash and I wanted to give it a try to get some automated power readings.

It definitely not required; feel free to leave this part out. You can close the jumper J7 to bypass the INA260.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on December 06, 2022, 05:58:33 PM
is anyone having issues getting INA260AIPWR modules from distributors ?  i have a couple of modified BitaxeMax_v2 boards from skot design and a work in progress xBit (Call it BitaxeMax4 with some routing attitude) but getting those modules is hard due to chip shortages. The some unknown distributors that have them seem shady to me.
Oof, yeah the INA260 is out of stock everywhere. I meant to leave a note about this. The INA260 is an easy power monitor IC. I have a handful in my parts stash and I wanted to give it a try to get some automated power readings.

It definitely not required; feel free to leave this part out. You can close the jumper J7 to bypass the INA260.
Octopart says that they are available in bulk quan. (https://octopart.com/search?q=INA260&currency=USD&specs=0) through Winsource with MOQ of 10pccs. (https://www.win-source.net/products/detail/texas-instruments/ina260aipw.html) and a couple other distributors.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 06, 2022, 06:11:57 PM
is anyone having issues getting INA260AIPWR modules from distributors ?  i have a couple of modified BitaxeMax_v2 boards from skot design and a work in progress xBit (Call it BitaxeMax4 with some routing attitude) but getting those modules is hard due to chip shortages. The some unknown distributors that have them seem shady to me.
Oof, yeah the INA260 is out of stock everywhere. I meant to leave a note about this. The INA260 is an easy power monitor IC. I have a handful in my parts stash and I wanted to give it a try to get some automated power readings.

It definitely not required; feel free to leave this part out. You can close the jumper J7 to bypass the INA260.
Octopart says that they are available in bulk quan. (https://octopart.com/search?q=INA260&currency=USD&specs=0) through Winsource with MOQ of 10pccs. (https://www.win-source.net/products/detail/texas-instruments/ina260aipw.html) and a couple other distributors.

This part is totally optional -- no need to pay Winsource scalper prices ($34?!!?). If you really want to try it out, you could order some cheap, potential fakes from AliExpress and see what happens.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on December 07, 2022, 08:07:22 PM
As concerns the actual bitcoin mining client on ESP32-S3 , Has anyone attempted to port the cgminer 4.12 code  to rust so as to fit ESP32-S3 constraints . The Open Source Braiins OS is written in Rust supports using ARM Cortex CPU-based control boards like BeagleBone and has the drivers for all Bitamin S9, S17 & S19 Series Chips  . i don't see it supporting ESP32-S3 which has a dual-core XTensa LX7.

Braiins OS requires at least 200 MB of storage ( 105 MB used for OS ) and i guess less than 512MB of RAM to run. All this are constraints for ESP32-S3 , Even if we strip down the code and rewrite it  or use a different base as reference we will still need to have a fully fledged bitcoin mining client to avoid a lot of frustrations. I haven't come across any reference code online that has used ESP32-S3 / ESP32-WROVER (N16R8)  with Rust as a control board for antminer BM13xx chips.

Any Ideas ?  Skot has a good start ESP32-Miner repo created.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on December 08, 2022, 07:54:04 AM
As concerns the actual bitcoin mining client on ESP32-S3 , Has anyone attempted to port the cgminer 4.12 code  to rust so as to fit ESP32-S3 constraints . The Open Source Braiins OS is written in Rust supports using ARM Cortex CPU-based control boards like BeagleBone and has the drivers for all Bitamin S9, S17 & S19 Series Chips  . i don't see it supporting ESP32-S3 which has a dual-core XTensa LX7.

Braiins OS requires at least 200 MB of storage ( 105 MB used for OS ) and i guess less than 512MB of RAM to run. All this are constraints for ESP32-S3 , Even if we strip down the code and rewrite it  or use a different base as reference we will still need to have a fully fledged bitcoin mining client to avoid a lot of frustrations. I haven't come across any reference code online that has used ESP32-S3 / ESP32-WROVER (N16R8)  with Rust as a control board for antminer BM13xx chips.

Any Ideas ?  Skot has a good start ESP32-Miner repo created.

Rust FW for bitaxe is a big subject i am working on everyday. As I said in a previous post, it is better someone work on a standard C FW based on existing component (cgminer) instead of waiting for the Rust solution which will take longer time.

There not such "cgminer porting in Rust", cgminer is heavyly dependant on C. The best I can do, is to use cgminer driver for BM1397 based HW, to understand the low level (undocumented) protocol. Then code a (Rust) driver for BM13xx (based on Rust Embedded-Hal abstraction).

To update on my progress doing so, I received the broken T17 I brought on ebay (2 hashboard seems to be functional enough to be communicating) with stock FW, so I was able to log serial/i2c communication between ControlBoard and HashBoard using Saleae Logic2 (logic analyzer) and code a High Level Analyzer to parse the Serial Protocol (communication with BM13xx), it is available on https://github.com/GPTechinno/bm13xx-hla (https://github.com/GPTechinno/bm13xx-hla). Basic communication protocol is covered, I am into understanting the registers and their fields now. For this I do cross comparaison with S9k log (BM1393) with stock FW I also have on hand. I will also try different custom FW for the T17 (including BraiinsOS+) to learn how these differents flavor handle the same HW. I would be also very interested to have more log from other miner (S17...). So a lot of work need to be done in this direction...

For the ESP32-S3 selection, it is the most ESP32 capable chip, that's why I guess Skot selected it. Its exotic architecture (Xtensa) make it less compatible with existing project. Nevertheless, esp-rs, which is the Rust support for ESP32 family seems to have active community and good result. Basically, there is 2 flavors :
- one based on IDF (the framework supplied by Espressif, based on FreeRTOS, so a low level OS in C, that can handle all wifi/network layers) where Rust application can be run on top (so kind of a mixed C/Rust embedded). To my personal point of view, considering this approach, it is better to have a full IDF FW with existing cgminer C cross compiled to it, no need for Rust here, this is the "standard C FW" I was refering to earlier.
- one based on plain Rust, but no wifi/network is available yet.

IMHO wifi is not reliable enought for 24/7 mining device, copper wire (Ethernet) is much more prefered here. That's why I have close look also into W5500 SPI/Ethernet bridge from Wiznet (I used them a lot in many other project), that has a very good support in Rust Embedded enviroment (https://github.com/newAM/w5500-rs (https://github.com/newAM/w5500-rs)).

For the Rust embedded framework, there is mainly 2 solutions :
- RTIC : Real Time Interrupt-driven Concurrency which I am not yet fully documented. Community seems very active. Alex (from w5500-rs) has a project example with it (https://github.com/newAM/ambientsensor-rs (https://github.com/newAM/ambientsensor-rs)).
- Embassy : EMBedded ASYnc, which I start to love more and more. It has great support for STM32 and RP2040 (RPi PICO chip) but no ESP32 yet. w5500-embassy is not finish eyt, but Alex gave me access to its private repo where job is ongoing there. I will try to make progress on it. I tink a great HW for this, is the W5500-EVB-PICO, basically a RP2040 with a W5500 on a stick (brought 2 of them). RP2040 is a dual core Cortex-M0+ at 133MHz. Having a dual core look promising to have one core for the Network (Ethernet/W5500/StratumV2), and the second one for the BM13xx serial handling. Embassy seems to be able to deal with these 2 differents contexts (not tried yet).

Finally, why I think Rust is way to go for a embedded miner, it is mainly because Stratum V2 Reference Implementation is done in Rust (https://github.com/stratum-mining/stratum), I recently joined their weekly dev meeting and they seems to be interesting into a first embedded implementation. It can be done on the ESP32-S3 on top of IDF without the need to have actual BM13xx I think.


And about others Bitaxe's chip driver, I have well debugged my EMC2101 rust driver, but it is not finished yet.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NotFuzzyWarm on December 08, 2022, 01:33:59 PM
Stratum V2 (S2) has ....
Totally off topic to be shilling V2 here. Requesting that the mods move/remove it.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on December 08, 2022, 01:42:56 PM
Stratum V2 (S2) has ....
Totally off topic to be shilling V2 here. Requesting that the mods move/remove it.

Actually, I think it is not offtopic here.

xraid is someone I met on SV2 Discord doing my research for Bitaxe. He has great understanding of SV1/SV2 and current development. More he is very excited by Bitaxe project, that's why I asked him to join this thread.

SV2 is quite a complexe architecture by itself, and it is a small part of Bitaxe project. I think this post is giving some context about SV2. I didn't feel any shilling personnaly (if I am allowed to express my opinion about that).

Actually SV2 is very important for an embedded miner, has it avoid the hassle to manipulate string for JSON parsing/formatting (used in SV1).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 08, 2022, 01:54:57 PM
Actually SV2 is very important for an embedded miner, has it avoid the hassle to manipulate string for JSON parsing/formatting (used in SV1).

Yes! I'm a big fan of binary protocols. Sending around all of those human-readable spaces, commas and newlines is great in development, but a huge waste after that. Since a big part of this project is creating embedded miner software, I think it's important.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 08, 2022, 05:26:26 PM
Rust FW for bitaxe is a big subject i am working on everyday. As I said in a previous post, it is better someone work on a standard C FW based on existing component (cgminer) instead of waiting for the Rust solution which will take longer time.

first off, I am honored, impressed and excited that you are putting so much time into this! Thank you! I am slowly working on the C (esp-idf/FreeRTOS) based FW. Once I get this bitaxeMax_v2 board design wrapped up and ordered, I'll dig into it some more.

Quote
There not such "cgminer porting in Rust", cgminer is heavyly dependant on C. The best I can do, is to use cgminer driver for BM1397 based HW, to understand the low level (undocumented) protocol. Then code a (Rust) driver for BM13xx (based on Rust Embedded-Hal abstraction).

yes, exactly. Even the C version of the firmware isn't really a port. cgminer relies on too many OS APIs to really be ported to embedded. Nonetheless, cgminer is a great example of the main concepts in miner software and ck, sidehack and kano have done a great job with this. Thanks guys!

Quote
To update on my progress doing so, I received the broken T17 I brought on ebay (2 hashboard seems to be functional enough to be communicating) with stock FW, so I was able to log serial/i2c communication between ControlBoard and HashBoard using Saleae Logic2 (logic analyzer) and code a High Level Analyzer to parse the Serial Protocol (communication with BM13xx), it is available on https://github.com/GPTechinno/bm13xx-hla (https://github.com/GPTechinno/bm13xx-hla). Basic communication protocol is covered, I am into understanting the registers and their fields now. For this I do cross comparaison with S9k log (BM1393) with stock FW I also have on hand. I will also try different custom FW for the T17 (including BraiinsOS+) to learn how these differents flavor handle the same HW. I would be also very interested to have more log from other miner (S17...). So a lot of work need to be done in this direction...

this is awesome. Anything we can do to better understand the BM1397 is great. I started a GitHub repo to dump everything I am learning about the BM1397 here https://github.com/skot/BM1397. Sidehack and Kano are obviously way ahead on this. The new cgminer is a treasure trove of BM1397 learning; https://github.com/kanoi/cgminer

Quote
For the ESP32-S3 selection, it is the most ESP32 capable chip, that's why I guess Skot selected it. Its exotic architecture (Xtensa) make it less compatible with existing project. Nevertheless, esp-rs, which is the Rust support for ESP32 family seems to have active community and good result. Basically, there is 2 flavors :
- one based on IDF (the framework supplied by Espressif, based on FreeRTOS, so a low level OS in C, that can handle all wifi/network layers) where Rust application can be run on top (so kind of a mixed C/Rust embedded). To my personal point of view, considering this approach, it is better to have a full IDF FW with existing cgminer C cross compiled to it, no need for Rust here, this is the "standard C FW" I was refering to earlier.
- one based on plain Rust, but no wifi/network is available yet.

I was lured into the ESP32 world because of their RISC-V core in the ESP32-C3 and the fact that it's available (you can't say that for many 32bit MCUs these days). For those who don't know, RISC-V is a relatively new ISA (processor core) that is free and open -- a welcome change from the fiercely closed incumbents like ARM and x86. The RISC-V core ESP32 isn't quite ready for this project yet, so the ESP32-S3 with the Xtensa core will work nicely until it is.

Quote
IMHO wifi is not reliable enought for 24/7 mining device, copper wire (Ethernet) is much more prefered here. That's why I have close look also into W5500 SPI/Ethernet bridge from Wiznet (I used them a lot in many other project), that has a very good support in Rust Embedded enviroment (https://github.com/newAM/w5500-rs (https://github.com/newAM/w5500-rs)).

I feel like WiFi itself should be reliable enough for mining. Is the ESP32 WiFi implementation the problem? Maybe the antenna isn't good enough? I'd really like to have these miners be wireless. I dream of attaching one to a solar panel and putting it out in my yard to mine whenever the sun's out.

Quote
For the Rust embedded framework, there is mainly 2 solutions :
- RTIC : Real Time Interrupt-driven Concurrency which I am not yet fully documented. Community seems very active. Alex (from w5500-rs) has a project example with it (https://github.com/newAM/ambientsensor-rs (https://github.com/newAM/ambientsensor-rs)).
- Embassy : EMBedded ASYnc, which I start to love more and more. It has great support for STM32 and RP2040 (RPi PICO chip) but no ESP32 yet. w5500-embassy is not finish eyt, but Alex gave me access to its private repo where job is ongoing there. I will try to make progress on it. I tink a great HW for this, is the W5500-EVB-PICO, basically a RP2040 with a W5500 on a stick (brought 2 of them). RP2040 is a dual core Cortex-M0+ at 133MHz. Having a dual core look promising to have one core for the Network (Ethernet/W5500/StratumV2), and the second one for the BM13xx serial handling. Embassy seems to be able to deal with these 2 differents contexts (not tried yet).

Embassy does look cool. It's frustrating though that it's only really available for STM32 and nRF -- both MCUs that are extremely affected by the chip shortage. It looks like the RP2040 is somewhat available?

Quote
Finally, why I think Rust is way to go for a embedded miner, it is mainly because Stratum V2 Reference Implementation is done in Rust (https://github.com/stratum-mining/stratum), I recently joined their weekly dev meeting and they seems to be interesting into a first embedded implementation. It can be done on the ESP32-S3 on top of IDF without the need to have actual BM13xx I think.

And about others Bitaxe's chip driver, I have well debugged my EMC2101 rust driver, but it is not finished yet.

Great! I'm pretty close on the bitaxeMax v2 design, hopefully we can get you some HW soon!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on December 08, 2022, 08:57:01 PM
For ESP32-C3 or EPS32-S3 Wifi, i have found out that using external antenna works better compared to internal/OnBoard antenna with a stronger wifi signal for mining . Not sure if anyone , has observed that

ESP32-S3 should simply act as a controller with drivers for communicating with BM1397 Chips  and running the Miner commands or software in this project. Just the same way Antminer S9, S17 & S19 all have controllers(Beaglebone, Zynq, etc ) for Mining with BM13xx chips. The main frustration is that the ESP32-XX microcontrollers are lacking in terms of some small RAM to actually do something useful without spending a lot of time rewriting or porting codebases.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 08, 2022, 10:23:26 PM
For ESP32-C3 or EPS32-S3 Wifi, i have found out that using external antenna works better compared to internal/OnBoard antenna with a stronger wifi signal for mining . Not sure if anyone , has observed that

ESP32-S3 should simply act as a controller with drivers for communicating with BM1397 Chips  and running the Miner commands or software in this project. Just the same way Antminer S9, S17 & S19 all have controllers(Beaglebone, Zynq, etc ) for Mining with BM13xx chips. The main frustration is that the ESP32-XX microcontrollers are lacking in terms of some small RAM to actually do something useful without spending a lot of time rewriting or porting codebases.

That makes sense.. External WiFi antennas might be the way to go. Espressif has some very interesting ESP32 long distance WiFi and mesh examples that would be fun to look into.

I'm pretty sure it can be done! Talking stratum and rolling extranonces just isn't that complicated. Talking BM1397 is tough, but only because it's not documented, not because it's computationally hard. I think you'll be surprised what a processor can do when it's not also running a OS


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 09, 2022, 01:40:46 AM
Hey Skot; my PCBs and components have arrived! I did also get SMT stencils, but dude, 0402's are tiny.. :D It's been a while since I last soldered on this scale.
I'm considering buying a hot plate for this, now; since I only own hot air at the moment. Do you recommend a particular product?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 09, 2022, 02:44:11 AM
Hey Skot; my PCBs and components have arrived! I did also get SMT stencils, but dude, 0402's are tiny.. :D It's been a while since I last soldered on this scale.
I'm considering buying a hot plate for this, now; since I only own hot air at the moment. Do you recommend a particular product?

I've never tried a hot plate, so I can't help you there.

I have soldered approximately 1 billion PCBs with the following method;

- Get a convection toaster oven. Nothing fancy, it just has a fan inside for more even heating. This is like a $50 Black and Decker kind of thing. Never use this oven for food.
- Get a thermocouple thermometer. These are $30ish
- Use Sn63/Pb37 no-clean, leaded, solder paste. I usually get MG Chemicals brand, in a syringe. Keep it in the refrigerator so it's nice and cold before you stencil it. (obvs don't get it near your food). Wash your hands well after.
- Take your time to get the paste stenciled right. Don't be afraid to wipe it off with IPA and try again. The paste stencils better when it's cold.
- Use tweezers to put all of the parts on the pasted board.
- Put the board(s) in the toaster oven. I usually put them right on the wire rack, which is in the metal tray.
- Put the thermocouple inside the toaster oven. Close the door on the thermocouple wire so that it holds the end right above the PCB, inside the oven.
- Turn the oven on bake, medium setting.
- Once the temp gets to 140C, turn down the oven heat and try and keep it at 140-150C for 2 minutes. Open the door a little if it's getting to hot. This is the "Soak" phase
- After two minutes, turn the heat to high
- Once the temp reaches 200C start a timer for 30 seconds. Keep the temp between 200 and 220C for this phase. Usually you don't need to do anything. This is the "Reflow" phase. You should see all of the paste melt.
- After 30 seconds, turn off the toaster oven. open the door.
- Let the boards cool for a bit in the oven with the door open.
- Once cool to touch, inspect the boards with a microscope for dry pads and/or bridges. Depending on how well you did with stenciling there may be a few, especially on QFP packages. QFNs sometimes too. Fix these up with paste flux, solder braid and your soldering iron.

Stenciling is the hardest part. reflowing in a toaster oven works surprisingly well, IMHO.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on December 09, 2022, 07:17:14 AM
- Use Sn63/Pb37 no-clean, leaded, solder paste. I usually get MG Chemicals brand, in a syringe. Keep it in the refrigerator so it's nice and cold before you stencil it. (obvs don't

maybe we will have some surprise with Sn63/Pb37 alloy, with its low melting temperature point and a relatively hot chip (ASIC miner)....


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on December 09, 2022, 11:19:15 AM
- Use Sn63/Pb37 no-clean, leaded, solder paste. I usually get MG Chemicals brand, in a syringe. Keep it in the refrigerator so it's nice and cold before you stencil it. (obvs don't

maybe we will have some surprise with Sn63/Pb37 alloy, with its low melting temperature point and a relatively hot chip (ASIC miner)....

the BM1937 chips to PCB are soldered with  ≈ 183C melt-point and heat-sink to chip is using ≈ 130C in repair manuals from bitmain.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 09, 2022, 01:14:26 PM
This method is only for prototyping a couple boards. It’s way too time consuming and imprecise for any kind of production.

Once the design has solidified, we can order professionally assembled boards (with lead free solder) from a PCBA house.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 09, 2022, 07:18:33 PM
- Get a convection toaster oven. Nothing fancy, it just has a fan inside for more even heating. This is like a $50 Black and Decker kind of thing. Never use this oven for food.
I see! I've only worked with hot plate for soldering and hot air rework station. I might give this a try, though.. :)

- Use Sn63/Pb37 no-clean, leaded, solder paste. I usually get MG Chemicals brand, in a syringe. Keep it in the refrigerator so it's nice and cold before you stencil it. (obvs don't get it near your food). Wash your hands well after.
- Take your time to get the paste stenciled right. Don't be afraid to wipe it off with IPA and try again. The paste stencils better when it's cold.
- Use tweezers to put all of the parts on the pasted board.
That's what I also do when hot-air soldering. It should work for these boards, as well, to be honest, just need to be careful with the air setting not to blow the very smallest components around.

- Put the board(s) in the toaster oven. I usually put them right on the wire rack, which is in the metal tray.
- Put the thermocouple inside the toaster oven. Close the door on the thermocouple wire so that it holds the end right above the PCB, inside the oven.
- Turn the oven on bake, medium setting.
- Once the temp gets to 140C, turn down the oven heat and try and keep it at 140-150C for 2 minutes. Open the door a little if it's getting to hot. This is the "Soak" phase
- After two minutes, turn the heat to high
- Once the temp reaches 200C start a timer for 30 seconds. Keep the temp between 200 and 220C for this phase. Usually you don't need to do anything. This is the "Reflow" phase. You should see all of the paste melt.
- After 30 seconds, turn off the toaster oven. open the door.
- Let the boards cool for a bit in the oven with the door open.
- Once cool to touch, inspect the boards with a microscope for dry pads and/or bridges. Depending on how well you did with stenciling there may be a few, especially on QFP packages. QFNs sometimes too. Fix these up with paste flux, solder braid and your soldering iron.

Stenciling is the hardest part. reflowing in a toaster oven works surprisingly well, IMHO.
The technique does sound good and it's anyway exciting to try new stuff.. ;) Thanks for the detailed instructions!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 12, 2022, 02:38:25 PM
I've wrapped up the design for the bitaxeMax v2 and ordered PCBs, stencils and parts!
https://github.com/skot/bitaxe/tree/max_v2

highlights on this design;
- Single BM1397
- Onboard ESP32-S3
- Onboard high current, low voltage buck regulator. Digitally adjustable output via the ESP32
- On die BM1397 temperature sensor via the ESP32
- Fan speed control and monitoring via the ESP32
- Input power monitoring, via the ESP32 (optional)

The hope is that this is a reasonable hardware platform to develop the ESP-Miner firmware

thanks to n0nce, NebulaMiner, developeralgo, NotFuzzyWarm, sidehack and kano for all of the help!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 12, 2022, 11:17:26 PM
~
Awesome, great job! So excited about this project. I personally need to solder my PCBs and order an ESP32-S3 to be able to start working on the firmware; is there some Rust and / or C++ stuff already semi-working to pick up or should I start from scratch?

By the way; here some updated renders for top & bottom with raytracing and Bitcoin color #ff9900 on top and bottom solder mask. ;)
https://i.postimg.cc/VNtDLgxy/image.png https://i.postimg.cc/0QfGbBZ4/image.png


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 12, 2022, 11:56:49 PM
Awesome, great job! So excited about this project. I personally need to solder my PCBs and order an ESP32-S3 to be able to start working on the firmware; is there some Rust and / or C++ stuff already semi-working to pick up or should I start from scratch?

By the way; here some updated renders for top & bottom with raytracing and Bitcoin color #ff9900 on top and bottom solder mask. ;)

Lemme know how it goes soldering that board. for the ESP32-S3, look for a ESP32-S3-DevKitC-1. I think all the usual suspects have them.

I know NebulaMiner is hard at work on a Rust implementation, but it sounds like it might be a bit. I think the best thing to do on that front is to get setup with the Espressif ESP-IDF SDK (it's C / FreeRTOS based). They have a bunch of cool examples for getting connected to WiFi and opening TCP sockets, etc. ESP-IDF has a cJSON library included which I think is the way to go for talking Stratum.

That render is awesome! How did you do that? We gotta figure out how to get orange solder mask on these boards!!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 13, 2022, 12:45:27 AM
I know NebulaMiner is hard at work on a Rust implementation, but it sounds like it might be a bit. I think the best thing to do on that front is to get setup with the Espressif ESP-IDF SDK (it's C / FreeRTOS based). They have a bunch of cool examples for getting connected to WiFi and opening TCP sockets, etc. ESP-IDF has a cJSON library included which I think is the way to go for talking Stratum.
Sounds good; I've actually already played around with ESP-IDF on a regular old ESP32.

That render is awesome! How did you do that? We gotta figure out how to get orange solder mask on these boards!!
Simply with KiCAD. ;) You can change render settings, colors etc. in the preferences.
That would be sweet!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on December 13, 2022, 06:33:24 AM
I know NebulaMiner is hard at work on a Rust implementation, but it sounds like it might be a bit. I think the best thing to do on that front is to get setup with the Espressif ESP-IDF SDK (it's C / FreeRTOS based). They have a bunch of cool examples for getting connected to WiFi and opening TCP sockets, etc. ESP-IDF has a cJSON library included which I think is the way to go for talking Stratum.
Sounds good; I've actually already played around with ESP-IDF on a regular old ESP32.

Rust dev is going from bottom up, so i am working on low level drivers right now. No project from existing template yet.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on December 13, 2022, 10:07:04 PM
That's amazing let's keep up the learning and great work.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 18, 2022, 08:32:01 PM
Hey @Skot, @NebulaMiner and everyone else reading; I tried solo-mining on my Compac F today and it works really well (https://bitcointalk.org/index.php?topic=5415335.msg61462976#msg61462976). Due to Testnet difficulty dropping to 1 after 20 min without blocks (which happens frequently), you should be able to mine at least a dozen blocks per day if your ASIC, driver and host software all work as intended (pretty much regardless of hashrate).

This should be a relatively easy and quick benchmark to verify if our BM1397 open-source project works (i.e. produces valid blocks) or not.

I guess @Skot who already has a running Bitaxe should be able to try it with his cgminer based board (with no ESP on it); but it will be more interesting / necessary to verify the ESP32 firmware once it's ready.

PS: What about a dedicated thread for Bitaxe / Bitaxe Max etc.?
With a proper start post that includes links to all the necessary resources, always up-to-date pictures of the latest and greatest board designs and sourcing guide? If you want, I can do it, otherwise @Skot feel free to do it yourself.

Of course, we can keep using this thread, but I feel like it's not giving new readers the best overview and it would be hard to go through 11 pages to find all the important bits & pieces.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 19, 2022, 03:20:21 AM
Hey @Skot, @NebulaMiner and everyone else reading; I tried solo-mining on my Compac F today and it works really well (https://bitcointalk.org/index.php?topic=5415335.msg61462976#msg61462976). Due to Testnet difficulty dropping to 1 after 20 min without blocks (which happens frequently), you should be able to mine at least a dozen blocks per day if your ASIC, driver and host software all work as intended (pretty much regardless of hashrate).

This should be a relatively easy and quick benchmark to verify if our BM1397 open-source project works (i.e. produces valid blocks) or not.

I guess @Skot who already has a running Bitaxe should be able to try it with his cgminer based board (with no ESP on it); but it will be more interesting / necessary to verify the ESP32 firmware once it's ready.

That's a good idea. I did setup a node with testnet about a year ago -- I'll get that machine sync'd up and give it a try with the bitaxe.

Quote
PS: What about a dedicated thread for Bitaxe / Bitaxe Max etc.?
With a proper start post that includes links to all the necessary resources, always up-to-date pictures of the latest and greatest board designs and sourcing guide? If you want, I can do it, otherwise @Skot feel free to do it yourself.

Of course, we can keep using this thread, but I feel like it's not giving new readers the best overview and it would be hard to go through 11 pages to find all the important bits & pieces.

I think a new thread is a good idea. I've been meaning to update the GitHub repo and readme to focus more on the bitaxeMax and the fact that it's based on the BM1397. Maybe once v2 is showing signs of life? The v2 parts have arrived and supposedly stencils and PCBs are arriving tomorrow.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on December 19, 2022, 10:19:24 AM
I think a new thread is a good idea. I've been meaning to update the GitHub repo and readme to focus more on the bitaxeMax and the fact that it's based on the BM1397. Maybe once v2 is showing signs of life? The v2 parts have arrived and supposedly stencils and PCBs are arriving tomorrow.
Sure; we can make a new thread for the v2 (and future iterations) after that design is confirmed working.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on December 23, 2022, 12:25:32 AM
I got two bitaxeMax v2 boards soldered together today. I messed up and forgot to order a ESP-Prog and Tag Connect cable, so I can't really do anything yet.

It does power up, and no smoke comes out, so that's good!

http://sk9k.com/pics/v2_hooked_up.png (http://sk9k.com/pics/v2_hooked_up.png)
http://sk9k.com/pics/v2_hooked_up.png
http://sk9k.com/pics/v2_both_sides.png (http://sk9k.com/pics/v2_both_sides.png)
http://sk9k.com/pics/v2_both_sides.png


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on December 23, 2022, 07:04:23 AM
I got two bitaxeMax v2 boards soldered together today. I messed up and forgot to order a ESP-Prog and Tag Connect cable, so I can't really do anything yet.

It does power up, and no smoke comes out, so that's good!

http://sk9k.com/pics/v2_hooked_up.png (http://sk9k.com/pics/v2_hooked_up.png)
http://sk9k.com/pics/v2_hooked_up.png
http://sk9k.com/pics/v2_both_sides.png (http://sk9k.com/pics/v2_both_sides.png)
http://sk9k.com/pics/v2_both_sides.png

Beautifull ! Look very promising.

About heatsink and fan, did you select any specific parts ?

I brought a Noctua NF-A4x20 5V PWM for my testing with the EMC2101, and have some spare random heatsink.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on December 31, 2022, 08:42:38 PM
I got two bitaxeMax v2 boards soldered together today. I messed up and forgot to order a ESP-Prog and Tag Connect cable, so I can't really do anything yet.


That's great skot. There is a persistent shortage of parts especially US designed parts.

Waiting for version 3 of my modified boards  ( 4-Chip, 2-Chip & 1-Chip) . For the 1-chip board similar to bitaxeMax i run into inventory shortage for some parts especially from Texas instruments for assembly so i did have to change design and some parts. For the 4-Chip and 2-Chip, i used a different design and parts so i was ok.

starting to work on Rust ESP Miner so that i can do some actual work and debugging, i am not an expert on Rust but a good programmer so i guess i can figure it out quickly if its easy to learn on the fly and program something useful.

i will keep working on it when i get a few hours during the week. I guess father duties doesn't allow that much time to do anything. 


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 01, 2023, 04:59:00 PM
I got two bitaxeMax v2 boards soldered together today. I messed up and forgot to order a ESP-Prog and Tag Connect cable, so I can't really do anything yet.

It does power up, and no smoke comes out, so that's good!

http://sk9k.com/pics/v2_hooked_up.png (http://sk9k.com/pics/v2_hooked_up.png)
http://sk9k.com/pics/v2_hooked_up.png
http://sk9k.com/pics/v2_both_sides.png (http://sk9k.com/pics/v2_both_sides.png)
http://sk9k.com/pics/v2_both_sides.png

This looks very awesome. How much did you pay for all the parts in total and what would be the price if you would do a 4 chip version?
I think this kind of DIY could be an awesome hobby and could repurpose a large amount of useless miners for heating equipment and other nice inventions.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 01, 2023, 06:02:30 PM
This looks very awesome. How much did you pay for all the parts in total and what would be the price if you would do a 4 chip version?
I think this kind of DIY could be an awesome hobby and could repurpose a large amount of useless miners for heating equipment and other nice inventions.

NOTE: Persistent Inventory shortages are making production price per board spike because the parts with small or no inventory will tend spike between  40% to 300%

I think if you add the total production cost of PCB fab + PCB Assembly Time (by yourself or at the factory ) + PCB Parts + shipping . Starting with a batch of 5 pieces

NOTE: i am assuming no BOM part shortages in my prices.

1-Chip  == $70    / Per PCB Board
2-Chip  == $90    / Per PCB Board
4-Chip  == $125  / Per PCB Board



Obviously this costs can come down considerably once your streamline the parts on BOM, replacing parts which have inventory shortages with similar quality alternatives parts and order a bigger batch of say  100 or 200 or 500 per run.  I think we can lower the production cost to about

1-Chip  == $50    / Per PCB Board
2-Chip  == $70    / Per PCB Board
4-Chip  == $90    / Per PCB Board

when streamlined.

Not sure what other users are paying for their initial total prototype PCB cost. Because of shortages of some major parts the prices will differ considerably. There are only about 10 parts that are good to have but all the parts can be replaced with similar alternatives if you can figure it out.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 01, 2023, 08:06:15 PM
I spent $30 in parts per board for the bitaxeMax v2, at qty5 assemblies. That doesn’t include the BM1397, which can be about $20 ea. for new chips in small quantities.

I haven’t attempted to do any cost-down yet, partly because the global supply chain is still so messed up. Lately it seems part availability is only good for a week or so. Make sure you order parts before ordering PCBs.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 01, 2023, 09:52:02 PM
I got two bitaxeMax v2 boards soldered together today. I messed up and forgot to order a ESP-Prog and Tag Connect cable, so I can't really do anything yet.

It does power up, and no smoke comes out, so that's good!

https://i.postimg.cc/QCT8wHmT/image.png
https://i.postimg.cc/DzGK7ts9/image.png
Quote for embeds & great job!

Is this required for programming the ESP?
https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-dev-kits/en/latest/other/esp-prog/user_guide.html

Maybe a USB connector (and if required, other components) could be added to the Bitaxe in the future so it's programmable directly. I know that some microcontrollers require you to pull some pins to some logic level to get into a programming mode.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 01, 2023, 09:54:48 PM
I spent $30 in parts per board for the bitaxeMax v2, at qty5 assemblies. That doesn’t include the BM1397, which can be about $20 ea. for new chips in small quantities.


Yes , i think that's about right if you include all costs for 1-Chip it will come to around  a total $70 per board for 5 board assemblies

==>  $30 to 45 (other PCB Parts) + $20 to 28 (New BM1397 chip) + $???? PCB Assembly (Yourself or/+ At Factory ) + $20 (Shipping) == Min Total Cost  $70

This will vary a lot depending on availability of parts and whether you're assembling them yourself or at the factory. If doing an assembly at the Factory you can add another $50 to $70 per board for PCB assembly on top of the initial minimum of around $70 per 1-Chip board


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 01, 2023, 10:29:30 PM
Is this required for programming the ESP?
https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-dev-kits/en/latest/other/esp-prog/user_guide.html

Yes, i think its required for the programming of ESP32 chips. One end Tag-Connect "TC2030-IDC-NL PLUG-OF-NAILS " cable connects to PCB Board and other end connects to ESP-Prog board PROG 2.54 mm interface ( Program interface with 2.54 mm (0.1”) pin pitch ) and the ESP-Prog board is then connected to your PC or Laptop using Mini USB on the board for Programming.

I am not sure if , at the moment , there is a better way to program ESP32 chips directly using USB without going through ESP-Prog board.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 01, 2023, 11:27:55 PM
i have been trying different solder pastes that i have for BM1397 Chips.

What is the recommended type of Solder Paste to use  for BM1397 chips that is very good and is reliable on this chips when you consider the high temps they will be under during operations?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 02, 2023, 01:02:41 AM
i have been trying different solder pastes that i have for BM1397 Chips.

What is the recommended type of Solder Paste to use  for BM1397 chips that is very good and is reliable on this chips when you consider the high temps they will be under during operations?

I use Sn63/Pb37 No Clean Solder Paste. The reflow temp is like 180°C. I don’t think the ASICs will get anywhere close to that.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 02, 2023, 01:09:02 AM
I am not sure if , at the moment , there is a better way to program ESP32 chips directly using USB without going through ESP-Prog board.

The ESP32 has a bootloader and is programmed over serial. The catch is that you need DTR and RTS pins to load new firmware. Most USB serial cables don’t have these pins broken out. I think your options are to put a usbserial chip like the FTDI on the board, or have it external, like the ESP-PROG.

Eventually it will be possible to update the firmware OTA, via WiFi or bluetooth. The ESP-PROG will only be for unbricking or debugging.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 02, 2023, 01:21:51 AM
That's great skot. There is a persistent shortage of parts especially US designed parts.

Waiting for version 3 of my modified boards  ( 4-Chip, 2-Chip & 1-Chip) . For the 1-chip board similar to bitaxeMax i run into inventory shortage for some parts especially from Texas instruments for assembly so i did have to change design and some parts. For the 4-Chip and 2-Chip, i used a different design and parts so i was ok.

starting to work on Rust ESP Miner so that i can do some actual work and debugging, i am not an expert on Rust but a good programmer so i guess i can figure it out quickly if its easy to learn on the fly and program something useful.

That’s awesome you’ve made so much progress! This parts shortage is rough for sure. Finding substitute parts seems to be a majority of the work these days.

Let me know how it goes with the Rust ESP-Miner.. I’d like to follow along.

Quote
i will keep working on it when i get a few hours during the week. I guess father duties doesn't allow that much time to do anything. 

I’m in the same boat!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 02, 2023, 01:24:30 AM
Skot, NebulaMiner or N0nce , Has any of you managed coding the ESP_Miner and got to it to where it can be used for testing BM1397 boards ?. I am just starting on it.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 02, 2023, 09:29:36 PM
Skot, NebulaMiner or N0nce , Has any of you managed coding the ESP_Miner and got to it to where it can be used for testing BM1397 boards ?. I am just starting on it.

Not yet.. it’s certainly on the to do list though!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 03, 2023, 03:34:25 PM
Skot, NebulaMiner or N0nce , Has any of you managed coding the ESP_Miner and got to it to where it can be used for testing BM1397 boards ?. I am just starting on it.
Unfortunately, had no time for that yet; I'm very busy right now (as maybe noticeable by my lack of posting), but that will change soon and I'll post here (or in Skot's new thread when he makes one) as soon as I have something.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on January 03, 2023, 03:55:57 PM
Skot, NebulaMiner or N0nce , Has any of you managed coding the ESP_Miner and got to it to where it can be used for testing BM1397 boards ?. I am just starting on it.
Unfortunately, had no time for that yet; I'm very busy right now (as maybe noticeable by my lack of posting), but that will change soon and I'll post here (or in Skot's new thread when he makes one) as soon as I have something.

Same for me, difficult end of year. I will find some time soon hopefully.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 06, 2023, 11:02:20 PM
Phew!!! My 4-chip board is assembled now and at least it didn't go up in flames . So its time bring out the Oscilloscope and start debugging and tracing , its going to be fun i hope

https://i.imgur.com/M5j3KkL.jpg


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 06, 2023, 11:10:23 PM
Phew!!! My 4-chip board is assembled now and at least it didn't go up in flames . So its time bring out the Oscilloscope and start debugging and tracing , its going to be fun i hope

Wow, Looking good!! Is that four BM1397s??


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 07, 2023, 12:49:35 AM
Wow, Looking good!! Is that four BM1397s??

Yes it is, 4 x BM1397 chips


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 07, 2023, 12:55:50 AM
Phew!!! My 4-chip board is assembled now and at least it didn't go up in flames . So its time bring out the Oscilloscope and start debugging and tracing , its going to be fun i hope

https://i.imgur.com/M5j3KkL.jpg
Be careful about temps / cooling! Especially when you start attempting sending those chips commands. Don't want them to start hashing and immediately going up in flames. :P But Skot knows much more than myself about this (how / when they start hashing / getting hot).

It's just that I've experienced (as a customer) finished mining products hashing even when not getting supplied any data at all (not sure what they were doing - again: as a customer).
Just saying I've encountered it and I'm not sure whether that was just the 'idle behavior' of those chips (older stuff, not BM1397 for sure) or firmware-related.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 08, 2023, 05:01:20 PM
Be careful about temps / cooling! Especially when you start attempting sending those chips commands. Don't want them to start hashing and immediately going up in flames. :P But Skot knows much more than myself about this (how / when they start hashing / getting hot).

It's just that I've experienced (as a customer) finished mining products hashing even when not getting supplied any data at all (not sure what they were doing - again: as a customer).
Just saying I've encountered it and I'm not sure whether that was just the 'idle behavior' of those chips (older stuff, not BM1397 for sure) or firmware-related.

Great advice. Coding an ESP Miner to test it correctly, is a pain. I hope to use ESP-IDF Version 5 (std) with ESP-Rust 1.66 (std) and code some minimal rust-based ESP Miner for testing.

The biggest problem i have encountered is the support and community for xtensa-esp32s3 using rust is minimal or non-existent at best. i have tested some simple ESP miner code on my ESP32-S3-WROOM-2-N32R8V Dev board that i have  and it runs fast but that is without it communicating or mining on BM1397 chips. Next step will be to try adapt this minimal testing code to communicate and mine on BM1397 chips and use it on the onboard ESP32-S3-WROOM-1-N16R8V on my ESP mining board.

that's a lot of grunt work to be done.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 08, 2023, 05:46:46 PM
Great advice. Coding an ESP Miner to test it correctly, is a pain.
[...]
that's a lot of grunt work to be done.
For sure; it was never going to be easy! O0 But I'm sure we can get it done as a group. I will have lots more free time pretty soon. All the components are already here, except BM1397. I had troubles finding them at a reasonable price and shipping speed and now I have none. ::)

The biggest problem i have encountered is the support and community for xtensa-esp32s3 using rust is minimal or non-existent at best. i have tested some simple ESP miner code on my ESP32-S3-WROOM-2-N32R8V Dev board that i have  and it runs fast but that is without it communicating or mining on BM1397 chips. Next step will be to try adapt this minimal testing code to communicate and mine on BM1397 chips and use it on the onboard ESP32-S3-WROOM-1-N16R8V on my ESP mining board.
I think I'll start with the Stratum connection and that side of things (using regular ESP-IDF), since again: I don't have ASIC chips yet. :-\


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: paid2 on January 09, 2023, 07:20:41 AM
Great advice. Coding an ESP Miner to test it correctly, is a pain.
[...]
that's a lot of grunt work to be done.
For sure; it was never going to be easy! O0 But I'm sure we can get it done as a group. I will have lots more free time pretty soon. All the components are already here, except BM1397. I had troubles finding them at a reasonable price and shipping speed and now I have none. ::)

The biggest problem i have encountered is the support and community for xtensa-esp32s3 using rust is minimal or non-existent at best. i have tested some simple ESP miner code on my ESP32-S3-WROOM-2-N32R8V Dev board that i have  and it runs fast but that is without it communicating or mining on BM1397 chips. Next step will be to try adapt this minimal testing code to communicate and mine on BM1397 chips and use it on the onboard ESP32-S3-WROOM-1-N16R8V on my ESP mining board.
I think I'll start with the Stratum connection and that side of things (using regular ESP-IDF), since again: I don't have ASIC chips yet. :-\

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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 09, 2023, 03:48:57 PM
Great advice. Coding an ESP Miner to test it correctly, is a pain.
[...]
that's a lot of grunt work to be done.
For sure; it was never going to be easy! O0 But I'm sure we can get it done as a group. I will have lots more free time pretty soon. All the components are already here, except BM1397. I had troubles finding them at a reasonable price and shipping speed and now I have none. ::)

The biggest problem i have encountered is the support and community for xtensa-esp32s3 using rust is minimal or non-existent at best. i have tested some simple ESP miner code on my ESP32-S3-WROOM-2-N32R8V Dev board that i have  and it runs fast but that is without it communicating or mining on BM1397 chips. Next step will be to try adapt this minimal testing code to communicate and mine on BM1397 chips and use it on the onboard ESP32-S3-WROOM-1-N16R8V on my ESP mining board.
I think I'll start with the Stratum connection and that side of things (using regular ESP-IDF), since again: I don't have ASIC chips yet. :-\
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.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: o_solo_miner on January 09, 2023, 05:14:20 PM
I used the Odroid-GO for development, but in c.
or the Arduino Platform:
https://github.com/espressif/arduino-esp32

Maybe that is a usefull for you.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 09, 2023, 06:16:28 PM
I used the Odroid-GO for development, but in c.
or the Arduino Platform:
https://github.com/espressif/arduino-esp32

Maybe that is a usefull for you.
Those are the ESP32's (plain 32, not 32-C3 or 32-S3), but what exactly did you develop for them? Mining firmware? That could indeed be useful; especially the Stratum v2 part, since that should be completely independent from the mining hardware (ASIC chips) used.

C code for ESP32 should also compile for ESP32-S3.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: cygan on January 09, 2023, 06:39:47 PM
Wow, Looking good!! Is that four BM1397s??

Yes it is, 4 x BM1397 chips

holy shit!
what would be the complete hash performance in the best case, if all 4 chips were running properly?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 09, 2023, 06:56:55 PM
Wow, Looking good!! Is that four BM1397s??

Yes it is, 4 x BM1397 chips
holy shit!
what would be the complete hash performance in the best case, if all 4 chips were running properly?
My new GekkoScience R909 with 6 BM1397 chips at 600MHz and proper cooling (review is coming) is pushing out around 2.2TH/s, so around 370GH/s per chip. I believe 400GH/s per chip is definitely realistic, so that's 2.4TH/s on a R909 or 1.6TH/s on the Bitaxe with 4 chips.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 09, 2023, 09:14:17 PM
Those are the ESP32's (plain 32, not 32-C3 or 32-S3), but what exactly did you develop for them? Mining firmware? That could indeed be useful; especially the Stratum v2 part, since that should be completely independent from the mining hardware (ASIC chips) used.

C code for ESP32 should also compile for ESP32-S3.

The hard part is figuring out an optimized and efficient communication between ESP32-S3-WROOM-1 chip and the BM 1397 chips and coding it in a stripped down embedded format so that it fits into tiny 16 MB Flash with additional 8 MB PSRAM on the ESP32-S3

Either C or Std Rust or NoStd Rust, we will still come very close to the memory threshold being completely utilized. i guess the goal is to strip down everything and have only bare-bone code but with standard ESP-IDF Version 5.0 / 5.1 to handle a lot of the headaches from std code

Good candidates is to use Cgminer (Kanoi version (C/C++)) , Braiins OS code base (Rust) as a Reference plus stratum V2 (Rust) code base and strip everything to the bone. Rust has few advantages when running on Microcontrollers compared to pure C code.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 09, 2023, 09:21:46 PM
The hard part is figuring out an optimized and efficient communication between ESP32-S3-WROOM-1 chip and the BM 1397 chips and coding it in a stripped down embedded format so that it fits into tiny 16 MB Flash with additional 8 MB PSRAM on the ESP32-S3
Agreed.

Rust has few advantages when running on Microcontrollers compared to pure C code.
Which advantages exactly? (specific to microcontrollers)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 09, 2023, 09:35:10 PM

Which advantages exactly? (specific to microcontrollers)

Assuming that someone is competent in both C and Rust , IMHO ,  multithreaded/concurrent code that is correct and produces no undefined behavior is better.  Also memory safety is a key feature that Rust brings to the table. In C you are on your own with concurrency and God help you if you are new to C programming. You will get baptism by fire.

 C / C++ and Python are my go-to languages but C tends to be a little messy to code sometimes but gets better with age i guess.



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 10, 2023, 09:37:34 AM

Which advantages exactly? (specific to microcontrollers)
Assuming that someone is competent in both C and Rust , IMHO ,  multithreaded/concurrent code that is correct and produces no undefined behavior is better.  Also memory safety is a key feature that Rust brings to the table. In C you are on your own with concurrency and God help you if you are new to C programming. You will get baptism by fire.
C / C++ and Python are my go-to languages but C tends to be a little messy to code sometimes but gets better with age i guess.
Okay, so those are general advantages that come with Rust. I thought there was something specific about MCUs. Do we need a lot of multithreading for this application, though? You request a block candidate over Stratum v2, build a packet for your miner and send it. Then wait for it to respond. As far as I know, that's the rough big picture.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 10, 2023, 11:17:56 PM

Okay, so those are general advantages that come with Rust. I thought there was something specific about MCUs. Do we need a lot of multithreading for this application, though? You request a block candidate over Stratum v2, build a packet for your miner and send it. Then wait for it to respond. As far as I know, that's the rough big picture.
Agreed , nothing  really special about MCU and Rust.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 13, 2023, 04:47:35 AM
Assuming that someone is competent in both C and Rust , IMHO ,  multithreaded/concurrent code that is correct and produces no undefined behavior is better.  Also memory safety is a key feature that Rust brings to the table. In C you are on your own with concurrency and God help you if you are new to C programming. You will get baptism by fire.
C / C++ and Python are my go-to languages but C tends to be a little messy to code sometimes but gets better with age i guess.
Okay, so those are general advantages that come with Rust. I thought there was something specific about MCUs. Do we need a lot of multithreading for this application, though? You request a block candidate over Stratum v2, build a packet for your miner and send it. Then wait for it to respond. As far as I know, that's the rough big picture.

I really like the idea of Rust. I just haven't seen anything convincing about support on the ESP32. Or really any MCU other than the STM32, which is hard AF to source these days.

Concurrency in C isn't too bad if you have a RTOS like FreeRTOS that ESP-IDF uses. I put together a first pass at a (ESP-IDF based) firmware architecture here; l https://github.com/skot/ESP-Miner . I'm sure this will need some refinement, but the basic idea is what n0nce said; get the work over stratum, build a packet and send it to the BM1397. Wait for a response and if you don't get one in time, roll extra nonce and send another!

Braiins has taken down the source to their "community edition" S9 firmware. I'm kicking myself for not cloning it back when they had it up. That would have been a good resource.

Check this out though; Someone did a research paper and posted code for a stratum implementation and CPU mining on ESP32 (and Playstation!) https://www.researchgate.net/publication/360353621_Implementation_of_an_efficient_portable_and_platform-agnostic_cryptocurrency_mining_algorithm_for_Internet_of_Things_devices


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 13, 2023, 03:57:51 PM
I'm sure this will need some refinement, but the basic idea is what n0nce said; get the work over stratum, build a packet and send it to the BM1397. Wait for a response and if you don't get one in time, roll extra nonce and send another!

Check this out though; Someone did a research paper and posted code for a stratum implementation and CPU mining on ESP32 (and Playstation!) https://www.researchgate.net/publication/360353621_Implementation_of_an_efficient_portable_and_platform-agnostic_cryptocurrency_mining_algorithm_for_Internet_of_Things_devices

i had posted that same research earlier in previous posts and had tried it out but it had a few issues and also it still needs to communicate with BM1397 chip, will look at it later  . Also we need a way of finding out the status of work on chip then roll extra nonce and send another as you said. Is using the a timer to wait for response from the chip good enough considering all the constraints we are facing?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 13, 2023, 04:19:02 PM
i had posted that same research earlier in previous posts and had tried it out but it had a few issues and also it still needs to communicate with BM1397 chip, will look at it later  . Also we need a way of finding out the status of work on chip then roll extra nonce and send another as you said. Is using the a timer to wait for response from the chip good enough considering all the constraints we are facing?

Ah! Maybe that's how I found it. Interesting paper. I like the breakdown of the mining algorithm.

As far as the status of work on the chip, I'm sure Kano knows more. My understanding is that the BM1397 does not send any response unless it finds a hash below the target. That means it is the job of the mining software to know when the chip has exhausted the 2^32 bit nonce space. It's unclear what the BM1397 does after hashing the entire nonce space, but I don't think it's productive. Using a ESP32 timer and the configured hashing frequency, we should be able to know when the chip is ready for new work.

I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 13, 2023, 07:05:15 PM
I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!

I have been running into issues flashing the ESP32-S3 modules using the ESP-PROG board and Tag-Cable 2030 NL cable. For some reason all my FTDI serial connections on UBUNTU 20.04 are ok and double checked all pins, Voltages and everything is working correctly but for some reason i can't flash it. Opened up an issue on esptool Repo on github  https://github.com/espressif/esptool/issues/741 (https://github.com/espressif/esptool/issues/741)

Keep getting this error: " Invalid head of packet (0x66): Possible serial noise or corruption. " . Any suggestions


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 13, 2023, 09:32:42 PM
i had posted that same research earlier in previous posts and had tried it out but it had a few issues and also it still needs to communicate with BM1397 chip, will look at it later  . Also we need a way of finding out the status of work on chip then roll extra nonce and send another as you said. Is using the a timer to wait for response from the chip good enough considering all the constraints we are facing?

Ah! Maybe that's how I found it. Interesting paper. I like the breakdown of the mining algorithm.

As far as the status of work on the chip, I'm sure Kano knows more. My understanding is that the BM1397 does not send any response unless it finds a hash below the target. That means it is the job of the mining software to know when the chip has exhausted the 2^32 bit nonce space. It's unclear what the BM1397 does after hashing the entire nonce space, but I don't think it's productive. Using a ESP32 timer and the configured hashing frequency, we should be able to know when the chip is ready for new work.

I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!



You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 13, 2023, 09:49:42 PM
You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?

Sorta; The KiCad project can export a stl 3d model of the PCB and all of the parts in their positions. Press option-3 on Mac. It just won't have the heatsink and fan. I'd love to have these complete models, but I'm miserable at MCAD.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 13, 2023, 09:51:02 PM
I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!

I have been running into issues flashing the ESP32-S3 modules using the ESP-PROG board and Tag-Cable 2030 NL cable. For some reason all my FTDI serial connections on UBUNTU 20.04 are ok and double checked all pins, Voltages and everything is working correctly but for some reason i can't flash it. Opened up an issue on esptool Repo on github  https://github.com/espressif/esptool/issues/741 (https://github.com/espressif/esptool/issues/741)

Keep getting this error: " Invalid head of packet (0x66): Possible serial noise or corruption. " . Any suggestions

Ooo that's annoying. I just got my ESP-Prog in the mail. I'll give it a try tonight with the bitaxeMax v2 and see if I can sort it out.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on January 14, 2023, 12:20:53 AM

I really like the idea of Rust. I just haven't seen anything convincing about support on the ESP32. Or really any MCU other than the STM32, which is hard AF to source these days.


here is esp32s3 rust hal if You have not seen it already
https://github.com/esp-rs/esp-hal/tree/main/esp32s3-hal

myself is targeting rp2040 = pico and are using "embassy" that has great async using a task executor,
https://github.com/embassy-rs/embassy
"embassy" has some esp32 in pipeline as i understand is "work in progress"
https://github.com/embassy-rs/embassy/issues/745


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 14, 2023, 01:30:22 AM
I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!
Oh yes, you want to get those out immediately. Would definitely work with threads / tasks / listeners (whatever fits the framework or programming language used). On the other hand, I don't think the main task needs to do much while the ASIC is hashing, no?

In that case, it would be possible to do the ASIC comms on main thread and periodically / on background thread fetch new block templates from the pool. Whatever is most performant, I'd suggest.



You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?

Here (https://www.n0nce.eu/src/bitaxe.obj)'s the .obj; I just exported from KiCAD, then converted it using Blender.
You will need to find or model the heatsink & fan yourself, as I don't have those models.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 14, 2023, 03:23:57 AM
Ooo that's annoying. I just got my ESP-Prog in the mail. I'll give it a try tonight with the bitaxeMax v2 and see if I can sort it out.

Finally got it sorted out. My USB power alone was not enough , i did have to juice it up with bench power to have the ESP32-S3 in bootloader mode


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 14, 2023, 03:46:35 AM
Finally got it sorted out. My USB power alone was not enough , i did have to juice it up with bench power to have the ESP32-S3 in bootloader mode

Did you have to load the bootloader on the ESP32-S3-WROOM-1 before you could program over serial?

I'm getting;
Code:
A fatal error occurred: Failed to connect to ESP32-S3: Wrong boot mode detected (0x14)! The chip needs to be in download mode.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 14, 2023, 05:42:12 AM
Did you have to load the bootloader on the ESP32-S3-WROOM-1 before you could program over serial?

I'm getting;
Code:
A fatal error occurred: Failed to connect to ESP32-S3: Wrong boot mode detected (0x14)! The chip needs to be in download mode.

Ahh dang, I just noticed this gem from the ESP32-S3 datasheet;

Quote
GPIO46 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloader.

And of course I picked GPIO46 for I2C SDA, so it's pulled high.

https://github.com/skot/bitaxe/issues/18

After removing the SDA I2C pull-up resistor I can program the ESP32 with ESP-Prog, so that's good news!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 14, 2023, 11:53:46 AM

Quote
GPIO46 must also be either left unconnected/floating, or driven Low, in order to enter the serial bootloader.

And of course I picked GPIO46 for I2C SDA, so it's pulled high.

https://github.com/skot/bitaxe/issues/18

After removing the SDA I2C pull-up resistor I can program the ESP32 with ESP-Prog, so that's good news!

Yes, GPIO3 = Pin 15 is  floating by default and is one of the strapping pins which includes ( GPIO0=Pin27, GPIO045=Pin26, GPIO46=Pin16, GPIO3=Pin15) . But GPIO0=Pin27, GPIO045=Pin26 and GPIO46=Pin16 are connected to the Chip's internal weak pull-down/pull-up during chip RESET and if they are unconnected or the connected external circuit is high-impedance, then the internal weak pull-up/pull-down will determine  the default input level of these strapping pins. So GPIO3 = Pin 15 should work.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 14, 2023, 04:43:52 PM
You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?

Sorta; The KiCad project can export a stl 3d model of the PCB and all of the parts in their positions. Press option-3 on Mac. It just won't have the heatsink and fan. I'd love to have these complete models, but I'm miserable at MCAD.

If you have a couple minutes. Could you give me the specs of the Bitaxe with heatssink  and fan? Would like to make a 3d rendering of it.In It's most complete form.  Made a Discord channel for Bitaxe. If everyone wants a place to work on this in real time. Here is the  discord (https://discord.gg/APh8awPJRW) invite.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 14, 2023, 04:49:01 PM
I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!
Oh yes, you want to get those out immediately. Would definitely work with threads / tasks / listeners (whatever fits the framework or programming language used). On the other hand, I don't think the main task needs to do much while the ASIC is hashing, no?

In that case, it would be possible to do the ASIC comms on main thread and periodically / on background thread fetch new block templates from the pool. Whatever is most performant, I'd suggest.



You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?

Here (https://www.n0nce.eu/src/bitaxe.obj)'s the .obj; I just exported from KiCAD, then converted it using Blender.
You will need to find or model the heatsink & fan yourself, as I don't have those models.

Thanks.  Yea I got the export done yesterday with KiCAD. Hoping for a complete 3d render of the Bitaxe with heatsink and fan. Going to get the specs hopefully and make one.
If everyone wants a place to work on Bitcaxe in real time. Here is the  discord (https://discord.gg/APh8awPJRW) invite. With the ability to search discord chat threads for keywords . Might be a good tool for people to troubleshoot and find answers about Bitaxe.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 14, 2023, 10:57:10 PM
Thanks. Yea I got the export done yesterday with KiCAD. Hoping for a complete 3d render of the Bitaxe with heatsink and fan. Going to get the specs hopefully and make one.
I had a bit of time on my hands today so I made this.. O0 Suggestions are welcome! I do think it looks quite good in Bitcoin-orange. ;D
FYI: I used the exported bitaxeMax.wrl from KiCAD and a random chipset heatsink STL, then assigned materials.

https://i.postimg.cc/z3mJL6Tr/bitaxe-render.png

https://i.postimg.cc/8C0pL7SD/bitaxe-render-top.png


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 14, 2023, 11:04:04 PM
I had a bit of time on my hands today so I made this.. O0 Suggestions are welcome! I do think it looks quite good in Bitcoin-orange. ;D
FYI: I used the exported bitaxeMax.wrl from KiCAD and a random chipset heatsink STL, then assigned materials.

that looks awesome!! I'm going to have to figure out how to get orange soldermask for the next boards


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 15, 2023, 05:31:18 PM
Thanks. Yea I got the export done yesterday with KiCAD. Hoping for a complete 3d render of the Bitaxe with heatsink and fan. Going to get the specs hopefully and make one.

wow!!!, that's nice


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 15, 2023, 06:06:40 PM

I had a bit of time on my hands today so I made this.. O0 Suggestions are welcome! I do think it looks quite good in Bitcoin-orange. ;D
FYI: I used the exported bitaxeMax.wrl from KiCAD and a random chipset heatsink STL, then assigned materials.


This looks very awesome! What I was thinking is, that I would love also a version that does not need active cooling, since this would lower the noise and power draw. When I have the time I will maybe try to design something with liquid cooling or one big passive cooler that can maybe used to cool many of these miners at once. Other people can obviously also design something with this idea also.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 15, 2023, 06:26:35 PM

I had a bit of time on my hands today so I made this.. O0 Suggestions are welcome! I do think it looks quite good in Bitcoin-orange. ;D
FYI: I used the exported bitaxeMax.wrl from KiCAD and a random chipset heatsink STL, then assigned materials.


This looks very awesome! What I was thinking is, that I would love also a version that does not need active cooling, since this would lower the noise and power draw. When I have the time I will maybe try to design something with liquid cooling or one big passive cooler that can maybe used to cool many of these miners at once. Other people can obviously also design something with this idea also.
A liquid cooling loop that can cool e.g. 500W would be convenient since it could cool multiple miners quietly, I agree.

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...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on 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/18

After 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 (https://github.com/skot/ESP-Miner/blob/master/bm1397_protocol.md)



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on 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 ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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..


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 16, 2023, 02:14:15 PM

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.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on 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.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 16, 2023, 08:45:59 PM
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 ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 16, 2023, 09:26:43 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!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on 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.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 16, 2023, 10:11:08 PM
got the ESP32 LED Controller running with the bitaxe RGB LEDs -- bright orange, of course!

https://sk9k.com/pics/IMG_3905.jpg

Ordered a 40x40x10mm 5V 4-pin Noctua fan so I can try out changing the fan speed with the EMC2101


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on 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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 16, 2023, 11:16:47 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)
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!
https://sk9k.com/pics/IMG_3905.jpg
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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 17, 2023, 12:31:00 AM
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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: pwakham on 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!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 17, 2023, 03:31:24 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.0

Maybe 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  :-\



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: pwakham on 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.0

Maybe 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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on 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


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: NebulaMiner on January 17, 2023, 07:12:50 AM
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!

Great plan !

Finally my work is on point 6 (proper drivers, EMC2102 almost finished) and 9 (BM1397 driver).
I am also working on 8/10 (stratum library).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: pwakham on January 17, 2023, 12:56:13 PM
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

ive never built the bitaxe before so whats the power draw on there to get say around 700gh? I know on the s17+ you can get it to around 370gh per chip. yes bitdeer is the offshoot of bitmain. we dont do any manufacturing only cloud hosting, this is just a personal project. the heatsink issue is confounding me and I really am just tempted to use thermal pads but I know how hot these things run and just dont think that will cut it unless youre at like 100mhz, thermal paste would work but you run the risk of not putting enough on and it making contact same with thermal adhesive. The way the 17+ is laid out it has seperate heatsinks per asic but thats also in a machine with a 6000 rpm fan which im looking for this to sit on the corner in the floor and you basically forget about it, maybe get lucky with a block, or just hope pricing goes back up and by then even the little bit youve mined would be worth something. its really frustrating that you either can only do a hobby project with just a few chips or you have to go for it and basically just clone a hashboard. cause I can now see that my design wouldnt really work anyway because if its drawing that much power per two chips in series then me having 6 sets would make it impossible to feed, which refers back to at that point you basically just have to clone a board just with less chips.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: TalkativeCoin on January 17, 2023, 12:58:10 PM
The APW3 sounds a lot better if you put a Noctua fan in there.

Do you use any kind of LNA/resistor for it or just run off the nominal voltage?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 17, 2023, 01:26:14 PM
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!

overall (front and back):
https://i.gyazo.com/24625a4510e0393d42d2ae27f94f5ebc.png https://i.gyazo.com/438c1e7d3284387ee43fe1a1162a8a45.png

asic layout, 8 pin ic 5v 5 pin 3.3v, not fully put together but should work in theory?
https://i.gyazo.com/ae867ddc0d43c6b0dc4fe1b36e88fbf1.png

serial ttl adapter, 12v power, cm4, gpio pin set, startings of power circuitry to power the cm4
https://i.gyazo.com/91955ccfa9e6b9f295086913b4efdbb6.png

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!
Quote with image tags.

It would honestly be great if you could export those EasyEDA files to KiCAD and then push that KiCAD project to GitHub & continue developing it on KiCAD. ;D I switched myself, too, following Skot's advice and it's not only been easy to switch, but this software is also sooo much better. World of difference.

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?
Nowadays most power goes to 12V. For instance, this 1600W premium unit from Seasonic only delivers 82.5W of those 1600 on the 3.3V rail.
https://seasonic.com/prime-tx#specification

Lower specced PSU's still deliver 20A, but that's pretty wasteful. You're looking at using 66W out of a 650W unit.

Maybe 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 were faster! :D

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
ive never built the bitaxe before so whats the power draw on there to get say around 700gh? I know on the s17+ you can get it to around 370gh per chip.
I am right now running 6 BM1397 in the R909 that Skot linked to you earlier, producing 2.133Th/s at around 100W. So you need 2 chips at 350GH/s each and those will pull about 30W together. Giving them more juice just makes them run too hot and getting less efficient.

thermal paste would work but you run the risk of not putting enough on and it making contact same with thermal adhesive.
Thermal paste would still give you contact in some areas. It is just meant to fill tiny imperfections in the metal of heatsink & chip, not to create an electrically insulating layer between them.

Maybe look into graphite thermal pads. They have very high thermal conductivity (like paste) and I believe low electrical conductivity.

The way the 17+ is laid out it has seperate heatsinks per asic but thats also in a machine with a 6000 rpm fan
You could buy yourself an R909 and open it up (I won't do it with mine); I see 2 beefy heatsinks, one per side of the PCB. It has 6 chips. No idea how sidehack did it. :P


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: pwakham on January 17, 2023, 02:58:44 PM
I am mostly opposed to kicad mostly because my workflow has been adjusted to ezeda and I know the hotkeys by heart none of those transfer over to kicad and I havent been too eager to look how to change hotkeys. One thing I think could be possible is to have them in one domain. S17+ miners have 13 domains of 5 chips making 65 chips. in those domains the gnd only becomes an issue on the 1397 if it is crossing domains. only issue is now I have to figure out how to make 3 domains of 4 chips lol. I wanted to design this for the 1398 as thats what I have the most access to and runs on .36 volts just a lot of current but after learning that kanoi only goes up to a 1397 kinda hampers that and I dont want to design something then wait for compatability


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 17, 2023, 04:23:24 PM
got the ESP32 LED Controller running with the bitaxe RGB LEDs -- bright orange, of course!

https://sk9k.com/pics/IMG_3905.jpg

Ordered a 40x40x10mm 5V 4-pin Noctua fan so I can try out changing the fan speed with the EMC2101

So very cool!!! ;D Going to make a really neat case for it.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 17, 2023, 04:38:46 PM
I think it makes sense to have a separate RTOS thread/task listening to, parsing and acting on BM1397 responses. Low latency with good hashes seems important!
Oh yes, you want to get those out immediately. Would definitely work with threads / tasks / listeners (whatever fits the framework or programming language used). On the other hand, I don't think the main task needs to do much while the ASIC is hashing, no?

In that case, it would be possible to do the ASIC comms on main thread and periodically / on background thread fetch new block templates from the pool. Whatever is most performant, I'd suggest.



You would not happen to have a stl, obj 3d model of the complete assembled Bitaxe would you? With heatsink and fan? Exact size of the completed Bitaxe in stl file format?

Here (https://www.n0nce.eu/src/bitaxe.obj)'s the .obj; I just exported from KiCAD, then converted it using Blender.
You will need to find or model the heatsink & fan yourself, as I don't have those models.

Having some issues getting the bitaxe obj to actual real world scale? Seems to get exported 3000x smaller to real life scale. Got any advice?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 17, 2023, 04:55:29 PM
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!


You should join us at Discord (https://discord.gg/APh8awPJRW). Just a fun place to collaborate on tiny bitcoin mining gadgets and gizmos ;D . Knowledge base and trying to get some tutorials on there as well. Collaborate, share knowledge and have some fun.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 17, 2023, 05:31:37 PM
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!


You should join us at Discord (https://discord.gg/APh8awPJRW). Just a fun place to collaborate on tiny bitcoin mining gadgets and gizmos ;D . Knowledge base and trying to get some tutorials on there as well. Collaborate, share knowledge and have some fun.

I second this; Discord is nice for streaming development chat. We’ll be hyper-vigilant about scammers!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 17, 2023, 07:19:21 PM
Having some issues getting the bitaxe obj to actual real world scale? Seems to get exported 3000x smaller to real life scale. Got any advice?
You should be able to scale it up without problem / quality loss. I actually didn't even check what scale it was imported as and simply resized the heatsink to fit the PCB. Probably should have been the other way round, but you don't see that in a render.. :P


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 18, 2023, 01:53:10 PM
I second this; Discord is nice for streaming development chat. We’ll be hyper-vigilant about scammers!

Aaaaaaagh!!!! Those scammers on Discord are notorious , even though Discord is good for development chatting


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: GizmoMiner on January 18, 2023, 07:48:42 PM
I second this; Discord is nice for streaming development chat. We’ll be hyper-vigilant about scammers!

Aaaaaaagh!!!! Those scammers on Discord are notorious , even though Discord is good for development chatting

All knowledge in the discord is open source. We should not have issues with scammers. Seeing everything is free. None of the mining projects associated with the discord or the open source Bitcoin hardware initiative sell anything. They give away all knowledge gained. All their time  and energy is spent from what I have gathered. For personal pleasure and to enrich the Bitcoin community with open source knowledge. Something that has been void in the Bitcoin mining hardware development community for far to long.  Most mining hardware companies, go to great lengths to keep their information closed source.

These developers evolved in these emerging open source Bitcoin mining hardware projects are truly spectacular. They are selfless and have the original  vision of Bitcoin “open source” close to the chest. Nothing to scam when everything is FREE. We will however watch closely.

What is really awesome is they are actually trying to make it even easier for people to get with PCB manufactures and order these prototype boards themselves “tutorials”. A hug daunting task for the average person is to actually order these prototype boards. A goal is to make tutorials for anyone with zero hardware knowledge to order these boards and slap on an ASIC chip. Done and Done.

Many people who have zero hardware development skill. Can actually gain first time hardware knowledge by the love of mining Bitcoin and  through the knowledge provided by these open source hardware projects. Really fun concept of people learning Bitcoin through building their own miner.

At the same time Mining hardware companies will still thrive. People will always want boxed, plug and play miners. For people wanting a more hands on deeper understanding of  Bitcoin and the hardware that mines it. They have options like Bitaxe and Voodoo. To name a few. Sorry for the long reply. Was able to get out all my thoughts out via your reply. Thank you.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 19, 2023, 03:22:27 PM

A couple things you might watch out for;

- 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.


I thought the Bottom side is connected to GND and +Ve  while the top has copper insulating substrate below it not connected to GND . I believe what you mentioned in your comment , if correct then , a common Heatsink  for 2 chips is not possible. That's not a good design, i thought the top had great thermal conductivity  but poor/no electrical conductivity at all due to insulating substrate below the copper top

Can you elaborate ?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 19, 2023, 03:41:03 PM

A couple things you might watch out for;

- 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.


I thought the Bottom side is connected to GND and +Ve  while the top has copper insulating substrate below it not connected to GND . I believe what you mentioned in your comment , if correct then , a common Heatsink  for 2 chips is not possible. That's not a good design, i thought the top had great thermal conductivity  but poor/no electrical conductivity at all due to insulating substrate below the copper top

Can you elaborate ?

I just checked on some used BM1397AG I have; there is about 30Ω between the bottom GND pad and the top. I also checked on my last remaining new BM1397AG and it's more like 90Ω.

It is my understanding that the S17 has individual heatsinks for each chip because of this problem.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 19, 2023, 04:01:39 PM

I just checked on some used BM1397AG I have; there is about 30Ω between the bottom GND pad and the top. I also checked on my last remaining new BM1397AG and it's more like 90Ω.

It is my understanding that the S17 has individual heatsinks for each chip because of this problem.

i have seen several refits for S17+ using a single large combed Heatsink plate for several chips all at once ( 3 large heatsinks per Hashboard ) . Not sure , how they get them to work


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 19, 2023, 04:08:16 PM

I just checked on some used BM1397AG I have; there is about 30Ω between the bottom GND pad and the top. I also checked on my last remaining new BM1397AG and it's more like 90Ω.

It is my understanding that the S17 has individual heatsinks for each chip because of this problem.

i have seen several refits for S17+ using a single large combed Heatsink plate for several chips all at once ( 3 large heatsinks per Hashboard ) . Not sure , how they get them to work

I have heard from a guy on our discord (you should join!) that in some cases they sand off the copper top.. I didn't believe it, but he has some pictures.

I think they could also use a electrically insulating but thermally conductive layer too.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on January 19, 2023, 04:10:23 PM

I just checked on some used BM1397AG I have; there is about 30Ω between the bottom GND pad and the top. I also checked on my last remaining new BM1397AG and it's more like 90Ω.

It is my understanding that the S17 has individual heatsinks for each chip because of this problem.

i have seen several refits for S17+ using a single large combed Heatsink plate for several chips all at once ( 3 large heatsinks per Hashboard ) . Not sure , how they get them to work

I have heard from a guy on our discord (you should join!) that in some cases they sand off the copper top.. I didn't believe it, but he has some pictures.

I think they could also use a electrically insulating but thermally conductive layer too.

which discord group ? i belong to a couple . i was looking of using MG-Chemicals 8329TFF Thermally Conductive Adhesive https://www.mgchemicals.com/downloads/tds/tds-8329tff-2parts.pdf (https://www.mgchemicals.com/downloads/tds/tds-8329tff-2parts.pdf) which as they say on their datasheet  --- It is a paste that cures to form a hard, durable polymer that is thermally conductive, yet electrically insulating. A few guys who repair S17+ recommended it to me for BM1397 Heatsinks . I am now doubting myself on this


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on January 19, 2023, 04:16:23 PM

I just checked on some used BM1397AG I have; there is about 30Ω between the bottom GND pad and the top. I also checked on my last remaining new BM1397AG and it's more like 90Ω.

It is my understanding that the S17 has individual heatsinks for each chip because of this problem.

i have seen several refits for S17+ using a single large combed Heatsink plate for several chips all at once ( 3 large heatsinks per Hashboard ) . Not sure , how they get them to work

I have heard from a guy on our discord (you should join!) that in some cases they sand off the copper top.. I didn't believe it, but he has some pictures.

I think they could also use a electrically insulating but thermally conductive layer too.

i think the "sanding" is to flatten the prior solder remains, when retrofitting the mono heatsinks, then termal paste is used for isolation


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 19, 2023, 04:19:13 PM

which discord group ? i belong to a couple

I'm on this one from GizmoMiner -> https://discord.gg/nSTUZFC8


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 20, 2023, 05:46:16 PM
a common Heatsink  for 2 chips is not possible
Unless they are on the same ground. Then it would work.

I just had a closer look at my R909 and noticed it actually has 4 individual heatsinks; 2 per side.
Here's a well-lit picture from a review; the standoff in the center makes it difficult to see, but you can tell that the spacing between regular finns and between the two most center ones is different. Also notice the gap between standoff and bottom right heatsink. That's not a shadow.
https://i.postimg.cc/mDPxKm2p/image.png

You can check out the beginning of that review for more angles (he moves it around a bit): https://www.youtube.com/watch?v=fgU1fUfEd3Y

I'm not sure if it makes sense to have chips on both sides of the PCB or if GekkoScience cools the chips from the die side and from the PCB side.
In any case, they do seem to group chips together; in case one side was just PCB cooling, then 3 chips wold be sharing one heatsink.



Edit: Mystery solved. Thermal pads seem to work fine thermally and insulate the chips electrically, at the same time.
The IC package is plated and electrically connected to local ground, which means that unless there's electrical insulation between the package and heatsink, you can cause shorts and break stuff. We use a 0.5mm 20W/k silicone pad to avoid shorts.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 24, 2023, 05:36:32 AM
The APW3 sounds a lot better if you put a Noctua fan in there.

Do you use any kind of LNA/resistor for it or just run off the nominal voltage?

Just off nominal voltage; it should be 12V just like the fan.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 24, 2023, 05:40:12 AM
Edit: Mystery solved. Thermal pads seem to work fine thermally and insulate the chips electrically, at the same time.
The IC package is plated and electrically connected to local ground, which means that unless there's electrical insulation between the package and heatsink, you can cause shorts and break stuff. We use a 0.5mm 20W/k silicone pad to avoid shorts.

Doesn't silicone have low thermal conductivity? I would think electrically insulating and thermally conductive are tough material properties.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 24, 2023, 12:18:00 PM
Edit: Mystery solved. Thermal pads seem to work fine thermally and insulate the chips electrically, at the same time.
The IC package is plated and electrically connected to local ground, which means that unless there's electrical insulation between the package and heatsink, you can cause shorts and break stuff. We use a 0.5mm 20W/k silicone pad to avoid shorts.
Doesn't silicone have low thermal conductivity? I would think electrically insulating and thermally conductive are tough material properties.
Indeed; all the products I could find made from silicone have thermal conductivity in the single digit W/mK range. It seems impressive to me that sidehack has access to pads with 20W/mK. I'll search online some more, later.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: paid2 on January 24, 2023, 12:23:07 PM
Edit: Mystery solved. Thermal pads seem to work fine thermally and insulate the chips electrically, at the same time.
The IC package is plated and electrically connected to local ground, which means that unless there's electrical insulation between the package and heatsink, you can cause shorts and break stuff. We use a 0.5mm 20W/k silicone pad to avoid shorts.
Doesn't silicone have low thermal conductivity? I would think electrically insulating and thermally conductive are tough material properties.
Indeed; all the products I could find made from silicone have thermal conductivity in the single digit W/mK range. It seems impressive to me that sidehack has access to pads with 20W/mK. I'll search online some more, later.

Couldn't we use this ? https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R (https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R)

73 W/mk


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 24, 2023, 12:26:21 PM
Couldn't we use this ? https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R (https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R)

73 W/mk
It's highly electrically conductive, though. And any liquid / paste-like thermal interface will squish out and have spots where the cooler directly contacts the chip, anyway.
The main problem here is finding an interface that is thermally conductive and electrically isolated.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 25, 2023, 04:43:31 AM
I got the bitaxe max_v2 board working with a 1.8V usbserial adapter and cgminer! not doing too bad either:

Code:
 1: GSF 3NNU10x0: BM1397:01+ 400.00MHz T:400 P:400 (32:16) |  100% WU:100% | 366.4G / 259.3Gh/s WU:3621.9/m

Also some basic drivers for the fan speed and temperature:

Code:
I (1148101) i2c-test: Vcore: 1400 mV
I (1148101) i2c-test: Fan Speed: 5004 RPM
I (1148101) i2c-test: Chip Temp: 50.88 C

A DIY miner hacker from twitter came on the discord to tell us he has made (CPU) mining firmware for the ESP32! https://github.com/BitMaker-hub/ESP32_NerdMiner


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 25, 2023, 12:26:59 PM
I got the bitaxe max_v2 board working with a 1.8V usbserial adapter and cgminer! not doing too bad either:

Code:
 1: GSF 3NNU10x0: BM1397:01+ 400.00MHz T:400 P:400 (32:16) |  100% WU:100% | 366.4G / 259.3Gh/s WU:3621.9/m

Also some basic drivers for the fan speed and temperature:

Code:
I (1148101) i2c-test: Vcore: 1400 mV
I (1148101) i2c-test: Fan Speed: 5004 RPM
I (1148101) i2c-test: Chip Temp: 50.88 C

A DIY miner hacker from twitter came on the discord to tell us he has made (CPU) mining firmware for the ESP32! https://github.com/BitMaker-hub/ESP32_NerdMiner
That sounds awesome! Great job with that hardware; from what I picked up, it is mostly fine except a small change on the PCB, right?
I finally got an ESP32-S3 dev board in my hands and will get my Bitaxe (older revision without onboard ESP chip) soldered soonTM. Then I'll get to work on that firmware.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 25, 2023, 05:50:26 PM
Couldn't we use this ? https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R (https://desktop.bg/thermal_pastes-thermal_grizzly-Conductonaut-thermal_grizzly_conductonaut_liquid_metal_1_gramm_TGC001R)

73 W/mk
It's highly electrically conductive, though. And any liquid / paste-like thermal interface will squish out and have spots where the cooler directly contacts the chip, anyway.
The main problem here is finding an interface that is thermally conductive and electrically isolated.

There are many reviews on this topic on youtube, where they compare liquid metal to different thermal paste. In general the answer is that a very good thermal paste will give you a similar (slightly worse) result as the liquid metal. The thermal past will however be way more easy to use and not short your circuit or do other bad stuff. Liquid metal may be an option if you want to build just one or two of the miners for yourself, but it would never be an option for a larger scale production.
See videos like this: https://www.youtube.com/watch?v=5a9VcG4j8-k


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 25, 2023, 06:06:36 PM
There are many reviews on this topic on youtube, where they compare liquid metal to different thermal paste. In general the answer is that a very good thermal paste will give you a similar (slightly worse) result as the liquid metal. The thermal past will however be way more easy to use and not short your circuit or do other bad stuff. Liquid metal may be an option if you want to build just one or two of the miners for yourself, but it would never be an option for a larger scale production.
See videos like this: https://www.youtube.com/watch?v=5a9VcG4j8-k

The issue with paste is we can't guarantee it's completely insulating the heatsink from the ASIC.

What about those old school mica heatsink pads? How's their thermal conductivity? I googled around and couldn't find any numbers.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 25, 2023, 07:23:02 PM

The issue with paste is we can't guarantee it's completely insulating the heatsink from the ASIC.

What about those old school mica heatsink pads? How's their thermal conductivity? I googled around and couldn't find any numbers.


This is what the website says of thermal grizzly:

Quote
Is Thermal Grizzly thermal paste electrically conductive?
"Conventional" Thermal Grizzly thermal paste, such as Aeronaut, Hydronaut, Kryonaut and Kryonaut Extreme is not electrically conductive. Only Thermal Grizzly Conductonaut (liquid metal) is electrically conductive.

From my own experience I can say that there is no issue with the electrical conductivity. I have done some custom water-cooling project, where I basically drowned some small components in thermal paste because it was the only possibility. I never had any issues form it. I can however not say what kind of thermal past it was. It would in general at least be an option that could be tried out.

Or do you think the metal of the cooler will short out the asic?

If this is the issue then maybe the best solution is indeed a thermal pad.The best ones should be: https://kriticalpads.com
However they are expensive and compared to paste pretty bad. (20 W/mK)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 26, 2023, 12:57:35 AM
Or do you think the metal of the cooler will short out the asic?
That's the issue all along, indeed. O0

These chips expose their local ground on the top. Since the grounds have a voltage potential between them though, a common heatsink would allow undesired current flow, i.e. magic smoke. ;)

If this is the issue then maybe the best solution is indeed a thermal pad.The best ones should be: https://kriticalpads.com
However they are expensive and compared to paste pretty bad. (20 W/mK)
20W/mK is good. Sidehack uses that, too, as quoted by me earlier (https://bitcointalk.org/index.php?topic=5400851.msg61627142#msg61627142).


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 26, 2023, 07:38:40 AM
What could also be worth to check out is to coat the cooler with a non conductive coating:

Quote
What Does Non-conductive Coating Mean?

Non-conductive coatings are specialized coatings that limit the transfer of heat or electricity to the metal substrate with the coating applied. Most non-conductive coatings are organic in nature and achieve their insulative properties by being devoid of conductive metals such as copper, zinc and nickel. Classes of non-conductive coatings include:

Polyurethanes
Epoxies
Ceramic coatings
Polymers
A non-conductive coating may also be known as an insulating coating or insulation coating.

It will obviously mess with the cooling, but the thermal paste has such a high conductivity, that even a 50% decrease will still make it better and way cheaper than the thermal pad.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: TalkativeCoin on January 26, 2023, 08:50:30 AM
The APW3 sounds a lot better if you put a Noctua fan in there.

Do you use any kind of LNA/resistor for it or just run off the nominal voltage?

Just off nominal voltage; it should be 12V just like the fan.

Thanks! I was looking maybe to use a bit less voltage to quiet it down, without too much of a performance hit/compromise.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 26, 2023, 01:05:58 PM


Thanks! I was looking maybe to use a bit less voltage to quiet it down, without too much of a performance hit/compromise.

You can simply put in a fan that has a lower RPM rating. I use for example a noisblocker in my APW3 and it is not possible to hear it. However the cooling ability is much smaller than the original Fan. This only works, since I use less power than the APW3 can supply.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: TalkativeCoin on January 26, 2023, 01:52:54 PM


Thanks! I was looking maybe to use a bit less voltage to quiet it down, without too much of a performance hit/compromise.

You can simply put in a fan that has a lower RPM rating. I use for example a noisblocker in my APW3 and it is not possible to hear it. However the cooling ability is much smaller than the original Fan. This only works, since I use less power than the APW3 can supply.

Yes, that is an option too, but Noctua's fans usually come with Low Noise adapters (basically an in-wire resistor that lowers the voltage to 7V or 5V), so I was thinking maybe trying that one out and seeing if there's a noticable performance loss.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on January 26, 2023, 05:59:11 PM

Yes, that is an option too, but Noctua's fans usually come with Low Noise adapters (basically an in-wire resistor that lowers the voltage to 7V or 5V), so I was thinking maybe trying that one out and seeing if there's a noticable performance loss.

I can tell you that the airflow with a slow standard fan will be only a slightly fraction of that of the original fan. You should decide for yourself if you are willing to take the risk of overheating. I don"t actually know if there is a good overheating protection built in.
I use my APW3 until around 1.000 Watts with the slower fan, but it depends a lot also on room temperature and different factors.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: TalkativeCoin on January 26, 2023, 06:46:54 PM

Yes, that is an option too, but Noctua's fans usually come with Low Noise adapters (basically an in-wire resistor that lowers the voltage to 7V or 5V), so I was thinking maybe trying that one out and seeing if there's a noticable performance loss.
...but it depends a lot also on room temperature and different factors.

Definitely! I'll play around with the setup and see what's the best optimum. Thanks for the input!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on January 28, 2023, 04:03:18 AM
I got a proper INA260 from Mouser, and combined with getting the correct endianness in the driver, I can now get Voltage, Current and Power measurements from the bitaxe! This test code is in the ESP-Miner `i2c_test` branch https://github.com/skot/ESP-Miner/tree/i2c_test

Code:
0: GSF 3NNU10x0: BM1397:01+ 400.00MHz T:400 P:400 (32:16)  |  100% WU:100% | 363.1G / 264.0Gh/s WU:3687.4/m

I (2345491) i2c-test: Fan Speed: 3508 RPM
I (2345491) i2c-test: Chip Temp: 54.38 C
I (2345491) i2c-test: Current: 2013.75 mA
I (2345491) i2c-test: Voltage: 4911.25 mV
I (2345491) i2c-test: Power: 9980.00 mW
I (2345501) i2c-test: Vcore: 1367 mV


I've also fixed all of most all of the HW bugs found in the bitaxe `max_v2` rev and created a new `max_v2.2` branch. https://github.com/skot/bitaxe/tree/max_v2.2


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on January 29, 2023, 08:32:13 PM
I got a proper INA260 from Mouser, and combined with getting the correct endianness in the driver, I can now get Voltage, Current and Power measurements from the bitaxe! This test code is in the ESP-Miner `i2c_test` branch https://github.com/skot/ESP-Miner/tree/i2c_test

Code:
0: GSF 3NNU10x0: BM1397:01+ 400.00MHz T:400 P:400 (32:16)  |  100% WU:100% | 363.1G / 264.0Gh/s WU:3687.4/m

I (2345491) i2c-test: Fan Speed: 3508 RPM
I (2345491) i2c-test: Chip Temp: 54.38 C
I (2345491) i2c-test: Current: 2013.75 mA
I (2345491) i2c-test: Voltage: 4911.25 mV
I (2345491) i2c-test: Power: 9980.00 mW
I (2345501) i2c-test: Vcore: 1367 mV


I've also fixed all of most all of the HW bugs found in the bitaxe `max_v2` rev and created a new `max_v2.2` branch. https://github.com/skot/bitaxe/tree/max_v2.2
These are some awesome updates, great work Skot! Small personal update from my side: I am going to try hot-air soldering my old bitaxe board to be able to write ESP firmware for it. If that doesn't work, I will need some more time to acquire and modify a small oven for soldering. I could still already work on the Stratum part, though.

If we're confident that the max_v2.2 hardware is correct, how about creating a new thread? Such that other interested people can find it?
I'm thinking something like: [In Development] Open Source BM1397 Bitcoin ASIC miner project with a nice start post that contains all information to get started and build it.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: sirmuhamad1 on February 15, 2023, 02:25:12 PM
Hi
I want Register-Map for BM1397 & Bm1398 & BM 1387
If this chipss supoort verison rolling 16 ???
PLZ help


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on February 15, 2023, 06:24:21 PM
Hi
I want Register-Map for BM1397 & Bm1398 & BM 1387
If this chipss supoort verison rolling 16 ???
PLZ help
This project is mostly about creating open-source hardware, so far. I don't think anyone has worked on the ESP32-S3 driver portion yet.
But we do have open-source drivers running on desktop operating systems, from kano. This file (https://github.com/kanoi/cgminer/blob/master/driver-gekko.c) should get you started.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: xraid on March 03, 2023, 01:30:23 AM
Hi
I want Register-Map for BM1397 & Bm1398 & BM 1387
If this chipss supoort verison rolling 16 ???
PLZ help
This project is mostly about creating open-source hardware, so far. I don't think anyone has worked on the ESP32-S3 driver portion yet.
But we do have open-source drivers running on desktop operating systems, from kano. This file (https://github.com/kanoi/cgminer/blob/master/driver-gekko.c) should get you started.

BM1397 registers here :
https://github.com/GPTechinno/bm1397-rs

also the Saleae application Logic has a BM1397 extension that can be loaded from within the app


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: patoshi on March 03, 2023, 03:44:07 PM
Great DIY project. I'm totally new to fabricating my own boards, but I fix asic miners and have a bunch of spare BM1397 chips I've extracted.

Is there a tutorial of how to make these boards?

Anyone interested in starting a telegram channel for this?

thx


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on March 03, 2023, 11:12:41 PM
Great DIY project. I'm totally new to fabricating my own boards, but I fix asic miners and have a bunch of spare BM1397 chips I've extracted.

Is there a tutorial of how to make these boards?

Anyone interested in starting a telegram channel for this?

thx
Tutorial is not needed, you find KiCAD source files as well as Gerber files ready to send to a PCB manufacturer all on GitHub. Having spare BM1397 definitely helps, as they are sometimes hard or expensive to buy new.
There is a Discord group as far as I know; it should be here: https://discord.gg/APh8awPJRW
If that doesn't work, ping @GizmoMiner. I will need to have a look myself, too, just didn't get around to doing it yet.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 06, 2023, 12:20:31 AM
Great DIY project. I'm totally new to fabricating my own boards, but I fix asic miners and have a bunch of spare BM1397 chips I've extracted.

Is there a tutorial of how to make these boards?

Anyone interested in starting a telegram channel for this?

thx

Check out the “Building” section down at the bottom of the readme; https://github.com/skot/bitaxe#building

If you have any other questions, you can ask for help in the “discussion” section on GitHub.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: paid2 on March 06, 2023, 03:57:15 PM
Great DIY project. I'm totally new to fabricating my own boards, but I fix asic miners and have a bunch of spare BM1397 chips I've extracted.

Is there a tutorial of how to make these boards?

Anyone interested in starting a telegram channel for this?

thx

Check out the “Building” section down at the bottom of the readme; https://github.com/skot/bitaxe#building

If you have any other questions, you can ask for help in the “discussion” section on GitHub.

Would you accept to film the whole process if you have some time to spend on it ? I would send you some funds with pleasure to cover the time spent doing it. if not, any good youtube recommandation to start from 0 ?
I never did anything related to soldering and to PCBs until now. The only experience I have with soldering  is replacing the burnt 6 pins of my hashboards, I am a little bit lost to be honest..

I am thinking for a while to start with the project of building a bitaxe and would like to be prepared as much as possible.
Anyway, thank you this project!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 06, 2023, 06:24:07 PM
Check out the “Building” section down at the bottom of the readme; https://github.com/skot/bitaxe#building

If you have any other questions, you can ask for help in the “discussion” section on GitHub.

Would you accept to film the whole process if you have some time to spend on it ? I would send you some funds with pleasure to cover the time spent doing it. if not, any good youtube recommandation to start from 0 ?
I never did anything related to soldering and to PCBs until now. The only experience I have with soldering  is replacing the burnt 6 pins of my hashboards, I am a little bit lost to be honest..

I am thinking for a while to start with the project of building a bitaxe and would like to be prepared as much as possible.
Anyway, thank you this project!

There is tons of good stuff out there on youtube. I realize it can be tough in the beginning when you don't even know what words to google. Here is a good video on SMD PCB soldering to get you started; https://www.youtube.com/watch?v=qyDRHI4YeMI

Maybe make a new thread about your learning project, and hit me up if you have any questions. Tips, tricks, tools, supplies, whatever questions you have. Then maybe you can make that how-to video!

also: the fastest way to learn is to just get started. goof it up a couple times. overcome analysis paralysis.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: paid2 on March 07, 2023, 04:16:09 PM

There is tons of good stuff out there on youtube. I realize it can be tough in the beginning when you don't even know what words to google. Here is a good video on SMD PCB soldering to get you started; https://www.youtube.com/watch?v=qyDRHI4YeMI

Maybe make a new thread about your learning project, and hit me up if you have any questions. Tips, tricks, tools, supplies, whatever questions you have. Then maybe you can make that how-to video!

also: the fastest way to learn is to just get started. goof it up a couple times. overcome analysis paralysis.

Thank you for your answer, and for the link you shared.

You're absolutely right, once I get started I'm sure I'll progress little by little, but as you say, I'm currently at the stage where I need to demystify the basics so I can start getting into the nitty gritty things.
I won't hesitate to post my questions in a new thread if I get stuck somewhere.

I'll stop polluting your topic here and will continue to follow it, good luck and keep up the good work  :)


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: zhzz on March 17, 2023, 06:41:51 PM
Thank you so much to all contributors. Will this work with BM1387? I still have a couple of them because I wanted to fix my 0 chip newpac problem.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 18, 2023, 01:16:56 PM
Thank you so much to all contributors. Will this work with BM1387? I still have a couple of them because I wanted to fix my 0 chip newpac problem.

Yes, there is an older revision of the bitaxe that works with two BM1387; https://github.com/skot/bitaxe/tree/BM1387_miner


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: zhzz on March 18, 2023, 10:38:15 PM
Thank you so much to all contributors. Will this work with BM1387? I still have a couple of them because I wanted to fix my 0 chip newpac problem.

Yes, there is an older revision of the bitaxe that works with two BM1387; https://github.com/skot/bitaxe/tree/BM1387_miner

Wow, thanks! Is the git of the two BM1387 design fully working? I have no clue about all of this, still got a bit of experience and an smd soldering station available. What's the difficulty level to build this from scratch with the available instructions? Anything I have to know? I'd be so happy to build a working miner, I was not able to fix my 0 chip problem of my broken gekkoscience.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 19, 2023, 03:51:58 AM
Thank you so much to all contributors. Will this work with BM1387? I still have a couple of them because I wanted to fix my 0 chip newpac problem.

Yes, there is an older revision of the bitaxe that works with two BM1387; https://github.com/skot/bitaxe/tree/BM1387_miner

Wow, thanks! Is the git of the two BM1387 design fully working? I have no clue about all of this, still got a bit of experience and an smd soldering station available. What's the difficulty level to build this from scratch with the available instructions? Anything I have to know? I'd be so happy to build a working miner, I was not able to fix my 0 chip problem of my broken gekkoscience.

Yes, the design in the `BM1387_miner` branch on GitHub is working. It's a really simple design though and doesn't have a voltage regulator or usbserial IC like the gekkoscience. This means you need to supply around 0.5V at 3A, which can be tricky. You also need to find a 1.8V FTDI usbserial cable with the CBUS1 pin broken out -- also tricky. These are all things I fixed in the BM1397-based design.

Soldering-wise I'd say it's medium hard. You'll want to use solder paste stencils for both sides. the Bitmain ASIC is the hardest part to solder. All of the passives are 0402.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on March 19, 2023, 03:07:38 PM
Soldering-wise I'd say it's medium hard. You'll want to use solder paste stencils for both sides. the Bitmain ASIC is the hardest part to solder. All of the passives are 0402.
Hey Skot, good seeing you here again after a while. I acquired some more hardware by now and I shall start soldering my boards, soon-ish. You mention the ASIC was hard to solder; what exactly about it? And how did you solder it? In one go with the rest? And I think you used an oven, right?
Would it be easier to - let's say - do the passive stuff and buck converter circuitry first and the ASIC in a second pass with hot air directed right onto it?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 19, 2023, 04:46:49 PM
Soldering-wise I'd say it's medium hard. You'll want to use solder paste stencils for both sides. the Bitmain ASIC is the hardest part to solder. All of the passives are 0402.
Hey Skot, good seeing you here again after a while. I acquired some more hardware by now and I shall start soldering my boards, soon-ish. You mention the ASIC was hard to solder; what exactly about it? And how did you solder it? In one go with the rest? And I think you used an oven, right?
Would it be easier to - let's say - do the passive stuff and buck converter circuitry first and the ASIC in a second pass with hot air directed right onto it?

Hey!

Yeah the ASIC is a PITA to solder. It’s essentially a LGA package, meaning the pins (pads, really) are only on the underside of the package. This means there is no way to see if you have soldered it properly. I have had some success by trial and error. I do a first pass soldering the whole thing in an oven, using stencils for solder paste application. If that doesn’t work I come back and try to fix with hot air and a hand soldering iron, under a microscope. The microscope only helps to look at alignment of the chip with the silkscreen..



Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: zhzz on March 20, 2023, 09:10:52 AM
doesn't have a voltage regulator or usbserial IC like the gekkoscience. This means you need to supply around 0.5V at 3A, which can be tricky. You also need to find a 1.8V FTDI usbserial cable with the CBUS1 pin broken out -- also tricky. These are all things I fixed in the BM1397-based design.

Would it be possible to adapt the easier 1397 design (voltage regulator and usbserial cable) to the old 1387 design to make it work better? The 1397 is 5-10x of the price for a 1387. The stencil is the same for 1387 and 1397, right?


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: MuffinCutter on March 25, 2023, 09:49:10 PM
Hi! I am really excited about this project, you are doing great work and Im looking forward to build my own bitaxe and maybe help a bit with development. My question is: Should I order all the parts now or are there some upgrades coming soon? I would really hate to spend money on something that will be updated right after I pay for it  ;D


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 30, 2023, 03:59:13 AM
doesn't have a voltage regulator or usbserial IC like the gekkoscience. This means you need to supply around 0.5V at 3A, which can be tricky. You also need to find a 1.8V FTDI usbserial cable with the CBUS1 pin broken out -- also tricky. These are all things I fixed in the BM1397-based design.

Would it be possible to adapt the easier 1397 design (voltage regulator and usbserial cable) to the old 1387 design to make it work better? The 1397 is 5-10x of the price for a 1387. The stencil is the same for 1387 and 1397, right?

definitely possible, but not trivial. The BM1387 uses a much lower core voltage, so I don't think the buck regulator I have on the latest bitaxe will work.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on March 30, 2023, 04:01:55 AM
Hi! I am really excited about this project, you are doing great work and Im looking forward to build my own bitaxe and maybe help a bit with development. My question is: Should I order all the parts now or are there some upgrades coming soon? I would really hate to spend money on something that will be updated right after I pay for it  ;D

Hi MuffinCutter, good to have you on board, and thanks for the GitHub PR! There has been an initiative started by BitMaker to move all parts to JLCPCB stocked ones to make PCBA assembly by them easier and cheaper. I think that's a great idea. It might make sense to hold off on ordering for that to be finished.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: hZti on April 03, 2023, 09:58:50 AM
doesn't have a voltage regulator or usbserial IC like the gekkoscience. This means you need to supply around 0.5V at 3A, which can be tricky. You also need to find a 1.8V FTDI usbserial cable with the CBUS1 pin broken out -- also tricky. These are all things I fixed in the BM1397-based design.

Would it be possible to adapt the easier 1397 design (voltage regulator and usbserial cable) to the old 1387 design to make it work better? The 1397 is 5-10x of the price for a 1387. The stencil is the same for 1387 and 1397, right?

definitely possible, but not trivial. The BM1387 uses a much lower core voltage, so I don't think the buck regulator I have on the latest bitaxe will work.

Maybe it is not really an issue to use the BM1397 for now, since the project will take some more time before it is actually worth to build a lot of these devices. In this time the price of the BM1397 will go down and when project is ready it will be based on more modern and at that time also affordable hardware.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: pwakham on April 09, 2023, 12:06:37 AM
If youd like to join the discord where Skot and many other developers with the same ideas in mind are, look no further! We have built a small community for Open Source mining. Skot and myself are the co-owners of this server. come see what all we have to offer!
Keep in mind, this server has been transferred from V1 which the owner went missing due to health complications. This means not all the original messages are available. if you join and would like to see the original server please contact myself, or the moderation team!

We hope to see you there!
https://discord.gg/7HMavW4yyq


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: Skot on April 09, 2023, 04:48:43 AM
If youd like to join the discord where Skot and many other developers with the same ideas in mind are, look no further! We have built a small community for Open Source mining. Skot and myself are the co-owners of this server. come see what all we have to offer!
Keep in mind, this server has been transferred from V1 which the owner went missing due to health complications. This means not all the original messages are available. if you join and would like to see the original server please contact myself, or the moderation team!

We hope to see you there!
https://discord.gg/7HMavW4yyq

Hey, just wanted to confirm what pwakham said. Come check us out on Discord -- there is lots of interesting open source mining happening!


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on June 18, 2023, 10:23:04 PM
JaBIT Solo Miner (Bitaxe V2.2) using a Single BM1397 Chip has now officially been released: It's ideal for Solo home miners, new users , hobbyists, educators, students and developers who interested in understanding and learning about Bitcoin without making huge investments in bitcoin hardware

NOTE 1: Only purchase JaBIT Solo Miner (Bitaxe V2.2) from legitimate developers of bitaxe (Skot , Developeralgo and the bitaxe team) at

Marketplace to purchase:

My website:    https://www.algoceps.com/shop (https://www.algoceps.com/shop)   ( Price will be a little cheaper compared to Amazon and Ebay. If i list it on Amazon or Ebay or any ecommerce site there is extra 15 to 25% fees that goes to those companies )

EBAY:   https://www.ebay.com/itm/256122322488 (https://www.ebay.com/itm/256122322488)  or https://www.ebay.ca/itm/256122322488 (https://www.ebay.ca/itm/256122322488)

Amazon.com:     https://www.amazon.com/gp/product/B0C9HD5QW4 (https://www.amazon.com/gp/product/B0C9HD5QW4) and select "See All buying options" button on the right then add to cart , if "add to cart" or "buy now" buttons don't show up immediately on the main page right side

Amazon.ca:     https://www.amazon.ca/gp/product/B0C9HD5QW4 (https://www.amazon.ca/gp/product/B0C9HD5QW4)  and select "See All buying options" button on the right then add to cart , if "add to cart" or "buy now" buttons don't show up immediately on the main page right side

This is currently the only official release and websites to purchase JaBIT Solo Miner (bitaxe V2.2)

Methods of Payments:
Paypal & Crypto Currency ( Bitcoin (BTC) , Ethereum(ETH), USDT, USDC, BNB, ADA, RVN, LTC, ETC, and DOGE payments ) accepted at https://www.algoceps.com/shop  (https://www.algoceps.com/shop).

NOTE 2: All information about JaBIT Solo Miner (Bitaxe V2.2) can be found on our discord channel
 - https://discord.gg/nRbcVjXm (https://discord.gg/nRbcVjXm)  
You can actually ask any questions to the actual developers and members of the bitaxe community.  

 

About JaBIT Solo Miner

- Is the first fully open source hardware Bitcoin ASIC miner
- Powerful bitcoin miner in small factor( just slightly larger than size of a credit card), can mine any SHA256 Coins such as BitCoin(BTC), Bitcoin Cash(BCH) , Bitcoin SV (BSV), Litecoin Cash (LCC), NameCoin, Digitbyte, etc
-Uses efficient BM1397 Asic chip for mining. It is unlocked for overclocking (Voids warranty). It features a single 7nm technology BM1397 chip.
- Stock hashing speed: 200 GH (please note: these miners run very hot and require active cooling such as fan). It comes equipped with high RPM fan.
- High Speed: 350 GH++ (Running at clock speed of 545 MHz Higher speed requires above spec). To reach max speed of 500GH you will need 3 Amps per miner or PSU to supply 3A per miner!.  JaBIT comes with PSU to supply 5V, upto a Max 6A. i.e Max 30W for each miner.
- Completely silent operation, includes Mini heatsink to cool miner.
- Compatible with Windows, Mac and Linux OS using cgminer software. Includes an Online user manual with instructions for easy setup.
- Mining Algorithm: SHA-256, Minable Coins: Bitcoin (BTC), BitcoinCash (BCH), Acoin (ACOIN), Curecoin (CURE), Joulecoin (XJO), Unbreakable (UNB), Peercoin (PPC), Mark (DEM), Terracoin (TRC), BitcoinSV (BSV)


Advantages:

- Standalone: can mine directly to your pool over WiFi. No External computer needed.
- Embedded: low cost, low maintenance, high availability, high reliability, low power.
- ASIC: based on the very efficient BM1397 from Bitmain.
- Versatile: solo/pool mining, autotune power/heat/efficiency.
- Open Source: All design files are available .


Features

- ESP32-S3-WROOM-1 wifi microcontroller on board
- TI TPS40305 buck regulator steps down the 5V input to power the BM1397
- Maxim DS4432U+ current DAC digitally adjusts the BM1397 core voltage from 0.04V to 2.4V
- TI INA260 power meter measures the input voltage and current of the miner
- Microchip EMC2101 measures the BM1397 internal diode temperature. Also PWM controls the fan and monitors tach output.
- Two sweet RGB status LEDs


Current Status:
- The hardware has been built and tested. Current Batch is shipping now.
- Using cgminer on a separate computer, the JaBIT Solo Miner (Bitaxe v2.2) can mine in excess of 400 GH/s
- ESP32 miner firmware is now available but also under very active development to enhnace it by adding several essential nice-to-have features.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: n0nce on July 21, 2023, 02:38:35 PM
~
Amazing work, guys! I've got a lot of catching up to do. I definitely need to buy or build myself one to check it out hands-on style.
I definitely love the feature-set. You achieved standalone operation with fully digital core voltage and fan control; that's super unique and makes it stand out from the competition. Surely, this should aid in developing larger, multi-chip variants, as well! How about creating a dedicated thread for it here on Bitcointalk now? ;)

One thing that is unclear to me from the online shop listings is whether it comes with the case and power supply or not.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: developeralgo on July 24, 2023, 02:41:01 AM

One thing that is unclear to me from the online shop listings is whether it comes with the case and power supply or not.

Yes it comes with case and Power supply.


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: g5120u on July 24, 2023, 08:41:28 AM
Seeing home power enthusiasts gradually achieve the world's highest chip minimum wattage is a milestone, but seeing resellers now selling it for hundreds of dollars more than older equipment still feels like a high barrier to entry for beginners, not to mention extra shipping from around the world

 ???


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: simpic on September 05, 2023, 11:03:51 PM
Anyone here knows where to get the 3D printed case STL file?

https://d-central.tech/downloads/3d-models

The download link is broken...


Title: Re: Open Source Bitcoin ASIC miner project that uses 2x BM1387 (Antminer S9)
Post by: fillippone on September 28, 2023, 05:43:11 AM
I just discovered this thread.
I have been following the project over Telegram.
I opened a thread about Nerdminers, which you all already probably know, and referenced Bite as a (quasi) totally open-source project ASIC miner.
I am cross-referencing the thread for our fellow forum users who might be interested.

Have a look here:
NERDMINER: Bitcoin lottery miners (https://bitcointalk.org/index.php?topic=5466940.msg62852266#msg62852266)