analogRead(groundPin) = 20

Hi there,

I experience something strange with 2 new MKRFOX1200 boards (actually, it could be any other board)

when I ground an Analogic Pin (I tried them all, on both boards), the returned value is about 18~20, then a "normal" value is supposed to be between 0~5. However, the reading seems to be correct for higher values (from 20 to 1023)

=> WTF ? Did somebody ever encounter that ?

  • Is it a normal tolerance that can be found (and that I never seen before) ?
  • Is this the sign that something is wrong ? that something is burned ? In that case, how to troubleshoot that ?

edit : A battery supplying leads to the same result (not a 50Hz artefact, or something like that)

Thx
Méric.

No experience with MKR.

How long is the wire that you use for the grounding?

about 5cm ?

I get values 5-7 from a grounded A0 on my MKR FOX 1200. This is the code I'm running:

int analogPin = A0;    // select the analog input pin

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

void loop() {
  Serial.println(analogRead(analogPin));
  delay(200);
}

Do you get different results with that code?

Hi Pert,

Thanks for your answer.
Yes, the nominal value for a grounded pin is indeed generally between 3 and 7. The method to read a pin is clearly the one you've mentioned.

I read about 18 with that you propose. Enclosed results.

=> Actually, I assume a Hard issue. But I don't know how to reach it out, and how it was happen (2 boards simultaneously !)