Electronics > Projects, Designs, and Technical Stuff
Pull-Up resistor stability
(1/2) > >>
Amper:
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
FenTiger:
Do you have a spare digital output? You could use it in the same way. Stick with two resistors, but connect one of them to the output, and drive it high impedance for the low current state.
Amper:
Yes,i could, but i would like to do it th other way if possible. Less board space and one more pin to use.
Chalcogenide:
I have used this idea in one of my projects https://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/
Essentially, you switch the ADC reference input to the power supply, then choose the ADC MUX input corresponding to the internal 1.1 V reference. You are thus measuring the reference against the power supply, instead of the opposite way around. Neat and it works, with no DC current and no extra pins or parts needed.
james_s:
That's exactly what I was going to suggest, I've used that in a number of projects and it works pretty well. Obviously it will only work if the AVR is powered directly from the battery though, if you have a regulator then you will be measuring the output of the regulator, which is still probably fine for indicating that the battery is low but it won't get you the true battery voltage.
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod