Posts: 1
Joined: Mon Jan 07, 2019 6:05 pm

GPIO-IR with old IR-Receiver from Haupauge-PCI-Card

Mon Jan 07, 2019 6:19 pm

So someone finally sponsored me Raspi for christmas to build our own media center.
Installing LibreElec with Kodi out of the box was really a charm. Getting the right HDMI-Settings for the Samsung-TV was a bit of hassle but I got everything setup and working.
Next step / wish was to get rid of Keyboard and Mouse to a more "Home-Entertainment"-style of control - reusing one of the existing IR-Remotes would be really nice :)
I found some nice tutorials, but I could not get them to work by now, most likely because I did not order an IR-Receptor (like TSOP4838) because I am waiting to place a bigger order with some other stuff....
However I look in my big "junk"-box and to my own surprise I was able to find a IR-Receptor that once came with some TV-Card (some WinTV-Thing) the card is long gone but the cable with the IR-Receptor was still sitting around waiting for a reuse.

So I started to hook the things together:
- cut of the 3-pole headset connector
- attach the wires as follows:
-- 3.3V to red (according to Haupauge-Pinout this one is VCC)
-- GND to shield
-- Signal to black

I think the Receptor is most likely something like a TSOP4838, but I could not get it to work by following this tutorial:
Is there a simple way to test the setup on the electric level?

Posts: 305
Joined: Fri Jun 30, 2017 10:07 pm
Location: Salzburg, Austria
Contact: Website

Re: GPIO-IR with old IR-Receiver from Haupauge-PCI-Card

Wed Jan 09, 2019 1:24 pm

If you have a scope probe the signal pin. It should idle at VCC (3.3V) and go to low when an IR burst is received. With an RC6 (MCE) remote it looks like this:
rc6.png (14.81 KiB) Viewed 655 times
Depending on the IR remote (protocol) the length of the bursts (low signal) and idle times (high signal) are multiples of roughly 500us-1ms. The total length of an IR message is between about 20-60ms (again, depending on IR protocol) and are repeated every approx. 100ms when you hold the button.

If you don't have a scope you can use "ir-ctl -r" to check if you receive a proper signal. You'll get "pulse XXX" (where XXX is the duration in us) on an IR burst (low signal on GPIO input pin) and "space YYY" on idle (high signal on GPIO input pin).

I noticed an odd thing, the gpio-ir overlay seems to enable a pull-down resistor on the input pin - which seems to be a bug. IR receivers like the TSOP34438 have open collector outputs with an internal pull-up (about 30k according to the Vishay datasheet). So the pull-down on the RPi GPIO will work against the pull-up in the IR receiver. As the pull-up in the IR is usually stronger probably noone noticed that so far, but it's certainly not optimal and may cause issues if the pull-up in the IR receiver is weaker.

So, to rule out this issue, it's best if you manually enable the pull-up for now

Code: Select all

so long,


Return to “Interfacing (DSI, CSI, I2C, etc.)”