marian42
Posts: 51
Joined: Mon Jul 15, 2013 2:11 pm

LIRC: Sending IR commands

Fri Oct 04, 2013 11:33 pm

Hi,

I'd like to remote control my stereo with the Pi.
I followed several tutorials and I managed to record an lircd.conf for my IR remote.
The IR receiver is connected to pin 18 (between GND and RXD).
Sending IR commands doesn't work but I managed to run the command "sudo irsend SEND_ONCE sharp POWER" without any errors. What pin do I have to connect the IR LED to? I'm using this setup (except the Pi pins are different ones). Instead of an IR LED I'm currently using a visible one to check if there is a signal at all. I checked the transistor circuit by connecting the signal pin to GND and 3V, this works as well. But still the LED stays dark for any pin when running the irsend command.

mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: LIRC: Sending IR commands

Sat Oct 05, 2013 7:08 pm

Hi,

I don't like looks of that circuit you linked to. First of all there is no resistor on he base of the transistor possibly straining the output from the RPi too much. Secondly there is no current limiting resistor in the path of the IR leds possible frying the transistor and/or the LEDs.

Take a look at this circuit which is almost as simple and will work with your Pi not causing mayhem and fires.

Best regards
Martin
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.

marian42
Posts: 51
Joined: Mon Jul 15, 2013 2:11 pm

Re: LIRC: Sending IR commands

Sat Oct 05, 2013 7:23 pm

Okay, I will use this circuit. But for now, I'm just testing if there is a signal at all with only a red LED and a resistor. But I don't even know for sure which pin I have to use.

User avatar
FTrevorGowen
Forum Moderator
Forum Moderator
Posts: 5581
Joined: Mon Mar 04, 2013 6:12 pm
Location: Bristol, U.K.
Contact: Website

Re: LIRC: Sending IR commands

Sat Oct 05, 2013 8:35 pm

marian42 wrote:Okay, I will use this circuit. But for now, I'm just testing if there is a signal at all with only a red LED and a resistor. But I don't even know for sure which pin I have to use.
FWIW I adapted alex's circuit as part of my experimenting with a "Humble Pi" board, my notes are here:
http://www.cpmspectrepi.webspace.virgin ... board.html
and here:
http://www.cpmspectrepi.webspace.virgin ... blePi.html
Like yourself I'm (temporarily) using a "visible" LED rather than IR LED(s) but driving it via one section of a "level converter"
(http://www.phenoptix.com/collections/ad ... ter-bss138)
IIRC Alex used gpio 22 as an output, whereas I'm using gpio 24 (only partially tested, so far).
HTH,
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm

marian42
Posts: 51
Joined: Mon Jul 15, 2013 2:11 pm

Re: LIRC: Sending IR commands

Sat Oct 05, 2013 9:55 pm

How did you change the pin that LIRC uses?
And are you referring to the GPIO pin numbers (as in this picture)?

mba
Posts: 110
Joined: Fri Jun 08, 2012 7:05 pm
Location: Denmark

Re: LIRC: Sending IR commands

Sun Oct 06, 2013 7:24 am

You specify which pins you use when loading the driver. Look in /etc/modules. In my modules I have the following line:
lirc_rpi gpio_out_pin=17 gpio_in_pin=18
These numbers correspond to the gpio numbers on the pin header. Make sure you know which revision of the Raspberry Pi you are using because some pins has changed.

I have written a small tutorial on how to configure LIRC on Raspberry Pi.

Best regards
Martin
AMOTE - a LIRC client for Android. Build your own Android-based universal remote.

marian42
Posts: 51
Joined: Mon Jul 15, 2013 2:11 pm

Re: LIRC: Sending IR commands

Sun Oct 06, 2013 11:34 am

Okay it works now!

Thanks everyone!

Return to “Troubleshooting”