Isn't Q1 connected backwards?
Closed this issue · 0 comments
The P-channel MOSFET for switching VIN from USB or battery seems to have its drain and source swapped. This makes the circuit always use the battery voltage, when USB drops below that 4.2V. Since this isn't usually the case, that mostly isn't a problem, but it may occur in some cases, that USB provides such a low voltage that the ESP is powered half from the battery, which may trick the charger into thinking the battery is not fully charged, which may result in overcharging. I am no expert, but I think this is a problem that needs to be fixed.
I was trying to use the voltage switch from the Thing's schematic, implemented it already in my layout and then it came out to be wrong.. without D2, Q1 will always be either saturated or the current will flow through the body diode. Unless that's expected to work this way.
Edit: it's implemented the same way in RP2040 Thing, ESP32-S2, ESP8266 and probably other Things. Please, correct me if I'm wrong (which would be absolutely expected).