×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

voltage comparator driving an optocoupler rather than EM relay

voltage comparator driving an optocoupler rather than EM relay

voltage comparator driving an optocoupler rather than EM relay

(OP)
I have put together circuits that use an operational amplifier to drive a transistor-relay circuit. If I want to drive a optocoupler could I hook that optocoupler (-) pin right to the opamp output? Effectively, the opamp is driving only 15mA led.
Thanks

RE: voltage comparator driving an optocoupler rather than EM relay

Yes as long as you don't exceed the LEDs current spec.  Otherwise you may need to add a resistor.

You must also not violate the LEDs reverse voltage spec!  You can prevent this with a diode in parallel with the LED.

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
OK! The optocoupler has a current-limiting resistor of 330 ohms, and I supplying +5Vdc. Itsmoked, just a place a general purpose diode across the optocoupler input (really across the LED) with cathode of diode across the anode of LED opto?

RE: voltage comparator driving an optocoupler rather than EM relay

Yes! Just remember that all diodes have a reverse breakdown voltage.  That is if a diode has a PIV of 100 volts and you try to make it block 150V it will "break down" avalanching and will be destroyed.

Now an LED is not a proper diode and so they pay no attention in their design to PIV ratings.  Hence they are usually pretty low.  They may be only 5 volts or so.  If your opamp jams out 15Volts well then ...PIFFT.   However if you opto's LED has a 25V PIV by some freak of nature then you wouldn't need a reverse diode to protect the LED.

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
The comparator will go high - rail to my VCC = 5V. When the opamp goes low = 0v, it will then sink the LED current of 15mA. THe comparator is not going to hurt the opto when it goes high?

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
Hopefully I don't have to start another thread with this question: I am using this comparator, connected in parallel to my analog input of my microcontroller. As I increase my voltage from 0-3Vdc, I want to the comparator to see the same voltage and turn on a relay at (say 1V). So while the uC is accepting the data, the comparator is waiting for the analog input control to be 1V so that it can switch on my opto relay. When connecting the analog input to a ADC of the microcontroller and connecting it to the input of my comparator, do I need to put a buffer between the comparator and analog signal (so that I do not affect the micontroller input)??

RE: voltage comparator driving an optocoupler rather than EM relay

If your rails are only 0V,5V,(I was assuming +/-15),
Then you don't need that extra diode I mentioned.

Often you would want to buffer the signal in a case like this because the comparator input may have feedback that will tweak the analog signal a little.

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
Thanks itsmoked!

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
One last question on this thread. Is it possible to use a comparator IC (i.e. LM393 dual comparator from Fairchild) first stage as a buffer

RE: voltage comparator driving an optocoupler rather than EM relay

Most of the time no!

Because a comparator usually needs hysteresis to work reliably.  Another words, once the comparator has flipped the inputs must reverse back PAST the spot where the flip occurred.  This hysteresis would mess up the linear aspect of a follower.  The LM393 does not appear to provide any hysteresis so they may expect you to provide it externally (with resistors) so you might be able to use one as a unity gain follower.  Try it.

Conversely you will probably have problems with your comparator part of the circuit with the required hysteresis.

RE: voltage comparator driving an optocoupler rather than EM relay

(OP)
If read various application notes on hysteresis and how it's required to prevent oscillation reduce noise created by comparators. Is it as simple as adding (positive feedback) gain of say 10 = 10k resistor in positive terminal and 100k from positive to output? For my application I want to make sure the relay switches on at 1.5V. I have a zener diode as my voltage reference. How do I define say 4-10mV of hysteresis with a known feedback gain?

RE: voltage comparator driving an optocoupler rather than EM relay

Yes that is correct.  Though often the positive feedback resistor is more like 1Mohm.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources