Hi everyone, I realize this sounds vague, with very sketchy details, so please bear with me.

Somewhere a long time ago, I'd seen an article on a technique to measure the distance to an obstacle using IR; it was to do with either pic basic or the Stamp, I just can recollect.

Basically, it described a technique wherein you use just one source, and one detector (3 pin demodulator). You begin by modulating the transmitter at its optimum frequency (38 KHz?) and keep transmitting a single character, and keep reading the pings. You then keep reducing the modulation frequency till reliable pings stop. The difference between the ideal frequency and the one at which you no more get a ping would then be a function of the distance.

No amount of Googling has yielded any success.

Does anybody remember this at all?

Would be great if someone has a copy, or a vector to this, folks.

Thanks,

Anand Dhuru