ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
robatbentley
Normal user
Posts: 69
Joined: 18 Mar 2017, 22:13
Location: Newcastle/UK

ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#1 Post by robatbentley » 21 May 2018, 19:11

Tried to put as much in the title to get some interest in the problem I'm having.

I'm attempting to measure and monitor the battery voltage of my remote BME280 temperature sensor which runs off a parallel set of 4 x 18650 batteries. ...and instead of finding the settings not being updated on Domoticz, I'd like to be able to monitor the battery voltage so that I get an idea as to how close to requiring a battery recharge my remote sensor is getting. I followed the recommendations in this post (viewtopic.php?t=1621) but it's a bit old (about a year) now and I'm unable to attempt to follow the code update instructions as I have a feeling that the ESPEasy code (e.g. Webserver.ino, In _C001.ino, etc) has changed significantly in the last year so not easy for me to follow. I've followed the voltage divider instructions from the same post but modified for my 4.2v (18650 LiPo batteries) and measure a max of about 0.9v connected to my ADC pin.

However, my ESPEasy new device (Generic - System Info, set to measure Inidicator set to "Input Vcc") results in a measured value of -1. ...and it's about here that I've exhausted all ideas as to how to resolve this.

My setup is...
Using a NodeMCU V3 by Lolin
Using ESP_Easy_mega-20180518_normal_ESP8266_4096.bin firmware

Any help or advice on how to make progress on my required solution will be greatly appreciated.
Thanaks
RobUpNorth

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#2 Post by TD-er » 21 May 2018, 22:51

We have special builds with "VCC" in the name, since the VCC option should be enabled at compile time.
To set VCC mode to measure Vcc of ESP chip, use compile flag: -D FEATURE_ADC_VCC=true

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#3 Post by grovkillen » 21 May 2018, 22:52

You need to use the VCC enabled bin file. It's clearly stated in the file name. Download latest release and try.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

robatbentley
Normal user
Posts: 69
Joined: 18 Mar 2017, 22:13
Location: Newcastle/UK

Re: ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#4 Post by robatbentley » 21 May 2018, 23:39

Thanks for that. I've found the Vcc enabled .bin files and will give them a try tomorrow. Excellent!

Update: installed firmware including activated Vcc. Works a treat. Thanks for building the feature as it'll be very useful.
Rob
RobUpNorth

ezparce
Normal user
Posts: 12
Joined: 13 Jul 2020, 09:18

Re: ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#5 Post by ezparce » 13 Jul 2020, 09:33

Hi all,

I'm a newby but still very intersted in ESPEASY. I already built sevral sensors with success, most of them are measuring battery voltage with the help of two resistors and ADC external.
To eliminate those two resistors, I recently tried to use a "Vcc" bin file to measure battery voltage. Unfortunately, the result is "65535". FYI, I check that there is no resistors on A0 (ESP12F stand alone module).
After reading many post about it, I don't know what to do to make it works.

Need help!

Ezparc

TD-er
Core team member
Posts: 8739
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ADC pin + System Info Config Unable to Monitor Vcc/Battery Volts (says -1)

#6 Post by TD-er » 13 Jul 2020, 15:39

How do you try to read the Vcc?
Via the system info plugin?

Post Reply

Who is online

Users browsing this forum: No registered users and 55 guests