The circuit shown was found in the National Semiconductor's Linear Applications Handbook of 1994. The circuit uses a LM139 comparator or series equivalent.