Analog reading pulsating to zero

As you can see in the attached pic, the return value of AnalogRead(0) is pulsating from some value to zero. Sample time is 50ms.

I am using Arduino Due with MegaMoto*) shield. A0 input is supposed to read current sensing from MegaMoto. I tried to measure A0 to GND with multimeter but no pulse is detected. I have an external sensor connected to A1 and was read fine with AnalogRead(1).

What could be the cause?
Thanks!

Aisar

*) MegaMoto Robot Power Products - MegaMoto Motor Control Shield for Arduino

Screen Shot 2014-12-30 at 5.06.28 PM.png

Do you have a very high sampling rate?

Try putting a delay(20); in the loop, to give the ADC a way to "keep up" with the demands of the program.

I don't KNOW that reading as fast as loop() can go is a problem... but think it might be.

tkbyd:
Do you have a very high sampling rate?

Try putting a delay(20); in the loop, to give the ADC a way to "keep up" with the demands of the program.

I don't KNOW that reading as fast as loop() can go is a problem... but think it might be.

I'll try to lower the sampling rate. Now it's right under the loop(). But again, A1 is read with the same way but was fine.

Here's what I found from Arduino reference page:

It takes about 100 microseconds (0.0001 s) to read an analog input, so the maximum reading rate is about 10,000 times a second.

Connect a potentiometer to A0 and check that you can read the input.
Do you use a breadboard with bad connections ? The graph of the measurements is typical for an open input or a missing ground.