Hi! I have a simple circuit with a D1 Wemos mini pro reading two sensors through RS485, publishing into a MQTT broker and sleeping for 20 minutes.
All this was working but with one big problem. Sensors were powered up all time, so they ate my battery.
So what I have done is design a low side switch to decide when sensors will be on and when will be off. I have used a MOSFET BS170 with Vgs(th)max of 3.v connected to a digital output of D1 mini pro (GPIO14). I used two resistors, one to protect the GPIO port (470 Ohm) and one to pull down the transistor and avoid float (10K Ohm). This is the schematic and connections:

As you can see when I put HIGH GPIO14 I power up a RS485 module and a steep up booster (from ~3.7 to 5v) which powers the sensors. The consumption is about 100mA.
But the thing is this is not working very well. When I activate GPIO 14 the voltage of all the circuit is not stable and it increase from 3.7v to 4.3v and is not stable.
Do I have done something wrong?
Lots of thanks
All this was working but with one big problem. Sensors were powered up all time, so they ate my battery.
So what I have done is design a low side switch to decide when sensors will be on and when will be off. I have used a MOSFET BS170 with Vgs(th)max of 3.v connected to a digital output of D1 mini pro (GPIO14). I used two resistors, one to protect the GPIO port (470 Ohm) and one to pull down the transistor and avoid float (10K Ohm). This is the schematic and connections:

As you can see when I put HIGH GPIO14 I power up a RS485 module and a steep up booster (from ~3.7 to 5v) which powers the sensors. The consumption is about 100mA.
But the thing is this is not working very well. When I activate GPIO 14 the voltage of all the circuit is not stable and it increase from 3.7v to 4.3v and is not stable.
Do I have done something wrong?
Lots of thanks
