Raspberry Pi IR Control Expansion Board

From Geekworm Wiki
Jump to navigation Jump to search
Raspberry Pi IR Control Expansion Board sku:449981

Raspberry Pi IR Control Expansion Board sku:449981
Raspberry Pi IR Control Expansion Board sku:449981
Raspberry Pi IR Control Expansion Board sku:449981
Raspberry Pi IR Control Expansion Board sku:449981
Raspberry Pi IR Control Expansion Board sku:449981

Introduction

It is specific for Raspberry Pi IR control expansion board, you can use Pi 3B+/3B/2B/ B+ expansion board to realize the IR control function.

Dimensions

IMG 2401-800x800.jpg

Function

1. IR Receive Function

Working frequency: 38KHz
Receive distance: 18-20m
Receive angle: +/-45 angle

2. IR Launch Function

wavelength: 940nm
Launch distance: 7-8m

3. Support launching with IR double LED.(You need to weld backup launch tube D2, and cut off SJ1.)

4. Support LIRC software. You can copy all of the IR remote control function with LIRC and expansion board.(Such as TV, Power amplifier and DVD etc), you can also use commands to control the appliances.

5. Support XBMC system.

6. Support Double GPIO button.

LIRC Software

1. Connect the IR Remote Shield to your Raspberry Pi, turn it on. Log in to the Raspberry Pi. install LIRC software(Linux Infrared remote control) .

sudo apt-get install lirc

2. Edit config.txt, and add configuration. (IR launcher for IR Board=17, IR receiver=18)

PS: For the those expansion board such as DAC II,DiGi+, DAC+ or Stepper/Motor/Servo Robot Expansion Board SKU:418460, only exist Receiver no launcher, and gpio_in_pin=26 (GPIO PIN)

sudo nano /boot/config.txt

Add the following content to config.txt

dtoverlay=lirc-rpi,gpio_in_pin=18,gpio_out_pin=17

Notice: The version under raspbian-02-05 please refer to the below step 2 !!!

2. Edit Modules, and add configuration.

sudo nano /etc/modules

Add the two line content to end of this file

lirc_dev
lirc_rpi gpio_in_pin=18 gpio_out_pin=17

3. Edit the configuration file of LIRC, enables the IR function.

sudo nano /etc/lirc/hardware.conf

modify the following content:

LIRCD_ARGS="--uinput --listen"
DRIVER="default"
DEVICE="/dev/lirc0″
MODULES="lirc_rpi"

PS: please create a new hardware.conf file if the hardware.conf file is not exist. the comment of file is as following:

LIRCD_ARGS="--uinput --listen"
LOAD_MODULES=true
DRIVER="default"
DEVICE="/dev/lirc0"
MODULES="lirc_rpi"

Ir-1.jpg

then edit the /etc/lirc/lirc_options.conf file; and modify the following lines;

driver = default
device = /dev/lirc0

Ir-2.jpg

4. Restart the LIRC function

sudo /etc/init.d/lirc stop
sudo /etc/init.d/lirc start

Until now the configutarion has been finished!

PS: if you can't find the above command, maybe you use the new lirc versin, please try the following command:1

sudo /etc/init.d/lircd stop
sudo /etc/init.d/lircd start

IR Receive Function

1. Stop LIRC software

sudo /etc/init.d/lirc stop

2. Issue the following command:

mode2 -d /dev/lirc0

3. Press any button of IR remote controller in front of the remote sheild. You should be able to see something like this in your terminal:

space 16300
pulse 95
space 28794
pulse 80 
space 19395
pulse 83
space 402351
pulse 135
space 7085
pulse 85
space 2903

And that means your IR Remote Shield is working well!

IR Transmitting Function

1. Stop LIRC software

sudo /etc/init.d/lirc stop

2. Input command ‘irrecord –list-namespace‘. The parameter will provide the tips of valid button name(Write it down as you will need to input these names manually).

irrecord –list-namespace

3. Issue the command of IR code recording.

irrecord -d /dev/lirc0 ~/lircd.conf

Then just follow the instruction printed on the screen. After you’ve finished everything, the information of your remote controller will be saved in /home/pi/lircd.conf.

4. Copy /home/pi/lircd.conf to /etc/lirc/, overwrite the existing file: sudo cp /home/pi/lircd.conf /etc/lirc/lircd.conf

Then restart LIRC:

sudo /etc/init.d/lirc restart

You can double check the keys you just recorded:

irsend LIST /home/pi/lircd.conf ""

You should be able to see something like this:

irsend: 000000000000c837 KEY_VOLUMEDOWN
irsend: 00000000000048b7 KEY_VOLUMEUP
irsend: 00000000000008f7 KEY_VIDEO_PREV
irsend: 0000000000008877 KEY_VIDEO_NEXT 

5. Now You can now transmit IR commands:

irsend SEND_ONCE /home/pi/lircd.conf KEY_VIDEO_PREV
irsend SEND_ONCE /home/pi/lircd.conf KEY_VIDEO_NEXT
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEDOWN
irsend SEND_ONCE /home/pi/lircd.conf KEY_VOLUMEUP

Features of remote control:

  1. Remote control distance: 8~10m
  2. 38KHz universal remote control for arduino

Download

LIRC Official Website

Control the Application via web IR

