IR Remote via Prop chip
I'm trying to turn my waterproof, cordless phone into a remote control for my media center.· I have the phone end of it working, I'm using a dtmf decoder to get a bcd value out of my phone, and inputting it into the prop.· I'm trying to figure out how to input the codes from each remote into the prop chip, and then be able to send them back out through a couple of IR LED's.· I hooked up an IR receiver to an input pin of the prop chip, and I thought the best way to store the code was when it saw the input for the IR receiver it started to record and store the waveform into an array of longs.· And then when I needed to call that code, it would basically read back that array in the same way it stored the data, and would modulate the IR LED to recreate the same waveform.· I hooked a scope up to it and the waveforms are similar, but it doesn’t seem like the resolution I'm trying to record it at is high enough.· I don’t have the code on me right now, but I was thinking that the prop chip would be more than fast enough to record the signal.· I'm not sure if I just have inefficient code, or maybe I'm just going about this the wrong way.·
·
Maybe someone out there has tried to do something similar to what I'm trying to do and already has code that works.· I don’t have the code with me right now, but if anyone has any ideas on a better way to store/transmit the code I would love to hear your ideas.
·
The reason I came up with this idea is because I have a hot tub outside with outdoor speakers connected to my media center.· If the cd ends, or you need to change the volume, you need to try off, go inside, change it, come back out and see if it’s where you want it.· I can think of a lot of other uses for this, maybe once I figure out how to use the caller ID I can create some feedback or information back to the phone.· And maybe if I'm ambitious enough, I'll throw something in my light switches so I can toggle/ dim those from the phone/remote as well.
·
Maybe someone out there has tried to do something similar to what I'm trying to do and already has code that works.· I don’t have the code with me right now, but if anyone has any ideas on a better way to store/transmit the code I would love to hear your ideas.
·
The reason I came up with this idea is because I have a hot tub outside with outdoor speakers connected to my media center.· If the cd ends, or you need to change the volume, you need to try off, go inside, change it, come back out and see if it’s where you want it.· I can think of a lot of other uses for this, maybe once I figure out how to use the caller ID I can create some feedback or information back to the phone.· And maybe if I'm ambitious enough, I'll throw something in my light switches so I can toggle/ dim those from the phone/remote as well.
Comments
You can use an IR receiver / demodulator chip ( or can probably demodulate raw IR in software - a separate Cog should do it ) and then store the lengths of the control signal pulses and the gaps in between. These can be adjusted to whatever length they should be to take out any shrink and stretch. The underlying frequency of the carrier can also be determined and stored if doing the demodulation yourself.
Playback is simply pulsing the IR LED at the the right carrier frequency, modulated by whatever the control signal should be.
This works fine for Sony IR protocols, RC5 and similar but if you have anything using IrDA you might have to take a different approach.
Simply sampling, storing and playing back a captured IR signal should work if you have enough samples to get the timing right but that can quickly eat up memory.