Bitcoin Forum
October 19, 2018, 02:38:16 PM *
News: Make sure you are not using versions of Bitcoin Core other than 0.17.0 [Torrent], 0.16.3, 0.15.2, or 0.14.3. More info.
 
   Home   Help Search Donate Login Register  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »  All
  Print  
Author Topic: Hacking the S7 - improving efficiency through minor hardware manipulation  (Read 25521 times)
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 08, 2016, 11:22:24 PM
Merited by OgNasty (1), BitMaxz (1), HagssFIN (1)
 #1

So, first thing first. This talk is pretty much specific to the 135-chip S7 version. The earlier 154-chip batches, what with the taller string and fixed voltage, are already as good as they're going to be without a regulator inline of your power supply. But the 135-chip is a bucked string, meaning it's got that regulator built into the board.

It looks like the stock voltage setpoint for an S7 is about 10.3V, or in the 690mV-per-node setpoint. That's about right for 700MHz according to the BM1385 datasheet. A lower-clocked S7 might have a lower voltage setpoint. I just received an S7LN, which is built for 600MHz on two blades; I measured the setpoint at 10.16V or 677mV per node.

The setpoint voltage is fixed. There is no knob to turn to change this.

HOWEVER...

The regulator's voltage is set by a digital potentiometer - more specifically, a digital rheostat (MCP4017). Basically a variable resistor whose resistance is determined by feeding it a number through a serial line. The default value is right in the middle, which is why some "dead" S7 will start to 9.3V - because the value isn't getting updated, so it stays on the middle setting. What should happen is the value gets updated by a little microcontroller (PIC12F1572), which pushes out a fresh value from memory as soon as it kicks on.

That's why Bitmain wants you to power the controller on last (or at least one potential reason), is because the DPOT and PIC get power from the 3.3V wire on the 18-cable to the controller. The "off" value of the DPOT is maximum, so the thing starts to well under 9V; as soon as the circuits see that 3.3V coming in from the controller, the DPOT lights up to center and a short time (a number of milliseconds) later the PIC sends it the number Bitmain gave 'em. If that PIC is toasted, that's when you sit at 9.3V and your S7 is only good for about 450MHz.

At the end of the S7 board are two headers. One two-pin header, GND and tied to a pin on the PIC. One six-pin header, wired up just right for In-Circuit Serial Programming of the PIC. What this means is, with the right basic hardware you should be able to pull firmware off the PIC or update it with your own.

One pin of the PIC, which can be configured for serial data, is tied to the TX pin on the 18-cable. Whether this means it can receive serial data from the controller or not is up to conspiracy theorists to decide. Does Bitmain have a secret version of S7 controller firmware which can change the voltage and they're keeping it for themselves? Maybe. Who knows. For the purposes of the immediate discussion, this is moot.

The PIC12F1572 does not have I2C hardware. Which means the protocol and timings would have to be implemented in software. Since we are talking to only a single device so we don't have to handle collissions, and it responds fast so clock stretching is unnecessary, and since we're only writing so getting responses is unnecessary anyway, it should be pretty straightforward.

I have generated a chart, not of every possible voltage the DPOT can set (since a lot of the voltages are so close together) but of more than half of them. I found hex values corresponding to every 10mV per node from 770mV down to 580mV, which is probably enough granularity for most people.

So what I'm thinking of doing is seeing about writing a basic custom firmware for the PIC, which still unfortunately implements fixed voltage but which can be updated easily to any voltage you want. What I'd probably do is have a set of files, each one labeled with its final setpoint voltage. The PIC would be programmed to set the voltage about 5% high for about a minute, which will help with bootup, warmup and the like. Then it would drop down to the setpoint.

I'm going to be up to my eyeballs in Compac and PSU board manufacture for the next couple weeks, so if anyone already has experience with PICs (and with bit-banging I2C) I'd certainly be interested in sharing what I know and some guinea pig hardware. Otherwise it'll be a hit-or-miss project for me, that probably shouldn't take more than a day or two except it'll be in odd hours between things. That, and I've never programmed PIC and I haven't done any microcontroller coding in about six years.



