Question:

5v Relay Driver?

by  |  earlier

0 LIKES UnLike

Hi, I want to use the output of a LM339 comparator to drive a 5V 130 ohm relay.

I tried using a 2N3904 transistor to amplify it doesnt seem to work. The connection as follows:

+5v to relay coil & return connection to collector of 2N3904 " protection diode parallel to the ckt" Base is connected to the o/p of the comparator & emitter to ground.

Could any one please what I'm doing wrong here ?

Thanks

 Tags:

   Report

4 ANSWERS


  1. The problem is that you put the load (relay) in the collector path. That means, the 2N3904 is acting as a voltage amplifier, and if you haven't even got a resistor between LM339 output and base of 2N3904, the current load could get too much for the LM339.

    What you need is a current "amplifier" setting.

    Put the collector directly on +5V, and the relay to the emitter and to ground. In this case, no resistor in the base is necessary. In the unlikely event that this is still not enough, then you need a "Darlington" arrangement.

    Also make sure the protection diode is correctly polarised, in this case, + to emitter.

    Also, have you added the pull-up resistor (typically 3.3kΩ) from the LM339 output to +5V?


  2. Do you have a pull up resistor on the output of the LM339 (base of your transistor) ? the comparator is an open collector device, so it will not turn on an NPN transistor by itself.  

    The National Semiconductor data sheet has an application hint using a 10KΩ pull up with a 2N2222,  you might start with a 10K, but one data sheet I found for the 2N3904 shows a minimum gain that is not all that high, though the max gain is pretty high, depending on the particular sample you have you might want less than 10K, the 339 can sink at least 6ma, so a 3K or so should be safe.

  3. Edit:  OK you need to do a bit of diagnosis.

    Disconnect the base of the 2N3904 and apply your 5v supply to the circuit with the base open circuit.  Is the relay energized? if so you've either fried the transistor or got the connections wrong.  

    If it isn't energized, check that you can get it to operate by touching a bit of wire from the collector to ground (supply 0v).  If that doesn't work you've either got a dead relay or a dead diode.  If it's the diode, make sure that you didn't kill it by connecting it the wrong way round!

    If that works try connecting a 4.7kohm resistor from the base to +5 volt supply.  If that doesn't operate the relay then again, you either have a fried transistor or you've got the connections wrong.

    You need to get this bit working before you start fiddling about with the rest of the circuit

    I seem to think that the LM339 output is an open collector output.  You'll need a pull-up resistor  (4k7?) from the o/p to +5v.

  4. I real simple thing to check for is that the diode connected across the relay coil is correctly  biased.   It is supposed to be reversed biased  with respect to Vcc (The cathode of the diode should be connected to the +5 Vcc side of the relay).   If connected incorrectly it would be shorting out the relay coil when the transistor is conducting.   A simple test is to temporarily remove the diode and see if it works.
You're reading: 5v Relay Driver?

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.