Ryzen 1700 e GTX 1060 - Nicehash / Minergate - PC Consumption with Arduino and ACS712-30A

3 Просмотры
Издатель
Minergate se sai melhor com a VGA, Nicehash com a CPU

Ryzen 1700 @ 3.6GHz 1.1875v, GTX 1060 com 74% Power limit (MSI Afterburner)

Consumo total em 160W medido com sensor de corrente ACS712-30A e Arduino Mega, já considerando a eficiência da fonte.


Código Arduino

const int currentPin = 2; //porta analog
const unsigned long sampleTime = 100000UL;// sample over 100ms, it is an exact number of cycles for both 50Hz and 60Hz mains
const unsigned long numSamples = 250UL;// choose the number of samples to divide sampleTime exactly, but low enough for the ADC to keep up
const unsigned long sampleInterval = sampleTime/numSamples; // the sampling interval, must be longer than then ADC conversion time
const int adc_zero = 510;// relative digital zero of the arduino input from ACS712 (could make this a variable and auto-adjust it)

void setup()
{
Serial.begin(9600);
}

void loop()
{
unsigned long currentAcc = 0;
unsigned int count = 0;
unsigned long prevMicros = micros() - sampleInterval ;
while (count < numSamples)
{
if (micros() - prevMicros >= sampleInterval)
{
int adc_raw = analogRead(currentPin) - adc_zero;
currentAcc += (unsigned long)(adc_raw * adc_raw);
++count;
prevMicros += sampleInterval;
}
}

float rms = sqrt((float)currentAcc/(float)numSamples) * (75.7575 / 1024.0); //5000 / 66 = 75.7575

Serial.print((rms * 216), 0);
Serial.print(" Watts (PC) / ");

//216V na rede, convertendo em kWh/mês, 30d, 24h

Serial.print((((rms * 216) * 30 * 24 )/1000) ,0);
Serial.print(" kWh/mes / ");
Serial.print(((((rms * 216) * 30 * 24 )/1000)*0.7)/30 ,0);
Serial.print(" R$/day CPFL(SP) = 0,7 do consumo para residência acima de 200kWh");
Serial.println();
}


Se quiser deixar um tostão, aqui minha carteira Bytecoin:

27dYdUa6booES3bZMpGWx2ENNpLakjVEEeg56jLedvEWAtLQJtgP4D2JS5nXEUN6Hr68G323TSPwXHfq1pZAnaoaUWBACg1
Комментариев нет.