Guts of the thing - you can see my PICKit that I used to pull firmware and which I'd use to update with new once I can. Also the Bus Pirate currently attached in place of the PIC and feeding values to the DPOT directly.





This setup is currently set at 9.14V (610mV per node) and running at 450MHz stable. You'll probably complain that the error rate is way high. But of the 852 errors noted, 848 of them were from the first 3 minutes while it was warming up and I was still jacking around with the voltage.

If anyone's interested in donating toward this project, 1CoLDs7XNi8ehyFnGWicUhgBGb7Kw42Ugi

1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
1539959896
Hero Member
*
Offline Offline

Posts: 1539959896

View Profile Personal Message (Offline)

Ignore
1539959896
Reply with quote  #2

1539959896
Report to moderator
ZedZedNova
Sr. Member
****
Offline Offline

Activity: 452
Merit: 258

Ooh La La, C'est Zoom!


View Profile
June 08, 2016, 11:56:35 PM
 #2

Interesting project for sure. Looking forward to the updates.

Cheers,

- zed

BTC mining @ ckpool.org | ckpool mining stats || ethOS GPU mining rig Stats || L3+ mining and WTT Tokens @ Giga-Watt
-=O=-
Digital Ocean is where my Masternodes run Digital Ocean Referral Link
NotFuzzyWarm
Legendary
*
Online Online

Activity: 1596
Merit: 1117


Evil beware: We have waffles!


View Profile
June 09, 2016, 12:47:30 AM
 #3

Interesting...
On the batch ones, is the string voltage set by what the PSU provides (at the PCIe plugs) or a fixed board-level buck? I ask because I have a b1 at work that has oc'd beautifully - set to 700MHz both ck and M's Miner Monitor pegs its average hashrate @ 5.43THs with peaks of 6THs and higher  Shocked I have a b5 that does almost as well. Wonder what they would do with a tad more Vcore done by raising the PSU voltage a tad? Wink

For bitcoin to succeed the community must police itself - Joshua Zipkin aka Joshua Alexander leaked AMT A1 miner skype chats
How a miner mfgr SHOULD operate: HaggsFIN trip to Canaan My info useful? Donations welcome! 1Fuzzyk398kDWVjuC5qPX5v6CjSkvbgAbd
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 01:00:31 AM
 #4

If it's a 154-chip, it's straight off the PSU with no regulation. The later 135-chip batches are regulated. As far as I know, the setpoint is not affected by the PSU voltage.

NotFuzzyWarm
Legendary
*
Online Online

Activity: 1596
Merit: 1117


Evil beware: We have waffles!


View Profile
June 09, 2016, 01:14:19 AM
 #5

If it's a 154-chip, it's straight off the PSU with no regulation. The later 135-chip batches are regulated. As far as I know, the setpoint is not affected by the PSU voltage.
Cool
So if I dial up the output from a IBM 2kw supply another 1/10v or more, things might get interesting...

Sidenote: After the bonded T1 service at work that supplies the VOIP phones and i'net being down since ~ 7:30 this morning, as of 1 hour ago it looks like it's back up. I left 2 s5's powered up there to watch on ck pool. That outage dropped me 86.4THs for (over) 14hrs.  Cry More of a bugger is that now I just don't feeling like going 20 miles to bring it all back up. That can wait til the morning I...

For bitcoin to succeed the community must police itself - Joshua Zipkin aka Joshua Alexander leaked AMT A1 miner skype chats
How a miner mfgr SHOULD operate: HaggsFIN trip to Canaan My info useful? Donations welcome! 1Fuzzyk398kDWVjuC5qPX5v6CjSkvbgAbd
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 01:57:07 AM
 #6

And by "154-chip" obviously I mean "162-chip", which is to say 54 chips per board. Whoops.

adaseb
Legendary
*
Offline Offline

Activity: 1750
Merit: 1089



View Profile
June 09, 2016, 02:03:45 AM
 #7

So since each blade is about 200 watts, can these operate at close to the S3 noise levels? Your temps are 47C can you run these S7 safely at like 60C with a slower fan speed?


.FORTUNE.JACK.
      ▄▄███████▄▄
   ▄████▀▀ ▄ ██████▄
  ████ ▄▄███ ████████
 █████▌▐███▌ ▀▄ ▀█████
