Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#11 Post by papperone » 05 Oct 2017, 17:23

You can't measure resistors while they are actually soldered in a PCB as the measure is influenced by other components of course.
we need to rely on the numbers print on them and the one on the right in your video (as I wrote) reports 224 = 220k ohm while the left one if it's "010" it means 1 ohm which can't be in a correct implemented voltage divider.
So either you have a wrong resistor or the second resistor of the voltage divider is somewhere else. yu shoudl follow the PCB track from the ADC pin of WROOM2 to see where it goes.
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#12 Post by Drum » 05 Oct 2017, 23:39

Why on a separate ESP ?

If you use the same unit, you limit the number of time points, to only when it is running and not doing something else and you run the risk of the measurement process affecting the measurement.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#13 Post by Shardan » 06 Oct 2017, 18:31

papperone wrote: 05 Oct 2017, 17:23 You can't measure resistors while they are actually soldered in a PCB as the measure is influenced by other components of course.
we need to rely on the numbers print on them and the one on the right in your video (as I wrote) reports 224 = 220k ohm while the left one if it's "010" it means 1 ohm which can't be in a correct implemented voltage divider.
So either you have a wrong resistor or the second resistor of the voltage divider is somewhere else. yu shoudl follow the PCB track from the ADC pin of WROOM2 to see where it goes.
Basically this is absolutely correct.

But what you can do easily is this:
- Use a good digital voltmeter/multimeter
- connect black cord of the multimeter to GND
- with the other cord check the voltage of the battery first,
then the voltage of the analog pin of the ESP (AOUT).

The ADC inside the ESP chip can convert analog voltages in the range of 0....1 V.
If you get very low voltages with a fully loaded battery the divider has a problem.

Regards
Shardan
Regards
Shardan

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#14 Post by sibianul » 07 Oct 2017, 11:28

Drum wrote: 05 Oct 2017, 23:39 Why on a separate ESP ?

If you use the same unit, you limit the number of time points, to only when it is running and not doing something else and you run the risk of the measurement process affecting the measurement.
That sensor also measures voltage? as I'm not that interested in current value, probably the current will be at the highest value when the ESP will be turned on from sleep, and indeed the measurements will not be quite realistic , but I don't mind having the voltage measured only once at 5 minutes, as I will set sleep interval ~5 minutes, will the voltage drop that much when the board will be ON from sleep?
dashboard measuring battery.jpg
dashboard measuring battery.jpg (73.61 KiB) Viewed 20480 times
These are the measurements made until now, the maximum value is around 300 .. so ~0.3v with the wiring I made a few days ago. I will try to make some scripts in my dashboard to find out when the voltage drops at a higher rate, to send a notification to my phone when the voltage drops faster, as I can see at low voltage, the battery voltage dropped quite fast. The values are not useful now, but I will see when I will be able to measure from 4.2v


