analog battery always shows 0 "analogRead(ADC_PIN) "
has anyone succeeded in reading the battery volts on a “Vision Master E290 2.90 E-ink”
// Beffring
analog battery always shows 0 "analogRead(ADC_PIN) "
has anyone succeeded in reading the battery volts on a “Vision Master E290 2.90 E-ink”
// Beffring
Did you get any replies to your question?
I’ve tried repeatedly to read the vbat value with the ADC pin, but can’t make it work correctly. One thing to make sure is to set the ADC_Ctrl to 1 (GPIO 46), only then will power circuit send vbat to the ADC.
My issues are that the voltage reported doesn’t reflect the battery well, and the measurement seems to be board specific (if I move a battery from one board to another the measurement doesn’t move accordingly) or zero when the battery is disconnected.
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(46, INPUT_PULLDOWN);
pinMode(7, INPUT);
delay(2000);
}
void loop() {
// put your main code here, to run repeatedly:
uint32_t battMv = analogReadMilliVolts(7) * 4.9f;
Serial.println(battMv);
delay(1000);
}
This sketch worked fine, just fine for me.