Shop OBEX P1 Docs P2 Docs Learn Events
transistor not triggering relay — Parallax Forums

transistor not triggering relay

ArchiverArchiver Posts: 46,084
edited 2002-08-28 13:15 in General Discussion
I have a DS2E-SL2-DC5V relay and a 2N7000 transistor. This is a DPDT
latching relay with coils rated at 5V DC, 35.9 mA. I manually
connected the relay to the 5V DC supply of the Basic Stamp 2 BOE to
test it and it works fine (switches an LED on and off). The problem
that I'm having is that the relay doesn't trigger when I use the
2N7000 transistor. I connected the source pin to ground, the gate pin
to pin 4 of the Basic Stamp and the drain pin to the coil. My Basic
Stamp program simply sets pin 4 high and then low with the desired
result to drive the transistor to trigger the relay. I'm concerned
that I may not have the correct transistor. I am a rookie so I don't
have a lot of test equipment (or knowledge of transistors). I need to
make sure that the transistor is will generate 5V DC at 35.9 mA or
better. Any help is appreciated.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-08-27 21:08
    --- In basicstamps@y..., "southernpost" <Scott@b...> wrote:
    > I have a DS2E-SL2-DC5V relay and a 2N7000 transistor. This is a
    DPDT
    > latching relay with coils rated at 5V DC, 35.9 mA. I manually
    > connected the relay to the 5V DC supply of the Basic Stamp 2 BOE to
    > test it and it works fine (switches an LED on and off). The problem
    > that I'm having is that the relay doesn't trigger when I use the
    > 2N7000 transistor. I connected the source pin to ground, the gate
    pin
    > to pin 4 of the Basic Stamp and the drain pin to the coil. My Basic
    > Stamp program simply sets pin 4 high and then low with the desired
    > result to drive the transistor to trigger the relay. I'm concerned
    > that I may not have the correct transistor. I am a rookie so I
    don't
    > have a lot of test equipment (or knowledge of transistors). I need
    to
    > make sure that the transistor is will generate 5V DC at 35.9 mA or
    > better. Any help is appreciated.

    Ok, I am not that experienced to answer this question and I know that
    people that read this can answer it but I'll give it a shot. You are
    using a mosfet transistor when you don't need to. I personally don't
    use them, I use either pnp or npn transistor. You didn't mention a
    resistor anywhere in the message which could be one problem but also
    you have the source to ground and you are activating it with a low,
    they are the same potential, so you won't be able to turn it on. Try
    this, if you have one or get one at radio shack, get a 2n4401-it's a
    npn. Then, connect the base to p4 but be sure to put like a 5k
    resistor inline. Connect the emitter directly to ground and the
    collector to your relay. This transistor will put out about 130ma,
    more than you need. I hope this helps.
  • ArchiverArchiver Posts: 46,084
    edited 2002-08-27 22:26
    I'm not sure on the specifics of that particular mosfet but to drive many
    mosfets you need to have a gate to source voltage of around 10 volts before the
    mosfet will be fully on. In your case I am thinking that perhaps the mosfet
    isn't being driven correctly (5volts) so full conduction is not achieved
    resulting in insufficient current flowing through the relay coil. Try using an
    NPN transistor and keep your current configuration except note that
    emitter = source
    base = gate
    collector = drain
    Also make sure that you have a 10k resistor in series with pin 4 going to the
    base of the NPN transistor. Another very popular transistor is the 2n2222A which
    is sold at radio shack in quantities of 1 for .99cents
    Good Luck!
    -=Randy Knutson
    christopher41877 wrote:--- In basicstamps@y..., "southernpost" wrote:
    > I have a DS2E-SL2-DC5V relay and a 2N7000 transistor. This is a
    DPDT
    > latching relay with coils rated at 5V DC, 35.9 mA. I manually
    > connected the relay to the 5V DC supply of the Basic Stamp 2 BOE to
    > test it and it works fine (switches an LED on and off). The problem
    > that I'm having is that the relay doesn't trigger when I use the
    > 2N7000 transistor. I connected the source pin to ground, the gate
    pin
    > to pin 4 of the Basic Stamp and the drain pin to the coil. My Basic
    > Stamp program simply sets pin 4 high and then low with the desired
    > result to drive the transistor to trigger the relay. I'm concerned
    > that I may not have the correct transistor. I am a rookie so I
    don't
    > have a lot of test equipment (or knowledge of transistors). I need
    to
    > make sure that the transistor is will generate 5V DC at 35.9 mA or
    > better. Any help is appreciated.

    Ok, I am not that experienced to answer this question and I know that
    people that read this can answer it but I'll give it a shot. You are
    using a mosfet transistor when you don't need to. I personally don't
    use them, I use either pnp or npn transistor. You didn't mention a
    resistor anywhere in the message which could be one problem but also
    you have the source to ground and you are activating it with a low,
    they are the same potential, so you won't be able to turn it on. Try
    this, if you have one or get one at radio shack, get a 2n4401-it's a
    npn. Then, connect the base to p4 but be sure to put like a 5k
    resistor inline. Connect the emitter directly to ground and the
    collector to your relay. This transistor will put out about 130ma,
    more than you need. I hope this helps.


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body of
    the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




    Do You Yahoo!?
    Yahoo! Finance - Get real-time stock quotes

    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-08-28 00:32
    Gate threshold for a 2N7000 is 3V max so it is a TTL logic level
    MOSFET. I have used these in the past to control LED's and relay's.
    You need a snubber diode across the coil of the relay. If you don't
    have one you may have smoked the MOSFET. Connect cathode of diode to
    side of coil that is connected to +5V. Connect anode to other side of
    coil. For a diode use a 1N4004. Use a 10k ohm in series with the
    gate.

    Jason


    --- In basicstamps@y..., Randy Knutson <ken_ryder@y...> wrote:
    >
    > I'm not sure on the specifics of that particular mosfet but to
    drive many mosfets you need to have a gate to source voltage of
    around 10 volts before the mosfet will be fully on. In your case I am
    thinking that perhaps the mosfet isn't being driven correctly
    (5volts) so full conduction is not achieved resulting in insufficient
    current flowing through the relay coil. Try using an NPN transistor
    and keep your current configuration except note that
    > emitter = source
    > base = gate
    > collector = drain
    > Also make sure that you have a 10k resistor in series with pin 4
    going to the base of the NPN transistor. Another very popular
    transistor is the 2n2222A which is sold at radio shack in quantities
    of 1 for .99cents
    > Good Luck!
    > -=Randy Knutson
    > christopher41877 wrote:--- In basicstamps@y..., "southernpost"
    wrote:
    > > I have a DS2E-SL2-DC5V relay and a 2N7000 transistor. This is a
    > DPDT
    > > latching relay with coils rated at 5V DC, 35.9 mA. I manually
    > > connected the relay to the 5V DC supply of the Basic Stamp 2 BOE
    to
    > > test it and it works fine (switches an LED on and off). The
    problem
    > > that I'm having is that the relay doesn't trigger when I use the
    > > 2N7000 transistor. I connected the source pin to ground, the gate
    > pin
    > > to pin 4 of the Basic Stamp and the drain pin to the coil. My
    Basic
    > > Stamp program simply sets pin 4 high and then low with the
    desired
    > > result to drive the transistor to trigger the relay. I'm
    concerned
    > > that I may not have the correct transistor. I am a rookie so I
    > don't
    > > have a lot of test equipment (or knowledge of transistors). I
    need
    > to
    > > make sure that the transistor is will generate 5V DC at 35.9 mA
    or
    > > better. Any help is appreciated.
    >
    > Ok, I am not that experienced to answer this question and I know
    that
    > people that read this can answer it but I'll give it a shot. You
    are
    > using a mosfet transistor when you don't need to. I personally
    don't
    > use them, I use either pnp or npn transistor. You didn't mention a
    > resistor anywhere in the message which could be one problem but
    also
    > you have the source to ground and you are activating it with a low,
    > they are the same potential, so you won't be able to turn it on.
    Try
    > this, if you have one or get one at radio shack, get a 2n4401-it's
    a
    > npn. Then, connect the base to p4 but be sure to put like a 5k
    > resistor inline. Connect the emitter directly to ground and the
    > collector to your relay. This transistor will put out about 130ma,
    > more than you need. I hope this helps.
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@y...
    > from the same email address that you subscribed. Text in the
    Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    >
    >
    >
    >
    >
    > Do You Yahoo!?
    > Yahoo! Finance - Get real-time stock quotes
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2002-08-28 13:15
    The transistor (mosfet) you describe (2n7000) should work in this
    application, however, you are not applying it correctly. Connect +5v to one
    side of coil in relay, the other side of the coil to D on the mosfet. S to
    ground (same as basic stamp) and the gate to the control pin though a 10K
    resistor. The threshold voltage for this mosfet is only .8v. (this is the
    point where the device starts to turn on) so you must go below this level on
    G to turn off. You may not have ground referenced to vss on the stamp or
    you may have enough noise on the control to have above .8volts on the gate.
    If so, you may need an additional resistor (10k) to ground from the control
    pin. It is also good practice to put a diode across the relay contacts
    (cathode to +5vdc) to protect against counter-emf.

    Good luck,
    Jim

    Original Message
    From: Randy Knutson [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=ogUTWpw2ZObL1FJtXd9dKQGiiKz4Qre2MTOvzucLFIB7OWOBcigECYpmUmk7UykgjzpEXluwe7xMhj0]ken_ryder@y...[/url
    Sent: Tuesday, August 27, 2002 5:26 PM
    To: basicstamps@yahoogroups.com
    Subject: Re: [noparse][[/noparse]basicstamps] Re: transistor not triggering relay



    I'm not sure on the specifics of that particular mosfet but to drive many
    mosfets you need to have a gate to source voltage of around 10 volts before
    the mosfet will be fully on. In your case I am thinking that perhaps the
    mosfet isn't being driven correctly (5volts) so full conduction is not
    achieved resulting in insufficient current flowing through the relay coil.
    Try using an NPN transistor and keep your current configuration except note
    that
    emitter = source
    base = gate
    collector = drain
    Also make sure that you have a 10k resistor in series with pin 4 going to
    the base of the NPN transistor. Another very popular transistor is the
    2n2222A which is sold at radio shack in quantities of 1 for .99cents
    Good Luck!
    -=Randy Knutson
    christopher41877 wrote:--- In basicstamps@y..., "southernpost" wrote:
    > I have a DS2E-SL2-DC5V relay and a 2N7000 transistor. This is a
    DPDT
    > latching relay with coils rated at 5V DC, 35.9 mA. I manually
    > connected the relay to the 5V DC supply of the Basic Stamp 2 BOE to
    > test it and it works fine (switches an LED on and off). The problem
    > that I'm having is that the relay doesn't trigger when I use the
    > 2N7000 transistor. I connected the source pin to ground, the gate
    pin
    > to pin 4 of the Basic Stamp and the drain pin to the coil. My Basic
    > Stamp program simply sets pin 4 high and then low with the desired
    > result to drive the transistor to trigger the relay. I'm concerned
    > that I may not have the correct transistor. I am a rookie so I
    don't
    > have a lot of test equipment (or knowledge of transistors). I need
    to
    > make sure that the transistor is will generate 5V DC at 35.9 mA or
    > better. Any help is appreciated.

    Ok, I am not that experienced to answer this question and I know that
    people that read this can answer it but I'll give it a shot. You are
    using a mosfet transistor when you don't need to. I personally don't
    use them, I use either pnp or npn transistor. You didn't mention a
    resistor anywhere in the message which could be one problem but also
    you have the source to ground and you are activating it with a low,
    they are the same potential, so you won't be able to turn it on. Try
    this, if you have one or get one at radio shack, get a 2n4401-it's a
    npn. Then, connect the base to p4 but be sure to put like a 5k
    resistor inline. Connect the emitter directly to ground and the
    collector to your relay. This transistor will put out about 130ma,
    more than you need. I hope this helps.


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/




    Do You Yahoo!?
    Yahoo! Finance - Get real-time stock quotes

    [noparse][[/noparse]Non-text portions of this message have been removed]


    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sign In or Register to comment.