Mega88: poor stability when reading the internal bandgap

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a 3 volt direct from battery power system using Vcc
as Aref to perform ratiometric measurements from 2 adc channels.
A third channel is used to read the internal 1.1 volt bandgap
(mux select "e") to determine battery voltage. Each of the 3
inputs is read sequentially, their readings placed in an array.
The two "external" channel readings are rock steady, but the
bandgap channel reading bounces around sometimes more than
+-5%. I improved the situation by taking two bandgap readings
in a row and using only the second one, thinking if the bandgap
was a "weak" source, giving the sample cap more time to stabilize
might help. This helped a lot, but does not completely eliminate
the problem. As a test, reading *only* the bandgap (not
doing any mux changing) results in a solid reading. The data
sheet mentions nothing special about selecting and reading
the bandgap. Anyone else notice this problem?
FWIW, I'm using a 2 mhz cpu clock, and a 125 khz adc clock.

Thanks,
Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi.

Have you connect a external capacitor on the aref pin and set REFS1 and REFS0 bit an ADMUX?

I have had the same problem with a atmega8.

By initiating a new ADC-read, the aref pin (bufferd with a 100nF capacitor) goes low 6-10%.

After placing a 470nF capacitor, it goes 1% down.

Please messure the Aref pin...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

REFS1 and REFS0 are set up for Vcc ref and external cap. Changing the
cap to a much larger one did not seem to change the results, so I had
not yet even looked at Vref with a scope. The behaviour is as if there is
a large resistance between the bandgap ref and it's corresponding mux
input, and that mux input is picking up noise. The two "external"
signals are very low impedance from being buffered by an op amp, and
this may be why these signals look better. The fluctuations in the
bandgap readings also seem to have a periodic "rythym" as if they
may be corresponding to "beats" between several asynchronous, but
constant interrupt and pwm processes. Next I will try shutting down
some of these and see what happens.

Thanks for your help,
Tom Pappano
Tulsa, Oklahoma

Tom Pappano
Tulsa, Oklahoma