0
\$\begingroup\$

I am trying to develop a custom PCB with the esp12-E module. For development and testing, I am using the nodemcu development board ESP8266 V3. I am powering the nodemcu via a 3.7V battery with a maximum voltage of 4.2V and a discharge cutoff of 2.75V. I am giving power directly via the 3v3 pin on the nodemcu and it works fine. Now my problem is that my nodemcu board has an Ams117-3.3 voltage regulator on it that requires an input voltage of 4v-12v. Now I have the battery plugged in for many hours now and at this point the voltage of the battery should be below the 4V minimum required but the nodemcu is still operating normally. Is there some additional electrical component being used on the nodemcu board to boost the voltage?

\$\endgroup\$
5
  • \$\begingroup\$ The ESP8266 can run with a supply voltage down to 2.5 V. What is the output of the AMS1117 (and the voltage on the 3V3 pin of the NodeMCU) when the input is 4.0 V? \$\endgroup\$
    – StarCat
    Commented Dec 15, 2023 at 8:10
  • \$\begingroup\$ what makes it possible to run at 2.5v tough? is there some additional component? because the ams1117 permits a minimum input of 4V. And i dont have a multimeter rn to measure voltages :/ \$\endgroup\$
    – Solo
    Commented Dec 15, 2023 at 8:16
  • 1
    \$\begingroup\$ The AMS1117 will lower its output voltage gradually when it cannot maintain it at 3.3 V. It will not simply cut off below 4 V. According to its datasheet the dropout voltage is 1.1 V (1.3 V max), so at 4 V input voltage its output should already be below the 3.3 V the NodeMCU requires. The AMS1117 is a simple, cheap linear regulator, there is (very likely) no voltage boosting going on. If you want to know what's going on, use a multimeter. As always, using components beyond their specifications can give unexpected/undesired results. \$\endgroup\$
    – StarCat
    Commented Dec 15, 2023 at 8:22
  • \$\begingroup\$ Thank you so much for the insight. Hypothetically speaking, If i want the nodemcu to be functional even when the input voltage is lets say 3V then i should probably look for some other voltage regulator for my custom pcb? \$\endgroup\$
    – Solo
    Commented Dec 15, 2023 at 8:29
  • \$\begingroup\$ Ideally you'd replace that AMS1117 with a four-switch buck-boost converter, or possibly a SEPIC. Using a linear regulator means you can't go all the way down to the minimum battery voltage, and at higher battery voltages you're wasting more power than you need to be. \$\endgroup\$
    – Hearth
    Commented Dec 15, 2023 at 14:51

1 Answer 1

0
\$\begingroup\$

AMS1117 is basically "the cheapest regulator they could find". It has rather high dropout (>1V) which is not a problem when powering with 5V, but it also has slow transient response: when ESP32 goes from low to high power, for example when going out of sleep, the regulator isn't fast enough to catch up, so this causes output voltage to dip, and this sometimes crashes the micro. Its idle current is also very high (5-10mA) which is a problem on batteries.

In your case the simplest solution is to use a more modern, faster LDO with lower dropout, for example LDL1117. It has the same footprint as AMS1117 so you can directly replace it on the NodeMCU board. The tantalum output cap also needs to be replaced with a 10µF X7R/X5R ceramic cap of the same size. This fixes all power supply related crashes.

No matter what LDO you use, I'd still recommend replacing the tantalum cap with MLCC to get lower transient voltage dip on transition from sleep to active. The tantalum cap's ESR (several ohms) causes problems in this case, whereas ceramic capacitor ESR is much lower (few mOhms for 10µF).

ESP32 will run down to 2.5V so if your battery cutoff is 2.75V, with a real LDO as in "low dropout", you don't need to boost voltage. But you do need to be able to detect when the battery is drained and power down, otherwise it will over-discharge the battery and kill it. If you add a battery management / charging chip in your design it will also handle over-discharge protection, otherwise you'll need a supply supervisor or similar chip.

I was recommending LDL1117 because its pinout is the same as AMS1117 which is convenient for a drop-in replacement on NodeMCU boards and very effective at fixing the power supply related crashes. But if you make your own board, you don't have the footprint constraint, so you can pick a LDO with an ENABLE pin, controlled by the battery supervisor chip. Or maybe you will find a battery supervisor with integrated LDO. LDL1117 idle current is a bit high for battery use (typ 250µA).

\$\endgroup\$
3
  • \$\begingroup\$ wow I will definitely check out LDL1117. It seems like the perfect LDO for my use case especially considering the battery goes down to 2.75V. Thank you so much for this. it was really helpful \$\endgroup\$
    – Solo
    Commented Dec 15, 2023 at 11:09
  • \$\begingroup\$ what is the operating input voltage of this LDO ( LDL1117)? @bobflux \$\endgroup\$
    – Solo
    Commented Dec 15, 2023 at 11:21
  • 1
    \$\begingroup\$ It's in the first line of the first page of the datasheet XD 2.5-16V \$\endgroup\$
    – bobflux
    Commented Dec 15, 2023 at 11:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.