IR Proximity

I am posting here because I didn't found anything else this solution...
Since I am starter I want to make a IR Proximity sensor. I have a pna4602m reciver and basic ir diode.
How can I make that if object is near 1 meter from diode it will turn on a led.

Blaz

Can't be done. IR travels at the speed of light as it is light. about 299,792,458 metres per second.

how could i do it then ?

With sound. It's about 343 meters per second.

https://www.virtuabotix.com/product/virtuabotix-ultrasonic-proximity-sensor-arduino/?gclid=CjwKEAjwl7ieBRCK2rCtqcCS7jESJACZKQFKri5AAXc1fAy3H_bE_0h-3INhNtbE5eCJaLC_sYR7cxoCNfLw_wcB

You need to go find a basic physics textbook and think through the problem.

Speed of light is just under 3x10^8 m/s. You're only going 1 m. That takes just under 7 nanoseconds to complete it's journey from the IR emitter to the target and back to the IR sensor.

Compare that to the clock speed of a micro-controller running at 8 Mhz - each clock cycle takes 125 nanoseconds to complete. From a sensing perspective, with respect to Arduino, that would imply that within about 50 meters or so, you're never going to be able to discriminate down to the 1 meter level.

The TSSP4P38 or TSSP58P38 from Vishay could help. details on use in the data sheet via google.

There are also a range of IR proximity sensors from Sharp and others (via ebay).

The approach used is detecting strenght of reflected modulated IR signals(pulses) and the output pulse length is related to the proximity of the object.

IR vs Sound => depends on application

The approach used is detecting strenght of reflected modulated IR signals(pulses) and the output pulse length is related to the proximity of the object.

The problem with this mode is the density of the object. If the density and angle is constant, then OK. However if the objects density is different for each one, or the angle is different, then you will get false readings.

How can I make that if object is near 1 meter from diode it will turn on a led.

Triangulation, like a parallax range finder?
Tricky optics.

@blazy

Given that you are starting out, I have 2 suggestions for you:

1: Spend some time listing the parameters of what you want to do. (eg accuracy - +/- 1mm or +/- 50cms etc; nature of 'object'- box or Human, environment for operation etc etc). This is always an important early step in any project.

1. If I was attempting your project, with the components you currently have available & assuming you are always detecting the same object, my approach would be something like:
• generate a continuous modulated IR signal (600uSecs mark followed by a 1000uSec space) using an arduino, via your IR LED. Hint: Check out the timer1 library for Arduino.
• detect the Length of pulses received by the IR receiver and adjust the current passing through the IR LED until consistently clean pulses are received @ 1m distance or less. Beyond this point you should get noisy pulses.
• Needless to say this will not give you +/- 1mm accuracy.
• You will need to shield the IR LED (with heatshrink or similar tubing) and point the top in the direction of the object. The IR receiver should only get signals that are reflected from the object. If there is no object the IR receiver should not be receiving pulses.
• Some IR receivers automatically stop detecting if a continuous signal is received. If this happens try increasing the duration of the spaces above.
• If that does not work you could try the TSOP4038 from Vishay (or the TSSP4P38 from my earlier post, but behaves differently)
• For a distance of 1m (actually 2x1m, include reflection) I would start the design with a peak current of 20mA or less going through the IR LED and adjust up/down as required. This means you could drive the IR led directly fom an Arduino pin with a series resistor.
• Avoid sources of interference such as direct sunlight & Plasma TVs etc.
• Finally, if i was just starting out, I would try getting individual bits working one at a time and then combine them into a single project later on. Also, I deliberately haven't covered all of the issues you will encounter.

The reason I spent the time writing the above is to encourage you to try. The best learning is by trying things for yourself. If it doesn't work out you will still have learned a lot. Its not always possible to get a perfect solution & sometimes 'close enough is good enough'. If you get anything working do post back & share your experience.