IR 38KHz and TSOP4838 vs TSSP4038

Hello! I want to make IR light barrier for my project - start line for race, but I have problems with photo sensors.

The scheme - IR diode is connected to pin 8 and photo sensor OUT pin is for ping 2.

With TSOP4838 it detects brake of IR modulated signal, but based on info from forum, after continuous IR signal it overloads. So I need to use TSSP4038 for continuous IR signal. Problem is that TSOP4838 is working, but in the same scheme TSSP4038 is not. When I plug it in it feels like "always" receiving IR signal(I tried to separate the diode). Is there some way to test TSSOP4038 with multi meter (I got two of them, but maybe they are faulty)?

Sketch for test:

int IR_PIN=8;
#define PIN_DETECT 2
long startTime;

void setup() {
Serial.begin (9600);
pinMode(IR_PIN,OUTPUT);
tone(soundPin,38000);
pinMode(PIN_DETECT, INPUT);

}

void loop() {
if (digitalRead(PIN_DETECT)) {
    Start ();
    Serial.print ("Start ");
    Serial.print (startTime);
    Serial.println();
    delay (1000);
   
  }

}

void Start(){
  startTime = millis();
}

The 4038 is only good for two meters, is your project trying to use it at a greater distance?

I need about 3m distance, but in this case even can’t get working for 50cm. Maybe I shuld add some components - in one topic there was sugesstion to add filtering elements?

If 4038 is good for 2m continuous beam - witch sensor should I get?
I thought that 4038 is better than 4838 and with 4838 i could get 3m range with small lense on IR diode…

Problem solved - thees TSSP4038 are really sensitive. Even small IR radiation from big angle is enough. I'll have to deal with building special case for sensor...

I achieved 3m distance without optics (the sensor-3m-IR led).

What sort of IR LED are you using, and what is the LED current.

I use SFH400 narrow beam (inbuild glass optics) IR LEDs for gates, and get 5-7meters without any problems with only ~25mA LED current in average to bright light conditions. Without any shielding. Detection beam "thickness", with this setup is less than 5mm dia. Leo..

Wawa: What sort of IR LED are you using, and what is the LED current.

I use SFH400 narrow beam (inbuild glass optics) IR LEDs for gates, and get 5-7meters without any problems with only ~25mA LED current in average to bright light conditions. Without any shielding. Detection beam "thickness", with this setup is less than 5mm dia. Leo..

Hi Leo,

Do you have a schematic of this setup you are speaking about? Would love to try it out myself

Grtz, Yves

No schematic, but really easy without. TSSP receivers have three pins. 5volt supply, ground, and digital signal out. Google "TSSP4038 datasheet". A HIGH on the output = nothing received, a LOW = beam received.

Modulate the IR LED with the right frequency (38kHz for a TSSP40*38*).

Many beam break threads on this site. Here's a recent one. Leo..

I send a random packet 38KHz 8 bit packet with 300uS High/Low time from a remote I made (to test it) to a TSOP 38238 with a random delay of 1 to 5ms. The signals get through happily enough. Maybe if you needed range and are happy with a 5ms resolution, you could implement this?

basically if (time between packs > 10ms) { beam broken}.

You may need to play with the value, but if you only need that sort of accuracy/resolution it could be an option?

With a constant 38kHz signal, you can get a reaction time <=1ms,
and you don’t have to bridge any gaps with code.
But it’s indeed easy to use any remote and any (non-beambreak) 3-pin sensor to play with.
Leo…