Can a CD4078BE drive a SRD-05VDC-SL-C to open and close?

Discussion in 'The Projects Forum' started by MichiganWolverine5974, Jun 10, 2015.

  1. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    I'm using a 8 input NOR Gate (CD4078BE) to control a relay (SRD-05VDC-SL-C). Will this chip drive enough current to control the coil on the relay? I'm using a 24 volt power supply thru a 7805 voltage regulator to VCC on the chip. Then the signals into multiple inputs will be 0 - 5 volts. The input into those chips has a IOH=-13mA.

    If it wont control the relay, how can I get more current to drive the coil on the relay?

    Thank you!!
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    According to it's datasheet, the coil is going to draw 71mA. The NOR gate isn't going to supply near that.

    Drive an NPN transistor through a base resistor (680Ω). The transistor will connect the coil to ground. Don't forget a diode across the coil! Cathode to Vcc.
     
  3. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    Would a pull up resistor from the coils input to Vcc work?
     
  4. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    Where would you put the base resistor? and what type of NPN transistor would be best for my application? And would any diode work well?
     
  5. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    You didn't say which output state should energize the relay. Is the relay energized when any input is high, or when all inputs are low?

    Either way, a CMOS gate cannot supply 70 mA. As noted, you will need a small driver transistor. NOTE - In this application, the transistor acts as a logic inverter, turning your NOR gate into an OR gate. Remember this when determining which type of transistor to use. Depending on which logic polarity you are implementing, you will need either a small NPN (2N4401, 2N2222, 2N3904) or a small PNP (2N4403, 2N2907, 2N3906). Base to something between 680 and 1K, to the gate output. Emitter and Collector connections change depending on which logic polarity you are after.

    Greetings from Ohio.

    ak
     
  6. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    I'll draw a schematic later. But here's a verbal description. The resistor goes between the output of the NOR gate and the base connection of the transistor. The emitter goes to ground and the collector goes to one of the coil connections. The other coil connection goes to the positive of your power supply. The diode, any small power diode, has it's cathode connected to the side of the coil connected to the positive supply; the other side of the diode (anode) goes to the side of the coil connected to the transistor.

    A schematic will show thus better. It's coming.
     
  7. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    Your description covers one of the two possible logic polarities he might want. For the other one, change to a PNP transistor, emitter to Vcc, collector to relay, other end of relay to GND.

    ak
     
  8. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,802
    832
    Exactly, I missed that. But you're correct.

    TS, here is the schematic I promised. Note that AnalogKid's comments apply if you want the reverse logic.
    relay.PNG
     
  9. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    Use a 2n7000 originally intended as TTL/Cmos power interface.
    Max.
     
  10. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    Thank you everyone for your replies. I attached my old schematic with my new schematic. Given the way the relay is set up, one state is always going to be on (depending on the NOR output). So to run at least 71mA current to turn on the coil, what would be the best transistor, resistor, and diode to use?

    I'm not using LEDs as my outputs, I just put them there for testing purposes. I have resistors with them on my actual circuit. Thank you!!!
     
  11. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,515
    2,369
    Original Lit. Here.
    Max.
     
  12. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    Note that the logic polarity of the relay with respect to the inputs is reversed between your two drawings. You can adjust for this by swapping the two switched relay contacts.

    Max is right, a 2N7000 or 2N7002 will do the job and eliminate the base resistor.

    ak
     
  13. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    I have some 2N4401 left over from my last project. Can I use those?

    And is it because of the transistor is why the logic inputs are switched?
     
  14. crutschow

    Expert

    Mar 14, 2008
    12,995
    3,229
    A 2N4401 should work fine.

    A transistor turns on (conducts from collector to emitter) when current is supplied to the base-emitter junction.
    Thus, for the circuit in Post #8, the relay is energized when the 4078 output is high.

    The logic in your two circuits in Post #10 is the same.
    In both cases the relay is energized with the 4078 output is high.
    I don't know why AnalogKid said otherwise in Post #12. :confused:

    Note that the LED polarity is incorrect in your schematic if the 24V is positive.
    LEDs must be forward biased to light.

    The diode across the relay can be just about any general purpose type. A common one is a 1N4148.
     
    MichiganWolverine5974 likes this.
  15. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,523
    1,247
    Missed the change in the relay coil power connection. oops.

    ak
     
    MichiganWolverine5974 likes this.
  16. MichiganWolverine5974

    Thread Starter Member

    May 13, 2015
    63
    4
    Thanks for your help everyone!!!
     
Loading...