How to measure VCC reference voltage

Hello all,

I am building a 5 volt battery pack which uses a
buck converter from 8.4v (two lithum-ion batteries in series)
volts to 5 volts.

I am using ATTiny85 ADC to read the battery voltage (one cell to
ground) to let me know when I need to recharge the pack.

I am using the 5 volt output from the buck converter to power the ATTiny.

Is there a way to measure VCC via the ADC ?

There is the adc channel choice to measure Vbg which is some internal
measurement but I do not know what Vbg represents. Maybe I can
use that.

I want to measure VCC so if it changes I can
make an adjustment to the battery measurement.

...There is a way to measure the internal-optional 1.1V reference using Vcc as the actual reference. If Vcc is not 5V, you'll get an error (a difference) and from that error/difference you can calculate the actual Vcc.

Of course, this won't tell you anything useful until the battery falls to nearly 5V and the voltage regulator drops-out of regulation.

The buck converter delivers 5 volt as long as the voltage of the battories are higher than the buck converter minimum input level. I would measure the battory pack, 8.4 volt, using a voltage divider. Using a DVM You can calibrate the readings if You want. The important reading is the point where the buck converter will cut off.

The tiny85 also has a 2.56V internal reference.

I would think that you should be more interested in the battery voltage than Vcc to tell when charging is necessary.

groundFungus:
The tiny85 also has a 2.56V internal reference.

I would think that you should be more interested in the battery voltage than Vcc to tell when charging is necessary.

I want to use VCC as a reference so I don't have to use resistors.

DVDdoug:

Thanks for that link. That will work for me.

The buck converter delivers 5 volt as long as the voltage of the battories are higher than the buck converter minimum input level. I would measure the battory pack, 8.4 volt, using a voltage divider. Using a DVM You can calibrate the readings if You want. The important reading is the point where the buck converter will cut off.

Good advice. I will do this if VCC doesnt work as a dependable reference.

Measuring the battory gives You the possibilty to take action before Vcc starts dropping, refs start to go bad etc.

Jst run some tests to determine the point of danger. The margins are Your choice.