I've been hunting around for a component that can switch on and off a 12V supply (for a water valve) from a 5V PIC output. E.g. 0V from PIC causes 0V on the valve, and 5V from PIC causes 12V on the valve.
I have a 12V supply to the circuit and am using a 7805 to reduce the supply down to 5V for the PIC chip. I was using 4 transistors but that only gave me a voltage based on the base - which was not enough i.e. 5 - 0.7 - 0.7 = 3.6V
OK thanks. I am not too sure what current I need . See attached datasheet, it doesn't contain the current figure. (EDIT: I actually see the power draw is 6VA therefore the 12V valve would draw 0.5A)
The IRLZ24 and 44 have fairly low gate capacitance and might work. Worst case, you may need to use any one of many gate drives that is available. Since it sounds like a fairly infrequent switching, unlike PWM, a slower gate turn on might not be too problematic. John
How exactly were you using the four transistors? A single darlington or two regular transistors setup as a darlington should easily be able to switch 12 volts at 500mas directly from a pic pin. Mosfet (especially) or transistor regardless make sure you use a flyback diode on the solenoid or a transistor/fet rated for the kickback voltage.
I was using this setup with a different solenoid that required a 0.1A pulse in one direction to turn it on and 0.1A in the other direction to turn it off. Trouble was that the Voltage at the emitter was the base voltage less 0.7V which was only 4.3V so I didn't think I could use the transistors to make a 12V supply.
Switch the positions of the mosfet and solenoid. Have 12V to solenoid, solenoid to mosfet drain, mosfet source to ground. That's what I meant by "low-side." You may need a current limit resistor on the gate (maybe 200 ohm or smaller). Also, with as low a current as you need for the solenoid, you might consider other mosfets with lower gate charges. But, the one you mention will probably work too.
Yes. You may have to play with the gate resistor. Usually, gate resistors are much smaller or non-existent. In this case, its main purpose is to limit the current from the MCU.
Why would you want to limit the gate current to a Mosfet? There shouldn't be any, not unless you're talking high speed switching, the brief nano/micro second long current pulse for the gate charge will not damage an MCU pin and the resistor will do not much more than smooth the rise and fall time of the FET which will waste power and be more likely to damage the fet. You could remove the mosfet and replace it with a pair of NPN transistors in a darlington setup to sink current to ground for the solenoid, just like in the mosfet image, then the gate (now base) resistor would make sense. The transistors would only need an HFE in the area of 50 to saturate at a couple of mas of drive current (from the mcu), and you're only going to lose 1 diode drop of the 12 volt supply.
As I implied, because I have never run that large a mosfet directly from a PIC. I have run a 2n7002 directly. It is easy to remove or reduce if not needed on a PCB, but harder to add, if you haven't planned for it. In addition, sometimes a small gate resistor (e.g., 4 to 22 ohm) is needed to prevent gate oscillation, as described in most of application notes.