I want use 2n7000 mosfet with D1 mini for make a push switch. D1 mini 2.9v on pin D4, when push switch voltage dropes and return to 2.9v .
I want inverted like normal 0 v when push button must be 2.9v. How can i do.
Hm… i’m not sure that driving mosfet with 3.3V will open it fully… most mosfets are designed to operate at gate voltages 5V and above… you’ll need some sort of “buffer” between GPIO and gate of mosfet or use NPN transistor. But, try and see…
I’ve used Mosfets with output pins on ESP8266 to the gate. They have worked well. NTF3055L108T1G MOSFET N-CH, FQP27P06 TO-220 MOSFET P-CH, IRLML6401TRPBF P-CH are 3 I’ve used recently.
Yes, if you use logic gate mosfets they will do ok since their turn-on voltage is lower than at “normal” mosfets (typically 5V, but they do ok with 3.3, too).
Others could do ok, too, as long as current doesn’t go to high. But, for high current loads a good mosfet driver is a must since without it mosfets tend to overheat.
D1 (GPIO 5) and D4 (GPIO 2) both are 2 different switches. On D1pin is a switch components and on D4 pin is a button component.
I will try your solution. Which platform you use with button?
I could have a go at drawing my circuit later. Looking at your example it has an inductive load with a fly back diode. If the voltage across that load is much more than 5V I would suggest using a 5 V relay which would isolate the D1 mini from those big voltages.
Sorry not so much a circuit schematic but more a picture I worked off to solder the parts in. Think I settled around a 3.2K resistor just before the 2 gates. Also put 10K on the green and yellow lines to pull them to ground to stop motors firing off with stray signals. I have 2 mosfet switches running side by side.