IR beam brake issue

Hello,

I'm trying to tranform my idea (time counting and displaying IR gate) to reality, but I came across the first problem.

I'm not able to make functioning continuous "not broken beam reading".

Simply: I just copied followed these instructions:

and...boom, it works...kind of.

It perfectly detects remote controllers for example. But there is a problem with my IR LED.
When take the LED aim at reciever, "status led" lights up, but only for a few seconds (approx. 2,5s).
No continuous "reading" is possible.

I read all the comments above the instructions, but none of the solutions seems to work...

Used IR reciever: HX1838

Can I solve the problem with some changes in the code?

Thanks,
John

JohnyStone:
Can I solve the problem with some changes in the code?

Probably. But if you want more than that you need to post your code.

And when posting code please use the code button </>so your code looks like thisand is easy to copy to a text editor See How to use the Forum

…R

Sorry, I thought that link would be enough, sorry :slight_smile:

Here it is:

#include <IRremote.h>

#define PIN_IR 3
#define PIN_DETECT 2
#define PIN_STATUS 13

IRsend irsend;
void setup()
{
  pinMode(PIN_DETECT, INPUT);
  pinMode(PIN_STATUS, OUTPUT);
  irsend.enableIROut(38);
  irsend.mark(0);
}

void loop() {
  digitalWrite(PIN_STATUS, !digitalRead(PIN_DETECT));
}

It perfectly detects remote controllers for example.

Are you talking about a remote controller for a TV, for instance? That is NOT what that code/schematic is meant for.

JohnyStone:
Sorry, I thought that link would be enough, sorry :slight_smile:

We don't charge by the word. How about a good description of what you are trying to do and what you are using so we don't have to try to figure it out by reading your program?

My guess is that you are setting up some IR transmitter to send a signal continuously and you are using an IR receiver to detect the reflected IR light. Is that correct?

What are you using to send the signal?
Post a link to the datasheet for the detector.

You may find this IR Thread useful.

...R

Robin2:
How about a good description of what you are trying to do

Code and schematics are in the link I posted. I just didn't copy and paste it. Next time I will list all the information here. Sorry for that misunderstanding.

Robin2:
My guess is that you are setting up some IR transmitter to send a signal continuously and you are using an IR receiver to detect the reflected IR light. Is that correct?

That is correct. Exactly. And my problem is that i'm not able to detect continuous signal.

For example:
You place and aim the IR transmitter (IR LED) at the IR reciever AND you put your hand in between. Then you put your hand away and you can see the reciever reacts to the light, BUT only for about 2,5 seconds, then it just stops (no signal anymore). You have to put your hand back in between to block the signal, and put it away again to see the same thing - 2,5 sec long "positive reading".
In this case I have installed a red colored led diode (status pin), which lights up when the IR reciever detects IR beam.

Robin2:
What are you using to send the signal?

Just an ordinary IR LED:

  • 10°
  • 50mA
  • 1,55 - 1,8V
  • through 220 ohm resistor

Robin2:
Post a link to the datasheet for the detector.

This is what I found....
http://www.datasheet4u.com/datasheet/H/X/1/HX1838_ETC.pdf.html

Did you read the comments in the link you gave in post#0.

The 1838 receiver is not able to receive continuous signals.
Someone posted a workaround.

I have used the PNA4602M for a project, and that one did work.
There might be others that do continuous.
Leo..

Wawa:
The 1838 receiver is not able to receive continuous signals.
Someone posted a workaround.

Yeah, that workaround does not work... :frowning:

Wawa:
I have used the PNA4602M for a project, and that one did work.
There might be others that do continuous.

In my local shop they have in stock this one:

in a 38 kHz variant, so I will try this one.

JohnyStone:
And my problem is that i'm not able to detect continuous signal.

Did you study the link I gave you?

...R

It works now with the new reciever :slight_smile: