How to use: LED Infrared Remote Control Transmitter 3W High Power Infrared Transmitter Module 940nm

Hello,

anybody has this device, I tried with this and connect with an arduino uno, but not work

LED Infrared Remote Control Transmitter 1W 3W High Power Infrared Transmitter Module 940nm

https://es.aliexpress.com/item/1005010219059804.html?spm=a2g0o.order_list.order_list_main.15.34e5194dMEXwZS&gatewayAdapt=glo2esp4itemAdapt

Which do you have the 1W or 3W?

What indicates that it does not work?
What are you trying to do with it?

How are you powering the IR transmitter?
How are you detecting for any output?

Please provide a schematic (drawing) of how it's wired.
Please provide your code using code tags.

Please read https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966

Ron

I have 3W
https://es.aliexpress.com/item/1005010219059804.html?spm=a2g0o.order_list.order_list_main.15.34e5194dMEXwZS&gatewayAdapt=glo2esp4itemAdapt




If I see it correctly in the first image of post #6, the wiring is wrong. 5V of the Wemos seems to be connected to GND of the LED module, GND of the Wemos to the 5V of the LED module.

Power supply? That unit uses 700ma. Your power pins can supply...?

You cannot power that from an Arduino. You must have a separate power supply of at least 1A

You replied but didn't answer any of my questions.

Yes, on all images GND and 5V are swapped.

hello, Hi, I fixed the power issue, but it’s still the same; I used a new one, just in case the previous one had burned out.






the code is:

#include <Arduino.h>

#include <IRremoteESP8266.h>

#include <IRsend.h>

// ============================================================

// Wemos D1 R1 (ESP8266)

// D5 = botón KY-004, pin S

// D6 = emisor IR, pin DATA

// ============================================================

const uint16_t kIrLed = D6;

const uint8_t kBtnPin = D5;

const uint8_t kLedPin = LED_BUILTIN;

// Objeto para emitir señales infrarrojas

IRsend irsend(kIrLed);

// Estado y antirrebote del botón

bool lastButtonState = HIGH;

unsigned long lastButtonPress = 0;

const unsigned long debounceMs = 250;

// Señal RAW capturada del botón ON/OFF del aire TCL

uint16_t rawData[99] = {

3152, 1492, 518, 1056, 544, 1030, 606, 206, 606, 206,

578, 234, 606, 968, 518, 294, 548, 266, 606, 968,

546, 1028, 544, 268, 606, 968, 520, 294, 544, 268,

606, 968, 606, 968, 546, 268, 546, 1026, 544, 1030,

606, 206, 548, 264, 606, 966, 544, 268, 548, 264,

606, 208, 606, 966, 546, 266, 606, 206, 546, 264,

606, 206, 606, 206, 606, 206, 606, 206, 606, 204,

608, 206, 604, 208, 606, 206, 606, 206, 606, 206,

606, 206, 604, 206, 606, 206, 606, 206, 548, 264,

604, 208, 546, 264, 548, 1026, 518, 296, 606

};

// En Wemos D1 el LED integrado normalmente es activo en LOW.

void blinkLed(uint8_t times, uint16_t onMs, uint16_t offMs) {

for (uint8_t i = 0; i < times; i++) {

digitalWrite(kLedPin, LOW);  // Enciende LED

delay(onMs);



digitalWrite(kLedPin, HIGH); // Apaga LED

delay(offMs);

}

}

void sendTCLPower() {

Serial.println("Boton pulsado: enviando senal TCL...");

// Aviso visual: tres parpadeos

blinkLed(3, 150, 150);

// LED encendido mientras se transmite la señal

digitalWrite(kLedPin, LOW);

// Emite la señal IR capturada a 38 kHz

irsend.sendRaw(rawData, 99, 38);

delay(150);

// Apaga LED tras enviar

digitalWrite(kLedPin, HIGH);

Serial.println("Senal TCL enviada.");

}

