Connect with us

neg voltage relay driver (for an idiot)

Discussion in 'Electronic Basics' started by [email protected], Aug 27, 2005.

Scroll to continue with content
  1. Guest

    Ok. All they had at the RS I went to was 555's. The web site said
    they had 339's. I, of course, saw your post after I got back, and I
    was in a hurry so I just grabbed the 555's because they are pretty
    useful for all kinds of stuff.

    I know a 555 can be used as a comparator, can I swap that in instead of
    the comparators you spec'd? They can source a lot of current, so that
    could be a help. I could find a configuration out there I'm sure for a
    555 comparator implementation.

    Thanks again. Deciphering these circuits and knowing the application
    is helping me learn a lot about this stuff.

  2. Guest


    I decided to try a TL072 for the comparator, since they are in abundant
    supply at my studio, as the console is full of them.

    First of all, let me thank you again, John, for all the help and
    direction in this endeavor.

    It does sort of work. I had to use 15k resistors instead of 10's,
    maybe that is why. I tried 33k in place of 20k also. I did not use
    the pull up resistors on the opamp output.

    It works in that output 1 goes high when +24VDC is present, and output
    2 goes high when 0VDC == GND is present, but output 1 goes high in both

    This could be ok, since I could put relay 1's power leads through an
    extra set of contacts on relay 2, thus disabling relay 1 when relay 2

    Maybe this is what was supposed to happen? If so, I can totally work
    with it, but I wanted to see if I did something wrong.

    Reading with a meter, pin 1 on the opamp goes to ~24V on both states,
    pin 5 goes to 24V on 0VDC==GND.

    Any more suggestions?

  3. John Fields

    John Fields Guest

  4. Guest

    Thanks John.

    Did you see my other post with my results using a TL072? There was a
    little strangeness I though you might have some insight into...

  5. John Fields

    John Fields Guest

    That's because the TL072 (as well as the TL082 I suggested in error)
    aren't rail-to-rail output opamps, so when their outputs are
    supposed to go to 0V, they can actually be a couple of volts above
    ground. If they can source enough current under those conditions,
    they can keep the relay drivers turned on. It's iffy, so I wouldn't
    try the relay inhibit scheme you mention next, because you can't
    really tell which relay is going to stay on and which one isn't.
    No. If it's not rock-solid, predictable, and reproducible, it's no
    I don't know what's up with that, unless you made a wiring error.
    Email me with a physical address and I'll send you a couple of

    Or, if you want something that can drive a relay directly, try a
    Linear Technology LT1017.,C1,C1154,C1004,C1013,P1227,D1268

    They offer on-line ordering or maybe you can talk them into a
    sample? and do this:

    | | | |K |
    | | | [DIODE] [COIL]
    | | | | |
    [100.0k] [10.0k] | +-------+
    | | | |
    | +----|-\ |
    | | | >--+
    | |
    | |
    | |
    | | +24
    | [20.0k] |
    | | +-------+
    | | |K |
    | | [DIODE] [COIL]
    | | | |
    | | +-------+
    | | |
    +-------------|-\ |
    | | | >--+
    | +----|+/LT1017
    [100.0k] | |
    | [10.0k] |
    | | |

    Also, I believe an LM311 can drive a relay directly. Check
    National's site for a data sheet and app notes and samples.

    Also, Mouser sells onesies and Jameco does too...
  6. Guest

    All I meant to show by my meter readings was that both go high for

    The relays were both turning on all the time at first. The idle output
    voltage was about 1.3V. I just used a much bigger resistor before the
    relay driver and that apparently dropped in current enough to not turn
    on. They are very low current relays.

    It really is quite predictable, it's just that the side triggered by
    +24V is goes high in both states, at the opamp outputs.

    I can get the radio shack comparator tomorrow and ground the extra pins
    as you suggested.

    Thanks for the offer to send the chip. I wouldn't want to trouble you
    more than I already have been with all my questions!

  7. John Fields

    John Fields Guest

    But it's not _supposed_ to, and therein lies the problem!
    OK. One other thing you might want to consider is how much current
    you need to hit the driver with to turn on the relay. A good rule
    of thumb is to force the driver to have a gain of 10, and you do
    that by determining how much collector current it needs to supply,
    and then forcing 1/10th of that current into the base of the driver.

    In your case, the collector current is the relay coil current, so
    what you would do would be to take one tenth of that current and
    divide it into the difference between the supply voltage and the
    driver's base-to-emitter saturation voltage to get the value of the
    comparator's output pullup resistor. For example if the relay coil
    current was, say, 10mA, then the current into the driver would be
    1mA, and the value of the pullup would be:

    Vcc - Vbe(sat) 24V - 1V
    R = --------------- = ---------- = 23000 ohms
    Ib 1E-3A

    22k is a standard 5% value, and that would be fine.
  8. Guest

    I had originally calculated the resistor value as 40k or so, using a
    similar formula that derives from the same thing. It is a pretty
    sensitive relay, maybe 6mA required I think.

    Unfortunately, with the original driver circuit, this was still enough
    base current to collapse the power supply. It seemed weak to me, but
    raising the value to 80k+ got it working predictably. I just raised
    the resistors a few times until the voltage would hold up.

    Shouldn't I be able to put a meter on the comparator outputs and read
    the outputs going high when the corresponding voltage appears at Vin?
    The relay driver can be left out until later, correct?

  9. John Fields

    John Fields Guest

    Yes. With 24V on Vin, the output of the top comparator should be
    high and the output of the bottom one should be low.

    With 0V on Vin, the output of the top one should be low and the
    output of the bottom one high.

    With nothing on Vin the comparator outputs should both be low.

    Notice, though, that with a TL071 in there, the outputs won't go to
    zero volts, and that's where the problem lies. That is, the outputs
    go high enough above zero volts to turn on the drivers unless you
    "starve" their inputs by increasing the value of the base current
    limiting resistor to the point where the transistors aren't passing
    enough current through the relay to turn it on. The problem with
    that method is that you're running the transistor wide open and
    subjecting its output to the vagaries of temperature and just about
    everything else you can imagine which can change its gain. For
    instance, the first time you power up the circuit both relays might
    be off, but after a while you might find that you can't turn off one
    of the relays. Possibly becuse it warmed up a little and its gain
    increased, allowing its quiescent "OFF" base current keep it turned
    on. The right way to do it is to make sure you use a device with an
    output voltage less than the "ON" threshold of the driver
    transistor. You could also use a voltage divider on the output of
    the TL071, and make sure that with the worst case voltage out, when
    it's low, the voltage into the driver won't be high enough to turn
    it on.
  10. Guest

    Ok. So the TL071 could work with a voltage divider calculated to go
    near to zero from the TL071's offset voltage.

    However, that doesn't explain why both cmprtr outputs are going high
    when Vin is 0V. Could it be because I am using 15k's instead of 10k?
    I've checked the wiring about 10 times, but I will check it again. Now
    I'm at home and I think I have some 10k's here, or I could pick some up

    Could the 0V input actually have a small voltage against ground,
    resulting in a small positive potential to ground? would that even
    turn on the top relay, were it the case?

  11. John Fields

    John Fields Guest

    After looking at the data sheet for the TL071, I found that they
    don't have rail-to-rail inputs (mea culpa for making that asumption)
    but, rather, have an input common mode range of +/- 11V with a +/-
    15V supply, which means that you have to stay 4V away from the rails
    in order to have the thing work right. With a single 24V supply,
    that means (I assume) that both sets of inputs should be between 4V
    and 20V. The reference divider satisfies that requirement since its
    high output is at +18V and its low output at +6V, but if Vin is
    being fed into the working divider from a low impedance source, then
    its output will go very close to the rails when Vin is either at 24V
    or 0V. The easy way to fix that is to connect a series resistor
    between Vin and the input to the working divider, but we need to
    know what the source impedance of Vin looks like in order to
    calculate the value of the resistance.

    If you could set Vin to +24V and then then connect it to the
    ungrounded ends of, first, a grounded 100k ohm resistor, second, a
    grounded 10k ohm resistor, and third, a grounded 1k ohm resistor,
    then measure and post the voltages read across the resistors I can
    show you how to calculate the value of that series resistor if you
    don't already know how.
  12. Guest

    John, I rebuilt th circuit with the spec'd comparator and it works
    perfectly. A Professional Circuit, indeed!

    Thanks a lot for putting in all the time to help me with this.
    Especially all the time fooling around with alternative designs when
    the original one was perfect.


  13. John Fields

    John Fields Guest

  14. Jasen Betts

    Jasen Betts Guest

    what about an LM339 instead, it's nearly twice the size.
    but should be dirt cheap and fairly easy to find,,,

  15. John Fields

    John Fields Guest

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day