I would like to turn a SIM800L modem on/off (to save battery), controlled with GPIO 16 on an ESP32-CAM, without a relay.
It was working OK with an electromagnetic relay, but I'd like to avoid the noisy clicking sound, so I'm trying to use some kind of BJT transistor or MOSFET based approach.
It might be relevant that pin 16 has a 10k pull up resistor.
(This is part of a more complex setup, and I only have pin 16 left.)
There is 5v on the breadboard power rail, and 3.3v appears on the output pin when turned on HIGH.
Maybe could work
I tried using and NPN transistor (2N2222A) as a switch, but that didn't turn on the SIM800L.
I was following this kind of setup and maybe that wasn't suitable?
Approaches that didn't work
As @vir explains: The 3.3V from the module is not enough to turn on the IRF530, which has a threshold voltage of 2-4V.
I wired it up like below, but HIGH on GPIO 16 doesn't turn on the SIM800L.
Can this possibly work?
There was another question where someone got a similar mosfet to work, and I saw a breakout-board with this on/off function which used an IRF520.
This guide also indicates some techniques but honestly it's over my head how the pieces might have to fit together to make it work.
I was following this tutorial where he includes this diagram: