nickn 5 Posted February 20, 2013 Share Posted February 20, 2013 The below code works fine on my Arduino Uno, but on my launchpad only the code to turn on my TV works. On the launchpad I have my IR LED connected via a transistor. #include <IRremote.h> IRsend irsend; void setup() { } void loop() { delay(3000); for (int i = 0; i < 3; i++) { irsend.sendNEC(0x61A0F00F,32); // powerup delay(40); } delay(6000); for (int i = 0; i < 3; i++) { irsend.sendNEC(0x61A0609F,32); // 7 delay(40); } delay(200); for (int i = 0; i < 3; i++) { irsend.sendNEC(0x61A0827D,32); // . delay(40); } delay(200); for (int i = 0; i < 3; i++) { irsend.sendNEC(0x61A040BF,32); // 3 delay(40); } delay(200); for (int i = 0; i < 3; i++) { irsend.sendNEC(0x61A018E7,32); // enter delay(40); } delay(15000); } Quote Link to post Share on other sites
nickn 5 Posted February 20, 2013 Author Share Posted February 20, 2013 Found out the issue, while the 150 ohm resistor is enough to power on the tv, somehow it doesn't give the LED enough current to turn it off for some reason (I'm guessing that the light from the TV causes some interference, hence why I can turn it on but can't turn it off without placing the diode very close to the tv). Quote Link to post Share on other sites
roadrunner84 466 Posted February 20, 2013 Share Posted February 20, 2013 Maybe the light coming from the TV is too bright for the LED to still come through when the display is on? Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 Well, I'm still having issues. I can turn the TV on and off, but still having issues setting a channel. Quote Link to post Share on other sites
pivden 6 Posted February 21, 2013 Share Posted February 21, 2013 FIX - http://forum.43oh.com/topic/2552-irremote/?p=28918 Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 I've tried that fix, no luck though. Quote Link to post Share on other sites
PowerX 2 Posted February 21, 2013 Share Posted February 21, 2013 I've tried that fix, no luck though. Tell us more about the hardware you are using. And where do you get the power from (3v or 5v) on the same layout? Arduino uses supply voltage of 5v and the msp430 3.6v max. Have you modified the ir lib`s in energia in any way? Have you tried modifying the delay? Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 I'm using an IR LED, a 2N2222 transistor, and a 150 ohm resistor. The IR LED is powered from the 3v vcc pin. Other than commenting out those two lines I have not modified the IR libs. Quote Link to post Share on other sites
PowerX 2 Posted February 21, 2013 Share Posted February 21, 2013 I'm using an IR LED, a 2N2222 transistor, and a 150 ohm resistor. The IR LED is powered from the 3v vcc pin. Other than commenting out those two lines I have not modified the IR libs. How did you use it in the arduino example? Did you use a transistor there? Did you try to modify the delay settings? Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 I didn't use the transistor with the Arduino. I'll try adjusting the delay settings. UPDATE I tried again setting the delay to 100 for the for loops and its starting to work better. I also tried running three 150 ohm resistors in parallel to give a resistance of 50 ohms which has improved things. Perhaps even 50 ohms is too much? Quote Link to post Share on other sites
PowerX 2 Posted February 21, 2013 Share Posted February 21, 2013 I didn't use the transistor with the Arduino. I'll try adjusting the delay settings. UPDATE I tried again setting the delay to 100 for the for loops and its starting to work better. I also tried running three 150 ohm resistors in parallel to give a resistance of 50 ohms which has improved things. Perhaps even 50 ohms is too much? It depends on what type of IR led you are using. I burned a few of them trying to get maximum range for my nikon dslr remote project. Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 It depends on what type of IR led you are using. I burned a few of them trying to get maximum range for my nikon dslr remote project. I got a set of 5 of them off of ebay. I've tried contacting the seller for a datasheet but no luck yet. Here is the product on his regular website: http://www.uctronics.com/pairs-infrared-diode-led-ir-emissionreceiver-p-1327.html Quote Link to post Share on other sites
nickn 5 Posted February 21, 2013 Author Share Posted February 21, 2013 I was browsing the main site and I found a similar item, just a set or IR LEDs. It has a model number so I looked up the datasheet: http://www.vishay.com/docs/81014/tsal7400.pdf Quote Link to post Share on other sites
PowerX 2 Posted February 21, 2013 Share Posted February 21, 2013 I got a set of 5 of them off of ebay. I've tried contacting the seller for a datasheet but no luck yet. Here is the product on his regular website: http://www.uctronics.com/pairs-infrared-diode-led-ir-emissionreceiver-p-1327.html It`s hard to guess the datasheet for the diodes. The best thing if you want to make a good remote is to get some (I use 5mm) with datasheets and then calibrate your resistor and delay`s to get a maximum range and accuracy. I was browsing the main site and I found a similar item, just a set or IR LEDs. It has a model number so I looked up the datasheet: http://www.vishay.com/docs/81014/tsal7400.pdf Yes that whould be a nice one. The ones in the first link are 3mm and without specs. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.