Transmitting IR not working

I’m currently trying to create a remote for my Samsung TV. Thanks to this post esphome successfully able to recognize it is a Samsung TV. But when I try to transmit the data I capture nothing happens.
I don’t see the LED emits light with my phone camera and I can’t even capture the transmission with the receiver that is right next to it, they are connected to the same chip so maybe it interferes somehow.

I’m using an ESP8266, and TSOP38238 as a receiver. For the transmitter, I’m not sure what exactly I have but I’ve tried one dark LED that looked to me like an IR LED, and one lucid LED that looks like LED - Infrared 950nm.

This is my board:


I know it looks like a mess so I’ll explain :smile:. The receiver is connected to 3.3v, ground, and a data pin. For the transmitter, I connected the 3.3v to 4 390ohm resistors in parallel (to get about a 100ohm), and then to the LED anode. Then from its cathode to a transistor, and from the other transistor leg to the ground. The middle transistor leg is connected to another data pin.
The second LED I’ve tried is not connected but you can see how it looks like in the pictures standing on the side.

I should note that with this second LED, whenever I tried to transmit (with a toggle button in HA) it emits a very bright light, which seems weird to me that an IR LED would do that.
This is my yaml config, with two switches I’ve tried:

remote_receiver:
  pin: 
    number: D4
    inverted: True
    mode: INPUT_PULLUP
  dump: all

remote_transmitter:
  pin: D1
  # Infrared remotes use a 50% carrier signal
  carrier_duty_percent: 50%

switch:
  - platform: template
    name: TV Power
    turn_on_action:
      - remote_transmitter.transmit_samsung:
          data: 0xE0E040BF

  - platform: template
    name: TV Mute
    turn_on_action:
      - remote_transmitter.transmit_samsung:
          data: 0xE0E0F00F

I would love some assistant to understand what I’m doing wrong. Thanks!

EDIT: I’ve tested with both front and back camera of a galaxy s9 and none of the LEDs are visible. I also tested with an IR LED that is labled IR LED (on the box) and no success. I also tested with a regular LED and it does blink when I toggle the button.

Really? “Looks like” is not a good way of identifying electronic components.

Have you done as suggested in the other thread and looked at the supposed IR led through a digital camera to see if it is actually transmitting? I guess not because you didn’t mention it.

I won’t give your wiring any consideration - without a wiring diagram I can’t really visualise what you have done.

do you mean transmitter?

the one on the left in your pic looks nothing like the sparkfun device.

I’ve read it only sometimes visible, and it isn’t visible with my phone camera.
I’ll add that info to the post. I did write that the receiver did not catch this transmission either.

Yes… autocomplete… I’ve fixed that, thanks.

I’m new to all this, do you happen to know of a free linux tool I can use to draw a wiring diagram?

Try the forward facing camera. I have found that to be more sensitive to IR than the rear camera on most phones.

Pen, paper. If you find another tool let me know :slight_smile: There are some online tools that even do simulation for you.

If the digital camera isn’t seeing a flashing light when you send a signal, then that is a bad sign. The digital camer should see an IRLED flash the same way as your eye can see a visible spectrum LED flash.

I just borrowed an IR LED that came in an Arduino kit (so I’m hopeful it is what the box says it is), to swap and see if it transmits with my setup. I’ll update later.

I added a diagram, I hope its clearer now.

I edited the post with more tests I’ve done: another IR LED (fail), button test with regular LED (success), see IR in cameras (fail).

Another test I did: I moved the whole transmitting part to an Arduino Uno, and left the receiving portion on the ESP8266. Still, the receiver does not see the IR LED. When I switched to a green LED I could see it lit.
This is the Arduino code I’ve used:

#include <IRremote.h>
int buttonState = 0;
IRsend irsend;
 
void setup()
{
  Serial.begin(9600);
  pinMode(7, INPUT);
}
 
void loop() {
    button = digitalRead(7);
    if (button == HIGH) {
    Serial.print("click ");
    irsend.sendSony(0x68B92, 20);  //test signal
    }
    delay(100);
} 

So I don’t know what the problem could be, maybe weak transmission?

I remain to be convinced that you even have an IR LED.

But assuming you do have, most of the circuits I have seen have a resistor between the data pin and the base of the transistor.

Why not just put a voltage across the IR LED and see what you can see in the digital camera.

Thanks. I tend to agree, nothing is visible even when I connect it straight to voltage. I even played with the resistance with a potentiometer. I verified that my camera sees IR with a my TV remote, so the either none of the LEDs are IR or they broke… I’ll order new ones then.
I’ll post the results later.

Well I tried both dark LEDs with a multimeter and got no reading… while I did get a blink of ~1500 with a green LED. So I think that while my multimeter is not that good, the LED is indeed broken.

I got a new (or the first) IR LED and now everything works.
Thanks again for your help.

1 Like