I'm experiencing a large amount of noise on every analog channel that I've looked at (on both of my boards), well in excess of the noise that I see on the Arduino Zero, or even a $6 Uno clone with a CH-340G on it.
The noise is so bad that a pot dialed all of the way down to one end almost never returns 0 from analogRead(). I've never seen this on ~1000 SainSmart Unos that I've tested (that weren't DOA), genuine or clone Leonardos or Megas, genuine Dues, or my one Arduino Zero. Perhaps it's the case that the low-end of the ADC range is somewhat offset from zero for the SAMD21, but I don't see this same behavior on my Arduino Zero. None of the analog inputs are floating, they're all tied to something (LM34, pot, phototransistor, etc). I've used the same shield, same USB port on the same machine, and the same USB cable between the Zero and the MM0Es. The pot is a 50K linear pot connected between IOREF and GND on the shield, but I'm also seeing similar amounts of noise around the output of an LM34. So it's not like I'm starving the ADC for input current from whimpy sensors.
On all other than MM0E boards, I'll see only 1 ADC count diversions from an average value, but on the MM0E I can see numerous excursions as much as 10 ADC counts from average. Below/attached are three screenshots of the Serial Plotter on each of the CHeapo340G Uno, Arduino Zero and one of my two MM0Es.
The unimpressive code to reproduce these plots is also included.
I was really, really hoping to shift students over to the MM0E from Uno clones next semester so that we could move them to CircuitPython/MicroPython from C, but this is probably a showstopper.
Are/can others see the same behavior on their MM0E? Any stationary pot or voltage divider should be able to reproduce the problem. I haven't dug my o-scope out yet to see if the noise shows up on the power supply rail or the digital inputs also, but hope to do that soon.
Code: Select all
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print (analogRead(A0));
Serial.print (',');
Serial.println(analogRead(A1));
delay(20);
}
-eric