Pages:
Author

Topic: Hacking the S7 - improving efficiency through minor hardware manipulation - page 5. (Read 26495 times)

newbie
Activity: 32
Merit: 0
also does anyone know what makes the individual hashing boards start back up again? I have tried some of the lower value PIC settings at 400 mhz on a single board and when it drops it will not try to come back up and start hashing again. The same board at more modest 630mV/550 settings will come back up and start hashing again after 5-8 minutes if it drops out.
newbie
Activity: 32
Merit: 0
i tried out a lower RPM fan with manual knob and tach line. I only had one to test so I kept one original s7 fan at the rear. Manual knob fan worked fine, but I noticed that rather than start at low/quiet RPM for original s7 fan (as it typically does for about 45 seconds before linux/cgiminer initializes), the stock s7 fan starts at max RPM immediately after power up. I'm guessing that machine recognizes one fan is not stock and so it defaults to max spin on the fan that is stock.
newbie
Activity: 32
Merit: 0
I'm working on a little microcontroller PWM driver today which will come in handy for three different projects. Maybe if I have some free time next week I'll see about coding a duty cycle detection onto it and make a max-fan-speed inline module.

If you wanted to circumvent the auto fan entirely, you could probably use a standard fan speed controller and just make sure the tach line is plugged in so your miner controller still sees the fan as spinning.

Ok sweet. I do not know how to design/code PWM drivers but maybe I'll try a standard fan speed controller mod in the meantime.

I see there are some sellers of replacement fans that claim "contrary to the original S7 fans these will not MAX-POWER at start-up. Instead, they will remain at low RPM until the S7 initialized. This helps the power supply power and overall performance. " I wonder what they are doing to achieve this?
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
I'm working on a little microcontroller PWM driver today which will come in handy for three different projects. Maybe if I have some free time next week I'll see about coding a duty cycle detection onto it and make a max-fan-speed inline module.

If you wanted to circumvent the auto fan entirely, you could probably use a standard fan speed controller and just make sure the tach line is plugged in so your miner controller still sees the fan as spinning.
newbie
Activity: 32
Merit: 0
Probably the only way around it is to intercept the PWM signal to the fan and route it thought a circuit to impose a maximum duty cycle. If you use the rising edge to trigger a pre-timed one-shot and AND that with the original pulsetrain, the lower duty cycle will win out and it's all done in hardware but that won't fix 100% duty cycle. Using a microcontroller to sample duty cycle and output a pulsetrain of the lesser of preset max duty cycle and controller-mandated duty cycle would give you a maximum.

Hm, I wonder if that would be worth making anyway.

wow it sounds like you know what you are doing. I've been testing these at home and can't do any restarts too early in AM or late in PM due to the startup noise. the only thing I was thinking was to put a splitter on each fan and manually switch it over to a dummy fan during startup cycle. Not sure if any other low cost fans even work on this. Also not sure the other fan would make less noise but maybe if it was smaller or maybe could put a pencil through and not allow it to spin at all. Then switch back at about 110 seconds.
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Probably the only way around it is to intercept the PWM signal to the fan and route it thought a circuit to impose a maximum duty cycle. If you use the rising edge to trigger a pre-timed one-shot and AND that with the original pulsetrain, the lower duty cycle will win out and it's all done in hardware but that won't fix 100% duty cycle. Using a microcontroller to sample duty cycle and output a pulsetrain of the lesser of preset max duty cycle and controller-mandated duty cycle would give you a maximum.

Hm, I wonder if that would be worth making anyway.
hero member
Activity: 2534
Merit: 623
That's exactly the routine my S7LN does when I reboot it. After I hit the reboot button it:-

stops hashing - fans go full speed for 30-45 seconds - goes down to manual speed setting for 10-15 seconds - then full speed for another 10-20secs - then resumes normal hashing and fan speed settings (20% fan speed).

That's the normal sequence as far as I know as the reboot button on the GUI says (this may take 90seconds).
newbie
Activity: 32
Merit: 0

i dont understand what you are saying..


the fans only go to 100% when the miner itself is first powered on.. then it reboots and the fans are set to the speed you specify.

my script doesnt reboot the whole miner, just cgminer.

the only time my script sets the fans to 100% is if the boards go over 70c.

unless it needs 100% to keep them between 60-65 avg temp.

my s7s are usually around 40-45% fan.

OK sorry I know what I said was confusing. I'm testing these at home and want to try your script and am just trying to figure out if it will help with the startup noise referred to below. I've been restarting the s7 at the wall a lot. This is approx what I'm hearing with fans.
At Boot: first 60 seconds quiet barely any fan.
seconds 60-85: loud 100% fan
seconds 85-100: fan slows to my manual setting of 30%
seconds 100-105: fan kicks back up to 100%
seconds 105+: fan goes back down to manual setting 30%

