Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

voltage comparator driving an optocoupler rather than EM relay

Status
Not open for further replies.

fuseshut

Electrical
Oct 16, 2005
76
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
 
Replies continue below

Recommended for you

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.
 
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?
 
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.
 
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?
 
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)??
 
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.
 
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
 
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.
 
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?
 
Yes that is correct. Though often the positive feedback resistor is more like 1Mohm.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor