Shop OBEX P1 Docs P2 Docs Learn Events
Driving BS170 FET From BS2 pin — Parallax Forums

Driving BS170 FET From BS2 pin

KatyBriKatyBri Posts: 171
edited 2007-04-21 01:57 in BASIC Stamp
Hello,

I need to switch 1 Amp (max)·at 12 Vdc and plan to use a BS170 FET.

Can I connect the BS170 directly to a BS2 pin? Is a resistor needed between the 12Vdc supply and the BS170?

Should an optical isolator chip be used to protect the BS2 if something happens to the BS170?

I assume a logic HIGH on the BS2 pin will turn the BS170 FET on. Is this correct? I've not worked with FETs before.

Thanks.

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2007-04-21 01:06
    In this drawing, " +V " is 12V --
    attachment.php?attachmentid=46713
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-21 01:10
    If you are worried about something happening to the Stamp I/O pin if the BS170 melts or something like that, just connect a 470 ohm or 1K resistor between the gate and the I/O pin. The resistor would limit the current into the I/O pin to roughly 24ma or 12ma respectively which would not be a problem for the Stamp and should not significantly change the function of the circuit.
  • KatyBriKatyBri Posts: 171
    edited 2007-04-21 01:19
    Mike,

    If I replace the relay, in the circuit diagram you provide, with a 12 Vdc fan do I need the diode?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2007-04-21 01:38
    One thing you should always do when driving a MOSFET from a BASIC Stamp pin is to connect a resistor (100K is fine) from that pin to ground. When the BASIC Stamp powers up or is in reset, or if you're uploading a new program, its pins are all inputs. By itself, a MOSFET's gate draws no current. So, whenever the Stamp pin driving it is an input, it could float high enough to turn the MOSFET on. This could have dire consequences if the MOSFET is controlling a device that could do some damage. The resistor to ground will prevent this.

    BTW, the BS170 is a poor choice to drive with a BASIC Stamp. Its gate threshold voltage is too high, and its transfer characteristics are spec'd with a VGS of 10V. Use a "logic MOSFET", like the IRL520 shown in PJ's schematic. It will turn on fully with a 5V drive signal. (And yes, even with a fan, as with any inductive load, you need that diode, unless the MOSFET is protected internally with a zener between drain and source. But even then, I'd include the diode.)

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 4/21/2007 1:55:39 AM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-21 01:42
    The diode is needed for any inductive load. This includes solenoids and motors, anything with a coil of wire involved..
  • KatyBriKatyBri Posts: 171
    edited 2007-04-21 01:53
    The 12 Vdc fan has a motor in it, I assume with windings. So, should I use the diode? Thanks.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-04-21 01:57
    KatyBri,
    What do you think? Do you understand why a diode would be used or needed? It's been mentioned before and is in the various Parallax tutorials.
    What difference would it make if you used a diode in this way and it wasn't needed? You need to know these things.
  • KatyBriKatyBri Posts: 171
    edited 2007-04-21 01:57
    Phil, thanks for the detailed explanation. Now I understand.

    Also, thanks to everyone else for your help. I'm ok now.
Sign In or Register to comment.