Jump to content
43oh

Issue with IR remote


Recommended Posts

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);
}

 

 

Link to post
Share on other sites

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).

Link to post
Share on other sites

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?

Link to post
Share on other sites

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?

Link to post
Share on other sites

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?

Link to post
Share on other sites

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.

Link to post
Share on other sites

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

Link to post
Share on other sites

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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...