Page 1 of 1

VCC is off a ways. How to compensate?

Posted: 21 Mar 2018, 05:09
by budman1758
I am using the latest mega version (almost every night upgrade :D ) I am displaying the %vcc% variable in an OLED display. I would like to know what the least complicated way is to compensate and display the actual correct voltage is. According to the ESP module the voltage is 3.16 volts. According to my 300 dollar Fluke its actually 3.29 volts. Is it possible to adjust this without using a task for it? If not then use a dummy device? Or is that far enough off to make a Git issue?

Re: VCC is off a ways. How to compensate?

Posted: 22 Mar 2018, 01:20
by TD-er
Often they use some resistor network, so the offset should be computable :)
The offset is in the order of 4%, which is within the error margin of most (cheap) resistors.
The perfect compensation is probably not a constant factor, but rather some kind of curve, but for getting a very close estimate you could multiply its value by (3.29/3.16 = ) 1.04

Re: VCC is off a ways. How to compensate?

Posted: 22 Mar 2018, 01:35
by budman1758
The question is more of where to do that though. Do I have to use a task and if so what kind?
As it is now I just put %vcc% in the line of the OLED. I tried to put a formula there but that doesn't work. :?: :?: