-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frequency accuracy #32
Comments
Thanks, this sounds really promising :) I've been struggling with the poor range, and haven't really had an idea why it was so poor. Seems like integrating with IRremoteESP8266 would not be that hard, but this of course brings in a dependency into another library. |
Is it only working on esp8266? Or arduino will also be affected? |
I think the accuracy was poor only on ESP8266. On Arduino you are much closer to the 'bare metal' |
Hi Can any of you guys please attach their edited versions of the IRSender.h and IRSender.cpp ( im assuming those are the ones in question) |
Hi, My Mitsubishi FD seems to be very sensitive to the exact frequency of the signal (apparently uses a very steep band pass filter to eliminate interference), so I would like to try this fix. |
I merged in the IRRemoteESP8266 change from the 'dev' branch, let me know if it works better. |
Thank you for your immediate response. Unfortunately I cannot test in my current project (ESPEasy + P115) as the current version of IRRemoteESP8266 (v2.42) is incompatible with the one used in ESPEasy (patched 1.2.0). I will have to create a test project and try that, but it will take me some time. |
Today I took the latest ESPEasy from the 'mega' branch, added src/_P115_HeatpumpIR.ino from the ESPEasy playground, added the latest HeatpumpIR into lib/HeatpumpIR and tried to compile (it didn't). The version of IRRemoteESP8266 is really old, so I needed to apply this change to HeatpumpIR library:
After this change the ESPEasy compiles, but it still uses the 'bitbang' method for PWM. If you change line 94 on the plugin code to this:
... it should use the IRremoteESP8266 PWM implementation. I didn't try with a real heatpump device, but at least my red led is blinking, so there's a very good chance this might work. |
I will be away for a couple of weeks, so I cannot test. But I will when I get back. IIRC the version in ESPEasy does not include the timing enhancements discussed here (it is a patched v1.2.0), but I will test nonetheless. In the mean time I took a different route. I "copied" the logic from IRremoteESP8266 simplifying the code where necessary (e.g. duty cycle is always 50%). There was only a slight improvement in range. The calibrated period was 22 uS (instead of 26 uS) but that didn't make much difference. So I'm starting to think my issue might not be related. I will post the code in case you want to include it. |
Latest ESPEasy Mega also works with latest IRremoteESP8266 + P115 if you delete plugin files _P015_IR.ino and _P035_IRTX.ino. So this way you can use the latest IRremoteESP8266 'as is'. |
Fixed in #73 |
I was looking for a library to control my AC from an ESP8266 and this one worked on the first try. Thank you for this! (I have a Carrier compatible AC)
However, I noticed that with this library I have to point my IR led directly to the AC, otherwise the signal was ignored. I would have assumed I didn't have enough power in my circuit but I noticed something strange: while trying another library (https://github.com/markszabo/IRremoteESP8266) and sending raw codes, even though I couldn't get my AC to work properly, the AC was beeping even with my IR led pointing somewhere else.
So I did a little research and it seems that library makes a better effort with the accuracy of the signal frequency. The authors improved that some time ago to take into account rounding and the time the instructions affects the carrier periods: crankyoldgit/IRremoteESP8266@178b09d
I tested then your library but using a new implementation of the
IRSender
that forwards the calls tomark
andspace
to theIRremoteESP8266
implementation:And the result was amazing :-). I was able to control my AC without having to point my IR led directly.
So, I wonder what's the best approach to improve this in your library as well. Should be shamelessly copy the implementation from IRremoteESP8266?. Should we include the wrapper I just created in your library instead?
The text was updated successfully, but these errors were encountered: