Raspberry Pi IR Control Expansion Board

From raspberry pi wiki
Jump to: navigation, 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

Packing List

  • 1 x IR Control Board
  • 1 x Remote Controller
Add your comment
raspberry pi wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.