I've got an LM358 based ground fault detector circuit that I've recently revised, and the revision broke it, so far as I can tell.
To make a long story short(er), what it amounts to is using one of the LM358 stages as a comparator has whacky output levels. There's a 5 volt supply, and the inverting input has a 20k/100k voltage divider, for a fixed .833 volt comparison level. When the non-inverting input is 0 volts, I would expect the output to be 0. In fact, it's 4.32 volts. If I make the non-inverting input rise up above the threshold, it goes up to around 4.5 volts.
Now, the old version of the circuit had a 1N4148 diode on the output with a pull-down resistor to ground after that.
What is the diode and pull-down supposed to achieve? Why isn't an LM358 acting as I expect without it?