This is my first time ever hooking up anything more than a simple 12v circuit. I have done some homework, but am still falling short. I figured I'd chance the verbal beating and ask the question that so many other folks who are new to this stuff ask, "What the heck am I missing with my circuit?". I'll also hope I can properly explain what I've done - because again, I'm new to all of this.
Project Objective:
- Initial/Current - to turn on a single TV with a single IR emitter (that's where I am now)
- Final/End-Goal - send signals to several different IR emitters to activate five same-brand/model TV's simotaneously
Issue/Problem:
Circuit will light a LED without issue. Using a phone camera to test IR and can see VERY slight illumination of IR LED, but it's very dim and will not trigger TV power.
Parts:
- IR LED - GIKFUN (This is the link / Size: 5mm / Forward Voltage: 1.2-1.4V. / Forward Current (mA): 100mA/ Wavelength (nm): 940nm.)
- Transistor - NPN 2N3904
- Resistor - 100 Ohm
- Arduino - UNO and NANO (have tried both - currently working with UNO)
My code is nothing more than a modified version of the example that came with the IR library:
#include <Arduino.h>
#include "PinDefinitionsAndMore.h"
#include <IRremote.h>
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
Serial.println(F("START " __FILE__ " from " __DATE__ "\r\nUsing library version " VERSION_IRREMOTE));
IrSender.begin(IR_SEND_PIN, ENABLE_LED_FEEDBACK); // Specify send pin and enable feedback LED at default feedback LED pin
Serial.print(F("Ready to send IR signals at pin "));
Serial.println(IR_SEND_PIN);
}
// When I ran the simplereceiver code, it gave me back this:
// Protocol=NEC Address=0xAA Command=0x1C Raw-Data=0xE31C55AA 32 bits LSB first
// and I decided it fit into the variables like this:
uint16_t sAddress = 0xAA;
uint8_t sCommand = 0x1C;
uint8_t sRepeats = 3;
void loop() {
Serial.println();
Serial.print(F("Send now: address=0x"));
Serial.print(sAddress, HEX);
Serial.print(F(" command=0x"));
Serial.print(sCommand, HEX);
Serial.print(F(" repeats="));
Serial.print(sRepeats);
Serial.println();
Serial.println(F("Send NEC with 16 bit address"));
Serial.flush();
IrSender.sendNEC(sAddress, sCommand, sRepeats);
delay(400);
Serial.print("Sending RAW ");
Serial.print("0xE31C55AA");
IrSender.sendNECRaw(0xE31C55AA, sRepeats);
delay(5000);
}
I got the RECEIVE IR demo to work and was able to obtain the following output from same:
Protocol=NEC Address=0xAA Command=0x1C Raw-Data=0xE31C55AA 32 bits LSB first
I tried to make a drawing of the circuit. Don't know a lot other than what I have read about doing this kind of diagram, but here's what I came up with:
Please forgive me if I got something backwards. Emitter, collector, anode, cathode, photos of Elvis, etc.. I'm still learning... and yes, I have more reading to do tonight!
Anyway, any help anyone can give me with getting the IR LED to blink brighter and actually turn on the TV is appreciated. Also, if anyone has any suggestions on how to take this to the next-level and stack more LED's in the mix, those are appreciated too! Thanks to all!