IR sensor started flashing

Hi guys,
so i built digital sensors for my linefollowing robot. it´s the same schematic as on the picture but i´m not using cny70. it was working fine. on the black line LED was turned off and on white was turned on. since one moment all sensors stoped working properly. on white LED in ON but on black led starts blinking. it’s very fast blinking. i triedd to recalibrate but nothing =(. it worked before so i don’t know what can be problem. can anyone help me, please?

parts that i’m using:
lm358 (comaparator)
sfh203 (phototranzistor)
some IR LEDs


My guess is that the light from the LED is leaking into the light sensor. When it detects 'dark' the LED comes on an enough light gets into the sensor that it then detects 'light'. Try adjusting the sensitivity.

thanks for reply but LEDs are on top side of PCB and phototransistors are on bottom and they even have filter.

Maybe you just need a decoupling cap between/near 8 and 4 of the LM358.

thanks for help but i fixed it different way. i connected one pin of capacitor to output of comaparator and second pin to ground. now it works fine. :smiley: