Welcome all. In circuit I currently work on I need to create threshold detection. I have signal that I compare to preset value of about 2V (2V to sample against steeper slope). I am currently using LT032. Picture “lt032_threshold_comparator_1” shows result of it. However, since I want to connect output of comparator to Arduino, I can not have negative value. What would be best solution in order to still use LT032? I tried connecting LT032 op-amp to positive supply and GND only. However, results of it are far from desirable. Picture “comparator 2-2” shows result of single rail supply to op-amp. As much as it behaves in similar way however ti has output permanently high when + input signals is equal to zero. Is there any way I could achieve it without any extra components?
You could just feed the output of the comparator through a diode and then a voltage divider to give a 0 or 5v signal to the Arduino.
Thank you Sir it workes perfectly!
If you’re just cleaning up what is a digital signal with poor rise and fall times, you can avoid the extra components of a comparator by using a simple Schmitt trigger input logic gate.
The 74HC14 has been used forever for this application, single gate chips are available in the SOT-353 and even smaller BGA packages these days. Example: 74LVC1G14SE-7
What arduino do you have? Uno, mega, nano etc has an embedded comparator.
Hi, See [Popular-ICs - ArduinoInfo](https://arduinoinfo.mywikis.net/wiki/Popular-
ICs#LM393_2x_comparator)
This is a nice 5V single supply comparator. Some circuits / info on that page also...
OP's pictures:
- The device used is TL032 (the same typo as in your previous post).
- Op amps are not comparators. While they may be used for this task they are not designed for this purpose and will give poor results (such as slow response time).
- Arduino Uno has already a comparator built in. Probably you don't need any extra part for this task.
Yes, don't get into the bad habit of using opamps as comparators, some have back-to-back diodes across
the inputs, most are really slow to recover from saturation, and some just fry if you do it. Just note
that most comparators have open-collector logic outputs.