Thx for reply above, I'm going to give your script a shot and see what changes.
legendary
Activity: 1736
Merit: 1006
tell me if you guys have any issues.. or think of ways to make it better.

With stock settings and also sidehack mod, I think every time cgminer restarts and loads/connects the fans shoot 100% for 30 seconds or so as they settle into their manual settings (my ambient air is cool so I set to 60%). I assume there is no way to control this as the script can't run until after cgminer loads? Or is it only with power cycles that the fans will blast after the script is running? Basically it would be nice to avoid the unnecessary startup fan blasts.

i dont understand what you are saying..


the fans only go to 100% when the miner itself is first powered on.. then it reboots and the fans are set to the speed you specify.

my script doesnt reboot the whole miner, just cgminer.

the only time my script sets the fans to 100% is if the boards go over 70c.

unless it needs 100% to keep them between 60-65 avg temp.

my s7s are usually around 40-45% fan.
newbie
Activity: 32
Merit: 0
tell me if you guys have any issues.. or think of ways to make it better.

With stock settings and also sidehack mod, I think every time cgminer restarts and loads/connects the fans shoot 100% for 30 seconds or so as they settle into their manual settings (my ambient air is cool so I set to 60%). I assume there is no way to control this as the script can't run until after cgminer loads? Or is it only with power cycles that the fans will blast after the script is running? Basically it would be nice to avoid the unnecessary startup fan blasts.
legendary
Activity: 1736
Merit: 1006
So ive had my s7s for quite awhile now.. hacking them i ran into a some issues..

So this script must manually be re-run every 6 hours or as long as there is no power failure its ok? Also check box for manual fan speed but also leave at 100% ?

no the script runs every one minute after you run it once.. in a repeating loop
and yes you check the box for manual fan speed, you can set the speed at 100 or anything really.

you only have to restart it if you power off the s7.

this should also work with the s7ln but you need to change the min hash rate to 180000 instead of 280000
newbie
Activity: 32
Merit: 0
So ive had my s7s for quite awhile now.. hacking them i ran into a some issues..

So this script must manually be re-run every 6 hours or as long as there is no power failure its ok? Also check box for manual fan speed but also leave at 100% ?
legendary
Activity: 3822
Merit: 2703
Evil beware: We have waffles!
s7 running at 620/650 525Mhz. Pulls 860W at wall and 3.5Th/s. So I'm at .246w/Ghs. Only problem is all 3 boards drop somewhere between 1 hour and 1.5 hours. Temperatures were between 60/60/63 and 64/64/66. Obviously I have stability issues but I suppose it is not temperature related? Should I step up 10mv or to 537Mhz?
Yeah I'd try 630/650. That is where most of mine run. Out of 16 s7's I still have on-line one or 2 boards had to go even higher to be stable.

I can also verify the effects of temp. Of those 16 s7 miners ever hour or so 4 would periodically drop 1 card for ~5min before it came back up on its own. Their temps were in the low to mid 50's. Dropped fan speeds to get them up to 60-70C and after 6 hours so far no more dropouts Smiley
newbie
Activity: 32
Merit: 0
s7 running at 620/650 525Mhz. Pulls 860W at wall and 3.5Th/s. So I'm at .246w/Ghs. Only problem is all 3 boards drop somewhere between 1 hour and 1.5 hours. Temperatures were between 60/60/63 and 64/64/66. Obviously I have stability issues but I suppose it is not temperature related? Should I step up 10mv or to 537Mhz?
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
That looks handy as heck. The worst problem with low-voltage stability on these is cold boards. They really do like that 60C and up, so being able to thermostatically keep them in that range is nice.
legendary
Activity: 1736
Merit: 1006
So ive had my s7s for quite awhile now.. hacking them i ran into a some issues..

so far i have my boards at 660mv and im running the s7s at 525m
this puts me at 3500ghs right at 900 watts.. for .257j/ghs

one of the issues i have is at random times one of the boards drop out.. it goes to 30c and the hash rate drops down to 0 on that board.. a simple restart of cgminer fixes this.

this seems to happen worse if the board is cold.. i get about the best performance from the boards if they are kept above 60c.

this is where the other issue i am having starts.. the auto fan sucks.. its set to like 80-100 pwm and not much lower..

on my s7s i used the fans from my s5s that i have laying around as the intake fan and a delta afb1212she as exhaust.
https://www.amazon.com/Delta-Electronics-AFB1212SHE-120x120x38mm-connector/dp/B004Y1HLA8

this keeps the s7 nice and cool.. but since we are getting into winter, the problem i had was during the day i have to set to 60% fan and at night  i have to set to 40% fan.

