Hi,

You know when you have turned on the LED, so you know technically when to check for a (0) in your app. So the frequency doesn't make any sense. Now there can be two conditions :

1. The LED is ON and you sense it via the photo

2. The LED is not ON still you sense by the photo (ambient light)

Use IR Filter to obviate the 2nd Issue now say you find the photo on against a LED ON then check it in a loop:

Turn off the LED and the photo should be OFF if not then ambient light (not likely if taken care of)

Turn On the LED and check again , do this turn on-off thing in a loop and if the condition satisfies reset your internal "off" counter. If you detect no object then turn off the TRIAC after the specified delay has elapsed.

You won't be doing Phase Angle Control I suppose so should not be very complicated. If doing a phase angle control then a little bit more complex. Choose the zero cross to set your fire angle and object detection. Cause anyway you would be firing the TRIAC a little later...

P.S. - For a cheap IR filter for your test , expose a colour film for about a minute in normal fluroscent light develop it and the black negative is your I.R. Filter. Read somewhere on the web never tested.