Hello.
I have a microcontroller operating at 3.3V and a frequency inverter (Mitsubishi FR-S500) operating at 12V.
My overall goal is to pass a digital signal (0V/12V) controlled by the MCU to the inverter's input pin.
Problem arises because of the voltage difference of the two devices. It is obvious that I can't directly connect an output pin of the MCU since the voltage is not enough for the inverter to interpret it as a logical high, but I can switch a 12V circuit with the MCU.
Here is the schematic:
I replaced an output of the MCU with a switch (SW2), and the input pin with the label "Vin". Everything in the red box is encapsulated and I can't modify it.
So I want "Vin" to measure 12V when SW2 is closed to 3.3V, and 0V when SW2 is closed to GND.
However, in this example setup I used a N-channel MOSFET. Turns out, it will not work that way, since voltage at the source of the MOSFET will be 12V, and the voltage at the gate is at most 3.3V, which results in negative Vgs, while it needs Vgs to be at least 2.5V to turn the MOSFET on.
So N-channel is not the way. I tried to do it with P-channel.
But the voltage of 3.3V is not sufficient to turn the MOSFET off, because Vgs is at most -8.7V, and the cheap low-voltage MOSFETs I intend to use are opened with Vgs < -1.4V.
It's not that I want to use just MOSFETs. With BJTs the same problem arises for both PNP and NPN.
I saw some configurations using an intermediate NPN BJT/N-channel MOSFET activating PNP BJT/P-channel MOSFET. But I'm not sure if that's the only right way to do it. Two MOSFETs seem to be somewhat redundant.
My question is, what is the right way to design the switch? And are there ways to avoid using an intermediate BJT/MOSFET to drive another BJT/MOSFET?
Thanks in advance!