I’ve been meaning to ping you for sometime about this topic.
Over the last few weeks I’ve been looking at the module circuits and the code - but for now lets focus on 4.4 as that is what i have.
I’m on the road without tools and my notes so sorry this will be terse - sorry and without testing which is what i wanted to do first - but with this topic hot i thought it was best to ask if i have the bull by the horns…
But to me (with my very little experience) I find it surprising that you can get an accurate cell voltage reading when the voltage you are reading is not from the cell rather it is the output of a pin of at the attiny841.
While the pin will reflect the raw voltage it is much more likely to be affected by incoming serial data and other electrical noise.
That is the voltage that you are reading as the cell voltage is what comes out of the PA7 pin, then voltage divided by R3/R4 then read on PA3.
And reviewing the code confirms you are using the PA3 pin as your raw voltage reading.
Looking at the purpose of PA7 (enable) it appears you are trying to reduce the standby current of the modules by turning on and off the reference voltage D1 but you are also turning on and off the quasi raw Vcc cell voltage.
Could it be you meant the top of R3 to actually be connected to Vcc where it gets a real raw reading and not switched by PA7 (enable) ?
If this is the case then it is a simple mod on existing bard to cut the trace and bridge R3 to Vcc.
Furthermore if we look at the atmel datasheet the output of pin isn’t true Vcc but typically slightly under.