I have designed a board with dual power supplies (regular power from a wall outlet, and backup power from a power bank).
On the PCB there’s a resistor network (56k and 100k) connected to the power bank 5V rail, and the output is connected to GPIO13 of my ESP8266 (Wemos D1 Mini).
The idea is that the board can detect power loss on the main power source and load a different preset when power is coming from the power bank.
Unfortunately, this does not work as intended: with the power bank connected, the voltage on GPIO13 is 3.3V, but with the power bank disconnected, the voltage on the pin is around 2.6V, even though it should be close to 0V.
Now the weird part comes in: when I change the GPIO pin in the WLED setup to a different pin, the voltages on GPIO13 are correct. But as soon as I change the pin in the setup back to GPIO13, the voltages are wrong again.
The only explanation I could come up with for now is that there’s an internal pullup that is stronger than my resistor network and this pulls the voltage up to around 2.6V.
But I can’t find any mention of the internal pullup in the documentation, and no way to disable it, in case it is the cause for the strange behaviour.
Does anyone have another idea what could cause this, or maybe even a solution?