Go Down

Topic: analogRead(groundPin) = 20 (Read 5450 times) previous topic - next topic


Jun 04, 2019, 10:50 am Last Edit: Jun 13, 2019, 10:02 am by Meric
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)



No experience with MKR.

How long is the wire that you use for the grounding?
If you understand an example, use it.
If you don't understand an example, don't use it.

Electronics engineer by trade, software engineer by profession. Trying to get back into electronics after 15 years absence.



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() {

void loop() {

Do you get different results with that code?


Jun 13, 2019, 09:29 am Last Edit: Jun 13, 2019, 09:41 am by Meric
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 !)

Go Up