IR Newbie - need some debugging suggestions please

So I've decided to play around with IR. I've got a VS1838 IR Receiver hooked up Arduino 1.
It's running the IRremote example SimpleReceiver. It's working. I grab a IR remote control for one of the cheap Chinese LED strips and pressing On/Off seems to show the VS1838 is working great:

15:41:20.567 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68550us
15:41:20.567 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:41:20.567 ->
15:41:20.617 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=39500us Duration=11850us
15:41:20.617 ->
15:41:20.617 -> Repeat received. Here you can repeat the same action as before.
15:41:26.249 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68500us
15:41:26.291 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:41:26.291 ->
15:41:26.313 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=39550us Duration=11850us
15:41:26.313 ->
15:41:26.313 -> Repeat received. Here you can repeat the same action as before.

Awesome.
Now I grab Arudino 2 and wire up the IR Tranmitter LED. And inside of IRremote Example
SimpleSender I have:

for (int i = 0; i < 100; i += 1) {
    Serial.print( "Sending with repeats of: " );
    Serial.println( numRepeats );
    IrSender.sendNEC( 0x0, 0x40, numRepeats );
    delay( 2000 );
    IrSender.sendNEC( 0x0, 0x40, numRepeats );

    delay(5000);
    numRepeats += 1;
}

}

The numRepeats flies way up because things aren't working and I don't understand
what the proper value should be.

Anyway - the Sender seems to be working because the VS1838 sees the transmits:

15:48:20.963 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68400us
15:48:20.963 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:20.963 ->
15:48:23.024 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=2000550us Duration=68450us
15:48:23.024 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:23.024 ->
15:48:28.105 -> Protocol=NEC Address=0x0 Command=0x40 Raw-Data=0xBF40FF00 32 bits LSB first Gap=3276750us Duration=68400us
15:48:28.105 -> Send with: IrSender.sendNEC(0x0, 0x40, );
15:48:28.105 ->
15:48:28.156 -> Protocol=NEC Address=0x0 Command=0x40 Repeat Gap=42050us Duration=11800us
15:48:28.170 ->

So - from my terribly inexperienced perspective - things are working. I'm able to transmit the same On/Off code as the remote control.
Only...

It's not.
The LED strip doesn't go on or off.

Things seems to match up, only the LED strip is not responding to my IR transmissions.

Some of the GAP values are off. Could that be my issue??? Does anyone have a suggestion on how to debug??
Thank you!

Please post the full sketch for the transmitter and receiver

1 Like

well, I’m an idiot. :slight_smile:

But I knew I had to actually sit down and write it up then post it.

It’s working but I had to drag the LED strip IR receiver almost on top of my IR LED. I guess that means I’m attenuating the strength of the IR LED?

I forget what resistor I grabbed.

But I think I can make progress now.

I apologize for the noise.

1 Like

Often preparing an issue for consideration here results in solving the problem w/o help!

No need to apologize. But you could post your code and even a hand drawn schematic, it might help someone identify why your range sucks.

a7

Hi @pconroy328!

Do you have access to the datasheet of your IR diode?

If yes, you may check the data. The range mainly depends on

  • Continuous Forward Current
  • Peak Forward Current
  • Beam Angle

(not talking about the wavelength ...)

So there may be some parameters which you can influence by led choice and/or optimized "driver electronics".

Good luck!
ec2021

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.