I want to use a comparator (powered off 3 V) to monitor a voltage supply going up to 25 V (where 3 V is the threshold trigger). I plan on using a potential divider to reduce the monitored voltage, such that when it's at 25 V the comparator will only 'see' 3 V. The trouble I'm having is that when I add some hysteresis, I don't get the voltage threshold operation I'm expecting due to the interaction of the resistors.
I've tried following the app design note in the MAX985 datasheet page 7. So, if I were to provide Vin through a potential divider (where 25 V = 3 V out of the pot div and 3 V = 360 mV). Is this possible because I'm struggling to see this working properly when I simulate? To calculate the hysteresis resistors, should I go for a Vref of 0.3V and Vthr of 0.36V with hysteresis of about 50 mV? Or will the interaction of my pot div and hysteresis resistors cause problems because of the serial and parallel relationship of the output going from 3 V to GND and vice-versa?
- - - Updated - - -
Or should I just put the feedback on the reference pin? Would I still be able to get inverting and non-inverting functionality that way too?
- - - Updated - - -
Any easy to follow tutorials for calculating that?
Are you using a comparator, specifically? Whose output only sinks current? It may be tricky to get hysteresis action from it. It is tricky enough to get it from an op amp which both sinks and sources current.
Try dropping 20V or so via a series zener diode. This has the effect of exaggerating the range between upper and lower triggers.
While this is true for comparators with open collector outputs...
* the use of an appropriare pull up resistor enables you to calculate the hysteresis (resistor).
* there are a lot of comparators with push pull outputs. Even a lot have rail to rail outputs.
A cheap one ic MCP6561. But there are many others. Use selection guides of your distributors or manufacturers.