I want to try out an IR transmission to sense distance according to the signal strength, using an IR LED and a photodiode. Therefore I would use an analog input on the Arduino to sense the amplitude of the received signal. However I would send a pulsed signal and on the receiver side I would filter DC to reduce interferences from the ambient light.
I don't think it will work. When you modulate the signal you have to use an amplifier to recover it. That has a gain and the signal saturates. Thus removing any intensity information from the IR signal.
Doesn't it depend on the component used to amplify ?
It depends on the gain of the amplifier, which are controlled by the components. But if you have a gain such that it will not saturate then you have insufficient gain do measure much of a distance.
The other thing that scuppers the idea is that the return signal is far more dependent on the nature of the reflecting surface than the distance it is away.
Grumpy_Mike:
The other thing that scuppers the idea is that the return signal is far more dependent on the nature of the reflecting surface than the distance it is away.
I undestand this but with a specific surface it should work, shouldn't it ?
What do you think of the attached schematics as a basis for the circuit ?
It would be better to use a coherent detector (and perhaps a coherent filter as well) so that the receiver only responds to signals at the modulation frequency. A coherent detector will also convert the signal to DC, making it easier to read from an analog input.
Bear in mind that the signal will decrease with the square of the distance, which will limit the range. If you want to cover a range greater than about 10:1 then you will need to either switch the gain of the amplifier (increasing it at long distances), or adjust the current drive to the IR emitter (increasing it at long distances).
dc42:
It would be better to use a coherent detector (and perhaps a coherent filter as well) so that the receiver only responds to signals at the modulation frequency. A coherent detector will also convert the signal to DC, making it easier to read from an analog input.
That would mean seeking the phase relationship between signals, wouldn't it ?
Do you have an example of code and circuit ?
Bear in mind that the signal will decrease with the square of the distance, which will limit the range. If you want to cover a range greater than about 10:1 then you will need to either switch the gain of the amplifier (increasing it at long distances), or adjust the current drive to the IR emitter (increasing it at long distances).
The distance would be very small (less than 5 cm and maybe even less).