I'm trying to find the easiest way to interface between an Arduino IR receiver and an IR flashlight.

Yesterday I learned a lot from a question: Can Arduino IR Recievers Detect Signals from IR Flashlights? Basically, the moral of the story from that was, at least with that particular Arduino IR receiver, it expects a modulated frequency in the IR signal. That means that remotes can work well with such receivers. On the other hand the IR flashlight would not, because it is not modulated.

Since then, I have been thinking about the best next step to tackle the problem. I now turn my interest to modifying the Arduino module. Not only do I believe reworking the IR flashlight may be more difficult in comparison, but also I need to keep the IR flashlight's signal intact.

Question: Is there any hope for modifying an Arduino IR receiver module to capture unmodulated IR? Or perhaps even better, is there an off-the-shelf solution that could work for me?

Further Clarification

  • Signal: I need to work with an unmodulated signal, the IR flashlight's IR must remain on and uninterrupted. it has beam mode and flood mode, ideally the solution would be robust to both
  • Range: I would like it to be sensitive to at least 10 yds, ideally much further
  • Environment: I have a night-time environment in mind, so the ambient IR should be minimal, hopefully only the IR flashlight will be detected
  • Application: For the moment, this is nothing too fancy, I would just like to have a green LED to light up if the module is hit by my flashlight's IR
  • Duplicate Distinction: allow me to explain my rationale. The prior post I asked about the proof of concept. In this post the focus of the question was on implementation and hardware/software selection and modification. While the subject matter of the two posts are identical, the scope of the inquiry is different. After I got the community's feedback about the first question, I was able to contemplate and think on how to approach the problem with a better understanding of the underlying principles. At least in my mind, each post served a distinct purpose. Perhaps if I had combined them into one question it would be more concise, but given all the new material (to me) that has unfolded in this discussion, I probably would have butchered the terminology/physics to even phrase a question that wasn't really confusing. I decided to err on the side of safety and take it step by step and only ask a specific question once I was confident that I knew how to formulate that question in a clear and scientific way.
  • \$\begingroup\$ Arduino IR receiver module - can you be more specific about this module? Like a part number? There aren't really "Arduino" IR modules. The Arduino is basically a microprocessor on a board. There are not specific modules that work with the Arduino, but not with other microprocessors. \$\endgroup\$ – Nick Gammon Nov 25 '17 at 6:12
  • \$\begingroup\$ So you want to make something that is made to be sensitive to particluar signals to be sensitive to everything which makes the whole modulation worthless. Hmmmm...... why...... not just do it correctly and modulate the source? That is by far easier and the correct way of doing it. - If your car keeps driving to the right where there is no road, do you A) make the road go right or just make more road to the right, or do you B) stop turning right? You are trying to do A) here. Not clever at all. \$\endgroup\$ – Harry Svensson Nov 25 '17 at 10:23
  • \$\begingroup\$ @HarrySvensson Well, when you put it that way, yea. Though I tried to make clear in the post I actually am only interested in the unmodulated signal of the IR flashlight at night. So whatever can help me achieve that will do. I thought it would be easier/cheaper to use or slightly modify something that was already in the arduino ecosystem, but now we concluded that's the wrong approach afterall. \$\endgroup\$ – Arash Howaida Nov 25 '17 at 11:49
  • \$\begingroup\$ @ArashHowaida What do you think the receiver will output when it receives a 38 kHz modulated IR signal? Also, keep in mind that I might "sound" angry or mad or whatever, but I'm not. I'm just bad at writing nice. \$\endgroup\$ – Harry Svensson Nov 25 '17 at 13:06
  • \$\begingroup\$ Possible duplicate of Can Arduino IR Recievers Detect Signals from IR Flashlights?. You already have a question where the reality of these sensors you misidentify as "Arduino" was explained to you. And it should be beyond obvious (from the data sheet if not by inspection) that a 3-lead device potted in black epoxy is not modifiable. \$\endgroup\$ – Chris Stratton Nov 25 '17 at 16:46

You cannot modify an existing receiver, because the demodulator is in the same package as the sensor device. They cannot be separated without destroying them.

Instead, you need a bare phototransistor, which is like a regular bipolar transistor but conducts when light strikes it instead of having a base terminal. Choose one which has a built-in infrared filter if you can, so that it does not respond to other light as much. (A photodiode can also be used, but it responds faster with a weaker output — it is good for modulated IR but not what you need.)


simulate this circuit – Schematic created using CircuitLab

(CircuitLab doesn't have a phototransistor symbol, so I used a regular transistor. The proper symbol is just this but with the "incoming light" arrows added.) The resistor should be large enough to limit the maximum current when the phototransistor conducts (no less than 100 Ω but possibly much higher), and otherwise chosen by experiment to produce a reasonable range of values depending on the illumination.

You will likely want to use one of the analog input pins on your Arduino so that you can choose a suitable activation threshold in software. Without modulation to help, choosing a useful threshold is hard, because ambient light — especially sunlight — includes infrared. You may want to write code to detect, not a certain absolute level, but a relatively sudden increase (as when the flashlight is turned on or moved to strike the sensor) — a high-pass filter.

  • \$\begingroup\$ would there be any spec known to IR flashlight manufacturer that could help in choosing the right threshold? \$\endgroup\$ – Arash Howaida Nov 25 '17 at 6:05
  • \$\begingroup\$ No so far as I can tell there wuld not, it;s going to mostly depend on ambient conditions. \$\endgroup\$ – Jasen Nov 25 '17 at 8:33
  • \$\begingroup\$ Perhaps I can include a script to normalize readings to account for the ambient conditions each time. \$\endgroup\$ – Arash Howaida Nov 25 '17 at 14:40
  • \$\begingroup\$ @ArashHowaida Yes, that is an excellent idea. I've added some more to my answer. \$\endgroup\$ – Kevin Reid Nov 25 '17 at 15:51
  • \$\begingroup\$ Even with a high-pass filter, this will readily be false triggered by shadows from someone walking around in sunlight, etc. There's a very good reason such systems are engineered to use recognizably modulated rather than steady sources. \$\endgroup\$ – Chris Stratton Nov 25 '17 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.