My projects consist of measuring different sensors using the ESP32 bare chip. It takes a measurement once every 2h and goes back to deepsleep.
I need confirmation that I'm not doing anything wrong. I've tested it, except for the Mosfet that protect for reverse polarity. I'm sure you might be able to make much better than that. I just need to know if you think there's anything wrong or that could be improved.
I have:
a power source (a 18650 or a Lithium polymer battery)
a power regulator (MCP1700)
a voltage divider connect to a pin on the ESP32
a battery charger (TP4056) in case I need to use a solar panel
A quick look by me (its late in the evening here in UK).
Is the FET really needed?
R3 and R2 present a large discharge on the battery. The resistance could be raised significantly and/or turned on only when the battery level needs to be checked.
I agree with both points. The mosfet is always on, so there's no point to having it there. And the resistor divider could have much higher values, like 100K each, or even 220K.
Edit: Ok, you said reverse polarity. That's why the mosfet is there.
I'm a bit concered about Out- and Bat- being connected together. If your module is like mine, with the DW01 protection chip, connecting them like that defeats the protection, which works by controlling the low side. So I think Out- should be connected to ground, and Bat- should be connected to the battery's minus terminal.
Out+ and Bat+ are actually connected together on the module.
I get the MosFet is for reverse polarity safety. However your P-channel must be fully on with only 3.7 volts on the gate. I'm not sure P-ch exist with such a low -VGS. Keep in mind the mosfet should have a Vgs spec of significantly < 3.7 volts for it to be fully on.
C1 need not be as large as you have. Stay with the MCP1700 app notes.
R2 and R3 could go higher and add a 0.1 cap on the "BattLvl" connection.
You need a capacitor (or 2) at the circuit side of J1
Ok thanks. Just to be sure, are we talking about polarized aluminium or unpolarized ceramic capacitors? And is it the same for C6?
I finally decided to go with the LiPo battery. So as you suggested in my previous topic, I don't need any protection. And now, I realize why you're asking me that! I guess I need to change my scheme since I will actually use this one:
C5 would just be a plain ceramic cap. C6 would be a polarized aluminum electrolytic, 100uF. So C5 and C2 could be the same cap.
No, that's not why. The TP4056 module with protection has separate holes for Out+ and Bat+, but if you'll look at the board, those holes are shorted together. But that's not the case on the negative side. The protection circuit disconnects Bat- from Out- if a violation occurs. So if you need the protection on the module, you shouldn't connect the negative terminals together.
But if you're going with the non-protected module, then there's no separation on the negative rail.
One last question for you @ShermanP. If I decide not to plug any solar panel to the JST connector (J4), apart from taking space on my PCB, is it bad? in terms of current consumtion or anything else...?
No I don't think so. With no power coming in, the TP4056 will shut down, and the battery will power the load. There may be a very small amount of leakage current back through the TP4056, but not enough to make any difference - maybe a couple microamps.