-
Notifications
You must be signed in to change notification settings - Fork 12
Compensating Measurement Errors
jbaumann edited this page Aug 12, 2019
·
12 revisions
A single ADC measurement (either voltage or temperature) can be imprecise. There are differences in consecutive measurements coming from the inherent imprecision in the measurement process.
Much stronger though is the influence of the current draw on the battery's voltage level, especially if the battery is nearly discharged.
To compensate both effects multiple measurements are taken, the lowest and the highest measurement are discarded and the mean of the remaining values is used.
Currently 5 measurements are used for this approach.
Since doing all these measurements generates a lot of heat that influences temperature measurements they are taken first, when the die is still comparatively cool due to the last deep sleep phase.