# Cannot measure current consumption with LiFePo4 battery

**URL:** <https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134>\
**Category:** General Electronics\
**Created:** [May 30, 2024, 4:42pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134 "2024-05-30T16:42:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [May 30, 2024, 4:42pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/1 "2024-05-30T16:42:15Z")

</div>

I made various circuits with ESP32 S3 Wroom modules. Some are powered by USB, some by LiPo and some by LiFePo4 batterys. All running without a problem so far.  
Since I want to make them energy efficient, it is quite impotant to measure the current consumption while they are running and while they are in deep sleep.  
This measurment is easily possible when powered by USB and LiPo, but there is a weird problem with LiFePo4 batterys: The controller starts, it executes a LITTLE BIT of code (for example the blinking of an LED at the beginning of a code) but then instantly crashes and reboots. It never makes very far in the code.

- The LiFePo4 is charged up to 3.5V it is directly connected to the ESP, which functions perfectly fine when there is no multimeter inbetween
- The ESP32 S3 module needs a voltage of 3.0 to 3.6V
- The multimeter was a cheap noname brand, then I upgraded to a PeakTech 3350, since it didnt work I upgraded to a UNI-T UT61E, since it also didnt work I upgraded to Brymen BM867s

What is going on, why can't I measure the current consumption of this battery type?

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [May 30, 2024, 4:47pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/2 "2024-05-30T16:47:28Z")

</div>

Please describe exactly how you are going about measuring the current consumption

A schematic would help

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [May 30, 2024, 4:55pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/3 "2024-05-30T16:55:29Z")

</div>

> [@orangedays22](#):
>
> The LiFePo4 is charged up to 3.5V it is directly connected to the ESP, which functions perfectly fine when there is no multimeter inbetween

Directly connected where ?

A schematic is essential, you presumably know where stuff is connected, the forum does not.

Just a minute ago I was measuring the running current consumption of ESP32S3 vs ESP32C3 vs ESP32C2

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [May 30, 2024, 5:04pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/4 "2024-05-30T17:04:46Z")

</div>

> [@UKHeliBob](#):
>
> Please describe exactly how you are going about measuring the current consumption

Measuring current with a multimeter is done like this:  
The battery minus is connected to GND of the MCU.  
The probes of the multimeter are connected to COM and mA. One proble is connected to the plus of the battery, the other one to the plus of the MCU.

> [@srnet](#):
>
> Directly connected where ?

There are two pins that need voltage so the ESP is powered up: The "3v3" and the "EN".  
The 3v3 is the plus of the LiFePo4 battery.

 ![Screenshot 2024-05-30 190257](https://europe1.discourse-cdn.com/arduino/original/4X/8/4/d/84d60ad79e7dab313e1e711ed6002d993e2a48c9.png)

> [@srnet](#):
>
> Just a minute ago I was measuring the running current consumption of ESP32S3 vs ESP32C3 vs ESP32C2

Did you measure it when connected to a LiFePo4 battery?

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [May 30, 2024, 5:10pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/5 "2024-05-30T17:10:40Z")

</div>

> [@orangedays22](#):
>
> Did you measure it when connected to a LiFePo4 battery?

No, but if I was and had your problem, I would measure what was the actual voltage on the '3V3' pin of the ESP32S3, your problem sounds like a brownout.

Hard to comment further since you have just shown a tiny fragment of the schematic.

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [May 30, 2024, 5:37pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/7 "2024-05-30T17:37:48Z")

</div>

> [@srnet](#):
>
> No, but if I was and had your problem, I would measure what was the actual voltage on the '3V3' pin of the ESP32S3, your problem sounds like a brownout.

Good idea, I just did that and these are the results:  
The battery has a voltage of 3.501V  
The voltage reaching the input of the ESP32 (passing the mosfet and so on) is 3.463V  
The voltage reaching the input of the ESP when the multimeter is in between (measured with a second multimeter) fluctuates between 3.420 and 3.442V. I dont know about the current that is able to reach the input of the ESP but the voltage should be enough. The volatge does not pass any series resistors except the ones possibly in the multimeter.

Also I want to provide the full schematic, I had to delete a lot of notes and clean it up first, but here it is:

 ![Schematic_ESP32S3wroom_Epaper_V9timer_2024-05-30 (1)](https://europe1.discourse-cdn.com/arduino/original/4X/4/a/6/4a6e5d64ffeff7d729229673a490506b1a15f1bc.png)

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [May 30, 2024, 6:11pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/8 "2024-05-30T18:11:56Z")

</div>

> [@srnet](#):
>
> your problem sounds like a brownout

I just googled it, you suspect a sudden voltage drop.  
I just checked with a oscilloscope at the output of the multimeter that goes into the PCB in current mode (the setup when the issue happens) and you are right. The voltage suddenly drops to less than 2V which is way too low for the ESP.

 ![20240530_195450](https://europe1.discourse-cdn.com/arduino/original/4X/6/2/7/62774d462a3c17f5a5c648b27bb06470d36d575f.jpeg)  
I just took the same measurment with the LiPo battery and that voltage drop occurs too, but only down to 3.0V so it does not restart.  
From the timing I would guess it is around the time the wifi is turned on, causing a voltage spike and the multimeter does not seem to be able to handle it.  
Without the multimeter in the circuit, there is no voltage drop measurable with the oscilloscope at all.

How can all the multimeters I bought, even the one for 160 euros, cause such a big voltage drop when the wifi is turned on? And is there something I can do to fix it?

---

<div class="post-metadata">

**Author:** ![srnet](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/srnet/32/238868_2.png) [@srnet](https://forum.arduino.cc/u/srnet)\
**Post date:** [May 30, 2024, 6:19pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/9 "2024-05-30T18:19:48Z")

</div>

> [@orangedays22](#):
>
> From the timing I would guess it is around the time the wifi is turned on,

The turning on of the WiFi is very well know to cause problems. There is a (another very) large current spike when the WiFi turns on and this does cause brownouts in a lot of setups.

---

<div class="post-metadata">

**Author:** ![ShermanP](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@ShermanP](https://forum.arduino.cc/u/ShermanP)\
**Post date:** [May 30, 2024, 9:03pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/10 "2024-05-30T21:03:46Z")

</div>

> [@orangedays22](#):
>
> From the timing I would guess it is around the time the wifi is turned on, causing a voltage spike and the multimeter does not seem to be able to handle it.  
> Without the multimeter in the circuit, there is no voltage drop measurable with the oscilloscope at all.

Well, multimeters measure current by measuring the voltage drop across a series resistor that's inserted into the line. And it may switch in different resistor values for different current ranges. Are your meters autoranging? If so, maybe they are just slow to adjust to a sudden increase in current. In any case, if you don't see any voltage drop when the meters are not in use, even with the LeFePo4 battery, then the explanation almost has to be something like this.

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [May 31, 2024, 5:07am UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/12 "2024-05-31T05:07:46Z")

</div>

> [@srnet](#):
>
> this does cause brownouts in a lot of setups.

But is there anything you can do to prevent a brownout?

> [@ShermanP](#):
>
> Are your meters autoranging? If so, maybe they are just slow to adjust to a sudden increase in current.

Yes, they are, but they also have a manual fuction and the issue happens in both modes.

> [@ShermanP](#):
>
> if you don't see any voltage drop when the meters are not in use, even with the LeFePo4 battery, then the explanation almost has to be something like this.

yes, it can only happen inside the multimeter in mA mode. In A mode, it also does not happen.  
If it is caused by the switching of resistors during the voltage spike, is there any way to stop the multimeter from switching resistors? If I remember correctly, the ESP runs at around 35mA normally and spikes up to 200mA during the wifi phase.

Also, if nothing works, is it possible to solder a switch between the plus of the battery and the plus input of the PCB, which is turned on during the spike phase and turned off once the current is more stable? so the current could pass the switch and does not fully go through the multimeter, and as soon as the switch is closed, it flows through the multimeter again

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [May 31, 2024, 5:39am UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/13 "2024-05-31T05:39:57Z")

</div>

Use a fixed value resistor between battery(+) and ESP.  
Then measure the voltage across that resistor with your DMM.  
Try 1 ohm, which gives one volt per Amp on your DMM.  
When this is still problematic, then lower the value to 0.1 ohm.

Don't use thin/long wires between battery and ESP.  
You only have 3.3volt from the battery most of the time, and you can't afford to loose any.

A 470uF or 1000uF cap on the ESP's 3.3volt supply is a good way to smooth those WiFi current spikes.  
Leo..

---

<div class="post-metadata">

**Author:** ![ShermanP](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@ShermanP](https://forum.arduino.cc/u/ShermanP)\
**Post date:** [May 31, 2024, 4:53pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/14 "2024-05-31T16:53:18Z")

</div>

+1 to Leo's suggestions. Rather than wonder about which resistor the meter has inserted into the line, install you own very low value resistor, and measure the voltage across it with your meter. That has the additional advantage that the meter leads won't be carrying any material current, so the meter's presence won't affect the circuit.

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [July 20, 2024, 8:39am UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/15 "2024-07-20T08:39:11Z")

</div>

> [@Wawa](#):
>
> Try 1 ohm, which gives one volt per Amp on your DMM.  
> When this is still problematic, then lower the value to 0.1 ohm.

I have tried it but ran into problems again.  
With 3 Ohms, the controller did not start.  
With a 50 milliohms shunt resistor, the MCU runs, but the voltage difference between the awake state and the deep sleep is so small that I can't get a usable value out of it.

So I will have to order some new resistors for the testing. You mentioned a 1000uF capacitor, 1 Ohm and 0.1 Ohm. Would you suggest any other values that I should order, since the resistors will be pretty cheap compared to the shipping cost?

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [July 20, 2024, 10:35am UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/16 "2024-07-20T10:35:42Z")

</div>

If you're mainly interested in low currents, then use a 10 ohm or 100 ohm shunt with a Schottky diode across.  
The **[uCurrent amplifier from EEVblog](https://www.adafruit.com/product/882)** could be a good investment.  
Leo..

---

<div class="post-metadata">

**Author:** ![orangedays22](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/orangedays22/32/1126624_2.png) [@orangedays22](https://forum.arduino.cc/u/orangedays22)\
**Post date:** [July 20, 2024, 1:27pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/17 "2024-07-20T13:27:18Z")

</div>

I thought that the reason the ESP did not start was, that the 3 Ohms I testet was too high so there was not enough current reaching the ESP. Would 10 or 100 ohms not make the problem worse? With 100 Ohms, only 30mA would reach the ESP.  
And the diode would reduce the 3.3V by 0.7V?  
Or do you think it would be enough as soon as the cap is implemented?

---

<div class="post-metadata">

**Author:** ![ShermanP](https://avatars.discourse-cdn.com/v4/letter/s/b19c9b/32.png) [@ShermanP](https://forum.arduino.cc/u/ShermanP)\
**Post date:** [July 20, 2024, 2:52pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/18 "2024-07-20T14:52:01Z")

</div>

If three ohms prevents startup, then there is barely enough power in the first place. Maybe a bad connection.

Anyway, set up the 3R resistor in the circuit, with your meter measuring the voltage across it, but put a jumper across the resistor so it has no effect during bootup. Then when the ESP has gone into deep sleep, remove the jumper.

Assuming sleep current is a few microamps, you may be able to use a larger resistor, like 10R, which is more convenient math-wise.

---

<div class="post-metadata">

**Author:** ![alto777](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/alto777/32/317385_2.png) [@alto777](https://forum.arduino.cc/u/alto777)\
**Post date:** [July 20, 2024, 4:17pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/19 "2024-07-20T16:17:28Z")

</div>

If sleep current is the one you want to measure…

Place a toggle switch in the power line, and you ammeter probes on either side of that toggle switch.

With the switch closed, attash the battery. Set the ammeter for microamps. It reads zero because of the short circuit which is the toggle switch.

When the system is sleeping soundly, open the toggle switch and read the sleeping current.

HTH

a7

---

<div class="post-metadata">

**Author:** ![Wawa](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wawa/32/1211303_2.png) [@Wawa](https://forum.arduino.cc/u/Wawa)\
**Post date:** [July 20, 2024, 9:36pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/20 "2024-07-20T21:36:37Z")

</div>

> [@orangedays22](#):
>
> And the diode would reduce the 3.3V by 0.7V?

That's why I said " **Schottky** diode".

A jumper, as mentioned, is another solution.  
Leo..

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [January 16, 2025, 9:37pm UTC](https://forum.arduino.cc/t/cannot-measure-current-consumption-with-lifepo4-battery/1266134/21 "2025-01-16T21:37:23Z")

</div>

Closed on January 16, 2025, 9:37pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
