I am working on a project and i want to make the one comparator compare 2 different voltages, say for example 1.5V and 2.5V. I have to use only one light sensor for the different voltages. Please help.
Your explanation is not accurate.
Since you gave your explanation after Barry, I think you don't want an hysteresis, so
please can you describe your suystem fully?
What about 2.6V? 2.4V? etc...
What would happen if you input a signal increasing from 0 to 3V?
Same question with a signal from 3V to 0?
Hi, here is a way to use an op amp as a comparator to drive an led, with hysteresis.
The scope traces show a signal varying between 1.3 and 2.7V.
The led turns on when the signal goes above 2.5V.
It turns off when the signal goes below 1.5V.
The potentiometers allow you to adjust to your desired range of operation.
You can use a comparator if you wish, by adding a component or two to provide positive volts to the led.