EmonTH battery measurement accuracy.
Before I’ve started investigation. I’ve setup EmoTH with
fully charged pack of batteries. After about two weeks
it was clear to see a discharging trend. But it’s very
difficult to see this trend during day. So I made small
experiment. I multiplied battery value not for 10 but for
1000. And result you can see here.
Approval math.
Atmega 328 have 10bit analog read with 3.3V reference voltage
This is about 0,00322265625 per tick. It should be enough to
have more or less accurate x.yz values instead of only x.y
In the same time we use int to send battery data so its should
be enough to send values multiply by 1000.
I think multiplication by 1000 is the last reasonable value
by two reasons.
- If we extend even more we can have some complex logic with
integer during data transmitting. To ensure that we will not extend the range. - As you can see on pictures measurement have some fluctuation. I assume that’s
because of working DC-DC voltage regulator and battery inertia.
Thoughts? Is it worth of Github PR?