## ATmega128RFA1 - Max ADC Voltage Input?

9 posts / 0 new
Author
Message

According to the datasheet and this post, for single ended input, the maximum voltage reference is AVDD which is internally generated to ~1.8V

My problem is that I want to measure the battery voltage, so how do I do this?
I was going to use the battery voltage as reference and an internal value as the input of the ADC, but since now I read that the reference isn't dependent of the battery, I'm not sure what to do.

I'm trying to see if the differential input can be done for this since it has a wider range, is this the way to go?

Total votes: 0

Have you thought of a resistive voltage divider http://en.wikipedia.org/wiki/Voltage_divider : then, battery would be divided in order to be within ranges...

Total votes: 0

A voltage divider is the general solution but has some major problems for battery powered devices. That is because of the current that the divider takes all the time. You can increase the divider resistance and add a fairly large capacitor at the output node of the divider, but you will never get to zero load.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Total votes: 0

tglaria wrote:
I'm trying to see if the differential input can be done for this since it has a wider range, is this the way to go?
Yes.
Use AVDD as VREF, GAIN at 1, to reach the VDDMAX limit of 3.6v from Absolute Maximum Ratings.

"Dare to be naïve." - Buckminster Fuller

Total votes: 0

ka7ehk wrote:
A voltage divider is the general solution but has some major problems for battery powered devices.
In an Atmel application note (I don't recall its identifier) is use of an NFET mid-divider to open that circuit.

"Dare to be naïve." - Buckminster Fuller

Total votes: 0

dbrion0606 wrote:
Have you thought of a resistive voltage divider http://en.wikipedia.org/wiki/Vol... : then, battery would be divided in order to be within ranges...

No, mainly because it's a battery powered device and I need to get as much 'juice' out of it.

ka7ehk wrote:
A voltage divider is the general solution but has some major problems for battery powered devices. That is because of the current that the divider takes all the time. You can increase the divider resistance and add a fairly large capacitor at the output node of the divider, but you will never get to zero load.

Jim

This.

I'm wondering how big the resistors must be to lower the consumption and still get a reading.
Â¿What would the capacitor be for in this case?

Total votes: 0

I think Atmel mentions 0.01uf for regular Mega/Tiny AvRs.

The upper limit will be set by the pin leakage. The spec sheet says that the effective analog input resistance is 100 Meg. So, you ought to be able to go to a divider in which the smaller of the two resistors is up to 1Meg. There might be a small error near mid-scale but it should remain monotonic.

Jim

Until Black Lives Matter, we do not have "All Lives Matter"!

Total votes: 0

ka7ehk wrote:
The spec sheet says that the effective analog input resistance is 100 Meg.
That's a typical characteristic.
A lower limit is likely closer to 10M ohms.

Open circuit the divider :
Atmel AVR1300: Using the Atmel AVR XMEGA ADC, go to page 20.

"Dare to be naïve." - Buckminster Fuller

Total votes: 0

gchapman wrote:
tglaria wrote:
I'm trying to see if the differential input can be done for this since it has a wider range, is this the way to go?
Yes.
Use AVDD as VREF, GAIN at 1, to reach the VDDMAX limit of 3.6v from Absolute Maximum Ratings.

The problem with this approach is that the input would be the battery voltage... which is also the limit, so I'd get MAX_VALUE as a result in any conversion.
and I can't get an internal value as an input in differential mode.