Page 1 of 1

ADC reading variation

PostPosted: Mon Jun 20, 2016 9:34 am
by alanmcdonley
I don't have an oscilloscope to know exactly where the noise in my ADC readings is coming from, so I'm feeling very frustrated at the moment.

I was hoping to have ADC readings that would be steady or flip-flop between two bits, but no luck.

Readings from my IR Distance sensor, current sensor, and even the unregulated 7.2v readings are all over the place.

I don't know what to make of it without a scope.

These are charts of the readings and the resulting voltage of the "steady" unregulated 7.2v

VTestReadingDistribution.JPG
VTestReadingDistribution.JPG (43.68 KiB) Viewed 7175 times


VTestReadings.JPG
VTestReadings.JPG (35.62 KiB) Viewed 7175 times

Re: ADC reading variation

PostPosted: Mon Jun 20, 2016 10:36 am
by mikronauts
I think the peaks are due to varying power usage.

Suggestion:

Disconnect ALL motors, servos, ultrasonics, wifi - ie unplug everything except an Ethernet cable, and PiDroidAlpha.

Power Pi with a 2A 5V adapter.

Boot your Pi

connect:

AIN0: Pi's 3v3
AIN1: Unloaded 7.4V batter divided by two (ie 0-3.7V range)
AIN2: a 3.3v regulator powered by battery above, driving just a single LED through a 470R resistor (~5mA load)

Log above three every 1sec. Run nothing else on the Pi.

You will still see some variation, but by removing all other power draws is should (famous last words) be less.