Hi There
I have the same issue like jagden and this conversation here is super helpful, thanks everybody for that.
I tired to connect a Soil-moisture Sensor the same way wit ha N Channel and it works fine wit a Fan for example and not with a Sensor connect to a analog input. Same behavior that the current flows although it should be off.
So the solution is to use a high side switch. Following your suggestions I planned to do it that way:
I just struggle to find a THT P-Mosfet closing at 3.3V.
The thing is that I want to use th VCC 3.3V output because my Sensor likes 14mA and the I/O Pin of the MKR only provides 7ma.
But can I just use two I/O Pins to switch On the Sensor and protect them with Diodes? I would have double current right?