I also want to let you know that I received more informations about the board, a user on esp8266.com forum found another blog with some more pictures with this board, it seems the R1 is 220k and R2 is 100k, so it will be able to measure up to 3.3v :(

https://macsbug.wordpress.com/2017/05/1 ... fi-module/

I don't get it, what's the point of measuring up to 3.3v when the battery maximum is 4.2v ? This is a battery powered board, isn't it logical to be able to measure the battery voltage with it ?

What suggestions do you have regarding on what modifications I can make to be able to measure up to 4.2v ? Is there anything simpler than just replacing the R2 resistors ? I will look over to see what resistors do I have around 68k value, as this is what the voltage divider calculator reported to be the R2 value, to be able to measure up to 4.2v

Any more advices are welcome.

Thank you

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#15 Post by Shardan » 07 Oct 2017, 12:17

sibianul wrote: 07 Oct 2017, 11:28 I don't get it, what's the point of measuring up to 3.3v when the battery maximum is 4.2v ? This is a battery powered board, isn't it logical to be able to measure the battery voltage with it ?

Thank you
Hello,

Remember, a "Battery Low" signal isn't a voltmeter. It is just a binary signal saying battery is OK or should be replaced / charged.

For a binary "Battery Low" signal a voltage higher then 3.3 V is out of any interest.

The voltage getting to 3.3V and below is important.

The divider is dimensioned to read a voltage of 3.3V and below with maximum accuracy.

That makes sense.

If you want to read the exact battery voltage instead the divider should be dimensioned to 1:4,5 instead of 1:3.3 .

Regards
Shardan
Regards
Shardan

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#16 Post by papperone » 07 Oct 2017, 12:30

Shardan wrote: 07 Oct 2017, 12:17
sibianul wrote: 07 Oct 2017, 11:28 I don't get it, what's the point of measuring up to 3.3v when the battery maximum is 4.2v ? This is a battery powered board, isn't it logical to be able to measure the battery voltage with it ?

Thank you
Hello,

Remember, a "Battery Low" signal isn't a voltmeter. It is just a binary signal saying battery is OK or should be replaced / charged.

For a binary "Battery Low" signal a voltage higher then 3.3 V is out of any interest.

The voltage getting to 3.3V and below is important.

The divider is dimensioned to read a voltage of 3.3V and below with maximum accuracy.

That makes sense.

If you want to read the exact battery voltage instead the divider should be dimensioned to 1:4,5 instead of 1:3.3 .

Regards
Shardan
I am not sure but being the ADC pin of ESP8266 1v tolerant, sending 4.2V with that voltage divider will step down to 1.3V.
I'm confident it can be handled but it's really out of specs (+30% from Vmax).
If you are familiar with SMD soldering, replace 220k resistor with a 400k resistor, this will make the AD0 input accept up to 5V (that will generate 1V on the ADC pin of ESP8266)
if you don't want to go to SMD then put a 180k resistor in series betwen the input pin of your module and the positive of your battery (180k+220k on the PCB = 400k)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#17 Post by Shardan » 07 Oct 2017, 16:03

Hello papperone,

i've tested the ADC of the ESP8266 to see where the limits of conversion are.
I connected a potentiometer to 3.3V and ground, the slider to the ADC so i could vary the the voltage at the analog pin from 0 to 3.3 V.

Well, the ESP i used for that is luckily still alive.....

According to the HUZZAH manual from Adafruit the input can take 1,8V.
(Page 13 in http://www.mouser.com/pdfdocs/adafruith ... eakout.PDF )
so 1.3 V should be safe.

Regards
Shardan
Regards
Shardan

Drum
Normal user
Posts: 300
Joined: 07 Feb 2016, 11:56

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#18 Post by Drum » 07 Oct 2017, 19:08

On the ESP-8166 ADC pin, you can exceed 1V, and the reading will be 1024. Exceeding it by too much may cause damage, but what that point is I do not know, best not to find out.
Before trying to replace resisters, you really need to check the schematic to see what these resisters actually do.

If you have an adjustable power supply, send 1 V to the ADC pin and see what value it gives you, that should tell you how much you can send through and what formula to use to get voltage.

The 2 resistors on the board where I would expect a divider to be do not make any sense for that purpose.

sibianul
Normal user
Posts: 28
Joined: 28 Jun 2017, 11:53

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#19 Post by sibianul » 07 Oct 2017, 22:41

As the board already had a 220k resistor I connected an 100k one inline and now I finally have a good reading :D

I used this formula to match the reading with my multimeter

%value%*4.4/1024

In the morning I will check again to compare the voltage on my multimeter with the reported voltage, hope it will still be synced.

Can you guys tell me how much those 3 resistors are affecting the battery life ? Can I use an transistor as a switch to close the circuit to the battery positive side only when the board is active, and before sleeping to open that circuit, for the A0 pin only, will it help ?

Yesterday the board dropped from the table, and since than I hear a whine, it's from the 3R3 coil on the board that now is cracked, the plastic parts, should I replace it ? It bothers me when it's on my table and it's complete silence, but the board will be on my roof soon, so I won't hear that. I don;t know if I can find one locally, I think I will need to order that coil online - hope 1 month as it takes an order from ebay will not damage the board, I don't know if the coil is still working as it should.
dashboard battery reading.jpg
dashboard battery reading.jpg (81.47 KiB) Viewed 20443 times
Tanks guys. Have a nice weekend.

chaoticatom
New user
Posts: 1
Joined: 26 Oct 2017, 17:37

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#20 Post by chaoticatom » 26 Oct 2017, 17:40

sibianul, any chance you could post a picture of how you connected the 100k resister? Did you remove the second 010 smd resister and replace with the 100k?

adampr1
Normal user
Posts: 17
Joined: 27 Jun 2016, 13:34
Location: Germany

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#21 Post by adampr1 » 27 Oct 2017, 08:36

Hallo all,
please check again photo with SMD resistor again - it's NOT "010" !!! its "01D" - 1% resistor with value of 100kOhm (please refer to http://www.rom.by/files/SMD-Resistors-EIA-Markings.html). Some high (mostly 1206 size SMD) precise resistors are marked with 4 digits, but smaller 0805 and 0603 resistors have mixed coding with digits and letters. It is already 100kOhm on PCB. For that modification please ONLY cut trace between 220kOhm resistor and A0 pin , scrape some lack from track on both sides cut place and solder small resistor 100kOhm on that place or put small axial wired resistor between pad of 220kOhm and A0 pin.
Sorry I don't have that board and can't make photos.

B.R.
Adam
Domoticz Beta release on OrangePI PC and BananaPI,
2x RFLink (last version),
ESPEasy, ESPEasy32 (different configurations),
MySensors (different configurations),
2x MiLight RGBW (over RFLink)
and others things :D

nehulagr
New user
Posts: 1
Joined: 07 Jan 2019, 20:48

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#22 Post by nehulagr » 07 Jan 2019, 20:51

If some got the code. Please share it! Here I am not able to understand how can I calculate the value of it, its really hard to get.

Thank you!

MaikelK
Normal user
Posts: 11
Joined: 20 Jun 2017, 19:56

Re: Some help to measure the Li-Ion voltage of ESP-WROOM-02 with battery socket

#23 Post by MaikelK » 21 May 2019, 23:01

So do we need to solder a wire from the + terminal too the AD pin?

I also want to monitor the battery voltage.

Post Reply

Who is online

Users browsing this forum: No registered users and 93 guests