The power on esp 01 cannot be turned off immediately

I tried to turn on the esp01 with this adapter, the problem is that when the battery is below the 4.5V limit the light on the esp01 is dim and the wifi is off, how can I turn off the power when the battery is below the limit on the adapter?
images

  • You can use a TL431 and MOSFET circuit similar to this.

To create a voltage limiter below 4.5V?

  • R1 and R2 set the low cutoff point.
    Vref = 2.5v

What is the function of R3 and what is its value?

Is it like this?

  • R3 should be around 1k



No time right now but this video should help.

Is D1a TL431 adjustable zener diode?

a7

  • No, the TL431 is not a zener diode.

  • This is a block diagram or equivalent circuit of the internals of the device.

  • For your application, we use the internal voltage comparator to turn OFF the external MOSFET when the voltage divider resistor voltage is below 2.5v i.e. your battery level low level is reached (4.5v).

I think it's a zener. What about the resistor value? Is it correct?

I got calculations for Vout 5V, R1 1k, R2 4 7K. Did it work?

See post #9.

I need the value of R1 and R2 to limit the value below 5V will cut off. I calculated using the formula in post #2 and the results were 1K and 4.7K. Is it true?

  • Assume R2 is 4700 Ω (4.7k)

  • Assume low voltage cut off we want is 4.5v

  • When the voltage at the Ref pin #1 is <2.5v we want the external MOSFET to turn OFF.

V(cutoff) = Vref( 1 + R1/R2)

4.5v = 2.5v(1 + R1/4700)
(4.5v / 2.5v) - 1 = R1/4700
(1.8 - 1) * 4700 = R1
3,760 Ω = R1
therfore Rt = 4700 + 3760 = 8460 Ω

Check

(4700 * 4.5v) / (4700 + 3760) should be 2.5v
21150 / 8460 = 2.5v :+1:

  • Therefore if we select R2 at 4700 Ω and we want a cut off voltage of 4.5v, R1 needs to be 3760 Ω

In practice 3760 is not a standard value, so we use a 3.3k in series with a 1k potentiometer.

2024-07-20_01-23-20


FYI

Logic Level MOSFETs 20 07 17.pdf (1.3 MB)

Thanks guys, I had to account for 5V as well as a limiter. I'll try the formula

Why do you need to turn off power, the WiFi is off anyway.

  • Note to lower the divider discharge current you can change R1, R3 and R4 to higher values.

R1 33k
R3 10k
R4 47k

R6 may need to be increased, trial and error should work.

BTW

  • Always confirm your component pin definitions for the form-factor you are using.

There is a slight problem with the power. When the battery is low the light on the ESP01 stays on but is not bright, I don't know what the leak is, the ESP01 should turn off immediately

Is the ESP01 connected to something that has an ADC, like an Uno, nano, etc?

No, I just connected the serial adapter to the stm32

The stm32 has an ADC, so you can monitor the voltage with the stm32 and just use a simple Mosfet circuit to cut the power to the ESP01