iguanaworks / iguanair

Iguanaworks USB IR Project: firmware and software
http://www.iguanaworks.net
23 stars 12 forks source link

pulses are consistently short #5

Open IguanaBen opened 9 years ago

IguanaBen commented 9 years ago

Reported by jdunn on 22 Jun 2009 12:46 UTC It appears that somewhere during the changes from 0x0004 to 0x0102 a bug was introduced that makes the signals approximately 12[pct] shorter than intended. I have not yet measured this myself, but it seems quite believable.

IguanaBen commented 9 years ago

Commented by bluey on 1 Sep 2009 02:01 UTC We should test 0306 and close this if all is well (or fix if not)

IguanaBen commented 9 years ago

Commented by jdunn on 5 Aug 2010 01:53 UTC Tested on 0x306 and this does not appear to be true (anymore?). Tested by sending:

pulse 8000
space 8000
pulse 4000
space 4000
pulse 2000
space 2000
pulse 1000
space 1000
pulse  500
space  500
pulse 8000

Received data looks like

pulse    8064
space    7978
pulse    4010
space    3968
pulse    2005
space    1962
pulse    1024
space     960
pulse     512
space     469
pulse    8021

pulse    8063
space    7957
pulse    4010
space    3946
pulse    2026
space    1941
pulse    1024
space     960
pulse     512
space     448
pulse    8042

pulse    8064
space    7957
pulse    4053
space    3968
pulse    2026
space    1962
pulse    1024
space     960
pulse     512
space     448
pulse    8042

All tests were done at 38kHz so that a second USB device could receive the signals cleanly. If anything the pulses are a touch long and the spaces a touch short. Test should be repeated at 56kHz, and should be checked with a scope, but this is no 12[pct] and is more likely a quantization issue. At 38kHz the signal is quantized into 26us periods. The receiver is known to take a cycle or two to pick up a pulse and might take a similar time to decide the pulse is complete. Only an oscope will say for certain.

IguanaBen commented 9 years ago

Commented by bluey on 5 Aug 2010 15:01 UTC I can confirm that the pulses are just right and the spaces are too short. The carrier frequency is just right. See attached file (IG1.jpg).

The pulses are right. I send 263 uS pulses and spaces and the pulses are all exactly 10 cycles. Repeat with 132 uS and I get exactly 5 pulses. The spaces are wrong however.

In IG3.jpg, we see te space is 5.5 cycles long, not 5. In IG2.jpg, it is 10.5 cycles long. So there is a logic issue with probably starting on a space for timing or something like that.

IguanaBen commented 9 years ago

Commented by bluey on 5 Aug 2010 15:05 UTC So, remaining issue is why when we 'look' at that signal we see spaces too short and pulses too long. Next thing to look at is if the IR receiver outputs wrong or if our read of that output is wrong.

IguanaBen commented 9 years ago

Commented by bluey on 5 Aug 2010 19:18 UTC Ok, whatever is wrong with the space widths is a function of the carrier frequency. See latest attachments.

IguanaBen commented 9 years ago

f0005tek ig2 ig3 ig1 f0004tek