This circuit provides an output voltage when the input voltage is in the range between V1 and V2 determined by the input resistors. Comparators can be made with common operators or they can be the LM339 or equivalent. The supply must be done with a higher voltage than that of the detected range.