driving relay

Discussion in 'The Projects Forum' started by egypte, Sep 4, 2013.

  1. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    Hello,

    I'm a beginner in electronics, but somehow I have got to make a circuit to drive a relay. So here it goes

    My goal is to drive a DPDT relay ( 5V, 106 mA ) so I'm able to switch the current direction in an external coil. I'm using a DAQ and a mosfet.(RFD14N05L)

    In order to drive the gate voltage I use the Digital input/output (5V) of the DAQ. When I don't want to switch current direction, the Digital output is off, when I want to swith the current of the coil, I put the Digital output on. (5V)

    The source of the mosfet is connected to the USB ground of the DAQ. See the scheme below.

    The problem is that it doesn't appear to work. When I put the digital output on ( in order to get 5V on the gate ), and I measure it with a multimeter I only get Vgs = 0.3 mV

    also Vds = 5V and Vgd = 4.7V
    So clearly there is a problem somewhere, but I really can't find where... so I thought it was time to get some help.

    [​IMG]http://tinypic.com/r/1zoksw9/5

    [​IMG]
     
    Last edited: Sep 4, 2013
  2. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,523
    Is your DAQ able to source and sink voltage? Or do you need a pull-up to source the voltage out put? A mosfet driver may be needed.
     
  3. crutschow

    Expert

    Mar 14, 2008
    12,991
    3,226
    Do you get 5V out of the DAQ when not connected to the MOSFET?

    If so, try increasing the 1kΩ resistor to 10kΩ.
     
  4. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    Right now it looks like you are trying to use a signal from one presumed isolated circuit to another presumed isolated circuit but they have no common reference point so it can't work. I think you need to incorporate the two circuits; USB ground needs to be connected to your DAQ ground and then put your resistor from gate (D I/O) to USB +5V.

    Before connecting the two grounds, make sure there is no voltage between them.
     
  5. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    Hello,

    I use this one
    http://www.emant.com/pdf/EMANT300Spec.pdf

    When I just test the pins of the Digital IO and the USB GND I get 5V

    Using 2 external power supplies:
    when I put Vgs = 5V on the gate, I get 4 mA.

    When I set 5V on the relay (as a replacement for the 5V USB), I get 0.58V and 9 mA on the power supply while it appears to be current limited. So in order to get the full 5V on the relay, I would need to increase the current to the full 106 mA.

    When I put the gate voltage to 0, the 9mA drops to 0 as it should be I think.
     
    Last edited: Sep 5, 2013
  6. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    I forgot to mention that the current limiting comes from the fact I put a maximum current of 10 mA on the power supply. So it appears thats the "USB circuit" wants to draw too much current to get to 5V as the mosfet drain doesn't give it...
     
  7. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    You aren't giving me any confidence that you've actually connected the two circuits at ground level. It won't work until you do that. USB is capable of at least 500mA, so that isn't your problem.
     
  8. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    Isn't the AGND and USB GND not internally connected then? (the +5V USB and USB GND are also a part of the same DAQ)

    When I measure the voltage difference between AGND and USB GND it is 0 and the potential difference between both and DI/O gives 5V.


    So, should I connect AGND and USB GND then?
     
  9. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    Hello,

    I discovered something by accident.
    When I connected the DI/O with the 5V USB, the switch works as normal. When I put the DI/O off, the switch goes off, when I put it on, the switch goes on..

    In the on state:
    Vds = 10 mV ( as I calculated Vds = Ids*Rds(on) = 0.106*0.1. The gate voltage is only 2.6V, but enough to turn the mosfet on. Voltage over the relais is approximately 5V as it should.


    In the off state
    Vds = 5V, Vgs = 0.3V and voltage over relais = 0V...

    with 450 kOhm I can't get it on, with 100 Ohm the voltage is around the threshold and with 1kOhm it's enough to keep it down when it's off and pull it up when it's on.

    So the only thing that should be changed in this image is that there is now a connection between DI/O and the +5V USB.
    http://tinypic.com/view.php?pic=1zoksw9&s=5

    Can someone shed some light on this?
     
    Last edited: Sep 9, 2013
  10. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    According to the DAC datasheet, your D I/O is probably an open collector output with an 11Kohm internal pullup and 20mA current. you are using your 1Kohm resistor incorrectly as a pulldown; it is in competition with the internal 11Kohm pullup, and is winning. it is pulling the voltage low. That zero resistance connection you've made to +5VUSB is counteracting the badly placed resistor and providing an additional high current pullup and probably putting considerable strain on your DAC and your USB, by sinking all 500mA of what the the USB can put out through the DAC.
     
  11. egypte

    Thread Starter New Member

    Sep 4, 2013
    9
    0
    So I should get rid of the 1KOhm resistor?

    EDIT: I've just deleted the resistor and the connection between the 5V USB and the gate and everything works normal now.

    Thank you.
     
    Last edited: Sep 10, 2013
  12. shortbus

    AAC Fanatic!

    Sep 30, 2009
    4,004
    1,523
    See post #2. :)
     
Loading...