void setup() {

Serial.begin(115200);

delay(500);

// LED integrado

pinMode(kLedPin, OUTPUT);

digitalWrite(kLedPin, HIGH); // Empieza apagado

// Botón: con INPUT_PULLUP, sin pulsar = HIGH; pulsado = LOW

pinMode(kBtnPin, INPUT_PULLUP);

// Inicializa el emisor IR

irsend.begin();

// Tres parpadeos al encender o reiniciar la Wemos

blinkLed(3, 200, 200);

Serial.println();

Serial.println("Sistema listo.");

Serial.println("Boton KY-004 en D5.");

Serial.println("Emisor IR en D6.");

}

void loop() {

bool buttonState = digitalRead(kBtnPin);

// Detecta el instante en el que se presiona:

// estado anterior HIGH y estado actual LOW.

if (lastButtonState == HIGH &&

  buttonState == LOW &&

  millis() - lastButtonPress > debounceMs) {



lastButtonPress = millis();

sendTCLPower();

}

lastButtonState = buttonState;

delay(20);

}

I have another Arduino to process the signal; what follows is what is captured from an AC remote control, but when I send a signal using the Arduino, nothing is captured.

----- SENAL IR RECIBIDA -----

Protocol  : UNKNOWN

Code      : 0xA81A8A87 (50 Bits)


uint16_t rawData[99] = {3056, 1594,  496, 1022,  548, 1048,  520, 284,  528, 282,  528, 282,  526, 1070,  498, 284,  526, 282,  528, 1048,  520, 1050,  520, 284,  526, 1048,  520, 284,  526, 282,  528, 1070,  498, 1072,  498, 284,  526, 1048,  520, 1072,  498, 284,  526, 282,  528, 1070,  498, 282,  526, 282,  528, 282,  528, 1070,  498, 284,  526, 284,  526, 282,  526, 282,  526, 282,  528, 282,  526, 282,  526, 282,  528, 282,  528, 282,  526, 282,  526, 282,  526, 282,  528, 282,  528, 282,  526, 282,  528, 282,  526, 282,  526, 284,  526, 284,  526, 1068,  500, 282,  526};  // UNKNOWN A81A8A87


-----------------------------

----- SENAL IR RECIBIDA -----

Protocol  : PANASONIC

Code      : 0xC4D364800024 (48 Bits)


uint16_t rawData[99] = {3036, 1592,  500, 1068,  500, 1068,  500, 286,  524, 286,  522, 286,  522, 1070,  500, 286,  522, 288,  522, 1070,  500, 1068,  500, 286,  522, 1070,  498, 288,  522, 288,  522, 1070,  500, 1070,  498, 288,  522, 1070,  500, 1070,  498, 288,  522, 288,  520, 1070,  498, 288,  522, 288,  520, 1070,  498, 290,  520, 290,  520, 288,  520, 288,  522, 288,  520, 288,  520, 290,  520, 290,  520, 290,  520, 288,  520, 288,  520, 290,  520, 288,  520, 288,  520, 290,  520, 290,  520, 290,  520, 1070,  498, 290,  520, 290,  520, 1072,  496, 290,  520, 290,  518};  // PANASONIC C4D364800024

uint32_t address = 0xC4D3;

uint32_t command = 0x64800024;

uint64_t data = 0xC4D364800024;


-----------------------------

----- SENAL IR RECIBIDA -----

Protocol  : UNKNOWN

Code      : 0xA81A8A87 (50 Bits)

What are you trying to achieve with that LED.

It's wide angle could be worse for range than a common IR LED.

That D1 board doesn't look in great condition. Wonky power jack and some suspect headers.

Nothing at all, receiver doesn't react?
Do you see emitter illuminating if you look at it through your phone camera?

How did you fix the power issue? It appears you are still powering the LED with the 5v pin.

See post #8 and #9

Use code tags <CODE/> to post your code!

That is not an Uno!
Be aware that the I/Os are 3.3V only!
A 3W infrared (IR) LED can be potentially hazardous to your eyes.

Jim-p is correct. These LEDs are BRIGHT! I have several models with external drivers.

The 3W cool white LED is so bright it hurts your eyes to look in its direction from meters away.

I use 3w IR LEDs for surveillance units. My iPhone shows bright as day for many meters from the LED.

Your code has the button pin set to d5 but you have it on d2. Move the yellow wire to d5. Everyone else's advice about power to the emitter are also VERY IMPORTANT follow as best you can.