I am wondering if anyone can comment on the feasibility of this circuit. My ultimate goal is to switch a 12V solenoid on and off using a 3.3V microcontroller, but I have had trouble so far. I want to switch the solenoid on when the I/O pin goes high, and the solenoid to switch off when the I/O pin goes low. I am trying to find the simplest way to do this.
I bought a logic level mosfet with the original intention of driving the mosfet gate directly with the 3.3V I/O pin of my microcontroller, but the mosfet does not open enough to drive the solenoid. I have tried a few different types of logic level mosfets, but I have not had luck finding one that opens with just a 3.3V. I do know that applying 5V to the mosfet gate opens the gate enough to drive the solenoid.
I am hoping to use a logic level converter to boost the 3.3V output to something higher. Below is the circuit I am planning on using. I am hoping that this setup will work, but I wanted to hear input if I am misunderstanding something before purchasing products/soldering.
I have purposely left the resistance values off the resistors below, because I am open to input. The setup is as below:
R3 = R4 = R5 (1k ohms?) This is a voltage divider that will apply 8V to the converter.
R1 is a pulldown to keep mosfet gate low (10k ohms?)
R2 is a pulldown to keep the I/O pin low (10k ohms?)
Microcontroller = ESP32 (There is a mistake in the diagram. ESP32 is powered by 3.3V, not 3V)
Logic Converter = BSS138 (maximum High Voltage is 10V, minimum Low Voltage is 1.8V)
Solenoid = 2 amp, 12 Volt
Mosfet = IRLZ44N (RDSon is 5 Volts @0.025 ohms. Gate threshold is 1 - 2 volts). I also have some TIP120 transistors
Thank you.