I am attempting to use an old Phillips remote control as a button matrix. I do not want to make use of an IR receiver, I am simply trying to read straight from the PCB of the remote.
My first thought was to remove the IR LED and connect outputs of the LED to the Arduino with a pull-up resistor like so:
Not my aera of expertise but it might be the protocol that is used by the remote. I have an old remote that supports a number of protocols; they are all unknown to me. In some of those protocols, I receive varying 'keys' for the same key on the remote.
Note that this is with a remote that still has the IR functionality.
The remote sends code on a modulated 38kHz carrier. The common IR receiver strips out the 38kHz leaving only the code to be interpreted by whatever. What you're getting is the modulated signal, the narrow pulses in the rectangles below.
An interesting idea. Here SB-Projects - IR Index there is very good information about IR remote control. A few years ago I wrote a short program for managing a remote control. Now I changed my code to read the signal directly from the remote control and to filter the modulation with frequency 38kHz. I use an Arduino Nano and some old 5-button remote control with NEC protocol.
// Идеята е сигнала да се взима с кабел директно от дистанционното, което да се ползва като клавиатура с интерфейс по само 1 пин.
const byte IRpin = 2; // pin2 interrupt0 ● pin3 interrupt1
volatile boolean remote = false;
volatile unsigned long irCode = 0;
/*
ATmega328
VCC = 2.7V to 5.5V
Input low voltage, except XTAL1 and RESET pin
VIL –0.5 +0.3VCC V
Input high voltage, except XTAL1 and RESET pin
VIH 0.6VCC VCC + 0.5 V
IR YS-199 5 button (PCB 15 button) DW6122-82 inside (with 47kΩ on CRS pin) NEC protocol
Модулацията с честота 38kHz (~26.32µs) да се филтрира програмно.
*/
void remoting () // wired YS-199 NEC
{
if ( remote )
{
remote = false;
unsigned long T;
for ( byte n = 0; n < 32; n ++ )
{
do
{
T = pulseIn ( IRpin, HIGH, 2200 );
}
while ( T < 64 );
bitWrite ( irCode, n, T > 1120 );
}
}
}
void setup ()
{
Serial.begin ( 115200 );
Serial.println ( F ( "\n\tReady for keyboard reading!\n" ) );
pinMode ( IRpin, INPUT_PULLUP );
attachInterrupt ( digitalPinToInterrupt ( IRpin ), remoting, FALLING );
}
void loop ()
{
if ( irCode )
{
Serial.println ( irCode, HEX );
irCode = 0;
}
delay ( 40 );
remote = true;
}
/*
Serial Monitor
EB14FF04
E817FF04
E31CFF04
FE01FF04
FD02FF04
FC03FF04
FB04FF04
FA05FF04
F906FF04
F807FF04
F708FF04
F609FF04
EF10FF04
FF00FF04
EE11FF04
*/