I am looking for a 3-legged component that can be used as a switch as an alternative to an NMOS transistor. My circuit currently looks the following: -
simulate this circuit – Schematic created using CircuitLab
The NMOS is supposed to act as a "nearly perfect" switch. The switch is controlled by an Arduino that can output 0 or 5 V.
However, as seen in the circuit the input voltage is differential, hence the source of the NMOS is floating with respect to the Arduino. This causes the NMOS to behave undesirably as it is neither a fully closed switch or fully open switch (it doesn't enter the saturation region properly).
Is there an alternative component I can use instead of an NMOS that would solve this unwanted behavior, or am I faced with a serious design problem?