Hi!
Just a short question an an idea:
For measuring the supply voltage of a microcontroller (atMega238 in this case) i would usually use a divider and the internal 1.1V reference. But at this point im working on a device with extremely low standby power consumption (nA range) so just having two resistors, even very high value ones like 22M in tests is no option. One idea i had that would also get rid of one of the external Resistors is to just connect one 100k Resistor from an adc pin to ground. Set just as an input this will consume no current, enabling the pull-up resistor will complete the divider, i can take a quick measurement and then turn it off again. This basically works with no problem except that i have no idea what to expect accuracy/ stability wise.
The datasheet only states a range of 20-50kOhm for the pull ups, this can be countered by a quick calibration but if it will change greatly over time or temperature it will render this useless.
Does anyone know more? Is there better ways to measure sytem Voltage? I dont need insane accuracy, just have to turn the power back on before the controller shuts down for having no power.
cheers