Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Component for switching 12V supply from 5V

Status
Not open for further replies.

richacm

New Member
Hi simple question.

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

Thanks,

Craig
 
What about a logic level mosfet on the low side? What current do you need to switch? John
 
Last edited:
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.
 

Attachments

  • SolenoidSwitch2.gif
    SolenoidSwitch2.gif
    6.3 KB · Views: 209
Last edited:
Here is my circuit with the mosfet in it. I have not included any resistors do I need to?

The WTR1 is the 5V supply from the PIC. The J10 is the connection to the water valve which requires 12V @ 0.5A across it.

Would this work?

Thanks,

Craig
 

Attachments

  • ValveSwitch.gif
    ValveSwitch.gif
    2.6 KB · Views: 139
No, it will probably not work.

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.

John
 
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.

John
 
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.
 
Last edited:
Why would you want to limit the gate current to a Mosfet?

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.

John
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top