IR signal speed
shmow
Posts: 109
Hello All,
I'm trying to duplicate my TV remote with a propeller.
I have the prop wired to an IR emitter, and I have
a 56.9kHz IR receiver reading the emitter's signal
(and showing the result with an oscilloscope).
I'm stumped regarding the output speed; I know the propeller is fast enough.
But, I can't get the IR emitter to signal a change in state fast enough, particularly when the receiver
is reading the low states - see attached jpeg for a better understanding.
Below is the code.
If you have any suggestions then please let me know.
regards,
Shmow
VAR
byte PulseTime
OBJ
BS2 : "BS2_Functions"
PUB Main
BS2.start(31,30)
dira[noparse][[/noparse]0]~~
PulseTime:= 1 'this is where the change state signal should be 1ms but it's more like 3ms (see attached oscillascope image)
repeat
if ina == 1 'when button pressed - sends "down" - as in scroll down guide - signal to satellite box receiver
DownPulse
bs2.pause(5)
DownPulse
repeat 4
bs2.pause(3)
DownPulse
bs2.pause(2)
DownPulse
PUB DownPulse
BS2.FREQOUT(0, PulseTime, 56900) 'down
I'm trying to duplicate my TV remote with a propeller.
I have the prop wired to an IR emitter, and I have
a 56.9kHz IR receiver reading the emitter's signal
(and showing the result with an oscilloscope).
I'm stumped regarding the output speed; I know the propeller is fast enough.
But, I can't get the IR emitter to signal a change in state fast enough, particularly when the receiver
is reading the low states - see attached jpeg for a better understanding.
Below is the code.
If you have any suggestions then please let me know.
regards,
Shmow
VAR
byte PulseTime
OBJ
BS2 : "BS2_Functions"
PUB Main
BS2.start(31,30)
dira[noparse][[/noparse]0]~~
PulseTime:= 1 'this is where the change state signal should be 1ms but it's more like 3ms (see attached oscillascope image)
repeat
if ina == 1 'when button pressed - sends "down" - as in scroll down guide - signal to satellite box receiver
DownPulse
bs2.pause(5)
DownPulse
repeat 4
bs2.pause(3)
DownPulse
bs2.pause(2)
DownPulse
PUB DownPulse
BS2.FREQOUT(0, PulseTime, 56900) 'down
Comments
This article (I wrote for N&V) may help: http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp4.pdf
The second half of the article gets into transmission. If you tell me what protocol you're trying to emulate I may already have some code written, or can whip something up as I have frameworks in place.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA
Post Edited (JonnyMac) : 4/25/2010 6:46:44 PM GMT
I'll have a run at it without the emulation; I'm sure you'll be hearing from me again on this topic.
Regards,
Shmow
-Phil
I got caught by this very recently when I was replicating the IR output from one of my air conditioner remotes (it sends ~108 bits in a modified NEC protocol). I was having reliability issues getting the AC to accept the command, yet I was transmitting precisely what the output of the receiver was to within about 100nS. When I thought about it and took the on-time lag into account manually, suddenly it became 100% reliable. What I meant to do was pop the top of the remote and actually measure the timing at the transmit led, but I just put an arbitrary fudge factor into each on pulse and that worked.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Are you suggesting coconuts migrate?"