Forum
GPIO IR Sensor - Not working - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Hardware (/forum-7.html)
+--- Forum: Remotes and CEC support (/forum-26.html)
+--- Thread: GPIO IR Sensor - Not working (/thread-2149.html)



GPIO IR Sensor - Not working - IYellowSnowI - 2nd Mar, 2014 07:24 AM

Software
XBian version: Latest
XBMC version: Latest
Overclock settings: Turbo

Hardware
Power supply rating: 5V @2A
RPi model (model A/B 256mb/512mb): Model B 512MB
SD card size and make/type: Transcend 8GB Class 10 SDHC
Network (wireless or LAN): LAN
Connected devices (TV, USB, network storage, etc.): Powered USB 2 Hub (with USB Flash Drive running the OS), TV via HDMI (older Samsung that does not support CEC), Network drive via Samba share

Problem description:

I ordered these parts (from adafruit) and tried setting up the sensor/remote with the instructions on the wiki.

It tells me to run the following commands via SSH:
Terminal
xbian@xbian:~# sudo su
root@xbian:~# /etc/init.d/lirc stop
root@xbian:~# mode2
And after I run the "mode2" command, nothing happens, and I either wait a long time or reconnect via SSH to do anything. I pressed every button on my remote at least twice, around 5 inches in front of the sensor.

I've tried different things, such as this post related to Logitech Harmony issues, but still get nothing when I try to run the mode2 command.

I tried running (from this thread):
Terminal
sudo modprobe lirc_rpi
sudo kill $(pidof lircd)
sudo mode2 -d /dev/lirc0
but still get no output after the mode2 command.

I ran these commands:
Terminal
sudo lsmod
sudo modprobe lirc_rpi
sudo lsmod
and one of the results was:
Terminal
Module Size Used by
lirc_rpi 4756 3
lirc_dev 6580 1 lirc_rpi
so I think that means the sensor is being detected.

I've changed the wires connecting to the IR sensor several times, making sure they are in the correct place. I used a camera to see if the IR remote was working (and it appears so). I am wondering if my sensor is "dead" or if I am doing something wrong (most likely). Is there a way I can know if the IR sensor is working or not?


RE: GPIO IR Sensor - Not working - CurlyMo - 2nd Mar, 2014 09:46 AM

No it means the kernel module loaded correctly. If mode2 doesn't output anything when pressing buttons, then your connections are wrong.


RE: GPIO IR Sensor - Not working - IYellowSnowI - 2nd Mar, 2014 12:24 PM

(2nd Mar, 2014 09:46 AM)CurlyMo Wrote:  If mode2 doesn't output anything when pressing buttons, then your connections are wrong.

I connected the IR sensor the same way it is connected in this diagram. Is this how it's supposed to be connected?


RE: GPIO IR Sensor - Not working - CurlyMo - 2nd Mar, 2014 07:08 PM

Can you connect a led in between the sensor and the RPi to see if it's working?


RE: GPIO IR Sensor - Not working - IYellowSnowI - 3rd Mar, 2014 08:48 AM

(2nd Mar, 2014 07:08 PM)CurlyMo Wrote:  Can you connect a led in between the sensor and the RPi to see if it's working?
I don't have any LEDs lying around, but I hooked up a voltmeter and was getting 3.3V on the sensor.


Re: GPIO IR Sensor - Not working - CurlyMo - 3rd Mar, 2014 10:18 AM

That doesn't say anything, because it can be an active high or active low sensor.


Re: GPIO IR Sensor - Not working - f1vefour - 3rd Mar, 2014 04:53 PM

Try it on the raspberries 5v power output.

Top right pin instead of the top left.


RE: GPIO IR Sensor - Not working - IYellowSnowI - 4th Mar, 2014 02:32 PM

(3rd Mar, 2014 04:53 PM)f1vefour Wrote:  Try it on the raspberries 5v power output.

Top right pin instead of the top left.

Tried that. Still got nothing over mode2. I installed Raspbmc and tried to get it working (both on the 3.3V and the 5V), but mode2 was still giving me nothing. I'm gonna see if I can get the sensor replaced.


Re: GPIO IR Sensor - Not working - CurlyMo - 4th Mar, 2014 03:55 PM

I also think the sensor is broken.