0
\$\begingroup\$

I'm trying to replace a normally open switch with a low-side switch mosfet. The drain of the mosfet is connected to an input pin of a non-modifiable 3.3V MCU.

Prior to my changes to the setup the HIGH side of the switch measured around 3.3V since it's a LOW = TRUE logic input.

After I added a 5v long-period square wave (~5V high, 0.070V low) to the gate of the mosfet the voltage changed drastically at the drain side of the mosfet.

MOSFET ON - V_ds = 0V with V_gs = 5V as desired.
MOSFET OFF- V_ds = 1.7V with V_gs = 0.070V - HALF of what it should be with the mosfet switch open.

Anyone have any insight as to why this would be? From what I can tell I'm utilizing the 2N7000 well within spec.

schematic

simulate this circuit – Schematic created using CircuitLab

\$\endgroup\$
  • \$\begingroup\$ So if you remove the mosfet, what's the voltage at that pin? \$\endgroup\$ – Big6 Apr 21 '18 at 3:00
  • \$\begingroup\$ I hope M1 GND and 555 GND are actually connected (unlike the schematic) \$\endgroup\$ – Brian Drummond Apr 21 '18 at 10:14
  • \$\begingroup\$ @sixcab With mosfet removed voltage is at a steady 3.3v. \$\endgroup\$ – ItsAPhaseLocked Apr 21 '18 at 23:14
  • \$\begingroup\$ @Brian Drummond lol yes the grounds are connected. \$\endgroup\$ – ItsAPhaseLocked Apr 21 '18 at 23:17
  • \$\begingroup\$ My next move would be to try a different mosfet \$\endgroup\$ – Big6 Apr 21 '18 at 23:22
0
\$\begingroup\$

As for the mosfet, when you switch it off (with \$V_{GS}\approx 0\$), in your schematic, the drain is actually floating (unless your MCU gives you the option to enable internal pullup resistors at the input, check that). You may want to do something like this:

schematic

simulate this circuit – Schematic created using CircuitLab

When CTRL is 5V, you get \$V_D=0V\$. When CTRL is \$\approx 0\$, the MOSFET is off and the pullup resistor should set the 3.3V(Logic high) on the MOSFET's drain.

Also a resistor (47k works) from the gate to ground would not hurt, though I don't think this is the reason you're having issues, since your are driving the gate low.

\$\endgroup\$
  • \$\begingroup\$ So that was actually the first thing I though of. But adding a pullup resistor didn't change anything - I checked the drain voltage and it remained the same. As far as I can tell the MCU already had a pull-up resistor turned on internally. And I forgot to add the gate-ground resistor in the schematic but it's there :) Maybe the mosfet is pooched \$\endgroup\$ – ItsAPhaseLocked Apr 21 '18 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.