I find I need a comparator, because I have a problem with an optical sensor triggering multiple interrupts, like this question:


However, as the market for electronics have changed, there is no shop just around the corner, only over 100km away, and I'm impatient; I'm looking in my drawers, and found 2 types of opamps: a XR082 and a MC34002

These have a voltage input of +/- 15V. Would they work as a comparator if I only feed them the Arduino voltage of 3.3V, only positive, no negative, i.e. only a tenth of the maximum voltage?

I didn't think this ought to give any problems, and that the ESP8266 would have a hysteresis in the input, but appearently this is not the case Input to ESP8266 D3 Or my cheap pocket scope can't handle this.

This is measured directly on the input pin of the ESP8266

I'm using this circuit (Never mind if the diode is drawn the wrong way); using the internal pullup in the ESP8266.

enter image description here

  • 2
    \$\begingroup\$ Have you looked for the datasheet of these devices and verified they work at all with a 0/+3.3V supply? Also look whether they have small enough difference between max in and output swing and supply voltage! \$\endgroup\$ – Marcus Müller Jan 6 at 23:16
  • \$\begingroup\$ Hey, and unless you're on an island (which, given that I guess you're in Denmark isn't as unlikely), many distributors do overnight shipping by default. My parcels take one to two workdays to arrive when I order from arrow or farnell or mouser (for the last two, verify you're not ordering from US stock). \$\endgroup\$ – Marcus Müller Jan 6 at 23:17
  • \$\begingroup\$ Well, it's not only time, it's also the postage which would be many times the price of a single opamp. But hey, I could just dust off my breadboard and try... Nothing is going to blow up. \$\endgroup\$ – Lenne Jan 6 at 23:24
  • \$\begingroup\$ arrow.com does free overnight delivery without minimum order; I'd recommend not abusing that. No excuses ;) get good parts! \$\endgroup\$ – Marcus Müller Jan 6 at 23:25
  • \$\begingroup\$ It's worth noting that a comparator and an op-amp are not actually the same part (not in theory, but definitely in practice). Comparators need special attention to parasitic capacitance between the output and input, because the positive feedback can easily make them unstable. \$\endgroup\$ – Jeffrey Nichols Jan 6 at 23:25

The XR082 has a datasheet that suggests that with a 30 V (-15 V to +15V) supply voltage, you reliably get a 24 V output peak-to-peak swing.

So, that's a whopping 6 V less than the supply voltage range. I doubt it will do anything useful at a supply voltage of 3.3 V.

The MC34002 (datasheet linked is probably even from a good specimen) is just as obsolete: it has exactly the same output swing for a +-15 V supply (but the datasheet at least mentions the load to not be stronger than 1 kΩ... puh, that's not a strong load).

So, my guess is neither of these Opamps will work with a supply like that. They most definitely were never designed for such.

Currently, arrow.com offers free shipping, and in my experience things reach their destination the next day. Since you probably want some passives to go with your opamps, this would be a great opportunity to restock a bit with post-1980s silicon!

  • \$\begingroup\$ Well, the aerometer is also from around 1980, the opamps from 1983 ;-) They were used for "Hifi" phono amps and active crossovers, \$\endgroup\$ – Lenne Jan 6 at 23:53
  • \$\begingroup\$ :) Yeah, and that's where they really excelled; 1970-80s amps tend to have multiple dedicated transformers to generate the multiple voltages needed for solid state electronics of the day! \$\endgroup\$ – Marcus Müller Jan 6 at 23:57
  • \$\begingroup\$ The crossover were used for my Phase Linear 400 and 700, which just got refurbished... I think I also have a drawer of CD40... CMOS lying around somewhere. As they should be able to work at 3V, I could probably wire one as a Schmitt-trigger with hysteresis. ;-) \$\endgroup\$ – Lenne Jan 7 at 0:03
  • \$\begingroup\$ TI makes a OP357 opamp for a range of 2.5V to 5.5V. Could be a bit pricey though. \$\endgroup\$ – Sparky256 Jan 7 at 0:03
  • \$\begingroup\$ LM311N goes down to 3.5V, I could run it at 5V, as it have an open collector. Price around €1,postage €7 :-( \$\endgroup\$ – Lenne Jan 7 at 0:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.