Infrared remote controller 32T4

Hi, I’m having some troubles when trying to setup an infrared remote control for the raspberry. i’ve been following this tutorial Raspberry PI: XBMC Home Media Player - Adding IR Remote Control - YouTube but when I run dmesg in order to see if the IR receiver is detected it does not show up. Do I need to install some libraries in OSMC in order to make it work or something?
Thanks

EDIT: The material I’m using are:

  • IR Receiver 32T4
  • 4.7uF capacitor
  • 220ohms resistor

The IR receiver schematics is:

Connection is done this way:

  • 1 to 5V
  • 2 to GND
  • 3 to physical pin 12 (gpio 18)

Result:

In my and others experience the capacitor and resistor are NOT needed, just wire the IR receiver directly to the gpio pins. OSMC comes with a variety of config files for the most commonly used remotes. Check that gpio IR is enabled in MyOSMC>Config then select your remote in MyOSMC>Remotes

I’ve figured out that there was a connection problem (the 3.3v power cable was disconnected) now it is detecting. I’ve created the config file, but it is not working.
I disabled CEC, then enabled LIRC GPIO support and set up correctly the pin numbers, and finally went to MyOSMC>Remotes>Browsed the lirc.conf I’ve created when recording the key buttons.
I did everything but it is not working. What could the problem be? Thanks

EDIT: Now it started working, but it did just for a moment (about one minute) and the stopped.

EDIT2: I think it is now working fine. It’s my assumption that my IR Receiver needs 5V and It was connected via 3.3V so it worked for a while when the capacitor was charged, but then it needed some time to charge again (i’m not quite sure if that is completely true xD, just assuming).

So I’m going to leave here just in case someone else buy the same IR receiver. I didn’t find the specifications for it over internet so I’ll leave in the first post what I did in order to make it work.

I would recommend buying a different receiver that is designed to be able to work directly from 3.3v - if you power it from 5v it may damage the GPIO data line which goes directly to the main CPU.

I recommend the TSOP38238 - I use one on my Pi 2 and it works very well and is very sensitive.

Hmm can you explain why could that happen? That was the only one I could find in my city. Thanks

Not all IR receivers are the same - there are dozens of different models that have different operating voltage ranges, different sensitivities and output signal currents, different degrees of daylight and artificial light rejection, different centre frequencies (most use 38Khz which is the most common for IR remotes but not all are 38Khz) and so on. Have a look at the spec sheets for the one I suggested and yours and you will probably find there are considerable differences.

So while many models will work with the Pi some work better than others in this application and some will not work reliably at all.

Yes of course, but there is a problem I could not find any spec sheet for my model. That is the reason why I left here some kind of guide in case somebody buys the same Ir receiver.
But now according to what you said in the previous message, why is there a problem if I connect something to the 5v pin? It makes no sense, why would they put that pin if you cannot use? I need an answer to this because I don’t want to damage my raspberry pi, so if it is risky I’ll have to make some modification. Regards

I suggest you do some background reading on the GPIO header on the Pi.

Just because there is a 5v supply as well as 3.3v available on the GPIO header does not mean that its safe to feed 5v into the GPIO data lines - it is not and they can be damaged by doing so as they are 3.3v data lines.

By your reasoning there shouldn’t be any pins on the GPIO header that would cause harm if you connected them together improperly - that’s not the way electronics work unfortunately.

Take a screwdriver and short out a whole bunch of the GPIO pins (don’t do this!) and you will damage your Pi for certain.

Of course if I make the connections improperly there will be some shot circuit. But I don’t see why you think that it may harm the GPIO, I’m using the 5V GPIO in order to feed the IR Receiver, (not the other way as you said “…does not mean that its safe to feed 5v into the GPIO data lines”). I’m not arguing, I just want to know if I am that much wrong, or it is you who is wrong or aren’t explaining properly.

Again, I’m just using this physical GPIOs: number 2 (5v), number 6 (GND), and 12 (GPIO 18). I think that there is no harm in here. Sorry for being repetitive.

Regards

The GPIO IO pins are designed to work with 3.3v signalling not 5v, if you power your IR receiver from 5v the output signal from this receiver sent into the GPIO IO pin will exceed 3.3v - typically it will be 4 to 4.5v. This is outside the allowable safe voltage range for the GPIO lines and can easily damage them. As the GPIO lines go directly into the SoC (system on chip) this will damage your Pi irreversibly.

Depending on the output current limit of the IR receiver it may not actually damage the GPIO line but as you have said yourself, you do not have a data sheet for your receiver so you basically know nothing about it and are therefore taking a big risk connecting it directly to the GPIO line and powering from 5v at the same time. I would certainly not be taking the chance on my Pi.

Many IR receivers will not function when run from 3.3v so some people recommend running them from 5v and adding a safety resistor in series with the signal to the GPIO line - as someone with an electronics background I do not agree with this approach and consider it an ugly “hack” that you might get away with, but it is not the proper or safe approach.

This is why I recommend a TSOP that is designed to be able to run from 3.3v that can be connected directly without performance or safety issues.

You can choose whether to take my advice or not, that’s up to you, I’m not going to continue to argue with you on the point any further. I’m just trying to help you avoid blowing up your Pi, not sell you a used car or a holiday home. :wink:

Thank you very much, now I got what you were trying to say. I’ll definitely stop using that receiver then. Thanks again!