███████▄██▀▀▀▀▄████████
█████▀▄▄▄▄█████████████
████▄▄▄▄ █████████████
 ██████▌ ███▀████████
  ███████▄▀▄████████
   ▀█████▀▀███████▀
      ▀▀██████▀▀
         
         █
...FortuneJack.com                                             
...THE BIGGEST BITCOIN GAMBLING SITE
       ▄▄█████████▄▄
    ▄█████████████████▄
  ▄█████████████████████▄
 ▄██
█████████▀███████████▄
██████████▀   ▀██████████
█████████▀       ▀█████████
████████           ████████
████████▄   ▄ ▄   ▄████████
██████████▀   ▀██████████
 ▀██
█████████████████████▀
  ▀██
███████████████████▀
    ▀█████████████████▀
       ▀▀█████████▀▀
#JACKMATE
WIN 1 BTC
▄█████████████████████████▄
███████████████████████████
███████████████████████████
██████████▀█████▀██████████
███████▀░░▀░░░░░▀░░▀███████
██████▌░░░░░░░░░░░░░▐██████
██████░░░░██░░░██░░░░██████
█████▌░░░░▀▀░░░▀▀░░░░▐█████
██████▄░░▄▄▄░░░▄▄▄░░▄██████
████████▄▄███████▄▄████████

███████████████████████████
███████████████████████████
▀█████████████████████████▀
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 02:23:04 AM
 #8

I bet you could. The 47C it's currently running, it's only got the pusher fan installed. I bet with both, even with both blades powered up, it'd be a lot cooler.

I'm not going to hardware-hack the other blade, gonna use that as a guinea pig for software changes, so I won't be able to report on that for a while. But there's probably talk about it in the S7LN thread.

RichBC
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500



View Profile
June 09, 2016, 05:56:18 PM
 #9

Good to see someone hacking this... I have some PIC hacking experience as was part of a team that reverse engineered and reprogrammed the PIC in the Scalextric Digital Powerbase. Have Pickit 2 and Logic Analyser etc, however no 135 Chip S7. I will look into solving that if the couple of S5 I have on ebay sell.

Rich

→→→→→→→→→→→→→→→→→→ 💰 Hard-Disk Mineable Cryptocurrency !! B U R S T C O I N 💰 Cheap Price & Easy to Invest - CHECK IT OUT NOW! !! →→→→→→→→→→→→→→→→→→ 💰 Asset exchange, Automatic transactions, Escrow system & More !!
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 06:06:58 PM
 #10

If I'd had the budget I'd have bought one ages ago just for this reason, but it wasn't until I sold the rest of my Compac batch and Bitmain had one for $300 that I was able to bite.

Think you can write a bit-bang I2C capable of sending a single two-byte instruction, waiting for a minute and sending another? The pick-and-place is keeping me pretty busy today but in spare moments I'm looking up details on I2C timings and such, next step is learning the PIC instruction set and breadboarding a bit.

RichBC
Hero Member
*****
Offline Offline

Activity: 574
Merit: 500



View Profile
June 09, 2016, 06:59:14 PM
 #11

Yes probably but like you have a lot of other stuff on my plate at the moment. I had however when I first saw the 135 chip S7 bought some PIC12F1572 and some MCP4017 so time permitting can knock something up without an S7. Will PM you with and email as might be interesting to look at the hex code you have downloaded.

Rich

→→→→→→→→→→→→→→→→→→ 💰 Hard-Disk Mineable Cryptocurrency !! B U R S T C O I N 💰 Cheap Price & Easy to Invest - CHECK IT OUT NOW! !! →→→→→→→→→→→→→→→→→→ 💰 Asset exchange, Automatic transactions, Escrow system & More !!
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 07:03:28 PM
 #12

Alright. I'll keep working on my end and see what I come up with.

The only S7 blade I had access to before yesterday was a roasted 54-chip from a Batch 1 miner, or I'd have been working on this around February.

yslyung
Legendary
*
Offline Offline

Activity: 1484
Merit: 1000


Mine Mine Mine


View Profile
June 09, 2016, 07:41:03 PM
 #13

