Measure & Power ESP8266 with an INA219 and Battery

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
magicsmoke
New user
Posts: 1
Joined: 15 Jun 2022, 14:04

Measure & Power ESP8266 with an INA219 and Battery

#1 Post by magicsmoke » 15 Jun 2022, 14:09

Hi,

I hope someone can help me as im getting a bit stuck with a problem.

I have an ESP that has an 18s20b attached to it. I want to read the temperature every hour and then put it to deep sleep. The problem is when I try this the battery (18650 Lifepo4) doesnt last more than 9 hours.

What I would like to do is be able to report on the power consumption to work out if the device is going to deep sleep or if something weird is going on with the circuit etc. I thought I would be able to achieve this with an INA219 but I cant seem to get the wiring right for it.

Can anyone help with this circuit design please as I would really like to get to the bottom of it.

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

Re: Measure & Power ESP8266 with an INA219 and Battery

#2 Post by TD-er » 15 Jun 2022, 14:15

Typically you should look first at the connected parts while the unit is in deep sleep.

For example the voltage regulator(s) may draw a significant current even when not actually used.
Like the AMS1117, which is a very robust linear regulator, but it has a quiescent current of 5 - 10 mA.
Also any connected pull-down resistor may draw current and also pull-up resistors if the ESP pulls a GPIO pin down while in deep sleep mode.

If there is an USB to serial chip connected, then this one may draw some current too.

And on top of that, some ESP modules may not enter deep sleep mode the same.
There is a checkbox in the tools->Advanced settings to use an alternative sleep mode. This maybe can put your ESP into an actually low current consuming deep sleep mode. (no guarantees!)

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: Measure & Power ESP8266 with an INA219 and Battery

#3 Post by dynamicdave » 16 Jun 2022, 07:44

Deleted
Last edited by dynamicdave on 16 Jun 2022, 09:53, edited 1 time in total.

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

Re: Measure & Power ESP8266 with an INA219 and Battery

#4 Post by TD-er » 16 Jun 2022, 09:20

Hmm the ZVP4424A seems to have an on-state resistance of 9 - 11 Ohm.
So you can't use it on relatively high currents.
Roughly speaking 1V drop per 100 mA.

This resistance will be even more when V_GS will approach 3V3 in your circuit.

So this is (by accident or by design?) also a current limiter for charging the capacitors.
But this will cause a relatively slow charge of them and thus a slow rise of the output voltage.
Not sure what will happen to the connected chips if they start at slow rising voltage.

Another thing to keep in mind is that some chips don't allow to have some high level signal on pins which may be higher than the supplied voltage to the chip.
Most datasheets define the max. input voltage on a pin relative to the supplied voltage Vdd of that chip.

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: Measure & Power ESP8266 with an INA219 and Battery

#5 Post by dynamicdave » 16 Jun 2022, 09:48

I've deleted my circuit in case it caused confusion.
Last edited by dynamicdave on 16 Jun 2022, 11:32, edited 4 times in total.

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

Re: Measure & Power ESP8266 with an INA219 and Battery

#6 Post by TD-er » 16 Jun 2022, 09:51

Sure and I guess it is a good one when shutting down some I2C sensors as those often are a bit more resilliant against high level input voltages while powered down.
But it cannot be used on sensors drawing a significant current (> 50 - 100 mA)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 24 guests