Mosfet (HEXFET??) to power solenoid

Thread Starter

tazntex

Joined Sep 29, 2008
27
Hello,
I am using an output on the Microchip 16F628A to operate a 12VDC solenoid. My output being a logic high of 5V and I would or thought I could connect and IRF3205 HEXFET to turn on my solenoid. If I connect the gate to the output pin of the processor and 12VDC to to positve lead of the solenoid while having the ground lead going to the Drain on the HEXFET and then the SOURCE connected to ground will then activate my solenoid. Now I am not sure if the IRF3205 is a good choice but how I would like to connect my load to this is output from processor to gate, 12VDC to DRAIN and then I can bring the source to a terminal strip, from the terminal strip I would connect the positive solenoid wire and the ground lead of the solenoid to ground.

The solenoid coil is 34 Ohms and the voltage is 12VDC.

Thanks for any suggestions
 

mik3

Joined Feb 4, 2008
4,843
Your MOS is more powerful than needed but it will work. I suggest to not connect it directly to the output of the PIC but drive a small BJT with the PIC which it will drive the MOS gate up to 12 Volts. This is because the maximum threshold voltage of the MOS is 4 volts and may the output of the PIC wont be enough to turn it fully on. Also, if you are going to pulse the MOS at high frequencies use a 50 ohm resistor in series with the gate and a 1K resistor between the gate and the source. I forgot to tell you to connect the source to ground and the drain to one side of the coil.
 

jpanhalt

Joined Jan 18, 2008
11,087
Your IRF3205 needs approximately 10V at its gate to turn on completely. Your PIC cannot provide that. You can do as mike3 suggests and add a small driver, which can take a variety of forms, or go to a logic level mosfet. Be sure to have the mosfet connected between the solenoid and ground, i.e., "low-side."
John
 

Bernard

Joined Aug 7, 2008
5,784
Rember that your solenoid is inductive and should be paralled with a diode, cathode to +12 V;Schottky would be best.
 

mik3

Joined Feb 4, 2008
4,843
Also, I suggest you to parallel two protection diodes across the coil in case the one fails as not to destroy other parts of the circuit. Also, its good to place a small capacitor across the protective diodes to compensate for the turn on time they need to conduct.
 

Thread Starter

tazntex

Joined Sep 29, 2008
27
Thanks for all of the suggestions, but I need to be able to have the mosfet source connected to the +12v side of the solenoid and the soilenoid ground connected to the case frame. I've seen N channel FETS on a pcb with the source pin being a positive output connected to a terminal strip for external connections. Would I really need a P channel FET then, if so, the absoulute maximum current I would need to pass from Drain to Source would be 5 Amps DC.
 

jpanhalt

Joined Jan 18, 2008
11,087
If I connect ... 12VDC to to positve lead of the solenoid while having the ground lead going to the Drain on the HEXFET and then the SOURCE connected to ground will then activate my solenoid.
..., but I need to be able to have the mosfet source connected to the +12v side of the solenoid and the soilenoid ground connected to the case frame.
You are now talking about a very different situation from that you originally posed. A high-side N-channel mosfet will work, so long as you have a suitable (more complex) gate drive. It is often easier to use a P-channel mosfet on the high side, but you will still need some sort of gate drive from your PIC.

Which P-channel mosfet are you considering?

Can you submit a schematic of what you are now planning to do?

John
 

Thread Starter

tazntex

Joined Sep 29, 2008
27
Hopefully my attachment is clear enough since I had to scale it down. The upper left circuit is how I can make the fet work with the load going to ground through the fet. The lower right circuit is what I would like to be able to do. My voltage coming out of the processor is a logic 5v and my load is 12vdc. Thanks for the replies.
 

Attachments

jpanhalt

Joined Jan 18, 2008
11,087
I can't read the mosfet number. They both look like N-channel, so only the upper left schematic has a chance of working (i.e., turning the mosfet completely on), if the mosfet is logic level. You also do not have any protection drawn across the light bulb for when it is replaced with the inductive load.

Can you scan or export from your drawing program at about 150 dpi and post in GIF or PNG? That might work better. 300 dpi might improve even more, but don't let the file size get out of hand (say no more than 250 kb should work fine).
John
 

Bernard

Joined Aug 7, 2008
5,784
As suggested,use a P ch. FET & a npn transistor[2N2222]. You have not , mentioned repitition rate, assume it's low; a 1kΩ collector load should give fast enough turn-on . Input to base resistor of 4.7 K _+.base to gnd resistor of 10 k _+.
 
Top