when i connect the proximity sensor to the circuit the reading get unstable an it seems like pulses are missed.
WHICH circuit ... ???

FULL scheme compulsory, as we do not have crystal balls on this forum ...

Alain