Arduino Forum

Products => MKR Boards => MKRFOX1200 => Topic started by: Meric on Jun 04, 2019, 10:50 am

Title: analogRead(groundPin) = 20
Post by: Meric on Jun 04, 2019, 10:50 am
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.
Title: Re: analogRead(groundPin) = 20
Post by: sterretje on Jun 04, 2019, 12:09 pm
No experience with MKR.

How long is the wire that you use for the grounding?
Title: Re: analogRead(groundPin) = 20
Post by: Meric on Jun 04, 2019, 12:13 pm
about 5cm ?
Title: Re: analogRead(groundPin) = 20
Post by: pert on Jun 05, 2019, 01:49 pm
I get values 5-7 from a grounded A0 on my MKR FOX 1200. This is the code I'm running:
Code: [Select]

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?
Title: Re: analogRead(groundPin) = 20
Post by: Meric on Jun 13, 2019, 09:29 am
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 !)