IR sensor

Hi, currently I am building a mcu controlled racing car and I am using IR sensor and DC motor in my project.
I am thinking of using the PR4(DIY Project) idea (using LM324 comparator) to supply digital logic signal to my mcu from the IR sensor.
But I have some problems regarding to the comparator.
Basically, I have tested the comparator circuit using LED as the comparator output, the logic works but i have a problem here, from what I know when the Vref- is greater than Vref+, the output of the comparator should be 0V and vice versa...but this logic is applicable only when the difference is big enough. As an illustration, if my Vref- is 4.5V, the output of the comparator will only become 0V when my Vref+ is less than around 3.9V. I would like to know why the comparator do not work for 4.1V, 4.2V or 4.3V since they are also less than 4.5V??? Is this the nature characteristic of LM324?? If yes, I would like to ask is there any other comparators which are more precise???
Thanks a lot...
I am thinking of using the PR4(DIY Project) idea (using LM324 comparator) to supply digital logic signal to my mcu from the IR sensor.
But I have some problems regarding to the comparator.
Basically, I have tested the comparator circuit using LED as the comparator output, the logic works but i have a problem here, from what I know when the Vref- is greater than Vref+, the output of the comparator should be 0V and vice versa...but this logic is applicable only when the difference is big enough. As an illustration, if my Vref- is 4.5V, the output of the comparator will only become 0V when my Vref+ is less than around 3.9V. I would like to know why the comparator do not work for 4.1V, 4.2V or 4.3V since they are also less than 4.5V??? Is this the nature characteristic of LM324?? If yes, I would like to ask is there any other comparators which are more precise???
Thanks a lot...