Parts for simple electric eye - trip wire

I need an inexpensive Infrared receiver for an electronic eye spanning a distance of 150 mm. The emitter is an infrared LED that cost 30 p. I have a YG1006 Flame Sensor (two wires looks like a black LED). Would that work with the attached sketch?

Dustin Graves’ mailbox monitor shows his IR receiver as a clear LED like item. Do you know where I could purchase that? Mailbox Monitor | dgraves.org

As a last resort, I could use the remote control IR receiver (3 wire) that came with a kit. But that seems like a waste.

Replies are much appreciated. - Mark

phototransistor.png

Give it a go and see what happens. What you need is simply an IR LED and IR phototransistor.

The three leg version expects a coded signal where you only need a signal or no signal.

Weedpharma

Thank you. I will try the Flame Sensor and report back tomorrow. Best - Mark

The YG1006 Flame Sensor worked as an IR sensor. (This was just two wire black LED looking thing - without the UPM modeule). The problem is, it is so sensitive, I basically need to cup my hands around it to block any IR from reaching it. Hardly the "trip wire" I was seeking. I have the IR LED reduced by only a 220 ohm resistor (to keep it from burning up) but it is likely BLASTING out IR (although I can't see it). I used an IR remote control to test all hypotheses. Does anyone have suggestions of raising or reducing resistors on both the emitter and receiver to achieve the desired "Trip Wire" behavior? Does sunlight have IR components that can mess up this partnership? Thanks - Mark P.S. I'm posting code b/c I'm not sure if I called up a built in resistor.

// set variables to actual physical pin numbers
const int IRSensor = 2;
const int LED = 13;

void setup()
{

   pinMode(IRSensor, INPUT_PULLUP);
   pinMode(LED, OUTPUT);
   digitalWrite(LED, HIGH);
}

void loop()
{
   // read IRSensor
   
  if (digitalRead(IRSensor) == LOW)    // IRSensor can see IR LED
      {
      digitalWrite(LED, LOW);
      }
      else 
      {
      digitalWrite(LED, HIGH);
      }
}

Does sunlight have IR components

The answer is yes, a lot. That is why modulated IR and a detector that is "tuned" to the modulation frequency is used. The sensor only responds to the modulated IR not to steady light.

This thread deals with the modulated IR sensor http://forum.arduino.cc/index.php?topic=315181.0

That’s the wrong part for that application. That part YG1006 is designed for flame detection , not an electric eye application. You need a standard IR led and receiver for that application. If you want a flame sensor this is the circuit.
YG1006 FLAME SENSOR CIRCUIT.png

Dustin Graves’ mailbox monitor shows his IR receiver as a clear LED like item

I think you need something like this

Raschemmel. Thank you. I'm ordering the right part for the job. Karma to you. - M

I have a schematic at home that I used for the flame sensor that works great if you want to use it for detecting flame(s). I’ll post it tonight.

Here’s the datasheet

I found the same circuit online (SEE ATTACHED)
This circuit is very sensitive to a flame.
circuit_flame_detector_7A3FE.jpg

This circuit has a great idea. (use a flashlight reflector for the sensor)

A trip-wire IR beam should only be made with modulated IR light. Upto a few meters shouldn't be that hard, and you can use the parts you already have.

Let the Arduino generate a continuous 38kHz square wave for the IR LED and >=100ohm current limiting resistor. Use the 3-pin 38kHz remote receiver, and connect it's output to a digital pin. It will be normally LOW, and HIGH when the beam is interrupted. Leo..

As for "seeing" the IR, some digital cameras and some video cameras will see IR fairly well (especially the older Sony with the "nightshot" mode). As for the "trip wire" put the receiver in a piece of tubing so it has a narrow field of view and make sure the sun is not getting into it. Sunlight will definitely swamp a receiver.

From experience. A good narrow-beam IR LED like the SFH400, with only ~30mA peak current, can do 5 meters reliably in bright daylight (no sunlight on the receiver). That's without cover. Leo..