wow !!! thx for the experiment & find, keeping an eye on this for sure.
philipma1957
Legendary
*
Offline Offline

Activity: 2254
Merit: 1352


Avalon 841 rocks


View Profile
June 09, 2016, 08:13:34 PM
 #14

wow !!! thx for the experiment & find, keeping an eye on this for sure.

a 2 board  7 lite down clocked to 2000gh doing .18 watts a gh would be a 360 watt machine.

it would be a decent item

I mine alt coins with https://simplemining.net...
I see BTC as the super highway and alt coins as taxis and trucks needed to move transactions.
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 08:20:47 PM
 #15

If it'll hit 0.18 - that's a stretch. You'll probably lose 5% in the buck, then add 30W for fans and controller, and 10% to the PSU, gives you 450W wall. Still almost twice the hashrate of an S5 for 3/4 the power draw, and probably a lot quieter given a sealed chassis and push-pull fans.

It looks like I'll be working on code this evening and probably tomorrow, so who knows but I might not actually have it working by burger time.

kipper01
Full Member
***
Offline Offline

Activity: 207
Merit: 100

1KippERXwH1PdBxKNt1ksgqh89WBv6CtWQ


View Profile
June 09, 2016, 10:34:48 PM
 #16

Cant wait to see what you come up with sidehack.

philipma1957
Legendary
*
Offline Offline

Activity: 2254
Merit: 1352


Avalon 841 rocks


View Profile
June 09, 2016, 10:42:08 PM
 #17

If it'll hit 0.18 - that's a stretch. You'll probably lose 5% in the buck, then add 30W for fans and controller, and 10% to the PSU, gives you 450W wall. Still almost twice the hashrate of an S5 for 3/4 the power draw, and probably a lot quieter given a sealed chassis and push-pull fans.

It looks like I'll be working on code this evening and probably tomorrow, so who knows but I might not actually have it working by burger time.

so 450 to 2000gh  is .225 watts` per gh

with a titanium maybe 430 watts  or .215 watts a gh.

good numbers don't know how many I would get , but at least one.

I mine alt coins with https://simplemining.net...
I see BTC as the super highway and alt coins as taxis and trucks needed to move transactions.
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 09, 2016, 11:04:44 PM
 #18

If everything works how I think it should, anyone with a PIC programmer and a screwdriver could rework any S7 to run undervolted. At the same numbers as estimated above, a full 135-chip S7 would run 3TH at under 700W. I don't actually know how good it'll be until I do some more testing, and once I have functional writeable boards I can start measuring actual power draws. I'm really gonna try and get it working tomorrow, pretty excited anyways. I have a working flowchart drawn up for the I2C comms, but I'll need to learn some of the instruction set and the specifics of the chip to be able to get the timings right.

NotFuzzyWarm
Legendary
*
Online Online

Activity: 1596
Merit: 1117


Evil beware: We have waffles!


View Profile
June 10, 2016, 12:41:15 AM
 #19

Me likey. Me likey a LOT!
Considering with the 3 s7's I had planned taking off line at home (being replaced with ma s9 whenever it gets here) and the 2x batch-18 um, spares, I have. This is looking very good: After undervolting the farm to stably run ~ 4THs per miner pulling under 700w (edit, 1,100w) each would let me put most if not all the s'7s I have back online with still less than my current power budget. 'Taint ran the #'s but  methinks more THs ta boot Cheesy

Tossing a coin into the tip jar for this!

For bitcoin to succeed the community must police itself - Joshua Zipkin aka Joshua Alexander leaked AMT A1 miner skype chats
How a miner mfgr SHOULD operate: HaggsFIN trip to Canaan My info useful? Donations welcome! 1Fuzzyk398kDWVjuC5qPX5v6CjSkvbgAbd
-Support Sidehacks miner development. Donations to:   1BURGERAXHH6Yi6LRybRJK7ybEm5m5HwTr
sidehack
Legendary
*
Offline Offline

Activity: 1848
Merit: 1164

Curmudgeonly hardware guy


View Profile
June 10, 2016, 01:19:16 AM
 #20

Actually, 4TH would be more like 1100W.

Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 15 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!