-->
Page 1 of 1

MOSFET Switch

PostPosted: Sat May 28, 2022 6:25 pm
by Rathpr
I have created a water level monitor using a LMPS33HW. The LMP33SHW is submerged (encased in potting epoxy) at the end of a 50 ft cable so am also using a LTC3311 to boost the IC2 signal. I am measuring and compensating for atmospheric pressure using a BMP180. I have also included a voltage divider to measure battery voltage. Everything is controlled using a ESP07 running off of 2 x 9,900 mah 18650 batteries. The ESP07 is in deep sleep for 30 minutes then awakes takes the readings then goes back to deep sleep. Everything works well.

The problem was the current drain when in deep sleep. I measured 3.7 ma when in deep sleep and 75 ma for 9 sec when taking readings. I was expecting ua when in deep sleep not ma. The batteries would last about a month. I added a 2N7000 MOSFET switch on the negative lead leading to the sensors with the gate turned on by GPIO12 coming out of deep sleep and turning off just before deep sleep. The problem is after I added the MOSFET switch it was not switching on and providing voltage to the sensors even though GPIO12 was high (3.2 v). GPIO12 remained high and the ESP07 did not appear to be going into deep sleep. I attached a jumper across the MOSFET and started to get readings and GPIO12 began to cycle on and off and the esp07 was going into deep sleep. I was hoping someone could make some suggestions regarding the wiring or any other issues that might be causing his. Thanks.

Re: MOSFET Switch

PostPosted: Thu Jun 16, 2022 6:08 am
by btidey
As well as getting the wiring right, the 2N7000 is not a great mosfet to use when you are using 3.3V logic. Although it has a gate threshold voltage of 2.5V that is just the point at which it just starts to turn on. It is only specified to have a low on resistance at a gate voltage of 4.5V

You are better using a device with a guaranteed low on resistance with a gate voltage below 3.3V. The AO3400 works well if you can cope with smd devices.

Re: MOSFET Switch

PostPosted: Tue Aug 23, 2022 2:52 am
by eriksl
Also it looks like you're trying to switch gnd, not a great idea. It's a great way to (a.o.) blow your ic's and have weird behaviour.