so i made a script.. if anyone wants it here it is..
what this script does is 3 things..
one it reboots the cgminer every 6 hours.. i mine on zpool and for some reason if you went longer then that your speed would start to drop down and it affected payouts.
two it checks the hash rate, and reboots cgminer if it drops below a set amount.
three, it checks the temps, and sets the fan to stay within the set temp range..
it also has a 70c cutoff, that sets the fans to 100% if any board hits 70c.

all these values can be adjusted.. you may have to tweak the temp one to keep the fan from being slowed down and sped up over and over..
installing this script is easy.. just save this text as hashcheck.sh and upload it to the /config folder in the s7 with winscp. then make it executable by clicking properties and checking the X box.
you then ssh into the s7 and run the script /config/hashchecksh.sh &
dont forget the & this allows you to close putty and have the script stay running..
this will also make a hashcheck.txt file in the config you can read to see whats going on.

in order for this to work, before running it, you have to have the box checked for manual fan speed.. then save and restart and run this script.
also every time you turn off and on the s7 it will need to be ran again.


tell me if you guys have any issues.. or think of ways to make it better.

Code:
#!/bin/sh
restart=21600 # 6 hours in seconds
echo $(date) "| hashcheck monitor started. reboot every $restart seconds or if lower then $minhash "  > /config/hashcheck.txt
echo $(date) "| tempcheck monitor started."  >> /config/hashcheck.txt
restartcount=0

######adjust here
minhash=280000 #min hash rate 2800.00 ghs without the decimal.
minfan=30 #min fan speed
maxfan=100 #max fan speed
mintemp=59 #min avg temp
maxtemp=64 #max avg temp
pwm=80 #starting pwm speed
#######

/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
sed -i "/bitmain-fan-pwm/c\"bitmain-fan-pwm\" : \"$pwm\"," /config/cgminer.conf  && \
/etc/init.d/cgminer.sh start > /dev/null
sleep 60

while true
do


T=$(cgminer-api stats | grep 'temp_avg] =>' | cut -c 18-)
T1=$(cgminer-api stats | grep 'temp1] =>' | cut -c 15-)
T2=$(cgminer-api stats | grep 'temp2] =>' | cut -c 15-)
T3=$(cgminer-api stats | grep 'temp3] =>' | cut -c 15-)
E=$(cgminer-api summary | grep 'Elapsed]' | cut -c 17-)
S=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16- | tr -d '.')
HASH=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)

if [ $T1 -gt "70" ] || [ $T2 -gt "70" ] || [ $T3 -gt "70" ] && [ $pwm -lt "100" ]; then
pwm=100
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| failed too hot: setting fan to 100 % $restarthash GH/s $T1 $T2 $T3 DEG $T AVG"  >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
sed -i "/bitmain-fan-pwm/c\"bitmain-fan-pwm\" : \"$pwm\"," /config/cgminer.conf  && \
/etc/init.d/cgminer.sh start > /dev/null
echo $(date) "| miner restarted $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
sleep 60
continue
fi

if [ $E -gt $restart ]; then
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| miner scheduled restart $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
/etc/init.d/cgminer.sh start > /dev/null
sleep 60
continue
fi

if [ $S -lt $minhash ] && [ $E -gt "120" ]; then
echo $(date) "| rechecking in 120s low hash : $HASH $T1 $T2 $T3 DEG" >> /config/hashcheck.txt
sleep 120
S=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16- | tr -d '.')
E=$(cgminer-api summary | grep 'Elapsed]' | cut -c 17-)
T=$(cgminer-api stats | grep 'temp_avg] =>' | cut -c 18-)
T1=$(cgminer-api stats | grep 'temp1] =>' | cut -c 15-)
T2=$(cgminer-api stats | grep 'temp2] =>' | cut -c 15-)
T3=$(cgminer-api stats | grep 'temp3] =>' | cut -c 15-)
HASH=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
if [ $S -lt $minhash ]; then
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| failed low hash : $restarthash GH/s $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
/etc/init.d/cgminer.sh start > /dev/null
echo $(date) "| miner restarted $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
sleep 60
continue
else
echo $(date) "| recovered: $HASH MH/s $E seconds $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
fi
fi

