Tips on choosing infrared sensors and receivers

Excuse me, I’m working on a project where as a part of it I am trying to make a system a bit similar to the IR flashes used by TV remotes. The thing is I need to read not only a string of data (probably just below 32 bits as my current plans go) but also get an flux (I’m not worried about exact W/m^2 just having enough data to guess at range once I’ve done some calibration) value for how bright the infrared is AND I need it to not be sensitive to reflections off things in the environment (mostly 3d printed PLA plastic shapes of various sizes and colours) but to only detect signals and intensity when there is a direct line of sight from the IR LED to the IR receiver. I’m thinking I’ll need to communicate a 32 bit signal between 10 and 20 times per second, and would like to make the time for the 32 bits to be sent as short as possible so that the overall proportion of time for which flashing codes are present is minimised. I have looked a bit about NEC, sony, philips and other common protocols for infrared data transfer and while I’m not sure which to use yet, or if I might end up with something custom but similar think I can get an arduino to control the LED that transmits and another to use interrupts to read the detector both coded with whatever protocol I decide upon. their will likely be some noise in the environment if from nothing else than ceiling lights which will leak into the IR a bit. I will be operating at ranges between the LED and detector in the region from perhaps 1.5m down to about 5cm.

I’ve already picked a brand of LED, I don’t have much choice in this as it was the only sort I could find with a small enough size to fit in the place it needs mounting. It emits at 950nm.

So I’m now a little torn on sensors and what type to pick. One option is some form of simple IR phototransistor, this can get intensity and if I gather some data on the typical intensities to expect after reflection I can program the receiving arduino to ignore signals for which the analogue input value is this low. The issue here is that any noise in the environment will mess things up, and the range could be quite limited. The other option is a device such as a TSOP382 (datasheet at ), but this won’t give me an intensity. I could have the receiving arduino connected to a phototransistor as well and use that for intensity readings while taking the data readings through the TSOP382, but also I know that using something like a TSOP382 requires the transmitted signal to be modulated, so modulation might make reading with the phototransistor a little trickier. I worry that with the kinds of gain control something like the TSOP382 contains it might pick up reflected signals far too easily. I could also consider some sort of modulation but use phototransistors solely at the receiving end and no TSOP type device, then apply something a little like a fourier transform to try to identify the modulated signal from amid background noise but I’m not sure how easily this could be done while the arduino is also trying to receive the data.

Can anyone suggest what sort of sensor device I might be best with, and which if any of the methods I am thinking of could be most suitable, it will need to be quite cheap (under £1 per unit, ideally under 50p) because once I’ve got one working I need to scale this up a bit and make quite a lot of these.


BTW: if anyone knows about how reflective PLA 3d printed plastic tends to be for 960nm IR, or how thick a piece is needed to block transmission such information would be quite welcome.

You have quite a lot of specifications.

From my (very limited) experience with optical senors, I can only tell you that in practice some do not follow the behavior one can see in the tutorials from the internet. Can be lot of causes, for instance variation by manufacturer (in case of modules), differences in electronic components, insufficient info or wrong assumptions in the projects from the internet etc.

Therefore I adopted the "procure one & check one" strategy. Also, I only look into a few parameters and ask only about the most fuzzy/critical ones.

Bear in mind that Arduino is a learning platform, not an industrial one.

I've been thinking about this and wondering if anyone might be able to point me to a circuit diagram of something similar to the various circuitry included within the TSOP382. I was thinking that if I could find a diagram of how the input, automatic gain control, band pass, demodulator and control circuit of the TSOP work then I might be able to build something like it on veroboard, the advantage being that I could then adjust components to make it less sensitive if necessary (hence ensuring it ignores reflected light) and I could get an analogue intensity level out from it rather than just a true of false. I would think I could probably get an analogue level corresponding to the intensity specifically of modulated 38KHz (or whatever frequency I preferred if I adjusted other components) light being seen. can anyone point me towards a clearly labelled circuit diagram of either the circuitry in a TSOP382 or of cruder circuitry serving roughly the same purpose.

Thank you

I need it to not be sensitive to reflections off things in the environment ... but to only detect signals and intensity when there is a direct line of sight from the IR LED to the IR receiver

The only possibility is to have the detector pointing directly at the emitter, and equipped with a tube or lens to reduce the detector cone of vision.

Guaranteed line of sight is, I'm afraid, not an option. What I'm wanting here is to transfer data by infrared but only receive it when the line of sight condition is met. The reason I hope to avoid reflections is because they could cause confusion and allow the passing of data when the detector is not in line of sight of the emitter, which I don't want. Reflections will always be much weaker than direct light, so I should be able to avoid them as long as I can set (and tinker with) a minimum sensitivity on the detector. That's why I'm wondering what the circuitry inside those TSOP devices actually is, because if I can build something similar I should be able to modify it where necessary. Any tips for how I could go about finding diagrams of it or similar circuits?