How can I make a simple IR proximity sensor?

Hello everyone,
I am attempting a project and I need to make my own IR proximity sensor because I am short of space.
How would I go about making my own with a IR led and receiver and integrating with an ATtiny85? What code would I need to use?

The code will depend ENTIRELY on which IR receiver you choose.

Paul

I am attempting a project and I need to make my own IR proximity sensor because I am short of space.

I doubt that you can save space making your own sensor compared to the commercially available sensors. It might be an academic challenge to build your own but never expect to save space or money doing it.

Perhaps if you explained just how "short of space" you are, and what it is you want to detect, someone could give the benefit of their experience and suggest a sensor, or at least a vendor.

What does this mean:

integrating with an ATtiny85

Do you need to physically glue the sensor on the back of it or what?

Vishay's VCNL3020 is surface mount and 5mm x 2mm x 1mm deep: you won't roll your own that small, I'd say.

You can't make anything smaller than the Sharp proximity sensor.

Consider also the Pololu Lidar range finders