if [ $T -lt $mintemp ] && [ $pwm -gt $minfan ] && [ $E -gt "120" ]; then
echo $(date) "| rechecking in 120s low temp : $HASH GH/s $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
sleep 120
S=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16- | tr -d '.')
E=$(cgminer-api summary | grep 'Elapsed]' | cut -c 17-)
T=$(cgminer-api stats | grep 'temp_avg] =>' | cut -c 18-)
T1=$(cgminer-api stats | grep 'temp1] =>' | cut -c 15-)
T2=$(cgminer-api stats | grep 'temp2] =>' | cut -c 15-)
T3=$(cgminer-api stats | grep 'temp3] =>' | cut -c 15-)
HASH=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
if [ $S -lt $minhash ]; then
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| failed low hash : $restarthash GH/s $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
/etc/init.d/cgminer.sh start > /dev/null
echo $(date) "| miner restarted $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
sleep 60
continue
else
if [ $T -lt $mintemp ] && [ $pwm -gt $minfan ]; then
pwm=$((pwm-5))
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| failed too cold: setting fan to $pwm % $restarthash GH/s $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
sed -i "/bitmain-fan-pwm/c\"bitmain-fan-pwm\" : \"$pwm\"," /config/cgminer.conf  && \
/etc/init.d/cgminer.sh start > /dev/null
echo $(date) "| miner restarted $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
sleep 60
continue
else
echo $(date) "| recovered: $HASH GH/s $E seconds $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
fi
fi
fi

if [ $T -gt $maxtemp ] && [ $pwm -lt $maxfan ] && [ $E -gt "120" ]; then
pwm=$((pwm+5))
restartcount=$((restartcount+1))
restarthash=$(cgminer-api | grep 'GHS 5s] => ' | cut -c 16-)
restarttime=$(date)
elapsedtime=$E
echo $(date) "| failed too hot: setting fan to $pwm % $restarthash GH/s $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
/etc/init.d/cgminer.sh stop > /dev/null
sleep 5
sed -i "/bitmain-fan-pwm/c\"bitmain-fan-pwm\" : \"$pwm\"," /config/cgminer.conf  && \
/etc/init.d/cgminer.sh start > /dev/null
echo $(date) "| miner restarted $restartcount times: $restarthash GH/s $T1 $T2 $T3 DEG $T AVG , at $restarttime for $elapsedtime seconds" >> /config/hashcheck.txt
sleep 60
continue
else
echo $(date) "| normal operation: fan at $pwm % $HASH GH/s $E seconds $T1 $T2 $T3 DEG $T AVG" >> /config/hashcheck.txt
fi



sleep 60
done



hero member
Activity: 588
Merit: 500

i think you can flash the 1-fan rom on it and just use one stock fan.. not sure tho.. i didnt try. i might try it on my other s7 when i get the pickit3 i ordered from china.


I have tried the 1 Fan Rom and it runs fine with a single fan.

Rich


How to flash the 1 Fan Rom? Aren't all of the .hex files from sidehack are for the 2 fan version? Is there a second firmware besides firmware on individual boards that can be flashed.. maybe on the central board? So we are playing with sub-firmware for the blades or something with this hack?

You are correct the 1 Fan Rom Flash is Bitmain firmware for the main BBB controller. The sidehack .hex files are for the PIC controller on the individual hash boards.

Rich
newbie
Activity: 32
Merit: 0

i think you can flash the 1-fan rom on it and just use one stock fan.. not sure tho.. i didnt try. i might try it on my other s7 when i get the pickit3 i ordered from china.


I have tried the 1 Fan Rom and it runs fine with a single fan.

Rich


How to flash the 1 Fan Rom? Aren't all of the .hex files from sidehack are for the 2 fan version? Is there a second firmware besides firmware on individual boards that can be flashed.. maybe on the central board? So we are playing with sub-firmware for the blades or something with this hack?
legendary
Activity: 3374
Merit: 1859
Curmudgeonly hardware guy
Yeah, a lot of the stock S7s I saw were pulling 1400W for 4.73TH off 208V which puts 'em right around 0.3J/GH - the early 54-chip boards didn't have regulators and ran at a lower per-chip core voltage so they actually did hit about 0.25 (and I've seen some below 0.22J/GH with an undervolted PSU and 550MHz) but Bitmain didn't update the advertised efficiency specs when they redesigned it to be worse. 0.25J/GH out of a 135-chip S7 is decent.
legendary
Activity: 1736
Merit: 1006
I used one these hex files with PICkit3 for undervolting and underclocking a S7, batch 9  and everything went smooth.
I sold that miner but I'm going to do the same thing again soon to a S7 when the S9 arrives and I rearrange my miners and PSUs.
Here is my setup:
Quote
Antminer S7, 640/670mV,  4.223Th/s (60 min avg), 625 Mhz

Power supply: Enermax Revolution 87+ 1000W
Voltage: 227 VAC
Current: 4,7 A

Power (at wall): 1066,9 W

So that is 1067W/4223GH. Or 0.252w/GH. You obviously lowered the watt draw, but I'm confused as to whether you are running more efficient as s7 is rated at .25J/GH, right?

the s7 is rated at .25j/gh but it realistically is around .31-.33j/gh
even worse if you are on 110v
Pages:
Jump to: