# Increasing IR LED at max

Hello guys I builded a IR circuit to increase my IR range using the following IR LED Diode ->

https://www.vishay.com/doc?81011

this is the schematic -> https://cdn.sparkfun.com/datasheets/Kits/PowerIR-v11.pdf I have replaced the resistor at the collector with 39 Ohm 1W resistor.

Using the following calculations:

Input voltage: 5V Diode forward voltage: 1.33V Diode forward current: 100mA

and I calculated 39 Ohm 1W.

I have increased the range for sure but can I fine tune it more ?

And also when I send codes and they are received from the TSOP I am sending irsend.sendNEC(0x54454c45, 32);

But the TSOP is receiving different hex codes when decoded like:

E0E0E01F CBDD7D2B E0E0E01F E0E0E01F 37BF2E43 776CD98D 776CD98D 22AE7A2A 56D6B339 9E45C177 776CD98D 22AE7A28 4AB0F7B6 FEAC02E4 22AE7A29 41A542AB 776CD98D 24AE7D4F

Is there a way to make the code consistent and the same, maybe sending raw data ?

Look at the datasheet for the IR led, it should mention max pulse current, which could be upwards of 1000mA. Even at 100mA surely you're not trying to suck that through an Arduino pin directly. . . .

And when your reads are different everytime but you know the signal sent is identical, then your problem is distance and/or wrong protocol usage.

Raw is no different than hex code in efficacy.

And if all you want to do is repeat the received value, just store it and use that to send it out again...

septillion: Please show that code :)

And if all you want to do is repeat the received value, just store it and use that to send it out again...

The whole code is that in a loop:

``````  void loop() {
for(int i = 0; i < 3; i++)
{
irsend.sendNEC(0x54454c45, 32); // Sony TV power code
delay(300);
}
delay(5000);
}
``````

that is all its just simple sketch. :)

What do you mean by "And if all you want to do is repeat the received value" the receiver and the transmitter are on separate chip the transmitter is always sending 0x54454c45 but the receiver is receiving different code for each command as seen above the same applies for my ir remote.

Why is that so and is it possible to receive consistent ir codes ?

Here it is:

``````/*
* IRremoteESP8266: IRrecvDemo - demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 Sept, 2015
* Based on Ken Shirriff's IrsendDemo
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff, http://arcfn.com
*/

#include

// an IR detector/demodulator is connected to GPIO pin 2
uint16_t RECV_PIN = 2;

IRrecv irrecv(RECV_PIN);

decode_results results;

void setup() {
Serial.begin(9600);
}

void loop() {
if (irrecv.decode(&results)) {
// print() & println() can't handle printing long longs. (uint64_t)
// So we have to print the top and bottom halves separately.
if (results.value >> 32)
Serial.print((uint32_t) (results.value >> 32), HEX);
Serial.println((uint32_t) (results.value & 0xFFFFFFFF), HEX);
irrecv.resume();  // Receive the next value
}
delay(100);
}
``````

What boards are you using?

INTP:
What boards are you using?

Transmitter code is above its using attiny85.

That is not your transmitter code. Try again.

INTP: That is not your transmitter code. Try again.

That is my transmitter code its written .sendNec what else do you expect to see ? :o

The rest ;) http://snippets-r-us.com/

septillion: The rest ;) http://snippets-r-us.com/

So? Why do we have to do the work?

septillion: So? Why do we have to do the work?

I don't remember asking you something in person you decided to join also I am showing everything I dont see why the fuss, I am just experimenting with the IR library and I decided to ask some of the questions I have in my mind. Feel free not to answer anymore.....phew

Yeah, but you want our help so is it not more then normal for you to follow forum rules?

And no, I'm not the only one who's bothered by this. ;) As you can see from INTP's reaction but even more from the lake of reactions from others ;)

mitko290: blah blah you decided to join blah blah

Welp, that says it all. Your code problem is apparent but I have no tolerance for ungrateful people in need of help. I'm petty like that. Toodles.

septillion: Yeah, but you want our help so is it not more then normal for you to follow forum rules?

And no, I'm not the only one who's bothered by this. ;) As you can see from INTP's reaction but even more from the lake of reactions from others ;)

Lake of reactions by two people... ok

Forum rules I did wrong, can you tell which so important rules I omitted to be so catchy, please ?

I posted a datasheet to my component my electrical sums and also the calculation I come up, I posted the code for the transmitter and the receiver believe it or not that is the code.

Its a standard ir receiver/transmitter code its appear that the codes are noise due to electrical or environmental reaction.

If you have anything to add, add it or skip this topic and just dont answer anymore