Mosfet (HEXFET??) to power solenoid

Discussion in 'The Projects Forum' started by tazntex, Sep 29, 2008.

  1. tazntex

    tazntex Thread Starter Member

    Joined:
    Sep 29, 2008
    Messages:
    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
  2. mik3

    mik3 Senior Member

    Joined:
    Feb 4, 2008
    Messages:
    4,846
    Location:
    Cyprus, but now in UK (GMT+0)
    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.
  3. jpanhalt

    jpanhalt E-book Developer

    Joined:
    Jan 18, 2008
    Messages:
    3,888
    Location:
    Ohio, USA(GMT-5)
    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
  4. Bernard

    Bernard Senior Member

    Joined:
    Aug 7, 2008
    Messages:
    3,290
    Location:
    Tucson AZ USA
    Rember that your solenoid is inductive and should be paralled with a diode, cathode to +12 V;Schottky would be best.
  5. mik3

    mik3 Senior Member

    Joined:
    Feb 4, 2008
    Messages:
    4,846
    Location:
    Cyprus, but now in UK (GMT+0)
    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.
  6. tazntex

    tazntex Thread Starter Member

    Joined:
    Sep 29, 2008
    Messages:
    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.
  7. jpanhalt

    jpanhalt E-book Developer

    Joined:
    Jan 18, 2008
    Messages:
    3,888
    Location:
    Ohio, USA(GMT-5)
    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
  8. tazntex

    tazntex Thread Starter Member

    Joined:
    Sep 29, 2008
    Messages:
    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.

    Attached Files:

  9. tazntex

    tazntex Thread Starter Member

    Joined:
    Sep 29, 2008
    Messages:
    27
    That picture didn't seem to work so I am trying again

    Attached Files:

  10. jpanhalt

    jpanhalt E-book Developer

    Joined:
    Jan 18, 2008
    Messages:
    3,888
    Location:
    Ohio, USA(GMT-5)
    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
  11. Bernard

    Bernard Senior Member

    Joined:
    Aug 7, 2008
    Messages:
    3,290
    Location:
    Tucson AZ USA
    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 _+.
Similar Threads
Forum Title Date
The Projects Forum How to choose new Mosfets for Amplifier on 500Khz Monday at 11:51 AM
The Projects Forum Mosfet voltage follower help needed Monday at 11:27 AM
The Projects Forum mosfet amp cutoff Oct 1, 2014
The Projects Forum Help with MOSFET switch circuit Oct 1, 2014
The Projects Forum Vdrop when Using mosfet for PWM from PIC Sep 5, 2014

Share This Page