Oxymoronic Wired I/R keypad
JRetSapDoog
Posts: 954
Recently, I've been using Bob Belleville's·IR kit to do some remote control with the Propeller.· It works well with three different apparently·NEC-based remotes that I've tested.· I pulled the IR sensor out of consumer device and don't have the specific data for it, but it seems to work fine at 3.3V instead of the 5V that it originally used.· I still use a 4.7K ohm resistor on the input pin to the Propeller·as was recommended for 5V operation in Bob's readme file (and he had mentioned that at least one particular sensor was rated for lower voltage operation).· Well, that's all just a very·loosely-related background, but it got me thinking as follows.
I'm wondering if I could use a wired version of remote control, replacing the through-the-air IR light signal with an electrical signal through a cable.· That is, I'm wondering if, on the transmitter end,·I could tap into the IR circuit of a remote control and send the output signal directly to the Propeller through a wire,·either by [noparse][[/noparse]1] a direct connection with the IR output of the IR encoder chip and removing the IR LED,·[noparse][[/noparse]2] replacing the IR LED with a high-value·resistor to ground (to possibly save power),·or [noparse][[/noparse]3] leaving·the diode·in but "ignoring" (not using/receiving) the light.· I think a lot of remotes run on about 3V, so maybe I can power the IR encoder from the same source as the Prop.· Then, on the receiver end, I'd skip the IR sensor and connect the IR encoder output signal (possibly through a small current-limiting resistor) into a Propeller pin configured for input.·
But, unfortunately,·I guess the problem with all·that would be that the IR encoder's output signal would still have the carrier wave, which I assume that the IR sensor has the smarts to remove (these days), leaving only the data pulses.· Without the carrier wave, perhaps I could have used the same decoding software unmodified (though I'm not perfectly sure).· But with the carrier wave still present, I guess that means that I'd have to remove·it in software, right?· And I'm guessing that this task would be more suitable for PASM rather than SPIN, though I'm not sure.· Okay,·actually, when I thought of this idea, I didn't think about the carrier and only just considered it on writing this post, but I'm still interested in knowing more.
"What's the point of wired IR control?" you ask.· Well, I was·thinking that such an interface could allow for a 1-pin keypad/keyboard similar to Cluso's 1-pin PS/2 keyboard, only using an IR encoder chip instead of a PS/2 keyboard encoder.· Both include the circuitry to scan the rows and columns of a keyboard.· As crazy as it may sound/be, I'm thinking about trying to make my own keyboard (for aesthetic and other purposes) and so need some kind of encoder, whether it be a PS/2 one or perhaps an IR encoder.· I don't need the range or freedom of an I/R interface as the keypad/keyboard will be used close to the Prop and a short three-conductor cable is okay (signal, pwr and gnd).· I just need it to use as few Propeller pins as possible, preferably 1 or·2.· Anyway, I'm wondering if anyone has·done anything similar, or if there's a flaw in the plan (other than the carrier wave (which may be a deal-breaker)) that I've overlooked, or if there are any related links that anyone knows of.·
Alternately, if dealing with the carrier wave mentioned above turns out to be too problematic, does anyone have other suggestions for keyboard encoders, either PS/2-based or otherwise?· Perhaps there are other kinds of keyboard encoders available other than PS/2 ones that might be of interest, I don't know.· Or, if using·PS/2, I wonder if there is a standard "go to" chip for the encoding.· Of course I can rip one out of a keyboard, but I'm wondering if there's a standard chip that will likely·be around for awhile and that is readily available.· That's kind of a different topic than the original, but it's consistent with my goal of making my own keyboards.· So comments on either the IR approach even with the carrier wave issue or simply general encoders would be appreciated, or just anything that this thread conjurs up, directly related or otherwise.· Thanks.· --Jim
Post Edited (JRetSapDoog) : 5/28/2010 6:57:13 PM GMT
I'm wondering if I could use a wired version of remote control, replacing the through-the-air IR light signal with an electrical signal through a cable.· That is, I'm wondering if, on the transmitter end,·I could tap into the IR circuit of a remote control and send the output signal directly to the Propeller through a wire,·either by [noparse][[/noparse]1] a direct connection with the IR output of the IR encoder chip and removing the IR LED,·[noparse][[/noparse]2] replacing the IR LED with a high-value·resistor to ground (to possibly save power),·or [noparse][[/noparse]3] leaving·the diode·in but "ignoring" (not using/receiving) the light.· I think a lot of remotes run on about 3V, so maybe I can power the IR encoder from the same source as the Prop.· Then, on the receiver end, I'd skip the IR sensor and connect the IR encoder output signal (possibly through a small current-limiting resistor) into a Propeller pin configured for input.·
But, unfortunately,·I guess the problem with all·that would be that the IR encoder's output signal would still have the carrier wave, which I assume that the IR sensor has the smarts to remove (these days), leaving only the data pulses.· Without the carrier wave, perhaps I could have used the same decoding software unmodified (though I'm not perfectly sure).· But with the carrier wave still present, I guess that means that I'd have to remove·it in software, right?· And I'm guessing that this task would be more suitable for PASM rather than SPIN, though I'm not sure.· Okay,·actually, when I thought of this idea, I didn't think about the carrier and only just considered it on writing this post, but I'm still interested in knowing more.
"What's the point of wired IR control?" you ask.· Well, I was·thinking that such an interface could allow for a 1-pin keypad/keyboard similar to Cluso's 1-pin PS/2 keyboard, only using an IR encoder chip instead of a PS/2 keyboard encoder.· Both include the circuitry to scan the rows and columns of a keyboard.· As crazy as it may sound/be, I'm thinking about trying to make my own keyboard (for aesthetic and other purposes) and so need some kind of encoder, whether it be a PS/2 one or perhaps an IR encoder.· I don't need the range or freedom of an I/R interface as the keypad/keyboard will be used close to the Prop and a short three-conductor cable is okay (signal, pwr and gnd).· I just need it to use as few Propeller pins as possible, preferably 1 or·2.· Anyway, I'm wondering if anyone has·done anything similar, or if there's a flaw in the plan (other than the carrier wave (which may be a deal-breaker)) that I've overlooked, or if there are any related links that anyone knows of.·
Alternately, if dealing with the carrier wave mentioned above turns out to be too problematic, does anyone have other suggestions for keyboard encoders, either PS/2-based or otherwise?· Perhaps there are other kinds of keyboard encoders available other than PS/2 ones that might be of interest, I don't know.· Or, if using·PS/2, I wonder if there is a standard "go to" chip for the encoding.· Of course I can rip one out of a keyboard, but I'm wondering if there's a standard chip that will likely·be around for awhile and that is readily available.· That's kind of a different topic than the original, but it's consistent with my goal of making my own keyboards.· So comments on either the IR approach even with the carrier wave issue or simply general encoders would be appreciated, or just anything that this thread conjurs up, directly related or otherwise.· Thanks.· --Jim
Post Edited (JRetSapDoog) : 5/28/2010 6:57:13 PM GMT
Comments
Or you can replace the IR diode with a filter that removes the carrier frequency. (Or you add the IR receiver directly in opposite to the IR diode ;o)
Or you use a standard keyboard and modify it instead of building a new one from scratch. Then you can use the 1 pin driver.
Update:· I did some more reading about I/R encoder techniques and chips and was surprised to learn that some remote contol devices·are using microcontrollers instead of dedicated encoder chips, just like MagIO2 suggested.· The pricing works out about about the same, and the flexibility and sourcing stability with a microcontroller can be higher.· I didn't realize that certain microcontrollers, such as 8-bit ones,·can be had so·cheaply, such as under a dollar.· Well, come to think of it, I have seen posts on this forum mentioning companion controllers for use with the Prop in the two-dollar and under range,·including a PIC-based one·for·well under a buck (probably in quantity).··Well, such solutions are probably more applicable to Prop projects going into mass production and where other related peripherals are hanging off the Prop at a distance·on a simple cable.·
Post Edited (JRetSapDoog) : 6/18/2010 3:20:53 AM GMT