Control the Application via Phone APP

Only IR receive Application under XBMC

FAQ

1. How to add a second IR LED on the board?

If you need to add a second IR LED, you need to remove the solder joint of SJ1. Then weld the second led on D2, same direction as D1.

2. How do I know if my board is working? I followed the instructions on the wiki, and there is no /dev/lirc0.

Newer versions of the RaspberryPi Operating systems use lircd (note the d at the end). Follow the instructions on the wiki (www.raspberrypiwiki.com/index.php/Raspberry_Pi_IR_Control_Expansion_Board). There are other links at the bottom of the wiki which might help. Also, this post helped me: https://gist.github.com/prasanthj/c15a5298eb682bde34961c322c95378b 

You may also need to search for other tips on the internet which use lirc (lircd); some of these have test programs, which blink the IR Led so you can see it working - to see it working, watch it with your smartphone camera - the phone camera changes IR to violet so you can see it.

Packing List

  • 1 x IR Control Board
  • 1 x Remote Controller(without battery, battery type is CR2025 3V button battery )
Add your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Anonymous user #10

35 months ago
Score 0++
I need it to control Marantz HiFi gear and they use the Phillips RC-5 protocol. The Wikipedia page of the protocol states it uses a 36kHz carrier frequency. Is it likely to work with 38 kHz or is there a straightforward way to change the frequency on the board or in software?

Anonymous user #9

44 months ago
Score 0++
What is the purpose of the second LED? Is it to have more power?

Anonymous user #7

51 months ago
Score 0++
Seems that with buster lirc is not working anymore. Did someone get it to work or can tell me how I can get it to work with Raspi3 buster?

Anonymous user #8

48 months ago
Score 0++

Change the boot/config.txt to for buster.

dtoverlay=gpio-ir-tx,gpio_pin=17

dtoverlay=gpio-ir,gpio_pin=18

Anonymous user #6

56 months ago
Score 0++

pi@raspberrypi:~ $ sudo modprobe lirc_rpi modprobe: FATAL: Module lirc_rpi not found in directory /lib/modules/4.19.58+ pi@raspberrypi:~ $

So I guess the library has changed and can't use in newer kernels now.

Anonymous user #6

56 months ago
Score 0++

I keep getting red error just doing the apt install command:

● lircd.service - Flexible IR remote input/output application support Loaded: loaded (/lib/systemd/system/lircd.service; disabled; vendor preset: enabled) Active: failed (Result: signal) since Mon 2019-08-05 15:23:01 EDT; 43ms ago Docs: man:lircd(8) http://lirc....nfigure.html Process: 1005 ExecStart=/usr/sbin/lircd --nodaemon (code=killed, signal=SEGV) Main PID: 1005 (code=killed, signal=SEGV)

Aug 05 15:23:01 remote systemd[1]: Starting Flexible IR remote input/output application support... Aug 05 15:23:01 remote lircd[1005]: Warning: cannot open /etc/lirc/lirc_options.conf Aug 05 15:23:01 remote lircd-0.10.1[1005]: Info: lircd: Opening log, level: Info Aug 05 15:23:01 remote lircd-0.10.1[1005]: Notice: Version: lircd 0.10.1 Aug 05 15:23:01 remote lircd-0.10.1[1005]: Notice: System info: Linux remote 4.19.57-v7+ #1244 SMP Thu Jul 4 18:45:25 BST 2019 armv7l GNU/Linux Aug 05 15:23:01 remote systemd[1]: lircd.service: Main process exited, code=killed, status=11/SEGV Aug 05 15:23:01 remote systemd[1]: lircd.service: Failed with result 'signal'. Aug 05 15:23:01 remote systemd[1]: Failed to start Flexible IR remote input/output application support. dpkg: error processing package lirc (--configure): installed lirc package post-installation script subprocess returned error exit status 1 Processing triggers for systemd (241-5+rpi1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10+rpi1) ... Errors were encountered while processing: lirc

E: Sub-process /usr/bin/dpkg returned an error code (1)

Anonymous user #5

57 months ago
Score 0++

has anyone got this to work with VERSION="10 (buster)"?? I have tried these docs and it does not work

I have tried two different expansion boards

Anonymous user #4

57 months ago
Score 0++
I am using Raspian Buster, and trying to record codes of a Sony remote. But it is not able to detect the buttons, even though mode2 is detecting the button presses on the remote.

Anonymous user #3

58 months ago
Score 0++

Anonymous user #3

58 months ago
Score 0++
I mean, this paragraph : LIRC Software

Anonymous user #2

58 months ago
Score 0++
The configuration explained in this document does not work anymore with the latest version 2019-04-08-raspbian-stretch-full

Admin

58 months ago
Score 0++

Hi,

Could you please tell me which document does not work?

Anonymous user #1

58 months ago
Score 0++
What position on the Gio pins do the controller board sit on ??

Admin

58 months ago
Score 0++

Hello friend, Thanks for your question. Please send us your order number and probelm details, thank you! Best regards,

Cindy/Geekworm

Anonymous user #1

58 months ago
Score 0++
What do the two buttons on the controller board do ???

Admin

58 months ago
Score 0++

Hello friend, Thanks for your question. Please send us your order number and probelm details, thank you! Best regards,

Cindy/Geekworm