Page 1 of 1

Does IRremote work at 56Khz

Posted: Thu Dec 05, 2013 11:15 am
by jayo
Does anybody know if the IRremote library works reliably at 56KHz?

I dont have a scope to look at the output, but the code states that for the enableIROut function
This routine is designed for 36-40KHz; if you use it for other values, it's up to you
// to make sure it gives reasonable results. (Watch out for overflow / underflow / rounding.)
Just wondering if anybody has any experience trying to drive it at 56Khz?

Re: Does IRremote work at 56Khz

Posted: Thu Dec 05, 2013 11:32 am
by AnalysIR
Interesting question. It is not too common to have 56kHz modulation, but clearly for Milestag like devices it is.
Unfortunately, we haven't used IRremote or IRLib for 56kHz yet. If I get some time later I will try it out on the oscilloscope.

The thing to consider is that 56kHz is just under 18 uSecs period (17.857 uSecs) or 9 usecs HIGH/9 uSecs LOW (@50% modulation). Given that IRremote uses 33% duty cycle by default, it would work out at circa 6 uSecs HIGH and 12uSecs LOW.

These timings are within the scope of Arduinos with ATMega class MCUs or better running at 16MHz.

If an example is not available for IRremote, then check out the article below which shows how to adjust things etc.

http://bluepichu.wordpress.com/2012/07/ ... uino-fast/


If you get it working, post back an example.

Also, to get the max range for your devices, generating high quality modulation with optimum duty cycle tuned for your receivers & data stream will get you the best range (plus really good optics of course).

Re: Does IRremote work at 56Khz

Posted: Thu Dec 05, 2013 11:59 am
by AnalysIR
Good news it works fine with IRremote.

The images below were generated from a Nano running at 16Mhz with a relatively innacurate resonator (vs more accurate crystal). Note the duty cycle is 33% as I said above and can be adjusted in the library by ammending one definition as required.

Good to know this for future reference.
(dont mind the spikes on the signal, they are likely due to the breadboard & wires used.)

Re: Does IRremote work at 56Khz

Posted: Thu Dec 05, 2013 12:59 pm
by jayo
Excellent, thanks for that.

Time to start experimenting with the Duty cycle.

Have managed to arrange to borrow a scope so should be able to see how it works out