Can any op amp be used as a voltage comparator? Confused about IC741, UA741

Thread Starter

zirconx

Joined Mar 10, 2010
130
I'm trying to turn the analog output from a circuit (the rectified voltage from a current transformer, 0v to 1v or so) into a HIGH/LOW (0v, 3.3v) signal for my raspberry pi. I think this can be done with a voltage comparator. I read an article about doing this with an IC741 voltage comparator. But I can't find that part on ebay, I can only find UA741 op amps. Is that the same thing?

I've built simple circuits, and and am now starting to wrap my head around op amps. Can any op amp be used as a voltage comparator?

Thanks
 

Ian0

Joined Aug 7, 2020
2,677
Can any op amp be used as a voltage comparator?
No.
Most of them can, but some op-amps such as NE5534/NE5532 and OP27/OP37 have back-to-back diodes across the inputs. You can only use them as comparators if there is never more than about half a volt between the inputs.
 

Ian0

Joined Aug 7, 2020
2,677
The LM393 has the same pinout as a dual op-amp.
The LM339 pinout is different from a quad op-amp. All the outputs are at one end. That makes the pcb a lot easier to track than if you were using a quad op-amp as a comparator.
 

crutschow

Joined Mar 14, 2008
27,449
Most of them can, but some op-amps such as NE5534/NE5532 and OP27/OP37 have back-to-back diodes across the inputs. You can only use them as comparators if there is never more than about half a volt between the inputs.
They are useable if there is enough resistance at the inputs to limit the current through the diodes when the voltage difference exceeds a half volt.
 

Ian0

Joined Aug 7, 2020
2,677
They are useable if there is enough resistance at the inputs to limit the current through the diodes when the voltage difference exceeds a half volt.
True, but if you are using a common reference for several comparators, it can really mess it up! It's like having a comparator with a really low input resistance. Best avoided. It's also a lesson in not thinking that all op-amps work the same!
 

Thread Starter

zirconx

Joined Mar 10, 2010
130
In the last 2 days I ordered
10x LMV358P for $5.99
10x LM358 for $0.99
both from Ebay, which is where I get most of my components.

Looks like 1 LM393 from Arrow will cost $6.88. For 10 it's $9.55. On ebay they are $1.97 for 20 of them.

I know they are more likely to be "fakes", on ebay. But so far I haven't had an issue. Maybe there is some other site cheaper than Arrow but more quality components than ebay?
 
Last edited:

Ian0

Joined Aug 7, 2020
2,677
In the last 2 days I ordered
10x LMV358P for $5.99
10x LM358 for $0.99
both from Ebay, which is where I get most of my components.

Looks like 1 LM393 from Arrow will cost $6.88. For 10 it's $9.55. On ebay they are $1.97 for 20 of them.

I know they are more likely to be "fakes", on ebay. But so far I haven't had an issue. Maybe there is some other site cheaper than Arrow but more quality components than ebay?
RS will sell me 20 off LM358 for 8.5p each (US$0.12) including carriage costs, delivered next day; and a single LM393 for 26p.
25 off for 4.1p each. For that price and speed of delivery, why bother with Ebay?

Though I once bought 2SK405 MOSFETs off Ebay to build a retro amplifier design. All the ones that claimed to be NEW were fakes (and Ebay did refund), but when I bought used ones, they were genuine.
 

Audioguru again

Joined Oct 21, 2019
3,318
At Digikey, one LM393N (old style pins) costs $0.91(US and one LM393D (surface mount) costs $0.41US. They sell only high quality new parts.
Electronic parts from ebay are used, fakes or defective.
 
It's funny- people are learning and building electronics using cheapola eBay semi's that rarely work as expected. "Whaaa my project doesn't work, tell me what's wrong".
Assuming your personal time is worth $15/hr and the 20 minutes troubleshooting, how much did you save? Just buy them from Digi-Key or Mouser and have trustworthy parts bins in your lab.
 

neonstrobe

Joined May 15, 2009
165
Also - a current transformer puts out current. It may put out a really high voltage in order to do so. Your rectifier needs to be solidly wired to a load resistor so as to limit the voltage. You are not planning to measure mains current (or higher) are you?
Some CT's have built in resistors. They will limit the output to a rectifier. Preferably you would use one without, as the voltage should overcome the diode forward voltage, but that is the situation to be more careful.
 
Top