Go Down

Topic: FIO Voltage anomalies between 2 units.. (Read 354 times) previous topic - next topic


I have 2 FIO's running the same code pulled from here..


Code: [Select]
// See: http://code.google.com/p/tinkerit/wiki/SecretVoltmeter
float readVcc() {
  signed long resultVcc;
  float resultVccFloat;
  // Read 1.1V reference against AVcc
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(10);                           // Wait for Vref to settle
  ADCSRA |= _BV(ADSC);                 // Convert
  while (bit_is_set(ADCSRA,ADSC));
  resultVcc = ADCL;
  resultVcc |= ADCH<<8;
  resultVcc = 1126400L / resultVcc;    // Back-calculate AVcc in mV
  resultVccFloat = (float) resultVcc / 1000.0; // Convert to Float
  return resultVccFloat;

I am getting way different Voltage readings.. one FIO is around 3.3v the other is around 3.18v, I have swapped batteries pack between the two units.. on is constantly lower than the other..

measuring the voltage at the 3.3 and ground pins gives me 3.29 + or - .01 on both units..

any ideas?


Not surprising, the 1.1V reference has a very wide variation between devices IIRC.  You have to calibrate each FIO's voltage reference to get decent accuracy.  One idea is to put the relevant calibration constant into EEPROM so the code can be common to both.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131