Hello,
I've read several threads about the IR function and even with a transistor in place the range would only be a couple of meters. I had it worse than that and only could get about 50cm. So me and a friend examined the signal with an oscilloscope and saw something quite interesting. The frequency generated by the plugin was around 34 000 Hz and not the desired 38 000 Hz. Changing the following line in IRremote8266.cpp got it very close to 38 000 Hz.
File: IRremoteESP8266.CPP
Line: 490 : halfPeriodicTime = 500/khz; > halfPeriodicTime = 465/khz;
Now, in my case this didn't make much of a difference since I found out I had gotten the wrong Ir-diode for my project but this could have an impact on range depending on the receiver you're having.
This was tested on a NodeMCU V3 and latest ESPEasy dev firmware.
,Olle
Wrong Hz in IRremoteESP8266 - could affect range
Moderators: grovkillen, Stuntteam, TD-er
Re: Wrong Hz in IRremoteESP8266 - could affect range
Olle,
There are two aspects to consider.
1. the spectral response (wavelength) of the sender / receiver diode. Think of it as the colour of the IR light. IR is about 900nm-1200nm.
2. the modulation frequency of the signal coding. The signal is not just on / off like the output of the UART pin. It is sort of frequency modulated. The frequency that you want actually depends on the sender and or the receiver. Both need to be on the same (carrier) frequency .
Besides a common photo transistor, there are also integrated IR receiver modules (usually with 3 pins) which do process the IR coding and output a signal that you can directly read with a UART. Part if that processing is filtering everything but the frequency range of about 38kHz which carries the signal. Other light (ambient etc.) which has not a 38kHz component is blocked.
35kHz and 38 kHz receivers are the most common, I have also seen 40kHz. After de-modulation the signal very often has a speed of 9600 bps.
It would therefore be useful to have this setting configurable...
There are two aspects to consider.
1. the spectral response (wavelength) of the sender / receiver diode. Think of it as the colour of the IR light. IR is about 900nm-1200nm.
2. the modulation frequency of the signal coding. The signal is not just on / off like the output of the UART pin. It is sort of frequency modulated. The frequency that you want actually depends on the sender and or the receiver. Both need to be on the same (carrier) frequency .
Besides a common photo transistor, there are also integrated IR receiver modules (usually with 3 pins) which do process the IR coding and output a signal that you can directly read with a UART. Part if that processing is filtering everything but the frequency range of about 38kHz which carries the signal. Other light (ambient etc.) which has not a 38kHz component is blocked.
35kHz and 38 kHz receivers are the most common, I have also seen 40kHz. After de-modulation the signal very often has a speed of 9600 bps.
It would therefore be useful to have this setting configurable...
Who is online
Users browsing this forum: No registered users and 3 guests