Title and image describes it all, can you use one mosfet to switch two things with different voltages from one microcontroller pin?
-
3\$\begingroup\$ Consider what would happen when the switch is off. \$\endgroup\$– HearthJun 16, 2021 at 1:47
-
\$\begingroup\$ Almost all discrete MOSFETs have a parasitic body diode. You can see it in their schematic symbol. It means they can only block current in one direction, but can conduct current in both directions. \$\endgroup\$– DKNguyenJun 16, 2021 at 2:25
2 Answers
It depends on what's connected to J5
and J12
. Without knowing the details, I would say you'll likely have problems with J5 in this configuration when the FET is OFF.
Think about voltages with the FET off: J5, pin 1
would be +5V and J5, pin 2
would be ~12V (through J12
), and you'd have a -7V reverse voltage on the connected J5
device. If the J5
device can tolerate a large reverse voltage, it might work, but not recommended at first glance.
Consider adding another FET controlled by the same GPIO line instead...
-
\$\begingroup\$ Weirdly I had not considered using another Mosfet controlled from the same GPIO... thank you! \$\endgroup\$– OkBNAJun 16, 2021 at 20:59
A FET and BJT alike are just single pole , single throw switches.(SPST or 1P1T) to a low V or ground (NPN or Nch) and high for PNP or Pch. They are both inverting logic switches in common emitter or source.
It takes 2 to make a 2P1T or a 1P2T