Close

Comparator with hysteresis

A project log for Ink and paper MCU programmer

Solving the egg and chicken problem with paper, leds and phototransistors

ftreganftregan 11/19/2016 at 17:521 Comment

I found a documentationfrom TI about comparators with hysteresis. (http://www.ti.com/lit/ug/tidu020a/tidu020a.pdf). This combines a schmitt trigger (clean fast and clean transition) with a comparator (output switch does not need to occure at 5V/2, I can center it on the mean ouput of my diode.


I found a simulator on http://www.falstad.com/circuit/index.html and made a test :
The first AC voltage is noise (500Hz -+250mV), the second one is signal (2V DC +- 60 Hz 500mV)

The AOP is set with asymetrical power supply (U- = 0V, U+ = 5V), the 200 and 300 ohm resistor generate the voltage at which the AOP will switch its output (5V * 200 / (200+300) = 2V), then some positiv feedback add hysteresis for a clean signal. Since the feedback is 0 to 5V and not -5V to +5V, this creates an asymetry and the low state is shorter than the high state. This can be compensated by lowering the 200kR, but I'm not sure it will cause trouble in my case. My signal seems to have few noise, I can also raise the feedback resistor to 1MOhm to reduce the effect.

Since the MCU will have a very high input impedance, it might be needed to add a resistor from the AOP output to the ground, as shown at the end of the page here : https://www.maximintegrated.com/en/app-notes/index.mvp/id/3616

I need to by an oscilloscope :)

Discussions

Yann Guidon / YGDES wrote 11/19/2016 at 18:50 point

Life is way better with a good oscilloscope ;-)

  Are you sure? yes | no