I found a photo-diode and I'm trying to use it to decode the signals from various IR remote control. I managed to connect it to my RPi to get a signal using a busy loop in a python script but now I want to decode those signals using ir-keytable. I edited the /boot/config.txt file, uncommenting dtoverlay=gpio-ir,gpio_pin=17. I'm sure I'm using the correct pin as my script no longer works (as the PIN is no longer free for GPIO), but when I launch ir-keytable using that command:

sudo ir-keytable -v -t -p all

nothing happens, and I tried almost all the remote controls in my house. When my script was working, I was able to see a pattern in the signal depending on the button pressed but for some reason, it's not detected as one of the protocols supported by my RPi. I guess it could be related to my wiring or the photo-diode. Do someone has a suggestion to debug/fix that?

I also bought a ir-set-5mm-emitter emitter/receiver pair but I don't know how to use/wire it and it doesn't work with the same wiring as the unknown photo-diode. I even don't know which one is the receiver and/or if they are damaged.

When I saw the result of the busy-loop, I was confident and spoke to my kids of a project that we could do and they are verry enthusiasts, so I just want it to work now.




1 Answer 1


I looked how IR receiver modules are built and I saw they have a demodulator and then, I understood the 38 KHz signal was only the envelop and the message is sent by bursts. That's why it cannot work with a simple photo-diode. I guess I will have to buy an IR receiver module. Is there one of them that is known to be more versatile and work for more remote controls?


  • 38 KHz signal was only the envelop ... no, the 38 kHz signal is the carrier ... the data is the envelope ... btw, KHz is Kelvin Hertz ... kilo is lower case k ... also, don't ask questions inside an answer
    – jsotola
    Feb 15 at 17:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.