Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By btidey
#82653 The signal is probably not getting weaker due to the code but the format of the IR transmissions may be being disturbed.

The IR messages are actually pulses that are modulated around 36 KHz. Some libraries, like the commonly used IRremoteESP8266, do all the timing in-line. So the modulation is achieved by bit banging the GPIO line driving the IR LEDS with software delays in between. This works well when not much else is going on but can be disturbed if any other software interrupts and disturbs this timing.

You have 2 main choices here I think.

First, you can try and find which bit of code is disturbing the IR and then work around it by say disabling it during the period when you want to transmit an IR signal. You should be able to find the culprit by adding in the extra pieces of code one at a time.

The second choice is to use IR transmission code which is less dependent on in-line timing. I do this in my ESP IR Blaster https://www.instructables.com/id/ESP-12 ... d-Blaster/ This exploits the ESP8266 ability to do the modulation in hardware and then uses interrupts to do the much slower bit bang timing.
User avatar
By sblantipodi
#82655
btidey wrote:The signal is probably not getting weaker due to the code but the format of the IR transmissions may be being disturbed.

The IR messages are actually pulses that are modulated around 36 KHz. Some libraries, like the commonly used IRremoteESP8266, do all the timing in-line. So the modulation is achieved by bit banging the GPIO line driving the IR LEDS with software delays in between. This works well when not much else is going on but can be disturbed if any other software interrupts and disturbs this timing.

You have 2 main choices here I think.

First, you can try and find which bit of code is disturbing the IR and then work around it by say disabling it during the period when you want to transmit an IR signal. You should be able to find the culprit by adding in the extra pieces of code one at a time.

The second choice is to use IR transmission code which is less dependent on in-line timing. I do this in my ESP IR Blaster https://www.instructables.com/id/ESP-12 ... d-Blaster/ This exploits the ESP8266 ability to do the modulation in hardware and then uses interrupts to do the much slower bit bang timing.


you are a master man! thanks, you got it.
it was a software problem... but I solved it by simply set the frequency of my ESP to 80MHz instead of the previously used 160MHz.

I can reproduce the problem "of the weak signal" running at 160MHz with every conditions and with every conditions it seems to work well at 80MHz.

thank you man!!!